diff --git a/dist/cjs/jedi.cjs b/dist/cjs/jedi.cjs index a5bd0ca..38ded59 100644 --- a/dist/cjs/jedi.cjs +++ b/dist/cjs/jedi.cjs @@ -1,2 +1,2 @@ -"use strict";function e(){const e=[];return function(t,s){if("object"!=typeof s||null===s)return s;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(s)?"[Circular]":(e.push(s),s)}}function t(t){if(void 0!==t)return JSON.parse(JSON.stringify(t,e()))}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i(e,t,i){return e.replace(new RegExp(s(t),"g"),i)}function n(e){return i(i(e,"#","root"),"/","-")}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){return Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{})}function o(e,t){return b(e)&&b(t)&&(e=r(e),t=r(t)),JSON.stringify(e)===JSON.stringify(t)}function l(e,t){return!o(e,t)}function c(e){return null===e}function d(e){return void 0!==e}function h(e){return void 0===e}function p(e){return"number"==typeof e}function u(e){return p(e)&&e===Math.floor(e)}function m(e){return"string"==typeof e}function g(e){return"boolean"==typeof e}function f(e){return Array.isArray(e)}function b(e){return!c(e)&&!f(e)&&"object"==typeof e}function v(e){let t="any";return p(e)?t=u(e)?"integer":"number":m(e)?t="string":g(e)?t="boolean":f(e)?t="array":c(e)?t="null":b(e)&&(t="object"),t}function C(e,...t){if(!t.length)return e;const s=t.shift();return b(e)&&b(s)&&Object.keys(s).forEach((t=>{b(s[t])?(e[t]||Object.assign(e,{[t]:{}}),C(e[t],s[t])):Object.assign(e,{[t]:s[t]})})),C(e,...t)}function y(e,t){return Object.keys(t).forEach((function(s){s in e&&typeof e[s]==typeof t[s]&&(e[s]=t[s])})),e}function L(e,t){const s=t.split(".");let i=e;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const e=parseInt(n);if(!(e>=0&&e{const s=(e=e.replace(/\s/g,"")).split(/{{|}}/)[1];return L(t,s)}))}function x(e,t,s){return Math.max(t,Math.min(e,s))}function I(e){const t=[],s=new Set;for(const i of e){const e=JSON.stringify(i);s.has(e)||(s.add(e),t.push(i))}return t}const w={getCircularReplacer:e,clone:t,escapeRegExp:s,replaceAll:i,pathToAttribute:n,hasOwn:a,sortObject:r,equal:o,different:l,isNull:c,isSet:d,notSet:h,isNumber:p,isInteger:u,isString:m,isBoolean:g,isArray:f,isObject:b,getType:v,mergeDeep:C,overwriteExistingProperties:y,getValueByJSONPath:L,compileTemplate:E,clamp:x,removeDuplicatesFromArray:I};function A(e){return b(e.additionalProperties)||g(e.additionalProperties)?e.additionalProperties:void 0}function S(e){return b(e.propertyNames)||g(e.propertyNames)?e.propertyNames:void 0}function j(e){return f(e.allOf)?e.allOf:void 0}function k(e){return f(e.anyOf)?e.anyOf:void 0}function O(e){return e.const}function P(e){return b(e.contains)||g(e.contains)?e.contains:void 0}function T(e){return e.default}function V(e){return b(e.dependentRequired)?e.dependentRequired:void 0}function H(e){return b(e.dependentSchemas)?e.dependentSchemas:void 0}function M(e){return m(e.description)?e.description:void 0}function R(e){return b(e.else)||g(e.else)?e.else:void 0}function B(e){if(f(e.enum)&&e.enum.length>0)return e.enum}function N(e){return p(e.exclusiveMaximum)?e.exclusiveMaximum:void 0}function q(e){return p(e.exclusiveMinimum)?e.exclusiveMinimum:void 0}function D(e){return m(e.format)?e.format:void 0}function U(e){return b(e.if)||g(e.if)?e.if:void 0}function F(e){return b(e.items)||g(e.items)?e.items:void 0}function K(e){return p(e.maximum)?e.maximum:void 0}function $(e){if(u(e.maxContains)&&e.maxContains>=0)return e.maxContains}function z(e){if(u(e.maxItems)&&e.maxItems>=0)return e.maxItems}function J(e){if(u(e.maxLength)&&e.maxLength>=0)return e.maxLength}function G(e){if(u(e.maxProperties))return e.maxProperties}function Z(e){return p(e.minimum)?e.minimum:void 0}function Q(e){if(u(e.minContains)&&e.minContains>=0)return e.minContains}function W(e){if(u(e.minItems)&&e.minItems>=0)return e.minItems}function X(e){if(u(e.minLength)&&e.minLength>=0)return e.minLength}function _(e){if(u(e.minProperties)&&e.minProperties>=0)return e.minProperties}function Y(e){if(p(e.multipleOf)&&e.multipleOf>=0)return e.multipleOf}function ee(e){return b(e.not)||g(e.not)?e.not:void 0}function te(e,t){return e["x-options"]&&d(e["x-options"][t])?e["x-options"][t]:void 0}function se(e){return m(e.pattern)?e.pattern:void 0}function ie(e){return b(e.patternProperties)?e.patternProperties:void 0}function ne(e){return f(e.prefixItems)?e.prefixItems:void 0}function ae(e){return b(e.properties)?e.properties:void 0}function re(e){return g(e.readOnly)?e.readOnly:void 0}function oe(e){return f(e.required)?[...new Set(e.required)]:void 0}function le(e){return b(e.then)||g(e.then)?e.then:void 0}function ce(e){return m(e.title)?e.title:void 0}function de(e){if(m(e.type)||f(e.type))return e.type}function he(e){return f(e.oneOf)?e.oneOf:void 0}function pe(e){return g(e.unevaluatedProperties)?e.unevaluatedProperties:void 0}function ue(e){return g(e.uniqueItems)?e.uniqueItems:void 0}const me={getSchemaX:function(e,t){return e["x-"+t]},getSchemaSchema:function(e){return m(e.$schema)?e.$schema:void 0},getSchemaAdditionalProperties:A,getSchemaPropertyNames:S,getSchemaAllOf:j,getSchemaAnyOf:k,getSchemaConst:O,getSchemaContains:P,getSchemaDefault:T,getSchemaDependentRequired:V,getSchemaDependentSchemas:H,getSchemaDescription:M,getSchemaElse:R,getSchemaEnum:B,getSchemaExclusiveMaximum:N,getSchemaExclusiveMinimum:q,getSchemaFormat:D,getSchemaIf:U,getSchemaItems:F,getSchemaMaximum:K,getSchemaMaxContains:$,getSchemaMaxItems:z,getSchemaMaxLength:J,getSchemaMaxProperties:G,getSchemaMinimum:Z,getSchemaMinContains:Q,getSchemaMinItems:W,getSchemaMinLength:X,getSchemaMinProperties:_,getSchemaMultipleOf:Y,getSchemaNot:ee,getSchemaXOption:te,getSchemaPattern:se,getSchemaPatternProperties:ie,getSchemaPrefixItems:ne,getSchemaProperties:ae,getSchemaReadOnly:re,getSchemaRequired:oe,getSchemaThen:le,getSchemaTitle:ce,getSchemaType:de,getSchemaOneOf:he,getSchemaUnevaluatedProperties:pe,getSchemaUniqueItems:ue};function ge(e,t,s,i,n){let a=[];const r=j(s);return d(r)&&(r.forEach((s=>{const r=new Ls({refParser:e.refParser,schema:s,data:t,rootName:i}),o=r.getErrors();r.destroy(),o.forEach((e=>{e.path=n})),a.push(...o)})),a=I(a)),a}const fe='Has additional property "{{ property }}" but no additional properties are allowed.',be="Must validate against at least one of the provided schemas.",ve="Must have value of: {{ const }}.",Ce="Must contain at least one item matching the provided schema.",ye="Must have the required properties: {{ dependentRequired }}.",Le="Must be one of the enumerated values: {{ enum }}.",Ee="Must be less than {{ exclusiveMaximum }}.",xe="Must be greater than {{ exclusiveMinimum }}.",Ie="Must be a valid {{ format }}.",we="Must have items that validate against the provided schema.",Ae="Must be at most {{ maximum }}.",Se="Must have at most {{ maxItems }} items.",je="Must be at most {{ maxLength }} characters long.",ke="Must have at most {{ maxProperties }} properties.",Oe="Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",Pe="Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",Te="Must be at least {{ minimum }}.",Ve="Must have at least {{ minItems }} items.",He="Must be at least {{ minLength }} characters long.",Me="Must have at least {{ minProperties }} properties.",Re="Must be multiple of {{ multipleOf }}.",Be="Must not validate against the provided schema.",Ne="Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",qe='Must match the pattern: "{{ pattern }}".',De="Item {{ index }} fails validation.",Ue='Property name "{{ propertyName }}" fails validation.',Fe="The following properties do not comply with their schemas: {{ properties }}",Ke="Must have the required properties: {{ required }}.",$e="Must be of type {{ type }}.",ze='Has invalid unevaluated property "{{ property }}"',Je="Must have unique items.";function Ge(e,t,s,i,n){const a=[],r=X(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&(s=!0)})),s||a.push({messages:[be],path:n,constrain:"anyOf"})}return a}function Qe(e,t,s,i,n){const a=[],r=B(s);if(d(r)){!r.some((e=>JSON.stringify(t)===JSON.stringify(e)))&&a.push({messages:[E(Le,{enum:JSON.stringify(r)})],path:n,constrain:"enum"})}return a}function We(e,t,s,i,n){const a=[],r=N(s);if(p(t)&&d(r)){t>=r&&a.push({messages:[E(Ee,{exclusiveMaximum:r})],path:n,constrain:"exclusiveMaximum"})}return a}function Xe(e,t,s,i,n){const a=[],r=q(s);if(p(t)&&d(r)){t<=r&&a.push({messages:[E(xe,{exclusiveMinimum:r})],path:n,constrain:"exclusiveMinimum"})}return a}function _e(e,t,s,i,n){const a=[],r=D(s);let o=e.validateFormat;if(te(s,"validateFormat")&&(o=s.options.validateFormat),d(r)&&m(t)&&o){let e;"email"===r&&(e=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),"url"===r&&(e=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),"uuid"===r&&(e=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i));d(e)&&!e.test(t)&&a.push({messages:[E(Ie,{format:r})],path:n,constrain:"format"})}return a}function Ye(e,t,s,i,n){const a=[],r=F(s),o=ne(s);if(f(t)&&d(r)){const e=d(o)?o.length:0;!1===r&&t.length>0&&t.length>e&&a.push({messages:[we],path:n,constrain:"items"})}return a}function et(e,t,s,i,n){const a=[],r=z(s);if(f(t)&&d(r)){t.length>r&&a.push({messages:[E(Se,{maxItems:r})],path:n,constrain:"maxItems"})}return a}function tt(e,t,s,i,n){const a=[],r=J(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length>r&&a.push({messages:[E(je,{maxLength:r})],path:n,constrain:"maxLength"})}return a}function st(e,t,s,i,n){const a=[],r=G(s);if(b(t)&&d(r)){Object.keys(t).length>r&&a.push({messages:[E(ke,{maxProperties:r})],path:n,constrain:"maxProperties"})}return a}function it(e,t,s,i,n){const a=[],r=Z(s);if(p(t)&&d(r)){t{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&s++})),1!==s&&a.push({messages:[E(Ne,{counter:s})],path:n,constrain:"oneOf"})}return a}function ct(e,t,s,i,n){const a=[],r=se(s);if(m(t)&&d(r)){!new RegExp(r).test(t)&&a.push({messages:[E(qe,{pattern:r})],path:n,constrain:"pattern"})}return a}function dt(e,t,s,i){let n=[];const a=ie(s);return b(t)&&d(a)&&Object.keys(t).forEach((s=>{Object.keys(a).forEach((r=>{if(new RegExp(r).test(s)){const o=a[r],l=new Ls({refParser:e.refParser,schema:o,data:t[s]}),c=l.getErrors().map((e=>({messages:e.messages,path:i+"/"+s,constrain:"patternProperties"})));n=[...n,...c],l.destroy()}}))})),n}function ht(e,t,s,i){const n=ae(s),r=[];return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(a(t,s)){const i=n[s],a=new Ls({refParser:e.refParser,schema:i,data:t[s]});a.getErrors().length>0&&r.push(s),a.destroy()}})),r.length>0?[{messages:[E(Fe,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function pt(e,t,s,i,n){const a=[],r=oe(s);if(b(t)&&d(r)){const e=[],s=Object.keys(t);r.forEach((t=>{s.includes(t)||e.push(t)}));e.length>0&&a.push({messages:[E(Ke,{required:e.join(", ")})],path:n,constrain:"required"})}return a}function ut(e,t,s,i,n){const a=[],r=de(s);if("any"===r)return a;if(d(r)){const e={string:e=>m(e),number:e=>p(e),integer:e=>u(e),boolean:e=>g(e),array:e=>f(e),object:e=>b(e),null:e=>c(e)};let s=!0;s=f(r)?r.some((s=>e[s](t))):e[r](t),s||a.push({messages:[E($e,{type:r,valueType:v(t)})],path:n,constrain:"type"})}return a}function mt(e,t,s,i,n){const a=[],r=K(s);if(p(t)&&d(r)){t>r&&a.push({messages:[E(Ae,{maximum:r})],path:n,constrain:"maximum"})}return a}function gt(e,t,s,i,n){const a=[],o=ue(s);if(f(t)&&d(o)&&!0===o){const e=[];let s=!1;for(let i=0;ie===a)),s)break;e.push(a)}s&&a.push({messages:[Je],path:n,constrain:"uniqueItems"})}return a}function ft(e,t,s,i,n){const r=[],o=A(s),l=ie(s),c=ae(s);if(b(t)&&d(o)){const s=c||{},i=o,d=l||{};Object.keys(t).forEach((o=>{const l=Object.keys(d).some((e=>new RegExp(e).test(o))),c=a(s,o);if(!l&&!c)if(!1===i)r.push({messages:[E(fe,{property:o})],path:n,constrain:"additionalProperties"});else if(b(i)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),a=s.getErrors().map((e=>({messages:e.messages,path:`${n}.${o}`,constrain:"additionalProperties"})));r.push(...a),s.destroy()}}))}return r}const bt={additionalProperties:ft,allOf:ge,anyOf:Ze,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,required:pt,type:ut,uniqueItems:gt};function vt(e,t,s,i,n){const a=[],r=O(s);if(d(r)){l(t,r)&&a.push({messages:[E(ve,{const:JSON.stringify(r)})],path:n,constrain:"const"})}return a}function Ct(e,t,s,i,n){const a=[],r=P(s),o=Q(s),l=$(s);if(f(t)&&d(r)){let s=0;t.forEach((t=>{const i=new Ls({refParser:e.refParser,schema:r,data:t});0===i.getErrors().length&&s++,i.destroy()}));const i=0===s;if(d(o)){sl&&a.push({messages:[E(Oe,{counter:s,maxContains:l})],path:n,constrain:"maxContains"})}}return a}function yt(e,t,s,i,n){const r=[],o=V(s);if(b(t)&&d(o)){let e=[];Object.keys(o).forEach((s=>{if(d(t[s])){const i=o[s];e=i.filter((e=>!a(t,e)))}}));e.length>0&&r.push({messages:[E(ye,{dependentRequired:e.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function Lt(e,t,s){let i=[];const n=H(s);return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(d(t[s])){const a=n[s],r=new Ls({refParser:e.refParser,schema:a,data:t}),o=r.getErrors();r.destroy(),i=[...i,...o]}})),i}function Et(e,t,s){const i=[],n=U(s),a=le(s),r=R(s);if(d(n)){if(h(a)&&h(r))return i;const s=new Ls({refParser:e.refParser,schema:n,data:t}),o=s.getErrors();s.destroy();let l=[],c=[];if(d(a)){const s=new Ls({refParser:e.refParser,schema:a,data:t});l=s.getErrors(),s.destroy()}if(d(r)){const s=new Ls({refParser:e.refParser,schema:r,data:t});c=s.getErrors(),s.destroy()}if(!0===n)return l;if(!1===n)return c;if(0===o.length)return l;if(o.length>0)return c}return i}function xt(e,t,s,i,n){const a=[],r=ne(s);return f(t)&&d(r)&&r.forEach(((s,i)=>{const r=t[i];if(d(r)){const t=new Ls({refParser:e.refParser,schema:s,data:r}),o=t.getErrors();t.destroy(),o.length>0&&a.push({messages:[E(De,{index:i})],path:n,constrain:"prefixItems"})}})),a}const It={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt},wt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt};function At(e,t,s,i,n){let r=[];const o=pe(s),l=ie(s),c=ae(s),h=j(s),p=k(s),u=he(s);if(b(t)&&d(o)){let s=d(c)?c:{};const i=o,m=l;[h,p,u].forEach((e=>{d(e)&&e.forEach((e=>{d(e.properties)&&(s={...s,...e.properties})}))})),s&&Object.keys(t).forEach((o=>{let l=!1;if(d(m)&&Object.keys(m).forEach((e=>{const t=new RegExp(e);l=t.test(o)})),l||!1!==i||a(s,o)||r.push({messages:[E(ze,{property:o})],path:n,constrain:"unevaluatedProperties"}),!l&&b(i)&&!a(s,o)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),n=s.getErrors().map((e=>({messages:e.messages,path:o,constrain:"unevaluatedProperties"})));r=[...r,...n],s.destroy()}}))}return r}const St={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,propertie:ht,prefixItems:xt,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};const jt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,prefixItems:xt,propertyNames:function(e,t,s,i,n){const a=[],r=S(s);return b(t)&&d(r)&&Object.keys(t).forEach((t=>{new Ls({refParser:e.refParser,schema:r,data:t}).getErrors().length>0&&a.push({messages:[E(Ue,{propertyName:t})],path:n,constrain:"propertyNames"})})),a},properties:ht,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};class kt{constructor(e={}){this.refParser=e.refParser,this.validateFormat=!!e.validateFormat&&e.validateFormat,this.draft=jt,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":bt,"http://json-schema.org/draft-06/schema#":It,"http://json-schema.org/draft-07/schema#":wt,"https://json-schema.org/draft/2019-09/schema":St,"https://json-schema.org/draft/2020-12/schema":jt}}getErrors(e,s,i,n){let r=[];const o=te(s,"messages"),l=t(s);return g(l)&&!0===l?r:g(l)&&!1===l?[{messages:d(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach((t=>{if(a(l,t)){const a=(0,this.draft[t])(this,e,s,i,n);a&&(r=[...r,...a])}})),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Ot{constructor(){this.listeners=[]}on(e,t){this.listeners.push({name:e,callback:t})}off(e){this.listeners=this.listeners.filter((t=>t.name!==e))}emit(e,t=void 0){this.listeners.filter((t=>t.name===e)).forEach((e=>{e.callback(t)}))}destroy(){Object.keys(this).forEach((e=>{delete this[e]}))}}class Pt extends Ot{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=d(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",(()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())}))}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=t=>{this.jedi.register(t),t.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(h(this.value)){let e;const t=de(this.schema);"boolean"===t&&(e=!1),"number"===t&&(e=0),"integer"===t&&(e=0),"string"===t&&(e=""),"array"===t&&(e=[]),"object"===t&&(e={}),"null"===t&&(e=null),this.value=e}}setDefaultValue(){const e=T(this.schema);d(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,t=!0){const s=this.jedi.options.enforceConst||te(this.schema,"enforceConst");if(d(s)&&o(s,!0)){const t=O(this.schema);d(t)&&(e=t)}this.value=e,this.emit("set-value",e),t&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];return I(this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path))}prepare(){}activate(){!1===this.isActive&&(this.isActive=!0,this.emit("change"))}deactivate(){!0===this.isActive&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return!0===re(this.schema)&&(e=!0),this.parent&&!0===re(this.parent.schema)&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach((e=>{e.destroy()})),this.ui&&this.ui.destroy(),Object.keys(this).forEach((e=>{delete this[e]})),super.destroy()}}class Tt{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI();("always"===this.instance.jedi.options.showErrors||"always"===te(this.instance.schema,"showErrors"))&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})),this.instance.on("change",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}))}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",de(this.instance.schema))}build(){}enforceEnumDefault(){const e=te(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,t=B(this.instance.schema);d(t)&&!t.includes(this.instance.getValue())&&d(t[0])&&e&&this.instance.setValue(t[0],!1)}addEventListeners(){}showValidationErrors(e,t=!1){e=e.filter((e=>e.path===this.instance.path)),this.control.messages.innerHTML="",this.showingValidationErrors=!1;if(("never"===this.instance.jedi.options.showErrors||"never"===te(this.instance.schema,"showErrors"))&&!t||0===e.length)return;const s=ce(this.instance.schema)||this.instance.getKey();e.forEach((e=>{"properties"!==e.constraint&&e.messages.forEach((e=>{const t=this.getInvalidFeedback({message:s+": "+e});this.control.messages.appendChild(t)}))})),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach((e=>{this.disabled||this.readOnly?e.setAttribute("disabled",""):e.removeAttribute("disabled","")}))}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach((e=>{delete this[e]}))}}class Vt extends Tt{static resolves(e){return d(U(e))}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Ht extends Pt{setUI(){this.ui=new Vt(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach((s=>{if(d(s.then)){this.schemas.push(C({},t(this.schema),s.then)),this.switcherOptionValues.push(e);const i="then";this.switcherOptionsLabels.push(i),e++}if(d(s.else)){this.schemas.push(C({},t(this.schema),s.else)),this.switcherOptionValues.push(e);const i="else";this.switcherOptionsLabels.push(i),e++}}));const s=t(this.schema);delete s.if,delete s.then,delete s.else;const i=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent});this.schemas.forEach((e=>{const t=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent});this.instanceStartingValues.push(t.getValue()),t.on("change",(()=>{const e=this.activeInstance.getValue();this.getFittestIndex(e)!==this.index?this.setValue(e):(this.value=this.activeInstance.getValue(),this.emit("change"))})),this.instances.push(t)})),this.on("set-value",(e=>{this.instances.forEach((t=>{const s=t.getValue();b(s)&&b(e)&&(e=y(s,e),t.children.forEach((t=>{const s=O(t.schema);d(s)&&(e[t.getKey()]=s)}))),t.setValue(e,!1)}));const t=this.getFittestIndex(e);t!==this.index&&this.switchInstance(t)})),this.value=i.getValue(),i.destroy();const n=this.getFittestIndex(this.value);this.switchInstance(n)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const t=U(e);if(d(t)){const s=le(e),i=R(e);this.ifThenElseShemas.push({if:t,then:d(s)?s:{}}),this.ifThenElseShemas.push({if:t,else:d(i)?i:{}})}}getFittestIndex(e){let t=this.index;return this.ifThenElseShemas.forEach(((s,i)=>{const n=new Ls({schema:s.if,data:e,refParser:this.jedi.refParser}),a=n.getErrors();n.destroy(),0===a.length&&s.then&&(t=i),a.length>0&&s.else&&(t=i)})),t}destroy(){this.instances.forEach((e=>{e.destroy()})),super.destroy()}getAllOfCombinations(e){const t=[],s=(e,i)=>{if(0===i.length)return void t.push(e);const n=i[0];var a,r;s((a=e,r=n,{...a,...r}),i.slice(1)),s(e,i.slice(1))};for(let i=0;iObject.keys(e).length-Object.keys(t).length)),t}}class Mt extends Pt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",(()=>{this.onSetValue()}));const e=de(this.schema);if(d(k(this.schema))||d(he(this.schema))){const e=d(k(this.schema))?k(this.schema):he(this.schema),s=t(this.schema);delete s.anyOf,delete s.oneOf,delete s.options,e.forEach(((e,t)=>{e={...s,...e},this.jedi.refParser&&(e=this.jedi.refParser.expand(e));let i="Option-"+(t+1);const n=te(e,"switcherTitle"),a=ce(e);d(a)&&(i=a),d(n)&&(i=n),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(i),this.schemas.push(e)}))}else if(f(e))e.forEach(((e,t)=>{const s=C(this.schema),i={...s,type:e,title:e[0].toUpperCase()+e.slice(1)};d(s.title)&&(i.title=s.title),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(e.charAt(0).toUpperCase()+e.slice(1)),this.schemas.push(i)}));else if("any"===e||!e){const e=t(this.schema);this.schemas=[{...e,type:"object"},{...e,type:"array"},{...e,type:"string"},{...e,type:"number"},{...e,type:"integer"},{...e,type:"boolean"},{...e,type:"null"}],this.schemas.forEach(((e,t)=>{this.switcherOptionValues.push(t)})),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach((e=>{const s=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent,value:t(this.value)});d(this.value)&&s.setValue(this.value,!1),s.unregister(),s.off("change"),s.on("change",(()=>{this.value=this.activeInstance.getValue(),this.emit("change")})),this.instances.push(s),this.register()}));const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,t){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],d(t)&&this.activeInstance.setValue(t,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(l(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let t,s,i=0;for(const n of this.instances){const a=this.jedi.validator.getErrors(e,n.schema,n.getKey(),n.path);(h(t)||h(s))&&(t=i,s=a),a.length{e.destroy()})),super.destroy()}}class Rt extends Pt{}class Bt extends Pt{prepare(){this.properties={};const e=ae(this.schema);d(e)&&Object.keys(e).forEach((t=>{const s=e[t];this.properties[t]={schema:s};let i=!0;const n=this.jedi.options.deactivateNonRequired,a=te(this.schema,"deactivateNonRequired"),r=te(s,"deactivateNonRequired");this.isNotRequired(t)&&d(n)&&!0===n&&(i=!1),this.isNotRequired(t)&&d(a)&&!0===a&&(i=!1),this.isNotRequired(t)&&d(r)&&!0===r&&(i=!1),i&&this.createChild(s,t)})),this.refreshInstances(),this.on("set-value",(()=>{this.refreshInstances()}))}isRequired(e){const t=oe(this.schema);return d(t)&&t.includes(e)}isDependentRequired(e){const t=V(this.schema);if(d(t)){let s=[];return Object.keys(t).forEach((e=>{if(d(this.value[e])){const i=t[e];s=i.filter((e=>!a(this.value,e)))}})),s.includes(e)}return!1}createChild(e,s,i,n=!1){const a=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:t(i)});this.children.push(a),this.value[s]=a.getValue();const r=this.jedi.options.deactivateNonRequired||te(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&d(r)&&!0===r&&!n&&a.deactivate(),a}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let t=this.children.length-1;t>=0;t--){const s=this.children[t];s.getKey()===e&&(s.destroy(),this.children.splice(t,1),this.onChildChange())}}getChild(e){return this.children.find((t=>e===t.getKey().split(this.jedi.pathSeparator).pop()))}getPropertySchema(e){let t;const s=A(this.schema),i=ae(this.schema),n=ie(this.schema);return d(i)&&a(i,e)?t=i[e]:d(n)&&Object.keys(n).forEach((s=>{new RegExp(s).test(e)&&(t=n[s])})),h(t)&&d(s)&&(t=s),h(t)&&(t={}),t}onChildChange(){const e={};this.children.forEach((t=>{t.isActive&&(e[t.getKey()]=t.getValue())})),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort(((e,t)=>{const s=te(e.schema,"propertyOrder"),i=te(t.schema,"propertyOrder"),n=p(s),a=p(i);return!n&&a?1:n&&!a||si?1:0}))}refreshInstances(){const e=this.getValue();if(b(e)){Object.keys(e).forEach((t=>{const s=this.getChild(t);if(s){s.activate();const t=s.getValue(),i=e[s.getKey()];l(t,i)&&s.setValue(i,!1)}else{const s=this.getPropertySchema(t);this.createChild(s,t,e[t],!0)}}));for(let t=this.children.length-1;t>=0;t--){const s=this.children[t],i=s.getKey();h(e[i])&&(this.getChild(i)?s.deactivate():this.deleteChild(i))}this.sortChildrenByPropertyOrder()}}}class Nt extends Pt{prepare(){this.refreshChildren(),this.on("set-value",(()=>{this.refreshChildren()}))}createItemInstance(e){let s;const i=this.children.length,n=F(this.schema),a=ne(this.schema);s=d(n)?n:{};d(a)&&d(a[i])&&(s=a[i]);const r=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:t(e)});return d(e)&&r.setValue(e,!1),r}move(e,s){const i=t(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=t(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const s=t(this.getValue()).filter(((t,s)=>s!==e));this.setValue(s)}onChildChange(){const e=[];this.children.forEach((t=>{e.push(t.getValue())})),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();f(e)&&e.forEach((e=>{const t=this.createItemInstance(e);this.children.push(t)}))}}class qt extends Pt{}class Dt extends Pt{}class Ut extends Pt{}const Ft={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Kt={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},$t={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},zt={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},Jt={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},Gt={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Zt extends Tt{sanitize(e){return Boolean(e)}}class Qt extends Zt{static resolves(e){return"boolean"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t="true"===e.value;this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{const t="true"===e.value;e.checked=t===this.instance.getValue()}))}}class Wt extends Zt{static resolves(e){return"boolean"===de(e)}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e="true"===this.control.input.value;this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=!0===this.instance.getValue()?"true":"false"}}class Xt extends Zt{static resolves(e){return"boolean"===de(e)&&"checkbox"===te(e,"format")}build(){this.control=this.theme.getCheckboxControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.checked)}))}sanitize(e){return Boolean(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class _t extends Tt{sanitize(e){return String(e)}}class Yt extends _t{static resolves(e){return"string"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{this.instance.setValue(e.value)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=e.value===this.instance.getValue()}))}}class es extends _t{static resolves(e){return"string"===de(e)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ts extends _t{static resolves(e){return"string"===de(e)&&"textarea"===te(e,"format")}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ss extends _t{static resolves(e){return window.Awesomplete&&"string"===de(e)&&d(te(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,te(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class is extends _t{static resolves(e){return"string"===de(e)}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=te(this.instance.schema,"format");this.control=this.theme.getInputControl({type:is.getTypes().includes(e)?e:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===e,description:M(this.instance.schema)}),"color"===e&&0===this.instance.value.length&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ns extends Tt{sanitize(e){return"integer"===de(this.instance.schema)?Math.floor(Number(e)):Number(e)}}class as extends ns{static resolves(e){const t=de(e),s=B(e),i=te(e,"format");return("number"===t||"integer"===t)&&d(s)&&"radio"===i}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t=this.sanitize(e.value);this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=Number(e.value)===Number(this.instance.getValue())}))}}class rs extends ns{static resolves(e){const t=de(e);return("number"===t||"integer"===t)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class os extends ns{static resolves(e){const t=de(e);return"number"===t||"integer"===t}build(){this.control=this.theme.getInputControl({type:"number",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class ls extends Tt{static resolves(e){return"object"===de(e)}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let t=!0;const s=A(this.instance.schema);d(s)&&!1===s&&(t=!1);let i=!1;d(this.instance.jedi.options.enablePropertiesToggle)&&(i=this.instance.jedi.options.enablePropertiesToggle),d(e.enablePropertiesToggle)&&(i=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enablePropertiesToggle:i,addProperty:t,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",(()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(0===e.length)return;if(d(this.instance.value[e]))return;const t=this.instance.getPropertySchema(e),s=this.instance.createChild(t,e);s.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const i=this.control.ariaLive;i.innerHTML="";const n=ce(s.schema),a=d(n)?n:e,r=this.theme.getAriaLiveMessage();r.textContent=a+" field was added to the form",i.appendChild(r),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}))}sanitize(e){return b(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=te(this.instance.schema,"enablePropertiesToggle");if(o(this.instance.jedi.options.enablePropertiesToggle,!0)||o(e,!0)){const e=this.instance.children.map((e=>e.getKey()));for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);e.forEach((e=>{const t=this.instance.isRequired(e),s=this.instance.isDependentRequired(e),i=!t&&!s,r=this.control.ariaLive,o=this.instance.getPropertySchema(e),l=ce(o),c=n(this.instance.path+this.instance.jedi.pathSeparator+e)+"-activator",h=d(l)?l:e;if(i){const t=this.theme.getCheckboxControl({id:c,label:h,titleHidden:!1}),s=t.input;this.propertyActivators[e]=s,s.addEventListener("change",(()=>{r.innerHTML="";const t=this.theme.getAriaLiveMessage();if(s.checked){this.instance.getChild(e)||this.instance.createChild(o,e),this.instance.getChild(e).activate(),t.textContent=h+" field was added to the form",r.appendChild(t)}else this.instance.getChild(e).deactivate(),t.textContent=h+" field was removed from the form",r.appendChild(t);this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})),this.control.propertiesActivators.appendChild(t.container)}const p=this.propertyActivators[e];p&&(p.disabled=this.disabled,p.checked=a(this.instance.getValue(),e))}))}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach((e=>{e.isActive?(null===e.ui.control.container.parentNode&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)}))}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class cs extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach((t=>{if(t.isActive){const s=te(t.schema,"grid"),i=(null==s?void 0:s.columns)||12,n=(null==s?void 0:s.offset)||0,a=this.theme.getCol(12,i,n);((null==s?void 0:s.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(a),a.appendChild(t.ui.control.container),this.disabled||this.instance.isReadOnly()?t.ui.disable():t.ui.enable()}}))}}class ds extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{if(e.isActive){const s=t===this.activeTabIndex,i=n(e.path),a=ce(e.schema),l=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:d(a)?a:e.getKey(),id:i,active:s});l.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,s,i),o.appendChild(l.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()}}))}}class hs extends Tt{static resolves(e){return"array"===de(e)}build(){this.control=this.theme.getArrayControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.instance.addItem()}))}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return f(e)?e:[]}isSortable(){return window.Sortable&&d(te(this.instance.schema,"sortable"))}refreshUI(){const e=z(this.instance.schema),t=W(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach((e=>{const s=Number(e.getKey()),i=this.theme.getDeleteItemBtn(),n=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),r=this.theme.getBtnGroup(),{container:o,arrayActions:l,body:c}=this.theme.getArrayItem();if(l.appendChild(r),r.appendChild(i),r.appendChild(n),r.appendChild(a),this.isSortable()){const e=this.theme.getDragItemBtn();r.appendChild(e)}this.control.childrenSlot.appendChild(o),c.appendChild(e.ui.control.container),i.addEventListener("click",(()=>{const t=Number(e.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(t)})),n.addEventListener("click",(()=>{const e=s-1;this.instance.move(s,e)})),a.addEventListener("click",(()=>{const e=s+1;this.instance.move(s,e)})),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),d(t)&&this.instance.value.length<=t&&i.setAttribute("disabled","")})),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:e=>{this.instance.move(e.oldIndex,e.newIndex)}})),d(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ps extends hs{static resolves(e){return"array"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{const s=this.theme.getDeleteItemBtn(),i=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn();let l;e.ui.control.arrayActions.innerHTML="",e.ui.control.arrayActions.appendChild(s),e.ui.control.arrayActions.appendChild(i),e.ui.control.arrayActions.appendChild(a),this.control.childrenSlot.appendChild(e.ui.control.container);const c=te(this.instance.schema,"itemTemplate");if(c){l=E(c,{i0:t,i1:t+1,value:e.getValue()})}else{const s=ce(e.schema);l=d(s)?s+" "+(t+1):e.getKey()}s.addEventListener("click",(()=>{this.activeTabIndex=x(t-1,0,this.instance.value.length-1),this.instance.deleteItem(t)})),i.addEventListener("click",(()=>{const e=t-1;this.activeTabIndex=e,this.instance.move(t,e)})),a.addEventListener("click",(()=>{const e=t+1;this.activeTabIndex=e,this.instance.move(t,e)}));const h=t===this.activeTabIndex,p=n(e.path),u=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:l,id:p,active:h});u.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,h,p),o.appendChild(u.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),0===t&&i.setAttribute("disabled",""),this.instance.value.length-1===t&&a.setAttribute("disabled","")}))}}class us extends Tt{static resolves(e){const t=de(e),s=he(e);return d(k(e))||d(s)||"any"===t||f(t)||h(t)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class ms extends Tt{static resolves(e){return"null"===de(e)}build(){this.control=this.theme.getNullControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}sanitize(){return null}}class gs extends _t{static resolves(e){return window.Quill&&"string"===de(e)&&d(te(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,te(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",(()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class fs extends _t{static resolves(e){return window.Jodit&&"string"===de(e)&&d(te(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,te(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",(()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class bs extends _t{static resolves(e){return window.flatpickr&&"string"===de(e)&&d(te(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,te(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class vs extends ns{static resolves(e){return"undefined"!=typeof Raty&&"number"===de(e)&&d(te(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},te(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class Cs extends Tt{static resolves(e){const t=de(e),s=F(e),i=d(s)&&de(s),n=d(t)&&"array"===t,a=!0===ue(e),r=d(s)&&d(B(e.items)),o=d(s)&&d(i),l=["string","number","integer"],c=d(s)&&d(i)&&(l.includes(i)||f(i)&&i.some((e=>l.includes(e))));return n&&a&&r&&o&&c}build(){this.control=this.theme.getCheckboxesControl({values:B(this.instance.schema.items),titles:te(this.instance.schema.items,"enumTitles")||B(this.instance.schema.items),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach((e=>{e.addEventListener("change",(()=>{const t=this.instance.getValue();if(e.checked)t.push(e.value);else{const s=t.indexOf(e.value);s>-1&&t.splice(s,1)}this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach((t=>{t.checked=e.includes(t.value)}))}}class ys{constructor(e){this.customEditors=e.customEditors??[],this.editors=[us,Vt,Qt,Xt,Wt,Yt,es,ts,ss,gs,fs,bs,is,vs,as,rs,os,cs,ds,ls,Cs,ps,hs,ms]}getClass(e){for(const t of this.customEditors)if(t.resolves(e))return t;for(const t of this.editors)if(t.resolves(e))return t;return null}}class Ls extends Ot{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new ys({customEditors:this.options.customEditors}),this.theme=this.options.theme,d(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Ft;break;case"bootstrap-icons":this.theme.icons=Kt;break;case"fontawesome3":this.theme.icons=$t;break;case"fontawesome4":this.theme.icons=zt;break;case"fontawesome5":this.theme.icons=Jt;break;case"fontawesome6":this.theme.icons=Gt}this.schema=this.options.schema,this.validator=new kt({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),d(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",(()=>{this.emit("change")})),this.hiddenInput&&this.on("change",(()=>{this.hiddenInput.value=JSON.stringify(this.getValue())}))}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&b(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach((e=>{this.hiddenInput.setAttribute(e,this.options.hiddenInputAttributes[e])})),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||te(e.schema,"mergeAllOf")){const t=j(e.schema);d(t)&&t.forEach((t=>{e.schema=C({},e.schema,t)}))}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const t=de(e.schema),s=he(e.schema),i=k(e.schema),n=U(e.schema);return d(i)||d(s)||"any"===t||f(t)||h(t)?new Mt(e):d(n)?new Ht(e):"object"===t?new Bt(e):"array"===t?new Nt(e):"string"===t?new qt(e):"number"===t||"integer"===t?new Dt(e):"boolean"===t?new Rt(e):"null"===t?new Ut(e):void 0}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach((t=>{const s=this.instances[t];e=[...e,...s.getErrors()]})),e}showValidationErrors(e=null){if(!this.options.container)return!1;const t=e||this.getErrors();Object.keys(this.instances).forEach((e=>{this.instances[e].ui.showValidationErrors(t,!0)}))}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach((e=>{delete this[e]}))}}class Es{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const t=document.createElement("legend"),s=document.createElement("span");return t.classList.add("jedi-editor-legend"),s.classList.add("jedi-editor-legend-text"),t.setAttribute("aria-labelledby","#legend-"+e.id),s.textContent=e.textContent,s.setAttribute("id","#legend-"+e.id),t.appendChild(s),t}getLabel(e){const t=document.createElement("label");t.setAttribute("for",e.for);const s=this.getIcon(e.labelIconClass),i=document.createElement("span");return i.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(t),t.classList.add("jedi-title"),t.appendChild(s),t.appendChild(i),{label:t,labelText:i,icon:s}}getIcon(e=""){const t=document.createElement("i");let s=e.split(" ");return s=s.filter((e=>e.length>0)),s&&s.forEach((e=>{t.classList.add(e)})),t}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const t=document.createElement("div");return t.classList.add("jedi-messages-slot"),t.setAttribute("aria-atomic","false"),t.setAttribute("aria-live","polite"),e.id&&t.setAttribute("id",e.id),t}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const t=this.getButton(e);return t.classList.add("jedi-properties-toggle"),t.addEventListener("click",(()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()})),t}getCollapse(e){const t=document.createElement("div");return t.classList.add("jedi-collapse"),t.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(t.style.display="none"),t}getCollapseToggle(e){const t=this.getButton(e);t.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&t.addEventListener("click",(()=>{"none"===e.collapse.style.display?e.collapse.style.display="block":e.collapse.style.display="none"}));let s=e.startCollapsed;return t.style.transition="transform 0.1s ease",s&&(t.style.transform="rotate(90deg)"),t.addEventListener("click",(()=>{t.style.transform=s?"rotate(0deg)":"rotate(90deg)",s=!s})),t}getPropertiesSlot(e){const t=document.createElement("dialog");return t.classList.add("jedi-properties-slot"),t.setAttribute("id",e.id),window.addEventListener("click",(e=>{e.target===t&&t.close()})),t}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const t=document.createElement("p");return t.classList.add("jedi-aria-live-message"),t.textContent=e,this.visuallyHidden(t),t}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const t=document.createElement("button");t.classList.add("jedi-btn"),t.setAttribute("type","button"),e.value&&(t.value=e.value),e.id&&t.setAttribute("id",e.id);const s=document.createElement("span");if(s.textContent=e.textContent,this.icons&&e.icon){const i=this.getIcon(this.icons[e.icon]);i.setAttribute("title",e.textContent),t.appendChild(i),this.visuallyHidden(s)}return t.appendChild(s),t}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const t=document.createElement("small");return t.classList.add("jedi-description"),e.textContent&&(t.textContent=e.textContent),e.id&&t.setAttribute("id",e.id),t}getPlaceholderControl(e){const t=document.createElement("div"),s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c});return t.appendChild(a),t.appendChild(s),t.appendChild(l),t.appendChild(d),t.appendChild(i),i.appendChild(n),{container:t,placeholder:s,label:a,labelText:r,description:l,messages:d,actions:i,arrayActions:n}}getObjectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getPropertiesAriaLive(),r=this.getDescription({textContent:e.description}),o=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getPropertiesSlot({id:"properties-slot-"+e.id}),d=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:c}),h="collapse-"+e.id,p=this.getCollapse({id:h,startCollapsed:e.startCollapsed}),u=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:h,collapse:p,startCollapsed:e.startCollapsed}),m=this.getPropertiesActivators(),g=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),f=this.getAddPropertyButton(),b=this.getFieldset(),v=this.getLegend({textContent:e.title,id:e.id});return f.classList.add("jedi-object-add"),t.appendChild(b),t.appendChild(c),b.appendChild(v),b.appendChild(p),p.appendChild(n),n.appendChild(r),n.appendChild(o),v.appendChild(s),s.appendChild(i),n.appendChild(l),e.addProperty&&(c.appendChild(g.container),c.appendChild(f),c.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(s.appendChild(d),c.appendChild(a),c.appendChild(m)),e.enableCollapseToggle&&s.appendChild(u),{container:t,collapse:p,collapseToggle:u,body:n,actions:s,messages:o,childrenSlot:l,propertiesToggle:d,propertiesContainer:c,addPropertyControl:g,addPropertyBtn:f,ariaLive:a,propertiesActivators:m,arrayActions:i}}getArrayControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getDescription({textContent:e.description}),r=this.getMessagesSlot(),o=this.getChildrenSlot(),l=this.getBtnGroup(),c=this.getArrayBtnAdd(),d=this.getFieldset(),h=this.getLegend({textContent:e.title,id:e.id}),p="collapse-"+e.id,u=this.getCollapse({id:p,startCollapsed:e.startCollapsed}),m=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:p,collapse:u,startCollapsed:e.startCollapsed});return t.appendChild(d),d.appendChild(h),d.appendChild(u),u.appendChild(n),n.appendChild(a),n.appendChild(r),h.appendChild(s),s.appendChild(l),l.appendChild(c),s.appendChild(i),n.appendChild(o),e.enableCollapseToggle&&s.appendChild(m),{container:t,collapseToggle:m,collapse:u,body:n,actions:s,messages:r,childrenSlot:o,btnGroup:l,addBtn:c,arrayActions:i}}getArrayItem(){const e=document.createElement("div"),t=this.getCard(),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardHeader(),a=this.getCardBody();return e.appendChild(t),t.appendChild(n),t.appendChild(a),n.appendChild(s),s.appendChild(i),{container:e,card:t,header:n,body:a,actions:s,arrayActions:i}}getMultipleControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),t.appendChild(o),t.appendChild(s),s.appendChild(a),s.appendChild(r),a.appendChild(i),e.switcher&&i.appendChild(d.container),i.appendChild(n),r.appendChild(l),r.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getIfThenElseControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),e.switcher&&t.appendChild(d.container),r.appendChild(o),t.appendChild(l),t.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getNullControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),{label:n,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),r=e.id+"-description",o=this.getDescription({textContent:e.description,id:r}),l=this.getMessagesSlot(),c=document.createElement("br");return t.appendChild(n),t.appendChild(c),t.appendChild(o),t.appendChild(l),t.appendChild(s),s.appendChild(i),{container:t,label:n,labelText:a,description:o,messages:l,actions:s,arrayActions:i}}getTextareaControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("textarea");n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getInputControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("input");n.setAttribute("type",e.type),n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getRadiosControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","radio"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),n.appendChild(d),n.appendChild(l),{container:t,fieldset:n,legend:r,body:a,radios:p,labels:u,labelTexts:m,radioControls:h,description:d,messages:l,actions:s,arrayActions:i}}getCheckboxControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("div"),a=document.createElement("input");a.setAttribute("type","checkbox"),a.setAttribute("id",e.id);const{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",h=this.getMessagesSlot({id:d}),p=d+" "+l;return a.setAttribute("aria-describedby",p),t.appendChild(n),t.appendChild(s),s.appendChild(i),n.appendChild(a),n.appendChild(r),n.appendChild(c),n.appendChild(h),{container:t,formGroup:n,input:a,label:r,labelText:o,description:c,messages:h,actions:s,arrayActions:i}}getCheckboxesControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","checkbox"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),a.appendChild(d),a.appendChild(l),{container:t,fieldset:n,legend:r,body:a,checkboxes:p,labels:u,labelTexts:m,checkboxControls:h,description:d,messages:l,actions:s,arrayActions:i}}getSelectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("select");n.setAttribute("id",e.id),e.values.forEach(((t,s)=>{const i=document.createElement("option");i.setAttribute("value",t),e.titles&&e.titles[s]&&(i.textContent=e.titles[s]),n.appendChild(i)}));const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getSwitcher(e){const t=document.createElement("span"),s=document.createElement("select");s.setAttribute("id",e.id),e.values.forEach(((t,i)=>{const n=document.createElement("option");n.setAttribute("value",t),e.titles&&e.titles[i]&&(n.textContent=e.titles[i]),s.appendChild(n)}));const{label:i,labelText:n}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return t.appendChild(i),t.appendChild(s),{container:t,input:s,label:i,labelText:n}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return s.textContent=e.message,i.textContent="⚠ ",i.classList.add("jedi-error-message"),i.setAttribute("aria-hidden","true"),t.classList.add("jedi-error-message"),t.appendChild(i),t.appendChild(s),t}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,t,s){const i=document.createElement("div");return i.classList.add("jedi-col-xs-"+e),i.classList.add("jedi-col-md-"+t),s&&i.classList.add("jedi-col-md-offset-"+s),i}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const t=document.createElement("li"),s=document.createElement("a");return s.classList.add("jedi-nav-link"),s.setAttribute("href","#"+e.id),s.textContent=e.hasErrors?"⚠ "+e.title:e.title,t.appendChild(s),{list:t,link:s}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,t,s){e.setAttribute("id",s),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}const xs={Schema:me,Utils:w,EditorBoolean:Zt,EditorBooleanEnumRadio:Qt,EditorBooleanEnumSelect:Wt,EditorBooleanCheckbox:Xt,EditorString:_t,EditorStringEnumRadio:Yt,EditorStringEnumSelect:es,EditorStringTextarea:ts,EditorStringAwesomplete:ss,EditorStringInput:is,EditorNumber:ns,EditorNumberEnumRadio:as,EditorNumberEnumSelect:rs,EditorNumberInput:os,EditorObjectGrid:cs,EditorObjectNav:ds,EditorObject:ls,EditorArrayNav:ps,EditorArray:hs,EditorMultiple:us,EditorIfThenElse:Vt,EditorNull:ms,Theme:Es,ThemeBootstrap3:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("in"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h5"),t.classList.add("panel-heading"),t.classList.add("pull-left"),t.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.setAttribute("style","margin-right: 5px;"),t}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("panel-heading"),t.classList.add("text-right"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-xs"),t.classList.add("btn-default"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{body:s,radios:i,labels:n,labelTexts:a,radioControls:r,description:o,messages:l}=t;return r.forEach(((e,t)=>{e.classList.add("radio"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),s.appendChild(o),s.appendChild(l),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{body:s,checkboxes:i,labels:n,labelTexts:a,checkboxControls:r}=t;return r.forEach(((e,t)=>{e.classList.add("checkbox"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,labelText:r,description:o,messages:l}=t;return i.classList.add("checkbox"),s.appendChild(i),i.appendChild(a),a.appendChild(n),a.appendChild(r),i.appendChild(o),i.appendChild(l),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow();return i.classList.add("col-xs-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("col-md-offset-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("nav-stacked"),!1===e.stacked&&t.classList.remove("nav-stacked"),t}getTab(e){const t=super.getTab(e);return e.active&&t.list.classList.add("active"),t.link.setAttribute("data-toggle","tab"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap4:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("float-left"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("mr-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("form-group"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("form-group"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return i.classList.add("form-group"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("form-group"),i.classList.add("form-control"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("form-text"),t.classList.add("d-block"),t}getColumnClass(e,t){return"col-"+e+"-"+t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList();return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap5:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-bs-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("me-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("mb-3"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("mb-3"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return s.classList.add("mb-3"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(a),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("mb-3"),i.classList.add("form-select"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("d-block"),t.classList.add("form-text"),t.classList.add("form-text"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-bs-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}},RefParser:class{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);!1===this.refsResolved();)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every((e=>null!==e))}async collectRefs(e,t="#"){if("object"==typeof e&&null!==e)for(const[s,i]of Object.entries(e)){const n=t?`${t}/${s}`:`/${s}`;if(this.hasRef(e)){const t=e.$ref;if(this.isExternalRef(t)){const e=await this.load(t);this.refs[t]=e,await this.collectRefs(e,n)}else this.refs[t]=this.data[t]??null}this.data[t]=e,await this.collectRefs(i,n)}}hasRef(e){return void 0!==e.$ref&&"string"==typeof e.$ref}isExternalRef(e){return"string"==typeof e&&(e.startsWith("http")||e.startsWith("https"))}isObject(e){return null!==e&&"object"==typeof e}expand(e){const t=JSON.parse(JSON.stringify(e));if(this.isObject(t)&&this.hasRef(t)){const e=t.$ref;return delete t.$ref,this.expand(C({},this.refs[e],t))}return t}async load(e){try{const t=await fetch(e);if(!t.ok)throw new Error("Network response was not ok");return await t.json()}catch(t){throw console.error("Error loading",e,t),t}}},Create:Ls};module.exports=xs; +"use strict";function e(){const e=[];return function(t,s){if("object"!=typeof s||null===s)return s;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(s)?"[Circular]":(e.push(s),s)}}function t(t){if(void 0!==t)return JSON.parse(JSON.stringify(t,e()))}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i(e,t,i){return e.replace(new RegExp(s(t),"g"),i)}function n(e){return i(i(e,"#","root"),"/","-")}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){return Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{})}function o(e,t){return b(e)&&b(t)&&(e=r(e),t=r(t)),JSON.stringify(e)===JSON.stringify(t)}function l(e,t){return!o(e,t)}function c(e){return null===e}function d(e){return void 0!==e}function h(e){return void 0===e}function p(e){return"number"==typeof e}function u(e){return p(e)&&e===Math.floor(e)}function m(e){return"string"==typeof e}function g(e){return"boolean"==typeof e}function f(e){return Array.isArray(e)}function b(e){return!c(e)&&!f(e)&&"object"==typeof e}function v(e){let t="any";return p(e)?t=u(e)?"integer":"number":m(e)?t="string":g(e)?t="boolean":f(e)?t="array":c(e)?t="null":b(e)&&(t="object"),t}function C(e,...t){if(!t.length)return e;const s=t.shift();return b(e)&&b(s)&&Object.keys(s).forEach((t=>{b(s[t])?(e[t]||Object.assign(e,{[t]:{}}),C(e[t],s[t])):Object.assign(e,{[t]:s[t]})})),C(e,...t)}const y=(e,t)=>(Object.keys(t).forEach((s=>{s in e&&typeof e[s]==typeof t[s]&&(b(e[s])&&b(t[s])?y(e[s],t[s]):e[s]=t[s])})),e);function L(e,t){const s=t.split(".");let i=e;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const e=parseInt(n);if(!(e>=0&&e{const s=(e=e.replace(/\s/g,"")).split(/{{|}}/)[1];return L(t,s)}))}function x(e,t,s){return Math.max(t,Math.min(e,s))}function I(e){const t=[],s=new Set;for(const i of e){const e=JSON.stringify(i);s.has(e)||(s.add(e),t.push(i))}return t}const w={getCircularReplacer:e,clone:t,escapeRegExp:s,replaceAll:i,pathToAttribute:n,hasOwn:a,sortObject:r,equal:o,different:l,isNull:c,isSet:d,notSet:h,isNumber:p,isInteger:u,isString:m,isBoolean:g,isArray:f,isObject:b,getType:v,mergeDeep:C,overwriteExistingProperties:y,getValueByJSONPath:L,compileTemplate:E,clamp:x,removeDuplicatesFromArray:I};function A(e){return b(e.additionalProperties)||g(e.additionalProperties)?e.additionalProperties:void 0}function S(e){return b(e.propertyNames)||g(e.propertyNames)?e.propertyNames:void 0}function j(e){return f(e.allOf)?e.allOf:void 0}function k(e){return f(e.anyOf)?e.anyOf:void 0}function O(e){return e.const}function P(e){return b(e.contains)||g(e.contains)?e.contains:void 0}function T(e){return e.default}function V(e){return b(e.dependentRequired)?e.dependentRequired:void 0}function H(e){return b(e.dependentSchemas)?e.dependentSchemas:void 0}function M(e){return m(e.description)?e.description:void 0}function R(e){return b(e.else)||g(e.else)?e.else:void 0}function B(e){if(f(e.enum)&&e.enum.length>0)return e.enum}function N(e){return p(e.exclusiveMaximum)?e.exclusiveMaximum:void 0}function q(e){return p(e.exclusiveMinimum)?e.exclusiveMinimum:void 0}function D(e){return m(e.format)?e.format:void 0}function U(e){return b(e.if)||g(e.if)?e.if:void 0}function F(e){return b(e.items)||g(e.items)?e.items:void 0}function K(e){return p(e.maximum)?e.maximum:void 0}function $(e){if(u(e.maxContains)&&e.maxContains>=0)return e.maxContains}function z(e){if(u(e.maxItems)&&e.maxItems>=0)return e.maxItems}function J(e){if(u(e.maxLength)&&e.maxLength>=0)return e.maxLength}function G(e){if(u(e.maxProperties))return e.maxProperties}function Z(e){return p(e.minimum)?e.minimum:void 0}function W(e){if(u(e.minContains)&&e.minContains>=0)return e.minContains}function Q(e){if(u(e.minItems)&&e.minItems>=0)return e.minItems}function X(e){if(u(e.minLength)&&e.minLength>=0)return e.minLength}function _(e){if(u(e.minProperties)&&e.minProperties>=0)return e.minProperties}function Y(e){if(p(e.multipleOf)&&e.multipleOf>=0)return e.multipleOf}function ee(e){return b(e.not)||g(e.not)?e.not:void 0}function te(e,t){return e["x-options"]&&d(e["x-options"][t])?e["x-options"][t]:void 0}function se(e){return m(e.pattern)?e.pattern:void 0}function ie(e){return b(e.patternProperties)?e.patternProperties:void 0}function ne(e){return f(e.prefixItems)?e.prefixItems:void 0}function ae(e){return b(e.properties)?e.properties:void 0}function re(e){return g(e.readOnly)?e.readOnly:void 0}function oe(e){return f(e.required)?[...new Set(e.required)]:void 0}function le(e){return b(e.then)||g(e.then)?e.then:void 0}function ce(e){return m(e.title)?e.title:void 0}function de(e){if(m(e.type)||f(e.type))return e.type}function he(e){return f(e.oneOf)?e.oneOf:void 0}function pe(e){return g(e.unevaluatedProperties)?e.unevaluatedProperties:void 0}function ue(e){return g(e.uniqueItems)?e.uniqueItems:void 0}const me={getSchemaX:function(e,t){return e["x-"+t]},getSchemaSchema:function(e){return m(e.$schema)?e.$schema:void 0},getSchemaAdditionalProperties:A,getSchemaPropertyNames:S,getSchemaAllOf:j,getSchemaAnyOf:k,getSchemaConst:O,getSchemaContains:P,getSchemaDefault:T,getSchemaDependentRequired:V,getSchemaDependentSchemas:H,getSchemaDescription:M,getSchemaElse:R,getSchemaEnum:B,getSchemaExclusiveMaximum:N,getSchemaExclusiveMinimum:q,getSchemaFormat:D,getSchemaIf:U,getSchemaItems:F,getSchemaMaximum:K,getSchemaMaxContains:$,getSchemaMaxItems:z,getSchemaMaxLength:J,getSchemaMaxProperties:G,getSchemaMinimum:Z,getSchemaMinContains:W,getSchemaMinItems:Q,getSchemaMinLength:X,getSchemaMinProperties:_,getSchemaMultipleOf:Y,getSchemaNot:ee,getSchemaXOption:te,getSchemaPattern:se,getSchemaPatternProperties:ie,getSchemaPrefixItems:ne,getSchemaProperties:ae,getSchemaReadOnly:re,getSchemaRequired:oe,getSchemaThen:le,getSchemaTitle:ce,getSchemaType:de,getSchemaOneOf:he,getSchemaUnevaluatedProperties:pe,getSchemaUniqueItems:ue};function ge(e,t,s,i,n){let a=[];const r=j(s);return d(r)&&(r.forEach((s=>{const r=new Ls({refParser:e.refParser,schema:s,data:t,rootName:i}),o=r.getErrors();r.destroy(),o.forEach((e=>{e.path=n})),a.push(...o)})),a=I(a)),a}const fe='Has additional property "{{ property }}" but no additional properties are allowed.',be="Must validate against at least one of the provided schemas.",ve="Must have value of: {{ const }}.",Ce="Must contain at least one item matching the provided schema.",ye="Must have the required properties: {{ dependentRequired }}.",Le="Must be one of the enumerated values: {{ enum }}.",Ee="Must be less than {{ exclusiveMaximum }}.",xe="Must be greater than {{ exclusiveMinimum }}.",Ie="Must be a valid {{ format }}.",we="Must have items that validate against the provided schema.",Ae="Must be at most {{ maximum }}.",Se="Must have at most {{ maxItems }} items.",je="Must be at most {{ maxLength }} characters long.",ke="Must have at most {{ maxProperties }} properties.",Oe="Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",Pe="Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",Te="Must be at least {{ minimum }}.",Ve="Must have at least {{ minItems }} items.",He="Must be at least {{ minLength }} characters long.",Me="Must have at least {{ minProperties }} properties.",Re="Must be multiple of {{ multipleOf }}.",Be="Must not validate against the provided schema.",Ne="Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",qe='Must match the pattern: "{{ pattern }}".',De="Item {{ index }} fails validation.",Ue='Property name "{{ propertyName }}" fails validation.',Fe="The following properties do not comply with their schemas: {{ properties }}",Ke="Must have the required properties: {{ required }}.",$e="Must be of type {{ type }}.",ze='Has invalid unevaluated property "{{ property }}"',Je="Must have unique items.";function Ge(e,t,s,i,n){const a=[],r=X(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&(s=!0)})),s||a.push({messages:[be],path:n,constrain:"anyOf"})}return a}function We(e,t,s,i,n){const a=[],r=B(s);if(d(r)){!r.some((e=>JSON.stringify(t)===JSON.stringify(e)))&&a.push({messages:[E(Le,{enum:JSON.stringify(r)})],path:n,constrain:"enum"})}return a}function Qe(e,t,s,i,n){const a=[],r=N(s);if(p(t)&&d(r)){t>=r&&a.push({messages:[E(Ee,{exclusiveMaximum:r})],path:n,constrain:"exclusiveMaximum"})}return a}function Xe(e,t,s,i,n){const a=[],r=q(s);if(p(t)&&d(r)){t<=r&&a.push({messages:[E(xe,{exclusiveMinimum:r})],path:n,constrain:"exclusiveMinimum"})}return a}function _e(e,t,s,i,n){const a=[],r=D(s);let o=e.validateFormat;if(te(s,"validateFormat")&&(o=s.options.validateFormat),d(r)&&m(t)&&o){let e;"email"===r&&(e=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),"url"===r&&(e=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),"uuid"===r&&(e=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i));d(e)&&!e.test(t)&&a.push({messages:[E(Ie,{format:r})],path:n,constrain:"format"})}return a}function Ye(e,t,s,i,n){const a=[],r=F(s),o=ne(s);if(f(t)&&d(r)){const e=d(o)?o.length:0;!1===r&&t.length>0&&t.length>e&&a.push({messages:[we],path:n,constrain:"items"})}return a}function et(e,t,s,i,n){const a=[],r=z(s);if(f(t)&&d(r)){t.length>r&&a.push({messages:[E(Se,{maxItems:r})],path:n,constrain:"maxItems"})}return a}function tt(e,t,s,i,n){const a=[],r=J(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length>r&&a.push({messages:[E(je,{maxLength:r})],path:n,constrain:"maxLength"})}return a}function st(e,t,s,i,n){const a=[],r=G(s);if(b(t)&&d(r)){Object.keys(t).length>r&&a.push({messages:[E(ke,{maxProperties:r})],path:n,constrain:"maxProperties"})}return a}function it(e,t,s,i,n){const a=[],r=Z(s);if(p(t)&&d(r)){t{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&s++})),1!==s&&a.push({messages:[E(Ne,{counter:s})],path:n,constrain:"oneOf"})}return a}function ct(e,t,s,i,n){const a=[],r=se(s);if(m(t)&&d(r)){!new RegExp(r).test(t)&&a.push({messages:[E(qe,{pattern:r})],path:n,constrain:"pattern"})}return a}function dt(e,t,s,i){let n=[];const a=ie(s);return b(t)&&d(a)&&Object.keys(t).forEach((s=>{Object.keys(a).forEach((r=>{if(new RegExp(r).test(s)){const o=a[r],l=new Ls({refParser:e.refParser,schema:o,data:t[s]}),c=l.getErrors().map((e=>({messages:e.messages,path:i+"/"+s,constrain:"patternProperties"})));n=[...n,...c],l.destroy()}}))})),n}function ht(e,t,s,i){const n=ae(s),r=[];return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(a(t,s)){const i=n[s],a=new Ls({refParser:e.refParser,schema:i,data:t[s]});a.getErrors().length>0&&r.push(s),a.destroy()}})),r.length>0?[{messages:[E(Fe,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function pt(e,t,s,i,n){const a=[],r=oe(s);if(b(t)&&d(r)){const e=[],s=Object.keys(t);r.forEach((t=>{s.includes(t)||e.push(t)}));e.length>0&&a.push({messages:[E(Ke,{required:e.join(", ")})],path:n,constrain:"required"})}return a}function ut(e,t,s,i,n){const a=[],r=de(s);if("any"===r)return a;if(d(r)){const e={string:e=>m(e),number:e=>p(e),integer:e=>u(e),boolean:e=>g(e),array:e=>f(e),object:e=>b(e),null:e=>c(e)};let s=!0;s=f(r)?r.some((s=>e[s](t))):e[r](t),s||a.push({messages:[E($e,{type:r,valueType:v(t)})],path:n,constrain:"type"})}return a}function mt(e,t,s,i,n){const a=[],r=K(s);if(p(t)&&d(r)){t>r&&a.push({messages:[E(Ae,{maximum:r})],path:n,constrain:"maximum"})}return a}function gt(e,t,s,i,n){const a=[],o=ue(s);if(f(t)&&d(o)&&!0===o){const e=[];let s=!1;for(let i=0;ie===a)),s)break;e.push(a)}s&&a.push({messages:[Je],path:n,constrain:"uniqueItems"})}return a}function ft(e,t,s,i,n){const r=[],o=A(s),l=ie(s),c=ae(s);if(b(t)&&d(o)){const s=c||{},i=o,d=l||{};Object.keys(t).forEach((o=>{const l=Object.keys(d).some((e=>new RegExp(e).test(o))),c=a(s,o);if(!l&&!c)if(!1===i)r.push({messages:[E(fe,{property:o})],path:n,constrain:"additionalProperties"});else if(b(i)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),a=s.getErrors().map((e=>({messages:e.messages,path:`${n}.${o}`,constrain:"additionalProperties"})));r.push(...a),s.destroy()}}))}return r}const bt={additionalProperties:ft,allOf:ge,anyOf:Ze,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,required:pt,type:ut,uniqueItems:gt};function vt(e,t,s,i,n){const a=[],r=O(s);if(d(r)){l(t,r)&&a.push({messages:[E(ve,{const:JSON.stringify(r)})],path:n,constrain:"const"})}return a}function Ct(e,t,s,i,n){const a=[],r=P(s),o=W(s),l=$(s);if(f(t)&&d(r)){let s=0;t.forEach((t=>{const i=new Ls({refParser:e.refParser,schema:r,data:t});0===i.getErrors().length&&s++,i.destroy()}));const i=0===s;if(d(o)){sl&&a.push({messages:[E(Oe,{counter:s,maxContains:l})],path:n,constrain:"maxContains"})}}return a}function yt(e,t,s,i,n){const r=[],o=V(s);if(b(t)&&d(o)){let e=[];Object.keys(o).forEach((s=>{if(d(t[s])){const i=o[s];e=i.filter((e=>!a(t,e)))}}));e.length>0&&r.push({messages:[E(ye,{dependentRequired:e.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function Lt(e,t,s){let i=[];const n=H(s);return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(d(t[s])){const a=n[s],r=new Ls({refParser:e.refParser,schema:a,data:t}),o=r.getErrors();r.destroy(),i=[...i,...o]}})),i}function Et(e,t,s){const i=[],n=U(s),a=le(s),r=R(s);if(d(n)){if(h(a)&&h(r))return i;const s=new Ls({refParser:e.refParser,schema:n,data:t}),o=s.getErrors();s.destroy();let l=[],c=[];if(d(a)){const s=new Ls({refParser:e.refParser,schema:a,data:t});l=s.getErrors(),s.destroy()}if(d(r)){const s=new Ls({refParser:e.refParser,schema:r,data:t});c=s.getErrors(),s.destroy()}if(!0===n)return l;if(!1===n)return c;if(0===o.length)return l;if(o.length>0)return c}return i}function xt(e,t,s,i,n){const a=[],r=ne(s);return f(t)&&d(r)&&r.forEach(((s,i)=>{const r=t[i];if(d(r)){const t=new Ls({refParser:e.refParser,schema:s,data:r}),o=t.getErrors();t.destroy(),o.length>0&&a.push({messages:[E(De,{index:i})],path:n,constrain:"prefixItems"})}})),a}const It={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt},wt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt};function At(e,t,s,i,n){let r=[];const o=pe(s),l=ie(s),c=ae(s),h=j(s),p=k(s),u=he(s);if(b(t)&&d(o)){let s=d(c)?c:{};const i=o,m=l;[h,p,u].forEach((e=>{d(e)&&e.forEach((e=>{d(e.properties)&&(s={...s,...e.properties})}))})),s&&Object.keys(t).forEach((o=>{let l=!1;if(d(m)&&Object.keys(m).forEach((e=>{const t=new RegExp(e);l=t.test(o)})),l||!1!==i||a(s,o)||r.push({messages:[E(ze,{property:o})],path:n,constrain:"unevaluatedProperties"}),!l&&b(i)&&!a(s,o)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),n=s.getErrors().map((e=>({messages:e.messages,path:o,constrain:"unevaluatedProperties"})));r=[...r,...n],s.destroy()}}))}return r}const St={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,propertie:ht,prefixItems:xt,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};const jt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,prefixItems:xt,propertyNames:function(e,t,s,i,n){const a=[],r=S(s);return b(t)&&d(r)&&Object.keys(t).forEach((t=>{new Ls({refParser:e.refParser,schema:r,data:t}).getErrors().length>0&&a.push({messages:[E(Ue,{propertyName:t})],path:n,constrain:"propertyNames"})})),a},properties:ht,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};class kt{constructor(e={}){this.refParser=e.refParser,this.validateFormat=!!e.validateFormat&&e.validateFormat,this.draft=jt,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":bt,"http://json-schema.org/draft-06/schema#":It,"http://json-schema.org/draft-07/schema#":wt,"https://json-schema.org/draft/2019-09/schema":St,"https://json-schema.org/draft/2020-12/schema":jt}}getErrors(e,s,i,n){let r=[];const o=te(s,"messages"),l=t(s);return g(l)&&!0===l?r:g(l)&&!1===l?[{messages:d(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach((t=>{if(a(l,t)){const a=(0,this.draft[t])(this,e,s,i,n);a&&(r=[...r,...a])}})),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Ot{constructor(){this.listeners=[]}on(e,t){this.listeners.push({name:e,callback:t})}off(e){this.listeners=this.listeners.filter((t=>t.name!==e))}emit(e,t=void 0){this.listeners.filter((t=>t.name===e)).forEach((e=>{e.callback(t)}))}destroy(){Object.keys(this).forEach((e=>{delete this[e]}))}}class Pt extends Ot{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=d(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",(()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())}))}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=t=>{this.jedi.register(t),t.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(h(this.value)){let e;const t=de(this.schema);"boolean"===t&&(e=!1),"number"===t&&(e=0),"integer"===t&&(e=0),"string"===t&&(e=""),"array"===t&&(e=[]),"object"===t&&(e={}),"null"===t&&(e=null),this.value=e}}setDefaultValue(){const e=T(this.schema);d(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,t=!0){const s=this.jedi.options.enforceConst||te(this.schema,"enforceConst");if(d(s)&&o(s,!0)){const t=O(this.schema);d(t)&&(e=t)}this.value=e,this.emit("set-value",e),t&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];return I(this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path))}prepare(){}activate(){!1===this.isActive&&(this.isActive=!0,this.emit("change"))}deactivate(){!0===this.isActive&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return!0===re(this.schema)&&(e=!0),this.parent&&!0===re(this.parent.schema)&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach((e=>{e.destroy()})),this.ui&&this.ui.destroy(),Object.keys(this).forEach((e=>{delete this[e]})),super.destroy()}}class Tt{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI();("always"===this.instance.jedi.options.showErrors||"always"===te(this.instance.schema,"showErrors"))&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})),this.instance.on("change",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}))}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",de(this.instance.schema))}build(){}enforceEnumDefault(){const e=te(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,t=B(this.instance.schema);d(t)&&!t.includes(this.instance.getValue())&&d(t[0])&&e&&this.instance.setValue(t[0],!1)}addEventListeners(){}showValidationErrors(e,t=!1){e=e.filter((e=>e.path===this.instance.path)),this.control.messages.innerHTML="",this.showingValidationErrors=!1;if(("never"===this.instance.jedi.options.showErrors||"never"===te(this.instance.schema,"showErrors"))&&!t||0===e.length)return;const s=ce(this.instance.schema)||this.instance.getKey();e.forEach((e=>{"properties"!==e.constraint&&e.messages.forEach((e=>{const t=this.getInvalidFeedback({message:s+": "+e});this.control.messages.appendChild(t)}))})),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach((e=>{this.disabled||this.readOnly?e.setAttribute("disabled",""):e.removeAttribute("disabled","")}))}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach((e=>{delete this[e]}))}}class Vt extends Tt{static resolves(e){return d(U(e))}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Ht extends Pt{setUI(){this.ui=new Vt(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.instanceWithoutIf=null,this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach((s=>{if(d(s.then)){this.schemas.push(C({},t(this.schema),s.then)),this.switcherOptionValues.push(e);const i="then";this.switcherOptionsLabels.push(i),e++}if(d(s.else)){this.schemas.push(C({},t(this.schema),s.else)),this.switcherOptionValues.push(e);const i="else";this.switcherOptionsLabels.push(i),e++}}));const s=t(this.schema);delete s.if,delete s.then,delete s.else,this.instanceWithoutIf=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent}),this.schemas.forEach((e=>{const t=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent});this.instanceStartingValues.push(t.getValue()),t.on("change",(()=>{const e=this.activeInstance.getValue();this.getFittestIndex(e)!==this.index?this.setValue(e):(this.value=this.activeInstance.getValue(),this.emit("change"))})),this.instances.push(t)})),this.on("set-value",(e=>{let t=this.instanceWithoutIf.getValue();b(t)&&b(e)&&(t=y(t,e)),this.instances.forEach(((s,i)=>{const n=this.instanceStartingValues[i];b(n)&&b(e)&&(e=y(n,t)),s.setValue(e,!1)}));const s=this.getFittestIndex(e);s!==this.index&&this.switchInstance(s)})),this.value=this.instanceWithoutIf.getValue();const i=this.getFittestIndex(this.value);this.switchInstance(i)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const t=U(e);if(d(t)){const s=le(e),i=R(e);this.ifThenElseShemas.push({if:t,then:d(s)?s:{}}),this.ifThenElseShemas.push({if:t,else:d(i)?i:{}})}}getFittestIndex(e){let t=this.index;return this.ifThenElseShemas.forEach(((s,i)=>{const n=new Ls({schema:s.if,data:e,refParser:this.jedi.refParser}),a=n.getErrors();n.destroy(),0===a.length&&s.then&&(t=i),a.length>0&&s.else&&(t=i)})),t}destroy(){this.instances.forEach((e=>{e.destroy()})),super.destroy()}getAllOfCombinations(e){const t=[],s=(e,i)=>{if(0===i.length)return void t.push(e);const n=i[0];var a,r;s((a=e,r=n,{...a,...r}),i.slice(1)),s(e,i.slice(1))};for(let i=0;iObject.keys(e).length-Object.keys(t).length)),t}}class Mt extends Pt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",(()=>{this.onSetValue()}));const e=de(this.schema);if(d(k(this.schema))||d(he(this.schema))){const e=d(k(this.schema))?k(this.schema):he(this.schema),s=t(this.schema);delete s.anyOf,delete s.oneOf,delete s.options,e.forEach(((e,t)=>{e={...s,...e},this.jedi.refParser&&(e=this.jedi.refParser.expand(e));let i="Option-"+(t+1);const n=te(e,"switcherTitle"),a=ce(e);d(a)&&(i=a),d(n)&&(i=n),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(i),this.schemas.push(e)}))}else if(f(e))e.forEach(((e,t)=>{const s=C(this.schema),i={...s,type:e,title:e[0].toUpperCase()+e.slice(1)};d(s.title)&&(i.title=s.title),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(e.charAt(0).toUpperCase()+e.slice(1)),this.schemas.push(i)}));else if("any"===e||!e){const e=t(this.schema);this.schemas=[{...e,type:"object"},{...e,type:"array"},{...e,type:"string"},{...e,type:"number"},{...e,type:"integer"},{...e,type:"boolean"},{...e,type:"null"}],this.schemas.forEach(((e,t)=>{this.switcherOptionValues.push(t)})),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach((e=>{const s=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent,value:t(this.value)});d(this.value)&&s.setValue(this.value,!1),s.unregister(),s.off("change"),s.on("change",(()=>{this.value=this.activeInstance.getValue(),this.emit("change")})),this.instances.push(s),this.register()}));const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,t){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],d(t)&&this.activeInstance.setValue(t,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(l(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let t,s,i=0;for(const n of this.instances){const a=this.jedi.validator.getErrors(e,n.schema,n.getKey(),n.path);(h(t)||h(s))&&(t=i,s=a),a.length{e.destroy()})),super.destroy()}}class Rt extends Pt{}class Bt extends Pt{prepare(){this.properties={};const e=ae(this.schema);d(e)&&Object.keys(e).forEach((t=>{const s=e[t];this.properties[t]={schema:s};let i=!0;const n=this.jedi.options.deactivateNonRequired,a=te(this.schema,"deactivateNonRequired"),r=te(s,"deactivateNonRequired");this.isNotRequired(t)&&d(n)&&!0===n&&(i=!1),this.isNotRequired(t)&&d(a)&&!0===a&&(i=!1),this.isNotRequired(t)&&d(r)&&!0===r&&(i=!1),i&&this.createChild(s,t)})),this.refreshInstances(),this.on("set-value",(()=>{this.refreshInstances()}))}isRequired(e){const t=oe(this.schema);return d(t)&&t.includes(e)}isDependentRequired(e){const t=V(this.schema);if(d(t)){let s=[];return Object.keys(t).forEach((e=>{if(d(this.value[e])){const i=t[e];s=i.filter((e=>!a(this.value,e)))}})),s.includes(e)}return!1}createChild(e,s,i,n=!1){const a=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:t(i)});this.children.push(a),this.value[s]=a.getValue();const r=this.jedi.options.deactivateNonRequired||te(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&d(r)&&!0===r&&!n&&a.deactivate(),a}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let t=this.children.length-1;t>=0;t--){const s=this.children[t];s.getKey()===e&&(s.destroy(),this.children.splice(t,1),this.onChildChange())}}getChild(e){return this.children.find((t=>e===t.getKey().split(this.jedi.pathSeparator).pop()))}getPropertySchema(e){let t;const s=A(this.schema),i=ae(this.schema),n=ie(this.schema);return d(i)&&a(i,e)?t=i[e]:d(n)&&Object.keys(n).forEach((s=>{new RegExp(s).test(e)&&(t=n[s])})),h(t)&&d(s)&&(t=s),h(t)&&(t={}),t}onChildChange(){const e={};this.children.forEach((t=>{t.isActive&&(e[t.getKey()]=t.getValue())})),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort(((e,t)=>{const s=te(e.schema,"propertyOrder"),i=te(t.schema,"propertyOrder"),n=p(s),a=p(i);return!n&&a?1:n&&!a||si?1:0}))}refreshInstances(){const e=this.getValue();if(b(e)){Object.keys(e).forEach((t=>{const s=this.getChild(t);if(s){s.activate();const t=s.getValue(),i=e[s.getKey()];l(t,i)&&s.setValue(i,!1)}else{const s=this.getPropertySchema(t);this.createChild(s,t,e[t],!0)}}));for(let t=this.children.length-1;t>=0;t--){const s=this.children[t],i=s.getKey();h(e[i])&&(this.getChild(i)?s.deactivate():this.deleteChild(i))}this.sortChildrenByPropertyOrder()}}}class Nt extends Pt{prepare(){this.refreshChildren(),this.on("set-value",(()=>{this.refreshChildren()}))}createItemInstance(e){let s;const i=this.children.length,n=F(this.schema),a=ne(this.schema);s=d(n)?n:{};d(a)&&d(a[i])&&(s=a[i]);const r=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:t(e)});return d(e)&&r.setValue(e,!1),r}move(e,s){const i=t(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=t(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const s=t(this.getValue()).filter(((t,s)=>s!==e));this.setValue(s)}onChildChange(){const e=[];this.children.forEach((t=>{e.push(t.getValue())})),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();f(e)&&e.forEach((e=>{const t=this.createItemInstance(e);this.children.push(t)}))}}class qt extends Pt{}class Dt extends Pt{}class Ut extends Pt{}const Ft={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Kt={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},$t={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},zt={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},Jt={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},Gt={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Zt extends Tt{sanitize(e){return Boolean(e)}}class Wt extends Zt{static resolves(e){return"boolean"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t="true"===e.value;this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{const t="true"===e.value;e.checked=t===this.instance.getValue()}))}}class Qt extends Zt{static resolves(e){return"boolean"===de(e)}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e="true"===this.control.input.value;this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=!0===this.instance.getValue()?"true":"false"}}class Xt extends Zt{static resolves(e){return"boolean"===de(e)&&"checkbox"===te(e,"format")}build(){this.control=this.theme.getCheckboxControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.checked)}))}sanitize(e){return Boolean(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class _t extends Tt{sanitize(e){return String(e)}}class Yt extends _t{static resolves(e){return"string"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{this.instance.setValue(e.value)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=e.value===this.instance.getValue()}))}}class es extends _t{static resolves(e){return"string"===de(e)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ts extends _t{static resolves(e){return"string"===de(e)&&"textarea"===te(e,"format")}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ss extends _t{static resolves(e){return window.Awesomplete&&"string"===de(e)&&d(te(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,te(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class is extends _t{static resolves(e){return"string"===de(e)}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=te(this.instance.schema,"format");this.control=this.theme.getInputControl({type:is.getTypes().includes(e)?e:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===e,description:M(this.instance.schema)}),"color"===e&&0===this.instance.value.length&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ns extends Tt{sanitize(e){return"integer"===de(this.instance.schema)?Math.floor(Number(e)):Number(e)}}class as extends ns{static resolves(e){const t=de(e),s=B(e),i=te(e,"format");return("number"===t||"integer"===t)&&d(s)&&"radio"===i}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t=this.sanitize(e.value);this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=Number(e.value)===Number(this.instance.getValue())}))}}class rs extends ns{static resolves(e){const t=de(e);return("number"===t||"integer"===t)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class os extends ns{static resolves(e){const t=de(e);return"number"===t||"integer"===t}build(){this.control=this.theme.getInputControl({type:"number",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class ls extends Tt{static resolves(e){return"object"===de(e)}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let t=!0;const s=A(this.instance.schema);d(s)&&!1===s&&(t=!1);let i=!1;d(this.instance.jedi.options.enablePropertiesToggle)&&(i=this.instance.jedi.options.enablePropertiesToggle),d(e.enablePropertiesToggle)&&(i=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enablePropertiesToggle:i,addProperty:t,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",(()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(0===e.length)return;if(d(this.instance.value[e]))return;const t=this.instance.getPropertySchema(e),s=this.instance.createChild(t,e);s.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const i=this.control.ariaLive;i.innerHTML="";const n=ce(s.schema),a=d(n)?n:e,r=this.theme.getAriaLiveMessage();r.textContent=a+" field was added to the form",i.appendChild(r),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}))}sanitize(e){return b(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=te(this.instance.schema,"enablePropertiesToggle");if(o(this.instance.jedi.options.enablePropertiesToggle,!0)||o(e,!0)){const e=this.instance.children.map((e=>e.getKey()));for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);e.forEach((e=>{const t=this.instance.isRequired(e),s=this.instance.isDependentRequired(e),i=!t&&!s,r=this.control.ariaLive,o=this.instance.getPropertySchema(e),l=ce(o),c=n(this.instance.path+this.instance.jedi.pathSeparator+e)+"-activator",h=d(l)?l:e;if(i){const t=this.theme.getCheckboxControl({id:c,label:h,titleHidden:!1}),s=t.input;this.propertyActivators[e]=s,s.addEventListener("change",(()=>{r.innerHTML="";const t=this.theme.getAriaLiveMessage();if(s.checked){this.instance.getChild(e)||this.instance.createChild(o,e),this.instance.getChild(e).activate(),t.textContent=h+" field was added to the form",r.appendChild(t)}else this.instance.getChild(e).deactivate(),t.textContent=h+" field was removed from the form",r.appendChild(t);this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})),this.control.propertiesActivators.appendChild(t.container)}const p=this.propertyActivators[e];p&&(p.disabled=this.disabled,p.checked=a(this.instance.getValue(),e))}))}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach((e=>{e.isActive?(null===e.ui.control.container.parentNode&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)}))}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class cs extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach((t=>{if(t.isActive){const s=te(t.schema,"grid"),i=(null==s?void 0:s.columns)||12,n=(null==s?void 0:s.offset)||0,a=this.theme.getCol(12,i,n);((null==s?void 0:s.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(a),a.appendChild(t.ui.control.container),this.disabled||this.instance.isReadOnly()?t.ui.disable():t.ui.enable()}}))}}class ds extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{if(e.isActive){const s=t===this.activeTabIndex,i=n(e.path),a=ce(e.schema),l=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:d(a)?a:e.getKey(),id:i,active:s});l.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,s,i),o.appendChild(l.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()}}))}}class hs extends Tt{static resolves(e){return"array"===de(e)}build(){this.control=this.theme.getArrayControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.instance.addItem()}))}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return f(e)?e:[]}isSortable(){return window.Sortable&&d(te(this.instance.schema,"sortable"))}refreshUI(){const e=z(this.instance.schema),t=Q(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach((e=>{const s=Number(e.getKey()),i=this.theme.getDeleteItemBtn(),n=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),r=this.theme.getBtnGroup(),{container:o,arrayActions:l,body:c}=this.theme.getArrayItem();if(l.appendChild(r),r.appendChild(i),r.appendChild(n),r.appendChild(a),this.isSortable()){const e=this.theme.getDragItemBtn();r.appendChild(e)}this.control.childrenSlot.appendChild(o),c.appendChild(e.ui.control.container),i.addEventListener("click",(()=>{const t=Number(e.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(t)})),n.addEventListener("click",(()=>{const e=s-1;this.instance.move(s,e)})),a.addEventListener("click",(()=>{const e=s+1;this.instance.move(s,e)})),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),d(t)&&this.instance.value.length<=t&&i.setAttribute("disabled","")})),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:e=>{this.instance.move(e.oldIndex,e.newIndex)}})),d(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ps extends hs{static resolves(e){return"array"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{const s=this.theme.getDeleteItemBtn(),i=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn();let l;e.ui.control.arrayActions.innerHTML="",e.ui.control.arrayActions.appendChild(s),e.ui.control.arrayActions.appendChild(i),e.ui.control.arrayActions.appendChild(a),this.control.childrenSlot.appendChild(e.ui.control.container);const c=te(this.instance.schema,"itemTemplate");if(c){l=E(c,{i0:t,i1:t+1,value:e.getValue()})}else{const s=ce(e.schema);l=d(s)?s+" "+(t+1):e.getKey()}s.addEventListener("click",(()=>{this.activeTabIndex=x(t-1,0,this.instance.value.length-1),this.instance.deleteItem(t)})),i.addEventListener("click",(()=>{const e=t-1;this.activeTabIndex=e,this.instance.move(t,e)})),a.addEventListener("click",(()=>{const e=t+1;this.activeTabIndex=e,this.instance.move(t,e)}));const h=t===this.activeTabIndex,p=n(e.path),u=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:l,id:p,active:h});u.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,h,p),o.appendChild(u.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),0===t&&i.setAttribute("disabled",""),this.instance.value.length-1===t&&a.setAttribute("disabled","")}))}}class us extends Tt{static resolves(e){const t=de(e),s=he(e);return d(k(e))||d(s)||"any"===t||f(t)||h(t)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class ms extends Tt{static resolves(e){return"null"===de(e)}build(){this.control=this.theme.getNullControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}sanitize(){return null}}class gs extends _t{static resolves(e){return window.Quill&&"string"===de(e)&&d(te(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,te(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",(()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class fs extends _t{static resolves(e){return window.Jodit&&"string"===de(e)&&d(te(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,te(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",(()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class bs extends _t{static resolves(e){return window.flatpickr&&"string"===de(e)&&d(te(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,te(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class vs extends ns{static resolves(e){return"undefined"!=typeof Raty&&"number"===de(e)&&d(te(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},te(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class Cs extends Tt{static resolves(e){const t=de(e),s=F(e),i=d(s)&&de(s),n=d(t)&&"array"===t,a=!0===ue(e),r=d(s)&&d(B(e.items)),o=d(s)&&d(i),l=["string","number","integer"],c=d(s)&&d(i)&&(l.includes(i)||f(i)&&i.some((e=>l.includes(e))));return n&&a&&r&&o&&c}build(){this.control=this.theme.getCheckboxesControl({values:B(this.instance.schema.items),titles:te(this.instance.schema.items,"enumTitles")||B(this.instance.schema.items),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach((e=>{e.addEventListener("change",(()=>{const t=this.instance.getValue();if(e.checked)t.push(e.value);else{const s=t.indexOf(e.value);s>-1&&t.splice(s,1)}this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach((t=>{t.checked=e.includes(t.value)}))}}class ys{constructor(e){this.customEditors=e.customEditors??[],this.editors=[us,Vt,Wt,Xt,Qt,Yt,es,ts,ss,gs,fs,bs,is,vs,as,rs,os,cs,ds,ls,Cs,ps,hs,ms]}getClass(e){for(const t of this.customEditors)if(t.resolves(e))return t;for(const t of this.editors)if(t.resolves(e))return t;return null}}class Ls extends Ot{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new ys({customEditors:this.options.customEditors}),this.theme=this.options.theme,d(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Ft;break;case"bootstrap-icons":this.theme.icons=Kt;break;case"fontawesome3":this.theme.icons=$t;break;case"fontawesome4":this.theme.icons=zt;break;case"fontawesome5":this.theme.icons=Jt;break;case"fontawesome6":this.theme.icons=Gt}this.schema=this.options.schema,this.validator=new kt({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),d(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",(()=>{this.emit("change")})),this.hiddenInput&&this.on("change",(()=>{this.hiddenInput.value=JSON.stringify(this.getValue())}))}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&b(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach((e=>{this.hiddenInput.setAttribute(e,this.options.hiddenInputAttributes[e])})),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||te(e.schema,"mergeAllOf")){const t=j(e.schema);d(t)&&t.forEach((t=>{e.schema=C({},e.schema,t)}))}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const t=de(e.schema),s=he(e.schema),i=k(e.schema),n=U(e.schema);return d(i)||d(s)||"any"===t||f(t)||h(t)?new Mt(e):d(n)?new Ht(e):"object"===t?new Bt(e):"array"===t?new Nt(e):"string"===t?new qt(e):"number"===t||"integer"===t?new Dt(e):"boolean"===t?new Rt(e):"null"===t?new Ut(e):void 0}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach((t=>{const s=this.instances[t];e=[...e,...s.getErrors()]})),e}showValidationErrors(e=null){if(!this.options.container)return!1;const t=e||this.getErrors();Object.keys(this.instances).forEach((e=>{this.instances[e].ui.showValidationErrors(t,!0)}))}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach((e=>{delete this[e]}))}}class Es{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const t=document.createElement("legend"),s=document.createElement("span");return t.classList.add("jedi-editor-legend"),s.classList.add("jedi-editor-legend-text"),t.setAttribute("aria-labelledby","#legend-"+e.id),s.textContent=e.textContent,s.setAttribute("id","#legend-"+e.id),t.appendChild(s),t}getLabel(e){const t=document.createElement("label");t.setAttribute("for",e.for);const s=this.getIcon(e.labelIconClass),i=document.createElement("span");return i.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(t),t.classList.add("jedi-title"),t.appendChild(s),t.appendChild(i),{label:t,labelText:i,icon:s}}getIcon(e=""){const t=document.createElement("i");let s=e.split(" ");return s=s.filter((e=>e.length>0)),s&&s.forEach((e=>{t.classList.add(e)})),t}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const t=document.createElement("div");return t.classList.add("jedi-messages-slot"),t.setAttribute("aria-atomic","false"),t.setAttribute("aria-live","polite"),e.id&&t.setAttribute("id",e.id),t}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const t=this.getButton(e);return t.classList.add("jedi-properties-toggle"),t.addEventListener("click",(()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()})),t}getCollapse(e){const t=document.createElement("div");return t.classList.add("jedi-collapse"),t.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(t.style.display="none"),t}getCollapseToggle(e){const t=this.getButton(e);t.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&t.addEventListener("click",(()=>{"none"===e.collapse.style.display?e.collapse.style.display="block":e.collapse.style.display="none"}));let s=e.startCollapsed;return t.style.transition="transform 0.1s ease",s&&(t.style.transform="rotate(90deg)"),t.addEventListener("click",(()=>{t.style.transform=s?"rotate(0deg)":"rotate(90deg)",s=!s})),t}getPropertiesSlot(e){const t=document.createElement("dialog");return t.classList.add("jedi-properties-slot"),t.setAttribute("id",e.id),window.addEventListener("click",(e=>{e.target===t&&t.close()})),t}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const t=document.createElement("p");return t.classList.add("jedi-aria-live-message"),t.textContent=e,this.visuallyHidden(t),t}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const t=document.createElement("button");t.classList.add("jedi-btn"),t.setAttribute("type","button"),e.value&&(t.value=e.value),e.id&&t.setAttribute("id",e.id);const s=document.createElement("span");if(s.textContent=e.textContent,this.icons&&e.icon){const i=this.getIcon(this.icons[e.icon]);i.setAttribute("title",e.textContent),t.appendChild(i),this.visuallyHidden(s)}return t.appendChild(s),t}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const t=document.createElement("small");return t.classList.add("jedi-description"),e.textContent&&(t.textContent=e.textContent),e.id&&t.setAttribute("id",e.id),t}getPlaceholderControl(e){const t=document.createElement("div"),s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c});return t.appendChild(a),t.appendChild(s),t.appendChild(l),t.appendChild(d),t.appendChild(i),i.appendChild(n),{container:t,placeholder:s,label:a,labelText:r,description:l,messages:d,actions:i,arrayActions:n}}getObjectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getPropertiesAriaLive(),r=this.getDescription({textContent:e.description}),o=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getPropertiesSlot({id:"properties-slot-"+e.id}),d=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:c}),h="collapse-"+e.id,p=this.getCollapse({id:h,startCollapsed:e.startCollapsed}),u=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:h,collapse:p,startCollapsed:e.startCollapsed}),m=this.getPropertiesActivators(),g=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),f=this.getAddPropertyButton(),b=this.getFieldset(),v=this.getLegend({textContent:e.title,id:e.id});return f.classList.add("jedi-object-add"),t.appendChild(b),t.appendChild(c),b.appendChild(v),b.appendChild(p),p.appendChild(n),n.appendChild(r),n.appendChild(o),v.appendChild(s),s.appendChild(i),n.appendChild(l),e.addProperty&&(c.appendChild(g.container),c.appendChild(f),c.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(s.appendChild(d),c.appendChild(a),c.appendChild(m)),e.enableCollapseToggle&&s.appendChild(u),{container:t,collapse:p,collapseToggle:u,body:n,actions:s,messages:o,childrenSlot:l,propertiesToggle:d,propertiesContainer:c,addPropertyControl:g,addPropertyBtn:f,ariaLive:a,propertiesActivators:m,arrayActions:i}}getArrayControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getDescription({textContent:e.description}),r=this.getMessagesSlot(),o=this.getChildrenSlot(),l=this.getBtnGroup(),c=this.getArrayBtnAdd(),d=this.getFieldset(),h=this.getLegend({textContent:e.title,id:e.id}),p="collapse-"+e.id,u=this.getCollapse({id:p,startCollapsed:e.startCollapsed}),m=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:p,collapse:u,startCollapsed:e.startCollapsed});return t.appendChild(d),d.appendChild(h),d.appendChild(u),u.appendChild(n),n.appendChild(a),n.appendChild(r),h.appendChild(s),s.appendChild(l),l.appendChild(c),s.appendChild(i),n.appendChild(o),e.enableCollapseToggle&&s.appendChild(m),{container:t,collapseToggle:m,collapse:u,body:n,actions:s,messages:r,childrenSlot:o,btnGroup:l,addBtn:c,arrayActions:i}}getArrayItem(){const e=document.createElement("div"),t=this.getCard(),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardHeader(),a=this.getCardBody();return e.appendChild(t),t.appendChild(n),t.appendChild(a),n.appendChild(s),s.appendChild(i),{container:e,card:t,header:n,body:a,actions:s,arrayActions:i}}getMultipleControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),t.appendChild(o),t.appendChild(s),s.appendChild(a),s.appendChild(r),a.appendChild(i),e.switcher&&i.appendChild(d.container),i.appendChild(n),r.appendChild(l),r.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getIfThenElseControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),e.switcher&&t.appendChild(d.container),r.appendChild(o),t.appendChild(l),t.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getNullControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),{label:n,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),r=e.id+"-description",o=this.getDescription({textContent:e.description,id:r}),l=this.getMessagesSlot(),c=document.createElement("br");return t.appendChild(n),t.appendChild(c),t.appendChild(o),t.appendChild(l),t.appendChild(s),s.appendChild(i),{container:t,label:n,labelText:a,description:o,messages:l,actions:s,arrayActions:i}}getTextareaControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("textarea");n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getInputControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("input");n.setAttribute("type",e.type),n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getRadiosControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","radio"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),n.appendChild(d),n.appendChild(l),{container:t,fieldset:n,legend:r,body:a,radios:p,labels:u,labelTexts:m,radioControls:h,description:d,messages:l,actions:s,arrayActions:i}}getCheckboxControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("div"),a=document.createElement("input");a.setAttribute("type","checkbox"),a.setAttribute("id",e.id);const{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",h=this.getMessagesSlot({id:d}),p=d+" "+l;return a.setAttribute("aria-describedby",p),t.appendChild(n),t.appendChild(s),s.appendChild(i),n.appendChild(a),n.appendChild(r),n.appendChild(c),n.appendChild(h),{container:t,formGroup:n,input:a,label:r,labelText:o,description:c,messages:h,actions:s,arrayActions:i}}getCheckboxesControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","checkbox"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),a.appendChild(d),a.appendChild(l),{container:t,fieldset:n,legend:r,body:a,checkboxes:p,labels:u,labelTexts:m,checkboxControls:h,description:d,messages:l,actions:s,arrayActions:i}}getSelectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("select");n.setAttribute("id",e.id),e.values.forEach(((t,s)=>{const i=document.createElement("option");i.setAttribute("value",t),e.titles&&e.titles[s]&&(i.textContent=e.titles[s]),n.appendChild(i)}));const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getSwitcher(e){const t=document.createElement("span"),s=document.createElement("select");s.setAttribute("id",e.id),e.values.forEach(((t,i)=>{const n=document.createElement("option");n.setAttribute("value",t),e.titles&&e.titles[i]&&(n.textContent=e.titles[i]),s.appendChild(n)}));const{label:i,labelText:n}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return t.appendChild(i),t.appendChild(s),{container:t,input:s,label:i,labelText:n}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return s.textContent=e.message,i.textContent="⚠ ",i.classList.add("jedi-error-message"),i.setAttribute("aria-hidden","true"),t.classList.add("jedi-error-message"),t.appendChild(i),t.appendChild(s),t}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,t,s){const i=document.createElement("div");return i.classList.add("jedi-col-xs-"+e),i.classList.add("jedi-col-md-"+t),s&&i.classList.add("jedi-col-md-offset-"+s),i}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const t=document.createElement("li"),s=document.createElement("a");return s.classList.add("jedi-nav-link"),s.setAttribute("href","#"+e.id),s.textContent=e.hasErrors?"⚠ "+e.title:e.title,t.appendChild(s),{list:t,link:s}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,t,s){e.setAttribute("id",s),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}const xs={Schema:me,Utils:w,EditorBoolean:Zt,EditorBooleanEnumRadio:Wt,EditorBooleanEnumSelect:Qt,EditorBooleanCheckbox:Xt,EditorString:_t,EditorStringEnumRadio:Yt,EditorStringEnumSelect:es,EditorStringTextarea:ts,EditorStringAwesomplete:ss,EditorStringInput:is,EditorNumber:ns,EditorNumberEnumRadio:as,EditorNumberEnumSelect:rs,EditorNumberInput:os,EditorObjectGrid:cs,EditorObjectNav:ds,EditorObject:ls,EditorArrayNav:ps,EditorArray:hs,EditorMultiple:us,EditorIfThenElse:Vt,EditorNull:ms,Theme:Es,ThemeBootstrap3:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("in"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h5"),t.classList.add("panel-heading"),t.classList.add("pull-left"),t.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.setAttribute("style","margin-right: 5px;"),t}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("panel-heading"),t.classList.add("text-right"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-xs"),t.classList.add("btn-default"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{body:s,radios:i,labels:n,labelTexts:a,radioControls:r,description:o,messages:l}=t;return r.forEach(((e,t)=>{e.classList.add("radio"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),s.appendChild(o),s.appendChild(l),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{body:s,checkboxes:i,labels:n,labelTexts:a,checkboxControls:r}=t;return r.forEach(((e,t)=>{e.classList.add("checkbox"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,labelText:r,description:o,messages:l}=t;return i.classList.add("checkbox"),s.appendChild(i),i.appendChild(a),a.appendChild(n),a.appendChild(r),i.appendChild(o),i.appendChild(l),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow();return i.classList.add("col-xs-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("col-md-offset-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("nav-stacked"),!1===e.stacked&&t.classList.remove("nav-stacked"),t}getTab(e){const t=super.getTab(e);return e.active&&t.list.classList.add("active"),t.link.setAttribute("data-toggle","tab"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap4:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("float-left"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("mr-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("form-group"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("form-group"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return i.classList.add("form-group"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("form-group"),i.classList.add("form-control"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("form-text"),t.classList.add("d-block"),t}getColumnClass(e,t){return"col-"+e+"-"+t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList();return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap5:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-bs-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("me-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("mb-3"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("mb-3"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return s.classList.add("mb-3"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(a),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("mb-3"),i.classList.add("form-select"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("d-block"),t.classList.add("form-text"),t.classList.add("form-text"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-bs-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}},RefParser:class{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);!1===this.refsResolved();)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every((e=>null!==e))}async collectRefs(e,t="#"){if("object"==typeof e&&null!==e)for(const[s,i]of Object.entries(e)){const n=t?`${t}/${s}`:`/${s}`;if(this.hasRef(e)){const t=e.$ref;if(this.isExternalRef(t)){const e=await this.load(t);this.refs[t]=e,await this.collectRefs(e,n)}else this.refs[t]=this.data[t]??null}this.data[t]=e,await this.collectRefs(i,n)}}hasRef(e){return void 0!==e.$ref&&"string"==typeof e.$ref}isExternalRef(e){return"string"==typeof e&&(e.startsWith("http")||e.startsWith("https"))}isObject(e){return null!==e&&"object"==typeof e}expand(e){const t=JSON.parse(JSON.stringify(e));if(this.isObject(t)&&this.hasRef(t)){const e=t.$ref;return delete t.$ref,this.expand(C({},this.refs[e],t))}return t}async load(e){try{const t=await fetch(e);if(!t.ok)throw new Error("Network response was not ok");return await t.json()}catch(t){throw console.error("Error loading",e,t),t}}},Create:Ls};module.exports=xs; //# sourceMappingURL=jedi.cjs.map diff --git a/dist/cjs/jedi.cjs.map b/dist/cjs/jedi.cjs.map index ede21d5..2a4a93b 100644 --- a/dist/cjs/jedi.cjs.map +++ b/dist/cjs/jedi.cjs.map @@ -1 +1 @@ -{"version":3,"file":"jedi.cjs","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/constrains/propertyNames.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/themes/theme.js","../../src/index.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/ref-parser/ref-parser.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport function overwriteExistingProperties (obj1, obj2) {\n Object.keys(obj2).forEach(function (key) {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n obj1[key] = obj2[key]\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n const instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n this.instances.forEach((instance) => {\n const currentValue = instance.getValue()\n\n if (isObject(currentValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(currentValue, newValue)\n\n // restore any const value here\n instance.children.forEach((child) => {\n const schemaConst = getSchemaConst(child.schema)\n\n if (isSet(schemaConst)) {\n newValue[child.getKey()] = schemaConst\n }\n })\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = instanceWithoutIf.getValue()\n instanceWithoutIf.destroy()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn, isNumber,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n"],"names":["getCircularReplacer","ancestors","key","value","length","at","this","pop","includes","push","clone","thing","JSON","parse","stringify","escapeRegExp","string","replace","replaceAll","str","find","RegExp","pathToAttribute","path","hasOwn","obj","prop","Object","prototype","hasOwnProperty","call","sortObject","keys","sort","reduce","result","equal","a","b","isObject","different","isNull","isSet","notSet","isNumber","isInteger","Math","floor","isString","isBoolean","isArray","Array","getType","type","mergeDeep","target","sources","source","shift","forEach","assign","overwriteExistingProperties","obj1","obj2","getValueByJSONPath","data","split","test","index","parseInt","compileTemplate","template","match","clamp","number","min","max","removeDuplicatesFromArray","arr","uniqueObjects","uniqueValues","Set","objString","has","add","Utils","getSchemaAdditionalProperties","schema","additionalProperties","getSchemaPropertyNames","propertyNames","getSchemaAllOf","allOf","getSchemaAnyOf","anyOf","getSchemaConst","const","getSchemaContains","contains","getSchemaDefault","default","getSchemaDependentRequired","dependentRequired","getSchemaDependentSchemas","dependentSchemas","getSchemaDescription","description","getSchemaElse","else","getSchemaEnum","enum","getSchemaExclusiveMaximum","exclusiveMaximum","getSchemaExclusiveMinimum","exclusiveMinimum","getSchemaFormat","format","getSchemaIf","if","getSchemaItems","items","getSchemaMaximum","maximum","getSchemaMaxContains","maxContains","getSchemaMaxItems","maxItems","getSchemaMaxLength","maxLength","getSchemaMaxProperties","maxProperties","getSchemaMinimum","minimum","getSchemaMinContains","minContains","getSchemaMinItems","minItems","getSchemaMinLength","minLength","getSchemaMinProperties","minProperties","getSchemaMultipleOf","multipleOf","getSchemaNot","not","getSchemaXOption","option","getSchemaPattern","pattern","getSchemaPatternProperties","patternProperties","getSchemaPrefixItems","prefixItems","getSchemaProperties","properties","getSchemaReadOnly","readOnly","getSchemaRequired","required","getSchemaThen","then","getSchemaTitle","title","getSchemaType","getSchemaOneOf","oneOf","getSchemaUnevaluatedProperties","unevaluatedProperties","getSchemaUniqueItems","uniqueItems","Schema","getSchemaX","keyword","getSchemaSchema","$schema","validator","errors","subSchemaEditor","Jedi","refParser","rootName","subSchemaErrors","getErrors","destroy","error","i18n","messages","constrain","valid","anyOfEditor","anyOfErrors","_enum","schemaEnum","some","e","validateFormat","options","regexp","prefixItemsSchemasCount","toString","notEditor","notErrors","counter","oneOfEditor","oneOfErrors","propertyName","editor","editorErrors","map","schemaProperties","invalidProperties","propertySchema","join","constraint","missingProperties","types","integer","boolean","array","object","null","valueType","seen","hasDuplicatedItems","i","item","itemStringified","schemaAdditionalProperties","schemaPatternProperties","property","definedInPatternProperty","isDefinedInProperties","additionalPropertyErrors","draft04","_const","schemaConst","containsEditor","containsInvalid","requiredProperties","filter","dependentSchema","tmpEditor","tmpErrors","ifThenElse","schemaIf","schemaThen","schemaElse","ifEditor","ifErrors","thenErrors","elseErrors","thenEditor","elseEditor","itemSchema","itemValue","draft06","draft07","schemaUnevaluatedProperties","schemaAllOf","schemaAnyOf","schemaOneOf","subSchema","subschema","unevaluatedPropertiesErrors","draft201909","propertie","draft202012","schemaPropertyNames","Validator","constructor","config","draft","jsonSchemaDrafts","schemaErrors","schemaOptionsMessages","schemaClone","validatorErrors","EventEmitter","listeners","on","name","callback","off","listener","emit","payload","Instance","super","jedi","isActive","parent","children","ui","isDirty","init","register","setInitialValue","prepare","setDefaultValue","container","setUI","onChildChange","EditorClass","uiResolver","getClass","getKey","pathSeparator","registerChildRecursive","child","unregister","schemaType","schemaDefault","setValue","getValue","newValue","triggersChange","enforceConst","activate","deactivate","isReadOnly","Editor","instance","theme","control","disabled","showingValidationErrors","build","enforceEnumDefault","addEventListeners","setContainerAttributes","refreshUI","showErrors","showValidationErrors","resolves","setAttribute","force","innerHTML","label","message","invalidFeedback","getInvalidFeedback","appendChild","disable","enable","refreshInteractiveElements","querySelectorAll","element","removeAttribute","sanitize","parentNode","removeChild","EditorIfThenElse","getIfThenElseControl","titleHidden","id","switcherOptionValues","switcherOptionsLabels","switcher","input","addEventListener","Number","switchInstance","childrenSlot","activeInstance","getAlert","InstanceIfThenElse","instances","instanceStartingValues","schemas","ifThenElseShemas","traverseSchema","optionLabel","instanceWithoutIf","createInstance","currentValue","getFittestIndex","fittestIndex","ifValidator","getAllOfCombinations","generateCombinations","current","remaining","nextSchema","schema1","schema2","slice","InstanceMultiple","lastIndex","onSetValue","schemasOf","schemaCopy","expand","switcherOptionsLabel","switcherTitle","schemaTitle","toUpperCase","charAt","championErrors","instanceErrors","InstanceBoolean","InstanceObject","musstCreateChild","optionsDeactivateNonRequired","deactivateNonRequired","schemaDeactivateNonRequired","isNotRequired","createChild","refreshInstances","isRequired","schemaRequired","isDependentRequired","deleteChild","splice","getChild","getPropertySchema","sortChildrenByPropertyOrder","propertyOrderA","propertyOrderB","isValidNumberA","isValidNumberB","oldValue","InstanceArray","refreshChildren","createItemInstance","itemsCount","schemaItems","schemaPrefixItems","move","fromIndex","toIndex","addItem","tempEditor","deleteItem","itemIndex","InstanceString","InstanceNumber","InstanceNull","glyphicons","delete","moveUp","moveDown","collapse","drag","bootstrapIcons","fontAwesome3","fontAwesome4","fontAwesome5","fontAwesome6","EditorBoolean","Boolean","EditorBooleanEnumRadio","getRadiosControl","values","titles","radios","radio","radioValue","checked","EditorBooleanEnumSelect","getSelectControl","labelIconClass","EditorBooleanCheckbox","getCheckboxControl","EditorString","String","EditorStringEnumRadio","EditorStringEnumSelect","EditorStringTextarea","getTextareaControl","EditorStringAwesomplete","window","Awesomplete","getInputControl","awesomplete","querySelector","style","display","console","EditorStringInput","getTypes","optionFormat","EditorNumber","EditorNumberEnumRadio","EditorNumberEnumSelect","EditorNumberInput","EditorObject","propertyActivators","schemaOptions","addProperty","enablePropertiesToggle","getObjectControl","enableCollapseToggle","startCollapsed","addPropertyBtn","addPropertyControl","ariaLive","ariaLiveMessage","getAriaLiveMessage","textContent","propertiesContainer","close","showModal","refreshPropertiesSlot","schemaOptionEnablePropertiesToggle","propertiesActivators","firstChild","notRequired","checkboxControl","checkbox","refreshEditors","EditorObjectGrid","lastChild","row","getRow","grid","columns","offset","col","getCol","newRow","EditorObjectNav","activeTabIndex","nav","cols","tabListCol","tabContentCol","tabContent","getTabContent","tabList","getTabList","stacked","variant","active","tab","getTab","hasErrors","grandChild","list","setTabPaneAttributes","EditorArray","getArrayControl","addBtn","isSortable","Sortable","deleteBtn","getDeleteItemBtn","moveUpBtn","getMoveUpItemBtn","moveDownBtn","getMoveDownItemBtn","btnGroup","getBtnGroup","arrayActions","body","getArrayItem","dragBtn","getDragItemBtn","sortable","create","animation","handle","onEnd","evt","oldIndex","newIndex","EditorArrayNav","childTitle","schemaOptionItemTemplate","i0","i1","EditorMultiple","getMultipleControl","EditorNull","getNullControl","EditorStringQuill","Quill","getPlaceholderControl","quill","placeholder","root","quillText","getText","setText","EditorStringJodit","Jodit","jodit","make","events","joditValue","setReadOnly","destruct","EditorStringFlatpickr","flatpickr","setDate","EditorNumberRaty","Raty","raty","click","score","EditorArrayEnumItems","schemaItemsType","isArrayType","isUniqueItems","hasEnum","hasTypes","validTypes","hasValidItemType","getCheckboxesControl","checkboxes","indexOf","UiResolver","customEditors","editors","iconLib","mergeAllOf","hiddenInputAttributes","bindEventListeners","icons","appendHiddenInput","classList","hiddenInput","hiddenControl","attr","arguments","getInstance","errorsList","Theme","useToggleEvents","getEditorContainer","html","document","createElement","getFieldset","getLegend","legend","legendText","getLabel","for","icon","getIcon","labelText","text","visuallyHidden","classes","iconClasses","className","getCard","getCardHeader","getCardBody","getActionsSlot","getArrayActionsSlot","getChildrenSlot","getMessagesSlot","getControlSlot","getPropertiesToggle","toggle","getButton","open","getCollapse","getCollapseToggle","collapsed","transition","transform","getPropertiesSlot","event","getPropertiesAriaLive","getPropertiesActivators","button","getArrayBtnAdd","getAddPropertyButton","deleteItemBtn","moveUpItemBtn","moveDownItemBtn","dragItemBtn","getDescription","actions","descriptionId","messagesId","propertiesToggle","collapseId","collapseToggle","fieldset","card","header","getSwitcher","br","width","describedBy","radioControls","labels","labelTexts","radioControl","formGroup","checkboxControls","invalidFeedbackText","invalidFeedbackIcon","xs","md","offsetMd","link","visuallyVisible","ThemeBootstrap3","btn","labelObj","clear","remove","ThemeBootstrap4","getColumnClass","size","ThemeBootstrap5","controlSlot","RefParser","refs","dereference","collectRefs","refsResolved","every","entries","nextPath","hasRef","ref","isExternalRef","resolvedSchema","load","startsWith","cloneSchema","$ref","uri","response","fetch","ok","Error","json","Create"],"mappings":"aAKO,SAASA,IACd,MAAMC,EAAY,GAEX,OAAA,SAAUC,EAAKC,GACpB,GAAqB,iBAAVA,GAAgC,OAAVA,EACxB,OAAAA,EAIT,KAAOF,EAAUG,OAAS,GAAKH,EAAUI,IAAG,KAAQC,MAClDL,EAAUM,MAER,OAAAN,EAAUO,SAASL,GACd,cAETF,EAAUQ,KAAKN,GACRA,EACX,CACA,CAOO,SAASO,EAAOC,GACjB,QAAiB,IAAVA,EAIX,OAAOC,KAAKC,MAAMD,KAAKE,UAAUH,EAAOX,KAC1C,CAOO,SAASe,EAAcC,GACrB,OAAAA,EAAOC,QAAQ,sBAAuB,OAC/C,CASO,SAASC,EAAYC,EAAKC,EAAMH,GAC9B,OAAAE,EAAIF,QAAQ,IAAII,OAAON,EAAaK,GAAO,KAAMH,EAC1D,CAOO,SAASK,EAAiBC,GAC/B,OAAOL,EAAWA,EAAWK,EAAM,IAAK,QAAS,IAAK,IACxD,CAQO,SAASC,EAAQC,EAAKC,GAC3B,OAAOC,OAAOC,UAAUC,eAAeC,KAAKL,EAAKC,EACnD,CAOO,SAASK,EAAYN,GACnB,OAAAE,OAAOK,KAAKP,GAAKQ,OAAOC,QAAO,CAACC,EAAQjC,KACtCiC,EAAAjC,GAAOuB,EAAIvB,GACXiC,IACN,CAAE,EACP,CAQO,SAASC,EAAOC,EAAGC,GAKx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AIhD,KAAKksB,KAAKQ,GAAMK,GACvD,CAEW,OAAAA,CACX,CAOE,UAAMF,CAAMI,GACN,IACI,MAAAC,QAAiBC,MAAMF,GACzB,IAACC,EAASE,GACN,MAAA,IAAIC,MAAM,+BAEX,aAAMH,EAASI,MACvB,OAAQpiB,GAED,MADEqS,QAAArS,MAAM,gBAAiB+hB,EAAK/hB,GAC9BA,CACZ,CACA,GJvCEqiB,OAAAA"} \ No newline at end of file +{"version":3,"file":"jedi.cjs","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/constrains/propertyNames.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/themes/theme.js","../../src/index.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/ref-parser/ref-parser.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\n// export function overwriteExistingProperties (obj1, obj2) {\n// Object.keys(obj2).forEach(function (key) {\n// if (key in obj1) {\n// if (typeof obj1[key] === typeof obj2[key]) {\n// obj1[key] = obj2[key]\n// }\n// }\n// })\n//\n// return obj1\n// }\n\n/**\n * Merges objects but only the properties that exist in both objects\n * if they are the same type of value.\n * Handles nested objects recursively.\n * @param {object} obj1 - The target object\n * @param {object} obj2 - Object whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport const overwriteExistingProperties = (obj1, obj2) => {\n Object.keys(obj2).forEach((key) => {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n if (isObject(obj1[key]) && isObject(obj2[key])) {\n overwriteExistingProperties(obj1[key], obj2[key])\n } else {\n obj1[key] = obj2[key]\n }\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.instanceWithoutIf = null\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n this.instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n let ifValue = this.instanceWithoutIf.getValue()\n\n if (isObject(ifValue) && isObject(newValue)) {\n ifValue = overwriteExistingProperties(ifValue, newValue)\n }\n\n this.instances.forEach((instance, index) => {\n const startingValue = this.instanceStartingValues[index]\n\n if (isObject(startingValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(startingValue, ifValue)\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = this.instanceWithoutIf.getValue()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n"],"names":["getCircularReplacer","ancestors","key","value","length","at","this","pop","includes","push","clone","thing","JSON","parse","stringify","escapeRegExp","string","replace","replaceAll","str","find","RegExp","pathToAttribute","path","hasOwn","obj","prop","Object","prototype","hasOwnProperty","call","sortObject","keys","sort","reduce","result","equal","a","b","isObject","different","isNull","isSet","notSet","isNumber","isInteger","Math","floor","isString","isBoolean","isArray","Array","getType","type","mergeDeep","target","sources","source","shift","forEach","assign","overwriteExistingProperties","obj1","obj2","getValueByJSONPath","data","split","test","index","parseInt","compileTemplate","template","match","clamp","number","min","max","removeDuplicatesFromArray","arr","uniqueObjects","uniqueValues","Set","objString","has","add","Utils","getSchemaAdditionalProperties","schema","additionalProperties","getSchemaPropertyNames","propertyNames","getSchemaAllOf","allOf","getSchemaAnyOf","anyOf","getSchemaConst","const","getSchemaContains","contains","getSchemaDefault","default","getSchemaDependentRequired","dependentRequired","getSchemaDependentSchemas","dependentSchemas","getSchemaDescription","description","getSchemaElse","else","getSchemaEnum","enum","getSchemaExclusiveMaximum","exclusiveMaximum","getSchemaExclusiveMinimum","exclusiveMinimum","getSchemaFormat","format","getSchemaIf","if","getSchemaItems","items","getSchemaMaximum","maximum","getSchemaMaxContains","maxContains","getSchemaMaxItems","maxItems","getSchemaMaxLength","maxLength","getSchemaMaxProperties","maxProperties","getSchemaMinimum","minimum","getSchemaMinContains","minContains","getSchemaMinItems","minItems","getSchemaMinLength","minLength","getSchemaMinProperties","minProperties","getSchemaMultipleOf","multipleOf","getSchemaNot","not","getSchemaXOption","option","getSchemaPattern","pattern","getSchemaPatternProperties","patternProperties","getSchemaPrefixItems","prefixItems","getSchemaProperties","properties","getSchemaReadOnly","readOnly","getSchemaRequired","required","getSchemaThen","then","getSchemaTitle","title","getSchemaType","getSchemaOneOf","oneOf","getSchemaUnevaluatedProperties","unevaluatedProperties","getSchemaUniqueItems","uniqueItems","Schema","getSchemaX","keyword","getSchemaSchema","$schema","validator","errors","subSchemaEditor","Jedi","refParser","rootName","subSchemaErrors","getErrors","destroy","error","i18n","messages","constrain","valid","anyOfEditor","anyOfErrors","_enum","schemaEnum","some","e","validateFormat","options","regexp","prefixItemsSchemasCount","toString","notEditor","notErrors","counter","oneOfEditor","oneOfErrors","propertyName","editor","editorErrors","map","schemaProperties","invalidProperties","propertySchema","join","constraint","missingProperties","types","integer","boolean","array","object","null","valueType","seen","hasDuplicatedItems","i","item","itemStringified","schemaAdditionalProperties","schemaPatternProperties","property","definedInPatternProperty","isDefinedInProperties","additionalPropertyErrors","draft04","_const","schemaConst","containsEditor","containsInvalid","requiredProperties","filter","dependentSchema","tmpEditor","tmpErrors","ifThenElse","schemaIf","schemaThen","schemaElse","ifEditor","ifErrors","thenErrors","elseErrors","thenEditor","elseEditor","itemSchema","itemValue","draft06","draft07","schemaUnevaluatedProperties","schemaAllOf","schemaAnyOf","schemaOneOf","subSchema","subschema","unevaluatedPropertiesErrors","draft201909","propertie","draft202012","schemaPropertyNames","Validator","constructor","config","draft","jsonSchemaDrafts","schemaErrors","schemaOptionsMessages","schemaClone","validatorErrors","EventEmitter","listeners","on","name","callback","off","listener","emit","payload","Instance","super","jedi","isActive","parent","children","ui","isDirty","init","register","setInitialValue","prepare","setDefaultValue","container","setUI","onChildChange","EditorClass","uiResolver","getClass","getKey","pathSeparator","registerChildRecursive","child","unregister","schemaType","schemaDefault","setValue","getValue","newValue","triggersChange","enforceConst","activate","deactivate","isReadOnly","Editor","instance","theme","control","disabled","showingValidationErrors","build","enforceEnumDefault","addEventListeners","setContainerAttributes","refreshUI","showErrors","showValidationErrors","resolves","setAttribute","force","innerHTML","label","message","invalidFeedback","getInvalidFeedback","appendChild","disable","enable","refreshInteractiveElements","querySelectorAll","element","removeAttribute","sanitize","parentNode","removeChild","EditorIfThenElse","getIfThenElseControl","titleHidden","id","switcherOptionValues","switcherOptionsLabels","switcher","input","addEventListener","Number","switchInstance","childrenSlot","activeInstance","getAlert","InstanceIfThenElse","instances","instanceStartingValues","instanceWithoutIf","schemas","ifThenElseShemas","traverseSchema","optionLabel","createInstance","currentValue","getFittestIndex","ifValue","startingValue","fittestIndex","ifValidator","getAllOfCombinations","generateCombinations","current","remaining","nextSchema","schema1","schema2","slice","InstanceMultiple","lastIndex","onSetValue","schemasOf","schemaCopy","expand","switcherOptionsLabel","switcherTitle","schemaTitle","toUpperCase","charAt","championErrors","instanceErrors","InstanceBoolean","InstanceObject","musstCreateChild","optionsDeactivateNonRequired","deactivateNonRequired","schemaDeactivateNonRequired","isNotRequired","createChild","refreshInstances","isRequired","schemaRequired","isDependentRequired","deleteChild","splice","getChild","getPropertySchema","sortChildrenByPropertyOrder","propertyOrderA","propertyOrderB","isValidNumberA","isValidNumberB","oldValue","InstanceArray","refreshChildren","createItemInstance","itemsCount","schemaItems","schemaPrefixItems","move","fromIndex","toIndex","addItem","tempEditor","deleteItem","itemIndex","InstanceString","InstanceNumber","InstanceNull","glyphicons","delete","moveUp","moveDown","collapse","drag","bootstrapIcons","fontAwesome3","fontAwesome4","fontAwesome5","fontAwesome6","EditorBoolean","Boolean","EditorBooleanEnumRadio","getRadiosControl","values","titles","radios","radio","radioValue","checked","EditorBooleanEnumSelect","getSelectControl","labelIconClass","EditorBooleanCheckbox","getCheckboxControl","EditorString","String","EditorStringEnumRadio","EditorStringEnumSelect","EditorStringTextarea","getTextareaControl","EditorStringAwesomplete","window","Awesomplete","getInputControl","awesomplete","querySelector","style","display","console","EditorStringInput","getTypes","optionFormat","EditorNumber","EditorNumberEnumRadio","EditorNumberEnumSelect","EditorNumberInput","EditorObject","propertyActivators","schemaOptions","addProperty","enablePropertiesToggle","getObjectControl","enableCollapseToggle","startCollapsed","addPropertyBtn","addPropertyControl","ariaLive","ariaLiveMessage","getAriaLiveMessage","textContent","propertiesContainer","close","showModal","refreshPropertiesSlot","schemaOptionEnablePropertiesToggle","propertiesActivators","firstChild","notRequired","checkboxControl","checkbox","refreshEditors","EditorObjectGrid","lastChild","row","getRow","grid","columns","offset","col","getCol","newRow","EditorObjectNav","activeTabIndex","nav","cols","tabListCol","tabContentCol","tabContent","getTabContent","tabList","getTabList","stacked","variant","active","tab","getTab","hasErrors","grandChild","list","setTabPaneAttributes","EditorArray","getArrayControl","addBtn","isSortable","Sortable","deleteBtn","getDeleteItemBtn","moveUpBtn","getMoveUpItemBtn","moveDownBtn","getMoveDownItemBtn","btnGroup","getBtnGroup","arrayActions","body","getArrayItem","dragBtn","getDragItemBtn","sortable","create","animation","handle","onEnd","evt","oldIndex","newIndex","EditorArrayNav","childTitle","schemaOptionItemTemplate","i0","i1","EditorMultiple","getMultipleControl","EditorNull","getNullControl","EditorStringQuill","Quill","getPlaceholderControl","quill","placeholder","root","quillText","getText","setText","EditorStringJodit","Jodit","jodit","make","events","joditValue","setReadOnly","destruct","EditorStringFlatpickr","flatpickr","setDate","EditorNumberRaty","Raty","raty","click","score","EditorArrayEnumItems","schemaItemsType","isArrayType","isUniqueItems","hasEnum","hasTypes","validTypes","hasValidItemType","getCheckboxesControl","checkboxes","indexOf","UiResolver","customEditors","editors","iconLib","mergeAllOf","hiddenInputAttributes","bindEventListeners","icons","appendHiddenInput","classList","hiddenInput","hiddenControl","attr","arguments","getInstance","errorsList","Theme","useToggleEvents","getEditorContainer","html","document","createElement","getFieldset","getLegend","legend","legendText","getLabel","for","icon","getIcon","labelText","text","visuallyHidden","classes","iconClasses","className","getCard","getCardHeader","getCardBody","getActionsSlot","getArrayActionsSlot","getChildrenSlot","getMessagesSlot","getControlSlot","getPropertiesToggle","toggle","getButton","open","getCollapse","getCollapseToggle","collapsed","transition","transform","getPropertiesSlot","event","getPropertiesAriaLive","getPropertiesActivators","button","getArrayBtnAdd","getAddPropertyButton","deleteItemBtn","moveUpItemBtn","moveDownItemBtn","dragItemBtn","getDescription","actions","descriptionId","messagesId","propertiesToggle","collapseId","collapseToggle","fieldset","card","header","getSwitcher","br","width","describedBy","radioControls","labels","labelTexts","radioControl","formGroup","checkboxControls","invalidFeedbackText","invalidFeedbackIcon","xs","md","offsetMd","link","visuallyVisible","ThemeBootstrap3","btn","labelObj","clear","remove","ThemeBootstrap4","getColumnClass","size","ThemeBootstrap5","controlSlot","RefParser","refs","dereference","collectRefs","refsResolved","every","entries","nextPath","hasRef","ref","isExternalRef","resolvedSchema","load","startsWith","cloneSchema","$ref","uri","response","fetch","ok","Error","json","Create"],"mappings":"aAKO,SAASA,IACd,MAAMC,EAAY,GAEX,OAAA,SAAUC,EAAKC,GACpB,GAAqB,iBAAVA,GAAgC,OAAVA,EACxB,OAAAA,EAIT,KAAOF,EAAUG,OAAS,GAAKH,EAAUI,IAAG,KAAQC,MAClDL,EAAUM,MAER,OAAAN,EAAUO,SAASL,GACd,cAETF,EAAUQ,KAAKN,GACRA,EACX,CACA,CAOO,SAASO,EAAOC,GACjB,QAAiB,IAAVA,EAIX,OAAOC,KAAKC,MAAMD,KAAKE,UAAUH,EAAOX,KAC1C,CAOO,SAASe,EAAcC,GACrB,OAAAA,EAAOC,QAAQ,sBAAuB,OAC/C,CASO,SAASC,EAAYC,EAAKC,EAAMH,GAC9B,OAAAE,EAAIF,QAAQ,IAAII,OAAON,EAAaK,GAAO,KAAMH,EAC1D,CAOO,SAASK,EAAiBC,GAC/B,OAAOL,EAAWA,EA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AEE,MAAAC,CAAQ1nB,GACC,YAA0B,IAAnBA,EAAa,MAA+C,iBAAnBA,EAAa,IACxE,CAEE,aAAA4nB,CAAeD,GACT,MAAe,iBAARA,IAIJA,EAAII,WAAW,SAAWJ,EAAII,WAAW,SACpD,CAEE,QAAA/qB,CAAUpC,GACD,OAAU,OAAVA,GAAmC,iBAAVA,CACpC,CAEE,MAAAsY,CAAQlT,GACN,MAAMgoB,EAAc3sB,KAAKC,MAAMD,KAAKE,UAAUyE,IAE9C,GAAIjF,KAAKiC,SAASgrB,IAAgBjtB,KAAK2sB,OAAOM,GAAc,CAC1D,MAAML,EAAMK,EAAYC,KAEjB,cADAD,EAAkB,KAClBjtB,KAAKmY,OAAOnV,EAAU,CAAA,EAAIhD,KAAKosB,KAAKQ,GAAMK,GACvD,CAEW,OAAAA,CACX,CAOE,UAAMF,CAAMI,GACN,IACI,MAAAC,QAAiBC,MAAMF,GACzB,IAACC,EAASE,GACN,MAAA,IAAIC,MAAM,+BAEX,aAAMH,EAASI,MACvB,OAAQtiB,GAED,MADEuS,QAAAvS,MAAM,gBAAiBiiB,EAAKjiB,GAC9BA,CACZ,CACA,GJvCEuiB,OAAAA"} \ No newline at end of file diff --git a/dist/cjs/jedi.js b/dist/cjs/jedi.js index dac38ff..93a5c3f 100644 --- a/dist/cjs/jedi.js +++ b/dist/cjs/jedi.js @@ -1,2 +1,2 @@ -"use strict";function e(){const e=[];return function(t,s){if("object"!=typeof s||null===s)return s;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(s)?"[Circular]":(e.push(s),s)}}function t(t){if(void 0!==t)return JSON.parse(JSON.stringify(t,e()))}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i(e,t,i){return e.replace(new RegExp(s(t),"g"),i)}function n(e){return i(i(e,"#","root"),"/","-")}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){return Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{})}function o(e,t){return b(e)&&b(t)&&(e=r(e),t=r(t)),JSON.stringify(e)===JSON.stringify(t)}function l(e,t){return!o(e,t)}function c(e){return null===e}function d(e){return void 0!==e}function h(e){return void 0===e}function p(e){return"number"==typeof e}function u(e){return p(e)&&e===Math.floor(e)}function m(e){return"string"==typeof e}function g(e){return"boolean"==typeof e}function f(e){return Array.isArray(e)}function b(e){return!c(e)&&!f(e)&&"object"==typeof e}function v(e){let t="any";return p(e)?t=u(e)?"integer":"number":m(e)?t="string":g(e)?t="boolean":f(e)?t="array":c(e)?t="null":b(e)&&(t="object"),t}function C(e,...t){if(!t.length)return e;const s=t.shift();return b(e)&&b(s)&&Object.keys(s).forEach((t=>{b(s[t])?(e[t]||Object.assign(e,{[t]:{}}),C(e[t],s[t])):Object.assign(e,{[t]:s[t]})})),C(e,...t)}function y(e,t){return Object.keys(t).forEach((function(s){s in e&&typeof e[s]==typeof t[s]&&(e[s]=t[s])})),e}function L(e,t){const s=t.split(".");let i=e;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const e=parseInt(n);if(!(e>=0&&e{const s=(e=e.replace(/\s/g,"")).split(/{{|}}/)[1];return L(t,s)}))}function x(e,t,s){return Math.max(t,Math.min(e,s))}function I(e){const t=[],s=new Set;for(const i of e){const e=JSON.stringify(i);s.has(e)||(s.add(e),t.push(i))}return t}const w={getCircularReplacer:e,clone:t,escapeRegExp:s,replaceAll:i,pathToAttribute:n,hasOwn:a,sortObject:r,equal:o,different:l,isNull:c,isSet:d,notSet:h,isNumber:p,isInteger:u,isString:m,isBoolean:g,isArray:f,isObject:b,getType:v,mergeDeep:C,overwriteExistingProperties:y,getValueByJSONPath:L,compileTemplate:E,clamp:x,removeDuplicatesFromArray:I};function A(e){return b(e.additionalProperties)||g(e.additionalProperties)?e.additionalProperties:void 0}function S(e){return b(e.propertyNames)||g(e.propertyNames)?e.propertyNames:void 0}function j(e){return f(e.allOf)?e.allOf:void 0}function k(e){return f(e.anyOf)?e.anyOf:void 0}function O(e){return e.const}function P(e){return b(e.contains)||g(e.contains)?e.contains:void 0}function T(e){return e.default}function V(e){return b(e.dependentRequired)?e.dependentRequired:void 0}function H(e){return b(e.dependentSchemas)?e.dependentSchemas:void 0}function M(e){return m(e.description)?e.description:void 0}function R(e){return b(e.else)||g(e.else)?e.else:void 0}function B(e){if(f(e.enum)&&e.enum.length>0)return e.enum}function N(e){return p(e.exclusiveMaximum)?e.exclusiveMaximum:void 0}function q(e){return p(e.exclusiveMinimum)?e.exclusiveMinimum:void 0}function D(e){return m(e.format)?e.format:void 0}function U(e){return b(e.if)||g(e.if)?e.if:void 0}function F(e){return b(e.items)||g(e.items)?e.items:void 0}function K(e){return p(e.maximum)?e.maximum:void 0}function $(e){if(u(e.maxContains)&&e.maxContains>=0)return e.maxContains}function z(e){if(u(e.maxItems)&&e.maxItems>=0)return e.maxItems}function J(e){if(u(e.maxLength)&&e.maxLength>=0)return e.maxLength}function G(e){if(u(e.maxProperties))return e.maxProperties}function Z(e){return p(e.minimum)?e.minimum:void 0}function Q(e){if(u(e.minContains)&&e.minContains>=0)return e.minContains}function W(e){if(u(e.minItems)&&e.minItems>=0)return e.minItems}function X(e){if(u(e.minLength)&&e.minLength>=0)return e.minLength}function _(e){if(u(e.minProperties)&&e.minProperties>=0)return e.minProperties}function Y(e){if(p(e.multipleOf)&&e.multipleOf>=0)return e.multipleOf}function ee(e){return b(e.not)||g(e.not)?e.not:void 0}function te(e,t){return e["x-options"]&&d(e["x-options"][t])?e["x-options"][t]:void 0}function se(e){return m(e.pattern)?e.pattern:void 0}function ie(e){return b(e.patternProperties)?e.patternProperties:void 0}function ne(e){return f(e.prefixItems)?e.prefixItems:void 0}function ae(e){return b(e.properties)?e.properties:void 0}function re(e){return g(e.readOnly)?e.readOnly:void 0}function oe(e){return f(e.required)?[...new Set(e.required)]:void 0}function le(e){return b(e.then)||g(e.then)?e.then:void 0}function ce(e){return m(e.title)?e.title:void 0}function de(e){if(m(e.type)||f(e.type))return e.type}function he(e){return f(e.oneOf)?e.oneOf:void 0}function pe(e){return g(e.unevaluatedProperties)?e.unevaluatedProperties:void 0}function ue(e){return g(e.uniqueItems)?e.uniqueItems:void 0}const me={getSchemaX:function(e,t){return e["x-"+t]},getSchemaSchema:function(e){return m(e.$schema)?e.$schema:void 0},getSchemaAdditionalProperties:A,getSchemaPropertyNames:S,getSchemaAllOf:j,getSchemaAnyOf:k,getSchemaConst:O,getSchemaContains:P,getSchemaDefault:T,getSchemaDependentRequired:V,getSchemaDependentSchemas:H,getSchemaDescription:M,getSchemaElse:R,getSchemaEnum:B,getSchemaExclusiveMaximum:N,getSchemaExclusiveMinimum:q,getSchemaFormat:D,getSchemaIf:U,getSchemaItems:F,getSchemaMaximum:K,getSchemaMaxContains:$,getSchemaMaxItems:z,getSchemaMaxLength:J,getSchemaMaxProperties:G,getSchemaMinimum:Z,getSchemaMinContains:Q,getSchemaMinItems:W,getSchemaMinLength:X,getSchemaMinProperties:_,getSchemaMultipleOf:Y,getSchemaNot:ee,getSchemaXOption:te,getSchemaPattern:se,getSchemaPatternProperties:ie,getSchemaPrefixItems:ne,getSchemaProperties:ae,getSchemaReadOnly:re,getSchemaRequired:oe,getSchemaThen:le,getSchemaTitle:ce,getSchemaType:de,getSchemaOneOf:he,getSchemaUnevaluatedProperties:pe,getSchemaUniqueItems:ue};function ge(e,t,s,i,n){let a=[];const r=j(s);return d(r)&&(r.forEach((s=>{const r=new Ls({refParser:e.refParser,schema:s,data:t,rootName:i}),o=r.getErrors();r.destroy(),o.forEach((e=>{e.path=n})),a.push(...o)})),a=I(a)),a}const fe='Has additional property "{{ property }}" but no additional properties are allowed.',be="Must validate against at least one of the provided schemas.",ve="Must have value of: {{ const }}.",Ce="Must contain at least one item matching the provided schema.",ye="Must have the required properties: {{ dependentRequired }}.",Le="Must be one of the enumerated values: {{ enum }}.",Ee="Must be less than {{ exclusiveMaximum }}.",xe="Must be greater than {{ exclusiveMinimum }}.",Ie="Must be a valid {{ format }}.",we="Must have items that validate against the provided schema.",Ae="Must be at most {{ maximum }}.",Se="Must have at most {{ maxItems }} items.",je="Must be at most {{ maxLength }} characters long.",ke="Must have at most {{ maxProperties }} properties.",Oe="Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",Pe="Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",Te="Must be at least {{ minimum }}.",Ve="Must have at least {{ minItems }} items.",He="Must be at least {{ minLength }} characters long.",Me="Must have at least {{ minProperties }} properties.",Re="Must be multiple of {{ multipleOf }}.",Be="Must not validate against the provided schema.",Ne="Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",qe='Must match the pattern: "{{ pattern }}".',De="Item {{ index }} fails validation.",Ue='Property name "{{ propertyName }}" fails validation.',Fe="The following properties do not comply with their schemas: {{ properties }}",Ke="Must have the required properties: {{ required }}.",$e="Must be of type {{ type }}.",ze='Has invalid unevaluated property "{{ property }}"',Je="Must have unique items.";function Ge(e,t,s,i,n){const a=[],r=X(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&(s=!0)})),s||a.push({messages:[be],path:n,constrain:"anyOf"})}return a}function Qe(e,t,s,i,n){const a=[],r=B(s);if(d(r)){!r.some((e=>JSON.stringify(t)===JSON.stringify(e)))&&a.push({messages:[E(Le,{enum:JSON.stringify(r)})],path:n,constrain:"enum"})}return a}function We(e,t,s,i,n){const a=[],r=N(s);if(p(t)&&d(r)){t>=r&&a.push({messages:[E(Ee,{exclusiveMaximum:r})],path:n,constrain:"exclusiveMaximum"})}return a}function Xe(e,t,s,i,n){const a=[],r=q(s);if(p(t)&&d(r)){t<=r&&a.push({messages:[E(xe,{exclusiveMinimum:r})],path:n,constrain:"exclusiveMinimum"})}return a}function _e(e,t,s,i,n){const a=[],r=D(s);let o=e.validateFormat;if(te(s,"validateFormat")&&(o=s.options.validateFormat),d(r)&&m(t)&&o){let e;"email"===r&&(e=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),"url"===r&&(e=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),"uuid"===r&&(e=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i));d(e)&&!e.test(t)&&a.push({messages:[E(Ie,{format:r})],path:n,constrain:"format"})}return a}function Ye(e,t,s,i,n){const a=[],r=F(s),o=ne(s);if(f(t)&&d(r)){const e=d(o)?o.length:0;!1===r&&t.length>0&&t.length>e&&a.push({messages:[we],path:n,constrain:"items"})}return a}function et(e,t,s,i,n){const a=[],r=z(s);if(f(t)&&d(r)){t.length>r&&a.push({messages:[E(Se,{maxItems:r})],path:n,constrain:"maxItems"})}return a}function tt(e,t,s,i,n){const a=[],r=J(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length>r&&a.push({messages:[E(je,{maxLength:r})],path:n,constrain:"maxLength"})}return a}function st(e,t,s,i,n){const a=[],r=G(s);if(b(t)&&d(r)){Object.keys(t).length>r&&a.push({messages:[E(ke,{maxProperties:r})],path:n,constrain:"maxProperties"})}return a}function it(e,t,s,i,n){const a=[],r=Z(s);if(p(t)&&d(r)){t{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&s++})),1!==s&&a.push({messages:[E(Ne,{counter:s})],path:n,constrain:"oneOf"})}return a}function ct(e,t,s,i,n){const a=[],r=se(s);if(m(t)&&d(r)){!new RegExp(r).test(t)&&a.push({messages:[E(qe,{pattern:r})],path:n,constrain:"pattern"})}return a}function dt(e,t,s,i){let n=[];const a=ie(s);return b(t)&&d(a)&&Object.keys(t).forEach((s=>{Object.keys(a).forEach((r=>{if(new RegExp(r).test(s)){const o=a[r],l=new Ls({refParser:e.refParser,schema:o,data:t[s]}),c=l.getErrors().map((e=>({messages:e.messages,path:i+"/"+s,constrain:"patternProperties"})));n=[...n,...c],l.destroy()}}))})),n}function ht(e,t,s,i){const n=ae(s),r=[];return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(a(t,s)){const i=n[s],a=new Ls({refParser:e.refParser,schema:i,data:t[s]});a.getErrors().length>0&&r.push(s),a.destroy()}})),r.length>0?[{messages:[E(Fe,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function pt(e,t,s,i,n){const a=[],r=oe(s);if(b(t)&&d(r)){const e=[],s=Object.keys(t);r.forEach((t=>{s.includes(t)||e.push(t)}));e.length>0&&a.push({messages:[E(Ke,{required:e.join(", ")})],path:n,constrain:"required"})}return a}function ut(e,t,s,i,n){const a=[],r=de(s);if("any"===r)return a;if(d(r)){const e={string:e=>m(e),number:e=>p(e),integer:e=>u(e),boolean:e=>g(e),array:e=>f(e),object:e=>b(e),null:e=>c(e)};let s=!0;s=f(r)?r.some((s=>e[s](t))):e[r](t),s||a.push({messages:[E($e,{type:r,valueType:v(t)})],path:n,constrain:"type"})}return a}function mt(e,t,s,i,n){const a=[],r=K(s);if(p(t)&&d(r)){t>r&&a.push({messages:[E(Ae,{maximum:r})],path:n,constrain:"maximum"})}return a}function gt(e,t,s,i,n){const a=[],o=ue(s);if(f(t)&&d(o)&&!0===o){const e=[];let s=!1;for(let i=0;ie===a)),s)break;e.push(a)}s&&a.push({messages:[Je],path:n,constrain:"uniqueItems"})}return a}function ft(e,t,s,i,n){const r=[],o=A(s),l=ie(s),c=ae(s);if(b(t)&&d(o)){const s=c||{},i=o,d=l||{};Object.keys(t).forEach((o=>{const l=Object.keys(d).some((e=>new RegExp(e).test(o))),c=a(s,o);if(!l&&!c)if(!1===i)r.push({messages:[E(fe,{property:o})],path:n,constrain:"additionalProperties"});else if(b(i)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),a=s.getErrors().map((e=>({messages:e.messages,path:`${n}.${o}`,constrain:"additionalProperties"})));r.push(...a),s.destroy()}}))}return r}const bt={additionalProperties:ft,allOf:ge,anyOf:Ze,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,required:pt,type:ut,uniqueItems:gt};function vt(e,t,s,i,n){const a=[],r=O(s);if(d(r)){l(t,r)&&a.push({messages:[E(ve,{const:JSON.stringify(r)})],path:n,constrain:"const"})}return a}function Ct(e,t,s,i,n){const a=[],r=P(s),o=Q(s),l=$(s);if(f(t)&&d(r)){let s=0;t.forEach((t=>{const i=new Ls({refParser:e.refParser,schema:r,data:t});0===i.getErrors().length&&s++,i.destroy()}));const i=0===s;if(d(o)){sl&&a.push({messages:[E(Oe,{counter:s,maxContains:l})],path:n,constrain:"maxContains"})}}return a}function yt(e,t,s,i,n){const r=[],o=V(s);if(b(t)&&d(o)){let e=[];Object.keys(o).forEach((s=>{if(d(t[s])){const i=o[s];e=i.filter((e=>!a(t,e)))}}));e.length>0&&r.push({messages:[E(ye,{dependentRequired:e.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function Lt(e,t,s){let i=[];const n=H(s);return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(d(t[s])){const a=n[s],r=new Ls({refParser:e.refParser,schema:a,data:t}),o=r.getErrors();r.destroy(),i=[...i,...o]}})),i}function Et(e,t,s){const i=[],n=U(s),a=le(s),r=R(s);if(d(n)){if(h(a)&&h(r))return i;const s=new Ls({refParser:e.refParser,schema:n,data:t}),o=s.getErrors();s.destroy();let l=[],c=[];if(d(a)){const s=new Ls({refParser:e.refParser,schema:a,data:t});l=s.getErrors(),s.destroy()}if(d(r)){const s=new Ls({refParser:e.refParser,schema:r,data:t});c=s.getErrors(),s.destroy()}if(!0===n)return l;if(!1===n)return c;if(0===o.length)return l;if(o.length>0)return c}return i}function xt(e,t,s,i,n){const a=[],r=ne(s);return f(t)&&d(r)&&r.forEach(((s,i)=>{const r=t[i];if(d(r)){const t=new Ls({refParser:e.refParser,schema:s,data:r}),o=t.getErrors();t.destroy(),o.length>0&&a.push({messages:[E(De,{index:i})],path:n,constrain:"prefixItems"})}})),a}const It={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt},wt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt};function At(e,t,s,i,n){let r=[];const o=pe(s),l=ie(s),c=ae(s),h=j(s),p=k(s),u=he(s);if(b(t)&&d(o)){let s=d(c)?c:{};const i=o,m=l;[h,p,u].forEach((e=>{d(e)&&e.forEach((e=>{d(e.properties)&&(s={...s,...e.properties})}))})),s&&Object.keys(t).forEach((o=>{let l=!1;if(d(m)&&Object.keys(m).forEach((e=>{const t=new RegExp(e);l=t.test(o)})),l||!1!==i||a(s,o)||r.push({messages:[E(ze,{property:o})],path:n,constrain:"unevaluatedProperties"}),!l&&b(i)&&!a(s,o)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),n=s.getErrors().map((e=>({messages:e.messages,path:o,constrain:"unevaluatedProperties"})));r=[...r,...n],s.destroy()}}))}return r}const St={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,propertie:ht,prefixItems:xt,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};const jt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,prefixItems:xt,propertyNames:function(e,t,s,i,n){const a=[],r=S(s);return b(t)&&d(r)&&Object.keys(t).forEach((t=>{new Ls({refParser:e.refParser,schema:r,data:t}).getErrors().length>0&&a.push({messages:[E(Ue,{propertyName:t})],path:n,constrain:"propertyNames"})})),a},properties:ht,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};class kt{constructor(e={}){this.refParser=e.refParser,this.validateFormat=!!e.validateFormat&&e.validateFormat,this.draft=jt,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":bt,"http://json-schema.org/draft-06/schema#":It,"http://json-schema.org/draft-07/schema#":wt,"https://json-schema.org/draft/2019-09/schema":St,"https://json-schema.org/draft/2020-12/schema":jt}}getErrors(e,s,i,n){let r=[];const o=te(s,"messages"),l=t(s);return g(l)&&!0===l?r:g(l)&&!1===l?[{messages:d(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach((t=>{if(a(l,t)){const a=(0,this.draft[t])(this,e,s,i,n);a&&(r=[...r,...a])}})),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Ot{constructor(){this.listeners=[]}on(e,t){this.listeners.push({name:e,callback:t})}off(e){this.listeners=this.listeners.filter((t=>t.name!==e))}emit(e,t=void 0){this.listeners.filter((t=>t.name===e)).forEach((e=>{e.callback(t)}))}destroy(){Object.keys(this).forEach((e=>{delete this[e]}))}}class Pt extends Ot{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=d(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",(()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())}))}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=t=>{this.jedi.register(t),t.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(h(this.value)){let e;const t=de(this.schema);"boolean"===t&&(e=!1),"number"===t&&(e=0),"integer"===t&&(e=0),"string"===t&&(e=""),"array"===t&&(e=[]),"object"===t&&(e={}),"null"===t&&(e=null),this.value=e}}setDefaultValue(){const e=T(this.schema);d(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,t=!0){const s=this.jedi.options.enforceConst||te(this.schema,"enforceConst");if(d(s)&&o(s,!0)){const t=O(this.schema);d(t)&&(e=t)}this.value=e,this.emit("set-value",e),t&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];return I(this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path))}prepare(){}activate(){!1===this.isActive&&(this.isActive=!0,this.emit("change"))}deactivate(){!0===this.isActive&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return!0===re(this.schema)&&(e=!0),this.parent&&!0===re(this.parent.schema)&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach((e=>{e.destroy()})),this.ui&&this.ui.destroy(),Object.keys(this).forEach((e=>{delete this[e]})),super.destroy()}}class Tt{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI();("always"===this.instance.jedi.options.showErrors||"always"===te(this.instance.schema,"showErrors"))&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})),this.instance.on("change",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}))}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",de(this.instance.schema))}build(){}enforceEnumDefault(){const e=te(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,t=B(this.instance.schema);d(t)&&!t.includes(this.instance.getValue())&&d(t[0])&&e&&this.instance.setValue(t[0],!1)}addEventListeners(){}showValidationErrors(e,t=!1){e=e.filter((e=>e.path===this.instance.path)),this.control.messages.innerHTML="",this.showingValidationErrors=!1;if(("never"===this.instance.jedi.options.showErrors||"never"===te(this.instance.schema,"showErrors"))&&!t||0===e.length)return;const s=ce(this.instance.schema)||this.instance.getKey();e.forEach((e=>{"properties"!==e.constraint&&e.messages.forEach((e=>{const t=this.getInvalidFeedback({message:s+": "+e});this.control.messages.appendChild(t)}))})),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach((e=>{this.disabled||this.readOnly?e.setAttribute("disabled",""):e.removeAttribute("disabled","")}))}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach((e=>{delete this[e]}))}}class Vt extends Tt{static resolves(e){return d(U(e))}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Ht extends Pt{setUI(){this.ui=new Vt(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach((s=>{if(d(s.then)){this.schemas.push(C({},t(this.schema),s.then)),this.switcherOptionValues.push(e);const i="then";this.switcherOptionsLabels.push(i),e++}if(d(s.else)){this.schemas.push(C({},t(this.schema),s.else)),this.switcherOptionValues.push(e);const i="else";this.switcherOptionsLabels.push(i),e++}}));const s=t(this.schema);delete s.if,delete s.then,delete s.else;const i=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent});this.schemas.forEach((e=>{const t=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent});this.instanceStartingValues.push(t.getValue()),t.on("change",(()=>{const e=this.activeInstance.getValue();this.getFittestIndex(e)!==this.index?this.setValue(e):(this.value=this.activeInstance.getValue(),this.emit("change"))})),this.instances.push(t)})),this.on("set-value",(e=>{this.instances.forEach((t=>{const s=t.getValue();b(s)&&b(e)&&(e=y(s,e),t.children.forEach((t=>{const s=O(t.schema);d(s)&&(e[t.getKey()]=s)}))),t.setValue(e,!1)}));const t=this.getFittestIndex(e);t!==this.index&&this.switchInstance(t)})),this.value=i.getValue(),i.destroy();const n=this.getFittestIndex(this.value);this.switchInstance(n)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const t=U(e);if(d(t)){const s=le(e),i=R(e);this.ifThenElseShemas.push({if:t,then:d(s)?s:{}}),this.ifThenElseShemas.push({if:t,else:d(i)?i:{}})}}getFittestIndex(e){let t=this.index;return this.ifThenElseShemas.forEach(((s,i)=>{const n=new Ls({schema:s.if,data:e,refParser:this.jedi.refParser}),a=n.getErrors();n.destroy(),0===a.length&&s.then&&(t=i),a.length>0&&s.else&&(t=i)})),t}destroy(){this.instances.forEach((e=>{e.destroy()})),super.destroy()}getAllOfCombinations(e){const t=[],s=(e,i)=>{if(0===i.length)return void t.push(e);const n=i[0];var a,r;s((a=e,r=n,{...a,...r}),i.slice(1)),s(e,i.slice(1))};for(let i=0;iObject.keys(e).length-Object.keys(t).length)),t}}class Mt extends Pt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",(()=>{this.onSetValue()}));const e=de(this.schema);if(d(k(this.schema))||d(he(this.schema))){const e=d(k(this.schema))?k(this.schema):he(this.schema),s=t(this.schema);delete s.anyOf,delete s.oneOf,delete s.options,e.forEach(((e,t)=>{e={...s,...e},this.jedi.refParser&&(e=this.jedi.refParser.expand(e));let i="Option-"+(t+1);const n=te(e,"switcherTitle"),a=ce(e);d(a)&&(i=a),d(n)&&(i=n),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(i),this.schemas.push(e)}))}else if(f(e))e.forEach(((e,t)=>{const s=C(this.schema),i={...s,type:e,title:e[0].toUpperCase()+e.slice(1)};d(s.title)&&(i.title=s.title),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(e.charAt(0).toUpperCase()+e.slice(1)),this.schemas.push(i)}));else if("any"===e||!e){const e=t(this.schema);this.schemas=[{...e,type:"object"},{...e,type:"array"},{...e,type:"string"},{...e,type:"number"},{...e,type:"integer"},{...e,type:"boolean"},{...e,type:"null"}],this.schemas.forEach(((e,t)=>{this.switcherOptionValues.push(t)})),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach((e=>{const s=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent,value:t(this.value)});d(this.value)&&s.setValue(this.value,!1),s.unregister(),s.off("change"),s.on("change",(()=>{this.value=this.activeInstance.getValue(),this.emit("change")})),this.instances.push(s),this.register()}));const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,t){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],d(t)&&this.activeInstance.setValue(t,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(l(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let t,s,i=0;for(const n of this.instances){const a=this.jedi.validator.getErrors(e,n.schema,n.getKey(),n.path);(h(t)||h(s))&&(t=i,s=a),a.length{e.destroy()})),super.destroy()}}class Rt extends Pt{}class Bt extends Pt{prepare(){this.properties={};const e=ae(this.schema);d(e)&&Object.keys(e).forEach((t=>{const s=e[t];this.properties[t]={schema:s};let i=!0;const n=this.jedi.options.deactivateNonRequired,a=te(this.schema,"deactivateNonRequired"),r=te(s,"deactivateNonRequired");this.isNotRequired(t)&&d(n)&&!0===n&&(i=!1),this.isNotRequired(t)&&d(a)&&!0===a&&(i=!1),this.isNotRequired(t)&&d(r)&&!0===r&&(i=!1),i&&this.createChild(s,t)})),this.refreshInstances(),this.on("set-value",(()=>{this.refreshInstances()}))}isRequired(e){const t=oe(this.schema);return d(t)&&t.includes(e)}isDependentRequired(e){const t=V(this.schema);if(d(t)){let s=[];return Object.keys(t).forEach((e=>{if(d(this.value[e])){const i=t[e];s=i.filter((e=>!a(this.value,e)))}})),s.includes(e)}return!1}createChild(e,s,i,n=!1){const a=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:t(i)});this.children.push(a),this.value[s]=a.getValue();const r=this.jedi.options.deactivateNonRequired||te(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&d(r)&&!0===r&&!n&&a.deactivate(),a}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let t=this.children.length-1;t>=0;t--){const s=this.children[t];s.getKey()===e&&(s.destroy(),this.children.splice(t,1),this.onChildChange())}}getChild(e){return this.children.find((t=>e===t.getKey().split(this.jedi.pathSeparator).pop()))}getPropertySchema(e){let t;const s=A(this.schema),i=ae(this.schema),n=ie(this.schema);return d(i)&&a(i,e)?t=i[e]:d(n)&&Object.keys(n).forEach((s=>{new RegExp(s).test(e)&&(t=n[s])})),h(t)&&d(s)&&(t=s),h(t)&&(t={}),t}onChildChange(){const e={};this.children.forEach((t=>{t.isActive&&(e[t.getKey()]=t.getValue())})),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort(((e,t)=>{const s=te(e.schema,"propertyOrder"),i=te(t.schema,"propertyOrder"),n=p(s),a=p(i);return!n&&a?1:n&&!a||si?1:0}))}refreshInstances(){const e=this.getValue();if(b(e)){Object.keys(e).forEach((t=>{const s=this.getChild(t);if(s){s.activate();const t=s.getValue(),i=e[s.getKey()];l(t,i)&&s.setValue(i,!1)}else{const s=this.getPropertySchema(t);this.createChild(s,t,e[t],!0)}}));for(let t=this.children.length-1;t>=0;t--){const s=this.children[t],i=s.getKey();h(e[i])&&(this.getChild(i)?s.deactivate():this.deleteChild(i))}this.sortChildrenByPropertyOrder()}}}class Nt extends Pt{prepare(){this.refreshChildren(),this.on("set-value",(()=>{this.refreshChildren()}))}createItemInstance(e){let s;const i=this.children.length,n=F(this.schema),a=ne(this.schema);s=d(n)?n:{};d(a)&&d(a[i])&&(s=a[i]);const r=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:t(e)});return d(e)&&r.setValue(e,!1),r}move(e,s){const i=t(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=t(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const s=t(this.getValue()).filter(((t,s)=>s!==e));this.setValue(s)}onChildChange(){const e=[];this.children.forEach((t=>{e.push(t.getValue())})),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();f(e)&&e.forEach((e=>{const t=this.createItemInstance(e);this.children.push(t)}))}}class qt extends Pt{}class Dt extends Pt{}class Ut extends Pt{}const Ft={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Kt={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},$t={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},zt={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},Jt={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},Gt={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Zt extends Tt{sanitize(e){return Boolean(e)}}class Qt extends Zt{static resolves(e){return"boolean"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t="true"===e.value;this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{const t="true"===e.value;e.checked=t===this.instance.getValue()}))}}class Wt extends Zt{static resolves(e){return"boolean"===de(e)}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e="true"===this.control.input.value;this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=!0===this.instance.getValue()?"true":"false"}}class Xt extends Zt{static resolves(e){return"boolean"===de(e)&&"checkbox"===te(e,"format")}build(){this.control=this.theme.getCheckboxControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.checked)}))}sanitize(e){return Boolean(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class _t extends Tt{sanitize(e){return String(e)}}class Yt extends _t{static resolves(e){return"string"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{this.instance.setValue(e.value)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=e.value===this.instance.getValue()}))}}class es extends _t{static resolves(e){return"string"===de(e)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ts extends _t{static resolves(e){return"string"===de(e)&&"textarea"===te(e,"format")}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ss extends _t{static resolves(e){return window.Awesomplete&&"string"===de(e)&&d(te(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,te(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class is extends _t{static resolves(e){return"string"===de(e)}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=te(this.instance.schema,"format");this.control=this.theme.getInputControl({type:is.getTypes().includes(e)?e:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===e,description:M(this.instance.schema)}),"color"===e&&0===this.instance.value.length&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ns extends Tt{sanitize(e){return"integer"===de(this.instance.schema)?Math.floor(Number(e)):Number(e)}}class as extends ns{static resolves(e){const t=de(e),s=B(e),i=te(e,"format");return("number"===t||"integer"===t)&&d(s)&&"radio"===i}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t=this.sanitize(e.value);this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=Number(e.value)===Number(this.instance.getValue())}))}}class rs extends ns{static resolves(e){const t=de(e);return("number"===t||"integer"===t)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class os extends ns{static resolves(e){const t=de(e);return"number"===t||"integer"===t}build(){this.control=this.theme.getInputControl({type:"number",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class ls extends Tt{static resolves(e){return"object"===de(e)}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let t=!0;const s=A(this.instance.schema);d(s)&&!1===s&&(t=!1);let i=!1;d(this.instance.jedi.options.enablePropertiesToggle)&&(i=this.instance.jedi.options.enablePropertiesToggle),d(e.enablePropertiesToggle)&&(i=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enablePropertiesToggle:i,addProperty:t,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",(()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(0===e.length)return;if(d(this.instance.value[e]))return;const t=this.instance.getPropertySchema(e),s=this.instance.createChild(t,e);s.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const i=this.control.ariaLive;i.innerHTML="";const n=ce(s.schema),a=d(n)?n:e,r=this.theme.getAriaLiveMessage();r.textContent=a+" field was added to the form",i.appendChild(r),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}))}sanitize(e){return b(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=te(this.instance.schema,"enablePropertiesToggle");if(o(this.instance.jedi.options.enablePropertiesToggle,!0)||o(e,!0)){const e=this.instance.children.map((e=>e.getKey()));for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);e.forEach((e=>{const t=this.instance.isRequired(e),s=this.instance.isDependentRequired(e),i=!t&&!s,r=this.control.ariaLive,o=this.instance.getPropertySchema(e),l=ce(o),c=n(this.instance.path+this.instance.jedi.pathSeparator+e)+"-activator",h=d(l)?l:e;if(i){const t=this.theme.getCheckboxControl({id:c,label:h,titleHidden:!1}),s=t.input;this.propertyActivators[e]=s,s.addEventListener("change",(()=>{r.innerHTML="";const t=this.theme.getAriaLiveMessage();if(s.checked){this.instance.getChild(e)||this.instance.createChild(o,e),this.instance.getChild(e).activate(),t.textContent=h+" field was added to the form",r.appendChild(t)}else this.instance.getChild(e).deactivate(),t.textContent=h+" field was removed from the form",r.appendChild(t);this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})),this.control.propertiesActivators.appendChild(t.container)}const p=this.propertyActivators[e];p&&(p.disabled=this.disabled,p.checked=a(this.instance.getValue(),e))}))}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach((e=>{e.isActive?(null===e.ui.control.container.parentNode&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)}))}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class cs extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach((t=>{if(t.isActive){const s=te(t.schema,"grid"),i=(null==s?void 0:s.columns)||12,n=(null==s?void 0:s.offset)||0,a=this.theme.getCol(12,i,n);((null==s?void 0:s.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(a),a.appendChild(t.ui.control.container),this.disabled||this.instance.isReadOnly()?t.ui.disable():t.ui.enable()}}))}}class ds extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{if(e.isActive){const s=t===this.activeTabIndex,i=n(e.path),a=ce(e.schema),l=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:d(a)?a:e.getKey(),id:i,active:s});l.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,s,i),o.appendChild(l.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()}}))}}class hs extends Tt{static resolves(e){return"array"===de(e)}build(){this.control=this.theme.getArrayControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.instance.addItem()}))}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return f(e)?e:[]}isSortable(){return window.Sortable&&d(te(this.instance.schema,"sortable"))}refreshUI(){const e=z(this.instance.schema),t=W(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach((e=>{const s=Number(e.getKey()),i=this.theme.getDeleteItemBtn(),n=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),r=this.theme.getBtnGroup(),{container:o,arrayActions:l,body:c}=this.theme.getArrayItem();if(l.appendChild(r),r.appendChild(i),r.appendChild(n),r.appendChild(a),this.isSortable()){const e=this.theme.getDragItemBtn();r.appendChild(e)}this.control.childrenSlot.appendChild(o),c.appendChild(e.ui.control.container),i.addEventListener("click",(()=>{const t=Number(e.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(t)})),n.addEventListener("click",(()=>{const e=s-1;this.instance.move(s,e)})),a.addEventListener("click",(()=>{const e=s+1;this.instance.move(s,e)})),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),d(t)&&this.instance.value.length<=t&&i.setAttribute("disabled","")})),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:e=>{this.instance.move(e.oldIndex,e.newIndex)}})),d(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ps extends hs{static resolves(e){return"array"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{const s=this.theme.getDeleteItemBtn(),i=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn();let l;e.ui.control.arrayActions.innerHTML="",e.ui.control.arrayActions.appendChild(s),e.ui.control.arrayActions.appendChild(i),e.ui.control.arrayActions.appendChild(a),this.control.childrenSlot.appendChild(e.ui.control.container);const c=te(this.instance.schema,"itemTemplate");if(c){l=E(c,{i0:t,i1:t+1,value:e.getValue()})}else{const s=ce(e.schema);l=d(s)?s+" "+(t+1):e.getKey()}s.addEventListener("click",(()=>{this.activeTabIndex=x(t-1,0,this.instance.value.length-1),this.instance.deleteItem(t)})),i.addEventListener("click",(()=>{const e=t-1;this.activeTabIndex=e,this.instance.move(t,e)})),a.addEventListener("click",(()=>{const e=t+1;this.activeTabIndex=e,this.instance.move(t,e)}));const h=t===this.activeTabIndex,p=n(e.path),u=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:l,id:p,active:h});u.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,h,p),o.appendChild(u.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),0===t&&i.setAttribute("disabled",""),this.instance.value.length-1===t&&a.setAttribute("disabled","")}))}}class us extends Tt{static resolves(e){const t=de(e),s=he(e);return d(k(e))||d(s)||"any"===t||f(t)||h(t)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class ms extends Tt{static resolves(e){return"null"===de(e)}build(){this.control=this.theme.getNullControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}sanitize(){return null}}class gs extends _t{static resolves(e){return window.Quill&&"string"===de(e)&&d(te(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,te(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",(()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class fs extends _t{static resolves(e){return window.Jodit&&"string"===de(e)&&d(te(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,te(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",(()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class bs extends _t{static resolves(e){return window.flatpickr&&"string"===de(e)&&d(te(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,te(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class vs extends ns{static resolves(e){return"undefined"!=typeof Raty&&"number"===de(e)&&d(te(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},te(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class Cs extends Tt{static resolves(e){const t=de(e),s=F(e),i=d(s)&&de(s),n=d(t)&&"array"===t,a=!0===ue(e),r=d(s)&&d(B(e.items)),o=d(s)&&d(i),l=["string","number","integer"],c=d(s)&&d(i)&&(l.includes(i)||f(i)&&i.some((e=>l.includes(e))));return n&&a&&r&&o&&c}build(){this.control=this.theme.getCheckboxesControl({values:B(this.instance.schema.items),titles:te(this.instance.schema.items,"enumTitles")||B(this.instance.schema.items),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach((e=>{e.addEventListener("change",(()=>{const t=this.instance.getValue();if(e.checked)t.push(e.value);else{const s=t.indexOf(e.value);s>-1&&t.splice(s,1)}this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach((t=>{t.checked=e.includes(t.value)}))}}class ys{constructor(e){this.customEditors=e.customEditors??[],this.editors=[us,Vt,Qt,Xt,Wt,Yt,es,ts,ss,gs,fs,bs,is,vs,as,rs,os,cs,ds,ls,Cs,ps,hs,ms]}getClass(e){for(const t of this.customEditors)if(t.resolves(e))return t;for(const t of this.editors)if(t.resolves(e))return t;return null}}class Ls extends Ot{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new ys({customEditors:this.options.customEditors}),this.theme=this.options.theme,d(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Ft;break;case"bootstrap-icons":this.theme.icons=Kt;break;case"fontawesome3":this.theme.icons=$t;break;case"fontawesome4":this.theme.icons=zt;break;case"fontawesome5":this.theme.icons=Jt;break;case"fontawesome6":this.theme.icons=Gt}this.schema=this.options.schema,this.validator=new kt({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),d(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",(()=>{this.emit("change")})),this.hiddenInput&&this.on("change",(()=>{this.hiddenInput.value=JSON.stringify(this.getValue())}))}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&b(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach((e=>{this.hiddenInput.setAttribute(e,this.options.hiddenInputAttributes[e])})),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||te(e.schema,"mergeAllOf")){const t=j(e.schema);d(t)&&t.forEach((t=>{e.schema=C({},e.schema,t)}))}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const t=de(e.schema),s=he(e.schema),i=k(e.schema),n=U(e.schema);return d(i)||d(s)||"any"===t||f(t)||h(t)?new Mt(e):d(n)?new Ht(e):"object"===t?new Bt(e):"array"===t?new Nt(e):"string"===t?new qt(e):"number"===t||"integer"===t?new Dt(e):"boolean"===t?new Rt(e):"null"===t?new Ut(e):void 0}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach((t=>{const s=this.instances[t];e=[...e,...s.getErrors()]})),e}showValidationErrors(e=null){if(!this.options.container)return!1;const t=e||this.getErrors();Object.keys(this.instances).forEach((e=>{this.instances[e].ui.showValidationErrors(t,!0)}))}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach((e=>{delete this[e]}))}}class Es{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const t=document.createElement("legend"),s=document.createElement("span");return t.classList.add("jedi-editor-legend"),s.classList.add("jedi-editor-legend-text"),t.setAttribute("aria-labelledby","#legend-"+e.id),s.textContent=e.textContent,s.setAttribute("id","#legend-"+e.id),t.appendChild(s),t}getLabel(e){const t=document.createElement("label");t.setAttribute("for",e.for);const s=this.getIcon(e.labelIconClass),i=document.createElement("span");return i.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(t),t.classList.add("jedi-title"),t.appendChild(s),t.appendChild(i),{label:t,labelText:i,icon:s}}getIcon(e=""){const t=document.createElement("i");let s=e.split(" ");return s=s.filter((e=>e.length>0)),s&&s.forEach((e=>{t.classList.add(e)})),t}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const t=document.createElement("div");return t.classList.add("jedi-messages-slot"),t.setAttribute("aria-atomic","false"),t.setAttribute("aria-live","polite"),e.id&&t.setAttribute("id",e.id),t}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const t=this.getButton(e);return t.classList.add("jedi-properties-toggle"),t.addEventListener("click",(()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()})),t}getCollapse(e){const t=document.createElement("div");return t.classList.add("jedi-collapse"),t.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(t.style.display="none"),t}getCollapseToggle(e){const t=this.getButton(e);t.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&t.addEventListener("click",(()=>{"none"===e.collapse.style.display?e.collapse.style.display="block":e.collapse.style.display="none"}));let s=e.startCollapsed;return t.style.transition="transform 0.1s ease",s&&(t.style.transform="rotate(90deg)"),t.addEventListener("click",(()=>{t.style.transform=s?"rotate(0deg)":"rotate(90deg)",s=!s})),t}getPropertiesSlot(e){const t=document.createElement("dialog");return t.classList.add("jedi-properties-slot"),t.setAttribute("id",e.id),window.addEventListener("click",(e=>{e.target===t&&t.close()})),t}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const t=document.createElement("p");return t.classList.add("jedi-aria-live-message"),t.textContent=e,this.visuallyHidden(t),t}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const t=document.createElement("button");t.classList.add("jedi-btn"),t.setAttribute("type","button"),e.value&&(t.value=e.value),e.id&&t.setAttribute("id",e.id);const s=document.createElement("span");if(s.textContent=e.textContent,this.icons&&e.icon){const i=this.getIcon(this.icons[e.icon]);i.setAttribute("title",e.textContent),t.appendChild(i),this.visuallyHidden(s)}return t.appendChild(s),t}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const t=document.createElement("small");return t.classList.add("jedi-description"),e.textContent&&(t.textContent=e.textContent),e.id&&t.setAttribute("id",e.id),t}getPlaceholderControl(e){const t=document.createElement("div"),s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c});return t.appendChild(a),t.appendChild(s),t.appendChild(l),t.appendChild(d),t.appendChild(i),i.appendChild(n),{container:t,placeholder:s,label:a,labelText:r,description:l,messages:d,actions:i,arrayActions:n}}getObjectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getPropertiesAriaLive(),r=this.getDescription({textContent:e.description}),o=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getPropertiesSlot({id:"properties-slot-"+e.id}),d=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:c}),h="collapse-"+e.id,p=this.getCollapse({id:h,startCollapsed:e.startCollapsed}),u=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:h,collapse:p,startCollapsed:e.startCollapsed}),m=this.getPropertiesActivators(),g=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),f=this.getAddPropertyButton(),b=this.getFieldset(),v=this.getLegend({textContent:e.title,id:e.id});return f.classList.add("jedi-object-add"),t.appendChild(b),t.appendChild(c),b.appendChild(v),b.appendChild(p),p.appendChild(n),n.appendChild(r),n.appendChild(o),v.appendChild(s),s.appendChild(i),n.appendChild(l),e.addProperty&&(c.appendChild(g.container),c.appendChild(f),c.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(s.appendChild(d),c.appendChild(a),c.appendChild(m)),e.enableCollapseToggle&&s.appendChild(u),{container:t,collapse:p,collapseToggle:u,body:n,actions:s,messages:o,childrenSlot:l,propertiesToggle:d,propertiesContainer:c,addPropertyControl:g,addPropertyBtn:f,ariaLive:a,propertiesActivators:m,arrayActions:i}}getArrayControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getDescription({textContent:e.description}),r=this.getMessagesSlot(),o=this.getChildrenSlot(),l=this.getBtnGroup(),c=this.getArrayBtnAdd(),d=this.getFieldset(),h=this.getLegend({textContent:e.title,id:e.id}),p="collapse-"+e.id,u=this.getCollapse({id:p,startCollapsed:e.startCollapsed}),m=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:p,collapse:u,startCollapsed:e.startCollapsed});return t.appendChild(d),d.appendChild(h),d.appendChild(u),u.appendChild(n),n.appendChild(a),n.appendChild(r),h.appendChild(s),s.appendChild(l),l.appendChild(c),s.appendChild(i),n.appendChild(o),e.enableCollapseToggle&&s.appendChild(m),{container:t,collapseToggle:m,collapse:u,body:n,actions:s,messages:r,childrenSlot:o,btnGroup:l,addBtn:c,arrayActions:i}}getArrayItem(){const e=document.createElement("div"),t=this.getCard(),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardHeader(),a=this.getCardBody();return e.appendChild(t),t.appendChild(n),t.appendChild(a),n.appendChild(s),s.appendChild(i),{container:e,card:t,header:n,body:a,actions:s,arrayActions:i}}getMultipleControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),t.appendChild(o),t.appendChild(s),s.appendChild(a),s.appendChild(r),a.appendChild(i),e.switcher&&i.appendChild(d.container),i.appendChild(n),r.appendChild(l),r.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getIfThenElseControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),e.switcher&&t.appendChild(d.container),r.appendChild(o),t.appendChild(l),t.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getNullControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),{label:n,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),r=e.id+"-description",o=this.getDescription({textContent:e.description,id:r}),l=this.getMessagesSlot(),c=document.createElement("br");return t.appendChild(n),t.appendChild(c),t.appendChild(o),t.appendChild(l),t.appendChild(s),s.appendChild(i),{container:t,label:n,labelText:a,description:o,messages:l,actions:s,arrayActions:i}}getTextareaControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("textarea");n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getInputControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("input");n.setAttribute("type",e.type),n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getRadiosControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","radio"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),n.appendChild(d),n.appendChild(l),{container:t,fieldset:n,legend:r,body:a,radios:p,labels:u,labelTexts:m,radioControls:h,description:d,messages:l,actions:s,arrayActions:i}}getCheckboxControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("div"),a=document.createElement("input");a.setAttribute("type","checkbox"),a.setAttribute("id",e.id);const{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",h=this.getMessagesSlot({id:d}),p=d+" "+l;return a.setAttribute("aria-describedby",p),t.appendChild(n),t.appendChild(s),s.appendChild(i),n.appendChild(a),n.appendChild(r),n.appendChild(c),n.appendChild(h),{container:t,formGroup:n,input:a,label:r,labelText:o,description:c,messages:h,actions:s,arrayActions:i}}getCheckboxesControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","checkbox"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),a.appendChild(d),a.appendChild(l),{container:t,fieldset:n,legend:r,body:a,checkboxes:p,labels:u,labelTexts:m,checkboxControls:h,description:d,messages:l,actions:s,arrayActions:i}}getSelectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("select");n.setAttribute("id",e.id),e.values.forEach(((t,s)=>{const i=document.createElement("option");i.setAttribute("value",t),e.titles&&e.titles[s]&&(i.textContent=e.titles[s]),n.appendChild(i)}));const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getSwitcher(e){const t=document.createElement("span"),s=document.createElement("select");s.setAttribute("id",e.id),e.values.forEach(((t,i)=>{const n=document.createElement("option");n.setAttribute("value",t),e.titles&&e.titles[i]&&(n.textContent=e.titles[i]),s.appendChild(n)}));const{label:i,labelText:n}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return t.appendChild(i),t.appendChild(s),{container:t,input:s,label:i,labelText:n}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return s.textContent=e.message,i.textContent="⚠ ",i.classList.add("jedi-error-message"),i.setAttribute("aria-hidden","true"),t.classList.add("jedi-error-message"),t.appendChild(i),t.appendChild(s),t}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,t,s){const i=document.createElement("div");return i.classList.add("jedi-col-xs-"+e),i.classList.add("jedi-col-md-"+t),s&&i.classList.add("jedi-col-md-offset-"+s),i}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const t=document.createElement("li"),s=document.createElement("a");return s.classList.add("jedi-nav-link"),s.setAttribute("href","#"+e.id),s.textContent=e.hasErrors?"⚠ "+e.title:e.title,t.appendChild(s),{list:t,link:s}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,t,s){e.setAttribute("id",s),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}const xs={Schema:me,Utils:w,EditorBoolean:Zt,EditorBooleanEnumRadio:Qt,EditorBooleanEnumSelect:Wt,EditorBooleanCheckbox:Xt,EditorString:_t,EditorStringEnumRadio:Yt,EditorStringEnumSelect:es,EditorStringTextarea:ts,EditorStringAwesomplete:ss,EditorStringInput:is,EditorNumber:ns,EditorNumberEnumRadio:as,EditorNumberEnumSelect:rs,EditorNumberInput:os,EditorObjectGrid:cs,EditorObjectNav:ds,EditorObject:ls,EditorArrayNav:ps,EditorArray:hs,EditorMultiple:us,EditorIfThenElse:Vt,EditorNull:ms,Theme:Es,ThemeBootstrap3:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("in"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h5"),t.classList.add("panel-heading"),t.classList.add("pull-left"),t.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.setAttribute("style","margin-right: 5px;"),t}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("panel-heading"),t.classList.add("text-right"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-xs"),t.classList.add("btn-default"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{body:s,radios:i,labels:n,labelTexts:a,radioControls:r,description:o,messages:l}=t;return r.forEach(((e,t)=>{e.classList.add("radio"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),s.appendChild(o),s.appendChild(l),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{body:s,checkboxes:i,labels:n,labelTexts:a,checkboxControls:r}=t;return r.forEach(((e,t)=>{e.classList.add("checkbox"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,labelText:r,description:o,messages:l}=t;return i.classList.add("checkbox"),s.appendChild(i),i.appendChild(a),a.appendChild(n),a.appendChild(r),i.appendChild(o),i.appendChild(l),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow();return i.classList.add("col-xs-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("col-md-offset-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("nav-stacked"),!1===e.stacked&&t.classList.remove("nav-stacked"),t}getTab(e){const t=super.getTab(e);return e.active&&t.list.classList.add("active"),t.link.setAttribute("data-toggle","tab"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap4:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("float-left"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("mr-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("form-group"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("form-group"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return i.classList.add("form-group"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("form-group"),i.classList.add("form-control"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("form-text"),t.classList.add("d-block"),t}getColumnClass(e,t){return"col-"+e+"-"+t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList();return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap5:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-bs-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("me-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("mb-3"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("mb-3"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return s.classList.add("mb-3"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(a),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("mb-3"),i.classList.add("form-select"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("d-block"),t.classList.add("form-text"),t.classList.add("form-text"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-bs-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}},RefParser:class{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);!1===this.refsResolved();)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every((e=>null!==e))}async collectRefs(e,t="#"){if("object"==typeof e&&null!==e)for(const[s,i]of Object.entries(e)){const n=t?`${t}/${s}`:`/${s}`;if(this.hasRef(e)){const t=e.$ref;if(this.isExternalRef(t)){const e=await this.load(t);this.refs[t]=e,await this.collectRefs(e,n)}else this.refs[t]=this.data[t]??null}this.data[t]=e,await this.collectRefs(i,n)}}hasRef(e){return void 0!==e.$ref&&"string"==typeof e.$ref}isExternalRef(e){return"string"==typeof e&&(e.startsWith("http")||e.startsWith("https"))}isObject(e){return null!==e&&"object"==typeof e}expand(e){const t=JSON.parse(JSON.stringify(e));if(this.isObject(t)&&this.hasRef(t)){const e=t.$ref;return delete t.$ref,this.expand(C({},this.refs[e],t))}return t}async load(e){try{const t=await fetch(e);if(!t.ok)throw new Error("Network response was not ok");return await t.json()}catch(t){throw console.error("Error loading",e,t),t}}},Create:Ls};module.exports=xs; +"use strict";function e(){const e=[];return function(t,s){if("object"!=typeof s||null===s)return s;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(s)?"[Circular]":(e.push(s),s)}}function t(t){if(void 0!==t)return JSON.parse(JSON.stringify(t,e()))}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i(e,t,i){return e.replace(new RegExp(s(t),"g"),i)}function n(e){return i(i(e,"#","root"),"/","-")}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){return Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{})}function o(e,t){return b(e)&&b(t)&&(e=r(e),t=r(t)),JSON.stringify(e)===JSON.stringify(t)}function l(e,t){return!o(e,t)}function c(e){return null===e}function d(e){return void 0!==e}function h(e){return void 0===e}function p(e){return"number"==typeof e}function u(e){return p(e)&&e===Math.floor(e)}function m(e){return"string"==typeof e}function g(e){return"boolean"==typeof e}function f(e){return Array.isArray(e)}function b(e){return!c(e)&&!f(e)&&"object"==typeof e}function v(e){let t="any";return p(e)?t=u(e)?"integer":"number":m(e)?t="string":g(e)?t="boolean":f(e)?t="array":c(e)?t="null":b(e)&&(t="object"),t}function C(e,...t){if(!t.length)return e;const s=t.shift();return b(e)&&b(s)&&Object.keys(s).forEach((t=>{b(s[t])?(e[t]||Object.assign(e,{[t]:{}}),C(e[t],s[t])):Object.assign(e,{[t]:s[t]})})),C(e,...t)}const y=(e,t)=>(Object.keys(t).forEach((s=>{s in e&&typeof e[s]==typeof t[s]&&(b(e[s])&&b(t[s])?y(e[s],t[s]):e[s]=t[s])})),e);function L(e,t){const s=t.split(".");let i=e;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const e=parseInt(n);if(!(e>=0&&e{const s=(e=e.replace(/\s/g,"")).split(/{{|}}/)[1];return L(t,s)}))}function x(e,t,s){return Math.max(t,Math.min(e,s))}function I(e){const t=[],s=new Set;for(const i of e){const e=JSON.stringify(i);s.has(e)||(s.add(e),t.push(i))}return t}const w={getCircularReplacer:e,clone:t,escapeRegExp:s,replaceAll:i,pathToAttribute:n,hasOwn:a,sortObject:r,equal:o,different:l,isNull:c,isSet:d,notSet:h,isNumber:p,isInteger:u,isString:m,isBoolean:g,isArray:f,isObject:b,getType:v,mergeDeep:C,overwriteExistingProperties:y,getValueByJSONPath:L,compileTemplate:E,clamp:x,removeDuplicatesFromArray:I};function A(e){return b(e.additionalProperties)||g(e.additionalProperties)?e.additionalProperties:void 0}function S(e){return b(e.propertyNames)||g(e.propertyNames)?e.propertyNames:void 0}function j(e){return f(e.allOf)?e.allOf:void 0}function k(e){return f(e.anyOf)?e.anyOf:void 0}function O(e){return e.const}function P(e){return b(e.contains)||g(e.contains)?e.contains:void 0}function T(e){return e.default}function V(e){return b(e.dependentRequired)?e.dependentRequired:void 0}function H(e){return b(e.dependentSchemas)?e.dependentSchemas:void 0}function M(e){return m(e.description)?e.description:void 0}function R(e){return b(e.else)||g(e.else)?e.else:void 0}function B(e){if(f(e.enum)&&e.enum.length>0)return e.enum}function N(e){return p(e.exclusiveMaximum)?e.exclusiveMaximum:void 0}function q(e){return p(e.exclusiveMinimum)?e.exclusiveMinimum:void 0}function D(e){return m(e.format)?e.format:void 0}function U(e){return b(e.if)||g(e.if)?e.if:void 0}function F(e){return b(e.items)||g(e.items)?e.items:void 0}function K(e){return p(e.maximum)?e.maximum:void 0}function $(e){if(u(e.maxContains)&&e.maxContains>=0)return e.maxContains}function z(e){if(u(e.maxItems)&&e.maxItems>=0)return e.maxItems}function J(e){if(u(e.maxLength)&&e.maxLength>=0)return e.maxLength}function G(e){if(u(e.maxProperties))return e.maxProperties}function Z(e){return p(e.minimum)?e.minimum:void 0}function W(e){if(u(e.minContains)&&e.minContains>=0)return e.minContains}function Q(e){if(u(e.minItems)&&e.minItems>=0)return e.minItems}function X(e){if(u(e.minLength)&&e.minLength>=0)return e.minLength}function _(e){if(u(e.minProperties)&&e.minProperties>=0)return e.minProperties}function Y(e){if(p(e.multipleOf)&&e.multipleOf>=0)return e.multipleOf}function ee(e){return b(e.not)||g(e.not)?e.not:void 0}function te(e,t){return e["x-options"]&&d(e["x-options"][t])?e["x-options"][t]:void 0}function se(e){return m(e.pattern)?e.pattern:void 0}function ie(e){return b(e.patternProperties)?e.patternProperties:void 0}function ne(e){return f(e.prefixItems)?e.prefixItems:void 0}function ae(e){return b(e.properties)?e.properties:void 0}function re(e){return g(e.readOnly)?e.readOnly:void 0}function oe(e){return f(e.required)?[...new Set(e.required)]:void 0}function le(e){return b(e.then)||g(e.then)?e.then:void 0}function ce(e){return m(e.title)?e.title:void 0}function de(e){if(m(e.type)||f(e.type))return e.type}function he(e){return f(e.oneOf)?e.oneOf:void 0}function pe(e){return g(e.unevaluatedProperties)?e.unevaluatedProperties:void 0}function ue(e){return g(e.uniqueItems)?e.uniqueItems:void 0}const me={getSchemaX:function(e,t){return e["x-"+t]},getSchemaSchema:function(e){return m(e.$schema)?e.$schema:void 0},getSchemaAdditionalProperties:A,getSchemaPropertyNames:S,getSchemaAllOf:j,getSchemaAnyOf:k,getSchemaConst:O,getSchemaContains:P,getSchemaDefault:T,getSchemaDependentRequired:V,getSchemaDependentSchemas:H,getSchemaDescription:M,getSchemaElse:R,getSchemaEnum:B,getSchemaExclusiveMaximum:N,getSchemaExclusiveMinimum:q,getSchemaFormat:D,getSchemaIf:U,getSchemaItems:F,getSchemaMaximum:K,getSchemaMaxContains:$,getSchemaMaxItems:z,getSchemaMaxLength:J,getSchemaMaxProperties:G,getSchemaMinimum:Z,getSchemaMinContains:W,getSchemaMinItems:Q,getSchemaMinLength:X,getSchemaMinProperties:_,getSchemaMultipleOf:Y,getSchemaNot:ee,getSchemaXOption:te,getSchemaPattern:se,getSchemaPatternProperties:ie,getSchemaPrefixItems:ne,getSchemaProperties:ae,getSchemaReadOnly:re,getSchemaRequired:oe,getSchemaThen:le,getSchemaTitle:ce,getSchemaType:de,getSchemaOneOf:he,getSchemaUnevaluatedProperties:pe,getSchemaUniqueItems:ue};function ge(e,t,s,i,n){let a=[];const r=j(s);return d(r)&&(r.forEach((s=>{const r=new Ls({refParser:e.refParser,schema:s,data:t,rootName:i}),o=r.getErrors();r.destroy(),o.forEach((e=>{e.path=n})),a.push(...o)})),a=I(a)),a}const fe='Has additional property "{{ property }}" but no additional properties are allowed.',be="Must validate against at least one of the provided schemas.",ve="Must have value of: {{ const }}.",Ce="Must contain at least one item matching the provided schema.",ye="Must have the required properties: {{ dependentRequired }}.",Le="Must be one of the enumerated values: {{ enum }}.",Ee="Must be less than {{ exclusiveMaximum }}.",xe="Must be greater than {{ exclusiveMinimum }}.",Ie="Must be a valid {{ format }}.",we="Must have items that validate against the provided schema.",Ae="Must be at most {{ maximum }}.",Se="Must have at most {{ maxItems }} items.",je="Must be at most {{ maxLength }} characters long.",ke="Must have at most {{ maxProperties }} properties.",Oe="Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",Pe="Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",Te="Must be at least {{ minimum }}.",Ve="Must have at least {{ minItems }} items.",He="Must be at least {{ minLength }} characters long.",Me="Must have at least {{ minProperties }} properties.",Re="Must be multiple of {{ multipleOf }}.",Be="Must not validate against the provided schema.",Ne="Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",qe='Must match the pattern: "{{ pattern }}".',De="Item {{ index }} fails validation.",Ue='Property name "{{ propertyName }}" fails validation.',Fe="The following properties do not comply with their schemas: {{ properties }}",Ke="Must have the required properties: {{ required }}.",$e="Must be of type {{ type }}.",ze='Has invalid unevaluated property "{{ property }}"',Je="Must have unique items.";function Ge(e,t,s,i,n){const a=[],r=X(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&(s=!0)})),s||a.push({messages:[be],path:n,constrain:"anyOf"})}return a}function We(e,t,s,i,n){const a=[],r=B(s);if(d(r)){!r.some((e=>JSON.stringify(t)===JSON.stringify(e)))&&a.push({messages:[E(Le,{enum:JSON.stringify(r)})],path:n,constrain:"enum"})}return a}function Qe(e,t,s,i,n){const a=[],r=N(s);if(p(t)&&d(r)){t>=r&&a.push({messages:[E(Ee,{exclusiveMaximum:r})],path:n,constrain:"exclusiveMaximum"})}return a}function Xe(e,t,s,i,n){const a=[],r=q(s);if(p(t)&&d(r)){t<=r&&a.push({messages:[E(xe,{exclusiveMinimum:r})],path:n,constrain:"exclusiveMinimum"})}return a}function _e(e,t,s,i,n){const a=[],r=D(s);let o=e.validateFormat;if(te(s,"validateFormat")&&(o=s.options.validateFormat),d(r)&&m(t)&&o){let e;"email"===r&&(e=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),"url"===r&&(e=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),"uuid"===r&&(e=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i));d(e)&&!e.test(t)&&a.push({messages:[E(Ie,{format:r})],path:n,constrain:"format"})}return a}function Ye(e,t,s,i,n){const a=[],r=F(s),o=ne(s);if(f(t)&&d(r)){const e=d(o)?o.length:0;!1===r&&t.length>0&&t.length>e&&a.push({messages:[we],path:n,constrain:"items"})}return a}function et(e,t,s,i,n){const a=[],r=z(s);if(f(t)&&d(r)){t.length>r&&a.push({messages:[E(Se,{maxItems:r})],path:n,constrain:"maxItems"})}return a}function tt(e,t,s,i,n){const a=[],r=J(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length>r&&a.push({messages:[E(je,{maxLength:r})],path:n,constrain:"maxLength"})}return a}function st(e,t,s,i,n){const a=[],r=G(s);if(b(t)&&d(r)){Object.keys(t).length>r&&a.push({messages:[E(ke,{maxProperties:r})],path:n,constrain:"maxProperties"})}return a}function it(e,t,s,i,n){const a=[],r=Z(s);if(p(t)&&d(r)){t{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&s++})),1!==s&&a.push({messages:[E(Ne,{counter:s})],path:n,constrain:"oneOf"})}return a}function ct(e,t,s,i,n){const a=[],r=se(s);if(m(t)&&d(r)){!new RegExp(r).test(t)&&a.push({messages:[E(qe,{pattern:r})],path:n,constrain:"pattern"})}return a}function dt(e,t,s,i){let n=[];const a=ie(s);return b(t)&&d(a)&&Object.keys(t).forEach((s=>{Object.keys(a).forEach((r=>{if(new RegExp(r).test(s)){const o=a[r],l=new Ls({refParser:e.refParser,schema:o,data:t[s]}),c=l.getErrors().map((e=>({messages:e.messages,path:i+"/"+s,constrain:"patternProperties"})));n=[...n,...c],l.destroy()}}))})),n}function ht(e,t,s,i){const n=ae(s),r=[];return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(a(t,s)){const i=n[s],a=new Ls({refParser:e.refParser,schema:i,data:t[s]});a.getErrors().length>0&&r.push(s),a.destroy()}})),r.length>0?[{messages:[E(Fe,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function pt(e,t,s,i,n){const a=[],r=oe(s);if(b(t)&&d(r)){const e=[],s=Object.keys(t);r.forEach((t=>{s.includes(t)||e.push(t)}));e.length>0&&a.push({messages:[E(Ke,{required:e.join(", ")})],path:n,constrain:"required"})}return a}function ut(e,t,s,i,n){const a=[],r=de(s);if("any"===r)return a;if(d(r)){const e={string:e=>m(e),number:e=>p(e),integer:e=>u(e),boolean:e=>g(e),array:e=>f(e),object:e=>b(e),null:e=>c(e)};let s=!0;s=f(r)?r.some((s=>e[s](t))):e[r](t),s||a.push({messages:[E($e,{type:r,valueType:v(t)})],path:n,constrain:"type"})}return a}function mt(e,t,s,i,n){const a=[],r=K(s);if(p(t)&&d(r)){t>r&&a.push({messages:[E(Ae,{maximum:r})],path:n,constrain:"maximum"})}return a}function gt(e,t,s,i,n){const a=[],o=ue(s);if(f(t)&&d(o)&&!0===o){const e=[];let s=!1;for(let i=0;ie===a)),s)break;e.push(a)}s&&a.push({messages:[Je],path:n,constrain:"uniqueItems"})}return a}function ft(e,t,s,i,n){const r=[],o=A(s),l=ie(s),c=ae(s);if(b(t)&&d(o)){const s=c||{},i=o,d=l||{};Object.keys(t).forEach((o=>{const l=Object.keys(d).some((e=>new RegExp(e).test(o))),c=a(s,o);if(!l&&!c)if(!1===i)r.push({messages:[E(fe,{property:o})],path:n,constrain:"additionalProperties"});else if(b(i)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),a=s.getErrors().map((e=>({messages:e.messages,path:`${n}.${o}`,constrain:"additionalProperties"})));r.push(...a),s.destroy()}}))}return r}const bt={additionalProperties:ft,allOf:ge,anyOf:Ze,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,required:pt,type:ut,uniqueItems:gt};function vt(e,t,s,i,n){const a=[],r=O(s);if(d(r)){l(t,r)&&a.push({messages:[E(ve,{const:JSON.stringify(r)})],path:n,constrain:"const"})}return a}function Ct(e,t,s,i,n){const a=[],r=P(s),o=W(s),l=$(s);if(f(t)&&d(r)){let s=0;t.forEach((t=>{const i=new Ls({refParser:e.refParser,schema:r,data:t});0===i.getErrors().length&&s++,i.destroy()}));const i=0===s;if(d(o)){sl&&a.push({messages:[E(Oe,{counter:s,maxContains:l})],path:n,constrain:"maxContains"})}}return a}function yt(e,t,s,i,n){const r=[],o=V(s);if(b(t)&&d(o)){let e=[];Object.keys(o).forEach((s=>{if(d(t[s])){const i=o[s];e=i.filter((e=>!a(t,e)))}}));e.length>0&&r.push({messages:[E(ye,{dependentRequired:e.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function Lt(e,t,s){let i=[];const n=H(s);return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(d(t[s])){const a=n[s],r=new Ls({refParser:e.refParser,schema:a,data:t}),o=r.getErrors();r.destroy(),i=[...i,...o]}})),i}function Et(e,t,s){const i=[],n=U(s),a=le(s),r=R(s);if(d(n)){if(h(a)&&h(r))return i;const s=new Ls({refParser:e.refParser,schema:n,data:t}),o=s.getErrors();s.destroy();let l=[],c=[];if(d(a)){const s=new Ls({refParser:e.refParser,schema:a,data:t});l=s.getErrors(),s.destroy()}if(d(r)){const s=new Ls({refParser:e.refParser,schema:r,data:t});c=s.getErrors(),s.destroy()}if(!0===n)return l;if(!1===n)return c;if(0===o.length)return l;if(o.length>0)return c}return i}function xt(e,t,s,i,n){const a=[],r=ne(s);return f(t)&&d(r)&&r.forEach(((s,i)=>{const r=t[i];if(d(r)){const t=new Ls({refParser:e.refParser,schema:s,data:r}),o=t.getErrors();t.destroy(),o.length>0&&a.push({messages:[E(De,{index:i})],path:n,constrain:"prefixItems"})}})),a}const It={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt},wt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt};function At(e,t,s,i,n){let r=[];const o=pe(s),l=ie(s),c=ae(s),h=j(s),p=k(s),u=he(s);if(b(t)&&d(o)){let s=d(c)?c:{};const i=o,m=l;[h,p,u].forEach((e=>{d(e)&&e.forEach((e=>{d(e.properties)&&(s={...s,...e.properties})}))})),s&&Object.keys(t).forEach((o=>{let l=!1;if(d(m)&&Object.keys(m).forEach((e=>{const t=new RegExp(e);l=t.test(o)})),l||!1!==i||a(s,o)||r.push({messages:[E(ze,{property:o})],path:n,constrain:"unevaluatedProperties"}),!l&&b(i)&&!a(s,o)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),n=s.getErrors().map((e=>({messages:e.messages,path:o,constrain:"unevaluatedProperties"})));r=[...r,...n],s.destroy()}}))}return r}const St={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,propertie:ht,prefixItems:xt,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};const jt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,prefixItems:xt,propertyNames:function(e,t,s,i,n){const a=[],r=S(s);return b(t)&&d(r)&&Object.keys(t).forEach((t=>{new Ls({refParser:e.refParser,schema:r,data:t}).getErrors().length>0&&a.push({messages:[E(Ue,{propertyName:t})],path:n,constrain:"propertyNames"})})),a},properties:ht,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};class kt{constructor(e={}){this.refParser=e.refParser,this.validateFormat=!!e.validateFormat&&e.validateFormat,this.draft=jt,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":bt,"http://json-schema.org/draft-06/schema#":It,"http://json-schema.org/draft-07/schema#":wt,"https://json-schema.org/draft/2019-09/schema":St,"https://json-schema.org/draft/2020-12/schema":jt}}getErrors(e,s,i,n){let r=[];const o=te(s,"messages"),l=t(s);return g(l)&&!0===l?r:g(l)&&!1===l?[{messages:d(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach((t=>{if(a(l,t)){const a=(0,this.draft[t])(this,e,s,i,n);a&&(r=[...r,...a])}})),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Ot{constructor(){this.listeners=[]}on(e,t){this.listeners.push({name:e,callback:t})}off(e){this.listeners=this.listeners.filter((t=>t.name!==e))}emit(e,t=void 0){this.listeners.filter((t=>t.name===e)).forEach((e=>{e.callback(t)}))}destroy(){Object.keys(this).forEach((e=>{delete this[e]}))}}class Pt extends Ot{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=d(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",(()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())}))}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=t=>{this.jedi.register(t),t.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(h(this.value)){let e;const t=de(this.schema);"boolean"===t&&(e=!1),"number"===t&&(e=0),"integer"===t&&(e=0),"string"===t&&(e=""),"array"===t&&(e=[]),"object"===t&&(e={}),"null"===t&&(e=null),this.value=e}}setDefaultValue(){const e=T(this.schema);d(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,t=!0){const s=this.jedi.options.enforceConst||te(this.schema,"enforceConst");if(d(s)&&o(s,!0)){const t=O(this.schema);d(t)&&(e=t)}this.value=e,this.emit("set-value",e),t&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];return I(this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path))}prepare(){}activate(){!1===this.isActive&&(this.isActive=!0,this.emit("change"))}deactivate(){!0===this.isActive&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return!0===re(this.schema)&&(e=!0),this.parent&&!0===re(this.parent.schema)&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach((e=>{e.destroy()})),this.ui&&this.ui.destroy(),Object.keys(this).forEach((e=>{delete this[e]})),super.destroy()}}class Tt{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI();("always"===this.instance.jedi.options.showErrors||"always"===te(this.instance.schema,"showErrors"))&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})),this.instance.on("change",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}))}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",de(this.instance.schema))}build(){}enforceEnumDefault(){const e=te(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,t=B(this.instance.schema);d(t)&&!t.includes(this.instance.getValue())&&d(t[0])&&e&&this.instance.setValue(t[0],!1)}addEventListeners(){}showValidationErrors(e,t=!1){e=e.filter((e=>e.path===this.instance.path)),this.control.messages.innerHTML="",this.showingValidationErrors=!1;if(("never"===this.instance.jedi.options.showErrors||"never"===te(this.instance.schema,"showErrors"))&&!t||0===e.length)return;const s=ce(this.instance.schema)||this.instance.getKey();e.forEach((e=>{"properties"!==e.constraint&&e.messages.forEach((e=>{const t=this.getInvalidFeedback({message:s+": "+e});this.control.messages.appendChild(t)}))})),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach((e=>{this.disabled||this.readOnly?e.setAttribute("disabled",""):e.removeAttribute("disabled","")}))}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach((e=>{delete this[e]}))}}class Vt extends Tt{static resolves(e){return d(U(e))}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Ht extends Pt{setUI(){this.ui=new Vt(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.instanceWithoutIf=null,this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach((s=>{if(d(s.then)){this.schemas.push(C({},t(this.schema),s.then)),this.switcherOptionValues.push(e);const i="then";this.switcherOptionsLabels.push(i),e++}if(d(s.else)){this.schemas.push(C({},t(this.schema),s.else)),this.switcherOptionValues.push(e);const i="else";this.switcherOptionsLabels.push(i),e++}}));const s=t(this.schema);delete s.if,delete s.then,delete s.else,this.instanceWithoutIf=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent}),this.schemas.forEach((e=>{const t=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent});this.instanceStartingValues.push(t.getValue()),t.on("change",(()=>{const e=this.activeInstance.getValue();this.getFittestIndex(e)!==this.index?this.setValue(e):(this.value=this.activeInstance.getValue(),this.emit("change"))})),this.instances.push(t)})),this.on("set-value",(e=>{let t=this.instanceWithoutIf.getValue();b(t)&&b(e)&&(t=y(t,e)),this.instances.forEach(((s,i)=>{const n=this.instanceStartingValues[i];b(n)&&b(e)&&(e=y(n,t)),s.setValue(e,!1)}));const s=this.getFittestIndex(e);s!==this.index&&this.switchInstance(s)})),this.value=this.instanceWithoutIf.getValue();const i=this.getFittestIndex(this.value);this.switchInstance(i)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const t=U(e);if(d(t)){const s=le(e),i=R(e);this.ifThenElseShemas.push({if:t,then:d(s)?s:{}}),this.ifThenElseShemas.push({if:t,else:d(i)?i:{}})}}getFittestIndex(e){let t=this.index;return this.ifThenElseShemas.forEach(((s,i)=>{const n=new Ls({schema:s.if,data:e,refParser:this.jedi.refParser}),a=n.getErrors();n.destroy(),0===a.length&&s.then&&(t=i),a.length>0&&s.else&&(t=i)})),t}destroy(){this.instances.forEach((e=>{e.destroy()})),super.destroy()}getAllOfCombinations(e){const t=[],s=(e,i)=>{if(0===i.length)return void t.push(e);const n=i[0];var a,r;s((a=e,r=n,{...a,...r}),i.slice(1)),s(e,i.slice(1))};for(let i=0;iObject.keys(e).length-Object.keys(t).length)),t}}class Mt extends Pt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",(()=>{this.onSetValue()}));const e=de(this.schema);if(d(k(this.schema))||d(he(this.schema))){const e=d(k(this.schema))?k(this.schema):he(this.schema),s=t(this.schema);delete s.anyOf,delete s.oneOf,delete s.options,e.forEach(((e,t)=>{e={...s,...e},this.jedi.refParser&&(e=this.jedi.refParser.expand(e));let i="Option-"+(t+1);const n=te(e,"switcherTitle"),a=ce(e);d(a)&&(i=a),d(n)&&(i=n),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(i),this.schemas.push(e)}))}else if(f(e))e.forEach(((e,t)=>{const s=C(this.schema),i={...s,type:e,title:e[0].toUpperCase()+e.slice(1)};d(s.title)&&(i.title=s.title),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(e.charAt(0).toUpperCase()+e.slice(1)),this.schemas.push(i)}));else if("any"===e||!e){const e=t(this.schema);this.schemas=[{...e,type:"object"},{...e,type:"array"},{...e,type:"string"},{...e,type:"number"},{...e,type:"integer"},{...e,type:"boolean"},{...e,type:"null"}],this.schemas.forEach(((e,t)=>{this.switcherOptionValues.push(t)})),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach((e=>{const s=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent,value:t(this.value)});d(this.value)&&s.setValue(this.value,!1),s.unregister(),s.off("change"),s.on("change",(()=>{this.value=this.activeInstance.getValue(),this.emit("change")})),this.instances.push(s),this.register()}));const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,t){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],d(t)&&this.activeInstance.setValue(t,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(l(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let t,s,i=0;for(const n of this.instances){const a=this.jedi.validator.getErrors(e,n.schema,n.getKey(),n.path);(h(t)||h(s))&&(t=i,s=a),a.length{e.destroy()})),super.destroy()}}class Rt extends Pt{}class Bt extends Pt{prepare(){this.properties={};const e=ae(this.schema);d(e)&&Object.keys(e).forEach((t=>{const s=e[t];this.properties[t]={schema:s};let i=!0;const n=this.jedi.options.deactivateNonRequired,a=te(this.schema,"deactivateNonRequired"),r=te(s,"deactivateNonRequired");this.isNotRequired(t)&&d(n)&&!0===n&&(i=!1),this.isNotRequired(t)&&d(a)&&!0===a&&(i=!1),this.isNotRequired(t)&&d(r)&&!0===r&&(i=!1),i&&this.createChild(s,t)})),this.refreshInstances(),this.on("set-value",(()=>{this.refreshInstances()}))}isRequired(e){const t=oe(this.schema);return d(t)&&t.includes(e)}isDependentRequired(e){const t=V(this.schema);if(d(t)){let s=[];return Object.keys(t).forEach((e=>{if(d(this.value[e])){const i=t[e];s=i.filter((e=>!a(this.value,e)))}})),s.includes(e)}return!1}createChild(e,s,i,n=!1){const a=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:t(i)});this.children.push(a),this.value[s]=a.getValue();const r=this.jedi.options.deactivateNonRequired||te(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&d(r)&&!0===r&&!n&&a.deactivate(),a}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let t=this.children.length-1;t>=0;t--){const s=this.children[t];s.getKey()===e&&(s.destroy(),this.children.splice(t,1),this.onChildChange())}}getChild(e){return this.children.find((t=>e===t.getKey().split(this.jedi.pathSeparator).pop()))}getPropertySchema(e){let t;const s=A(this.schema),i=ae(this.schema),n=ie(this.schema);return d(i)&&a(i,e)?t=i[e]:d(n)&&Object.keys(n).forEach((s=>{new RegExp(s).test(e)&&(t=n[s])})),h(t)&&d(s)&&(t=s),h(t)&&(t={}),t}onChildChange(){const e={};this.children.forEach((t=>{t.isActive&&(e[t.getKey()]=t.getValue())})),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort(((e,t)=>{const s=te(e.schema,"propertyOrder"),i=te(t.schema,"propertyOrder"),n=p(s),a=p(i);return!n&&a?1:n&&!a||si?1:0}))}refreshInstances(){const e=this.getValue();if(b(e)){Object.keys(e).forEach((t=>{const s=this.getChild(t);if(s){s.activate();const t=s.getValue(),i=e[s.getKey()];l(t,i)&&s.setValue(i,!1)}else{const s=this.getPropertySchema(t);this.createChild(s,t,e[t],!0)}}));for(let t=this.children.length-1;t>=0;t--){const s=this.children[t],i=s.getKey();h(e[i])&&(this.getChild(i)?s.deactivate():this.deleteChild(i))}this.sortChildrenByPropertyOrder()}}}class Nt extends Pt{prepare(){this.refreshChildren(),this.on("set-value",(()=>{this.refreshChildren()}))}createItemInstance(e){let s;const i=this.children.length,n=F(this.schema),a=ne(this.schema);s=d(n)?n:{};d(a)&&d(a[i])&&(s=a[i]);const r=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:t(e)});return d(e)&&r.setValue(e,!1),r}move(e,s){const i=t(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=t(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const s=t(this.getValue()).filter(((t,s)=>s!==e));this.setValue(s)}onChildChange(){const e=[];this.children.forEach((t=>{e.push(t.getValue())})),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();f(e)&&e.forEach((e=>{const t=this.createItemInstance(e);this.children.push(t)}))}}class qt extends Pt{}class Dt extends Pt{}class Ut extends Pt{}const Ft={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Kt={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},$t={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},zt={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},Jt={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},Gt={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Zt extends Tt{sanitize(e){return Boolean(e)}}class Wt extends Zt{static resolves(e){return"boolean"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t="true"===e.value;this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{const t="true"===e.value;e.checked=t===this.instance.getValue()}))}}class Qt extends Zt{static resolves(e){return"boolean"===de(e)}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e="true"===this.control.input.value;this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=!0===this.instance.getValue()?"true":"false"}}class Xt extends Zt{static resolves(e){return"boolean"===de(e)&&"checkbox"===te(e,"format")}build(){this.control=this.theme.getCheckboxControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.checked)}))}sanitize(e){return Boolean(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class _t extends Tt{sanitize(e){return String(e)}}class Yt extends _t{static resolves(e){return"string"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{this.instance.setValue(e.value)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=e.value===this.instance.getValue()}))}}class es extends _t{static resolves(e){return"string"===de(e)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ts extends _t{static resolves(e){return"string"===de(e)&&"textarea"===te(e,"format")}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ss extends _t{static resolves(e){return window.Awesomplete&&"string"===de(e)&&d(te(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,te(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class is extends _t{static resolves(e){return"string"===de(e)}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=te(this.instance.schema,"format");this.control=this.theme.getInputControl({type:is.getTypes().includes(e)?e:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===e,description:M(this.instance.schema)}),"color"===e&&0===this.instance.value.length&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ns extends Tt{sanitize(e){return"integer"===de(this.instance.schema)?Math.floor(Number(e)):Number(e)}}class as extends ns{static resolves(e){const t=de(e),s=B(e),i=te(e,"format");return("number"===t||"integer"===t)&&d(s)&&"radio"===i}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t=this.sanitize(e.value);this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=Number(e.value)===Number(this.instance.getValue())}))}}class rs extends ns{static resolves(e){const t=de(e);return("number"===t||"integer"===t)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class os extends ns{static resolves(e){const t=de(e);return"number"===t||"integer"===t}build(){this.control=this.theme.getInputControl({type:"number",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class ls extends Tt{static resolves(e){return"object"===de(e)}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let t=!0;const s=A(this.instance.schema);d(s)&&!1===s&&(t=!1);let i=!1;d(this.instance.jedi.options.enablePropertiesToggle)&&(i=this.instance.jedi.options.enablePropertiesToggle),d(e.enablePropertiesToggle)&&(i=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enablePropertiesToggle:i,addProperty:t,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",(()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(0===e.length)return;if(d(this.instance.value[e]))return;const t=this.instance.getPropertySchema(e),s=this.instance.createChild(t,e);s.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const i=this.control.ariaLive;i.innerHTML="";const n=ce(s.schema),a=d(n)?n:e,r=this.theme.getAriaLiveMessage();r.textContent=a+" field was added to the form",i.appendChild(r),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}))}sanitize(e){return b(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=te(this.instance.schema,"enablePropertiesToggle");if(o(this.instance.jedi.options.enablePropertiesToggle,!0)||o(e,!0)){const e=this.instance.children.map((e=>e.getKey()));for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);e.forEach((e=>{const t=this.instance.isRequired(e),s=this.instance.isDependentRequired(e),i=!t&&!s,r=this.control.ariaLive,o=this.instance.getPropertySchema(e),l=ce(o),c=n(this.instance.path+this.instance.jedi.pathSeparator+e)+"-activator",h=d(l)?l:e;if(i){const t=this.theme.getCheckboxControl({id:c,label:h,titleHidden:!1}),s=t.input;this.propertyActivators[e]=s,s.addEventListener("change",(()=>{r.innerHTML="";const t=this.theme.getAriaLiveMessage();if(s.checked){this.instance.getChild(e)||this.instance.createChild(o,e),this.instance.getChild(e).activate(),t.textContent=h+" field was added to the form",r.appendChild(t)}else this.instance.getChild(e).deactivate(),t.textContent=h+" field was removed from the form",r.appendChild(t);this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})),this.control.propertiesActivators.appendChild(t.container)}const p=this.propertyActivators[e];p&&(p.disabled=this.disabled,p.checked=a(this.instance.getValue(),e))}))}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach((e=>{e.isActive?(null===e.ui.control.container.parentNode&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)}))}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class cs extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach((t=>{if(t.isActive){const s=te(t.schema,"grid"),i=(null==s?void 0:s.columns)||12,n=(null==s?void 0:s.offset)||0,a=this.theme.getCol(12,i,n);((null==s?void 0:s.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(a),a.appendChild(t.ui.control.container),this.disabled||this.instance.isReadOnly()?t.ui.disable():t.ui.enable()}}))}}class ds extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{if(e.isActive){const s=t===this.activeTabIndex,i=n(e.path),a=ce(e.schema),l=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:d(a)?a:e.getKey(),id:i,active:s});l.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,s,i),o.appendChild(l.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()}}))}}class hs extends Tt{static resolves(e){return"array"===de(e)}build(){this.control=this.theme.getArrayControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.instance.addItem()}))}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return f(e)?e:[]}isSortable(){return window.Sortable&&d(te(this.instance.schema,"sortable"))}refreshUI(){const e=z(this.instance.schema),t=Q(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach((e=>{const s=Number(e.getKey()),i=this.theme.getDeleteItemBtn(),n=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),r=this.theme.getBtnGroup(),{container:o,arrayActions:l,body:c}=this.theme.getArrayItem();if(l.appendChild(r),r.appendChild(i),r.appendChild(n),r.appendChild(a),this.isSortable()){const e=this.theme.getDragItemBtn();r.appendChild(e)}this.control.childrenSlot.appendChild(o),c.appendChild(e.ui.control.container),i.addEventListener("click",(()=>{const t=Number(e.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(t)})),n.addEventListener("click",(()=>{const e=s-1;this.instance.move(s,e)})),a.addEventListener("click",(()=>{const e=s+1;this.instance.move(s,e)})),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),d(t)&&this.instance.value.length<=t&&i.setAttribute("disabled","")})),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:e=>{this.instance.move(e.oldIndex,e.newIndex)}})),d(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ps extends hs{static resolves(e){return"array"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{const s=this.theme.getDeleteItemBtn(),i=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn();let l;e.ui.control.arrayActions.innerHTML="",e.ui.control.arrayActions.appendChild(s),e.ui.control.arrayActions.appendChild(i),e.ui.control.arrayActions.appendChild(a),this.control.childrenSlot.appendChild(e.ui.control.container);const c=te(this.instance.schema,"itemTemplate");if(c){l=E(c,{i0:t,i1:t+1,value:e.getValue()})}else{const s=ce(e.schema);l=d(s)?s+" "+(t+1):e.getKey()}s.addEventListener("click",(()=>{this.activeTabIndex=x(t-1,0,this.instance.value.length-1),this.instance.deleteItem(t)})),i.addEventListener("click",(()=>{const e=t-1;this.activeTabIndex=e,this.instance.move(t,e)})),a.addEventListener("click",(()=>{const e=t+1;this.activeTabIndex=e,this.instance.move(t,e)}));const h=t===this.activeTabIndex,p=n(e.path),u=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:l,id:p,active:h});u.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,h,p),o.appendChild(u.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),0===t&&i.setAttribute("disabled",""),this.instance.value.length-1===t&&a.setAttribute("disabled","")}))}}class us extends Tt{static resolves(e){const t=de(e),s=he(e);return d(k(e))||d(s)||"any"===t||f(t)||h(t)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class ms extends Tt{static resolves(e){return"null"===de(e)}build(){this.control=this.theme.getNullControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}sanitize(){return null}}class gs extends _t{static resolves(e){return window.Quill&&"string"===de(e)&&d(te(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,te(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",(()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class fs extends _t{static resolves(e){return window.Jodit&&"string"===de(e)&&d(te(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,te(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",(()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class bs extends _t{static resolves(e){return window.flatpickr&&"string"===de(e)&&d(te(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,te(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class vs extends ns{static resolves(e){return"undefined"!=typeof Raty&&"number"===de(e)&&d(te(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},te(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class Cs extends Tt{static resolves(e){const t=de(e),s=F(e),i=d(s)&&de(s),n=d(t)&&"array"===t,a=!0===ue(e),r=d(s)&&d(B(e.items)),o=d(s)&&d(i),l=["string","number","integer"],c=d(s)&&d(i)&&(l.includes(i)||f(i)&&i.some((e=>l.includes(e))));return n&&a&&r&&o&&c}build(){this.control=this.theme.getCheckboxesControl({values:B(this.instance.schema.items),titles:te(this.instance.schema.items,"enumTitles")||B(this.instance.schema.items),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach((e=>{e.addEventListener("change",(()=>{const t=this.instance.getValue();if(e.checked)t.push(e.value);else{const s=t.indexOf(e.value);s>-1&&t.splice(s,1)}this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach((t=>{t.checked=e.includes(t.value)}))}}class ys{constructor(e){this.customEditors=e.customEditors??[],this.editors=[us,Vt,Wt,Xt,Qt,Yt,es,ts,ss,gs,fs,bs,is,vs,as,rs,os,cs,ds,ls,Cs,ps,hs,ms]}getClass(e){for(const t of this.customEditors)if(t.resolves(e))return t;for(const t of this.editors)if(t.resolves(e))return t;return null}}class Ls extends Ot{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new ys({customEditors:this.options.customEditors}),this.theme=this.options.theme,d(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Ft;break;case"bootstrap-icons":this.theme.icons=Kt;break;case"fontawesome3":this.theme.icons=$t;break;case"fontawesome4":this.theme.icons=zt;break;case"fontawesome5":this.theme.icons=Jt;break;case"fontawesome6":this.theme.icons=Gt}this.schema=this.options.schema,this.validator=new kt({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),d(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",(()=>{this.emit("change")})),this.hiddenInput&&this.on("change",(()=>{this.hiddenInput.value=JSON.stringify(this.getValue())}))}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&b(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach((e=>{this.hiddenInput.setAttribute(e,this.options.hiddenInputAttributes[e])})),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||te(e.schema,"mergeAllOf")){const t=j(e.schema);d(t)&&t.forEach((t=>{e.schema=C({},e.schema,t)}))}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const t=de(e.schema),s=he(e.schema),i=k(e.schema),n=U(e.schema);return d(i)||d(s)||"any"===t||f(t)||h(t)?new Mt(e):d(n)?new Ht(e):"object"===t?new Bt(e):"array"===t?new Nt(e):"string"===t?new qt(e):"number"===t||"integer"===t?new Dt(e):"boolean"===t?new Rt(e):"null"===t?new Ut(e):void 0}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach((t=>{const s=this.instances[t];e=[...e,...s.getErrors()]})),e}showValidationErrors(e=null){if(!this.options.container)return!1;const t=e||this.getErrors();Object.keys(this.instances).forEach((e=>{this.instances[e].ui.showValidationErrors(t,!0)}))}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach((e=>{delete this[e]}))}}class Es{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const t=document.createElement("legend"),s=document.createElement("span");return t.classList.add("jedi-editor-legend"),s.classList.add("jedi-editor-legend-text"),t.setAttribute("aria-labelledby","#legend-"+e.id),s.textContent=e.textContent,s.setAttribute("id","#legend-"+e.id),t.appendChild(s),t}getLabel(e){const t=document.createElement("label");t.setAttribute("for",e.for);const s=this.getIcon(e.labelIconClass),i=document.createElement("span");return i.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(t),t.classList.add("jedi-title"),t.appendChild(s),t.appendChild(i),{label:t,labelText:i,icon:s}}getIcon(e=""){const t=document.createElement("i");let s=e.split(" ");return s=s.filter((e=>e.length>0)),s&&s.forEach((e=>{t.classList.add(e)})),t}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const t=document.createElement("div");return t.classList.add("jedi-messages-slot"),t.setAttribute("aria-atomic","false"),t.setAttribute("aria-live","polite"),e.id&&t.setAttribute("id",e.id),t}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const t=this.getButton(e);return t.classList.add("jedi-properties-toggle"),t.addEventListener("click",(()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()})),t}getCollapse(e){const t=document.createElement("div");return t.classList.add("jedi-collapse"),t.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(t.style.display="none"),t}getCollapseToggle(e){const t=this.getButton(e);t.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&t.addEventListener("click",(()=>{"none"===e.collapse.style.display?e.collapse.style.display="block":e.collapse.style.display="none"}));let s=e.startCollapsed;return t.style.transition="transform 0.1s ease",s&&(t.style.transform="rotate(90deg)"),t.addEventListener("click",(()=>{t.style.transform=s?"rotate(0deg)":"rotate(90deg)",s=!s})),t}getPropertiesSlot(e){const t=document.createElement("dialog");return t.classList.add("jedi-properties-slot"),t.setAttribute("id",e.id),window.addEventListener("click",(e=>{e.target===t&&t.close()})),t}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const t=document.createElement("p");return t.classList.add("jedi-aria-live-message"),t.textContent=e,this.visuallyHidden(t),t}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const t=document.createElement("button");t.classList.add("jedi-btn"),t.setAttribute("type","button"),e.value&&(t.value=e.value),e.id&&t.setAttribute("id",e.id);const s=document.createElement("span");if(s.textContent=e.textContent,this.icons&&e.icon){const i=this.getIcon(this.icons[e.icon]);i.setAttribute("title",e.textContent),t.appendChild(i),this.visuallyHidden(s)}return t.appendChild(s),t}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const t=document.createElement("small");return t.classList.add("jedi-description"),e.textContent&&(t.textContent=e.textContent),e.id&&t.setAttribute("id",e.id),t}getPlaceholderControl(e){const t=document.createElement("div"),s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c});return t.appendChild(a),t.appendChild(s),t.appendChild(l),t.appendChild(d),t.appendChild(i),i.appendChild(n),{container:t,placeholder:s,label:a,labelText:r,description:l,messages:d,actions:i,arrayActions:n}}getObjectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getPropertiesAriaLive(),r=this.getDescription({textContent:e.description}),o=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getPropertiesSlot({id:"properties-slot-"+e.id}),d=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:c}),h="collapse-"+e.id,p=this.getCollapse({id:h,startCollapsed:e.startCollapsed}),u=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:h,collapse:p,startCollapsed:e.startCollapsed}),m=this.getPropertiesActivators(),g=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),f=this.getAddPropertyButton(),b=this.getFieldset(),v=this.getLegend({textContent:e.title,id:e.id});return f.classList.add("jedi-object-add"),t.appendChild(b),t.appendChild(c),b.appendChild(v),b.appendChild(p),p.appendChild(n),n.appendChild(r),n.appendChild(o),v.appendChild(s),s.appendChild(i),n.appendChild(l),e.addProperty&&(c.appendChild(g.container),c.appendChild(f),c.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(s.appendChild(d),c.appendChild(a),c.appendChild(m)),e.enableCollapseToggle&&s.appendChild(u),{container:t,collapse:p,collapseToggle:u,body:n,actions:s,messages:o,childrenSlot:l,propertiesToggle:d,propertiesContainer:c,addPropertyControl:g,addPropertyBtn:f,ariaLive:a,propertiesActivators:m,arrayActions:i}}getArrayControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getDescription({textContent:e.description}),r=this.getMessagesSlot(),o=this.getChildrenSlot(),l=this.getBtnGroup(),c=this.getArrayBtnAdd(),d=this.getFieldset(),h=this.getLegend({textContent:e.title,id:e.id}),p="collapse-"+e.id,u=this.getCollapse({id:p,startCollapsed:e.startCollapsed}),m=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:p,collapse:u,startCollapsed:e.startCollapsed});return t.appendChild(d),d.appendChild(h),d.appendChild(u),u.appendChild(n),n.appendChild(a),n.appendChild(r),h.appendChild(s),s.appendChild(l),l.appendChild(c),s.appendChild(i),n.appendChild(o),e.enableCollapseToggle&&s.appendChild(m),{container:t,collapseToggle:m,collapse:u,body:n,actions:s,messages:r,childrenSlot:o,btnGroup:l,addBtn:c,arrayActions:i}}getArrayItem(){const e=document.createElement("div"),t=this.getCard(),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardHeader(),a=this.getCardBody();return e.appendChild(t),t.appendChild(n),t.appendChild(a),n.appendChild(s),s.appendChild(i),{container:e,card:t,header:n,body:a,actions:s,arrayActions:i}}getMultipleControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),t.appendChild(o),t.appendChild(s),s.appendChild(a),s.appendChild(r),a.appendChild(i),e.switcher&&i.appendChild(d.container),i.appendChild(n),r.appendChild(l),r.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getIfThenElseControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),e.switcher&&t.appendChild(d.container),r.appendChild(o),t.appendChild(l),t.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getNullControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),{label:n,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),r=e.id+"-description",o=this.getDescription({textContent:e.description,id:r}),l=this.getMessagesSlot(),c=document.createElement("br");return t.appendChild(n),t.appendChild(c),t.appendChild(o),t.appendChild(l),t.appendChild(s),s.appendChild(i),{container:t,label:n,labelText:a,description:o,messages:l,actions:s,arrayActions:i}}getTextareaControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("textarea");n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getInputControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("input");n.setAttribute("type",e.type),n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getRadiosControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","radio"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),n.appendChild(d),n.appendChild(l),{container:t,fieldset:n,legend:r,body:a,radios:p,labels:u,labelTexts:m,radioControls:h,description:d,messages:l,actions:s,arrayActions:i}}getCheckboxControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("div"),a=document.createElement("input");a.setAttribute("type","checkbox"),a.setAttribute("id",e.id);const{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",h=this.getMessagesSlot({id:d}),p=d+" "+l;return a.setAttribute("aria-describedby",p),t.appendChild(n),t.appendChild(s),s.appendChild(i),n.appendChild(a),n.appendChild(r),n.appendChild(c),n.appendChild(h),{container:t,formGroup:n,input:a,label:r,labelText:o,description:c,messages:h,actions:s,arrayActions:i}}getCheckboxesControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","checkbox"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),a.appendChild(d),a.appendChild(l),{container:t,fieldset:n,legend:r,body:a,checkboxes:p,labels:u,labelTexts:m,checkboxControls:h,description:d,messages:l,actions:s,arrayActions:i}}getSelectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("select");n.setAttribute("id",e.id),e.values.forEach(((t,s)=>{const i=document.createElement("option");i.setAttribute("value",t),e.titles&&e.titles[s]&&(i.textContent=e.titles[s]),n.appendChild(i)}));const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getSwitcher(e){const t=document.createElement("span"),s=document.createElement("select");s.setAttribute("id",e.id),e.values.forEach(((t,i)=>{const n=document.createElement("option");n.setAttribute("value",t),e.titles&&e.titles[i]&&(n.textContent=e.titles[i]),s.appendChild(n)}));const{label:i,labelText:n}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return t.appendChild(i),t.appendChild(s),{container:t,input:s,label:i,labelText:n}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return s.textContent=e.message,i.textContent="⚠ ",i.classList.add("jedi-error-message"),i.setAttribute("aria-hidden","true"),t.classList.add("jedi-error-message"),t.appendChild(i),t.appendChild(s),t}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,t,s){const i=document.createElement("div");return i.classList.add("jedi-col-xs-"+e),i.classList.add("jedi-col-md-"+t),s&&i.classList.add("jedi-col-md-offset-"+s),i}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const t=document.createElement("li"),s=document.createElement("a");return s.classList.add("jedi-nav-link"),s.setAttribute("href","#"+e.id),s.textContent=e.hasErrors?"⚠ "+e.title:e.title,t.appendChild(s),{list:t,link:s}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,t,s){e.setAttribute("id",s),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}const xs={Schema:me,Utils:w,EditorBoolean:Zt,EditorBooleanEnumRadio:Wt,EditorBooleanEnumSelect:Qt,EditorBooleanCheckbox:Xt,EditorString:_t,EditorStringEnumRadio:Yt,EditorStringEnumSelect:es,EditorStringTextarea:ts,EditorStringAwesomplete:ss,EditorStringInput:is,EditorNumber:ns,EditorNumberEnumRadio:as,EditorNumberEnumSelect:rs,EditorNumberInput:os,EditorObjectGrid:cs,EditorObjectNav:ds,EditorObject:ls,EditorArrayNav:ps,EditorArray:hs,EditorMultiple:us,EditorIfThenElse:Vt,EditorNull:ms,Theme:Es,ThemeBootstrap3:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("in"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h5"),t.classList.add("panel-heading"),t.classList.add("pull-left"),t.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.setAttribute("style","margin-right: 5px;"),t}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("panel-heading"),t.classList.add("text-right"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-xs"),t.classList.add("btn-default"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{body:s,radios:i,labels:n,labelTexts:a,radioControls:r,description:o,messages:l}=t;return r.forEach(((e,t)=>{e.classList.add("radio"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),s.appendChild(o),s.appendChild(l),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{body:s,checkboxes:i,labels:n,labelTexts:a,checkboxControls:r}=t;return r.forEach(((e,t)=>{e.classList.add("checkbox"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,labelText:r,description:o,messages:l}=t;return i.classList.add("checkbox"),s.appendChild(i),i.appendChild(a),a.appendChild(n),a.appendChild(r),i.appendChild(o),i.appendChild(l),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow();return i.classList.add("col-xs-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("col-md-offset-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("nav-stacked"),!1===e.stacked&&t.classList.remove("nav-stacked"),t}getTab(e){const t=super.getTab(e);return e.active&&t.list.classList.add("active"),t.link.setAttribute("data-toggle","tab"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap4:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("float-left"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("mr-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("form-group"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("form-group"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return i.classList.add("form-group"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("form-group"),i.classList.add("form-control"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("form-text"),t.classList.add("d-block"),t}getColumnClass(e,t){return"col-"+e+"-"+t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList();return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap5:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-bs-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("me-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("mb-3"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("mb-3"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return s.classList.add("mb-3"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(a),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("mb-3"),i.classList.add("form-select"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("d-block"),t.classList.add("form-text"),t.classList.add("form-text"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-bs-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}},RefParser:class{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);!1===this.refsResolved();)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every((e=>null!==e))}async collectRefs(e,t="#"){if("object"==typeof e&&null!==e)for(const[s,i]of Object.entries(e)){const n=t?`${t}/${s}`:`/${s}`;if(this.hasRef(e)){const t=e.$ref;if(this.isExternalRef(t)){const e=await this.load(t);this.refs[t]=e,await this.collectRefs(e,n)}else this.refs[t]=this.data[t]??null}this.data[t]=e,await this.collectRefs(i,n)}}hasRef(e){return void 0!==e.$ref&&"string"==typeof e.$ref}isExternalRef(e){return"string"==typeof e&&(e.startsWith("http")||e.startsWith("https"))}isObject(e){return null!==e&&"object"==typeof e}expand(e){const t=JSON.parse(JSON.stringify(e));if(this.isObject(t)&&this.hasRef(t)){const e=t.$ref;return delete t.$ref,this.expand(C({},this.refs[e],t))}return t}async load(e){try{const t=await fetch(e);if(!t.ok)throw new Error("Network response was not ok");return await t.json()}catch(t){throw console.error("Error loading",e,t),t}}},Create:Ls};module.exports=xs; //# sourceMappingURL=jedi.js.map diff --git a/dist/cjs/jedi.js.map b/dist/cjs/jedi.js.map index 88c386b..856da6c 100644 --- a/dist/cjs/jedi.js.map +++ b/dist/cjs/jedi.js.map @@ -1 +1 @@ -{"version":3,"file":"jedi.js","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/constrains/propertyNames.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/themes/theme.js","../../src/index.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/ref-parser/ref-parser.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport function overwriteExistingProperties (obj1, obj2) {\n Object.keys(obj2).forEach(function (key) {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n obj1[key] = obj2[key]\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n const instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n this.instances.forEach((instance) => {\n const currentValue = instance.getValue()\n\n if (isObject(currentValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(currentValue, newValue)\n\n // restore any const value here\n instance.children.forEach((child) => {\n const schemaConst = getSchemaConst(child.schema)\n\n if (isSet(schemaConst)) {\n newValue[child.getKey()] = schemaConst\n }\n })\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = instanceWithoutIf.getValue()\n instanceWithoutIf.destroy()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn, isNumber,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n"],"names":["getCircularReplacer","ancestors","key","value","length","at","this","pop","includes","push","clone","thing","JSON","parse","stringify","escapeRegExp","string","replace","replaceAll","str","find","RegExp","pathToAttribute","path","hasOwn","obj","prop","Object","prototype","hasOwnProperty","call","sortObject","keys","sort","reduce","result","equal","a","b","isObject","different","isNull","isSet","notSet","isNumber","isInteger","Math","floor","isString","isBoolean","isArray","Array","getType","type","mergeDeep","target","sources","source","shift","forEach","assign","overwriteExistingProperties","obj1","obj2","getValueByJSONPath","data","split","test","index","parseInt","compileTemplate","template","match","clamp","number","min","max","removeDuplicatesFromArray","arr","uniqueObjects","uniqueValues","Set","objString","has","add","Utils","getSchemaAdditionalProperties","schema","additionalProperties","getSchemaPropertyNames","propertyNames","getSchemaAllOf","allOf","getSchemaAnyOf","anyOf","getSchemaConst","const","getSchemaContains","contains","getSchemaDefault","default","getSchemaDependentRequired","dependentRequired","getSchemaDependentSchemas","dependentSchemas","getSchemaDescription","description","getSchemaElse","else","getSchemaEnum","enum","getSchemaExclusiveMaximum","exclusiveMaximum","getSchemaExclusiveMinimum","exclusiveMinimum","getSchemaFormat","format","getSchemaIf","if","getSchemaItems","items","getSchemaMaximum","maximum","getSchemaMaxContains","maxContains","getSchemaMaxItems","maxItems","getSchemaMaxLength","maxLength","getSchemaMaxProperties","maxProperties","getSchemaMinimum","minimum","getSchemaMinContains","minContains","getSchemaMinItems","minItems","getSchemaMinLength","minLength","getSchemaMinProperties","minProperties","getSchemaMultipleOf","multipleOf","getSchemaNot","not","getSchemaXOption","option","getSchemaPattern","pattern","getSchemaPatternProperties","patternProperties","getSchemaPrefixItems","prefixItems","getSchemaProperties","properties","getSchemaReadOnly","readOnly","getSchemaRequired","required","getSchemaThen","then","getSchemaTitle","title","getSchemaType","getSchemaOneOf","oneOf","getSchemaUnevaluatedProperties","unevaluatedProperties","getSchemaUniqueItems","uniqueItems","Schema","getSchemaX","keyword","getSchemaSchema","$schema","validator","errors","subSchemaEditor","Jedi","refParser","rootName","subSchemaErrors","getErrors","destroy","error","i18n","messages","constrain","valid","anyOfEditor","anyOfErrors","_enum","schemaEnum","some","e","validateFormat","options","regexp","prefixItemsSchemasCount","toString","notEditor","notErrors","counter","oneOfEditor","oneOfErrors","propertyName","editor","editorErrors","map","schemaProperties","invalidProperties","propertySchema","join","constraint","missingProperties","types","integer","boolean","array","object","null","valueType","seen","hasDuplicatedItems","i","item","itemStringified","schemaAdditionalProperties","schemaPatternProperties","property","definedInPatternProperty","isDefinedInProperties","additionalPropertyErrors","draft04","_const","schemaConst","containsEditor","containsInvalid","requiredProperties","filter","dependentSchema","tmpEditor","tmpErrors","ifThenElse","schemaIf","schemaThen","schemaElse","ifEditor","ifErrors","thenErrors","elseErrors","thenEditor","elseEditor","itemSchema","itemValue","draft06","draft07","schemaUnevaluatedProperties","schemaAllOf","schemaAnyOf","schemaOneOf","subSchema","subschema","unevaluatedPropertiesErrors","draft201909","propertie","draft202012","schemaPropertyNames","Validator","constructor","config","draft","jsonSchemaDrafts","schemaErrors","schemaOptionsMessages","schemaClone","validatorErrors","EventEmitter","listeners","on","name","callback","off","listener","emit","payload","Instance","super","jedi","isActive","parent","children","ui","isDirty","init","register","setInitialValue","prepare","setDefaultValue","container","setUI","onChildChange","EditorClass","uiResolver","getClass","getKey","pathSeparator","registerChildRecursive","child","unregister","schemaType","schemaDefault","setValue","getValue","newValue","triggersChange","enforceConst","activate","deactivate","isReadOnly","Editor","instance","theme","control","disabled","showingValidationErrors","build","enforceEnumDefault","addEventListeners","setContainerAttributes","refreshUI","showErrors","showValidationErrors","resolves","setAttribute","force","innerHTML","label","message","invalidFeedback","getInvalidFeedback","appendChild","disable","enable","refreshInteractiveElements","querySelectorAll","element","removeAttribute","sanitize","parentNode","removeChild","EditorIfThenElse","getIfThenElseControl","titleHidden","id","switcherOptionValues","switcherOptionsLabels","switcher","input","addEventListener","Number","switchInstance","childrenSlot","activeInstance","getAlert","InstanceIfThenElse","instances","instanceStartingValues","schemas","ifThenElseShemas","traverseSchema","optionLabel","instanceWithoutIf","createInstance","currentValue","getFittestIndex","fittestIndex","ifValidator","getAllOfCombinations","generateCombinations","current","remaining","nextSchema","schema1","schema2","slice","InstanceMultiple","lastIndex","onSetValue","schemasOf","schemaCopy","expand","switcherOptionsLabel","switcherTitle","schemaTitle","toUpperCase","charAt","championErrors","instanceErrors","InstanceBoolean","InstanceObject","musstCreateChild","optionsDeactivateNonRequired","deactivateNonRequired","schemaDeactivateNonRequired","isNotRequired","createChild","refreshInstances","isRequired","schemaRequired","isDependentRequired","deleteChild","splice","getChild","getPropertySchema","sortChildrenByPropertyOrder","propertyOrderA","propertyOrderB","isValidNumberA","isValidNumberB","oldValue","InstanceArray","refreshChildren","createItemInstance","itemsCount","schemaItems","schemaPrefixItems","move","fromIndex","toIndex","addItem","tempEditor","deleteItem","itemIndex","InstanceString","InstanceNumber","InstanceNull","glyphicons","delete","moveUp","moveDown","collapse","drag","bootstrapIcons","fontAwesome3","fontAwesome4","fontAwesome5","fontAwesome6","EditorBoolean","Boolean","EditorBooleanEnumRadio","getRadiosControl","values","titles","radios","radio","radioValue","checked","EditorBooleanEnumSelect","getSelectControl","labelIconClass","EditorBooleanCheckbox","getCheckboxControl","EditorString","String","EditorStringEnumRadio","EditorStringEnumSelect","EditorStringTextarea","getTextareaControl","EditorStringAwesomplete","window","Awesomplete","getInputControl","awesomplete","querySelector","style","display","console","EditorStringInput","getTypes","optionFormat","EditorNumber","EditorNumberEnumRadio","EditorNumberEnumSelect","EditorNumberInput","EditorObject","propertyActivators","schemaOptions","addProperty","enablePropertiesToggle","getObjectControl","enableCollapseToggle","startCollapsed","addPropertyBtn","addPropertyControl","ariaLive","ariaLiveMessage","getAriaLiveMessage","textContent","propertiesContainer","close","showModal","refreshPropertiesSlot","schemaOptionEnablePropertiesToggle","propertiesActivators","firstChild","notRequired","checkboxControl","checkbox","refreshEditors","EditorObjectGrid","lastChild","row","getRow","grid","columns","offset","col","getCol","newRow","EditorObjectNav","activeTabIndex","nav","cols","tabListCol","tabContentCol","tabContent","getTabContent","tabList","getTabList","stacked","variant","active","tab","getTab","hasErrors","grandChild","list","setTabPaneAttributes","EditorArray","getArrayControl","addBtn","isSortable","Sortable","deleteBtn","getDeleteItemBtn","moveUpBtn","getMoveUpItemBtn","moveDownBtn","getMoveDownItemBtn","btnGroup","getBtnGroup","arrayActions","body","getArrayItem","dragBtn","getDragItemBtn","sortable","create","animation","handle","onEnd","evt","oldIndex","newIndex","EditorArrayNav","childTitle","schemaOptionItemTemplate","i0","i1","EditorMultiple","getMultipleControl","EditorNull","getNullControl","EditorStringQuill","Quill","getPlaceholderControl","quill","placeholder","root","quillText","getText","setText","EditorStringJodit","Jodit","jodit","make","events","joditValue","setReadOnly","destruct","EditorStringFlatpickr","flatpickr","setDate","EditorNumberRaty","Raty","raty","click","score","EditorArrayEnumItems","schemaItemsType","isArrayType","isUniqueItems","hasEnum","hasTypes","validTypes","hasValidItemType","getCheckboxesControl","checkboxes","indexOf","UiResolver","customEditors","editors","iconLib","mergeAllOf","hiddenInputAttributes","bindEventListeners","icons","appendHiddenInput","classList","hiddenInput","hiddenControl","attr","arguments","getInstance","errorsList","Theme","useToggleEvents","getEditorContainer","html","document","createElement","getFieldset","getLegend","legend","legendText","getLabel","for","icon","getIcon","labelText","text","visuallyHidden","classes","iconClasses","className","getCard","getCardHeader","getCardBody","getActionsSlot","getArrayActionsSlot","getChildrenSlot","getMessagesSlot","getControlSlot","getPropertiesToggle","toggle","getButton","open","getCollapse","getCollapseToggle","collapsed","transition","transform","getPropertiesSlot","event","getPropertiesAriaLive","getPropertiesActivators","button","getArrayBtnAdd","getAddPropertyButton","deleteItemBtn","moveUpItemBtn","moveDownItemBtn","dragItemBtn","getDescription","actions","descriptionId","messagesId","propertiesToggle","collapseId","collapseToggle","fieldset","card","header","getSwitcher","br","width","describedBy","radioControls","labels","labelTexts","radioControl","formGroup","checkboxControls","invalidFeedbackText","invalidFeedbackIcon","xs","md","offsetMd","link","visuallyVisible","ThemeBootstrap3","btn","labelObj","clear","remove","ThemeBootstrap4","getColumnClass","size","ThemeBootstrap5","controlSlot","RefParser","refs","dereference","collectRefs","refsResolved","every","entries","nextPath","hasRef","ref","isExternalRef","resolvedSchema","load","startsWith","cloneSchema","$ref","uri","response","fetch","ok","Error","json","Create"],"mappings":"aAKO,SAASA,IACd,MAAMC,EAAY,GAEX,OAAA,SAAUC,EAAKC,GACpB,GAAqB,iBAAVA,GAAgC,OAAVA,EACxB,OAAAA,EAIT,KAAOF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MAAME,QAAuB5sB,KAAK6sB,KAAKH,GAClC1sB,KAAAksB,KAAKQ,GAAOE,QACX5sB,KAAKosB,YAAYQ,EAAgBJ,EACjD,MACUxsB,KAAKksB,KAAKQ,GAAO1sB,KAAK2D,KAAK+oB,IAAQ,IAE7C,CAEW1sB,KAAA2D,KAAK1C,GAAQgE,QAEZjF,KAAKosB,YAAYvsB,EAAO2sB,EACpC,CACA,CAEE,MAAAC,CAAQxnB,GACC,YAA0B,IAAnBA,EAAa,MAA+C,iBAAnBA,EAAa,IACxE,CAEE,aAAA0nB,CAAeD,GACT,MAAe,iBAARA,IAIJA,EAAII,WAAW,SAAWJ,EAAII,WAAW,SACpD,CAEE,QAAA7qB,CAAUpC,GACD,OAAU,OAAVA,GAAmC,iBAAVA,CACpC,CAEE,MAAAoY,CAAQhT,GACN,MAAM8nB,EAAczsB,KAAKC,MAAMD,KAAKE,UAAUyE,IAE9C,GAAIjF,KAAKiC,SAAS8qB,IAAgB/sB,KAAKysB,OAAOM,GAAc,CAC1D,MAAML,EAAMK,EAAYC,KAEjB,cADAD,EAAkB,KAClB/sB,KAAKiY,OAAOjV,EAAU,CAAA,EAAIhD,KAAKksB,KAAKQ,GAAMK,GACvD,CAEW,OAAAA,CACX,CAOE,UAAMF,CAAMI,GACN,IACI,MAAAC,QAAiBC,MAAMF,GACzB,IAACC,EAASE,GACN,MAAA,IAAIC,MAAM,+BAEX,aAAMH,EAASI,MACvB,OAAQpiB,GAED,MADEqS,QAAArS,MAAM,gBAAiB+hB,EAAK/hB,GAC9BA,CACZ,CACA,GJvCEqiB,OAAAA"} \ No newline at end of file +{"version":3,"file":"jedi.js","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/constrains/propertyNames.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/themes/theme.js","../../src/index.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/ref-parser/ref-parser.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\n// export function overwriteExistingProperties (obj1, obj2) {\n// Object.keys(obj2).forEach(function (key) {\n// if (key in obj1) {\n// if (typeof obj1[key] === typeof obj2[key]) {\n// obj1[key] = obj2[key]\n// }\n// }\n// })\n//\n// return obj1\n// }\n\n/**\n * Merges objects but only the properties that exist in both objects\n * if they are the same type of value.\n * Handles nested objects recursively.\n * @param {object} obj1 - The target object\n * @param {object} obj2 - Object whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport const overwriteExistingProperties = (obj1, obj2) => {\n Object.keys(obj2).forEach((key) => {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n if (isObject(obj1[key]) && isObject(obj2[key])) {\n overwriteExistingProperties(obj1[key], obj2[key])\n } else {\n obj1[key] = obj2[key]\n }\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.instanceWithoutIf = null\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n this.instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n let ifValue = this.instanceWithoutIf.getValue()\n\n if (isObject(ifValue) && isObject(newValue)) {\n ifValue = overwriteExistingProperties(ifValue, newValue)\n }\n\n this.instances.forEach((instance, index) => {\n const startingValue = this.instanceStartingValues[index]\n\n if (isObject(startingValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(startingValue, ifValue)\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = this.instanceWithoutIf.getValue()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n"],"names":["getCircularReplacer","ancestors","key","value","length","at","this","pop","includes","push","clone","thing","JSON","parse","stringify","escapeRegExp","string","replace","replaceAll","str","find","RegExp","pathToAttribute","path","hasOwn","obj","prop","Object","prototype","hasOwnProperty","call","sortObject","keys","sort","reduce","result","equal","a","b","isObject","different","isNull","isSet","notSet","isNumber","isInteger","Math","floor","isString","isBoolean","isArray","Array","getType","type","mergeDeep","target","sources","source","shift","forEach","assign","overwriteExistingProperties","obj1","obj2","getValueByJSONPath","data","split","test","index","parseInt","compileTemplate","template","match","clamp","number","min","max","removeDuplicatesFromArray","arr","uniqueObjects","uniqueValues","Set","objString","has","add","Utils","getSchemaAdditionalProperties","schema","additionalProperties","getSchemaPropertyNames","propertyNames","getSchemaAllOf","allOf","getSchemaAnyOf","anyOf","getSchemaConst","const","getSchemaContains","contains","getSchemaDefault","default","getSchemaDependentRequired","dependentRequired","getSchemaDependentSchemas","dependentSchemas","getSchemaDescription","description","getSchemaElse","else","getSchemaEnum","enum","getSchemaExclusiveMaximum","exclusiveMaximum","getSchemaExclusiveMinimum","exclusiveMinimum","getSchemaFormat","format","getSchemaIf","if","getSchemaItems","items","getSchemaMaximum","maximum","getSchemaMaxContains","maxContains","getSchemaMaxItems","maxItems","getSchemaMaxLength","maxLength","getSchemaMaxProperties","maxProperties","getSchemaMinimum","minimum","getSchemaMinContains","minContains","getSchemaMinItems","minItems","getSchemaMinLength","minLength","getSchemaMinProperties","minProperties","getSchemaMultipleOf","multipleOf","getSchemaNot","not","getSchemaXOption","option","getSchemaPattern","pattern","getSchemaPatternProperties","patternProperties","getSchemaPrefixItems","prefixItems","getSchemaProperties","properties","getSchemaReadOnly","readOnly","getSchemaRequired","required","getSchemaThen","then","getSchemaTitle","title","getSchemaType","getSchemaOneOf","oneOf","getSchemaUnevaluatedProperties","unevaluatedProperties","getSchemaUniqueItems","uniqueItems","Schema","getSchemaX","keyword","getSchemaSchema","$schema","validator","errors","subSchemaEditor","Jedi","refParser","rootName","subSchemaErrors","getErrors","destroy","error","i18n","messages","constrain","valid","anyOfEditor","anyOfErrors","_enum","schemaEnum","some","e","validateFormat","options","regexp","prefixItemsSchemasCount","toString","notEditor","notErrors","counter","oneOfEditor","oneOfErrors","propertyName","editor","editorErrors","map","schemaProperties","invalidProperties","propertySchema","join","constraint","missingProperties","types","integer","boolean","array","object","null","valueType","seen","hasDuplicatedItems","i","item","itemStringified","schemaAdditionalProperties","schemaPatternProperties","property","definedInPatternProperty","isDefinedInProperties","additionalPropertyErrors","draft04","_const","schemaConst","containsEditor","containsInvalid","requiredProperties","filter","dependentSchema","tmpEditor","tmpErrors","ifThenElse","schemaIf","schemaThen","schemaElse","ifEditor","ifErrors","thenErrors","elseErrors","thenEditor","elseEditor","itemSchema","itemValue","draft06","draft07","schemaUnevaluatedProperties","schemaAllOf","schemaAnyOf","schemaOneOf","subSchema","subschema","unevaluatedPropertiesErrors","draft201909","propertie","draft202012","schemaPropertyNames","Validator","constructor","config","draft","jsonSchemaDrafts","schemaErrors","schemaOptionsMessages","schemaClone","validatorErrors","EventEmitter","listeners","on","name","callback","off","listener","emit","payload","Instance","super","jedi","isActive","parent","children","ui","isDirty","init","register","setInitialValue","prepare","setDefaultValue","container","setUI","onChildChange","EditorClass","uiResolver","getClass","getKey","pathSeparator","registerChildRecursive","child","unregister","schemaType","schemaDefault","setValue","getValue","newValue","triggersChange","enforceConst","activate","deactivate","isReadOnly","Editor","instance","theme","control","disabled","showingValidationErrors","build","enforceEnumDefault","addEventListeners","setContainerAttributes","refreshUI","showErrors","showValidationErrors","resolves","setAttribute","force","innerHTML","label","message","invalidFeedback","getInvalidFeedback","appendChild","disable","enable","refreshInteractiveElements","querySelectorAll","element","removeAttribute","sanitize","parentNode","removeChild","EditorIfThenElse","getIfThenElseControl","titleHidden","id","switcherOptionValues","switcherOptionsLabels","switcher","input","addEventListener","Number","switchInstance","childrenSlot","activeInstance","getAlert","InstanceIfThenElse","instances","instanceStartingValues","instanceWithoutIf","schemas","ifThenElseShemas","traverseSchema","optionLabel","createInstance","currentValue","getFittestIndex","ifValue","startingValue","fittestIndex","ifValidator","getAllOfCombinations","generateCombinations","current","remaining","nextSchema","schema1","schema2","slice","InstanceMultiple","lastIndex","onSetValue","schemasOf","schemaCopy","expand","switcherOptionsLabel","switcherTitle","schemaTitle","toUpperCase","charAt","championErrors","instanceErrors","InstanceBoolean","InstanceObject","musstCreateChild","optionsDeactivateNonRequired","deactivateNonRequired","schemaDeactivateNonRequired","isNotRequired","createChild","refreshInstances","isRequired","schemaRequired","isDependentRequired","deleteChild","splice","getChild","getPropertySchema","sortChildrenByPropertyOrder","propertyOrderA","propertyOrderB","isValidNumberA","isValidNumberB","oldValue","InstanceArray","refreshChildren","createItemInstance","itemsCount","schemaItems","schemaPrefixItems","move","fromIndex","toIndex","addItem","tempEditor","deleteItem","itemIndex","InstanceString","InstanceNumber","InstanceNull","glyphicons","delete","moveUp","moveDown","collapse","drag","bootstrapIcons","fontAwesome3","fontAwesome4","fontAwesome5","fontAwesome6","EditorBoolean","Boolean","EditorBooleanEnumRadio","getRadiosControl","values","titles","radios","radio","radioValue","checked","EditorBooleanEnumSelect","getSelectControl","labelIconClass","EditorBooleanCheckbox","getCheckboxControl","EditorString","String","EditorStringEnumRadio","EditorStringEnumSelect","EditorStringTextarea","getTextareaControl","EditorStringAwesomplete","window","Awesomplete","getInputControl","awesomplete","querySelector","style","display","console","EditorStringInput","getTypes","optionFormat","EditorNumber","EditorNumberEnumRadio","EditorNumberEnumSelect","EditorNumberInput","EditorObject","propertyActivators","schemaOptions","addProperty","enablePropertiesToggle","getObjectControl","enableCollapseToggle","startCollapsed","addPropertyBtn","addPropertyControl","ariaLive","ariaLiveMessage","getAriaLiveMessage","textContent","propertiesContainer","close","showModal","refreshPropertiesSlot","schemaOptionEnablePropertiesToggle","propertiesActivators","firstChild","notRequired","checkboxControl","checkbox","refreshEditors","EditorObjectGrid","lastChild","row","getRow","grid","columns","offset","col","getCol","newRow","EditorObjectNav","activeTabIndex","nav","cols","tabListCol","tabContentCol","tabContent","getTabContent","tabList","getTabList","stacked","variant","active","tab","getTab","hasErrors","grandChild","list","setTabPaneAttributes","EditorArray","getArrayControl","addBtn","isSortable","Sortable","deleteBtn","getDeleteItemBtn","moveUpBtn","getMoveUpItemBtn","moveDownBtn","getMoveDownItemBtn","btnGroup","getBtnGroup","arrayActions","body","getArrayItem","dragBtn","getDragItemBtn","sortable","create","animation","handle","onEnd","evt","oldIndex","newIndex","EditorArrayNav","childTitle","schemaOptionItemTemplate","i0","i1","EditorMultiple","getMultipleControl","EditorNull","getNullControl","EditorStringQuill","Quill","getPlaceholderControl","quill","placeholder","root","quillText","getText","setText","EditorStringJodit","Jodit","jodit","make","events","joditValue","setReadOnly","destruct","EditorStringFlatpickr","flatpickr","setDate","EditorNumberRaty","Raty","raty","click","score","EditorArrayEnumItems","schemaItemsType","isArrayType","isUniqueItems","hasEnum","hasTypes","validTypes","hasValidItemType","getCheckboxesControl","checkboxes","indexOf","UiResolver","customEditors","editors","iconLib","mergeAllOf","hiddenInputAttributes","bindEventListeners","icons","appendHiddenInput","classList","hiddenInput","hiddenControl","attr","arguments","getInstance","errorsList","Theme","useToggleEvents","getEditorContainer","html","document","createElement","getFieldset","getLegend","legend","legendText","getLabel","for","icon","getIcon","labelText","text","visuallyHidden","classes","iconClasses","className","getCard","getCardHeader","getCardBody","getActionsSlot","getArrayActionsSlot","getChildrenSlot","getMessagesSlot","getControlSlot","getPropertiesToggle","toggle","getButton","open","getCollapse","getCollapseToggle","collapsed","transition","transform","getPropertiesSlot","event","getPropertiesAriaLive","getPropertiesActivators","button","getArrayBtnAdd","getAddPropertyButton","deleteItemBtn","moveUpItemBtn","moveDownItemBtn","dragItemBtn","getDescription","actions","descriptionId","messagesId","propertiesToggle","collapseId","collapseToggle","fieldset","card","header","getSwitcher","br","width","describedBy","radioControls","labels","labelTexts","radioControl","formGroup","checkboxControls","invalidFeedbackText","invalidFeedbackIcon","xs","md","offsetMd","link","visuallyVisible","ThemeBootstrap3","btn","labelObj","clear","remove","ThemeBootstrap4","getColumnClass","size","ThemeBootstrap5","controlSlot","RefParser","refs","dereference","collectRefs","refsResolved","every","entries","nextPath","hasRef","ref","isExternalRef","resolvedSchema","load","startsWith","cloneSchema","$ref","uri","response","fetch","ok","Error","json","Create"],"mappings":"aAKO,SAASA,IACd,MAAMC,EAAY,GAEX,OAAA,SAAUC,EAAKC,GACpB,GAAqB,iBAAVA,GAAgC,OAAVA,EACxB,OAAAA,EAIT,KAAOF,EAAUG,OAAS,GAAKH,EAAUI,IAAG,KAAQC,MAClDL,EAAUM,MAER,OAAAN,EAAUO,SAASL,GACd,cAETF,EAAUQ,KAAKN,GACRA,EACX,CACA,CAOO,SAASO,EAAOC,GACjB,QAAiB,IAAVA,EAIX,OAAOC,KAAKC,MAAMD,KAAKE,UAAUH,EAAOX,KAC1C,CAOO,SAASe,EAAcC,GACrB,OAAAA,EAAOC,QAAQ,sBAAuB,OAC/C,CASO,SAASC,EAAYC,EAAKC,EAAMH,GAC9B,OAAAE,EAAIF,QAAQ,IAAII,OAAON,EAAaK,GAAO,KAAMH,EAC1D,CAOO,SAASK,EAAiBC,GAC/B,OAAOL,EAAWA,EAAWK,EAAM,IAAK,QAAS,IAAK,IACxD,CAQO,SAASC,EAAQC,EAAKC,GAC3B,OAAOC,OAAOC,UAAUC,eAAeC,KAAKL,EAAKC,EACnD,CAOO,SAASK,EAAYN,GACnB,OAAAE,OAAOK,KAAKP,GAAKQ,OAAOC,QAAO,CAACC,EAAQjC,KACtCiC,EAAAjC,GAAOuB,EAAIvB,GACXiC,IACN,CAAE,EACP,CAQO,SAASC,EAAOC,EAAGC,GAKxB,OAJIC,EAASF,IAAME,EAASD,KAC1BD,EAAIN,EAAWM,GACfC,EAAIP,EAAWO,IAEV1B,KAAKE,UAAUuB,KAAOzB,KAAKE,UAAUwB,EAC9C,CAQO,SAASE,EAAWH,EAAGC,GACrB,OAACF,EAAMC,EAAGC,EACnB,CAOO,SAASG,EAAQtC,GACtB,OAAiB,OAAVA,CAC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OE,UAAMF,CAAMI,GACN,IACI,MAAAC,QAAiBC,MAAMF,GACzB,IAACC,EAASE,GACN,MAAA,IAAIC,MAAM,+BAEX,aAAMH,EAASI,MACvB,OAAQtiB,GAED,MADEuS,QAAAvS,MAAM,gBAAiBiiB,EAAKjiB,GAC9BA,CACZ,CACA,GJvCEuiB,OAAAA"} \ No newline at end of file diff --git a/dist/esm/jedi.js b/dist/esm/jedi.js index f3d5623..04affbe 100644 --- a/dist/esm/jedi.js +++ b/dist/esm/jedi.js @@ -113,16 +113,20 @@ function mergeDeep(target, ...sources) { } return mergeDeep(target, ...sources); } -function overwriteExistingProperties(obj1, obj2) { - Object.keys(obj2).forEach(function(key) { +const overwriteExistingProperties = (obj1, obj2) => { + Object.keys(obj2).forEach((key) => { if (key in obj1) { if (typeof obj1[key] === typeof obj2[key]) { - obj1[key] = obj2[key]; + if (isObject(obj1[key]) && isObject(obj2[key])) { + overwriteExistingProperties(obj1[key], obj2[key]); + } else { + obj1[key] = obj2[key]; + } } } }); return obj1; -} +}; function getValueByJSONPath(data, path) { const keys = path.split("."); let value = data; @@ -1933,6 +1937,7 @@ class InstanceIfThenElse extends Instance { prepare() { this.instances = []; this.instanceStartingValues = []; + this.instanceWithoutIf = null; this.activeInstance = null; this.index = 0; this.schemas = []; @@ -1964,7 +1969,7 @@ class InstanceIfThenElse extends Instance { delete schemaClone.if; delete schemaClone.then; delete schemaClone.else; - const instanceWithoutIf = this.jedi.createInstance({ + this.instanceWithoutIf = this.jedi.createInstance({ jedi: this.jedi, schema: schemaClone, path: this.path, @@ -1992,16 +1997,14 @@ class InstanceIfThenElse extends Instance { this.instances.push(instance); }); this.on("set-value", (newValue) => { - this.instances.forEach((instance) => { - const currentValue = instance.getValue(); - if (isObject(currentValue) && isObject(newValue)) { - newValue = overwriteExistingProperties(currentValue, newValue); - instance.children.forEach((child) => { - const schemaConst = getSchemaConst(child.schema); - if (isSet(schemaConst)) { - newValue[child.getKey()] = schemaConst; - } - }); + let ifValue = this.instanceWithoutIf.getValue(); + if (isObject(ifValue) && isObject(newValue)) { + ifValue = overwriteExistingProperties(ifValue, newValue); + } + this.instances.forEach((instance, index3) => { + const startingValue = this.instanceStartingValues[index3]; + if (isObject(startingValue) && isObject(newValue)) { + newValue = overwriteExistingProperties(startingValue, ifValue); } instance.setValue(newValue, false); }); @@ -2011,8 +2014,7 @@ class InstanceIfThenElse extends Instance { this.switchInstance(fittestIndex2); } }); - this.value = instanceWithoutIf.getValue(); - instanceWithoutIf.destroy(); + this.value = this.instanceWithoutIf.getValue(); const fittestIndex = this.getFittestIndex(this.value); this.switchInstance(fittestIndex); } diff --git a/dist/esm/jedi.js.map b/dist/esm/jedi.js.map index da61dc6..2cdcd23 100644 --- a/dist/esm/jedi.js.map +++ b/dist/esm/jedi.js.map @@ -1 +1 @@ -{"version":3,"file":"jedi.js","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/constrains/propertyNames.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/ref-parser/ref-parser.js","../../src/themes/theme.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/index.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport function overwriteExistingProperties (obj1, obj2) {\n Object.keys(obj2).forEach(function (key) {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n obj1[key] = obj2[key]\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n const instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n this.instances.forEach((instance) => {\n const currentValue = instance.getValue()\n\n if (isObject(currentValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(currentValue, newValue)\n\n // restore any const value here\n instance.children.forEach((child) => {\n const schemaConst = getSchemaConst(child.schema)\n\n if (isSet(schemaConst)) {\n newValue[child.getKey()] = schemaConst\n }\n })\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = instanceWithoutIf.getValue()\n instanceWithoutIf.destroy()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn, isNumber,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n"],"names":["type","index","allOf","schema","minLength","anyOf","exclusiveMaximum","exclusiveMinimum","format","items","prefixItems","maxItems","maxLength","maxProperties","minimum","minItems","minProperties","multipleOf","not","oneOf","pattern","patternProperties","required","key","value","maximum","uniqueItems","seen","properties","additionalProperties","contains","dependentRequired","dependentSchemas","unevaluatedProperties","fittestIndex","property","checkbox","itemIndex","Create"],"mappings":"AAKO,SAAS,sBAAuB;AACrC,QAAM,YAAY,CAAA;AAElB,SAAO,SAAU,KAAK,OAAO;AAC3B,QAAI,OAAO,UAAU,YAAY,UAAU,MAAM;AAC/C,aAAO;AAAA,IACb;AAGI,WAAO,UAAU,SAAS,KAAK,UAAU,GAAG,EAAE,MAAM,MAAM;AACxD,gBAAU,IAAG;AAAA,IACnB;AACI,QAAI,UAAU,SAAS,KAAK,GAAG;AAC7B,aAAO;AAAA,IACb;AACI,cAAU,KAAK,KAAK;AACpB,WAAO;AAAA,EACX;AACA;AAOO,SAAS,MAAO,OAAO;AAC5B,MAAI,OAAO,UAAU,aAAa;AAChC,WAAO;AAAA,EACX;AAEE,SAAO,KAAK,MAAM,KAAK,UAAU,OAAO,qBAAqB,CAAC;AAChE;AAOO,SAAS,aAAc,QAAQ;AACpC,SAAO,OAAO,QAAQ,uBAAuB,MAAM;AACrD;AASO,SAAS,WAAY,KAAK,MAAM,SAAS;AAC9C,SAAO,IAAI,QAAQ,IAAI,O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ACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACAqC,QAAAA;AACF;"} \ No newline at end of file +{"version":3,"file":"jedi.js","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/constrains/propertyNames.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/ref-parser/ref-parser.js","../../src/themes/theme.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/index.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\n// export function overwriteExistingProperties (obj1, obj2) {\n// Object.keys(obj2).forEach(function (key) {\n// if (key in obj1) {\n// if (typeof obj1[key] === typeof obj2[key]) {\n// obj1[key] = obj2[key]\n// }\n// }\n// })\n//\n// return obj1\n// }\n\n/**\n * Merges objects but only the properties that exist in both objects\n * if they are the same type of value.\n * Handles nested objects recursively.\n * @param {object} obj1 - The target object\n * @param {object} obj2 - Object whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport const overwriteExistingProperties = (obj1, obj2) => {\n Object.keys(obj2).forEach((key) => {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n if (isObject(obj1[key]) && isObject(obj2[key])) {\n overwriteExistingProperties(obj1[key], obj2[key])\n } else {\n obj1[key] = obj2[key]\n }\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.instanceWithoutIf = null\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n this.instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n let ifValue = this.instanceWithoutIf.getValue()\n\n if (isObject(ifValue) && isObject(newValue)) {\n ifValue = overwriteExistingProperties(ifValue, newValue)\n }\n\n this.instances.forEach((instance, index) => {\n const startingValue = this.instanceStartingValues[index]\n\n if (isObject(startingValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(startingValue, ifValue)\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = this.instanceWithoutIf.getValue()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n"],"names":["type","index","allOf","schema","minLength","anyOf","exclusiveMaximum","exclusiveMinimum","format","items","prefixItems","maxItems","maxLength","maxProperties","minimum","minItems","minProperties","multipleOf","not","oneOf","pattern","patternProperties","required","key","value","maximum","uniqueItems","seen","properties","additionalProperties","contains","dependentRequired","dependentSchemas","unevaluatedProperties","fittestIndex","property","checkbox","itemIndex","Create"],"mappings":"AAKO,SAAS,sBAAuB;AACrC,QAAM,YAAY,CAAA;AAElB,SAAO,SAAU,KAAK,OAAO;AAC3B,QAAI,OAAO,UAAU,YAAY,UAAU,MAAM;AAC/C,aAAO;AAAA,IACb;AAGI,WAAO,UAAU,SAAS,KAAK,UAAU,GAAG,EAAE,MAAM,MAAM;AACxD,gBAAU,IAAG;AAAA,IACnB;AACI,QAAI,UAAU,SAAS,KAAK,GAAG;AAC7B,aAAO;AAAA,IACb;AACI,cAAU,KAAK,KAAK;AACpB,WAAO;AAAA,EACX;AACA;AAOO,SAAS,MAAO,OAAO;AAC5B,MAAI,OAAO,UAAU,aAAa;AAChC,WAAO;AAAA,EACX;AAEE,SAAO,KAAK,MAAM,KAAK,UAAU,OAAO,qBAAqB,CAAC;AAChE;AAOO,SAAS,aAAc,QAAQ;AACpC,SAAO,OAAO,QAAQ,uBAAuB,MAAM;AACrD;AASO,SAAS,WAAY,KAAK,MAAM,SAAS;AAC9C,SAAO,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QAAA;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACAqC,QAAAA;AACF;"} \ No newline at end of file diff --git a/dist/umd/jedi.js b/dist/umd/jedi.js index 500ee74..2aff8c3 100644 --- a/dist/umd/jedi.js +++ b/dist/umd/jedi.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Jedi=t()}(this,(function(){"use strict";function e(){const e=[];return function(t,s){if("object"!=typeof s||null===s)return s;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(s)?"[Circular]":(e.push(s),s)}}function t(t){if(void 0!==t)return JSON.parse(JSON.stringify(t,e()))}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i(e,t,i){return e.replace(new RegExp(s(t),"g"),i)}function n(e){return i(i(e,"#","root"),"/","-")}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){return Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{})}function o(e,t){return b(e)&&b(t)&&(e=r(e),t=r(t)),JSON.stringify(e)===JSON.stringify(t)}function l(e,t){return!o(e,t)}function c(e){return null===e}function d(e){return void 0!==e}function h(e){return void 0===e}function p(e){return"number"==typeof e}function u(e){return p(e)&&e===Math.floor(e)}function m(e){return"string"==typeof e}function g(e){return"boolean"==typeof e}function f(e){return Array.isArray(e)}function b(e){return!c(e)&&!f(e)&&"object"==typeof e}function v(e){let t="any";return p(e)?t=u(e)?"integer":"number":m(e)?t="string":g(e)?t="boolean":f(e)?t="array":c(e)?t="null":b(e)&&(t="object"),t}function C(e,...t){if(!t.length)return e;const s=t.shift();return b(e)&&b(s)&&Object.keys(s).forEach((t=>{b(s[t])?(e[t]||Object.assign(e,{[t]:{}}),C(e[t],s[t])):Object.assign(e,{[t]:s[t]})})),C(e,...t)}function y(e,t){return Object.keys(t).forEach((function(s){s in e&&typeof e[s]==typeof t[s]&&(e[s]=t[s])})),e}function L(e,t){const s=t.split(".");let i=e;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const e=parseInt(n);if(!(e>=0&&e{const s=(e=e.replace(/\s/g,"")).split(/{{|}}/)[1];return L(t,s)}))}function x(e,t,s){return Math.max(t,Math.min(e,s))}function I(e){const t=[],s=new Set;for(const i of e){const e=JSON.stringify(i);s.has(e)||(s.add(e),t.push(i))}return t}const w={getCircularReplacer:e,clone:t,escapeRegExp:s,replaceAll:i,pathToAttribute:n,hasOwn:a,sortObject:r,equal:o,different:l,isNull:c,isSet:d,notSet:h,isNumber:p,isInteger:u,isString:m,isBoolean:g,isArray:f,isObject:b,getType:v,mergeDeep:C,overwriteExistingProperties:y,getValueByJSONPath:L,compileTemplate:E,clamp:x,removeDuplicatesFromArray:I};function A(e){return b(e.additionalProperties)||g(e.additionalProperties)?e.additionalProperties:void 0}function S(e){return b(e.propertyNames)||g(e.propertyNames)?e.propertyNames:void 0}function j(e){return f(e.allOf)?e.allOf:void 0}function k(e){return f(e.anyOf)?e.anyOf:void 0}function O(e){return e.const}function P(e){return b(e.contains)||g(e.contains)?e.contains:void 0}function T(e){return e.default}function V(e){return b(e.dependentRequired)?e.dependentRequired:void 0}function H(e){return b(e.dependentSchemas)?e.dependentSchemas:void 0}function M(e){return m(e.description)?e.description:void 0}function R(e){return b(e.else)||g(e.else)?e.else:void 0}function B(e){if(f(e.enum)&&e.enum.length>0)return e.enum}function N(e){return p(e.exclusiveMaximum)?e.exclusiveMaximum:void 0}function q(e){return p(e.exclusiveMinimum)?e.exclusiveMinimum:void 0}function D(e){return m(e.format)?e.format:void 0}function U(e){return b(e.if)||g(e.if)?e.if:void 0}function F(e){return b(e.items)||g(e.items)?e.items:void 0}function K(e){return p(e.maximum)?e.maximum:void 0}function $(e){if(u(e.maxContains)&&e.maxContains>=0)return e.maxContains}function z(e){if(u(e.maxItems)&&e.maxItems>=0)return e.maxItems}function J(e){if(u(e.maxLength)&&e.maxLength>=0)return e.maxLength}function G(e){if(u(e.maxProperties))return e.maxProperties}function Z(e){return p(e.minimum)?e.minimum:void 0}function Q(e){if(u(e.minContains)&&e.minContains>=0)return e.minContains}function W(e){if(u(e.minItems)&&e.minItems>=0)return e.minItems}function X(e){if(u(e.minLength)&&e.minLength>=0)return e.minLength}function _(e){if(u(e.minProperties)&&e.minProperties>=0)return e.minProperties}function Y(e){if(p(e.multipleOf)&&e.multipleOf>=0)return e.multipleOf}function ee(e){return b(e.not)||g(e.not)?e.not:void 0}function te(e,t){return e["x-options"]&&d(e["x-options"][t])?e["x-options"][t]:void 0}function se(e){return m(e.pattern)?e.pattern:void 0}function ie(e){return b(e.patternProperties)?e.patternProperties:void 0}function ne(e){return f(e.prefixItems)?e.prefixItems:void 0}function ae(e){return b(e.properties)?e.properties:void 0}function re(e){return g(e.readOnly)?e.readOnly:void 0}function oe(e){return f(e.required)?[...new Set(e.required)]:void 0}function le(e){return b(e.then)||g(e.then)?e.then:void 0}function ce(e){return m(e.title)?e.title:void 0}function de(e){if(m(e.type)||f(e.type))return e.type}function he(e){return f(e.oneOf)?e.oneOf:void 0}function pe(e){return g(e.unevaluatedProperties)?e.unevaluatedProperties:void 0}function ue(e){return g(e.uniqueItems)?e.uniqueItems:void 0}const me={getSchemaX:function(e,t){return e["x-"+t]},getSchemaSchema:function(e){return m(e.$schema)?e.$schema:void 0},getSchemaAdditionalProperties:A,getSchemaPropertyNames:S,getSchemaAllOf:j,getSchemaAnyOf:k,getSchemaConst:O,getSchemaContains:P,getSchemaDefault:T,getSchemaDependentRequired:V,getSchemaDependentSchemas:H,getSchemaDescription:M,getSchemaElse:R,getSchemaEnum:B,getSchemaExclusiveMaximum:N,getSchemaExclusiveMinimum:q,getSchemaFormat:D,getSchemaIf:U,getSchemaItems:F,getSchemaMaximum:K,getSchemaMaxContains:$,getSchemaMaxItems:z,getSchemaMaxLength:J,getSchemaMaxProperties:G,getSchemaMinimum:Z,getSchemaMinContains:Q,getSchemaMinItems:W,getSchemaMinLength:X,getSchemaMinProperties:_,getSchemaMultipleOf:Y,getSchemaNot:ee,getSchemaXOption:te,getSchemaPattern:se,getSchemaPatternProperties:ie,getSchemaPrefixItems:ne,getSchemaProperties:ae,getSchemaReadOnly:re,getSchemaRequired:oe,getSchemaThen:le,getSchemaTitle:ce,getSchemaType:de,getSchemaOneOf:he,getSchemaUnevaluatedProperties:pe,getSchemaUniqueItems:ue};function ge(e,t,s,i,n){let a=[];const r=j(s);return d(r)&&(r.forEach((s=>{const r=new Ls({refParser:e.refParser,schema:s,data:t,rootName:i}),o=r.getErrors();r.destroy(),o.forEach((e=>{e.path=n})),a.push(...o)})),a=I(a)),a}const fe='Has additional property "{{ property }}" but no additional properties are allowed.',be="Must validate against at least one of the provided schemas.",ve="Must have value of: {{ const }}.",Ce="Must contain at least one item matching the provided schema.",ye="Must have the required properties: {{ dependentRequired }}.",Le="Must be one of the enumerated values: {{ enum }}.",Ee="Must be less than {{ exclusiveMaximum }}.",xe="Must be greater than {{ exclusiveMinimum }}.",Ie="Must be a valid {{ format }}.",we="Must have items that validate against the provided schema.",Ae="Must be at most {{ maximum }}.",Se="Must have at most {{ maxItems }} items.",je="Must be at most {{ maxLength }} characters long.",ke="Must have at most {{ maxProperties }} properties.",Oe="Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",Pe="Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",Te="Must be at least {{ minimum }}.",Ve="Must have at least {{ minItems }} items.",He="Must be at least {{ minLength }} characters long.",Me="Must have at least {{ minProperties }} properties.",Re="Must be multiple of {{ multipleOf }}.",Be="Must not validate against the provided schema.",Ne="Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",qe='Must match the pattern: "{{ pattern }}".',De="Item {{ index }} fails validation.",Ue='Property name "{{ propertyName }}" fails validation.',Fe="The following properties do not comply with their schemas: {{ properties }}",Ke="Must have the required properties: {{ required }}.",$e="Must be of type {{ type }}.",ze='Has invalid unevaluated property "{{ property }}"',Je="Must have unique items.";function Ge(e,t,s,i,n){const a=[],r=X(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&(s=!0)})),s||a.push({messages:[be],path:n,constrain:"anyOf"})}return a}function Qe(e,t,s,i,n){const a=[],r=B(s);if(d(r)){!r.some((e=>JSON.stringify(t)===JSON.stringify(e)))&&a.push({messages:[E(Le,{enum:JSON.stringify(r)})],path:n,constrain:"enum"})}return a}function We(e,t,s,i,n){const a=[],r=N(s);if(p(t)&&d(r)){t>=r&&a.push({messages:[E(Ee,{exclusiveMaximum:r})],path:n,constrain:"exclusiveMaximum"})}return a}function Xe(e,t,s,i,n){const a=[],r=q(s);if(p(t)&&d(r)){t<=r&&a.push({messages:[E(xe,{exclusiveMinimum:r})],path:n,constrain:"exclusiveMinimum"})}return a}function _e(e,t,s,i,n){const a=[],r=D(s);let o=e.validateFormat;if(te(s,"validateFormat")&&(o=s.options.validateFormat),d(r)&&m(t)&&o){let e;"email"===r&&(e=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),"url"===r&&(e=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),"uuid"===r&&(e=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i));d(e)&&!e.test(t)&&a.push({messages:[E(Ie,{format:r})],path:n,constrain:"format"})}return a}function Ye(e,t,s,i,n){const a=[],r=F(s),o=ne(s);if(f(t)&&d(r)){const e=d(o)?o.length:0;!1===r&&t.length>0&&t.length>e&&a.push({messages:[we],path:n,constrain:"items"})}return a}function et(e,t,s,i,n){const a=[],r=z(s);if(f(t)&&d(r)){t.length>r&&a.push({messages:[E(Se,{maxItems:r})],path:n,constrain:"maxItems"})}return a}function tt(e,t,s,i,n){const a=[],r=J(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length>r&&a.push({messages:[E(je,{maxLength:r})],path:n,constrain:"maxLength"})}return a}function st(e,t,s,i,n){const a=[],r=G(s);if(b(t)&&d(r)){Object.keys(t).length>r&&a.push({messages:[E(ke,{maxProperties:r})],path:n,constrain:"maxProperties"})}return a}function it(e,t,s,i,n){const a=[],r=Z(s);if(p(t)&&d(r)){t{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&s++})),1!==s&&a.push({messages:[E(Ne,{counter:s})],path:n,constrain:"oneOf"})}return a}function ct(e,t,s,i,n){const a=[],r=se(s);if(m(t)&&d(r)){!new RegExp(r).test(t)&&a.push({messages:[E(qe,{pattern:r})],path:n,constrain:"pattern"})}return a}function dt(e,t,s,i){let n=[];const a=ie(s);return b(t)&&d(a)&&Object.keys(t).forEach((s=>{Object.keys(a).forEach((r=>{if(new RegExp(r).test(s)){const o=a[r],l=new Ls({refParser:e.refParser,schema:o,data:t[s]}),c=l.getErrors().map((e=>({messages:e.messages,path:i+"/"+s,constrain:"patternProperties"})));n=[...n,...c],l.destroy()}}))})),n}function ht(e,t,s,i){const n=ae(s),r=[];return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(a(t,s)){const i=n[s],a=new Ls({refParser:e.refParser,schema:i,data:t[s]});a.getErrors().length>0&&r.push(s),a.destroy()}})),r.length>0?[{messages:[E(Fe,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function pt(e,t,s,i,n){const a=[],r=oe(s);if(b(t)&&d(r)){const e=[],s=Object.keys(t);r.forEach((t=>{s.includes(t)||e.push(t)}));e.length>0&&a.push({messages:[E(Ke,{required:e.join(", ")})],path:n,constrain:"required"})}return a}function ut(e,t,s,i,n){const a=[],r=de(s);if("any"===r)return a;if(d(r)){const e={string:e=>m(e),number:e=>p(e),integer:e=>u(e),boolean:e=>g(e),array:e=>f(e),object:e=>b(e),null:e=>c(e)};let s=!0;s=f(r)?r.some((s=>e[s](t))):e[r](t),s||a.push({messages:[E($e,{type:r,valueType:v(t)})],path:n,constrain:"type"})}return a}function mt(e,t,s,i,n){const a=[],r=K(s);if(p(t)&&d(r)){t>r&&a.push({messages:[E(Ae,{maximum:r})],path:n,constrain:"maximum"})}return a}function gt(e,t,s,i,n){const a=[],o=ue(s);if(f(t)&&d(o)&&!0===o){const e=[];let s=!1;for(let i=0;ie===a)),s)break;e.push(a)}s&&a.push({messages:[Je],path:n,constrain:"uniqueItems"})}return a}function ft(e,t,s,i,n){const r=[],o=A(s),l=ie(s),c=ae(s);if(b(t)&&d(o)){const s=c||{},i=o,d=l||{};Object.keys(t).forEach((o=>{const l=Object.keys(d).some((e=>new RegExp(e).test(o))),c=a(s,o);if(!l&&!c)if(!1===i)r.push({messages:[E(fe,{property:o})],path:n,constrain:"additionalProperties"});else if(b(i)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),a=s.getErrors().map((e=>({messages:e.messages,path:`${n}.${o}`,constrain:"additionalProperties"})));r.push(...a),s.destroy()}}))}return r}const bt={additionalProperties:ft,allOf:ge,anyOf:Ze,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,required:pt,type:ut,uniqueItems:gt};function vt(e,t,s,i,n){const a=[],r=O(s);if(d(r)){l(t,r)&&a.push({messages:[E(ve,{const:JSON.stringify(r)})],path:n,constrain:"const"})}return a}function Ct(e,t,s,i,n){const a=[],r=P(s),o=Q(s),l=$(s);if(f(t)&&d(r)){let s=0;t.forEach((t=>{const i=new Ls({refParser:e.refParser,schema:r,data:t});0===i.getErrors().length&&s++,i.destroy()}));const i=0===s;if(d(o)){sl&&a.push({messages:[E(Oe,{counter:s,maxContains:l})],path:n,constrain:"maxContains"})}}return a}function yt(e,t,s,i,n){const r=[],o=V(s);if(b(t)&&d(o)){let e=[];Object.keys(o).forEach((s=>{if(d(t[s])){const i=o[s];e=i.filter((e=>!a(t,e)))}}));e.length>0&&r.push({messages:[E(ye,{dependentRequired:e.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function Lt(e,t,s){let i=[];const n=H(s);return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(d(t[s])){const a=n[s],r=new Ls({refParser:e.refParser,schema:a,data:t}),o=r.getErrors();r.destroy(),i=[...i,...o]}})),i}function Et(e,t,s){const i=[],n=U(s),a=le(s),r=R(s);if(d(n)){if(h(a)&&h(r))return i;const s=new Ls({refParser:e.refParser,schema:n,data:t}),o=s.getErrors();s.destroy();let l=[],c=[];if(d(a)){const s=new Ls({refParser:e.refParser,schema:a,data:t});l=s.getErrors(),s.destroy()}if(d(r)){const s=new Ls({refParser:e.refParser,schema:r,data:t});c=s.getErrors(),s.destroy()}if(!0===n)return l;if(!1===n)return c;if(0===o.length)return l;if(o.length>0)return c}return i}function xt(e,t,s,i,n){const a=[],r=ne(s);return f(t)&&d(r)&&r.forEach(((s,i)=>{const r=t[i];if(d(r)){const t=new Ls({refParser:e.refParser,schema:s,data:r}),o=t.getErrors();t.destroy(),o.length>0&&a.push({messages:[E(De,{index:i})],path:n,constrain:"prefixItems"})}})),a}const It={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt},wt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt};function At(e,t,s,i,n){let r=[];const o=pe(s),l=ie(s),c=ae(s),h=j(s),p=k(s),u=he(s);if(b(t)&&d(o)){let s=d(c)?c:{};const i=o,m=l;[h,p,u].forEach((e=>{d(e)&&e.forEach((e=>{d(e.properties)&&(s={...s,...e.properties})}))})),s&&Object.keys(t).forEach((o=>{let l=!1;if(d(m)&&Object.keys(m).forEach((e=>{const t=new RegExp(e);l=t.test(o)})),l||!1!==i||a(s,o)||r.push({messages:[E(ze,{property:o})],path:n,constrain:"unevaluatedProperties"}),!l&&b(i)&&!a(s,o)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),n=s.getErrors().map((e=>({messages:e.messages,path:o,constrain:"unevaluatedProperties"})));r=[...r,...n],s.destroy()}}))}return r}const St={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,propertie:ht,prefixItems:xt,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};const jt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:Qe,exclusiveMaximum:We,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,prefixItems:xt,propertyNames:function(e,t,s,i,n){const a=[],r=S(s);return b(t)&&d(r)&&Object.keys(t).forEach((t=>{new Ls({refParser:e.refParser,schema:r,data:t}).getErrors().length>0&&a.push({messages:[E(Ue,{propertyName:t})],path:n,constrain:"propertyNames"})})),a},properties:ht,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};class kt{constructor(e={}){this.refParser=e.refParser,this.validateFormat=!!e.validateFormat&&e.validateFormat,this.draft=jt,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":bt,"http://json-schema.org/draft-06/schema#":It,"http://json-schema.org/draft-07/schema#":wt,"https://json-schema.org/draft/2019-09/schema":St,"https://json-schema.org/draft/2020-12/schema":jt}}getErrors(e,s,i,n){let r=[];const o=te(s,"messages"),l=t(s);return g(l)&&!0===l?r:g(l)&&!1===l?[{messages:d(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach((t=>{if(a(l,t)){const a=(0,this.draft[t])(this,e,s,i,n);a&&(r=[...r,...a])}})),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Ot{constructor(){this.listeners=[]}on(e,t){this.listeners.push({name:e,callback:t})}off(e){this.listeners=this.listeners.filter((t=>t.name!==e))}emit(e,t=void 0){this.listeners.filter((t=>t.name===e)).forEach((e=>{e.callback(t)}))}destroy(){Object.keys(this).forEach((e=>{delete this[e]}))}}class Pt extends Ot{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=d(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",(()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())}))}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=t=>{this.jedi.register(t),t.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(h(this.value)){let e;const t=de(this.schema);"boolean"===t&&(e=!1),"number"===t&&(e=0),"integer"===t&&(e=0),"string"===t&&(e=""),"array"===t&&(e=[]),"object"===t&&(e={}),"null"===t&&(e=null),this.value=e}}setDefaultValue(){const e=T(this.schema);d(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,t=!0){const s=this.jedi.options.enforceConst||te(this.schema,"enforceConst");if(d(s)&&o(s,!0)){const t=O(this.schema);d(t)&&(e=t)}this.value=e,this.emit("set-value",e),t&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];return I(this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path))}prepare(){}activate(){!1===this.isActive&&(this.isActive=!0,this.emit("change"))}deactivate(){!0===this.isActive&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return!0===re(this.schema)&&(e=!0),this.parent&&!0===re(this.parent.schema)&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach((e=>{e.destroy()})),this.ui&&this.ui.destroy(),Object.keys(this).forEach((e=>{delete this[e]})),super.destroy()}}class Tt{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI();("always"===this.instance.jedi.options.showErrors||"always"===te(this.instance.schema,"showErrors"))&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})),this.instance.on("change",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}))}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",de(this.instance.schema))}build(){}enforceEnumDefault(){const e=te(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,t=B(this.instance.schema);d(t)&&!t.includes(this.instance.getValue())&&d(t[0])&&e&&this.instance.setValue(t[0],!1)}addEventListeners(){}showValidationErrors(e,t=!1){e=e.filter((e=>e.path===this.instance.path)),this.control.messages.innerHTML="",this.showingValidationErrors=!1;if(("never"===this.instance.jedi.options.showErrors||"never"===te(this.instance.schema,"showErrors"))&&!t||0===e.length)return;const s=ce(this.instance.schema)||this.instance.getKey();e.forEach((e=>{"properties"!==e.constraint&&e.messages.forEach((e=>{const t=this.getInvalidFeedback({message:s+": "+e});this.control.messages.appendChild(t)}))})),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach((e=>{this.disabled||this.readOnly?e.setAttribute("disabled",""):e.removeAttribute("disabled","")}))}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach((e=>{delete this[e]}))}}class Vt extends Tt{static resolves(e){return d(U(e))}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Ht extends Pt{setUI(){this.ui=new Vt(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach((s=>{if(d(s.then)){this.schemas.push(C({},t(this.schema),s.then)),this.switcherOptionValues.push(e);const i="then";this.switcherOptionsLabels.push(i),e++}if(d(s.else)){this.schemas.push(C({},t(this.schema),s.else)),this.switcherOptionValues.push(e);const i="else";this.switcherOptionsLabels.push(i),e++}}));const s=t(this.schema);delete s.if,delete s.then,delete s.else;const i=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent});this.schemas.forEach((e=>{const t=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent});this.instanceStartingValues.push(t.getValue()),t.on("change",(()=>{const e=this.activeInstance.getValue();this.getFittestIndex(e)!==this.index?this.setValue(e):(this.value=this.activeInstance.getValue(),this.emit("change"))})),this.instances.push(t)})),this.on("set-value",(e=>{this.instances.forEach((t=>{const s=t.getValue();b(s)&&b(e)&&(e=y(s,e),t.children.forEach((t=>{const s=O(t.schema);d(s)&&(e[t.getKey()]=s)}))),t.setValue(e,!1)}));const t=this.getFittestIndex(e);t!==this.index&&this.switchInstance(t)})),this.value=i.getValue(),i.destroy();const n=this.getFittestIndex(this.value);this.switchInstance(n)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const t=U(e);if(d(t)){const s=le(e),i=R(e);this.ifThenElseShemas.push({if:t,then:d(s)?s:{}}),this.ifThenElseShemas.push({if:t,else:d(i)?i:{}})}}getFittestIndex(e){let t=this.index;return this.ifThenElseShemas.forEach(((s,i)=>{const n=new Ls({schema:s.if,data:e,refParser:this.jedi.refParser}),a=n.getErrors();n.destroy(),0===a.length&&s.then&&(t=i),a.length>0&&s.else&&(t=i)})),t}destroy(){this.instances.forEach((e=>{e.destroy()})),super.destroy()}getAllOfCombinations(e){const t=[],s=(e,i)=>{if(0===i.length)return void t.push(e);const n=i[0];var a,r;s((a=e,r=n,{...a,...r}),i.slice(1)),s(e,i.slice(1))};for(let i=0;iObject.keys(e).length-Object.keys(t).length)),t}}class Mt extends Pt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",(()=>{this.onSetValue()}));const e=de(this.schema);if(d(k(this.schema))||d(he(this.schema))){const e=d(k(this.schema))?k(this.schema):he(this.schema),s=t(this.schema);delete s.anyOf,delete s.oneOf,delete s.options,e.forEach(((e,t)=>{e={...s,...e},this.jedi.refParser&&(e=this.jedi.refParser.expand(e));let i="Option-"+(t+1);const n=te(e,"switcherTitle"),a=ce(e);d(a)&&(i=a),d(n)&&(i=n),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(i),this.schemas.push(e)}))}else if(f(e))e.forEach(((e,t)=>{const s=C(this.schema),i={...s,type:e,title:e[0].toUpperCase()+e.slice(1)};d(s.title)&&(i.title=s.title),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(e.charAt(0).toUpperCase()+e.slice(1)),this.schemas.push(i)}));else if("any"===e||!e){const e=t(this.schema);this.schemas=[{...e,type:"object"},{...e,type:"array"},{...e,type:"string"},{...e,type:"number"},{...e,type:"integer"},{...e,type:"boolean"},{...e,type:"null"}],this.schemas.forEach(((e,t)=>{this.switcherOptionValues.push(t)})),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach((e=>{const s=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent,value:t(this.value)});d(this.value)&&s.setValue(this.value,!1),s.unregister(),s.off("change"),s.on("change",(()=>{this.value=this.activeInstance.getValue(),this.emit("change")})),this.instances.push(s),this.register()}));const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,t){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],d(t)&&this.activeInstance.setValue(t,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(l(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let t,s,i=0;for(const n of this.instances){const a=this.jedi.validator.getErrors(e,n.schema,n.getKey(),n.path);(h(t)||h(s))&&(t=i,s=a),a.length{e.destroy()})),super.destroy()}}class Rt extends Pt{}class Bt extends Pt{prepare(){this.properties={};const e=ae(this.schema);d(e)&&Object.keys(e).forEach((t=>{const s=e[t];this.properties[t]={schema:s};let i=!0;const n=this.jedi.options.deactivateNonRequired,a=te(this.schema,"deactivateNonRequired"),r=te(s,"deactivateNonRequired");this.isNotRequired(t)&&d(n)&&!0===n&&(i=!1),this.isNotRequired(t)&&d(a)&&!0===a&&(i=!1),this.isNotRequired(t)&&d(r)&&!0===r&&(i=!1),i&&this.createChild(s,t)})),this.refreshInstances(),this.on("set-value",(()=>{this.refreshInstances()}))}isRequired(e){const t=oe(this.schema);return d(t)&&t.includes(e)}isDependentRequired(e){const t=V(this.schema);if(d(t)){let s=[];return Object.keys(t).forEach((e=>{if(d(this.value[e])){const i=t[e];s=i.filter((e=>!a(this.value,e)))}})),s.includes(e)}return!1}createChild(e,s,i,n=!1){const a=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:t(i)});this.children.push(a),this.value[s]=a.getValue();const r=this.jedi.options.deactivateNonRequired||te(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&d(r)&&!0===r&&!n&&a.deactivate(),a}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let t=this.children.length-1;t>=0;t--){const s=this.children[t];s.getKey()===e&&(s.destroy(),this.children.splice(t,1),this.onChildChange())}}getChild(e){return this.children.find((t=>e===t.getKey().split(this.jedi.pathSeparator).pop()))}getPropertySchema(e){let t;const s=A(this.schema),i=ae(this.schema),n=ie(this.schema);return d(i)&&a(i,e)?t=i[e]:d(n)&&Object.keys(n).forEach((s=>{new RegExp(s).test(e)&&(t=n[s])})),h(t)&&d(s)&&(t=s),h(t)&&(t={}),t}onChildChange(){const e={};this.children.forEach((t=>{t.isActive&&(e[t.getKey()]=t.getValue())})),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort(((e,t)=>{const s=te(e.schema,"propertyOrder"),i=te(t.schema,"propertyOrder"),n=p(s),a=p(i);return!n&&a?1:n&&!a||si?1:0}))}refreshInstances(){const e=this.getValue();if(b(e)){Object.keys(e).forEach((t=>{const s=this.getChild(t);if(s){s.activate();const t=s.getValue(),i=e[s.getKey()];l(t,i)&&s.setValue(i,!1)}else{const s=this.getPropertySchema(t);this.createChild(s,t,e[t],!0)}}));for(let t=this.children.length-1;t>=0;t--){const s=this.children[t],i=s.getKey();h(e[i])&&(this.getChild(i)?s.deactivate():this.deleteChild(i))}this.sortChildrenByPropertyOrder()}}}class Nt extends Pt{prepare(){this.refreshChildren(),this.on("set-value",(()=>{this.refreshChildren()}))}createItemInstance(e){let s;const i=this.children.length,n=F(this.schema),a=ne(this.schema);s=d(n)?n:{};d(a)&&d(a[i])&&(s=a[i]);const r=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:t(e)});return d(e)&&r.setValue(e,!1),r}move(e,s){const i=t(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=t(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const s=t(this.getValue()).filter(((t,s)=>s!==e));this.setValue(s)}onChildChange(){const e=[];this.children.forEach((t=>{e.push(t.getValue())})),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();f(e)&&e.forEach((e=>{const t=this.createItemInstance(e);this.children.push(t)}))}}class qt extends Pt{}class Dt extends Pt{}class Ut extends Pt{}const Ft={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Kt={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},$t={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},zt={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},Jt={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},Gt={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Zt extends Tt{sanitize(e){return Boolean(e)}}class Qt extends Zt{static resolves(e){return"boolean"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t="true"===e.value;this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{const t="true"===e.value;e.checked=t===this.instance.getValue()}))}}class Wt extends Zt{static resolves(e){return"boolean"===de(e)}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e="true"===this.control.input.value;this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=!0===this.instance.getValue()?"true":"false"}}class Xt extends Zt{static resolves(e){return"boolean"===de(e)&&"checkbox"===te(e,"format")}build(){this.control=this.theme.getCheckboxControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.checked)}))}sanitize(e){return Boolean(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class _t extends Tt{sanitize(e){return String(e)}}class Yt extends _t{static resolves(e){return"string"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{this.instance.setValue(e.value)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=e.value===this.instance.getValue()}))}}class es extends _t{static resolves(e){return"string"===de(e)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ts extends _t{static resolves(e){return"string"===de(e)&&"textarea"===te(e,"format")}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ss extends _t{static resolves(e){return window.Awesomplete&&"string"===de(e)&&d(te(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,te(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class is extends _t{static resolves(e){return"string"===de(e)}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=te(this.instance.schema,"format");this.control=this.theme.getInputControl({type:is.getTypes().includes(e)?e:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===e,description:M(this.instance.schema)}),"color"===e&&0===this.instance.value.length&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ns extends Tt{sanitize(e){return"integer"===de(this.instance.schema)?Math.floor(Number(e)):Number(e)}}class as extends ns{static resolves(e){const t=de(e),s=B(e),i=te(e,"format");return("number"===t||"integer"===t)&&d(s)&&"radio"===i}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t=this.sanitize(e.value);this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=Number(e.value)===Number(this.instance.getValue())}))}}class rs extends ns{static resolves(e){const t=de(e);return("number"===t||"integer"===t)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class os extends ns{static resolves(e){const t=de(e);return"number"===t||"integer"===t}build(){this.control=this.theme.getInputControl({type:"number",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class ls extends Tt{static resolves(e){return"object"===de(e)}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let t=!0;const s=A(this.instance.schema);d(s)&&!1===s&&(t=!1);let i=!1;d(this.instance.jedi.options.enablePropertiesToggle)&&(i=this.instance.jedi.options.enablePropertiesToggle),d(e.enablePropertiesToggle)&&(i=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enablePropertiesToggle:i,addProperty:t,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",(()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(0===e.length)return;if(d(this.instance.value[e]))return;const t=this.instance.getPropertySchema(e),s=this.instance.createChild(t,e);s.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const i=this.control.ariaLive;i.innerHTML="";const n=ce(s.schema),a=d(n)?n:e,r=this.theme.getAriaLiveMessage();r.textContent=a+" field was added to the form",i.appendChild(r),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}))}sanitize(e){return b(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=te(this.instance.schema,"enablePropertiesToggle");if(o(this.instance.jedi.options.enablePropertiesToggle,!0)||o(e,!0)){const e=this.instance.children.map((e=>e.getKey()));for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);e.forEach((e=>{const t=this.instance.isRequired(e),s=this.instance.isDependentRequired(e),i=!t&&!s,r=this.control.ariaLive,o=this.instance.getPropertySchema(e),l=ce(o),c=n(this.instance.path+this.instance.jedi.pathSeparator+e)+"-activator",h=d(l)?l:e;if(i){const t=this.theme.getCheckboxControl({id:c,label:h,titleHidden:!1}),s=t.input;this.propertyActivators[e]=s,s.addEventListener("change",(()=>{r.innerHTML="";const t=this.theme.getAriaLiveMessage();if(s.checked){this.instance.getChild(e)||this.instance.createChild(o,e),this.instance.getChild(e).activate(),t.textContent=h+" field was added to the form",r.appendChild(t)}else this.instance.getChild(e).deactivate(),t.textContent=h+" field was removed from the form",r.appendChild(t);this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})),this.control.propertiesActivators.appendChild(t.container)}const p=this.propertyActivators[e];p&&(p.disabled=this.disabled,p.checked=a(this.instance.getValue(),e))}))}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach((e=>{e.isActive?(null===e.ui.control.container.parentNode&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)}))}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class cs extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach((t=>{if(t.isActive){const s=te(t.schema,"grid"),i=(null==s?void 0:s.columns)||12,n=(null==s?void 0:s.offset)||0,a=this.theme.getCol(12,i,n);((null==s?void 0:s.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(a),a.appendChild(t.ui.control.container),this.disabled||this.instance.isReadOnly()?t.ui.disable():t.ui.enable()}}))}}class ds extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{if(e.isActive){const s=t===this.activeTabIndex,i=n(e.path),a=ce(e.schema),l=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:d(a)?a:e.getKey(),id:i,active:s});l.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,s,i),o.appendChild(l.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()}}))}}class hs extends Tt{static resolves(e){return"array"===de(e)}build(){this.control=this.theme.getArrayControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.instance.addItem()}))}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return f(e)?e:[]}isSortable(){return window.Sortable&&d(te(this.instance.schema,"sortable"))}refreshUI(){const e=z(this.instance.schema),t=W(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach((e=>{const s=Number(e.getKey()),i=this.theme.getDeleteItemBtn(),n=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),r=this.theme.getBtnGroup(),{container:o,arrayActions:l,body:c}=this.theme.getArrayItem();if(l.appendChild(r),r.appendChild(i),r.appendChild(n),r.appendChild(a),this.isSortable()){const e=this.theme.getDragItemBtn();r.appendChild(e)}this.control.childrenSlot.appendChild(o),c.appendChild(e.ui.control.container),i.addEventListener("click",(()=>{const t=Number(e.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(t)})),n.addEventListener("click",(()=>{const e=s-1;this.instance.move(s,e)})),a.addEventListener("click",(()=>{const e=s+1;this.instance.move(s,e)})),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),d(t)&&this.instance.value.length<=t&&i.setAttribute("disabled","")})),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:e=>{this.instance.move(e.oldIndex,e.newIndex)}})),d(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ps extends hs{static resolves(e){return"array"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{const s=this.theme.getDeleteItemBtn(),i=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn();let l;e.ui.control.arrayActions.innerHTML="",e.ui.control.arrayActions.appendChild(s),e.ui.control.arrayActions.appendChild(i),e.ui.control.arrayActions.appendChild(a),this.control.childrenSlot.appendChild(e.ui.control.container);const c=te(this.instance.schema,"itemTemplate");if(c){l=E(c,{i0:t,i1:t+1,value:e.getValue()})}else{const s=ce(e.schema);l=d(s)?s+" "+(t+1):e.getKey()}s.addEventListener("click",(()=>{this.activeTabIndex=x(t-1,0,this.instance.value.length-1),this.instance.deleteItem(t)})),i.addEventListener("click",(()=>{const e=t-1;this.activeTabIndex=e,this.instance.move(t,e)})),a.addEventListener("click",(()=>{const e=t+1;this.activeTabIndex=e,this.instance.move(t,e)}));const h=t===this.activeTabIndex,p=n(e.path),u=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:l,id:p,active:h});u.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,h,p),o.appendChild(u.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),0===t&&i.setAttribute("disabled",""),this.instance.value.length-1===t&&a.setAttribute("disabled","")}))}}class us extends Tt{static resolves(e){const t=de(e),s=he(e);return d(k(e))||d(s)||"any"===t||f(t)||h(t)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class ms extends Tt{static resolves(e){return"null"===de(e)}build(){this.control=this.theme.getNullControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}sanitize(){return null}}class gs extends _t{static resolves(e){return window.Quill&&"string"===de(e)&&d(te(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,te(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",(()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class fs extends _t{static resolves(e){return window.Jodit&&"string"===de(e)&&d(te(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,te(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",(()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class bs extends _t{static resolves(e){return window.flatpickr&&"string"===de(e)&&d(te(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,te(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class vs extends ns{static resolves(e){return"undefined"!=typeof Raty&&"number"===de(e)&&d(te(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},te(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class Cs extends Tt{static resolves(e){const t=de(e),s=F(e),i=d(s)&&de(s),n=d(t)&&"array"===t,a=!0===ue(e),r=d(s)&&d(B(e.items)),o=d(s)&&d(i),l=["string","number","integer"],c=d(s)&&d(i)&&(l.includes(i)||f(i)&&i.some((e=>l.includes(e))));return n&&a&&r&&o&&c}build(){this.control=this.theme.getCheckboxesControl({values:B(this.instance.schema.items),titles:te(this.instance.schema.items,"enumTitles")||B(this.instance.schema.items),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach((e=>{e.addEventListener("change",(()=>{const t=this.instance.getValue();if(e.checked)t.push(e.value);else{const s=t.indexOf(e.value);s>-1&&t.splice(s,1)}this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach((t=>{t.checked=e.includes(t.value)}))}}class ys{constructor(e){this.customEditors=e.customEditors??[],this.editors=[us,Vt,Qt,Xt,Wt,Yt,es,ts,ss,gs,fs,bs,is,vs,as,rs,os,cs,ds,ls,Cs,ps,hs,ms]}getClass(e){for(const t of this.customEditors)if(t.resolves(e))return t;for(const t of this.editors)if(t.resolves(e))return t;return null}}class Ls extends Ot{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new ys({customEditors:this.options.customEditors}),this.theme=this.options.theme,d(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Ft;break;case"bootstrap-icons":this.theme.icons=Kt;break;case"fontawesome3":this.theme.icons=$t;break;case"fontawesome4":this.theme.icons=zt;break;case"fontawesome5":this.theme.icons=Jt;break;case"fontawesome6":this.theme.icons=Gt}this.schema=this.options.schema,this.validator=new kt({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),d(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",(()=>{this.emit("change")})),this.hiddenInput&&this.on("change",(()=>{this.hiddenInput.value=JSON.stringify(this.getValue())}))}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&b(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach((e=>{this.hiddenInput.setAttribute(e,this.options.hiddenInputAttributes[e])})),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||te(e.schema,"mergeAllOf")){const t=j(e.schema);d(t)&&t.forEach((t=>{e.schema=C({},e.schema,t)}))}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const t=de(e.schema),s=he(e.schema),i=k(e.schema),n=U(e.schema);return d(i)||d(s)||"any"===t||f(t)||h(t)?new Mt(e):d(n)?new Ht(e):"object"===t?new Bt(e):"array"===t?new Nt(e):"string"===t?new qt(e):"number"===t||"integer"===t?new Dt(e):"boolean"===t?new Rt(e):"null"===t?new Ut(e):void 0}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach((t=>{const s=this.instances[t];e=[...e,...s.getErrors()]})),e}showValidationErrors(e=null){if(!this.options.container)return!1;const t=e||this.getErrors();Object.keys(this.instances).forEach((e=>{this.instances[e].ui.showValidationErrors(t,!0)}))}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach((e=>{delete this[e]}))}}class Es{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const t=document.createElement("legend"),s=document.createElement("span");return t.classList.add("jedi-editor-legend"),s.classList.add("jedi-editor-legend-text"),t.setAttribute("aria-labelledby","#legend-"+e.id),s.textContent=e.textContent,s.setAttribute("id","#legend-"+e.id),t.appendChild(s),t}getLabel(e){const t=document.createElement("label");t.setAttribute("for",e.for);const s=this.getIcon(e.labelIconClass),i=document.createElement("span");return i.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(t),t.classList.add("jedi-title"),t.appendChild(s),t.appendChild(i),{label:t,labelText:i,icon:s}}getIcon(e=""){const t=document.createElement("i");let s=e.split(" ");return s=s.filter((e=>e.length>0)),s&&s.forEach((e=>{t.classList.add(e)})),t}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const t=document.createElement("div");return t.classList.add("jedi-messages-slot"),t.setAttribute("aria-atomic","false"),t.setAttribute("aria-live","polite"),e.id&&t.setAttribute("id",e.id),t}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const t=this.getButton(e);return t.classList.add("jedi-properties-toggle"),t.addEventListener("click",(()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()})),t}getCollapse(e){const t=document.createElement("div");return t.classList.add("jedi-collapse"),t.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(t.style.display="none"),t}getCollapseToggle(e){const t=this.getButton(e);t.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&t.addEventListener("click",(()=>{"none"===e.collapse.style.display?e.collapse.style.display="block":e.collapse.style.display="none"}));let s=e.startCollapsed;return t.style.transition="transform 0.1s ease",s&&(t.style.transform="rotate(90deg)"),t.addEventListener("click",(()=>{t.style.transform=s?"rotate(0deg)":"rotate(90deg)",s=!s})),t}getPropertiesSlot(e){const t=document.createElement("dialog");return t.classList.add("jedi-properties-slot"),t.setAttribute("id",e.id),window.addEventListener("click",(e=>{e.target===t&&t.close()})),t}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const t=document.createElement("p");return t.classList.add("jedi-aria-live-message"),t.textContent=e,this.visuallyHidden(t),t}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const t=document.createElement("button");t.classList.add("jedi-btn"),t.setAttribute("type","button"),e.value&&(t.value=e.value),e.id&&t.setAttribute("id",e.id);const s=document.createElement("span");if(s.textContent=e.textContent,this.icons&&e.icon){const i=this.getIcon(this.icons[e.icon]);i.setAttribute("title",e.textContent),t.appendChild(i),this.visuallyHidden(s)}return t.appendChild(s),t}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const t=document.createElement("small");return t.classList.add("jedi-description"),e.textContent&&(t.textContent=e.textContent),e.id&&t.setAttribute("id",e.id),t}getPlaceholderControl(e){const t=document.createElement("div"),s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c});return t.appendChild(a),t.appendChild(s),t.appendChild(l),t.appendChild(d),t.appendChild(i),i.appendChild(n),{container:t,placeholder:s,label:a,labelText:r,description:l,messages:d,actions:i,arrayActions:n}}getObjectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getPropertiesAriaLive(),r=this.getDescription({textContent:e.description}),o=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getPropertiesSlot({id:"properties-slot-"+e.id}),d=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:c}),h="collapse-"+e.id,p=this.getCollapse({id:h,startCollapsed:e.startCollapsed}),u=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:h,collapse:p,startCollapsed:e.startCollapsed}),m=this.getPropertiesActivators(),g=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),f=this.getAddPropertyButton(),b=this.getFieldset(),v=this.getLegend({textContent:e.title,id:e.id});return f.classList.add("jedi-object-add"),t.appendChild(b),t.appendChild(c),b.appendChild(v),b.appendChild(p),p.appendChild(n),n.appendChild(r),n.appendChild(o),v.appendChild(s),s.appendChild(i),n.appendChild(l),e.addProperty&&(c.appendChild(g.container),c.appendChild(f),c.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(s.appendChild(d),c.appendChild(a),c.appendChild(m)),e.enableCollapseToggle&&s.appendChild(u),{container:t,collapse:p,collapseToggle:u,body:n,actions:s,messages:o,childrenSlot:l,propertiesToggle:d,propertiesContainer:c,addPropertyControl:g,addPropertyBtn:f,ariaLive:a,propertiesActivators:m,arrayActions:i}}getArrayControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getDescription({textContent:e.description}),r=this.getMessagesSlot(),o=this.getChildrenSlot(),l=this.getBtnGroup(),c=this.getArrayBtnAdd(),d=this.getFieldset(),h=this.getLegend({textContent:e.title,id:e.id}),p="collapse-"+e.id,u=this.getCollapse({id:p,startCollapsed:e.startCollapsed}),m=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:p,collapse:u,startCollapsed:e.startCollapsed});return t.appendChild(d),d.appendChild(h),d.appendChild(u),u.appendChild(n),n.appendChild(a),n.appendChild(r),h.appendChild(s),s.appendChild(l),l.appendChild(c),s.appendChild(i),n.appendChild(o),e.enableCollapseToggle&&s.appendChild(m),{container:t,collapseToggle:m,collapse:u,body:n,actions:s,messages:r,childrenSlot:o,btnGroup:l,addBtn:c,arrayActions:i}}getArrayItem(){const e=document.createElement("div"),t=this.getCard(),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardHeader(),a=this.getCardBody();return e.appendChild(t),t.appendChild(n),t.appendChild(a),n.appendChild(s),s.appendChild(i),{container:e,card:t,header:n,body:a,actions:s,arrayActions:i}}getMultipleControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),t.appendChild(o),t.appendChild(s),s.appendChild(a),s.appendChild(r),a.appendChild(i),e.switcher&&i.appendChild(d.container),i.appendChild(n),r.appendChild(l),r.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getIfThenElseControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),e.switcher&&t.appendChild(d.container),r.appendChild(o),t.appendChild(l),t.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getNullControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),{label:n,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),r=e.id+"-description",o=this.getDescription({textContent:e.description,id:r}),l=this.getMessagesSlot(),c=document.createElement("br");return t.appendChild(n),t.appendChild(c),t.appendChild(o),t.appendChild(l),t.appendChild(s),s.appendChild(i),{container:t,label:n,labelText:a,description:o,messages:l,actions:s,arrayActions:i}}getTextareaControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("textarea");n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getInputControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("input");n.setAttribute("type",e.type),n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getRadiosControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","radio"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),n.appendChild(d),n.appendChild(l),{container:t,fieldset:n,legend:r,body:a,radios:p,labels:u,labelTexts:m,radioControls:h,description:d,messages:l,actions:s,arrayActions:i}}getCheckboxControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("div"),a=document.createElement("input");a.setAttribute("type","checkbox"),a.setAttribute("id",e.id);const{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",h=this.getMessagesSlot({id:d}),p=d+" "+l;return a.setAttribute("aria-describedby",p),t.appendChild(n),t.appendChild(s),s.appendChild(i),n.appendChild(a),n.appendChild(r),n.appendChild(c),n.appendChild(h),{container:t,formGroup:n,input:a,label:r,labelText:o,description:c,messages:h,actions:s,arrayActions:i}}getCheckboxesControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","checkbox"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),a.appendChild(d),a.appendChild(l),{container:t,fieldset:n,legend:r,body:a,checkboxes:p,labels:u,labelTexts:m,checkboxControls:h,description:d,messages:l,actions:s,arrayActions:i}}getSelectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("select");n.setAttribute("id",e.id),e.values.forEach(((t,s)=>{const i=document.createElement("option");i.setAttribute("value",t),e.titles&&e.titles[s]&&(i.textContent=e.titles[s]),n.appendChild(i)}));const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getSwitcher(e){const t=document.createElement("span"),s=document.createElement("select");s.setAttribute("id",e.id),e.values.forEach(((t,i)=>{const n=document.createElement("option");n.setAttribute("value",t),e.titles&&e.titles[i]&&(n.textContent=e.titles[i]),s.appendChild(n)}));const{label:i,labelText:n}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return t.appendChild(i),t.appendChild(s),{container:t,input:s,label:i,labelText:n}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return s.textContent=e.message,i.textContent="⚠ ",i.classList.add("jedi-error-message"),i.setAttribute("aria-hidden","true"),t.classList.add("jedi-error-message"),t.appendChild(i),t.appendChild(s),t}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,t,s){const i=document.createElement("div");return i.classList.add("jedi-col-xs-"+e),i.classList.add("jedi-col-md-"+t),s&&i.classList.add("jedi-col-md-offset-"+s),i}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const t=document.createElement("li"),s=document.createElement("a");return s.classList.add("jedi-nav-link"),s.setAttribute("href","#"+e.id),s.textContent=e.hasErrors?"⚠ "+e.title:e.title,t.appendChild(s),{list:t,link:s}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,t,s){e.setAttribute("id",s),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}return{Schema:me,Utils:w,EditorBoolean:Zt,EditorBooleanEnumRadio:Qt,EditorBooleanEnumSelect:Wt,EditorBooleanCheckbox:Xt,EditorString:_t,EditorStringEnumRadio:Yt,EditorStringEnumSelect:es,EditorStringTextarea:ts,EditorStringAwesomplete:ss,EditorStringInput:is,EditorNumber:ns,EditorNumberEnumRadio:as,EditorNumberEnumSelect:rs,EditorNumberInput:os,EditorObjectGrid:cs,EditorObjectNav:ds,EditorObject:ls,EditorArrayNav:ps,EditorArray:hs,EditorMultiple:us,EditorIfThenElse:Vt,EditorNull:ms,Theme:Es,ThemeBootstrap3:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("in"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h5"),t.classList.add("panel-heading"),t.classList.add("pull-left"),t.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.setAttribute("style","margin-right: 5px;"),t}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("panel-heading"),t.classList.add("text-right"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-xs"),t.classList.add("btn-default"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{body:s,radios:i,labels:n,labelTexts:a,radioControls:r,description:o,messages:l}=t;return r.forEach(((e,t)=>{e.classList.add("radio"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),s.appendChild(o),s.appendChild(l),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{body:s,checkboxes:i,labels:n,labelTexts:a,checkboxControls:r}=t;return r.forEach(((e,t)=>{e.classList.add("checkbox"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,labelText:r,description:o,messages:l}=t;return i.classList.add("checkbox"),s.appendChild(i),i.appendChild(a),a.appendChild(n),a.appendChild(r),i.appendChild(o),i.appendChild(l),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow();return i.classList.add("col-xs-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("col-md-offset-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("nav-stacked"),!1===e.stacked&&t.classList.remove("nav-stacked"),t}getTab(e){const t=super.getTab(e);return e.active&&t.list.classList.add("active"),t.link.setAttribute("data-toggle","tab"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap4:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("float-left"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("mr-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("form-group"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("form-group"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return i.classList.add("form-group"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("form-group"),i.classList.add("form-control"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("form-text"),t.classList.add("d-block"),t}getColumnClass(e,t){return"col-"+e+"-"+t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList();return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap5:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-bs-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("me-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("mb-3"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("mb-3"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return s.classList.add("mb-3"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(a),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("mb-3"),i.classList.add("form-select"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("d-block"),t.classList.add("form-text"),t.classList.add("form-text"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-bs-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}},RefParser:class{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);!1===this.refsResolved();)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every((e=>null!==e))}async collectRefs(e,t="#"){if("object"==typeof e&&null!==e)for(const[s,i]of Object.entries(e)){const n=t?`${t}/${s}`:`/${s}`;if(this.hasRef(e)){const t=e.$ref;if(this.isExternalRef(t)){const e=await this.load(t);this.refs[t]=e,await this.collectRefs(e,n)}else this.refs[t]=this.data[t]??null}this.data[t]=e,await this.collectRefs(i,n)}}hasRef(e){return void 0!==e.$ref&&"string"==typeof e.$ref}isExternalRef(e){return"string"==typeof e&&(e.startsWith("http")||e.startsWith("https"))}isObject(e){return null!==e&&"object"==typeof e}expand(e){const t=JSON.parse(JSON.stringify(e));if(this.isObject(t)&&this.hasRef(t)){const e=t.$ref;return delete t.$ref,this.expand(C({},this.refs[e],t))}return t}async load(e){try{const t=await fetch(e);if(!t.ok)throw new Error("Network response was not ok");return await t.json()}catch(t){throw console.error("Error loading",e,t),t}}},Create:Ls}})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Jedi=t()}(this,(function(){"use strict";function e(){const e=[];return function(t,s){if("object"!=typeof s||null===s)return s;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(s)?"[Circular]":(e.push(s),s)}}function t(t){if(void 0!==t)return JSON.parse(JSON.stringify(t,e()))}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function i(e,t,i){return e.replace(new RegExp(s(t),"g"),i)}function n(e){return i(i(e,"#","root"),"/","-")}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){return Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{})}function o(e,t){return b(e)&&b(t)&&(e=r(e),t=r(t)),JSON.stringify(e)===JSON.stringify(t)}function l(e,t){return!o(e,t)}function c(e){return null===e}function d(e){return void 0!==e}function h(e){return void 0===e}function p(e){return"number"==typeof e}function u(e){return p(e)&&e===Math.floor(e)}function m(e){return"string"==typeof e}function g(e){return"boolean"==typeof e}function f(e){return Array.isArray(e)}function b(e){return!c(e)&&!f(e)&&"object"==typeof e}function v(e){let t="any";return p(e)?t=u(e)?"integer":"number":m(e)?t="string":g(e)?t="boolean":f(e)?t="array":c(e)?t="null":b(e)&&(t="object"),t}function C(e,...t){if(!t.length)return e;const s=t.shift();return b(e)&&b(s)&&Object.keys(s).forEach((t=>{b(s[t])?(e[t]||Object.assign(e,{[t]:{}}),C(e[t],s[t])):Object.assign(e,{[t]:s[t]})})),C(e,...t)}const y=(e,t)=>(Object.keys(t).forEach((s=>{s in e&&typeof e[s]==typeof t[s]&&(b(e[s])&&b(t[s])?y(e[s],t[s]):e[s]=t[s])})),e);function L(e,t){const s=t.split(".");let i=e;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const e=parseInt(n);if(!(e>=0&&e{const s=(e=e.replace(/\s/g,"")).split(/{{|}}/)[1];return L(t,s)}))}function x(e,t,s){return Math.max(t,Math.min(e,s))}function I(e){const t=[],s=new Set;for(const i of e){const e=JSON.stringify(i);s.has(e)||(s.add(e),t.push(i))}return t}const w={getCircularReplacer:e,clone:t,escapeRegExp:s,replaceAll:i,pathToAttribute:n,hasOwn:a,sortObject:r,equal:o,different:l,isNull:c,isSet:d,notSet:h,isNumber:p,isInteger:u,isString:m,isBoolean:g,isArray:f,isObject:b,getType:v,mergeDeep:C,overwriteExistingProperties:y,getValueByJSONPath:L,compileTemplate:E,clamp:x,removeDuplicatesFromArray:I};function A(e){return b(e.additionalProperties)||g(e.additionalProperties)?e.additionalProperties:void 0}function S(e){return b(e.propertyNames)||g(e.propertyNames)?e.propertyNames:void 0}function j(e){return f(e.allOf)?e.allOf:void 0}function k(e){return f(e.anyOf)?e.anyOf:void 0}function O(e){return e.const}function P(e){return b(e.contains)||g(e.contains)?e.contains:void 0}function T(e){return e.default}function V(e){return b(e.dependentRequired)?e.dependentRequired:void 0}function H(e){return b(e.dependentSchemas)?e.dependentSchemas:void 0}function M(e){return m(e.description)?e.description:void 0}function R(e){return b(e.else)||g(e.else)?e.else:void 0}function B(e){if(f(e.enum)&&e.enum.length>0)return e.enum}function N(e){return p(e.exclusiveMaximum)?e.exclusiveMaximum:void 0}function q(e){return p(e.exclusiveMinimum)?e.exclusiveMinimum:void 0}function D(e){return m(e.format)?e.format:void 0}function U(e){return b(e.if)||g(e.if)?e.if:void 0}function F(e){return b(e.items)||g(e.items)?e.items:void 0}function K(e){return p(e.maximum)?e.maximum:void 0}function $(e){if(u(e.maxContains)&&e.maxContains>=0)return e.maxContains}function z(e){if(u(e.maxItems)&&e.maxItems>=0)return e.maxItems}function J(e){if(u(e.maxLength)&&e.maxLength>=0)return e.maxLength}function G(e){if(u(e.maxProperties))return e.maxProperties}function Z(e){return p(e.minimum)?e.minimum:void 0}function W(e){if(u(e.minContains)&&e.minContains>=0)return e.minContains}function Q(e){if(u(e.minItems)&&e.minItems>=0)return e.minItems}function X(e){if(u(e.minLength)&&e.minLength>=0)return e.minLength}function _(e){if(u(e.minProperties)&&e.minProperties>=0)return e.minProperties}function Y(e){if(p(e.multipleOf)&&e.multipleOf>=0)return e.multipleOf}function ee(e){return b(e.not)||g(e.not)?e.not:void 0}function te(e,t){return e["x-options"]&&d(e["x-options"][t])?e["x-options"][t]:void 0}function se(e){return m(e.pattern)?e.pattern:void 0}function ie(e){return b(e.patternProperties)?e.patternProperties:void 0}function ne(e){return f(e.prefixItems)?e.prefixItems:void 0}function ae(e){return b(e.properties)?e.properties:void 0}function re(e){return g(e.readOnly)?e.readOnly:void 0}function oe(e){return f(e.required)?[...new Set(e.required)]:void 0}function le(e){return b(e.then)||g(e.then)?e.then:void 0}function ce(e){return m(e.title)?e.title:void 0}function de(e){if(m(e.type)||f(e.type))return e.type}function he(e){return f(e.oneOf)?e.oneOf:void 0}function pe(e){return g(e.unevaluatedProperties)?e.unevaluatedProperties:void 0}function ue(e){return g(e.uniqueItems)?e.uniqueItems:void 0}const me={getSchemaX:function(e,t){return e["x-"+t]},getSchemaSchema:function(e){return m(e.$schema)?e.$schema:void 0},getSchemaAdditionalProperties:A,getSchemaPropertyNames:S,getSchemaAllOf:j,getSchemaAnyOf:k,getSchemaConst:O,getSchemaContains:P,getSchemaDefault:T,getSchemaDependentRequired:V,getSchemaDependentSchemas:H,getSchemaDescription:M,getSchemaElse:R,getSchemaEnum:B,getSchemaExclusiveMaximum:N,getSchemaExclusiveMinimum:q,getSchemaFormat:D,getSchemaIf:U,getSchemaItems:F,getSchemaMaximum:K,getSchemaMaxContains:$,getSchemaMaxItems:z,getSchemaMaxLength:J,getSchemaMaxProperties:G,getSchemaMinimum:Z,getSchemaMinContains:W,getSchemaMinItems:Q,getSchemaMinLength:X,getSchemaMinProperties:_,getSchemaMultipleOf:Y,getSchemaNot:ee,getSchemaXOption:te,getSchemaPattern:se,getSchemaPatternProperties:ie,getSchemaPrefixItems:ne,getSchemaProperties:ae,getSchemaReadOnly:re,getSchemaRequired:oe,getSchemaThen:le,getSchemaTitle:ce,getSchemaType:de,getSchemaOneOf:he,getSchemaUnevaluatedProperties:pe,getSchemaUniqueItems:ue};function ge(e,t,s,i,n){let a=[];const r=j(s);return d(r)&&(r.forEach((s=>{const r=new Ls({refParser:e.refParser,schema:s,data:t,rootName:i}),o=r.getErrors();r.destroy(),o.forEach((e=>{e.path=n})),a.push(...o)})),a=I(a)),a}const fe='Has additional property "{{ property }}" but no additional properties are allowed.',be="Must validate against at least one of the provided schemas.",ve="Must have value of: {{ const }}.",Ce="Must contain at least one item matching the provided schema.",ye="Must have the required properties: {{ dependentRequired }}.",Le="Must be one of the enumerated values: {{ enum }}.",Ee="Must be less than {{ exclusiveMaximum }}.",xe="Must be greater than {{ exclusiveMinimum }}.",Ie="Must be a valid {{ format }}.",we="Must have items that validate against the provided schema.",Ae="Must be at most {{ maximum }}.",Se="Must have at most {{ maxItems }} items.",je="Must be at most {{ maxLength }} characters long.",ke="Must have at most {{ maxProperties }} properties.",Oe="Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",Pe="Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",Te="Must be at least {{ minimum }}.",Ve="Must have at least {{ minItems }} items.",He="Must be at least {{ minLength }} characters long.",Me="Must have at least {{ minProperties }} properties.",Re="Must be multiple of {{ multipleOf }}.",Be="Must not validate against the provided schema.",Ne="Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",qe='Must match the pattern: "{{ pattern }}".',De="Item {{ index }} fails validation.",Ue='Property name "{{ propertyName }}" fails validation.',Fe="The following properties do not comply with their schemas: {{ properties }}",Ke="Must have the required properties: {{ required }}.",$e="Must be of type {{ type }}.",ze='Has invalid unevaluated property "{{ property }}"',Je="Must have unique items.";function Ge(e,t,s,i,n){const a=[],r=X(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&(s=!0)})),s||a.push({messages:[be],path:n,constrain:"anyOf"})}return a}function We(e,t,s,i,n){const a=[],r=B(s);if(d(r)){!r.some((e=>JSON.stringify(t)===JSON.stringify(e)))&&a.push({messages:[E(Le,{enum:JSON.stringify(r)})],path:n,constrain:"enum"})}return a}function Qe(e,t,s,i,n){const a=[],r=N(s);if(p(t)&&d(r)){t>=r&&a.push({messages:[E(Ee,{exclusiveMaximum:r})],path:n,constrain:"exclusiveMaximum"})}return a}function Xe(e,t,s,i,n){const a=[],r=q(s);if(p(t)&&d(r)){t<=r&&a.push({messages:[E(xe,{exclusiveMinimum:r})],path:n,constrain:"exclusiveMinimum"})}return a}function _e(e,t,s,i,n){const a=[],r=D(s);let o=e.validateFormat;if(te(s,"validateFormat")&&(o=s.options.validateFormat),d(r)&&m(t)&&o){let e;"email"===r&&(e=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),"url"===r&&(e=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),"uuid"===r&&(e=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i));d(e)&&!e.test(t)&&a.push({messages:[E(Ie,{format:r})],path:n,constrain:"format"})}return a}function Ye(e,t,s,i,n){const a=[],r=F(s),o=ne(s);if(f(t)&&d(r)){const e=d(o)?o.length:0;!1===r&&t.length>0&&t.length>e&&a.push({messages:[we],path:n,constrain:"items"})}return a}function et(e,t,s,i,n){const a=[],r=z(s);if(f(t)&&d(r)){t.length>r&&a.push({messages:[E(Se,{maxItems:r})],path:n,constrain:"maxItems"})}return a}function tt(e,t,s,i,n){const a=[],r=J(s);if(m(t)&&d(r)){(t=t.replace(/[\uDCA9]/g,"")).length>r&&a.push({messages:[E(je,{maxLength:r})],path:n,constrain:"maxLength"})}return a}function st(e,t,s,i,n){const a=[],r=G(s);if(b(t)&&d(r)){Object.keys(t).length>r&&a.push({messages:[E(ke,{maxProperties:r})],path:n,constrain:"maxProperties"})}return a}function it(e,t,s,i,n){const a=[],r=Z(s);if(p(t)&&d(r)){t{const n=new Ls({refParser:e.refParser,schema:i,data:t}),a=n.getErrors();n.destroy(),0===a.length&&s++})),1!==s&&a.push({messages:[E(Ne,{counter:s})],path:n,constrain:"oneOf"})}return a}function ct(e,t,s,i,n){const a=[],r=se(s);if(m(t)&&d(r)){!new RegExp(r).test(t)&&a.push({messages:[E(qe,{pattern:r})],path:n,constrain:"pattern"})}return a}function dt(e,t,s,i){let n=[];const a=ie(s);return b(t)&&d(a)&&Object.keys(t).forEach((s=>{Object.keys(a).forEach((r=>{if(new RegExp(r).test(s)){const o=a[r],l=new Ls({refParser:e.refParser,schema:o,data:t[s]}),c=l.getErrors().map((e=>({messages:e.messages,path:i+"/"+s,constrain:"patternProperties"})));n=[...n,...c],l.destroy()}}))})),n}function ht(e,t,s,i){const n=ae(s),r=[];return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(a(t,s)){const i=n[s],a=new Ls({refParser:e.refParser,schema:i,data:t[s]});a.getErrors().length>0&&r.push(s),a.destroy()}})),r.length>0?[{messages:[E(Fe,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function pt(e,t,s,i,n){const a=[],r=oe(s);if(b(t)&&d(r)){const e=[],s=Object.keys(t);r.forEach((t=>{s.includes(t)||e.push(t)}));e.length>0&&a.push({messages:[E(Ke,{required:e.join(", ")})],path:n,constrain:"required"})}return a}function ut(e,t,s,i,n){const a=[],r=de(s);if("any"===r)return a;if(d(r)){const e={string:e=>m(e),number:e=>p(e),integer:e=>u(e),boolean:e=>g(e),array:e=>f(e),object:e=>b(e),null:e=>c(e)};let s=!0;s=f(r)?r.some((s=>e[s](t))):e[r](t),s||a.push({messages:[E($e,{type:r,valueType:v(t)})],path:n,constrain:"type"})}return a}function mt(e,t,s,i,n){const a=[],r=K(s);if(p(t)&&d(r)){t>r&&a.push({messages:[E(Ae,{maximum:r})],path:n,constrain:"maximum"})}return a}function gt(e,t,s,i,n){const a=[],o=ue(s);if(f(t)&&d(o)&&!0===o){const e=[];let s=!1;for(let i=0;ie===a)),s)break;e.push(a)}s&&a.push({messages:[Je],path:n,constrain:"uniqueItems"})}return a}function ft(e,t,s,i,n){const r=[],o=A(s),l=ie(s),c=ae(s);if(b(t)&&d(o)){const s=c||{},i=o,d=l||{};Object.keys(t).forEach((o=>{const l=Object.keys(d).some((e=>new RegExp(e).test(o))),c=a(s,o);if(!l&&!c)if(!1===i)r.push({messages:[E(fe,{property:o})],path:n,constrain:"additionalProperties"});else if(b(i)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),a=s.getErrors().map((e=>({messages:e.messages,path:`${n}.${o}`,constrain:"additionalProperties"})));r.push(...a),s.destroy()}}))}return r}const bt={additionalProperties:ft,allOf:ge,anyOf:Ze,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,required:pt,type:ut,uniqueItems:gt};function vt(e,t,s,i,n){const a=[],r=O(s);if(d(r)){l(t,r)&&a.push({messages:[E(ve,{const:JSON.stringify(r)})],path:n,constrain:"const"})}return a}function Ct(e,t,s,i,n){const a=[],r=P(s),o=W(s),l=$(s);if(f(t)&&d(r)){let s=0;t.forEach((t=>{const i=new Ls({refParser:e.refParser,schema:r,data:t});0===i.getErrors().length&&s++,i.destroy()}));const i=0===s;if(d(o)){sl&&a.push({messages:[E(Oe,{counter:s,maxContains:l})],path:n,constrain:"maxContains"})}}return a}function yt(e,t,s,i,n){const r=[],o=V(s);if(b(t)&&d(o)){let e=[];Object.keys(o).forEach((s=>{if(d(t[s])){const i=o[s];e=i.filter((e=>!a(t,e)))}}));e.length>0&&r.push({messages:[E(ye,{dependentRequired:e.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function Lt(e,t,s){let i=[];const n=H(s);return b(t)&&d(n)&&Object.keys(n).forEach((s=>{if(d(t[s])){const a=n[s],r=new Ls({refParser:e.refParser,schema:a,data:t}),o=r.getErrors();r.destroy(),i=[...i,...o]}})),i}function Et(e,t,s){const i=[],n=U(s),a=le(s),r=R(s);if(d(n)){if(h(a)&&h(r))return i;const s=new Ls({refParser:e.refParser,schema:n,data:t}),o=s.getErrors();s.destroy();let l=[],c=[];if(d(a)){const s=new Ls({refParser:e.refParser,schema:a,data:t});l=s.getErrors(),s.destroy()}if(d(r)){const s=new Ls({refParser:e.refParser,schema:r,data:t});c=s.getErrors(),s.destroy()}if(!0===n)return l;if(!1===n)return c;if(0===o.length)return l;if(o.length>0)return c}return i}function xt(e,t,s,i,n){const a=[],r=ne(s);return f(t)&&d(r)&&r.forEach(((s,i)=>{const r=t[i];if(d(r)){const t=new Ls({refParser:e.refParser,schema:s,data:r}),o=t.getErrors();t.destroy(),o.length>0&&a.push({messages:[E(De,{index:i})],path:n,constrain:"prefixItems"})}})),a}const It={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt},wt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,properties:ht,prefixItems:xt,required:pt,type:ut,uniqueItems:gt};function At(e,t,s,i,n){let r=[];const o=pe(s),l=ie(s),c=ae(s),h=j(s),p=k(s),u=he(s);if(b(t)&&d(o)){let s=d(c)?c:{};const i=o,m=l;[h,p,u].forEach((e=>{d(e)&&e.forEach((e=>{d(e.properties)&&(s={...s,...e.properties})}))})),s&&Object.keys(t).forEach((o=>{let l=!1;if(d(m)&&Object.keys(m).forEach((e=>{const t=new RegExp(e);l=t.test(o)})),l||!1!==i||a(s,o)||r.push({messages:[E(ze,{property:o})],path:n,constrain:"unevaluatedProperties"}),!l&&b(i)&&!a(s,o)){const s=new Ls({refParser:e.refParser,schema:i,data:t[o]}),n=s.getErrors().map((e=>({messages:e.messages,path:o,constrain:"unevaluatedProperties"})));r=[...r,...n],s.destroy()}}))}return r}const St={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,propertie:ht,prefixItems:xt,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};const jt={additionalProperties:ft,allOf:ge,anyOf:Ze,const:vt,contains:Ct,dependentRequired:yt,dependentSchemas:Lt,enum:We,exclusiveMaximum:Qe,exclusiveMinimum:Xe,format:_e,if:Et,items:Ye,maximum:mt,maxItems:et,maxLength:tt,maxProperties:st,minimum:it,minItems:nt,minLength:Ge,minProperties:at,multipleOf:rt,not:ot,oneOf:lt,pattern:ct,patternProperties:dt,prefixItems:xt,propertyNames:function(e,t,s,i,n){const a=[],r=S(s);return b(t)&&d(r)&&Object.keys(t).forEach((t=>{new Ls({refParser:e.refParser,schema:r,data:t}).getErrors().length>0&&a.push({messages:[E(Ue,{propertyName:t})],path:n,constrain:"propertyNames"})})),a},properties:ht,required:pt,type:ut,unevaluatedProperties:At,uniqueItems:gt};class kt{constructor(e={}){this.refParser=e.refParser,this.validateFormat=!!e.validateFormat&&e.validateFormat,this.draft=jt,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":bt,"http://json-schema.org/draft-06/schema#":It,"http://json-schema.org/draft-07/schema#":wt,"https://json-schema.org/draft/2019-09/schema":St,"https://json-schema.org/draft/2020-12/schema":jt}}getErrors(e,s,i,n){let r=[];const o=te(s,"messages"),l=t(s);return g(l)&&!0===l?r:g(l)&&!1===l?[{messages:d(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach((t=>{if(a(l,t)){const a=(0,this.draft[t])(this,e,s,i,n);a&&(r=[...r,...a])}})),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Ot{constructor(){this.listeners=[]}on(e,t){this.listeners.push({name:e,callback:t})}off(e){this.listeners=this.listeners.filter((t=>t.name!==e))}emit(e,t=void 0){this.listeners.filter((t=>t.name===e)).forEach((e=>{e.callback(t)}))}destroy(){Object.keys(this).forEach((e=>{delete this[e]}))}}class Pt extends Ot{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=d(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",(()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())}))}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=t=>{this.jedi.register(t),t.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(h(this.value)){let e;const t=de(this.schema);"boolean"===t&&(e=!1),"number"===t&&(e=0),"integer"===t&&(e=0),"string"===t&&(e=""),"array"===t&&(e=[]),"object"===t&&(e={}),"null"===t&&(e=null),this.value=e}}setDefaultValue(){const e=T(this.schema);d(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,t=!0){const s=this.jedi.options.enforceConst||te(this.schema,"enforceConst");if(d(s)&&o(s,!0)){const t=O(this.schema);d(t)&&(e=t)}this.value=e,this.emit("set-value",e),t&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];return I(this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path))}prepare(){}activate(){!1===this.isActive&&(this.isActive=!0,this.emit("change"))}deactivate(){!0===this.isActive&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return!0===re(this.schema)&&(e=!0),this.parent&&!0===re(this.parent.schema)&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach((e=>{e.destroy()})),this.ui&&this.ui.destroy(),Object.keys(this).forEach((e=>{delete this[e]})),super.destroy()}}class Tt{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI();("always"===this.instance.jedi.options.showErrors||"always"===te(this.instance.schema,"showErrors"))&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})),this.instance.on("change",(()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}))}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",de(this.instance.schema))}build(){}enforceEnumDefault(){const e=te(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,t=B(this.instance.schema);d(t)&&!t.includes(this.instance.getValue())&&d(t[0])&&e&&this.instance.setValue(t[0],!1)}addEventListeners(){}showValidationErrors(e,t=!1){e=e.filter((e=>e.path===this.instance.path)),this.control.messages.innerHTML="",this.showingValidationErrors=!1;if(("never"===this.instance.jedi.options.showErrors||"never"===te(this.instance.schema,"showErrors"))&&!t||0===e.length)return;const s=ce(this.instance.schema)||this.instance.getKey();e.forEach((e=>{"properties"!==e.constraint&&e.messages.forEach((e=>{const t=this.getInvalidFeedback({message:s+": "+e});this.control.messages.appendChild(t)}))})),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach((e=>{this.disabled||this.readOnly?e.setAttribute("disabled",""):e.removeAttribute("disabled","")}))}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach((e=>{delete this[e]}))}}class Vt extends Tt{static resolves(e){return d(U(e))}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Ht extends Pt{setUI(){this.ui=new Vt(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.instanceWithoutIf=null,this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach((s=>{if(d(s.then)){this.schemas.push(C({},t(this.schema),s.then)),this.switcherOptionValues.push(e);const i="then";this.switcherOptionsLabels.push(i),e++}if(d(s.else)){this.schemas.push(C({},t(this.schema),s.else)),this.switcherOptionValues.push(e);const i="else";this.switcherOptionsLabels.push(i),e++}}));const s=t(this.schema);delete s.if,delete s.then,delete s.else,this.instanceWithoutIf=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent}),this.schemas.forEach((e=>{const t=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent});this.instanceStartingValues.push(t.getValue()),t.on("change",(()=>{const e=this.activeInstance.getValue();this.getFittestIndex(e)!==this.index?this.setValue(e):(this.value=this.activeInstance.getValue(),this.emit("change"))})),this.instances.push(t)})),this.on("set-value",(e=>{let t=this.instanceWithoutIf.getValue();b(t)&&b(e)&&(t=y(t,e)),this.instances.forEach(((s,i)=>{const n=this.instanceStartingValues[i];b(n)&&b(e)&&(e=y(n,t)),s.setValue(e,!1)}));const s=this.getFittestIndex(e);s!==this.index&&this.switchInstance(s)})),this.value=this.instanceWithoutIf.getValue();const i=this.getFittestIndex(this.value);this.switchInstance(i)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const t=U(e);if(d(t)){const s=le(e),i=R(e);this.ifThenElseShemas.push({if:t,then:d(s)?s:{}}),this.ifThenElseShemas.push({if:t,else:d(i)?i:{}})}}getFittestIndex(e){let t=this.index;return this.ifThenElseShemas.forEach(((s,i)=>{const n=new Ls({schema:s.if,data:e,refParser:this.jedi.refParser}),a=n.getErrors();n.destroy(),0===a.length&&s.then&&(t=i),a.length>0&&s.else&&(t=i)})),t}destroy(){this.instances.forEach((e=>{e.destroy()})),super.destroy()}getAllOfCombinations(e){const t=[],s=(e,i)=>{if(0===i.length)return void t.push(e);const n=i[0];var a,r;s((a=e,r=n,{...a,...r}),i.slice(1)),s(e,i.slice(1))};for(let i=0;iObject.keys(e).length-Object.keys(t).length)),t}}class Mt extends Pt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",(()=>{this.onSetValue()}));const e=de(this.schema);if(d(k(this.schema))||d(he(this.schema))){const e=d(k(this.schema))?k(this.schema):he(this.schema),s=t(this.schema);delete s.anyOf,delete s.oneOf,delete s.options,e.forEach(((e,t)=>{e={...s,...e},this.jedi.refParser&&(e=this.jedi.refParser.expand(e));let i="Option-"+(t+1);const n=te(e,"switcherTitle"),a=ce(e);d(a)&&(i=a),d(n)&&(i=n),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(i),this.schemas.push(e)}))}else if(f(e))e.forEach(((e,t)=>{const s=C(this.schema),i={...s,type:e,title:e[0].toUpperCase()+e.slice(1)};d(s.title)&&(i.title=s.title),this.switcherOptionValues.push(t),this.switcherOptionsLabels.push(e.charAt(0).toUpperCase()+e.slice(1)),this.schemas.push(i)}));else if("any"===e||!e){const e=t(this.schema);this.schemas=[{...e,type:"object"},{...e,type:"array"},{...e,type:"string"},{...e,type:"number"},{...e,type:"integer"},{...e,type:"boolean"},{...e,type:"null"}],this.schemas.forEach(((e,t)=>{this.switcherOptionValues.push(t)})),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach((e=>{const s=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path,parent:this.parent,value:t(this.value)});d(this.value)&&s.setValue(this.value,!1),s.unregister(),s.off("change"),s.on("change",(()=>{this.value=this.activeInstance.getValue(),this.emit("change")})),this.instances.push(s),this.register()}));const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,t){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],d(t)&&this.activeInstance.setValue(t,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(l(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let t,s,i=0;for(const n of this.instances){const a=this.jedi.validator.getErrors(e,n.schema,n.getKey(),n.path);(h(t)||h(s))&&(t=i,s=a),a.length{e.destroy()})),super.destroy()}}class Rt extends Pt{}class Bt extends Pt{prepare(){this.properties={};const e=ae(this.schema);d(e)&&Object.keys(e).forEach((t=>{const s=e[t];this.properties[t]={schema:s};let i=!0;const n=this.jedi.options.deactivateNonRequired,a=te(this.schema,"deactivateNonRequired"),r=te(s,"deactivateNonRequired");this.isNotRequired(t)&&d(n)&&!0===n&&(i=!1),this.isNotRequired(t)&&d(a)&&!0===a&&(i=!1),this.isNotRequired(t)&&d(r)&&!0===r&&(i=!1),i&&this.createChild(s,t)})),this.refreshInstances(),this.on("set-value",(()=>{this.refreshInstances()}))}isRequired(e){const t=oe(this.schema);return d(t)&&t.includes(e)}isDependentRequired(e){const t=V(this.schema);if(d(t)){let s=[];return Object.keys(t).forEach((e=>{if(d(this.value[e])){const i=t[e];s=i.filter((e=>!a(this.value,e)))}})),s.includes(e)}return!1}createChild(e,s,i,n=!1){const a=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:t(i)});this.children.push(a),this.value[s]=a.getValue();const r=this.jedi.options.deactivateNonRequired||te(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&d(r)&&!0===r&&!n&&a.deactivate(),a}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let t=this.children.length-1;t>=0;t--){const s=this.children[t];s.getKey()===e&&(s.destroy(),this.children.splice(t,1),this.onChildChange())}}getChild(e){return this.children.find((t=>e===t.getKey().split(this.jedi.pathSeparator).pop()))}getPropertySchema(e){let t;const s=A(this.schema),i=ae(this.schema),n=ie(this.schema);return d(i)&&a(i,e)?t=i[e]:d(n)&&Object.keys(n).forEach((s=>{new RegExp(s).test(e)&&(t=n[s])})),h(t)&&d(s)&&(t=s),h(t)&&(t={}),t}onChildChange(){const e={};this.children.forEach((t=>{t.isActive&&(e[t.getKey()]=t.getValue())})),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort(((e,t)=>{const s=te(e.schema,"propertyOrder"),i=te(t.schema,"propertyOrder"),n=p(s),a=p(i);return!n&&a?1:n&&!a||si?1:0}))}refreshInstances(){const e=this.getValue();if(b(e)){Object.keys(e).forEach((t=>{const s=this.getChild(t);if(s){s.activate();const t=s.getValue(),i=e[s.getKey()];l(t,i)&&s.setValue(i,!1)}else{const s=this.getPropertySchema(t);this.createChild(s,t,e[t],!0)}}));for(let t=this.children.length-1;t>=0;t--){const s=this.children[t],i=s.getKey();h(e[i])&&(this.getChild(i)?s.deactivate():this.deleteChild(i))}this.sortChildrenByPropertyOrder()}}}class Nt extends Pt{prepare(){this.refreshChildren(),this.on("set-value",(()=>{this.refreshChildren()}))}createItemInstance(e){let s;const i=this.children.length,n=F(this.schema),a=ne(this.schema);s=d(n)?n:{};d(a)&&d(a[i])&&(s=a[i]);const r=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:t(e)});return d(e)&&r.setValue(e,!1),r}move(e,s){const i=t(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=t(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const s=t(this.getValue()).filter(((t,s)=>s!==e));this.setValue(s)}onChildChange(){const e=[];this.children.forEach((t=>{e.push(t.getValue())})),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();f(e)&&e.forEach((e=>{const t=this.createItemInstance(e);this.children.push(t)}))}}class qt extends Pt{}class Dt extends Pt{}class Ut extends Pt{}const Ft={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Kt={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},$t={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},zt={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},Jt={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},Gt={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Zt extends Tt{sanitize(e){return Boolean(e)}}class Wt extends Zt{static resolves(e){return"boolean"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t="true"===e.value;this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{const t="true"===e.value;e.checked=t===this.instance.getValue()}))}}class Qt extends Zt{static resolves(e){return"boolean"===de(e)}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:te(this.instance.schema,"enumTitles")||["false","true"],id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e="true"===this.control.input.value;this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=!0===this.instance.getValue()?"true":"false"}}class Xt extends Zt{static resolves(e){return"boolean"===de(e)&&"checkbox"===te(e,"format")}build(){this.control=this.theme.getCheckboxControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.checked)}))}sanitize(e){return Boolean(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class _t extends Tt{sanitize(e){return String(e)}}class Yt extends _t{static resolves(e){return"string"===de(e)&&"radio"===te(e,"format")}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{this.instance.setValue(e.value)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=e.value===this.instance.getValue()}))}}class es extends _t{static resolves(e){return"string"===de(e)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ts extends _t{static resolves(e){return"string"===de(e)&&"textarea"===te(e,"format")}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ss extends _t{static resolves(e){return window.Awesomplete&&"string"===de(e)&&d(te(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,te(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class is extends _t{static resolves(e){return"string"===de(e)}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=te(this.instance.schema,"format");this.control=this.theme.getInputControl({type:is.getTypes().includes(e)?e:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===e,description:M(this.instance.schema)}),"color"===e&&0===this.instance.value.length&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ns extends Tt{sanitize(e){return"integer"===de(this.instance.schema)?Math.floor(Number(e)):Number(e)}}class as extends ns{static resolves(e){const t=de(e),s=B(e),i=te(e,"format");return("number"===t||"integer"===t)&&d(s)&&"radio"===i}build(){this.control=this.theme.getRadiosControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.radios.forEach((e=>{e.addEventListener("change",(()=>{const t=this.sanitize(e.value);this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach((e=>{e.checked=Number(e.value)===Number(this.instance.getValue())}))}}class rs extends ns{static resolves(e){const t=de(e);return("number"===t||"integer"===t)&&d(B(e))}build(){this.control=this.theme.getSelectControl({values:B(this.instance.schema),titles:te(this.instance.schema,"enumTitles")||B(this.instance.schema),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class os extends ns{static resolves(e){const t=de(e);return"number"===t||"integer"===t}build(){this.control=this.theme.getInputControl({type:"number",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",(()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)}))}refreshUI(){this.refreshInteractiveElements();p(this.instance.getValue())&&(this.control.input.value=this.instance.getValue())}}class ls extends Tt{static resolves(e){return"object"===de(e)}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let t=!0;const s=A(this.instance.schema);d(s)&&!1===s&&(t=!1);let i=!1;d(this.instance.jedi.options.enablePropertiesToggle)&&(i=this.instance.jedi.options.enablePropertiesToggle),d(e.enablePropertiesToggle)&&(i=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enablePropertiesToggle:i,addProperty:t,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",(()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(0===e.length)return;if(d(this.instance.value[e]))return;const t=this.instance.getPropertySchema(e),s=this.instance.createChild(t,e);s.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const i=this.control.ariaLive;i.innerHTML="";const n=ce(s.schema),a=d(n)?n:e,r=this.theme.getAriaLiveMessage();r.textContent=a+" field was added to the form",i.appendChild(r),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}))}sanitize(e){return b(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=te(this.instance.schema,"enablePropertiesToggle");if(o(this.instance.jedi.options.enablePropertiesToggle,!0)||o(e,!0)){const e=this.instance.children.map((e=>e.getKey()));for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);e.forEach((e=>{const t=this.instance.isRequired(e),s=this.instance.isDependentRequired(e),i=!t&&!s,r=this.control.ariaLive,o=this.instance.getPropertySchema(e),l=ce(o),c=n(this.instance.path+this.instance.jedi.pathSeparator+e)+"-activator",h=d(l)?l:e;if(i){const t=this.theme.getCheckboxControl({id:c,label:h,titleHidden:!1}),s=t.input;this.propertyActivators[e]=s,s.addEventListener("change",(()=>{r.innerHTML="";const t=this.theme.getAriaLiveMessage();if(s.checked){this.instance.getChild(e)||this.instance.createChild(o,e),this.instance.getChild(e).activate(),t.textContent=h+" field was added to the form",r.appendChild(t)}else this.instance.getChild(e).deactivate(),t.textContent=h+" field was removed from the form",r.appendChild(t);this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})),this.control.propertiesActivators.appendChild(t.container)}const p=this.propertyActivators[e];p&&(p.disabled=this.disabled,p.checked=a(this.instance.getValue(),e))}))}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach((e=>{e.isActive?(null===e.ui.control.container.parentNode&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)}))}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class cs extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach((t=>{if(t.isActive){const s=te(t.schema,"grid"),i=(null==s?void 0:s.columns)||12,n=(null==s?void 0:s.offset)||0,a=this.theme.getCol(12,i,n);((null==s?void 0:s.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(a),a.appendChild(t.ui.control.container),this.disabled||this.instance.isReadOnly()?t.ui.disable():t.ui.enable()}}))}}class ds extends ls{static resolves(e){return"object"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{if(e.isActive){const s=t===this.activeTabIndex,i=n(e.path),a=ce(e.schema),l=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:d(a)?a:e.getKey(),id:i,active:s});l.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,s,i),o.appendChild(l.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()}}))}}class hs extends Tt{static resolves(e){return"array"===de(e)}build(){this.control=this.theme.getArrayControl({title:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||te(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||te(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.instance.addItem()}))}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return f(e)?e:[]}isSortable(){return window.Sortable&&d(te(this.instance.schema,"sortable"))}refreshUI(){const e=z(this.instance.schema),t=Q(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach((e=>{const s=Number(e.getKey()),i=this.theme.getDeleteItemBtn(),n=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),r=this.theme.getBtnGroup(),{container:o,arrayActions:l,body:c}=this.theme.getArrayItem();if(l.appendChild(r),r.appendChild(i),r.appendChild(n),r.appendChild(a),this.isSortable()){const e=this.theme.getDragItemBtn();r.appendChild(e)}this.control.childrenSlot.appendChild(o),c.appendChild(e.ui.control.container),i.addEventListener("click",(()=>{const t=Number(e.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(t)})),n.addEventListener("click",(()=>{const e=s-1;this.instance.move(s,e)})),a.addEventListener("click",(()=>{const e=s+1;this.instance.move(s,e)})),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),d(t)&&this.instance.value.length<=t&&i.setAttribute("disabled","")})),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:e=>{this.instance.move(e.oldIndex,e.newIndex)}})),d(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ps extends hs{static resolves(e){return"array"===de(e)&&d(te(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",(()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=te(this.instance.schema,"nav"),t=this.theme.getRow(),s=d(e.cols)?e.cols:4,i=this.theme.getCol(12,s),a=this.theme.getCol(12,12-s),r=this.theme.getTabContent(),o=this.theme.getTabList({stacked:!!d(e.stacked)&&e.stacked,type:d(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(t),t.appendChild(i),t.appendChild(a),i.appendChild(o),a.appendChild(r),this.instance.children.forEach(((e,t)=>{const s=this.theme.getDeleteItemBtn(),i=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn();let l;e.ui.control.arrayActions.innerHTML="",e.ui.control.arrayActions.appendChild(s),e.ui.control.arrayActions.appendChild(i),e.ui.control.arrayActions.appendChild(a),this.control.childrenSlot.appendChild(e.ui.control.container);const c=te(this.instance.schema,"itemTemplate");if(c){l=E(c,{i0:t,i1:t+1,value:e.getValue()})}else{const s=ce(e.schema);l=d(s)?s+" "+(t+1):e.getKey()}s.addEventListener("click",(()=>{this.activeTabIndex=x(t-1,0,this.instance.value.length-1),this.instance.deleteItem(t)})),i.addEventListener("click",(()=>{const e=t-1;this.activeTabIndex=e,this.instance.move(t,e)})),a.addEventListener("click",(()=>{const e=t+1;this.activeTabIndex=e,this.instance.move(t,e)}));const h=t===this.activeTabIndex,p=n(e.path),u=this.theme.getTab({hasErrors:e.children.some((e=>e.ui.showingValidationErrors)),title:l,id:p,active:h});u.list.addEventListener("click",(()=>{this.activeTabIndex=t})),this.theme.setTabPaneAttributes(e.ui.control.container,h,p),o.appendChild(u.list),r.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable(),0===t&&i.setAttribute("disabled",""),this.instance.value.length-1===t&&a.setAttribute("disabled","")}))}}class us extends Tt{static resolves(e){const t=de(e),s=he(e);return d(k(e))||d(s)||"any"===t||f(t)||h(t)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:te(this.instance.schema,"titleHidden"),id:n(this.instance.path),description:M(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",(()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)}))}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class ms extends Tt{static resolves(e){return"null"===de(e)}build(){this.control=this.theme.getNullControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden")||"hidden"===te(this.instance.schema,"format"),description:M(this.instance.schema)})}sanitize(){return null}}class gs extends _t{static resolves(e){return window.Quill&&"string"===de(e)&&d(te(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,te(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",(()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class fs extends _t{static resolves(e){return window.Jodit&&"string"===de(e)&&d(te(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,te(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",(()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)}))}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class bs extends _t{static resolves(e){return window.flatpickr&&"string"===de(e)&&d(te(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,te(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",(()=>{this.instance.setValue(this.control.input.value)}))}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class vs extends ns{static resolves(e){return"undefined"!=typeof Raty&&"number"===de(e)&&d(te(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),labelIconClass:te(this.instance.schema,"labelIconClass"),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},te(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class Cs extends Tt{static resolves(e){const t=de(e),s=F(e),i=d(s)&&de(s),n=d(t)&&"array"===t,a=!0===ue(e),r=d(s)&&d(B(e.items)),o=d(s)&&d(i),l=["string","number","integer"],c=d(s)&&d(i)&&(l.includes(i)||f(i)&&i.some((e=>l.includes(e))));return n&&a&&r&&o&&c}build(){this.control=this.theme.getCheckboxesControl({values:B(this.instance.schema.items),titles:te(this.instance.schema.items,"enumTitles")||B(this.instance.schema.items),id:n(this.instance.path),label:ce(this.instance.schema)||this.instance.getKey(),titleHidden:te(this.instance.schema,"titleHidden"),description:M(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach((e=>{e.addEventListener("change",(()=>{const t=this.instance.getValue();if(e.checked)t.push(e.value);else{const s=t.indexOf(e.value);s>-1&&t.splice(s,1)}this.instance.setValue(t)}))}))}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach((t=>{t.checked=e.includes(t.value)}))}}class ys{constructor(e){this.customEditors=e.customEditors??[],this.editors=[us,Vt,Wt,Xt,Qt,Yt,es,ts,ss,gs,fs,bs,is,vs,as,rs,os,cs,ds,ls,Cs,ps,hs,ms]}getClass(e){for(const t of this.customEditors)if(t.resolves(e))return t;for(const t of this.editors)if(t.resolves(e))return t;return null}}class Ls extends Ot{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new ys({customEditors:this.options.customEditors}),this.theme=this.options.theme,d(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Ft;break;case"bootstrap-icons":this.theme.icons=Kt;break;case"fontawesome3":this.theme.icons=$t;break;case"fontawesome4":this.theme.icons=zt;break;case"fontawesome5":this.theme.icons=Jt;break;case"fontawesome6":this.theme.icons=Gt}this.schema=this.options.schema,this.validator=new kt({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),d(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",(()=>{this.emit("change")})),this.hiddenInput&&this.on("change",(()=>{this.hiddenInput.value=JSON.stringify(this.getValue())}))}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&b(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach((e=>{this.hiddenInput.setAttribute(e,this.options.hiddenInputAttributes[e])})),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||te(e.schema,"mergeAllOf")){const t=j(e.schema);d(t)&&t.forEach((t=>{e.schema=C({},e.schema,t)}))}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const t=de(e.schema),s=he(e.schema),i=k(e.schema),n=U(e.schema);return d(i)||d(s)||"any"===t||f(t)||h(t)?new Mt(e):d(n)?new Ht(e):"object"===t?new Bt(e):"array"===t?new Nt(e):"string"===t?new qt(e):"number"===t||"integer"===t?new Dt(e):"boolean"===t?new Rt(e):"null"===t?new Ut(e):void 0}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach((t=>{const s=this.instances[t];e=[...e,...s.getErrors()]})),e}showValidationErrors(e=null){if(!this.options.container)return!1;const t=e||this.getErrors();Object.keys(this.instances).forEach((e=>{this.instances[e].ui.showValidationErrors(t,!0)}))}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach((e=>{delete this[e]}))}}class Es{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const t=document.createElement("legend"),s=document.createElement("span");return t.classList.add("jedi-editor-legend"),s.classList.add("jedi-editor-legend-text"),t.setAttribute("aria-labelledby","#legend-"+e.id),s.textContent=e.textContent,s.setAttribute("id","#legend-"+e.id),t.appendChild(s),t}getLabel(e){const t=document.createElement("label");t.setAttribute("for",e.for);const s=this.getIcon(e.labelIconClass),i=document.createElement("span");return i.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(t),t.classList.add("jedi-title"),t.appendChild(s),t.appendChild(i),{label:t,labelText:i,icon:s}}getIcon(e=""){const t=document.createElement("i");let s=e.split(" ");return s=s.filter((e=>e.length>0)),s&&s.forEach((e=>{t.classList.add(e)})),t}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const t=document.createElement("div");return t.classList.add("jedi-messages-slot"),t.setAttribute("aria-atomic","false"),t.setAttribute("aria-live","polite"),e.id&&t.setAttribute("id",e.id),t}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const t=this.getButton(e);return t.classList.add("jedi-properties-toggle"),t.addEventListener("click",(()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()})),t}getCollapse(e){const t=document.createElement("div");return t.classList.add("jedi-collapse"),t.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(t.style.display="none"),t}getCollapseToggle(e){const t=this.getButton(e);t.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&t.addEventListener("click",(()=>{"none"===e.collapse.style.display?e.collapse.style.display="block":e.collapse.style.display="none"}));let s=e.startCollapsed;return t.style.transition="transform 0.1s ease",s&&(t.style.transform="rotate(90deg)"),t.addEventListener("click",(()=>{t.style.transform=s?"rotate(0deg)":"rotate(90deg)",s=!s})),t}getPropertiesSlot(e){const t=document.createElement("dialog");return t.classList.add("jedi-properties-slot"),t.setAttribute("id",e.id),window.addEventListener("click",(e=>{e.target===t&&t.close()})),t}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const t=document.createElement("p");return t.classList.add("jedi-aria-live-message"),t.textContent=e,this.visuallyHidden(t),t}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const t=document.createElement("button");t.classList.add("jedi-btn"),t.setAttribute("type","button"),e.value&&(t.value=e.value),e.id&&t.setAttribute("id",e.id);const s=document.createElement("span");if(s.textContent=e.textContent,this.icons&&e.icon){const i=this.getIcon(this.icons[e.icon]);i.setAttribute("title",e.textContent),t.appendChild(i),this.visuallyHidden(s)}return t.appendChild(s),t}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const t=document.createElement("small");return t.classList.add("jedi-description"),e.textContent&&(t.textContent=e.textContent),e.id&&t.setAttribute("id",e.id),t}getPlaceholderControl(e){const t=document.createElement("div"),s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c});return t.appendChild(a),t.appendChild(s),t.appendChild(l),t.appendChild(d),t.appendChild(i),i.appendChild(n),{container:t,placeholder:s,label:a,labelText:r,description:l,messages:d,actions:i,arrayActions:n}}getObjectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getPropertiesAriaLive(),r=this.getDescription({textContent:e.description}),o=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getPropertiesSlot({id:"properties-slot-"+e.id}),d=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:c}),h="collapse-"+e.id,p=this.getCollapse({id:h,startCollapsed:e.startCollapsed}),u=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:h,collapse:p,startCollapsed:e.startCollapsed}),m=this.getPropertiesActivators(),g=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),f=this.getAddPropertyButton(),b=this.getFieldset(),v=this.getLegend({textContent:e.title,id:e.id});return f.classList.add("jedi-object-add"),t.appendChild(b),t.appendChild(c),b.appendChild(v),b.appendChild(p),p.appendChild(n),n.appendChild(r),n.appendChild(o),v.appendChild(s),s.appendChild(i),n.appendChild(l),e.addProperty&&(c.appendChild(g.container),c.appendChild(f),c.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(s.appendChild(d),c.appendChild(a),c.appendChild(m)),e.enableCollapseToggle&&s.appendChild(u),{container:t,collapse:p,collapseToggle:u,body:n,actions:s,messages:o,childrenSlot:l,propertiesToggle:d,propertiesContainer:c,addPropertyControl:g,addPropertyBtn:f,ariaLive:a,propertiesActivators:m,arrayActions:i}}getArrayControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardBody(),a=this.getDescription({textContent:e.description}),r=this.getMessagesSlot(),o=this.getChildrenSlot(),l=this.getBtnGroup(),c=this.getArrayBtnAdd(),d=this.getFieldset(),h=this.getLegend({textContent:e.title,id:e.id}),p="collapse-"+e.id,u=this.getCollapse({id:p,startCollapsed:e.startCollapsed}),m=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:p,collapse:u,startCollapsed:e.startCollapsed});return t.appendChild(d),d.appendChild(h),d.appendChild(u),u.appendChild(n),n.appendChild(a),n.appendChild(r),h.appendChild(s),s.appendChild(l),l.appendChild(c),s.appendChild(i),n.appendChild(o),e.enableCollapseToggle&&s.appendChild(m),{container:t,collapseToggle:m,collapse:u,body:n,actions:s,messages:r,childrenSlot:o,btnGroup:l,addBtn:c,arrayActions:i}}getArrayItem(){const e=document.createElement("div"),t=this.getCard(),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getCardHeader(),a=this.getCardBody();return e.appendChild(t),t.appendChild(n),t.appendChild(a),n.appendChild(s),s.appendChild(i),{container:e,card:t,header:n,body:a,actions:s,arrayActions:i}}getMultipleControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),t.appendChild(o),t.appendChild(s),s.appendChild(a),s.appendChild(r),a.appendChild(i),e.switcher&&i.appendChild(d.container),i.appendChild(n),r.appendChild(l),r.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getIfThenElseControl(e){const t=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),a=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return d.container.classList.add("jedi-switcher"),e.switcher&&t.appendChild(d.container),r.appendChild(o),t.appendChild(l),t.appendChild(c),{container:t,card:s,header:a,body:r,actions:i,messages:l,childrenSlot:c,switcher:d,arrayActions:n}}getNullControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),{label:n,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),r=e.id+"-description",o=this.getDescription({textContent:e.description,id:r}),l=this.getMessagesSlot(),c=document.createElement("br");return t.appendChild(n),t.appendChild(c),t.appendChild(o),t.appendChild(l),t.appendChild(s),s.appendChild(i),{container:t,label:n,labelText:a,description:o,messages:l,actions:s,arrayActions:i}}getTextareaControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("textarea");n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getInputControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("input");n.setAttribute("type",e.type),n.setAttribute("id",e.id),n.style.width="100%";const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getRadiosControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","radio"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),n.appendChild(d),n.appendChild(l),{container:t,fieldset:n,legend:r,body:a,radios:p,labels:u,labelTexts:m,radioControls:h,description:d,messages:l,actions:s,arrayActions:i}}getCheckboxControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("div"),a=document.createElement("input");a.setAttribute("type","checkbox"),a.setAttribute("id",e.id);const{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",h=this.getMessagesSlot({id:d}),p=d+" "+l;return a.setAttribute("aria-describedby",p),t.appendChild(n),t.appendChild(s),s.appendChild(i),n.appendChild(a),n.appendChild(r),n.appendChild(c),n.appendChild(h),{container:t,formGroup:n,input:a,label:r,labelText:o,description:c,messages:h,actions:s,arrayActions:i}}getCheckboxesControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=this.getFieldset(),a=this.getCardBody(),r=this.getLegend({textContent:e.label,id:e.id}),o=e.id+"-messages",l=this.getMessagesSlot({id:o}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c});e.titleHidden&&this.visuallyHidden(r);const h=[],p=[],u=[],m=[];return e.values.forEach(((t,s)=>{const i=document.createElement("div");h.push(i);const n=document.createElement("input");n.setAttribute("type","checkbox"),n.setAttribute("id",e.id+"-"+s),n.setAttribute("value",t),p.push(n);const a=o+" "+c;n.setAttribute("aria-describedby",a);const r=document.createElement("label");r.setAttribute("for",e.id+"-"+s);const l=document.createElement("span");m.push(l),e.titles&&e.titles[s]&&(l.textContent=e.titles[s]),u.push(r)})),t.appendChild(n),t.appendChild(s),n.appendChild(r),n.appendChild(a),s.appendChild(i),h.forEach(((e,t)=>{a.appendChild(h[t]),e.appendChild(p[t]),e.appendChild(u[t]),u[t].appendChild(m[t])})),a.appendChild(d),a.appendChild(l),{container:t,fieldset:n,legend:r,body:a,checkboxes:p,labels:u,labelTexts:m,checkboxControls:h,description:d,messages:l,actions:s,arrayActions:i}}getSelectControl(e){const t=document.createElement("div"),s=this.getActionsSlot(),i=this.getArrayActionsSlot(),n=document.createElement("select");n.setAttribute("id",e.id),e.values.forEach(((t,s)=>{const i=document.createElement("option");i.setAttribute("value",t),e.titles&&e.titles[s]&&(i.textContent=e.titles[s]),n.appendChild(i)}));const{label:a,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),o=e.id+"-description",l=this.getDescription({textContent:e.description,id:o}),c=e.id+"-messages",d=this.getMessagesSlot({id:c}),h=c+" "+o;return n.setAttribute("aria-describedby",h),t.appendChild(a),t.appendChild(n),t.appendChild(l),t.appendChild(d),t.appendChild(s),s.appendChild(i),{container:t,input:n,label:a,labelText:r,description:l,messages:d,actions:s,arrayActions:i}}getSwitcher(e){const t=document.createElement("span"),s=document.createElement("select");s.setAttribute("id",e.id),e.values.forEach(((t,i)=>{const n=document.createElement("option");n.setAttribute("value",t),e.titles&&e.titles[i]&&(n.textContent=e.titles[i]),s.appendChild(n)}));const{label:i,labelText:n}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return t.appendChild(i),t.appendChild(s),{container:t,input:s,label:i,labelText:n}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const t=document.createElement("div"),s=document.createElement("span"),i=document.createElement("span");return s.textContent=e.message,i.textContent="⚠ ",i.classList.add("jedi-error-message"),i.setAttribute("aria-hidden","true"),t.classList.add("jedi-error-message"),t.appendChild(i),t.appendChild(s),t}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,t,s){const i=document.createElement("div");return i.classList.add("jedi-col-xs-"+e),i.classList.add("jedi-col-md-"+t),s&&i.classList.add("jedi-col-md-offset-"+s),i}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const t=document.createElement("li"),s=document.createElement("a");return s.classList.add("jedi-nav-link"),s.setAttribute("href","#"+e.id),s.textContent=e.hasErrors?"⚠ "+e.title:e.title,t.appendChild(s),{list:t,link:s}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,t,s){e.setAttribute("id",s),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}return{Schema:me,Utils:w,EditorBoolean:Zt,EditorBooleanEnumRadio:Wt,EditorBooleanEnumSelect:Qt,EditorBooleanCheckbox:Xt,EditorString:_t,EditorStringEnumRadio:Yt,EditorStringEnumSelect:es,EditorStringTextarea:ts,EditorStringAwesomplete:ss,EditorStringInput:is,EditorNumber:ns,EditorNumberEnumRadio:as,EditorNumberEnumSelect:rs,EditorNumberInput:os,EditorObjectGrid:cs,EditorObjectNav:ds,EditorObject:ls,EditorArrayNav:ps,EditorArray:hs,EditorMultiple:us,EditorIfThenElse:Vt,EditorNull:ms,Theme:Es,ThemeBootstrap3:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("in"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h5"),t.classList.add("panel-heading"),t.classList.add("pull-left"),t.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.setAttribute("style","margin-right: 5px;"),t}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("panel-heading"),t.classList.add("text-right"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-xs"),t.classList.add("btn-default"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{body:s,radios:i,labels:n,labelTexts:a,radioControls:r,description:o,messages:l}=t;return r.forEach(((e,t)=>{e.classList.add("radio"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),s.appendChild(o),s.appendChild(l),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{body:s,checkboxes:i,labels:n,labelTexts:a,checkboxControls:r}=t;return r.forEach(((e,t)=>{e.classList.add("checkbox"),s.appendChild(r[t]),e.appendChild(n[t]),n[t].appendChild(i[t]),n[t].appendChild(a[t])})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,labelText:r,description:o,messages:l}=t;return i.classList.add("checkbox"),s.appendChild(i),i.appendChild(a),a.appendChild(n),a.appendChild(r),i.appendChild(o),i.appendChild(l),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow();return i.classList.add("col-xs-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("col-md-offset-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("nav-stacked"),!1===e.stacked&&t.classList.remove("nav-stacked"),t}getTab(e){const t=super.getTab(e);return e.active&&t.list.classList.add("active"),t.link.setAttribute("data-toggle","tab"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap4:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("float-left"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("mr-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("form-group"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("form-group"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("form-group"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return i.classList.add("form-group"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("form-group"),i.classList.add("form-control"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("form-text"),t.classList.add("d-block"),t}getColumnClass(e,t){return"col-"+e+"-"+t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList();return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}},ThemeBootstrap5:class extends Es{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const t=super.getCollapseToggle(e);return t.setAttribute("href","#"+e.collapseId),t.setAttribute("data-bs-toggle","collapse"),t}getCollapse(e){const t=super.getCollapse(e);return t.classList.add("collapse"),e.startCollapsed||t.classList.add("show"),t}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const t=super.getLegend(e);return t.classList.add("h6"),t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-between"),t.classList.add("align-items-center"),t.classList.add("py-2"),t}getLabel(e){const t=super.getLabel(e);return t.icon.classList&&t.icon.classList.add("me-1"),t}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const t=super.getCardHeader(e);return t.classList.add("card-header"),t.classList.add("d-flex"),t.classList.add("justify-content-end"),t.classList.add("align-items-center"),t.classList.add("py-1"),t}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const t=super.getButton(e);return t.classList.add("btn"),t.classList.add("btn-sm"),t}getDescription(e){const t=super.getDescription(e);return t.classList.add("text-muted"),t}getTextareaControl(e){const t=super.getTextareaControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getInputControl(e){const t=super.getInputControl(e),{container:s,input:i,label:n}=t;return s.classList.add("mb-3"),i.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(n),t}getRadiosControl(e){const t=super.getRadiosControl(e),{container:s,body:i,radios:n,labels:a,labelTexts:r,radioControls:o,description:l,messages:c}=t;return s.classList.add("mb-3"),o.forEach(((e,t)=>{e.classList.add("form-check"),n[t].classList.add("form-check-input"),a[t].classList.add("form-check-label"),i.appendChild(o[t]),e.appendChild(n[t]),e.appendChild(a[t]),a[t].appendChild(r[t])})),i.appendChild(l),i.appendChild(c),t}getCheckboxesControl(e){const t=super.getCheckboxesControl(e),{checkboxes:s,labels:i,checkboxControls:n}=t;return n.forEach(((e,t)=>{e.classList.add("mb-3"),e.classList.add("form-check"),s[t].classList.add("form-check-input"),i[t].classList.add("form-check-label")})),t}getCheckboxControl(e){const t=super.getCheckboxControl(e),{container:s,formGroup:i,input:n,label:a,description:r,messages:o}=t;return s.classList.add("mb-3"),i.classList.add("form-check"),n.classList.add("form-check-input"),a.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(a),s.appendChild(i),i.appendChild(n),i.appendChild(a),i.appendChild(r),i.appendChild(o),t}getSelectControl(e){const t=super.getSelectControl(e),{container:s,input:i}=t;return s.classList.add("mb-3"),i.classList.add("form-select"),t}getAlert(e){const t=super.getAlert(e);return t.classList.add("alert"),t.classList.add("alert-danger"),t}getInvalidFeedback(e){const t=super.getInvalidFeedback(e);return t.classList.add("text-danger"),t.classList.add("d-block"),t.classList.add("form-text"),t.classList.add("form-text"),t}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,t,s){const i=super.getRow(e,t,s);return i.classList.add("col-"+e),i.classList.add("col-md-"+t),s&&i.classList.add("offset-md-"+s),i}getTabList(e){const t=super.getTabList(e);return t.classList.add("nav"),"tabs"===e.type?t.classList.add("nav-tabs"):t.classList.add("nav-pills"),t.classList.add("flex-column"),!1===e.stacked&&t.classList.remove("flex-column"),t}getTab(e){const t=super.getTab(e);return t.list.classList.add("nav-item"),t.link.classList.add("nav-link"),t.link.setAttribute("data-bs-toggle","tab"),e.active&&t.link.classList.add("active"),t}setTabPaneAttributes(e,t,s){super.setTabPaneAttributes(e,t,s),e.classList.add("tab-pane"),t&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}},RefParser:class{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);!1===this.refsResolved();)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every((e=>null!==e))}async collectRefs(e,t="#"){if("object"==typeof e&&null!==e)for(const[s,i]of Object.entries(e)){const n=t?`${t}/${s}`:`/${s}`;if(this.hasRef(e)){const t=e.$ref;if(this.isExternalRef(t)){const e=await this.load(t);this.refs[t]=e,await this.collectRefs(e,n)}else this.refs[t]=this.data[t]??null}this.data[t]=e,await this.collectRefs(i,n)}}hasRef(e){return void 0!==e.$ref&&"string"==typeof e.$ref}isExternalRef(e){return"string"==typeof e&&(e.startsWith("http")||e.startsWith("https"))}isObject(e){return null!==e&&"object"==typeof e}expand(e){const t=JSON.parse(JSON.stringify(e));if(this.isObject(t)&&this.hasRef(t)){const e=t.$ref;return delete t.$ref,this.expand(C({},this.refs[e],t))}return t}async load(e){try{const t=await fetch(e);if(!t.ok)throw new Error("Network response was not ok");return await t.json()}catch(t){throw console.error("Error loading",e,t),t}}},Create:Ls}})); //# sourceMappingURL=jedi.js.map diff --git a/dist/umd/jedi.js.map b/dist/umd/jedi.js.map index 88a53ad..f5cd74c 100644 --- a/dist/umd/jedi.js.map +++ b/dist/umd/jedi.js.map @@ -1 +1 @@ -{"version":3,"file":"jedi.js","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/constrains/propertyNames.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/themes/theme.js","../../src/index.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/ref-parser/ref-parser.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport function overwriteExistingProperties (obj1, obj2) {\n Object.keys(obj2).forEach(function (key) {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n obj1[key] = obj2[key]\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n const instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n this.instances.forEach((instance) => {\n const currentValue = instance.getValue()\n\n if (isObject(currentValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(currentValue, newValue)\n\n // restore any const value here\n instance.children.forEach((child) => {\n const schemaConst = getSchemaConst(child.schema)\n\n if (isSet(schemaConst)) {\n newValue[child.getKey()] = schemaConst\n }\n })\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = instanceWithoutIf.getValue()\n instanceWithoutIf.destroy()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn, isNumber,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n"],"names":["getCircularReplacer","ancestors","key","value","length","at","this","pop","includes","push","clone","thing","JSON","parse","stringify","escapeRegExp","string","replace","replaceAll","str","find","RegExp","pathToAttribute","path","hasOwn","obj","prop","Object","prototype","hasOwnProperty","call","sortObject","keys","sort","reduce","result","equal","a","b","isObject","different","isNull","isSet","notSet","isNumber","isInteger","Math","floor","isString","isBoolean","isArray","Array","getType","type","mergeDeep","target","sources","source","shift","forEach","assign","overwriteExistingProperties","obj1","obj2","getValueByJSONPath","data","split","test","index","parseInt","compileTemplate","template","match","clamp","number","min","max","removeDuplicatesFromArray","arr","uniqueObjects","uniqueValues","Set","objString","has","add","Utils","getSchemaAdditionalProperties","schema","additionalProperties","getSchemaPropertyNames","propertyNames","getSchemaAllOf","allOf","getSchemaAnyOf","anyOf","getSchemaConst","const","getSchemaContains","contains","getSchemaDefault","default","getSchemaDependentRequired","dependentRequired","getSchemaDependentSchemas","dependentSchemas","getSchemaDescription","description","getSchemaElse","else","getSchemaEnum","enum","getSchemaExclusiveMaximum","exclusiveMaximum","getSchemaExclusiveMinimum","exclusiveMinimum","getSchemaFormat","format","getSchemaIf","if","getSchemaItems","items","getSchemaMaximum","maximum","getSchemaMaxContains","maxContains","getSchemaMaxItems","maxItems","getSchemaMaxLength","maxLength","getSchemaMaxProperties","maxProperties","getSchemaMinimum","minimum","getSchemaMinContains","minContains","getSchemaMinItems","minItems","getSchemaMinLength","minLength","getSchemaMinProperties","minProperties","getSchemaMultipleOf","multipleOf","getSchemaNot","not","getSchemaXOption","option","getSchemaPattern","pattern","getSchemaPatternProperties","patternProperties","getSchemaPrefixItems","prefixItems","getSchemaProperties","properties","getSchemaReadOnly","readOnly","getSchemaRequired","required","getSchemaThen","then","getSchemaTitle","title","getSchemaType","getSchemaOneOf","oneOf","getSchemaUnevaluatedProperties","unevaluatedProperties","getSchemaUniqueItems","uniqueItems","Schema","getSchemaX","keyword","getSchemaSchema","$schema","validator","errors","subSchemaEditor","Jedi","refParser","rootName","subSchemaErrors","getErrors","destroy","error","i18n","messages","constrain","valid","anyOfEditor","anyOfErrors","_enum","schemaEnum","some","e","validateFormat","options","regexp","prefixItemsSchemasCount","toString","notEditor","notErrors","counter","oneOfEditor","oneOfErrors","propertyName","editor","editorErrors","map","schemaProperties","invalidProperties","propertySchema","join","constraint","missingProperties","types","integer","boolean","array","object","null","valueType","seen","hasDuplicatedItems","i","item","itemStringified","schemaAdditionalProperties","schemaPatternProperties","property","definedInPatternProperty","isDefinedInProperties","additionalPropertyErrors","draft04","_const","schemaConst","containsEditor","containsInvalid","requiredProperties","filter","dependentSchema","tmpEditor","tmpErrors","ifThenElse","schemaIf","schemaThen","schemaElse","ifEditor","ifErrors","thenErrors","elseErrors","thenEditor","elseEditor","itemSchema","itemValue","draft06","draft07","schemaUnevaluatedProperties","schemaAllOf","schemaAnyOf","schemaOneOf","subSchema","subschema","unevaluatedPropertiesErrors","draft201909","propertie","draft202012","schemaPropertyNames","Validator","constructor","config","draft","jsonSchemaDrafts","schemaErrors","schemaOptionsMessages","schemaClone","validatorErrors","EventEmitter","listeners","on","name","callback","off","listener","emit","payload","Instance","super","jedi","isActive","parent","children","ui","isDirty","init","register","setInitialValue","prepare","setDefaultValue","container","setUI","onChildChange","EditorClass","uiResolver","getClass","getKey","pathSeparator","registerChildRecursive","child","unregister","schemaType","schemaDefault","setValue","getValue","newValue","triggersChange","enforceConst","activate","deactivate","isReadOnly","Editor","instance","theme","control","disabled","showingValidationErrors","build","enforceEnumDefault","addEventListeners","setContainerAttributes","refreshUI","showErrors","showValidationErrors","resolves","setAttribute","force","innerHTML","label","message","invalidFeedback","getInvalidFeedback","appendChild","disable","enable","refreshInteractiveElements","querySelectorAll","element","removeAttribute","sanitize","parentNode","removeChild","EditorIfThenElse","getIfThenElseControl","titleHidden","id","switcherOptionValues","switcherOptionsLabels","switcher","input","addEventListener","Number","switchInstance","childrenSlot","activeInstance","getAlert","InstanceIfThenElse","instances","instanceStartingValues","schemas","ifThenElseShemas","traverseSchema","optionLabel","instanceWithoutIf","createInstance","currentValue","getFittestIndex","fittestIndex","ifValidator","getAllOfCombinations","generateCombinations","current","remaining","nextSchema","schema1","schema2","slice","InstanceMultiple","lastIndex","onSetValue","schemasOf","schemaCopy","expand","switcherOptionsLabel","switcherTitle","schemaTitle","toUpperCase","charAt","championErrors","instanceErrors","InstanceBoolean","InstanceObject","musstCreateChild","optionsDeactivateNonRequired","deactivateNonRequired","schemaDeactivateNonRequired","isNotRequired","createChild","refreshInstances","isRequired","schemaRequired","isDependentRequired","deleteChild","splice","getChild","getPropertySchema","sortChildrenByPropertyOrder","propertyOrderA","propertyOrderB","isValidNumberA","isValidNumberB","oldValue","InstanceArray","refreshChildren","createItemInstance","itemsCount","schemaItems","schemaPrefixItems","move","fromIndex","toIndex","addItem","tempEditor","deleteItem","itemIndex","InstanceString","InstanceNumber","InstanceNull","glyphicons","delete","moveUp","moveDown","collapse","drag","bootstrapIcons","fontAwesome3","fontAwesome4","fontAwesome5","fontAwesome6","EditorBoolean","Boolean","EditorBooleanEnumRadio","getRadiosControl","values","titles","radios","radio","radioValue","checked","EditorBooleanEnumSelect","getSelectControl","labelIconClass","EditorBooleanCheckbox","getCheckboxControl","EditorString","String","EditorStringEnumRadio","EditorStringEnumSelect","EditorStringTextarea","getTextareaControl","EditorStringAwesomplete","window","Awesomplete","getInputControl","awesomplete","querySelector","style","display","console","EditorStringInput","getTypes","optionFormat","EditorNumber","EditorNumberEnumRadio","EditorNumberEnumSelect","EditorNumberInput","EditorObject","propertyActivators","schemaOptions","addProperty","enablePropertiesToggle","getObjectControl","enableCollapseToggle","startCollapsed","addPropertyBtn","addPropertyControl","ariaLive","ariaLiveMessage","getAriaLiveMessage","textContent","propertiesContainer","close","showModal","refreshPropertiesSlot","schemaOptionEnablePropertiesToggle","propertiesActivators","firstChild","notRequired","checkboxControl","checkbox","refreshEditors","EditorObjectGrid","lastChild","row","getRow","grid","columns","offset","col","getCol","newRow","EditorObjectNav","activeTabIndex","nav","cols","tabListCol","tabContentCol","tabContent","getTabContent","tabList","getTabList","stacked","variant","active","tab","getTab","hasErrors","grandChild","list","setTabPaneAttributes","EditorArray","getArrayControl","addBtn","isSortable","Sortable","deleteBtn","getDeleteItemBtn","moveUpBtn","getMoveUpItemBtn","moveDownBtn","getMoveDownItemBtn","btnGroup","getBtnGroup","arrayActions","body","getArrayItem","dragBtn","getDragItemBtn","sortable","create","animation","handle","onEnd","evt","oldIndex","newIndex","EditorArrayNav","childTitle","schemaOptionItemTemplate","i0","i1","EditorMultiple","getMultipleControl","EditorNull","getNullControl","EditorStringQuill","Quill","getPlaceholderControl","quill","placeholder","root","quillText","getText","setText","EditorStringJodit","Jodit","jodit","make","events","joditValue","setReadOnly","destruct","EditorStringFlatpickr","flatpickr","setDate","EditorNumberRaty","Raty","raty","click","score","EditorArrayEnumItems","schemaItemsType","isArrayType","isUniqueItems","hasEnum","hasTypes","validTypes","hasValidItemType","getCheckboxesControl","checkboxes","indexOf","UiResolver","customEditors","editors","iconLib","mergeAllOf","hiddenInputAttributes","bindEventListeners","icons","appendHiddenInput","classList","hiddenInput","hiddenControl","attr","arguments","getInstance","errorsList","Theme","useToggleEvents","getEditorContainer","html","document","createElement","getFieldset","getLegend","legend","legendText","getLabel","for","icon","getIcon","labelText","text","visuallyHidden","classes","iconClasses","className","getCard","getCardHeader","getCardBody","getActionsSlot","getArrayActionsSlot","getChildrenSlot","getMessagesSlot","getControlSlot","getPropertiesToggle","toggle","getButton","open","getCollapse","getCollapseToggle","collapsed","transition","transform","getPropertiesSlot","event","getPropertiesAriaLive","getPropertiesActivators","button","getArrayBtnAdd","getAddPropertyButton","deleteItemBtn","moveUpItemBtn","moveDownItemBtn","dragItemBtn","getDescription","actions","descriptionId","messagesId","propertiesToggle","collapseId","collapseToggle","fieldset","card","header","getSwitcher","br","width","describedBy","radioControls","labels","labelTexts","radioControl","formGroup","checkboxControls","invalidFeedbackText","invalidFeedbackIcon","xs","md","offsetMd","link","visuallyVisible","ThemeBootstrap3","btn","labelObj","clear","remove","ThemeBootstrap4","getColumnClass","size","ThemeBootstrap5","controlSlot","RefParser","refs","dereference","collectRefs","refsResolved","every","entries","nextPath","hasRef","ref","isExternalRef","resolvedSchema","load","startsWith","cloneSchema","$ref","uri","response","fetch","ok","Error","json","Create"],"mappings":"qOAKO,SAASA,IACd,MAAMC,EAAY,GAEX,OAAA,SAAUC,EAAKC,GACpB,GAAqB,iBAAVA,GAAgC,OAAVA,EACxB,OAAAA,EAIT,KAAOF,EAAUG,OAAS,GAAKH,EAAUI,IAAG,KAAQC,MAClDL,EAAUM,MAER,OAAAN,EAAUO,SAASL,GACd,cAETF,EAAUQ,KAAKN,GACRA,EACX,CACA,CAOO,SAASO,EAAOC,GACjB,QAAiB,IAAVA,EAIX,OAAOC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,IAAQ,IAE7C,CAEW1sB,KAAA2D,KAAK1C,GAAQgE,QAEZjF,KAAKosB,YAAYvsB,EAAO2sB,EACpC,CACA,CAEE,MAAAC,CAAQxnB,GACC,YAA0B,IAAnBA,EAAa,MAA+C,iBAAnBA,EAAa,IACxE,CAEE,aAAA0nB,CAAeD,GACT,MAAe,iBAARA,IAIJA,EAAII,WAAW,SAAWJ,EAAII,WAAW,SACpD,CAEE,QAAA7qB,CAAUpC,GACD,OAAU,OAAVA,GAAmC,iBAAVA,CACpC,CAEE,MAAAoY,CAAQhT,GACN,MAAM8nB,EAAczsB,KAAKC,MAAMD,KAAKE,UAAUyE,IAE9C,GAAIjF,KAAKiC,SAAS8qB,IAAgB/sB,KAAKysB,OAAOM,GAAc,CAC1D,MAAML,EAAMK,EAAYC,KAEjB,cADAD,EAAkB,KAClB/sB,KAAKiY,OAAOjV,EAAU,CAAA,EAAIhD,KAAKksB,KAAKQ,GAAMK,GACvD,CAEW,OAAAA,CACX,CAOE,UAAMF,CAAMI,GACN,IACI,MAAAC,QAAiBC,MAAMF,GACzB,IAACC,EAASE,GACN,MAAA,IAAIC,MAAM,+BAEX,aAAMH,EAASI,MACvB,OAAQpiB,GAED,MADEqS,QAAArS,MAAM,gBAAiB+hB,EAAK/hB,GAC9BA,CACZ,CACA,GJvCEqiB,OAAAA"} \ No newline at end of file +{"version":3,"file":"jedi.js","sources":["../../src/helpers/utils.js","../../src/helpers/schema.js","../../src/validation/constrains/allOf.js","../../src/i18n.js","../../src/validation/constrains/minLength.js","../../src/validation/constrains/anyOf.js","../../src/validation/constrains/enum.js","../../src/validation/constrains/exclusiveMaximum.js","../../src/validation/constrains/exclusiveMinimum.js","../../src/validation/constrains/format.js","../../src/validation/constrains/items.js","../../src/validation/constrains/maxItems.js","../../src/validation/constrains/maxLength.js","../../src/validation/constrains/maxProperties.js","../../src/validation/constrains/minimum.js","../../src/validation/constrains/minItems.js","../../src/validation/constrains/minProperties.js","../../src/validation/constrains/multipleOf.js","../../src/validation/constrains/not.js","../../src/validation/constrains/oneOf.js","../../src/validation/constrains/pattern.js","../../src/validation/constrains/patternProperties.js","../../src/validation/constrains/properties.js","../../src/validation/constrains/required.js","../../src/validation/constrains/type.js","../../src/validation/constrains/maximum.js","../../src/validation/constrains/uniqueItems.js","../../src/validation/constrains/additionalProperties.js","../../src/validation/drafts/draft-04.js","../../src/validation/constrains/const.js","../../src/validation/constrains/contains.js","../../src/validation/constrains/dependentRequired.js","../../src/validation/constrains/dependentSchemas.js","../../src/validation/constrains/if-then-else.js","../../src/validation/constrains/prefixItems.js","../../src/validation/drafts/draft-06.js","../../src/validation/drafts/draft-07.js","../../src/validation/constrains/unevaluatedProperties.js","../../src/validation/drafts/draft-2019-09.js","../../src/validation/drafts/draft-2020-12.js","../../src/validation/constrains/propertyNames.js","../../src/validation/validator.js","../../src/event-emitter.js","../../src/instances/instance.js","../../src/editors/editor.js","../../src/editors/if-then-else.js","../../src/instances/if-then-else.js","../../src/instances/multiple.js","../../src/instances/boolean.js","../../src/instances/object.js","../../src/instances/array.js","../../src/instances/string.js","../../src/instances/number.js","../../src/instances/null.js","../../src/themes/icons/icons.js","../../src/editors/boolean.js","../../src/editors/boolean-enum-radio.js","../../src/editors/boolean-enum-select.js","../../src/editors/boolean-checkbox.js","../../src/editors/string.js","../../src/editors/string-enum-radio.js","../../src/editors/string-enum-select.js","../../src/editors/string-textarea.js","../../src/editors/string-awesomplete.js","../../src/editors/string-input.js","../../src/editors/number.js","../../src/editors/number-enum-radio.js","../../src/editors/number-enum-select.js","../../src/editors/number-input.js","../../src/editors/object.js","../../src/editors/object-grid.js","../../src/editors/object-nav.js","../../src/editors/array.js","../../src/editors/array-nav.js","../../src/editors/multiple.js","../../src/editors/null.js","../../src/editors/string-quill.js","../../src/editors/string-jodit.js","../../src/editors/string-flatpickr.js","../../src/editors/number-raty.js","../../src/editors/array-enum-items.js","../../src/ui-resolver.js","../../src/jedi.js","../../src/themes/theme.js","../../src/index.js","../../src/themes/bootstrap3.js","../../src/themes/bootstrap4.js","../../src/themes/bootstrap5.js","../../src/ref-parser/ref-parser.js"],"sourcesContent":["/**\n * Utils.\n * @module utils\n */\n\nexport function getCircularReplacer () {\n const ancestors = []\n\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value\n }\n // `this` is the object that value is contained in,\n // i.e., its direct parent.\n while (ancestors.length > 0 && ancestors.at(-1) !== this) {\n ancestors.pop()\n }\n if (ancestors.includes(value)) {\n return '[Circular]'\n }\n ancestors.push(value)\n return value\n }\n}\n\n/**\n * Returns a clone of a thing\n * @param {*} thing - The thing to be cloned\n * @return {*} The clone of the thing\n */\nexport function clone (thing) {\n if (typeof thing === 'undefined') {\n return undefined\n }\n\n return JSON.parse(JSON.stringify(thing, getCircularReplacer()))\n}\n\n/**\n * Returns escaped regexp\n * @param {string} string - The string\n * @return {string} Escaped regexp\n */\nexport function escapeRegExp (string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\n/**\n * Multiple search and replace\n * @param {string} str - The string\n * @param {string} find - The part to be replaced\n * @param {string} replace - The replacement\n * @return {void}\n */\nexport function replaceAll (str, find, replace) {\n return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)\n}\n\n/**\n * Formats a json path to be used as an html attribute value\n * @param {string} path - The json path\n * @return {string}\n */\nexport function pathToAttribute (path) {\n return replaceAll(replaceAll(path, '#', 'root'), '/', '-')\n}\n\n/**\n * Returns true if a given object has a given property\n * @param {object} obj - The object\n * @param {string} prop - The property\n * @return {boolean}\n */\nexport function hasOwn (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop)\n}\n\n/**\n * Sort object properties\n * @param {object} obj - The object\n * @return {void}\n */\nexport function sortObject (obj) {\n return Object.keys(obj).sort().reduce((result, key) => {\n result[key] = obj[key]\n return result\n }, {})\n}\n\n/**\n * Returns true if the two values passed are equal\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function equal (a, b) {\n if (isObject(a) && isObject(b)) {\n a = sortObject(a)\n b = sortObject(b)\n }\n return JSON.stringify(a) === JSON.stringify(b)\n}\n\n/**\n * Returns true if the two values passed are different\n * @param {*} a - Value A\n * @param {*} b - Value B\n * @return {boolean}\n */\nexport function different (a, b) {\n return !equal(a, b)\n}\n\n/**\n * Returns true if the value passed is null\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNull (value) {\n return value === null\n}\n\n/**\n * Returns true if the value is defined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isSet (value) {\n return typeof value !== 'undefined'\n}\n\n/**\n * Returns true if the value is undefined\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function notSet (value) {\n return typeof value === 'undefined'\n}\n\n/**\n * Returns true if the value passed is a number\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isNumber (value) {\n return typeof value === 'number'\n}\n\n/**\n * Returns true if the value passed is an integer\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isInteger (value) {\n return isNumber(value) && value === Math.floor(value)\n}\n\n/**\n * Returns true if the value passed is a string\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isString (value) {\n return typeof value === 'string'\n}\n\n/**\n * Returns true if the value passed is a boolean\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isBoolean (value) {\n return typeof value === 'boolean'\n}\n\n/**\n * Returns true if the value passed is an array\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isArray (value) {\n return Array.isArray(value)\n}\n\n/**\n * Returns true if the value passed is an object\n * @param {*} value - The value\n * @return {boolean}\n */\nexport function isObject (value) {\n return !isNull(value) && !isArray(value) && typeof value === 'object'\n}\n\n/**\n * Returns the type of a value\n * @param {*} value - The value\n * @return {string} The type of the value\n */\nexport function getType (value) {\n let type = 'any'\n\n if (isNumber(value)) {\n type = isInteger(value) ? 'integer' : 'number'\n } else if (isString(value)) {\n type = 'string'\n } else if (isBoolean(value)) {\n type = 'boolean'\n } else if (isArray(value)) {\n type = 'array'\n } else if (isNull(value)) {\n type = 'null'\n } else if (isObject(value)) {\n type = 'object'\n }\n\n return type\n}\n\n/**\n * Merges objects\n * @param {object} target - The target object\n * @param {object[]} sources - Objects to be merged into the target object\n * @return {object} The merged object\n */\nexport function mergeDeep (target, ...sources) {\n if (!sources.length) return target\n const source = sources.shift()\n\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!target[key]) {\n Object.assign(target, {\n [key]: {}\n })\n }\n mergeDeep(target[key], source[key])\n } else {\n Object.assign(target, {\n [key]: source[key]\n })\n }\n })\n }\n\n return mergeDeep(target, ...sources)\n}\n\n/**\n * Merges objects but only the properties that exists in both objects\n * if they are the same type of value\n * @param {object} obj1 - The target object\n * @param {object[]} obj2 - Objects whose properties are the overrides\n * @return {object} The overwritten object\n */\n// export function overwriteExistingProperties (obj1, obj2) {\n// Object.keys(obj2).forEach(function (key) {\n// if (key in obj1) {\n// if (typeof obj1[key] === typeof obj2[key]) {\n// obj1[key] = obj2[key]\n// }\n// }\n// })\n//\n// return obj1\n// }\n\n/**\n * Merges objects but only the properties that exist in both objects\n * if they are the same type of value.\n * Handles nested objects recursively.\n * @param {object} obj1 - The target object\n * @param {object} obj2 - Object whose properties are the overrides\n * @return {object} The overwritten object\n */\nexport const overwriteExistingProperties = (obj1, obj2) => {\n Object.keys(obj2).forEach((key) => {\n if (key in obj1) {\n if (typeof obj1[key] === typeof obj2[key]) {\n if (isObject(obj1[key]) && isObject(obj2[key])) {\n overwriteExistingProperties(obj1[key], obj2[key])\n } else {\n obj1[key] = obj2[key]\n }\n }\n }\n })\n\n return obj1\n}\n\n/**\n * Get some value by traversing the data using JSON path\n * @param {object} data - The data source\n * @param {string} path - JSON path\n * @return {*}\n */\nexport function getValueByJSONPath (data, path) {\n const keys = path.split('.') // Split the path into individual keys\n\n let value = data\n for (const key of keys) {\n if (Array.isArray(value) && /^\\d+$/.test(key)) {\n const index = parseInt(key)\n if (index >= 0 && index < value.length) {\n value = value[index]\n } else {\n return undefined // Index is out of bounds, return undefined\n }\n } else if (hasOwn(value, key)) {\n value = value[key]\n } else {\n return undefined // Key doesn't exist, return undefined\n }\n }\n\n return value\n}\n\n/**\n * Compiles a template by search and replace\n * @param {string} template - The template string\n * @param {object} data - Where template data lives\n * @return {string}\n */\nexport function compileTemplate (template, data) {\n return template.replace(/{{(.*?)}}/g, (match) => {\n match = match.replace(/\\s/g, '')\n const path = match.split(/{{|}}/)[1]\n return getValueByJSONPath(data, path)\n })\n}\n\nexport function clamp (number, min, max) {\n return Math.max(min, Math.min(number, max))\n}\n\nexport function removeDuplicatesFromArray (arr) {\n const uniqueObjects = []\n const uniqueValues = new Set()\n\n for (const obj of arr) {\n const objString = JSON.stringify(obj)\n if (!uniqueValues.has(objString)) {\n uniqueValues.add(objString)\n uniqueObjects.push(obj)\n }\n }\n\n return uniqueObjects\n}\n\nexport default {\n getCircularReplacer,\n clone,\n escapeRegExp,\n replaceAll,\n pathToAttribute,\n hasOwn,\n sortObject,\n equal,\n different,\n isNull,\n isSet,\n notSet,\n isNumber,\n isInteger,\n isString,\n isBoolean,\n isArray,\n isObject,\n getType,\n mergeDeep,\n overwriteExistingProperties,\n getValueByJSONPath,\n compileTemplate,\n clamp,\n removeDuplicatesFromArray\n}\n","import { isString, isArray, isNumber, isInteger, isBoolean, isObject, isSet } from './utils.js'\n\nexport function getSchemaX (schema, keyword) {\n const key = 'x-' + keyword\n return schema[key]\n}\n\nexport function getSchemaSchema (schema) {\n return isString(schema.$schema) ? schema.$schema : undefined\n}\n\nexport function getSchemaAdditionalProperties (schema) {\n return isObject(schema.additionalProperties) || isBoolean(schema.additionalProperties) ? schema.additionalProperties : undefined\n}\n\nexport function getSchemaPropertyNames (schema) {\n return isObject(schema.propertyNames) || isBoolean(schema.propertyNames) ? schema.propertyNames : undefined\n}\n\nexport function getSchemaAllOf (schema) {\n return isArray(schema.allOf) ? schema.allOf : undefined\n}\n\nexport function getSchemaAnyOf (schema) {\n return isArray(schema.anyOf) ? schema.anyOf : undefined\n}\n\nexport function getSchemaConst (schema) {\n return schema.const\n}\n\nexport function getSchemaContains (schema) {\n return (isObject(schema.contains) || isBoolean(schema.contains)) ? schema.contains : undefined\n}\n\nexport function getSchemaDefault (schema) {\n return schema.default\n}\n\nexport function getSchemaDependentRequired (schema) {\n return isObject(schema.dependentRequired) ? schema.dependentRequired : undefined\n}\n\nexport function getSchemaDependentSchemas (schema) {\n return isObject(schema.dependentSchemas) ? schema.dependentSchemas : undefined\n}\n\nexport function getSchemaDescription (schema) {\n return isString(schema.description) ? schema.description : undefined\n}\n\nexport function getSchemaElse (schema) {\n return (isObject(schema.else) || isBoolean(schema.else)) ? schema.else : undefined\n}\n\nexport function getSchemaEnum (schema) {\n if (isArray(schema.enum) && schema.enum.length > 0) {\n return schema.enum\n }\n\n return undefined\n}\n\nexport function getSchemaExclusiveMaximum (schema) {\n return isNumber(schema.exclusiveMaximum) ? schema.exclusiveMaximum : undefined\n}\n\nexport function getSchemaExclusiveMinimum (schema) {\n return isNumber(schema.exclusiveMinimum) ? schema.exclusiveMinimum : undefined\n}\n\nexport function getSchemaFormat (schema) {\n return isString(schema.format) ? schema.format : undefined\n}\n\nexport function getSchemaIf (schema) {\n if (isObject(schema.if)) {\n return schema.if\n }\n\n if (isBoolean(schema.if)) {\n return schema.if\n }\n\n return undefined\n}\n\nexport function getSchemaItems (schema) {\n return isObject(schema.items) || isBoolean(schema.items) ? schema.items : undefined\n}\n\nexport function getSchemaMaximum (schema) {\n return isNumber(schema.maximum) ? schema.maximum : undefined\n}\n\nexport function getSchemaMaxContains (schema) {\n if (isInteger(schema.maxContains) && schema.maxContains >= 0) {\n return schema.maxContains\n }\n\n return undefined\n}\n\nexport function getSchemaMaxItems (schema) {\n if (isInteger(schema.maxItems) && schema.maxItems >= 0) {\n return schema.maxItems\n }\n\n return undefined\n}\n\nexport function getSchemaMaxLength (schema) {\n if (isInteger(schema.maxLength) && schema.maxLength >= 0) {\n return schema.maxLength\n }\n\n return undefined\n}\n\nexport function getSchemaMaxProperties (schema) {\n if (isInteger(schema.maxProperties)) {\n return schema.maxProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMinimum (schema) {\n return isNumber(schema.minimum) ? schema.minimum : undefined\n}\n\nexport function getSchemaMinContains (schema) {\n if (isInteger(schema.minContains) && schema.minContains >= 0) {\n return schema.minContains\n }\n\n return undefined\n}\n\nexport function getSchemaMinItems (schema) {\n if (isInteger(schema.minItems) && schema.minItems >= 0) {\n return schema.minItems\n }\n\n return undefined\n}\n\nexport function getSchemaMinLength (schema) {\n if (isInteger(schema.minLength) && schema.minLength >= 0) {\n return schema.minLength\n }\n\n return undefined\n}\n\nexport function getSchemaMinProperties (schema) {\n if (isInteger(schema.minProperties) && schema.minProperties >= 0) {\n return schema.minProperties\n }\n\n return undefined\n}\n\nexport function getSchemaMultipleOf (schema) {\n if (isNumber(schema.multipleOf) && schema.multipleOf >= 0) {\n return schema.multipleOf\n }\n\n return undefined\n}\n\nexport function getSchemaNot (schema) {\n return (isObject(schema.not) || isBoolean(schema.not)) ? schema.not : undefined\n}\n\nexport function getSchemaXOption (schema, option) {\n return (schema['x-options'] && isSet(schema['x-options'][option])) ? schema['x-options'][option] : undefined\n}\n\nexport function getSchemaPattern (schema) {\n return isString(schema.pattern) ? schema.pattern : undefined\n}\n\nexport function getSchemaPatternProperties (schema) {\n return isObject(schema.patternProperties) ? schema.patternProperties : undefined\n}\n\nexport function getSchemaPrefixItems (schema) {\n return isArray(schema.prefixItems) ? schema.prefixItems : undefined\n}\n\nexport function getSchemaProperties (schema) {\n return isObject(schema.properties) ? schema.properties : undefined\n}\n\nexport function getSchemaReadOnly (schema) {\n return isBoolean(schema.readOnly) ? schema.readOnly : undefined\n}\n\nexport function getSchemaRequired (schema) {\n return isArray(schema.required) ? [...new Set(schema.required)] : undefined\n}\n\nexport function getSchemaThen (schema) {\n return (isObject(schema.then) || isBoolean(schema.then)) ? schema.then : undefined\n}\n\nexport function getSchemaTitle (schema) {\n return isString(schema.title) ? schema.title : undefined\n}\n\nexport function getSchemaType (schema) {\n if (isString(schema.type) || isArray(schema.type)) {\n return schema.type\n }\n\n return undefined\n}\n\nexport function getSchemaOneOf (schema) {\n return isArray(schema.oneOf) ? schema.oneOf : undefined\n}\n\nexport function getSchemaUnevaluatedProperties (schema) {\n return isBoolean(schema.unevaluatedProperties) ? schema.unevaluatedProperties : undefined\n}\n\nexport function getSchemaUniqueItems (schema) {\n return isBoolean(schema.uniqueItems) ? schema.uniqueItems : undefined\n}\n\nexport default {\n getSchemaX,\n getSchemaSchema,\n getSchemaAdditionalProperties,\n getSchemaPropertyNames,\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaConst,\n getSchemaContains,\n getSchemaDefault,\n getSchemaDependentRequired,\n getSchemaDependentSchemas,\n getSchemaDescription,\n getSchemaElse,\n getSchemaEnum,\n getSchemaExclusiveMaximum,\n getSchemaExclusiveMinimum,\n getSchemaFormat,\n getSchemaIf,\n getSchemaItems,\n getSchemaMaximum,\n getSchemaMaxContains,\n getSchemaMaxItems,\n getSchemaMaxLength,\n getSchemaMaxProperties,\n getSchemaMinimum,\n getSchemaMinContains,\n getSchemaMinItems,\n getSchemaMinLength,\n getSchemaMinProperties,\n getSchemaMultipleOf,\n getSchemaNot,\n getSchemaXOption,\n getSchemaPattern,\n getSchemaPatternProperties,\n getSchemaPrefixItems,\n getSchemaProperties,\n getSchemaReadOnly,\n getSchemaRequired,\n getSchemaThen,\n getSchemaTitle,\n getSchemaType,\n getSchemaOneOf,\n getSchemaUnevaluatedProperties,\n getSchemaUniqueItems\n}\n","import { isSet, removeDuplicatesFromArray } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAllOf } from '../../helpers/schema.js'\n\nexport function allOf (validator, value, schema, key, path) {\n let errors = []\n const allOf = getSchemaAllOf(schema)\n\n if (isSet(allOf)) {\n allOf.forEach((schema) => {\n const subSchemaEditor = new Jedi({ refParser: validator.refParser, schema, data: value, rootName: key })\n const subSchemaErrors = subSchemaEditor.getErrors()\n subSchemaEditor.destroy()\n\n subSchemaErrors.forEach((error) => {\n error.path = path\n })\n\n errors.push(...subSchemaErrors)\n })\n\n errors = removeDuplicatesFromArray(errors)\n }\n\n return errors\n}\n","/**\n * Simple translation module.\n * @module i18n\n */\n\n/**\n * Locale messages\n * @type {object}\n */\nexport const i18n = {\n errorAdditionalProperties: 'Has additional property \"{{ property }}\" but no additional properties are allowed.',\n errorAnyOf: 'Must validate against at least one of the provided schemas.',\n errorConst: 'Must have value of: {{ const }}.',\n errorContains: 'Must contain at least one item matching the provided schema.',\n errorDependentRequired: 'Must have the required properties: {{ dependentRequired }}.',\n errorEnum: 'Must be one of the enumerated values: {{ enum }}.',\n errorExclusiveMaximum: 'Must be less than {{ exclusiveMaximum }}.',\n errorExclusiveMinimum: 'Must be greater than {{ exclusiveMinimum }}.',\n errorFormat: 'Must be a valid {{ format }}.',\n errorItems: 'Must have items that validate against the provided schema.',\n errorMaximum: 'Must be at most {{ maximum }}.',\n errorMaxItems: 'Must have at most {{ maxItems }} items.',\n errorMaxLength: 'Must be at most {{ maxLength }} characters long.',\n errorMaxProperties: 'Must have at most {{ maxProperties }} properties.',\n errorMaxContains: 'Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinContains: 'Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.',\n errorMinimum: 'Must be at least {{ minimum }}.',\n errorMinItems: 'Must have at least {{ minItems }} items.',\n errorMinLength: 'Must be at least {{ minLength }} characters long.',\n errorMinProperties: 'Must have at least {{ minProperties }} properties.',\n errorMultipleOf: 'Must be multiple of {{ multipleOf }}.',\n errorNot: 'Must not validate against the provided schema.',\n errorOneOf: 'Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.',\n errorPattern: 'Must match the pattern: \"{{ pattern }}\".',\n errorPrefixItems: 'Item {{ index }} fails validation.',\n errorPropertyNames: 'Property name \"{{ propertyName }}\" fails validation.',\n errorProperties: 'The following properties do not comply with their schemas: {{ properties }}',\n errorRequired: 'Must have the required properties: {{ required }}.',\n errorType: 'Must be of type {{ type }}.',\n errorUnevaluatedProperties: 'Has invalid unevaluated property \"{{ property }}\"',\n errorUniqueItems: 'Must have unique items.'\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMinLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minLength (validator, value, schema, key, path) {\n const errors = []\n const minLength = getSchemaMinLength(schema)\n\n if (isString(value) && isSet(minLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length < minLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinLength, {\n minLength: minLength\n })\n ],\n path: path,\n constrain: 'minLength'\n })\n }\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet } from '../../helpers/utils.js'\nimport { getSchemaAnyOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function anyOf (validator, value, schema, key, path) {\n const errors = []\n const anyOf = getSchemaAnyOf(schema)\n\n if (isSet(anyOf)) {\n let valid = false\n\n anyOf.forEach((schema) => {\n const anyOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const anyOfErrors = anyOfEditor.getErrors()\n anyOfEditor.destroy()\n\n if (anyOfErrors.length === 0) {\n valid = true\n }\n })\n\n if (!valid) {\n errors.push({\n messages: [\n i18n.errorAnyOf\n ],\n path: path,\n constrain: 'anyOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaEnum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _enum (validator, value, schema, key, path) {\n const errors = []\n const schemaEnum = getSchemaEnum(schema)\n\n if (isSet(schemaEnum)) {\n const invalid = !schemaEnum.some(e => JSON.stringify(value) === JSON.stringify(e))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorEnum, {\n enum: JSON.stringify(schemaEnum)\n })\n ],\n path: path,\n constrain: 'enum'\n })\n }\n }\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMaximum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMaximum = getSchemaExclusiveMaximum(schema)\n\n if (isNumber(value) && isSet(exclusiveMaximum)) {\n const invalid = (value >= exclusiveMaximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMaximum, {\n exclusiveMaximum: exclusiveMaximum\n })\n ],\n path: path,\n constrain: 'exclusiveMaximum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaExclusiveMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function exclusiveMinimum (validator, value, schema, key, path) {\n const errors = []\n const exclusiveMinimum = getSchemaExclusiveMinimum(schema)\n\n if (isNumber(value) && isSet(exclusiveMinimum)) {\n const invalid = (value <= exclusiveMinimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorExclusiveMinimum, {\n exclusiveMinimum: exclusiveMinimum\n })\n ],\n path: path,\n constrain: 'exclusiveMinimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaFormat, getSchemaXOption } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function format (validator, value, schema, key, path) {\n const errors = []\n const format = getSchemaFormat(schema)\n let validateFormat = validator.validateFormat\n\n if (getSchemaXOption(schema, 'validateFormat')) {\n validateFormat = schema.options.validateFormat\n }\n\n if (isSet(format) && isString(value) && validateFormat) {\n let regexp\n\n if (format === 'email') {\n regexp = new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/i)\n }\n\n if (format === 'url') {\n regexp = new RegExp(/^(?:https?|ftp):\\/\\/(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:(?:[^\\s:@]+(?::[^\\s:@]*)?@)?(?:[^\\s:@](?:[^\\s:@-]*[^\\s:@])?\\.?)+[a-zA-Z]{2,}|(?:\\d{1,3}\\.){3}\\d{1,3})(?::\\d{2,5})?(?:\\/[^\\s]*)?$/i)\n }\n\n if (format === 'uuid') {\n regexp = new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)\n }\n\n const invalid = isSet(regexp) && !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorFormat, { format: format })\n ],\n path: path,\n constrain: 'format'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function items (validator, value, schema, key, path) {\n const errors = []\n const items = getSchemaItems(schema)\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(items)) {\n const prefixItemsSchemasCount = isSet(prefixItems) ? prefixItems.length : 0\n\n if (items === false && value.length > 0 && value.length > prefixItemsSchemasCount) {\n errors.push({\n messages: [i18n.errorItems],\n path: path,\n constrain: 'items'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxItems (validator, value, schema, key, path) {\n const errors = []\n const maxItems = getSchemaMaxItems(schema)\n\n if (isArray(value) && isSet(maxItems)) {\n const invalid = (value.length > maxItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxItems, {\n maxItems: maxItems\n })\n ],\n path: path,\n constrain: 'maxItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaMaxLength } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxLength (validator, value, schema, key, path) {\n const errors = []\n const maxLength = getSchemaMaxLength(schema)\n\n if (isString(value) && isSet(maxLength)) {\n value = value.replace(/[\\uDCA9]/g, '') // remove Unicode code points\n const invalid = (value.length > maxLength)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxLength, {\n maxLength: maxLength\n })\n ],\n path: path,\n constrain: 'maxLength'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaxProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maxProperties (validator, value, schema, key, path) {\n const errors = []\n const maxProperties = getSchemaMaxProperties(schema)\n\n if (isObject(value) && isSet(maxProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount > maxProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxProperties, {\n maxProperties: maxProperties\n })\n ],\n path: path,\n constrain: 'maxProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinimum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minimum (validator, value, schema, key, path) {\n const errors = []\n const minimum = getSchemaMinimum(schema)\n\n if (isNumber(value) && isSet(minimum)) {\n const invalid = (value < minimum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinimum, {\n minimum: minimum\n })\n ],\n path: path,\n constrain: 'minimum'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minItems (validator, value, schema, key, path) {\n const errors = []\n const minItems = getSchemaMinItems(schema)\n\n if (isArray(value) && isSet(minItems)) {\n const invalid = (value.length < minItems)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinItems, {\n minItems: minItems\n })\n ],\n path: path,\n constrain: 'minItems'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaMinProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function minProperties (validator, value, schema, key, path) {\n const errors = []\n const minProperties = getSchemaMinProperties(schema)\n\n if (isObject(value) && isSet(minProperties)) {\n const propertiesCount = Object.keys(value).length\n const invalid = (propertiesCount < minProperties)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinProperties, {\n minProperties: minProperties\n })\n ],\n path: path,\n constrain: 'minProperties'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMultipleOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function multipleOf (validator, value, schema, key, path) {\n const errors = []\n const multipleOf = getSchemaMultipleOf(schema)\n\n if (isNumber(value) && isSet(multipleOf)) {\n if (value === 0) {\n return errors\n }\n\n const isMultipleOf = (value / multipleOf === Math.floor(value / multipleOf))\n const invalid = (!isMultipleOf || value.toString().includes('e'))\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMultipleOf, {\n multipleOf: multipleOf\n })\n ],\n path: path,\n constrain: 'multipleOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport { getSchemaNot } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\nimport Jedi from '../../jedi.js'\n\nexport function not (validator, value, schema, key, path) {\n const errors = []\n const not = getSchemaNot(schema)\n\n if (isSet(not)) {\n const notEditor = new Jedi({ refParser: validator.refParser, schema: not, data: value })\n const notErrors = notEditor.getErrors()\n notEditor.destroy()\n\n const invalid = notErrors.length === 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorNot)\n ],\n path: path,\n constrain: 'not'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaOneOf } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function oneOf (validator, value, schema, key, path) {\n const errors = []\n const oneOf = getSchemaOneOf(schema)\n\n if (isSet(oneOf)) {\n let counter = 0\n\n oneOf.forEach((schema) => {\n const oneOfEditor = new Jedi({ refParser: validator.refParser, schema: schema, data: value })\n const oneOfErrors = oneOfEditor.getErrors()\n oneOfEditor.destroy()\n\n if (oneOfErrors.length === 0) {\n counter++\n }\n })\n\n if (counter !== 1) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorOneOf, {\n counter: counter\n })\n ],\n path: path,\n constrain: 'oneOf'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isSet, isString } from '../../helpers/utils.js'\nimport { getSchemaPattern } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function pattern (validator, value, schema, key, path) {\n const errors = []\n const pattern = getSchemaPattern(schema)\n\n if (isString(value) && isSet(pattern)) {\n const regexp = new RegExp(pattern)\n const invalid = !regexp.test(value)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPattern, {\n pattern: pattern\n })\n ],\n path: path,\n constrain: 'pattern'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPatternProperties } from '../../helpers/schema.js'\n\nexport function patternProperties (validator, value, schema, path) {\n let errors = []\n const patternProperties = getSchemaPatternProperties(schema)\n\n if (isObject(value) && isSet(patternProperties)) {\n Object.keys(value).forEach((propertyName) => {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n const schema = patternProperties[pattern]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schema,\n data: value[propertyName]\n })\n\n const editorErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: path + '/' + propertyName,\n constrain: 'patternProperties'\n }\n })\n\n errors = [...errors, ...editorErrors]\n\n editor.destroy()\n }\n })\n })\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function properties (validator, value, schema, path) {\n const schemaProperties = getSchemaProperties(schema)\n const invalidProperties = []\n\n if (isObject(value) && isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((propertyName) => {\n if (hasOwn(value, propertyName)) {\n const propertySchema = schemaProperties[propertyName]\n\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: propertySchema,\n data: value[propertyName]\n })\n\n if (editor.getErrors().length > 0) {\n invalidProperties.push(propertyName)\n }\n\n editor.destroy()\n }\n })\n }\n\n if (invalidProperties.length > 0) {\n return [{\n messages: [\n compileTemplate(i18n.errorProperties, { properties: invalidProperties.join(', ') })\n ],\n path: path,\n constraint: 'properties'\n }]\n }\n\n return []\n}\n","import { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function required (validator, value, schema, key, path) {\n const errors = []\n const required = getSchemaRequired(schema)\n\n if (isObject(value) && isSet(required)) {\n const missingProperties = []\n const keys = Object.keys(value)\n\n required.forEach((key) => {\n if (!keys.includes(key)) {\n missingProperties.push(key)\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorRequired, {\n required: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'required'\n })\n }\n }\n\n return errors\n}\n","import {\n compileTemplate, getType,\n isArray,\n isBoolean,\n isInteger,\n isNull,\n isNumber,\n isObject,\n isSet,\n isString\n} from '../../helpers/utils.js'\nimport { getSchemaType } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function type (validator, value, schema, key, path) {\n const errors = []\n const type = getSchemaType(schema)\n\n if (type === 'any') {\n return errors\n }\n\n if (isSet(type)) {\n const types = {\n string: value => isString(value),\n number: value => isNumber(value),\n integer: value => isInteger(value),\n boolean: value => isBoolean(value),\n array: value => isArray(value),\n object: value => isObject(value),\n null: value => isNull(value)\n }\n\n let valid = true\n\n if (isArray(type)) {\n valid = type.some((type) => {\n return types[type](value)\n })\n } else {\n valid = types[type](value)\n }\n\n if (!valid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorType, {\n type: type,\n valueType: getType(value)\n })\n ],\n path: path,\n constrain: 'type'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isNumber, isSet } from '../../helpers/utils.js'\nimport { getSchemaMaximum } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function maximum (validator, value, schema, key, path) {\n const errors = []\n const maximum = getSchemaMaximum(schema)\n\n if (isNumber(value) && isSet(maximum)) {\n const invalid = (value > maximum)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaximum, {\n maximum: maximum\n })\n ],\n path: path,\n constrain: 'maximum'\n })\n }\n }\n\n return errors\n}\n","import { isArray, isObject, isSet, sortObject } from '../../helpers/utils.js'\nimport { getSchemaUniqueItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function uniqueItems (validator, value, schema, key, path) {\n const errors = []\n const uniqueItems = getSchemaUniqueItems(schema)\n\n if (isArray(value) && isSet(uniqueItems) && uniqueItems === true) {\n const seen = []\n let hasDuplicatedItems = false\n\n for (let i = 0; i < value.length; i++) {\n let item = value[i]\n\n if (isObject(item)) {\n item = sortObject(item)\n }\n\n const itemStringified = JSON.stringify(item)\n hasDuplicatedItems = seen.some((seen) => seen === itemStringified)\n\n if (hasDuplicatedItems) {\n break\n } else {\n seen.push(itemStringified)\n }\n }\n\n const invalid = (hasDuplicatedItems)\n\n if (invalid) {\n errors.push({\n messages: [\n i18n.errorUniqueItems\n ],\n path: path,\n constrain: 'uniqueItems'\n })\n }\n }\n\n return errors\n}\n","/**\n * Constrains additionalProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaAdditionalProperties, getSchemaPatternProperties, getSchemaProperties } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function additionalProperties (validator, value, schema, key, path) {\n const errors = []\n const schemaAdditionalProperties = getSchemaAdditionalProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n\n if (isObject(value) && isSet(schemaAdditionalProperties)) {\n const properties = schemaProperties || {}\n const additionalProperties = schemaAdditionalProperties\n const patternProperties = schemaPatternProperties || {}\n\n Object.keys(value).forEach((property) => {\n const definedInPatternProperty = Object.keys(patternProperties).some((pattern) => {\n const regexp = new RegExp(pattern)\n return regexp.test(property)\n })\n\n const isDefinedInProperties = hasOwn(properties, property)\n\n if (!definedInPatternProperty && !isDefinedInProperties) {\n if (additionalProperties === false) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorAdditionalProperties, { property })\n ],\n path,\n constrain: 'additionalProperties'\n })\n } else if (isObject(additionalProperties)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: additionalProperties,\n data: value[property]\n })\n\n const additionalPropertyErrors = editor.getErrors().map((error) => ({\n messages: error.messages,\n path: `${path}.${property}`,\n constrain: 'additionalProperties'\n }))\n\n errors.push(...additionalPropertyErrors)\n editor.destroy()\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { isSet, different, compileTemplate } from '../../helpers/utils.js'\nimport { getSchemaConst } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function _const (validator, value, schema, key, path) {\n const errors = []\n const schemaConst = getSchemaConst(schema)\n\n if (isSet(schemaConst)) {\n const valueIsNotEqualConst = different(value, schemaConst)\n const invalid = (valueIsNotEqualConst)\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorConst, {\n const: JSON.stringify(schemaConst)\n })\n ],\n path: path,\n constrain: 'const'\n })\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaContains, getSchemaMaxContains, getSchemaMinContains } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function contains (validator, value, schema, key, path) {\n const errors = []\n const contains = getSchemaContains(schema)\n const minContains = getSchemaMinContains(schema)\n const maxContains = getSchemaMaxContains(schema)\n\n if (isArray(value) && isSet(contains)) {\n let counter = 0\n\n value.forEach((item) => {\n const containsEditor = new Jedi({ refParser: validator.refParser, schema: contains, data: item })\n const containsErrors = containsEditor.getErrors()\n\n if (containsErrors.length === 0) {\n counter++\n }\n\n containsEditor.destroy()\n })\n\n const containsInvalid = (counter === 0)\n\n if (isSet(minContains)) {\n const minContainsInvalid = (counter < minContains)\n\n if (minContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMinContains, {\n counter: counter,\n minContains: minContains\n })\n ],\n path: path,\n constrain: 'minContains'\n })\n }\n } else {\n if (containsInvalid) {\n errors.push({\n messages: [i18n.errorContains],\n path: path,\n constrain: 'contains'\n })\n }\n }\n\n if (isSet(maxContains)) {\n const maxContainsInvalid = (counter > maxContains)\n\n if (maxContainsInvalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorMaxContains, {\n counter: counter,\n maxContains: maxContains\n })\n ],\n path: path,\n constrain: 'maxContains'\n })\n }\n }\n }\n\n return errors\n}\n","import { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport { getSchemaDependentRequired } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function dependentRequired (validator, value, schema, key, path) {\n const errors = []\n const dependentRequired = getSchemaDependentRequired(schema)\n\n if (isObject(value) && isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(value, property)\n })\n }\n })\n\n const invalid = missingProperties.length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorDependentRequired, {\n dependentRequired: missingProperties.join(', ')\n })\n ],\n path: path,\n constrain: 'dependentRequired'\n })\n }\n }\n\n return errors\n}\n","import { isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaDependentSchemas } from '../../helpers/schema.js'\n\nexport function dependentSchemas (validator, value, schema) {\n let errors = []\n const dependentSchemas = getSchemaDependentSchemas(schema)\n\n if (isObject(value) && isSet(dependentSchemas)) {\n Object.keys(dependentSchemas).forEach((key) => {\n if (isSet(value[key])) {\n const dependentSchema = dependentSchemas[key]\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: dependentSchema, data: value })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n errors = [...errors, ...tmpErrors]\n }\n })\n }\n\n return errors\n}\n","import Jedi from '../../jedi.js'\nimport { isSet, notSet } from '../../helpers/utils.js'\nimport { getSchemaElse, getSchemaIf, getSchemaThen } from '../../helpers/schema.js'\n\nexport function ifThenElse (validator, value, schema) {\n const errors = []\n const schemaIf = getSchemaIf(schema)\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n if (isSet(schemaIf)) {\n if (notSet(schemaThen) && notSet(schemaElse)) {\n return errors\n }\n\n const ifEditor = new Jedi({ refParser: validator.refParser, schema: schemaIf, data: value })\n const ifErrors = ifEditor.getErrors()\n ifEditor.destroy()\n\n let thenErrors = []\n let elseErrors = []\n\n if (isSet(schemaThen)) {\n const thenEditor = new Jedi({ refParser: validator.refParser, schema: schemaThen, data: value })\n thenErrors = thenEditor.getErrors()\n thenEditor.destroy()\n }\n\n if (isSet(schemaElse)) {\n const elseEditor = new Jedi({ refParser: validator.refParser, schema: schemaElse, data: value })\n elseErrors = elseEditor.getErrors()\n elseEditor.destroy()\n }\n\n if (schemaIf === true) {\n return thenErrors\n }\n\n if (schemaIf === false) {\n return elseErrors\n }\n\n if (ifErrors.length === 0) {\n return thenErrors\n }\n\n if (ifErrors.length > 0) {\n return elseErrors\n }\n }\n\n return errors\n}\n","import { compileTemplate, isArray, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport { getSchemaPrefixItems } from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function prefixItems (validator, value, schema, key, path) {\n const errors = []\n const prefixItems = getSchemaPrefixItems(schema)\n\n if (isArray(value) && isSet(prefixItems)) {\n prefixItems.forEach((itemSchema, index) => {\n const itemValue = value[index]\n\n if (isSet(itemValue)) {\n const tmpEditor = new Jedi({ refParser: validator.refParser, schema: itemSchema, data: itemValue })\n const tmpErrors = tmpEditor.getErrors()\n tmpEditor.destroy()\n\n if (tmpErrors.length > 0) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPrefixItems, {\n index: index\n })\n ],\n path: path,\n constrain: 'prefixItems'\n })\n }\n }\n })\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n properties: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains unevaluatedProperties\n */\n\nimport { compileTemplate, hasOwn, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaUnevaluatedProperties,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaAnyOf, getSchemaAllOf, getSchemaOneOf\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function unevaluatedProperties (validator, value, schema, key, path) {\n let errors = []\n const schemaUnevaluatedProperties = getSchemaUnevaluatedProperties(schema)\n const schemaPatternProperties = getSchemaPatternProperties(schema)\n const schemaProperties = getSchemaProperties(schema)\n const schemaAllOf = getSchemaAllOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n\n if (isObject(value) && isSet(schemaUnevaluatedProperties)) {\n let properties = isSet(schemaProperties) ? schemaProperties : {}\n const unevaluatedProperties = schemaUnevaluatedProperties\n const patternProperties = schemaPatternProperties\n\n // see through allOf, anyOf and oneOf\n const ofSchemas = [\n schemaAllOf,\n schemaAnyOf,\n schemaOneOf\n ]\n\n ofSchemas.forEach((subSchema) => {\n if (isSet(subSchema)) {\n subSchema.forEach((subschema) => {\n if (isSet(subschema['properties'])) {\n properties = { ...properties, ...subschema['properties'] }\n }\n })\n }\n })\n\n if (properties) {\n Object.keys(value).forEach((property) => {\n let definedInPatternProperty = false\n\n if (isSet(patternProperties)) {\n Object.keys(patternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n definedInPatternProperty = regexp.test(property)\n })\n }\n\n if (!definedInPatternProperty && unevaluatedProperties === false && !hasOwn(properties, property)) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorUnevaluatedProperties, {\n property: property\n })\n ],\n path: path,\n constrain: 'unevaluatedProperties'\n })\n }\n\n if (!definedInPatternProperty && isObject(unevaluatedProperties) && !hasOwn(properties, property)) {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: unevaluatedProperties,\n data: value[property]\n })\n\n const unevaluatedPropertiesErrors = editor.getErrors().map((error) => {\n return {\n messages: error.messages,\n path: property,\n constrain: 'unevaluatedProperties'\n }\n })\n\n errors = [...errors, ...unevaluatedPropertiesErrors]\n\n editor.destroy()\n }\n })\n }\n }\n\n return errors\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { properties } from '../constrains/properties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n propertie: properties,\n prefixItems: prefixItems,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","import { allOf } from '../constrains/allOf.js'\nimport { minLength } from '../constrains/minLength.js'\nimport { _const } from '../constrains/const.js'\nimport { contains } from '../constrains/contains.js'\nimport { anyOf } from '../constrains/anyOf.js'\nimport { dependentRequired } from '../constrains/dependentRequired.js'\nimport { dependentSchemas } from '../constrains/dependentSchemas.js'\nimport { _enum } from '../constrains/enum.js'\nimport { exclusiveMaximum } from '../constrains/exclusiveMaximum.js'\nimport { exclusiveMinimum } from '../constrains/exclusiveMinimum.js'\nimport { format } from '../constrains/format.js'\nimport { ifThenElse } from '../constrains/if-then-else.js'\nimport { items } from '../constrains/items.js'\nimport { maxItems } from '../constrains/maxItems.js'\nimport { maxLength } from '../constrains/maxLength.js'\nimport { maxProperties } from '../constrains/maxProperties.js'\nimport { minimum } from '../constrains/minimum.js'\nimport { minItems } from '../constrains/minItems.js'\nimport { minProperties } from '../constrains/minProperties.js'\nimport { multipleOf } from '../constrains/multipleOf.js'\nimport { not } from '../constrains/not.js'\nimport { oneOf } from '../constrains/oneOf.js'\nimport { pattern } from '../constrains/pattern.js'\nimport { patternProperties } from '../constrains/patternProperties.js'\nimport { prefixItems } from '../constrains/prefixItems.js'\nimport { propertyNames } from '../constrains/propertyNames.js'\nimport { properties } from '../constrains/properties.js'\nimport { required } from '../constrains/required.js'\nimport { type } from '../constrains/type.js'\nimport { maximum } from '../constrains/maximum.js'\nimport { uniqueItems } from '../constrains/uniqueItems.js'\nimport { additionalProperties } from '../constrains/additionalProperties.js'\nimport { unevaluatedProperties } from '../constrains/unevaluatedProperties.js'\n\nexport default {\n additionalProperties: additionalProperties,\n allOf: allOf,\n anyOf: anyOf,\n const: _const,\n contains: contains,\n dependentRequired: dependentRequired,\n dependentSchemas: dependentSchemas,\n enum: _enum,\n exclusiveMaximum: exclusiveMaximum,\n exclusiveMinimum: exclusiveMinimum,\n format: format,\n if: ifThenElse,\n items: items,\n maximum: maximum,\n maxItems: maxItems,\n maxLength: maxLength,\n maxProperties: maxProperties,\n minimum: minimum,\n minItems: minItems,\n minLength: minLength,\n minProperties: minProperties,\n multipleOf: multipleOf,\n not: not,\n oneOf: oneOf,\n pattern: pattern,\n patternProperties: patternProperties,\n prefixItems: prefixItems,\n propertyNames: propertyNames,\n properties: properties,\n required: required,\n type: type,\n unevaluatedProperties: unevaluatedProperties,\n uniqueItems: uniqueItems\n}\n","/**\n * constrains propertyNames\n */\n\nimport { compileTemplate, isObject, isSet } from '../../helpers/utils.js'\nimport Jedi from '../../jedi.js'\nimport {\n getSchemaPropertyNames\n} from '../../helpers/schema.js'\nimport { i18n } from '../../i18n.js'\n\nexport function propertyNames (validator, value, schema, key, path) {\n const errors = []\n const schemaPropertyNames = getSchemaPropertyNames(schema)\n\n if (isObject(value) && isSet(schemaPropertyNames)) {\n Object.keys(value).forEach((propertyName) => {\n const editor = new Jedi({\n refParser: validator.refParser,\n schema: schemaPropertyNames,\n data: propertyName\n })\n\n const invalid = editor.getErrors().length > 0\n\n if (invalid) {\n errors.push({\n messages: [\n compileTemplate(i18n.errorPropertyNames, { propertyName: propertyName })\n ],\n path: path,\n constrain: 'propertyNames'\n })\n }\n })\n }\n\n return errors\n}\n","import draft04 from './drafts/draft-04.js'\nimport draft06 from './drafts/draft-06.js'\nimport draft07 from './drafts/draft-07.js'\nimport draft201909 from './drafts/draft-2019-09.js'\nimport draft202012 from './drafts/draft-2020-12.js'\nimport { hasOwn, isBoolean, clone, isSet } from '../helpers/utils.js'\nimport { getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a Validator instance.\n */\nclass Validator {\n constructor (config = {}) {\n this.refParser = config.refParser\n this.validateFormat = config.validateFormat ? config.validateFormat : false\n this.draft = draft202012\n\n this.jsonSchemaDrafts = {\n 'http://json-schema.org/draft-04/schema#': draft04,\n 'http://json-schema.org/draft-06/schema#': draft06,\n 'http://json-schema.org/draft-07/schema#': draft07,\n 'https://json-schema.org/draft/2019-09/schema': draft201909,\n 'https://json-schema.org/draft/2020-12/schema': draft202012\n }\n }\n\n /**\n * Validates a value against it's schema\n */\n getErrors (value, schema, key, path) {\n let schemaErrors = []\n const schemaOptionsMessages = getSchemaXOption(schema, 'messages')\n\n const schemaClone = clone(schema)\n\n if (isBoolean(schemaClone) && schemaClone === true) {\n return schemaErrors\n }\n\n if (isBoolean(schemaClone) && schemaClone === false) {\n return [{\n messages: isSet(schemaOptionsMessages) ? schemaOptionsMessages : ['invalid'],\n path: path\n }]\n }\n\n Object.keys(this.draft).forEach((constrain) => {\n if (hasOwn(schemaClone, constrain)) {\n const validator = this.draft[constrain]\n const validatorErrors = validator(this, value, schema, key, path)\n\n if (validatorErrors) {\n schemaErrors = [...schemaErrors, ...validatorErrors]\n }\n }\n })\n\n if (schemaErrors.length > 0 && schemaOptionsMessages) {\n schemaErrors = [\n {\n messages: schemaOptionsMessages,\n path: path\n }\n ]\n }\n\n return schemaErrors\n }\n}\n\nexport default Validator\n","/**\n * Represents an EventEmitter instance.\n */\nclass EventEmitter {\n constructor () {\n this.listeners = []\n }\n\n /**\n * Adds a named event listener\n * @public\n * @param {string} name - The name of the event\n * @param {function} callback - A callback functions that will be executed when this event is emitted\n */\n on (name, callback) {\n this.listeners.push({ name, callback })\n }\n\n off (name) {\n this.listeners = this.listeners.filter(listener => listener.name !== name)\n }\n\n /**\n * Triggers the callback function of a named event listener\n * @public\n * @param {string} name - The name of the event to be emitted\n * @param {*} payload - Payload containing data that is passed along with the callback function\n */\n emit (name, payload = undefined) {\n const listeners = this.listeners.filter(listener => listener.name === name)\n\n listeners.forEach((listener) => {\n listener.callback(payload)\n })\n }\n\n /**\n * Deletes all properties of the class\n */\n destroy () {\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default EventEmitter\n","import EventEmitter from '../event-emitter.js'\n\nimport {\n equal,\n isSet,\n notSet,\n removeDuplicatesFromArray\n} from '../helpers/utils.js'\n\nimport {\n getSchemaConst,\n getSchemaDefault,\n getSchemaReadOnly,\n getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a JSON instance.\n */\nclass Instance extends EventEmitter {\n constructor (config) {\n super()\n\n /**\n * A reference to the Jedi instance to which this instance belongs.\n * @type {Jedi}\n * @protected\n */\n this.jedi = config.jedi\n\n /**\n * The schema path of this instance.\n * @type {string}\n * @private\n */\n this.path = config.path || this.jedi.rootName\n\n /**\n * A JSON schema.\n * @type {boolean|object}\n * @private\n */\n this.schema = config.schema\n\n /**\n * The json value of this instance.\n * @type {*}\n * @protected\n */\n this.value = isSet(config.value) ? config.value : undefined\n\n /**\n * The active state of this instance. If false the editor is not participating\n * in the value.\n * @type {boolean}\n * @private\n */\n this.isActive = true\n\n /**\n * The Parent instance of this instance.\n * @type {Instance|null}\n * @private\n */\n this.parent = config.parent || null\n\n /**\n * Child instances of this instance.\n * @type {Instance[]}\n * @private\n */\n this.children = []\n\n /**\n * The editor controlling this Instance if any\n * @type {Editor|null}\n * @private\n */\n this.ui = null\n\n /**\n * Indicates whether the instance value changed.\n * @type {boolean}\n * @private\n */\n this.isDirty = false\n\n this.init()\n }\n\n /**\n * Initializes and register the instance\n */\n init () {\n this.register()\n this.setInitialValue()\n this.prepare()\n this.setDefaultValue()\n\n if (this.jedi.options.container) {\n this.setUI()\n }\n\n this.on('change', () => {\n if (this.parent) {\n this.parent.isDirty = true\n this.parent.onChildChange()\n }\n })\n }\n\n /**\n * Sets the instance ui property. UI can be an editor instance or similar\n */\n setUI () {\n const EditorClass = this.jedi.uiResolver.getClass(this.schema)\n this.ui = new EditorClass(this)\n }\n\n /**\n * Return the last part of the instance path\n */\n getKey () {\n return this.path.split(this.jedi.pathSeparator).pop()\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register () {\n this.jedi.register(this)\n\n const registerChildRecursive = (child) => {\n this.jedi.register(child)\n child.children.forEach(registerChildRecursive)\n }\n\n this.children.forEach(registerChildRecursive)\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister () {\n this.jedi.unregister(this)\n }\n\n /**\n * Sets the default value of the instance based on it's type\n */\n setInitialValue () {\n if (notSet(this.value)) {\n let value\n const schemaType = getSchemaType(this.schema)\n\n if (schemaType === 'boolean') value = false\n if (schemaType === 'number') value = 0.0\n if (schemaType === 'integer') value = 0\n if (schemaType === 'string') value = ''\n if (schemaType === 'array') value = []\n if (schemaType === 'object') value = {}\n if (schemaType === 'null') value = null\n\n this.value = value\n }\n }\n\n setDefaultValue () {\n const schemaDefault = getSchemaDefault(this.schema)\n\n if (isSet(schemaDefault)) {\n this.setValue(schemaDefault, false)\n }\n }\n\n /**\n * Returns the value of the instance\n */\n getValue () {\n return this.value\n }\n\n /**\n * Sets the instance value\n */\n setValue (newValue, triggersChange = true) {\n const enforceConst = this.jedi.options.enforceConst || getSchemaXOption(this.schema, 'enforceConst')\n\n if (isSet(enforceConst) && equal(enforceConst, true)) {\n const schemaConst = getSchemaConst(this.schema)\n\n if (isSet(schemaConst)) {\n newValue = schemaConst\n }\n }\n\n this.value = newValue\n\n this.emit('set-value', newValue)\n\n if (triggersChange) {\n this.isDirty = true\n this.emit('change')\n this.jedi.emit('instance-change', this)\n }\n }\n\n /**\n * Fires when a child's instance state changes\n */\n onChildChange () {\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n if (!this.isActive) {\n return []\n }\n\n const errors = this.jedi.validator.getErrors(this.getValue(), this.schema, this.getKey(), this.path)\n\n return removeDuplicatesFromArray(errors)\n }\n\n /**\n * Prepare data before building the editor\n */\n prepare () {\n }\n\n /**\n * Activates the instance\n */\n activate () {\n if (this.isActive === false) {\n this.isActive = true\n this.emit('change')\n }\n }\n\n /**\n * Deactivates the instance\n */\n deactivate () {\n if (this.isActive === true) {\n this.isActive = false\n this.emit('change')\n }\n }\n\n /**\n * Returns true if this instance is read only\n */\n isReadOnly () {\n let readOnly = false\n\n if (getSchemaReadOnly(this.schema) === true) {\n readOnly = true\n }\n\n if (this.parent && getSchemaReadOnly(this.parent.schema) === true) {\n readOnly = true\n }\n\n return readOnly\n }\n\n /**\n * Destroy the instance and it's children\n */\n destroy () {\n this.unregister()\n\n this.listeners = []\n\n this.children.forEach((child) => {\n child.destroy()\n })\n\n if (this.ui) {\n this.ui.destroy()\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n\n super.destroy()\n }\n}\n\nexport default Instance\n","import { isSet } from '../helpers/utils.js'\nimport { getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an Editor instance.\n * @extends EventEmitter\n */\nclass Editor {\n constructor (instance) {\n /**\n * A reference to the Instance being controlled by this editor.\n * @type {Jedi}\n * @private\n */\n this.instance = instance\n\n /**\n * Theme instance used to build the Editor user interface.\n * @type {Theme}\n * @private\n */\n this.theme = null\n\n /**\n * The user interface html for this editor\n * @type {HTMLElement}\n * @protected\n */\n this.control = null\n\n /**\n * Disabled status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.disabled = false\n\n /**\n * Read only status for this editor user interface\n * @type {boolean}\n * @private\n */\n this.readOnly = this.instance.isReadOnly()\n\n this.showingValidationErrors = false\n\n this.init()\n this.build()\n this.enforceEnumDefault()\n this.addEventListeners()\n this.setContainerAttributes()\n this.refreshUI()\n\n const alwaysShowErrors = this.instance.jedi.options.showErrors === 'always' || getSchemaXOption(this.instance.schema, 'showErrors') === 'always'\n\n if (alwaysShowErrors) {\n this.showValidationErrors(this.instance.getErrors())\n }\n\n this.instance.on('set-value', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n\n this.instance.on('change', () => {\n this.refreshUI()\n this.showValidationErrors(this.instance.getErrors())\n })\n }\n\n static resolves (schema) {}\n\n /**\n * Initializes the editor\n * @private\n */\n init () {\n this.theme = this.instance.jedi.theme\n }\n\n /**\n * Sets container attributes like data-path and data-type\n * @private\n */\n setContainerAttributes () {\n this.control.container.setAttribute('data-path', this.instance.path)\n this.control.container.setAttribute('data-type', getSchemaType(this.instance.schema))\n }\n\n /**\n * Builds the editor control and appends it to the editor container\n * @private\n */\n build () {\n }\n\n /**\n * Updates the value of the instance by making assumptions based on constrains\n */\n enforceEnumDefault () {\n const enforceEnumDefault = getSchemaXOption(this.instance.schema, 'enforceEnumDefault') ?? this.instance.jedi.options.enforceEnumDefault\n const schemaEnum = getSchemaEnum(this.instance.schema)\n\n if (isSet(schemaEnum) && !schemaEnum.includes(this.instance.getValue()) && isSet(schemaEnum[0]) && enforceEnumDefault) {\n this.instance.setValue(schemaEnum[0], false)\n }\n }\n\n /**\n * Add event listeners to ui elements\n * @private\n */\n addEventListeners () {\n }\n\n /**\n * Shows validation messages in the editor container.\n * @private\n */\n showValidationErrors (errors, force = false) {\n errors = errors.filter((error) => {\n return error.path === this.instance.path\n })\n\n this.control.messages.innerHTML = ''\n this.showingValidationErrors = false\n\n const neverShowErrors = this.instance.jedi.options.showErrors === 'never' || getSchemaXOption(this.instance.schema, 'showErrors') === 'never'\n\n if ((neverShowErrors && !force) || errors.length === 0) {\n return\n }\n\n const label = getSchemaTitle(this.instance.schema) || this.instance.getKey()\n\n errors.forEach((error) => {\n if (error.constraint === 'properties') {\n return\n }\n\n error.messages.forEach((message) => {\n const invalidFeedback = this.getInvalidFeedback({\n message: label + ': ' + message\n })\n this.control.messages.appendChild(invalidFeedback)\n })\n })\n\n this.showingValidationErrors = true\n }\n\n /**\n * Get an error message container\n * @private\n */\n getInvalidFeedback (config) {\n return this.theme.getInvalidFeedback(config)\n }\n\n /**\n * Disables the editor\n */\n disable () {\n this.disabled = true\n this.refreshUI()\n }\n\n /**\n * Enables the editor\n */\n enable () {\n this.disabled = false\n this.refreshUI()\n }\n\n /**\n * Updates control UI when its state changes\n * @private\n */\n refreshUI () {\n this.refreshInteractiveElements()\n }\n\n refreshInteractiveElements () {\n const interactiveElements = this.control.container.querySelectorAll('button, input, select, textarea')\n\n interactiveElements.forEach((element) => {\n if (this.disabled || this.readOnly) {\n element.setAttribute('disabled', '')\n } else {\n element.removeAttribute('disabled', '')\n }\n })\n }\n\n /**\n * Transforms the input value if necessary before value set\n * @private\n */\n sanitize (value) {\n return value\n }\n\n /**\n * Destroys the editor\n * @private\n */\n destroy () {\n if (this.control.container && this.control.container.parentNode) {\n this.control.container.parentNode.removeChild(this.control.container)\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Editor\n","import Editor from './editor.js'\nimport {\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaIf,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorIfThenElse instance.\n * @extends Editor\n */\nclass EditorIfThenElse extends Editor {\n static resolves (schema) {\n const schemaIf = getSchemaIf(schema)\n return isSet(schemaIf)\n }\n\n build () {\n this.control = this.theme.getIfThenElseControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: false\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorIfThenElse\n","import Instance from './instance.js'\nimport EditorIfThenElse from '../editors/if-then-else.js'\nimport Jedi from '../jedi.js'\n\nimport {\n isSet,\n mergeDeep,\n clone,\n isObject,\n overwriteExistingProperties\n} from '../helpers/utils.js'\n\nimport {\n getSchemaElse,\n getSchemaIf,\n getSchemaThen\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceIfThenElse instance.\n * @extends Instance\n */\nclass InstanceIfThenElse extends Instance {\n setUI () {\n this.ui = new EditorIfThenElse(this)\n }\n\n prepare () {\n this.instances = []\n this.instanceStartingValues = []\n this.instanceWithoutIf = null\n this.activeInstance = null\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n this.ifThenElseShemas = []\n\n this.traverseSchema(this.schema)\n\n delete this.schema.if\n delete this.schema.then\n delete this.schema.else\n\n let index = 0\n\n this.ifThenElseShemas.forEach((item) => {\n if (isSet(item.then)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.then))\n this.switcherOptionValues.push(index)\n const optionLabel = 'then'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n\n if (isSet(item.else)) {\n this.schemas.push(mergeDeep({}, clone(this.schema), item.else))\n this.switcherOptionValues.push(index)\n const optionLabel = 'else'\n this.switcherOptionsLabels.push(optionLabel)\n index++\n }\n })\n\n const schemaClone = clone(this.schema)\n delete schemaClone.if\n delete schemaClone.then\n delete schemaClone.else\n\n this.instanceWithoutIf = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schemaClone,\n path: this.path,\n parent: this.parent\n })\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent\n })\n\n this.instanceStartingValues.push(instance.getValue())\n\n instance.on('change', () => {\n const currentValue = this.activeInstance.getValue()\n const fittestIndex = this.getFittestIndex(currentValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.setValue(currentValue)\n } else {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n }\n })\n\n this.instances.push(instance)\n })\n\n this.on('set-value', (newValue) => {\n let ifValue = this.instanceWithoutIf.getValue()\n\n if (isObject(ifValue) && isObject(newValue)) {\n ifValue = overwriteExistingProperties(ifValue, newValue)\n }\n\n this.instances.forEach((instance, index) => {\n const startingValue = this.instanceStartingValues[index]\n\n if (isObject(startingValue) && isObject(newValue)) {\n newValue = overwriteExistingProperties(startingValue, ifValue)\n }\n\n instance.setValue(newValue, false)\n })\n\n const fittestIndex = this.getFittestIndex(newValue)\n const mustSwitch = fittestIndex !== this.index\n\n if (mustSwitch) {\n this.switchInstance(fittestIndex)\n }\n })\n\n // initial value and active instance\n this.value = this.instanceWithoutIf.getValue()\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex)\n }\n\n switchInstance (index) {\n if (this.activeInstance) {\n this.activeInstance.unregister()\n }\n\n this.index = index\n this.activeInstance = this.instances[this.index]\n this.activeInstance.register()\n this.value = this.activeInstance.getValue()\n // this.emit('change')\n }\n\n traverseSchema (schema) {\n const schemaIf = getSchemaIf(schema)\n\n if (isSet(schemaIf)) {\n const schemaThen = getSchemaThen(schema)\n const schemaElse = getSchemaElse(schema)\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n then: isSet(schemaThen) ? schemaThen : {}\n })\n\n this.ifThenElseShemas.push({\n if: schemaIf,\n else: isSet(schemaElse) ? schemaElse : {}\n })\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let fittestIndex = this.index\n\n this.ifThenElseShemas.forEach((schema, index) => {\n const ifValidator = new Jedi({\n schema: schema.if,\n data: value,\n refParser: this.jedi.refParser\n })\n\n const ifErrors = ifValidator.getErrors()\n ifValidator.destroy()\n\n if (ifErrors.length === 0 && schema.then) {\n fittestIndex = index\n }\n\n if (ifErrors.length > 0 && schema.else) {\n fittestIndex = index\n }\n })\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n\n getAllOfCombinations (schemas) {\n const result = []\n\n const combineProperties = (schema1, schema2) => {\n return { ...schema1, ...schema2 }\n }\n\n const generateCombinations = (current, remaining) => {\n if (remaining.length === 0) {\n result.push(current)\n return\n }\n\n const nextSchema = remaining[0]\n\n generateCombinations(combineProperties(current, nextSchema), remaining.slice(1))\n generateCombinations(current, remaining.slice(1))\n }\n\n for (let i = 0; i < schemas.length; i++) {\n generateCombinations(schemas[i], schemas.slice(i + 1))\n }\n\n result.sort((a, b) => Object.keys(a).length - Object.keys(b).length)\n\n return result\n }\n}\n\nexport default InstanceIfThenElse\n","import Instance from './instance.js'\nimport {\n isSet,\n isArray,\n different,\n notSet,\n clone,\n mergeDeep\n} from '../helpers/utils.js'\nimport {\n getSchemaAnyOf,\n getSchemaOneOf,\n getSchemaTitle,\n getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents a InstanceMultiple instance.\n * @extends Instance\n */\nclass InstanceMultiple extends Instance {\n prepare () {\n this.instances = []\n this.activeInstance = null\n this.lastIndex = 0\n this.index = 0\n this.schemas = []\n this.switcherOptionValues = []\n this.switcherOptionsLabels = []\n\n this.on('set-value', () => {\n this.onSetValue()\n })\n\n const schemaType = getSchemaType(this.schema)\n\n if (isSet(getSchemaAnyOf(this.schema)) || isSet(getSchemaOneOf(this.schema))) {\n const schemasOf = isSet(getSchemaAnyOf(this.schema)) ? getSchemaAnyOf(this.schema) : getSchemaOneOf(this.schema)\n const schemaCopy = clone(this.schema)\n delete schemaCopy['anyOf']\n delete schemaCopy['oneOf']\n delete schemaCopy['options']\n\n schemasOf.forEach((schema, index) => {\n schema = { ...schemaCopy, ...schema }\n\n if (this.jedi.refParser) {\n schema = this.jedi.refParser.expand(schema)\n }\n\n let switcherOptionsLabel = 'Option-' + (index + 1)\n const switcherTitle = getSchemaXOption(schema, 'switcherTitle')\n const schemaTitle = getSchemaTitle(schema)\n\n if (isSet(schemaTitle)) {\n switcherOptionsLabel = schemaTitle\n }\n\n if (isSet(switcherTitle)) {\n switcherOptionsLabel = switcherTitle\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(switcherOptionsLabel)\n this.schemas.push(schema)\n })\n } else if (isArray(schemaType)) {\n schemaType.forEach((type, index) => {\n const schemaClone = mergeDeep(this.schema)\n\n const schema = {\n ...schemaClone,\n ...{ type: type, title: type[0].toUpperCase() + type.slice(1) }\n }\n\n if (isSet(schemaClone.title)) {\n schema.title = schemaClone.title\n }\n\n this.switcherOptionValues.push(index)\n this.switcherOptionsLabels.push(type.charAt(0).toUpperCase() + type.slice(1))\n\n this.schemas.push(schema)\n })\n } else if (schemaType === 'any' || !schemaType) {\n const schemaClone = clone(this.schema)\n\n this.schemas = [\n { ...schemaClone, ...{ type: 'object' } },\n { ...schemaClone, ...{ type: 'array' } },\n { ...schemaClone, ...{ type: 'string' } },\n { ...schemaClone, ...{ type: 'number' } },\n { ...schemaClone, ...{ type: 'integer' } },\n { ...schemaClone, ...{ type: 'boolean' } },\n { ...schemaClone, ...{ type: 'null' } }\n ]\n\n this.schemas.forEach((schema, index) => {\n this.switcherOptionValues.push(index)\n })\n\n this.switcherOptionsLabels = [\n 'Object', 'Array', 'String', 'Number', 'Integer', 'Boolean', 'Null'\n ]\n }\n\n this.schemas.forEach((schema) => {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path,\n parent: this.parent,\n value: clone(this.value)\n })\n\n if (isSet(this.value)) {\n instance.setValue(this.value, false)\n }\n\n instance.unregister()\n\n instance.off('change')\n\n instance.on('change', () => {\n this.value = this.activeInstance.getValue()\n this.emit('change')\n })\n\n this.instances.push(instance)\n\n this.register()\n })\n\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n\n switchInstance (index, value) {\n this.lastIndex = this.index\n this.index = index\n this.activeInstance = this.instances[index]\n\n if (isSet(value)) {\n this.activeInstance.setValue(value, false)\n }\n\n this.setValue(this.activeInstance.getValue())\n }\n\n onSetValue () {\n if (different(this.activeInstance.getValue(), this.value)) {\n const fittestIndex = this.getFittestIndex(this.value)\n this.switchInstance(fittestIndex, this.value)\n }\n }\n\n /**\n * Returns the index of the instance that has less validation errors\n */\n getFittestIndex (value) {\n let index = 0\n let fittestIndex\n let championErrors\n\n for (const instance of this.instances) {\n const instanceErrors = this.jedi.validator.getErrors(value, instance.schema, instance.getKey(), instance.path)\n\n if (notSet(fittestIndex) || notSet(championErrors)) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n if (instanceErrors.length < championErrors.length) {\n fittestIndex = index\n championErrors = instanceErrors\n }\n\n index++\n }\n\n return fittestIndex\n }\n\n destroy () {\n this.instances.forEach((instance) => {\n instance.destroy()\n })\n\n super.destroy()\n }\n}\n\nexport default InstanceMultiple\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceBoolean instance.\n * @extends Instance\n */\nclass InstanceBoolean extends Instance {}\n\nexport default InstanceBoolean\n","import Instance from './instance.js'\nimport { different, isSet, notSet, isObject, hasOwn, clone, isNumber } from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDependentRequired,\n getSchemaPatternProperties,\n getSchemaProperties,\n getSchemaRequired,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an InstanceObject instance.\n * @extends Instance\n */\nclass InstanceObject extends Instance {\n prepare () {\n this.properties = {}\n const schemaProperties = getSchemaProperties(this.schema)\n\n if (isSet(schemaProperties)) {\n Object.keys(schemaProperties).forEach((key) => {\n const schema = schemaProperties[key]\n this.properties[key] = { schema }\n\n let musstCreateChild = true\n\n const optionsDeactivateNonRequired = this.jedi.options.deactivateNonRequired\n const deactivateNonRequired = getSchemaXOption(this.schema, 'deactivateNonRequired')\n const schemaDeactivateNonRequired = getSchemaXOption(schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(optionsDeactivateNonRequired) && optionsDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (this.isNotRequired(key) && isSet(schemaDeactivateNonRequired) && schemaDeactivateNonRequired === true) {\n musstCreateChild = false\n }\n\n if (musstCreateChild) {\n this.createChild(schema, key)\n }\n })\n }\n\n this.refreshInstances()\n\n this.on('set-value', () => {\n this.refreshInstances()\n })\n }\n\n /**\n * Returns true if the property is required\n */\n isRequired (property) {\n const schemaRequired = getSchemaRequired(this.schema)\n\n return isSet(schemaRequired) && schemaRequired.includes(property)\n }\n\n /**\n * Returns true if the property is dependent required\n */\n isDependentRequired (property) {\n const dependentRequired = getSchemaDependentRequired(this.schema)\n\n if (isSet(dependentRequired)) {\n let missingProperties = []\n\n Object.keys(dependentRequired).forEach((key) => {\n if (isSet(this.value[key])) {\n const requiredProperties = dependentRequired[key]\n\n missingProperties = requiredProperties.filter((property) => {\n return !hasOwn(this.value, property)\n })\n }\n })\n\n return missingProperties.includes(property)\n }\n\n return false\n }\n\n createChild (schema, key, value, activate = false) {\n const instance = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + key,\n parent: this,\n value: clone(value)\n })\n\n this.children.push(instance)\n this.value[key] = instance.getValue()\n\n const deactivateNonRequired = this.jedi.options.deactivateNonRequired || getSchemaXOption(this.schema, 'deactivateNonRequired')\n\n if (this.isNotRequired(key) && isSet(deactivateNonRequired) && deactivateNonRequired === true && !activate) {\n instance.deactivate()\n }\n\n return instance\n }\n\n isNotRequired (property) {\n return !this.isRequired(property) && !this.isDependentRequired(property)\n }\n\n deleteChild (key) {\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n if (instance.getKey() === key) {\n instance.destroy()\n this.children.splice(i, 1)\n this.onChildChange()\n }\n }\n }\n\n getChild (key) {\n return this.children.find((instance) => {\n return key === instance.getKey().split(this.jedi.pathSeparator).pop()\n })\n }\n\n getPropertySchema (propertyName) {\n let schema\n const schemaAdditionalProperties = getSchemaAdditionalProperties(this.schema)\n const schemaProperties = getSchemaProperties(this.schema)\n const schemaPatternProperties = getSchemaPatternProperties(this.schema)\n\n // Determine the appropriate schema\n if (isSet(schemaProperties) && hasOwn(schemaProperties, propertyName)) {\n // If the propertyName is explicitly defined in `properties`, use it\n schema = schemaProperties[propertyName]\n } else if (isSet(schemaPatternProperties)) {\n // If no exact match in `properties`, check if it matches any pattern in `patternProperties`\n Object.keys(schemaPatternProperties).forEach((pattern) => {\n const regexp = new RegExp(pattern)\n if (regexp.test(propertyName)) {\n schema = schemaPatternProperties[pattern]\n }\n })\n }\n\n if (notSet(schema) && isSet(schemaAdditionalProperties)) {\n // If no match was found in `properties` or `patternProperties`, use `additionalProperties`\n schema = schemaAdditionalProperties\n }\n\n if (notSet(schema)) {\n schema = {}\n }\n\n return schema\n }\n\n onChildChange () {\n const value = {}\n\n this.children.forEach((child) => {\n if (child.isActive) {\n value[child.getKey()] = child.getValue()\n }\n })\n\n this.value = value\n this.emit('change')\n }\n\n /**\n * Sorts the children of the current instance based on their `propertyOrder` value in ascending order.\n * The sorting is done using the `propertyOrder` obtained from each child's schema, which should be a number.\n * If a child does not have a valid `propertyOrder` (i.e., the value is not a number), it will be placed after the child with a valid `propertyOrder`.\n * @returns {void} This function modifies the `children` array of the instance in place.\n */\n sortChildrenByPropertyOrder () {\n this.children = this.children.sort((a, b) => {\n const propertyOrderA = getSchemaXOption(a.schema, 'propertyOrder')\n const propertyOrderB = getSchemaXOption(b.schema, 'propertyOrder')\n\n const isValidNumberA = isNumber(propertyOrderA)\n const isValidNumberB = isNumber(propertyOrderB)\n\n if (!isValidNumberA && isValidNumberB) {\n return 1\n }\n\n if (isValidNumberA && !isValidNumberB) {\n return -1\n }\n\n if (propertyOrderA < propertyOrderB) {\n return -1\n }\n\n if (propertyOrderA > propertyOrderB) {\n return 1\n }\n\n return 0\n })\n }\n\n refreshInstances () {\n const value = this.getValue()\n\n if (!isObject(value)) {\n return\n }\n\n Object.keys(value).forEach((propertyName) => {\n const child = this.getChild(propertyName)\n\n // If a value has already a child instance\n if (child) {\n child.activate()\n const oldValue = child.getValue()\n const newValue = value[child.getKey()]\n\n // update child value if the old value and the new value are different\n if (different(oldValue, newValue)) {\n child.setValue(newValue, false)\n }\n } else {\n // create new child instance for the new value entry having the value as default\n const schema = this.getPropertySchema(propertyName)\n\n this.createChild(schema, propertyName, value[propertyName], true)\n }\n })\n\n // remove any children that are not included in the value\n for (let i = this.children.length - 1; i >= 0; i--) {\n const instance = this.children[i]\n const propertyName = instance.getKey()\n if (notSet(value[propertyName])) {\n if (this.getChild(propertyName)) {\n instance.deactivate()\n } else {\n this.deleteChild(propertyName)\n }\n }\n }\n\n this.sortChildrenByPropertyOrder()\n }\n}\n\nexport default InstanceObject\n","import Instance from './instance.js'\nimport { isSet, clone, isArray } from '../helpers/utils.js'\nimport { getSchemaItems, getSchemaPrefixItems } from '../helpers/schema.js'\n\n/**\n * Represents an InstanceArray instance.\n * @extends Instance\n */\nclass InstanceArray extends Instance {\n prepare () {\n this.refreshChildren()\n\n this.on('set-value', () => {\n this.refreshChildren()\n })\n }\n\n createItemInstance (value) {\n let schema\n const itemsCount = this.children.length\n const schemaItems = getSchemaItems(this.schema)\n const schemaPrefixItems = getSchemaPrefixItems(this.schema)\n schema = isSet(schemaItems) ? schemaItems : {}\n\n const hasPrefixItemsSchema = isSet(schemaPrefixItems) && isSet(schemaPrefixItems[itemsCount])\n\n if (hasPrefixItemsSchema) {\n schema = schemaPrefixItems[itemsCount]\n }\n\n const child = this.jedi.createInstance({\n jedi: this.jedi,\n schema: schema,\n path: this.path + this.jedi.pathSeparator + itemsCount,\n parent: this,\n value: clone(value)\n })\n\n if (isSet(value)) {\n child.setValue(value, false)\n }\n\n return child\n }\n\n move (fromIndex, toIndex) {\n const value = clone(this.getValue())\n const item = value[fromIndex]\n value.splice(fromIndex, 1)\n value.splice(toIndex, 0, item)\n this.setValue(value)\n }\n\n addItem () {\n const tempEditor = this.createItemInstance()\n const value = clone(this.getValue())\n value.push(tempEditor.getValue())\n tempEditor.destroy()\n this.setValue(value)\n }\n\n deleteItem (itemIndex) {\n const currentValue = clone(this.getValue())\n const newValue = currentValue.filter((item, index) => index !== itemIndex)\n this.setValue(newValue)\n }\n\n onChildChange () {\n const value = []\n\n this.children.forEach((child) => {\n value.push(child.getValue())\n })\n\n this.value = value\n this.emit('change')\n }\n\n refreshChildren () {\n this.children = []\n\n const value = this.getValue()\n\n if (!isArray(value)) {\n return\n }\n\n value.forEach((itemValue) => {\n const child = this.createItemInstance(itemValue)\n this.children.push(child)\n })\n }\n}\n\nexport default InstanceArray\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceString instance.\n * @extends Instance\n */\nclass InstanceString extends Instance {}\n\nexport default InstanceString\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNumber instance.\n * @extends Instance\n */\nclass InstanceNumber extends Instance {\n}\n\nexport default InstanceNumber\n","import Instance from './instance.js'\n\n/**\n * Represents a InstanceNull instance.\n * @extends Instance\n */\nclass InstanceNull extends Instance {\n}\n\nexport default InstanceNull\n","export const glyphicons = {\n properties: 'glyphicon glyphicon-list',\n delete: 'glyphicon glyphicon-trash',\n add: 'glyphicon glyphicon-plus',\n moveUp: 'glyphicon glyphicon-arrow-up',\n moveDown: 'glyphicon glyphicon-arrow-down',\n collapse: 'glyphicon glyphicon-chevron-down',\n drag: 'glyphicon glyphicon-th'\n}\n\nexport const bootstrapIcons = {\n properties: 'bi bi-card-list',\n delete: 'bi bi-trash2',\n add: 'bi bi-plus',\n moveUp: 'bi bi-arrow-up',\n moveDown: 'bi bi-arrow-down',\n collapse: 'bi bi-chevron-down',\n drag: 'bi bi-grip-vertical'\n}\n\nexport const fontAwesome3 = {\n properties: 'icon-list',\n delete: 'icon-trash',\n add: 'icon-plus',\n moveUp: 'icon-arrow-up',\n moveDown: 'icon-arrow-down',\n collapse: 'icon-chevron-down',\n drag: 'icon-th'\n}\n\nexport const fontAwesome4 = {\n properties: 'fa fa-list',\n delete: 'fa fa-trash-o',\n add: 'fa fa-plus',\n moveUp: 'fa fa-arrow-up',\n moveDown: 'fa fa-arrow-down',\n collapse: 'fa fa-chevron-down',\n drag: 'fa fa-th'\n}\n\nexport const fontAwesome5 = {\n properties: 'fas fa-list',\n delete: 'fas fa-trash',\n add: 'fas fa-plus',\n moveUp: 'fas fa-arrow-up',\n moveDown: 'fas fa-arrow-down',\n collapse: 'fas fa-chevron-down',\n drag: 'fas fa-grip-vertical'\n}\n\nexport const fontAwesome6 = {\n properties: 'fa-solid fa-list',\n delete: 'fa-solid fa-trash',\n add: 'fa-solid fa-plus',\n moveUp: 'fa-solid fa-arrow-up',\n moveDown: 'fa-solid fa-arrow-down',\n collapse: 'fa-solid fa-chevron-down',\n drag: 'fa-solid fa-grip-vertical'\n}\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorBoolean instance.\n * @extends Editor\n */\nclass EditorBoolean extends Editor {\n sanitize (value) {\n return Boolean(value)\n }\n}\n\nexport default EditorBoolean\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumRadio instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumRadio extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const radioValue = radio.value === 'true'\n this.instance.setValue(radioValue)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n const radioValue = radio.value === 'true'\n radio.checked = radioValue === this.instance.getValue()\n })\n }\n}\n\nexport default EditorBooleanEnumRadio\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorBooleanEnumSelect instance.\n * @extends EditorBooleanCheckbox\n */\nclass EditorBooleanEnumSelect extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean'\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: ['false', 'true'],\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || ['false', 'true'],\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.control.input.value === 'true'\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue() === true ? 'true' : 'false'\n }\n}\n\nexport default EditorBooleanEnumSelect\n","import EditorBoolean from './boolean.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorBooleanCheckbox instance.\n * @extends Editor\n */\nclass EditorBooleanCheckbox extends EditorBoolean {\n static resolves (schema) {\n return getSchemaType(schema) === 'boolean' && getSchemaXOption(schema, 'format') === 'checkbox'\n }\n\n build () {\n this.control = this.theme.getCheckboxControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.checked)\n })\n }\n\n sanitize (value) {\n return Boolean(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.checked = this.instance.getValue()\n }\n}\n\nexport default EditorBooleanCheckbox\n","import Editor from './editor.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorString extends Editor {\n sanitize (value) {\n return String(value)\n }\n}\n\nexport default EditorString\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumRadio instance.\n * @extends EditorString\n */\nclass EditorStringEnumRadio extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n this.instance.setValue(radio.value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (radio.value === this.instance.getValue())\n })\n }\n}\n\nexport default EditorStringEnumRadio\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringEnumSelect instance.\n * @extends EditorString\n */\nclass EditorStringEnumSelect extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringEnumSelect\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringTextarea instance.\n * @extends EditorString\n */\nclass EditorStringTextarea extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string' && getSchemaXOption(schema, 'format') === 'textarea'\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringTextarea\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringAwesomplete instance.\n * @extends EditorString\n */\nclass EditorStringAwesomplete extends EditorString {\n static resolves (schema) {\n return window.Awesomplete && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'awesomplete'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.awesomplete = new window.Awesomplete(this.control.input, getSchemaXOption(this.instance.schema, 'awesomplete'))\n this.control.container.querySelector('.awesomplete').style.display = 'block'\n } catch (e) {\n console.error('Awesomplete is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('awesomplete-selectcomplete', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n\n destroy () {\n this.awesomplete.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringAwesomplete\n","import EditorString from './string.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaXOption, getSchemaTitle, getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorString instance.\n * @extends Editor\n */\nclass EditorStringInput extends EditorString {\n static resolves (schema) {\n return getSchemaType(schema) === 'string'\n }\n\n static getTypes () {\n return ['hidden', 'color', 'date', 'datetime-local', 'email', 'number', 'month', 'password', 'search', 'time', 'tel', 'text', 'url', 'week']\n }\n\n build () {\n const optionFormat = getSchemaXOption(this.instance.schema, 'format')\n\n this.control = this.theme.getInputControl({\n type: EditorStringInput.getTypes().includes(optionFormat) ? optionFormat : 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || optionFormat === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n\n // fix color picker bug\n if (optionFormat === 'color' && this.instance.value.length === 0) {\n this.instance.setValue('#000000', false)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n sanitize (value) {\n return String(value)\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.input.value = this.instance.getValue()\n }\n}\n\nexport default EditorStringInput\n","import Editor from './editor.js'\nimport { getSchemaType } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends Editor\n */\nclass EditorNumber extends Editor {\n sanitize (value) {\n if (getSchemaType(this.instance.schema) === 'integer') {\n return Math.floor(Number(value))\n } else {\n return Number(value)\n }\n }\n}\n\nexport default EditorNumber\n","import EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumRadio instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumRadio extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaEnum = getSchemaEnum(schema)\n const optionFormat = getSchemaXOption(schema, 'format')\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(schemaEnum) && optionFormat === 'radio'\n }\n\n build () {\n this.control = this.theme.getRadiosControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.radios.forEach((radio) => {\n radio.addEventListener('change', () => {\n const value = this.sanitize(radio.value)\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.radios.forEach((radio) => {\n radio.checked = (Number(radio.value) === Number(this.instance.getValue()))\n })\n }\n}\n\nexport default EditorNumberEnumRadio\n","import EditorNumber from './number.js'\nimport { isNumber, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaEnum, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorNumberEnumSelect instance.\n * @extends EditorNumber\n */\nclass EditorNumberEnumSelect extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const typeIsNumeric = schemaType === 'number' || schemaType === 'integer'\n return typeIsNumeric && isSet(getSchemaEnum(schema))\n }\n\n build () {\n this.control = this.theme.getSelectControl({\n values: getSchemaEnum(this.instance.schema),\n titles: getSchemaXOption(this.instance.schema, 'enumTitles') || getSchemaEnum(this.instance.schema),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberEnumSelect\n","import EditorNumber from './number.js'\nimport { isNumber, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaXOption,\n getSchemaTitle, getSchemaType\n} from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumber instance.\n * @extends EditorNumber\n */\nclass EditorNumberInput extends EditorNumber {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n return schemaType === 'number' || schemaType === 'integer'\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'number',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n const value = this.sanitize(this.control.input.value)\n this.instance.setValue(value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n const value = this.instance.getValue()\n\n if (isNumber(value)) {\n this.control.input.value = this.instance.getValue()\n }\n }\n}\n\nexport default EditorNumberInput\n","import Editor from './editor.js'\nimport {\n equal,\n hasOwn,\n isObject,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\nimport {\n getSchemaAdditionalProperties,\n getSchemaDescription,\n getSchemaTitle, getSchemaType,\n getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorObject instance.\n * @extends Editor\n */\nclass EditorObject extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'object'\n }\n\n build () {\n this.propertyActivators = {}\n const schemaOptions = this.instance.schema.options || {}\n let addProperty = true\n const additionalProperties = getSchemaAdditionalProperties(this.instance.schema)\n\n if (isSet(additionalProperties) && additionalProperties === false) {\n addProperty = false\n }\n\n let enablePropertiesToggle = false\n\n if (isSet(this.instance.jedi.options.enablePropertiesToggle)) {\n enablePropertiesToggle = this.instance.jedi.options.enablePropertiesToggle\n }\n\n if (isSet(schemaOptions.enablePropertiesToggle)) {\n enablePropertiesToggle = schemaOptions.enablePropertiesToggle\n }\n\n this.control = this.theme.getObjectControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enablePropertiesToggle: enablePropertiesToggle,\n addProperty: addProperty,\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addPropertyBtn.addEventListener('click', () => {\n const propertyName = this.control.addPropertyControl.input.value.split(' ').join('')\n\n const propertyNameEmpty = propertyName.length === 0\n\n if (propertyNameEmpty) {\n return\n }\n\n const propertyExist = isSet(this.instance.value[propertyName])\n\n if (propertyExist) {\n return\n }\n\n const schema = this.instance.getPropertySchema(propertyName)\n\n const child = this.instance.createChild(schema, propertyName)\n child.activate()\n this.instance.setValue(this.instance.value)\n this.control.addPropertyControl.input.value = ''\n\n const ariaLive = this.control.ariaLive\n ariaLive.innerHTML = ''\n const schemaTitle = getSchemaTitle(child.schema)\n const label = isSet(schemaTitle) ? schemaTitle : propertyName\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n }\n\n sanitize (value) {\n if (isObject(value)) {\n return value\n }\n\n return {}\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n refreshPropertiesSlot () {\n const schemaOptionEnablePropertiesToggle = getSchemaXOption(this.instance.schema, 'enablePropertiesToggle')\n\n if (equal(this.instance.jedi.options.enablePropertiesToggle, true) || equal(schemaOptionEnablePropertiesToggle, true)) {\n // todo: delete \"this.properties and this.instance.properties\"\n const properties = this.instance.children.map((child) => child.getKey())\n\n while (this.control.propertiesActivators.firstChild) {\n this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild)\n }\n\n properties.forEach((property) => {\n const isRequired = this.instance.isRequired(property)\n const isDependentRequired = this.instance.isDependentRequired(property)\n const notRequired = !isRequired && !isDependentRequired\n const ariaLive = this.control.ariaLive\n const schema = this.instance.getPropertySchema(property)\n const schemaTitle = getSchemaTitle(schema)\n const path = this.instance.path + this.instance.jedi.pathSeparator + property\n const id = pathToAttribute(path) + '-activator'\n const label = isSet(schemaTitle) ? schemaTitle : property\n\n if (notRequired) {\n const checkboxControl = this.theme.getCheckboxControl({\n id: id,\n label: label,\n titleHidden: false\n })\n\n const checkbox = checkboxControl.input\n this.propertyActivators[property] = checkbox\n\n checkbox.addEventListener('change', () => {\n ariaLive.innerHTML = ''\n const ariaLiveMessage = this.theme.getAriaLiveMessage()\n\n if (checkbox.checked) {\n const child = this.instance.getChild(property)\n\n if (!child) {\n this.instance.createChild(schema, property)\n }\n\n this.instance.getChild(property).activate()\n ariaLiveMessage.textContent = label + ' field was added to the form'\n ariaLive.appendChild(ariaLiveMessage)\n } else {\n this.instance.getChild(property).deactivate()\n ariaLiveMessage.textContent = label + ' field was removed from the form'\n ariaLive.appendChild(ariaLiveMessage)\n }\n\n // keeps dialog open\n this.control.propertiesContainer.close()\n this.control.propertiesContainer.showModal()\n })\n\n this.control.propertiesActivators.appendChild(checkboxControl.container)\n }\n\n const checkbox = this.propertyActivators[property]\n\n if (checkbox) {\n checkbox.disabled = this.disabled\n checkbox.checked = hasOwn(this.instance.getValue(), property)\n }\n })\n }\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild)\n }\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n if (child.ui.control.container.parentNode === null) {\n this.control.childrenSlot.appendChild(child.ui.control.container)\n }\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n } else {\n if (child.ui.control.container.parentNode) {\n child.ui.control.container.parentNode.removeChild(child.ui.control.container)\n }\n }\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.refreshPropertiesSlot()\n this.refreshEditors()\n }\n}\n\nexport default EditorObject\n","import EditorObject from './object.js'\nimport { getSchemaType, getSchemaXOption } from '../helpers/schema.js'\nimport { isSet } from '../helpers/utils.js'\n\n/**\n * Represents a EditorObjectGrid instance.\n * @extends EditorObject\n */\nclass EditorObjectGrid extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'grid'))\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n let row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n\n this.instance.children.forEach((child) => {\n if (child.isActive) {\n const grid = getSchemaXOption(child.schema, 'grid')\n const columns = grid?.columns || 12\n const offset = grid?.offset || 0\n const col = this.theme.getCol(12, columns, offset)\n const newRow = grid?.newRow || false\n\n if (newRow) {\n row = this.theme.getRow()\n this.control.childrenSlot.appendChild(row)\n }\n\n row.appendChild(col)\n col.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectGrid\n","import EditorObject from './object.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorObjectNav instance.\n * @extends EditorObject\n */\nclass EditorObjectNav extends EditorObject {\n static resolves (schema) {\n return getSchemaType(schema) === 'object' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n refreshEditors () {\n while (this.control.childrenSlot.firstChild) {\n this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild)\n }\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.variant) ? nav.variant : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n if (child.isActive) {\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n const schemaTitle = getSchemaTitle(child.schema)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: isSet(schemaTitle) ? schemaTitle : child.getKey(),\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n }\n })\n }\n}\n\nexport default EditorObjectNav\n","import Editor from './editor.js'\nimport { isArray, isSet, pathToAttribute } from '../helpers/utils.js'\nimport {\n getSchemaDescription,\n getSchemaMaxItems,\n getSchemaMinItems,\n getSchemaTitle, getSchemaType, getSchemaXOption\n} from '../helpers/schema.js'\n\n/**\n * Represents an EditorArray instance.\n * @extends Editor\n */\nclass EditorArray extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'array'\n }\n\n build () {\n this.control = this.theme.getArrayControl({\n title: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n enableCollapseToggle: this.instance.jedi.options.enableCollapseToggle || getSchemaXOption(this.instance.schema, 'enableCollapseToggle'),\n startCollapsed: this.instance.jedi.options.startCollapsed || getSchemaXOption(this.instance.schema, 'startCollapsed')\n })\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.instance.addItem()\n })\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n\n sanitize (value) {\n if (isArray(value)) {\n return value\n }\n\n return []\n }\n\n isSortable () {\n return window.Sortable && isSet(getSchemaXOption(this.instance.schema, 'sortable'))\n }\n\n refreshUI () {\n const maxItems = getSchemaMaxItems(this.instance.schema)\n const minItems = getSchemaMinItems(this.instance.schema)\n\n this.control.childrenSlot.innerHTML = ''\n\n this.instance.children.forEach((child) => {\n const itemIndex = Number(child.getKey())\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n const btnGroup = this.theme.getBtnGroup()\n const { container, arrayActions, body } = this.theme.getArrayItem()\n\n arrayActions.appendChild(btnGroup)\n btnGroup.appendChild(deleteBtn)\n btnGroup.appendChild(moveUpBtn)\n btnGroup.appendChild(moveDownBtn)\n\n if (this.isSortable()) {\n const dragBtn = this.theme.getDragItemBtn()\n btnGroup.appendChild(dragBtn)\n }\n\n this.control.childrenSlot.appendChild(container)\n body.appendChild(child.ui.control.container)\n\n deleteBtn.addEventListener('click', () => {\n const itemIndex = Number(child.path.split(this.instance.jedi.pathSeparator).pop())\n this.instance.deleteItem(itemIndex)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = itemIndex - 1\n this.instance.move(itemIndex, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = itemIndex + 1\n this.instance.move(itemIndex, toIndex)\n })\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (isSet(minItems) && this.instance.value.length <= minItems) {\n deleteBtn.setAttribute('disabled', '')\n }\n })\n\n this.refreshInteractiveElements()\n\n if (this.isSortable()) {\n if (this.sortable) {\n this.sortable.destroy()\n }\n\n this.sortable = window.Sortable.create(this.control.childrenSlot, {\n animation: 150,\n handle: '.jedi-array-drag',\n disabled: this.disabled || this.readOnly,\n onEnd: (evt) => {\n this.instance.move(evt.oldIndex, evt.newIndex)\n }\n })\n }\n\n if (isSet(maxItems) && maxItems === this.instance.value.length) {\n this.control.addBtn.setAttribute('disabled', '')\n }\n }\n}\n\nexport default EditorArray\n","import EditorArray from './array.js'\nimport { clamp, compileTemplate, isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorArrayNav instance.\n * @extends EditorArray\n */\nclass EditorArrayNav extends EditorArray {\n static resolves (schema) {\n return getSchemaType(schema) === 'array' && isSet(getSchemaXOption(schema, 'nav'))\n }\n\n init () {\n super.init()\n this.activeTabIndex = 0\n }\n\n addEventListeners () {\n this.control.addBtn.addEventListener('click', () => {\n this.activeTabIndex = this.instance.value.length\n this.instance.addItem()\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n\n const nav = getSchemaXOption(this.instance.schema, 'nav')\n const row = this.theme.getRow()\n const cols = isSet(nav.cols) ? nav.cols : 4\n const tabListCol = this.theme.getCol(12, cols)\n const tabContentCol = this.theme.getCol(12, (12 - cols))\n const tabContent = this.theme.getTabContent()\n const tabList = this.theme.getTabList({\n stacked: isSet(nav.stacked) ? nav.stacked : false,\n type: isSet(nav.type) ? nav.type : 'pils'\n })\n\n this.control.childrenSlot.appendChild(row)\n row.appendChild(tabListCol)\n row.appendChild(tabContentCol)\n tabListCol.appendChild(tabList)\n tabContentCol.appendChild(tabContent)\n\n this.instance.children.forEach((child, index) => {\n const deleteBtn = this.theme.getDeleteItemBtn()\n const moveUpBtn = this.theme.getMoveUpItemBtn()\n const moveDownBtn = this.theme.getMoveDownItemBtn()\n\n child.ui.control.arrayActions.innerHTML = ''\n child.ui.control.arrayActions.appendChild(deleteBtn)\n child.ui.control.arrayActions.appendChild(moveUpBtn)\n child.ui.control.arrayActions.appendChild(moveDownBtn)\n\n this.control.childrenSlot.appendChild(child.ui.control.container)\n\n let childTitle\n const schemaOptionItemTemplate = getSchemaXOption(this.instance.schema, 'itemTemplate')\n\n if (schemaOptionItemTemplate) {\n const template = schemaOptionItemTemplate\n const data = {\n i0: index,\n i1: (index + 1),\n value: child.getValue()\n }\n childTitle = compileTemplate(template, data)\n } else {\n const schemaTitle = getSchemaTitle(child.schema)\n childTitle = isSet(schemaTitle) ? schemaTitle + ' ' + (index + 1) : child.getKey()\n }\n\n deleteBtn.addEventListener('click', () => {\n this.activeTabIndex = clamp((index - 1), 0, (this.instance.value.length - 1))\n this.instance.deleteItem(index)\n })\n\n moveUpBtn.addEventListener('click', () => {\n const toIndex = index - 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n moveDownBtn.addEventListener('click', () => {\n const toIndex = index + 1\n this.activeTabIndex = toIndex\n this.instance.move(index, toIndex)\n })\n\n const active = index === this.activeTabIndex\n const id = pathToAttribute(child.path)\n\n const tab = this.theme.getTab({\n hasErrors: child.children.some((grandChild) => grandChild.ui.showingValidationErrors),\n title: childTitle,\n id: id,\n active: active\n })\n\n tab.list.addEventListener('click', () => {\n this.activeTabIndex = index\n })\n\n this.theme.setTabPaneAttributes(child.ui.control.container, active, id)\n tabList.appendChild(tab.list)\n tabContent.appendChild(child.ui.control.container)\n\n if (this.disabled || this.instance.isReadOnly()) {\n child.ui.disable()\n } else {\n child.ui.enable()\n }\n\n if (index === 0) {\n moveUpBtn.setAttribute('disabled', '')\n }\n\n if ((this.instance.value.length - 1) === index) {\n moveDownBtn.setAttribute('disabled', '')\n }\n })\n }\n}\n\nexport default EditorArrayNav\n","import Editor from './editor.js'\nimport { isArray, isSet, notSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaAnyOf, getSchemaDescription, getSchemaOneOf, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents an EditorMultiple instance.\n * @extends Editor\n */\nclass EditorMultiple extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaOneOf = getSchemaOneOf(schema)\n const schemaAnyOf = getSchemaAnyOf(schema)\n return isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)\n }\n\n build () {\n this.control = this.theme.getMultipleControl({\n title: 'Options',\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n id: pathToAttribute(this.instance.path),\n description: getSchemaDescription(this.instance.schema),\n switcherOptionValues: this.instance.switcherOptionValues,\n switcherOptionsLabels: this.instance.switcherOptionsLabels,\n switcher: true\n })\n }\n\n addEventListeners () {\n this.control.switcher.input.addEventListener('change', () => {\n const index = Number(this.control.switcher.input.value)\n this.instance.switchInstance(index)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.control.childrenSlot.innerHTML = ''\n this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container)\n this.control.switcher.input.value = this.instance.index\n\n if (this.disabled || this.instance.isReadOnly()) {\n this.instance.activeInstance.ui.disable()\n } else {\n this.instance.activeInstance.ui.enable()\n }\n }\n\n getInvalidFeedback (config) {\n return this.theme.getAlert(config)\n }\n}\n\nexport default EditorMultiple\n","import Editor from './editor.js'\nimport { pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNull instance.\n * @extends Editor\n */\nclass EditorNull extends Editor {\n static resolves (schema) {\n return getSchemaType(schema) === 'null'\n }\n\n build () {\n this.control = this.theme.getNullControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden') || getSchemaXOption(this.instance.schema, 'format') === 'hidden',\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n sanitize () {\n return null\n }\n}\n\nexport default EditorNull\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringQuill extends EditorString {\n static resolves (schema) {\n return window.Quill && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'quill'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.quill = new window.Quill(this.control.placeholder, getSchemaXOption(this.instance.schema, 'quill'))\n } catch (e) {\n console.error('Quill is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.quill.root.addEventListener('blur', () => {\n const quillText = this.quill.getText()\n\n if (quillText !== this.instance.getValue()) {\n this.instance.setValue(quillText)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.quill.disable()\n } else {\n this.quill.enable()\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.quill.setText(this.instance.getValue())\n }\n}\n\nexport default EditorStringQuill\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringQuill instance.\n * @extends EditorString\n */\nclass EditorStringJodit extends EditorString {\n static resolves (schema) {\n return window.Jodit && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'jodit'))\n }\n\n build () {\n this.control = this.theme.getTextareaControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.jodit = window.Jodit.make(this.control.input, getSchemaXOption(this.instance.schema, 'jodit'))\n } catch (e) {\n console.error('Jodit is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.jodit.events.on('change', () => {\n const joditValue = this.jodit.value\n\n if (joditValue !== this.instance.getValue()) {\n this.instance.setValue(joditValue)\n }\n })\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.jodit.setReadOnly(true)\n } else {\n this.jodit.setReadOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.jodit.value = this.instance.getValue()\n }\n\n destroy () {\n this.jodit.destruct()\n super.destroy()\n }\n}\n\nexport default EditorStringJodit\n","import EditorString from './string.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorStringFlatpickr instance.\n * @extends EditorString\n */\nclass EditorStringFlatpickr extends EditorString {\n static resolves (schema) {\n return window.flatpickr && getSchemaType(schema) === 'string' && isSet(getSchemaXOption(schema, 'flatpickr'))\n }\n\n build () {\n this.control = this.theme.getInputControl({\n type: 'text',\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.flatpickr = window.flatpickr(this.control.input, getSchemaXOption(this.instance.schema, 'flatpickr'))\n } catch (e) {\n console.error('Flatpickr is not available or not loaded correctly.', e)\n }\n }\n\n addEventListeners () {\n this.control.input.addEventListener('change', () => {\n this.instance.setValue(this.control.input.value)\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n this.flatpickr.setDate(this.instance.getValue())\n }\n\n destroy () {\n this.flatpickr.destroy()\n super.destroy()\n }\n}\n\nexport default EditorStringFlatpickr\n","/* global Raty */\n\nimport EditorNumber from './number.js'\nimport { isSet, pathToAttribute } from '../helpers/utils.js'\nimport { getSchemaDescription, getSchemaTitle, getSchemaType, getSchemaXOption } from '../helpers/schema.js'\n\n/**\n * Represents a EditorNumberRaty instance.\n * @extends EditorString\n */\nclass EditorNumberRaty extends EditorNumber {\n static resolves (schema) {\n return typeof Raty !== 'undefined' && getSchemaType(schema) === 'number' && isSet(getSchemaXOption(schema, 'raty'))\n }\n\n build () {\n this.control = this.theme.getPlaceholderControl({\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n labelIconClass: getSchemaXOption(this.instance.schema, 'labelIconClass'),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n\n try {\n this.raty = new Raty(this.control.placeholder, Object.assign({}, getSchemaXOption(this.instance.schema, 'raty'), {\n click: (score) => {\n this.instance.setValue(score)\n }\n }))\n this.raty.init()\n } catch (e) {\n console.error('Raty is not available or not loaded correctly.', e)\n }\n }\n\n refreshInteractiveElements () {\n if (this.disabled || this.readOnly) {\n this.raty.readOnly(true)\n } else {\n this.raty.readOnly(false)\n }\n }\n\n refreshUI () {\n super.refreshUI()\n this.raty.score(this.instance.getValue())\n }\n}\n\nexport default EditorNumberRaty\n","import {\n isArray,\n isSet,\n pathToAttribute\n} from '../helpers/utils.js'\n\nimport {\n getSchemaDescription,\n getSchemaEnum,\n getSchemaItems,\n getSchemaTitle,\n getSchemaType,\n getSchemaUniqueItems,\n getSchemaXOption\n} from '../helpers/schema.js'\n\nimport Editor from './editor.js'\n\n/**\n * Represents an EditorArrayEnumItems instance.\n * @extends Editor\n */\nclass EditorArrayEnumItems extends Editor {\n static resolves (schema) {\n const schemaType = getSchemaType(schema)\n const schemaItems = getSchemaItems(schema)\n const schemaItemsType = isSet(schemaItems) && getSchemaType(schemaItems)\n const isArrayType = isSet(schemaType) && schemaType === 'array'\n const isUniqueItems = getSchemaUniqueItems(schema) === true\n const hasEnum = isSet(schemaItems) && isSet(getSchemaEnum(schema.items))\n const hasTypes = isSet(schemaItems) && isSet(schemaItemsType)\n\n const validTypes = ['string', 'number', 'integer']\n\n const hasValidItemType = isSet(schemaItems) &&\n isSet(schemaItemsType) &&\n (validTypes.includes(schemaItemsType) ||\n (isArray(schemaItemsType) && schemaItemsType.some(type => validTypes.includes(type))))\n\n return isArrayType && isUniqueItems && hasEnum && hasTypes && hasValidItemType\n }\n\n build () {\n this.control = this.theme.getCheckboxesControl({\n values: getSchemaEnum(this.instance.schema.items),\n titles: getSchemaXOption(this.instance.schema.items, 'enumTitles') || getSchemaEnum(this.instance.schema.items),\n id: pathToAttribute(this.instance.path),\n label: getSchemaTitle(this.instance.schema) || this.instance.getKey(),\n titleHidden: getSchemaXOption(this.instance.schema, 'titleHidden'),\n description: getSchemaDescription(this.instance.schema)\n })\n }\n\n addEventListeners () {\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.addEventListener('change', () => {\n const value = this.instance.getValue()\n if (checkbox.checked) {\n value.push(checkbox.value)\n } else {\n const index = value.indexOf(checkbox.value)\n if (index > -1) {\n value.splice(index, 1)\n }\n }\n\n this.instance.setValue(value)\n })\n })\n }\n\n refreshUI () {\n this.refreshInteractiveElements()\n\n const value = this.instance.getValue()\n\n this.control.checkboxes.forEach((checkbox) => {\n checkbox.checked = value.includes(checkbox.value)\n })\n }\n}\n\nexport default EditorArrayEnumItems\n","import EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorNull from './editors/null.js'\nimport EditorStringQuill from './editors/string-quill.js'\nimport EditorStringJodit from './editors/string-jodit.js'\nimport EditorStringFlatpickr from './editors/string-flatpickr.js'\nimport EditorNumberRaty from './editors/number-raty.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorArrayEnumItems from './editors/array-enum-items.js'\n\nclass UiResolver {\n constructor (options) {\n this.customEditors = options.customEditors ?? []\n\n this.editors = [\n EditorMultiple,\n EditorIfThenElse,\n EditorBooleanEnumRadio,\n EditorBooleanCheckbox,\n EditorBooleanEnumSelect,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringQuill,\n EditorStringJodit,\n EditorStringFlatpickr,\n EditorStringInput,\n EditorNumberRaty,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayEnumItems,\n EditorArrayNav,\n EditorArray,\n EditorNull\n ]\n }\n\n getClass (schema) {\n for (const editor of this.customEditors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n for (const editor of this.editors) {\n if (editor.resolves(schema)) {\n return editor\n }\n }\n\n return null\n }\n}\n\nexport default UiResolver\n","import Validator from './validation/validator.js'\nimport EventEmitter from './event-emitter.js'\nimport InstanceIfThenElse from './instances/if-then-else.js'\nimport InstanceMultiple from './instances/multiple.js'\nimport InstanceBoolean from './instances/boolean.js'\nimport InstanceObject from './instances/object.js'\nimport InstanceArray from './instances/array.js'\nimport InstanceString from './instances/string.js'\nimport InstanceNumber from './instances/number.js'\nimport InstanceNull from './instances/null.js'\nimport {\n isArray, isObject,\n isSet, mergeDeep,\n notSet\n} from './helpers/utils.js'\nimport {\n getSchemaAllOf,\n getSchemaAnyOf,\n getSchemaIf,\n getSchemaOneOf,\n getSchemaType,\n getSchemaXOption\n} from './helpers/schema.js'\nimport { bootstrapIcons, fontAwesome3, fontAwesome4, fontAwesome5, fontAwesome6, glyphicons } from './themes/icons/icons.js'\nimport UiResolver from './ui-resolver.js'\n\n/**\n * Represents a Jedi instance.\n */\nclass Jedi extends EventEmitter {\n /**\n * Creates a Jedi instance.\n * @param {object} options - Options object\n * @param {object|boolean} options.schema - A JSON schema\n * @param {boolean} options.container - Where the UI controls will be rendered\n */\n constructor (options) {\n super()\n\n this.options = Object.assign({\n container: null,\n iconLib: null,\n theme: null,\n refParser: null,\n enablePropertiesToggle: false,\n enableCollapseToggle: false,\n startCollapsed: false,\n deactivateNonRequired: false,\n schema: {},\n showErrors: 'change',\n data: undefined,\n validateFormat: false,\n mergeAllOf: false,\n enforceConst: false,\n enforceEnumDefault: true,\n customEditors: [],\n hiddenInputAttributes: {}\n }, options)\n\n /**\n * Roots symbol used in paths\n * @type {string}\n */\n this.rootName = '#'\n\n /**\n * Separator symbol used in paths\n * @type {string}\n */\n this.pathSeparator = '/'\n\n /**\n * List of registered instances\n * @type {object}\n */\n this.instances = {}\n\n /**\n * The root editor\n * @type {Jedi}\n */\n this.root = null\n\n /**\n * The Validator instance used to validate instance values\n * @type {Validator}\n */\n this.validator = null\n\n /**\n * A json schema used\n * @type {*}\n */\n this.schema = {}\n\n this.theme = null\n\n this.uiResolver = null\n\n /**\n * A RefParser instance\n * @type {RefParser}\n */\n this.refParser = this.options.refParser ? this.options.refParser : null\n\n this.init()\n this.bindEventListeners()\n }\n\n /**\n * Initializes instance properties\n */\n init () {\n this.uiResolver = new UiResolver({\n customEditors: this.options.customEditors\n })\n\n this.theme = this.options.theme\n\n if (isSet(this.options.iconLib)) {\n switch (this.options.iconLib) {\n case 'glyphicons':\n this.theme.icons = glyphicons\n break\n case 'bootstrap-icons':\n this.theme.icons = bootstrapIcons\n break\n case 'fontawesome3':\n this.theme.icons = fontAwesome3\n break\n case 'fontawesome4':\n this.theme.icons = fontAwesome4\n break\n case 'fontawesome5':\n this.theme.icons = fontAwesome5\n break\n case 'fontawesome6':\n this.theme.icons = fontAwesome6\n break\n }\n }\n\n this.schema = this.options.schema\n this.validator = new Validator({ refParser: this.refParser, validateFormat: this.options.validateFormat })\n\n this.root = this.createInstance({\n jedi: this,\n schema: this.options.schema,\n path: this.rootName\n })\n\n if (isSet(this.options.data)) {\n this.root.setValue(this.options.data, false)\n }\n\n if (this.options.container) {\n this.container = this.options.container\n this.appendHiddenInput()\n this.container.appendChild(this.root.ui.control.container)\n this.container.classList.add('jedi-ready')\n }\n }\n\n bindEventListeners () {\n if (this.root) {\n this.root.on('change', () => {\n this.emit('change')\n })\n }\n\n if (this.hiddenInput) {\n this.on('change', () => {\n this.hiddenInput.value = JSON.stringify(this.getValue())\n })\n }\n }\n\n /**\n * Appends a hidden input to the root container whose value will be the value\n * of the root instance.\n * @private\n */\n appendHiddenInput () {\n const hiddenControl = this.root.ui.theme.getInputControl({\n type: 'hidden',\n id: 'jedi-hidden-input'\n })\n\n this.hiddenInput = hiddenControl.input\n this.hiddenInput.setAttribute('name', 'json')\n this.hiddenInput.removeAttribute('aria-describedby')\n\n if (this.options.hiddenInputAttributes && isObject(this.options.hiddenInputAttributes)) {\n Object.keys(this.options.hiddenInputAttributes).forEach(attr => {\n this.hiddenInput.setAttribute(attr, this.options.hiddenInputAttributes[attr])\n })\n }\n\n this.container.appendChild(this.hiddenInput)\n this.hiddenInput.value = JSON.stringify(this.getValue())\n }\n\n /**\n * Adds a child instance pointer to the instances list\n */\n register (instance) {\n this.instances[instance.path] = instance\n }\n\n /**\n * Deletes a child instance pointer from the instances list\n */\n unregister (instance) {\n this.instances[instance.path] = null\n delete this.instances[instance.path]\n }\n\n /**\n * Creates a json instance and dereference schema on the fly if needed.\n */\n createInstance (config) {\n const mergeAllOf = this.options.mergeAllOf || getSchemaXOption(config.schema, 'mergeAllOf')\n\n if (mergeAllOf) {\n const allOf = getSchemaAllOf(config.schema)\n\n if (isSet(allOf)) {\n allOf.forEach((subschema) => {\n config.schema = mergeDeep({}, config.schema, subschema)\n })\n }\n }\n\n if (this.refParser) {\n config.schema = this.refParser.expand(config.schema, config.path)\n }\n\n const schemaType = getSchemaType(config.schema)\n const schemaOneOf = getSchemaOneOf(config.schema)\n const schemaAnyOf = getSchemaAnyOf(config.schema)\n const schemaIf = getSchemaIf(config.schema)\n\n if (isSet(schemaAnyOf) || isSet(schemaOneOf) || schemaType === 'any' || isArray(schemaType) || notSet(schemaType)) {\n return new InstanceMultiple(config)\n }\n\n if (isSet(schemaIf)) {\n return new InstanceIfThenElse(config)\n }\n\n if (schemaType === 'object') {\n return new InstanceObject(config)\n }\n\n if (schemaType === 'array') {\n return new InstanceArray(config)\n }\n\n if (schemaType === 'string') {\n return new InstanceString(config)\n }\n\n if (schemaType === 'number' || schemaType === 'integer') {\n return new InstanceNumber(config)\n }\n\n if (schemaType === 'boolean') {\n return new InstanceBoolean(config)\n }\n\n if (schemaType === 'null') {\n return new InstanceNull(config)\n }\n }\n\n /**\n * Returns the value of the root instance\n * @return {*}\n */\n getValue () {\n return this.root.getValue()\n }\n\n /**\n * Sets the value of the root instance\n */\n setValue () {\n this.root.setValue(...arguments)\n }\n\n /**\n * Returns an instance by path\n * @return {*}\n */\n getInstance (path) {\n return this.instances[path]\n }\n\n /**\n * Disables the root instance and it's children user interfaces\n */\n disable () {\n this.root.ui.disable()\n }\n\n /**\n * Enables the root instance and it's children user interfaces\n */\n enable () {\n this.root.ui.enable()\n }\n\n /**\n * Returns an array of validation error messages\n */\n getErrors () {\n let errors = []\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n errors = [...errors, ...instance.getErrors()]\n })\n\n return errors\n }\n\n /**\n * Displays validation errors in the respective editors.\n * If an errors list is passed, it will display these errors;\n * otherwise, it will retrieve existing errors from the instance.\n *\n * @param {Array|null} errorsList - An optional array containing error messages.\n * @returns {boolean} Returns `true` if the container exists and errors are displayed,\n * or `false` if there is no container and thus no errors are displayed.\n */\n showValidationErrors (errorsList = null) {\n if (!this.options.container) {\n return false\n }\n\n const errors = errorsList || this.getErrors()\n\n Object.keys(this.instances).forEach((key) => {\n const instance = this.instances[key]\n instance.ui.showValidationErrors(errors, true)\n })\n }\n\n /**\n * Destroy the root instance and it's children\n */\n destroy () {\n this.root.destroy()\n\n if (this.options.container) {\n this.container.innerHTML = ''\n }\n\n Object.keys(this).forEach((key) => {\n delete this[key]\n })\n }\n}\n\nexport default Jedi\n","/**\n * Represents a Theme instance.\n */\nclass Theme {\n constructor (icons = null) {\n this.icons = icons\n this.useToggleEvents = true\n this.init()\n }\n\n /**\n * Inits some instance properties\n * @private\n */\n init () {\n this.useToggleEvents = true\n }\n\n /**\n * Used to wrap the editor UI elements\n * @private\n */\n getEditorContainer () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-container')\n return html\n }\n\n /**\n * Used to group several controls\n * @private\n */\n getFieldset () {\n const html = document.createElement('fieldset')\n html.classList.add('jedi-editor-fieldset')\n return html\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLegend (config) {\n const legend = document.createElement('legend')\n const legendText = document.createElement('span')\n legend.classList.add('jedi-editor-legend')\n legendText.classList.add('jedi-editor-legend-text')\n legend.setAttribute('aria-labelledby', '#legend-' + config.id)\n legendText.textContent = config.textContent\n legendText.setAttribute('id', '#legend-' + config.id)\n legend.appendChild(legendText)\n return legend\n }\n\n /**\n * Represents a caption for the content of its parent fieldset\n */\n getLabel (config) {\n const label = document.createElement('label')\n label.setAttribute('for', config.for)\n\n const icon = this.getIcon(config.labelIconClass)\n\n const labelText = document.createElement('span')\n labelText.textContent = config.text\n\n if (config.visuallyHidden) {\n this.visuallyHidden(label)\n }\n\n label.classList.add('jedi-title')\n label.appendChild(icon)\n label.appendChild(labelText)\n\n return { label, labelText, icon }\n }\n\n /**\n * Returns a icon element\n * @private\n */\n getIcon (classes = '') {\n const icon = document.createElement('i')\n let iconClasses = classes.split(' ')\n iconClasses = iconClasses.filter((className) => className.length > 0)\n\n if (iconClasses) {\n iconClasses.forEach((className) => {\n icon.classList.add(className)\n })\n }\n\n return icon\n }\n\n /**\n * Container for complex editors like arrays, objects and multiple\n * @private\n */\n getCard () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card')\n return html\n }\n\n /**\n * Header for cards\n * @private\n */\n getCardHeader () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-header')\n return html\n }\n\n /**\n * A body for the cards\n * @private\n */\n getCardBody () {\n const html = document.createElement('div')\n html.classList.add('jedi-editor-card-body')\n return html\n }\n\n /**\n * Wrapper for editor actions buttons\n * @private\n */\n getActionsSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-actions-slot')\n return html\n }\n\n /**\n * Wrapper for editor array specific actions buttons\n * @private\n */\n getArrayActionsSlot () {\n const html = document.createElement('span')\n html.classList.add('jedi-array-actions-slot')\n return html\n }\n\n /**\n * Wrapper for child editors\n * @private\n */\n getChildrenSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-children-slot')\n return html\n }\n\n /**\n * Wrapper for error messages\n * @private\n */\n getMessagesSlot (config = {}) {\n const html = document.createElement('div')\n html.classList.add('jedi-messages-slot')\n html.setAttribute('aria-atomic', 'false')\n html.setAttribute('aria-live', 'polite')\n\n if (config.id) {\n html.setAttribute('id', config.id)\n }\n\n return html\n }\n\n /**\n * Wrapper for editor controls\n * @private\n */\n getControlSlot () {\n const html = document.createElement('div')\n html.classList.add('jedi-control-slot')\n return html\n }\n\n /**\n * Toggles the ObjectEditor properties wrapper visibility\n * @private\n */\n getPropertiesToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-properties-toggle')\n\n // if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.propertiesContainer.open) {\n config.propertiesContainer.close()\n } else {\n config.propertiesContainer.showModal()\n }\n })\n // }\n\n return toggle\n }\n\n /**\n * Container that will collapse and expand to show and hide it contents\n * @private\n */\n getCollapse (config) {\n const collapse = document.createElement('div')\n collapse.classList.add('jedi-collapse')\n collapse.setAttribute('id', config.id)\n\n if (this.useToggleEvents && config.startCollapsed) {\n collapse.style.display = 'none'\n }\n\n return collapse\n }\n\n /**\n * Toggle button for collapse\n * @private\n */\n getCollapseToggle (config) {\n const toggle = this.getButton(config)\n toggle.classList.add('jedi-collapse-toggle')\n\n if (this.useToggleEvents) {\n toggle.addEventListener('click', () => {\n if (config.collapse.style.display === 'none') {\n config.collapse.style.display = 'block'\n } else {\n config.collapse.style.display = 'none'\n }\n })\n }\n\n let collapsed = config.startCollapsed\n\n toggle.style.transition = 'transform 0.1s ease'\n\n if (collapsed) {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n toggle.addEventListener('click', () => {\n if (collapsed) {\n toggle.style.transform = 'rotate(0deg)'\n } else {\n toggle.style.transform = 'rotate(90deg)'\n }\n\n collapsed = !collapsed\n })\n\n return toggle\n }\n\n /**\n * Container for properties editing elements like property activators\n * @private\n */\n getPropertiesSlot (config) {\n const html = document.createElement('dialog')\n html.classList.add('jedi-properties-slot')\n html.setAttribute('id', config.id)\n\n window.addEventListener('click', (event) => {\n if (event.target === html) {\n html.close()\n }\n })\n\n return html\n }\n\n /**\n * Container for screen reader announced messages\n * @private\n */\n getPropertiesAriaLive () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-aria-live')\n html.setAttribute('role', 'status')\n html.setAttribute('aria-live', 'polite')\n return html\n }\n\n /**\n * A message that will be announced by screen reader\n * @private\n */\n getAriaLiveMessage (message) {\n const html = document.createElement('p')\n html.classList.add('jedi-aria-live-message')\n html.textContent = message\n this.visuallyHidden(html)\n return html\n }\n\n /**\n * Wrapper for property activators\n * @private\n */\n getPropertiesActivators () {\n const html = document.createElement('div')\n html.classList.add('jedi-properties-activators')\n return html\n }\n\n /**\n * Wrapper buttons\n * @private\n */\n getBtnGroup () {\n const html = document.createElement('span')\n html.classList.add('jedi-btn-group')\n return html\n }\n\n /**\n * A button\n * @private\n */\n getButton (config) {\n const button = document.createElement('button')\n button.classList.add('jedi-btn')\n\n button.setAttribute('type', 'button')\n\n if (config.value) {\n button.value = config.value\n }\n\n if (config.id) {\n button.setAttribute('id', config.id)\n }\n\n const text = document.createElement('span')\n text.textContent = config.textContent\n\n if (this.icons && config.icon) {\n const icon = this.getIcon(this.icons[config.icon])\n icon.setAttribute('title', config.textContent)\n button.appendChild(icon)\n this.visuallyHidden(text)\n }\n\n button.appendChild(text)\n\n return button\n }\n\n /**\n * Array \"add\" item button\n * @private\n */\n getArrayBtnAdd () {\n const html = this.getButton({\n textContent: 'Add item',\n icon: 'add'\n })\n html.classList.add('jedi-array-add')\n return html\n }\n\n getAddPropertyButton () {\n const html = this.getButton({\n textContent: 'Add property'\n })\n html.classList.add('jedi-add-property-btn')\n return html\n }\n\n /**\n * Array \"delete\" item button\n * @private\n */\n getDeleteItemBtn () {\n const deleteItemBtn = this.getButton({\n textContent: 'Delete item',\n icon: 'delete'\n })\n\n deleteItemBtn.classList.add('jedi-array-delete')\n\n return deleteItemBtn\n }\n\n /**\n * Array \"move up\" item button\n * @private\n */\n getMoveUpItemBtn () {\n const moveUpItemBtn = this.getButton({\n textContent: 'Move up',\n icon: 'moveUp'\n })\n\n moveUpItemBtn.classList.add('jedi-array-move-up')\n\n return moveUpItemBtn\n }\n\n /**\n * Array \"move down\" item button\n * @private\n */\n getMoveDownItemBtn () {\n const moveDownItemBtn = this.getButton({\n textContent: 'Move down',\n icon: 'moveDown'\n })\n\n moveDownItemBtn.classList.add('jedi-array-move-down')\n\n return moveDownItemBtn\n }\n\n getDragItemBtn () {\n const dragItemBtn = this.getButton({\n textContent: 'Drag',\n icon: 'drag'\n })\n\n dragItemBtn.classList.add('jedi-array-drag')\n\n return dragItemBtn\n }\n\n /**\n * Wrapper for the editor description\n * @private\n */\n getDescription (config = {}) {\n const description = document.createElement('small')\n description.classList.add('jedi-description')\n\n if (config.textContent) {\n description.textContent = config.textContent\n }\n\n if (config.id) {\n description.setAttribute('id', config.id)\n }\n\n return description\n }\n\n getPlaceholderControl (config) {\n const container = document.createElement('div')\n const placeholder = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n container.appendChild(label)\n container.appendChild(placeholder)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, placeholder, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Object control is a card containing multiple editors.\n * Each editor is mapped to an object instance property.\n * Properties can be added, activated and deactivated depending on configuration\n * @private\n */\n getObjectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n const ariaLive = this.getPropertiesAriaLive()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n\n const propertiesContainer = this.getPropertiesSlot({\n id: 'properties-slot-' + config.id\n })\n\n const propertiesToggle = this.getPropertiesToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'properties-slot-toggle-' + config.id,\n icon: 'properties',\n propertiesContainer: propertiesContainer\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n const propertiesActivators = this.getPropertiesActivators()\n\n const addPropertyControl = this.getInputControl({\n type: 'text',\n id: 'jedi-add-property-input-' + config.id,\n label: 'Property'\n })\n\n const addPropertyBtn = this.getAddPropertyButton()\n\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n addPropertyBtn.classList.add('jedi-object-add')\n\n container.appendChild(fieldset)\n container.appendChild(propertiesContainer)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.addProperty) {\n propertiesContainer.appendChild(addPropertyControl.container)\n propertiesContainer.appendChild(addPropertyBtn)\n propertiesContainer.appendChild(document.createElement('hr'))\n }\n\n if (config.enablePropertiesToggle) {\n actions.appendChild(propertiesToggle)\n propertiesContainer.appendChild(ariaLive)\n propertiesContainer.appendChild(propertiesActivators)\n }\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapse,\n collapseToggle,\n body,\n actions,\n messages,\n childrenSlot,\n propertiesToggle,\n propertiesContainer,\n addPropertyControl,\n addPropertyBtn,\n ariaLive,\n propertiesActivators,\n arrayActions\n }\n }\n\n /**\n * Array control is a card containing multiple editors.\n * Items can bve added, deleted or moved up or down.\n * @private\n */\n getArrayControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n const childrenSlot = this.getChildrenSlot()\n const btnGroup = this.getBtnGroup()\n const addBtn = this.getArrayBtnAdd()\n const fieldset = this.getFieldset()\n const legend = this.getLegend({\n textContent: config.title,\n id: config.id\n })\n\n const collapseId = 'collapse-' + config.id\n\n const collapse = this.getCollapse({\n id: collapseId,\n startCollapsed: config.startCollapsed\n })\n\n const collapseToggle = this.getCollapseToggle({\n textContent: config.title + ' ' + 'properties',\n id: 'collapse-toggle-' + config.id,\n icon: 'collapse',\n collapseId: collapseId,\n collapse: collapse,\n startCollapsed: config.startCollapsed\n })\n\n container.appendChild(fieldset)\n fieldset.appendChild(legend)\n fieldset.appendChild(collapse)\n collapse.appendChild(body)\n body.appendChild(description)\n body.appendChild(messages)\n legend.appendChild(actions)\n actions.appendChild(btnGroup)\n btnGroup.appendChild(addBtn)\n actions.appendChild(arrayActions)\n body.appendChild(childrenSlot)\n\n if (config.enableCollapseToggle) {\n actions.appendChild(collapseToggle)\n }\n\n return {\n container,\n collapseToggle,\n collapse,\n body,\n actions,\n messages,\n childrenSlot,\n btnGroup,\n addBtn,\n arrayActions\n }\n }\n\n getArrayItem () {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const header = this.getCardHeader()\n const body = this.getCardBody()\n\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n arrayActions\n }\n }\n\n /**\n * Multiple control is a card containing multiple editors options that can be\n * selected with a switcher control. Only one editor can be active/visible\n * at a time\n * @private\n */\n getMultipleControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n container.appendChild(description)\n container.appendChild(card)\n card.appendChild(header)\n card.appendChild(body)\n header.appendChild(actions)\n\n if (config.switcher) {\n actions.appendChild(switcher.container)\n }\n\n actions.appendChild(arrayActions)\n body.appendChild(messages)\n body.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n getIfThenElseControl (config) {\n const container = document.createElement('div')\n const card = this.getCard()\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const header = this.getCardHeader({\n textContent: config.title,\n titleHidden: config.titleHidden\n })\n\n const body = this.getCardBody()\n\n const description = this.getDescription({\n textContent: config.description\n })\n\n const messages = this.getMessagesSlot()\n\n const childrenSlot = this.getChildrenSlot()\n\n const switcher = this.getSwitcher({\n values: config.switcherOptionValues,\n titles: config.switcherOptionsLabels,\n id: config.id + '-switcher',\n label: config.id + '-switcher',\n titleHidden: true,\n readOnly: config.readOnly\n })\n\n switcher.container.classList.add('jedi-switcher')\n\n if (config.switcher) {\n container.appendChild(switcher.container)\n }\n\n body.appendChild(description)\n container.appendChild(messages)\n container.appendChild(childrenSlot)\n\n return {\n container,\n card,\n header,\n body,\n actions,\n messages,\n childrenSlot,\n switcher,\n arrayActions\n }\n }\n\n /**\n * Control for NullEditor\n * @private\n */\n getNullControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messages = this.getMessagesSlot()\n\n const br = document.createElement('br')\n\n container.appendChild(label)\n container.appendChild(br)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A Textarea\n * @private\n */\n getTextareaControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('textarea')\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * An Input control\n * @private\n */\n getInputControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('input')\n input.setAttribute('type', config.type)\n input.setAttribute('id', config.id)\n input.style.width = '100%'\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden,\n labelIconClass: config.labelIconClass\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * A radio group control\n * @private\n */\n getRadiosControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const radioControls = []\n const radios = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const radioControl = document.createElement('div')\n radioControls.push(radioControl)\n\n const radio = document.createElement('input')\n radio.setAttribute('type', 'radio')\n radio.setAttribute('id', config.id + '-' + index)\n radio.setAttribute('value', value)\n radios.push(radio)\n\n const describedBy = messagesId + ' ' + descriptionId\n radio.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n radioControls.forEach((radioControl, index) => {\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n fieldset.appendChild(description)\n fieldset.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n radios,\n labels,\n labelTexts,\n radioControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A checkbox control\n * @private\n */\n getCheckboxControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const formGroup = document.createElement('div')\n\n const input = document.createElement('input')\n input.setAttribute('type', 'checkbox')\n input.setAttribute('id', config.id)\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(formGroup)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n\n return { container, formGroup, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n getCheckboxesControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n const fieldset = this.getFieldset()\n const body = this.getCardBody()\n const legend = this.getLegend({\n textContent: config.label,\n id: config.id\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n if (config.titleHidden) {\n this.visuallyHidden(legend)\n }\n\n const checkboxControls = []\n const checkboxes = []\n const labels = []\n const labelTexts = []\n\n config.values.forEach((value, index) => {\n const checkboxControl = document.createElement('div')\n checkboxControls.push(checkboxControl)\n\n const checkbox = document.createElement('input')\n checkbox.setAttribute('type', 'checkbox')\n checkbox.setAttribute('id', config.id + '-' + index)\n checkbox.setAttribute('value', value)\n checkboxes.push(checkbox)\n\n const describedBy = messagesId + ' ' + descriptionId\n checkbox.setAttribute('aria-describedby', describedBy)\n\n const label = document.createElement('label')\n label.setAttribute('for', config.id + '-' + index)\n\n const labelText = document.createElement('span')\n labelTexts.push(labelText)\n\n if (config.titles && config.titles[index]) {\n labelText.textContent = config.titles[index]\n }\n\n labels.push(label)\n })\n\n container.appendChild(fieldset)\n container.appendChild(actions)\n fieldset.appendChild(legend)\n fieldset.appendChild(body)\n actions.appendChild(arrayActions)\n\n checkboxControls.forEach((checkboxControl, index) => {\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(checkboxes[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return {\n container,\n fieldset,\n legend,\n body,\n checkboxes,\n labels,\n labelTexts,\n checkboxControls,\n description,\n messages,\n actions,\n arrayActions\n }\n }\n\n /**\n * A select control\n * @private\n */\n getSelectControl (config) {\n const container = document.createElement('div')\n const actions = this.getActionsSlot()\n const arrayActions = this.getArrayActionsSlot()\n\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n const descriptionId = config.id + '-description'\n const description = this.getDescription({\n textContent: config.description,\n id: descriptionId\n })\n\n const messagesId = config.id + '-messages'\n const messages = this.getMessagesSlot({\n id: messagesId\n })\n\n const describedBy = messagesId + ' ' + descriptionId\n input.setAttribute('aria-describedby', describedBy)\n\n container.appendChild(label)\n container.appendChild(input)\n container.appendChild(description)\n container.appendChild(messages)\n container.appendChild(actions)\n actions.appendChild(arrayActions)\n\n return { container, input, label, labelText, description, messages, actions, arrayActions }\n }\n\n /**\n * Control to switch between multiple editors options\n * @private\n */\n getSwitcher (config) {\n const container = document.createElement('span')\n const input = document.createElement('select')\n input.setAttribute('id', config.id)\n // input.setAttribute('style', 'width: 100%;')\n\n config.values.forEach((value, index) => {\n const option = document.createElement('option')\n option.setAttribute('value', value)\n\n if (config.titles && config.titles[index]) {\n option.textContent = config.titles[index]\n }\n\n input.appendChild(option)\n })\n\n const { label, labelText } = this.getLabel({\n for: config.id,\n text: config.label,\n visuallyHidden: config.titleHidden\n })\n\n container.appendChild(label)\n container.appendChild(input)\n\n return { container, input, label, labelText }\n }\n\n /**\n * Another type of error message container used for more complex editors like\n * object, array and multiple editors\n * @private\n */\n getAlert (config) {\n return this.getInvalidFeedback(config)\n }\n\n /**\n * Error messages\n * @public\n */\n getInvalidFeedback (config) {\n const html = document.createElement('div')\n const invalidFeedbackText = document.createElement('span')\n const invalidFeedbackIcon = document.createElement('span')\n invalidFeedbackText.textContent = config.message\n invalidFeedbackIcon.textContent = '⚠ '\n invalidFeedbackIcon.classList.add('jedi-error-message')\n invalidFeedbackIcon.setAttribute('aria-hidden', 'true')\n html.classList.add('jedi-error-message')\n html.appendChild(invalidFeedbackIcon)\n html.appendChild(invalidFeedbackText)\n return html\n }\n\n /**\n * Container for columns\n * @private\n */\n getRow () {\n const row = document.createElement('div')\n row.classList.add('jedi-row')\n return row\n }\n\n /**\n * A column to contain content to a specific width\n * @private\n */\n getCol (xs, md, offsetMd) {\n const col = document.createElement('div')\n col.classList.add('jedi-col-xs-' + xs)\n col.classList.add('jedi-col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('jedi-col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n /**\n * Tab list is a list of links that triggers tabs visibility ne at the time\n * @private\n */\n getTabList () {\n const tabList = document.createElement('ul')\n tabList.classList.add('jedi-nav-list')\n return tabList\n }\n\n /**\n * A Tab is a wrapper for content\n * @private\n */\n getTab (config) {\n const list = document.createElement('li')\n const link = document.createElement('a')\n link.classList.add('jedi-nav-link')\n link.setAttribute('href', '#' + config.id)\n link.textContent = config.hasErrors ? '⚠ ' + config.title : config.title\n list.appendChild(link)\n return { list, link }\n }\n\n /**\n * Wrapper for tabs\n * @private\n */\n getTabContent () {\n const tabContent = document.createElement('div')\n tabContent.classList.add('tab-content')\n return tabContent\n }\n\n /**\n * Set tab attributes to make it toggleable\n * @private\n */\n setTabPaneAttributes (element, active, id) {\n element.setAttribute('id', id)\n element.classList.add('jedi-tab-pane')\n }\n\n /**\n * Makes an element visually hidden\n * @private\n */\n visuallyHidden (element) {\n element.setAttribute('style', 'position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;')\n }\n\n /**\n * Reveals a visually hidden element\n * @private\n */\n visuallyVisible (element) {\n element.removeAttribute('style')\n }\n}\n\nexport default Theme\n","import Schema from './helpers/schema.js'\nimport Utils from './helpers/utils.js'\nimport Create from './jedi.js'\nimport RefParser from './ref-parser/ref-parser.js'\nimport Theme from './themes/theme.js'\nimport ThemeBootstrap3 from './themes/bootstrap3.js'\nimport ThemeBootstrap4 from './themes/bootstrap4.js'\nimport ThemeBootstrap5 from './themes/bootstrap5.js'\nimport EditorBoolean from './editors/boolean.js'\nimport EditorBooleanEnumRadio from './editors/boolean-enum-radio.js'\nimport EditorBooleanEnumSelect from './editors/boolean-enum-select.js'\nimport EditorBooleanCheckbox from './editors/boolean-checkbox.js'\nimport EditorString from './editors/string.js'\nimport EditorStringEnumRadio from './editors/string-enum-radio.js'\nimport EditorStringEnumSelect from './editors/string-enum-select.js'\nimport EditorStringTextarea from './editors/string-textarea.js'\nimport EditorStringAwesomplete from './editors/string-awesomplete.js'\nimport EditorStringInput from './editors/string-input.js'\nimport EditorNumber from './editors/number.js'\nimport EditorNumberEnumRadio from './editors/number-enum-radio.js'\nimport EditorNumberEnumSelect from './editors/number-enum-select.js'\nimport EditorNumberInput from './editors/number-input.js'\nimport EditorObjectGrid from './editors/object-grid.js'\nimport EditorObjectNav from './editors/object-nav.js'\nimport EditorObject from './editors/object.js'\nimport EditorArrayNav from './editors/array-nav.js'\nimport EditorArray from './editors/array.js'\nimport EditorMultiple from './editors/multiple.js'\nimport EditorIfThenElse from './editors/if-then-else.js'\nimport EditorNull from './editors/null.js'\n\nexport default {\n Schema,\n Utils,\n EditorBoolean,\n EditorBooleanEnumRadio,\n EditorBooleanEnumSelect,\n EditorBooleanCheckbox,\n EditorString,\n EditorStringEnumRadio,\n EditorStringEnumSelect,\n EditorStringTextarea,\n EditorStringAwesomplete,\n EditorStringInput,\n EditorNumber,\n EditorNumberEnumRadio,\n EditorNumberEnumSelect,\n EditorNumberInput,\n EditorObjectGrid,\n EditorObjectNav,\n EditorObject,\n EditorArrayNav,\n EditorArray,\n EditorMultiple,\n EditorIfThenElse,\n EditorNull,\n Theme,\n ThemeBootstrap3,\n ThemeBootstrap4,\n ThemeBootstrap5,\n RefParser,\n Create\n}\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap3 instance.\n * @extends Theme\n */\nclass ThemeBootstrap3 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('in')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('panel')\n fieldset.classList.add('panel-default')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h5')\n legend.classList.add('panel-heading')\n legend.classList.add('pull-left')\n legend.setAttribute('style', 'margin: 0; display: flex; justify-content: space-between; align-items: center;')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.setAttribute('style', 'margin-right: 5px;')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('panel')\n card.classList.add('panel-default')\n return card\n }\n\n getCardHeader (config) {\n const header = super.getCardHeader(config)\n header.classList.add('panel-heading')\n header.classList.add('text-right')\n return header\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('panel-body')\n html.style.clear = 'both'\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-xs')\n html.classList.add('btn-default')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('radio')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(radios[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { body, checkboxes, labels, labelTexts, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('checkbox')\n body.appendChild(checkboxControls[index])\n checkboxControl.appendChild(labels[index])\n labels[index].appendChild(checkboxes[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, labelText, description, messages } = control\n formGroup.classList.add('checkbox')\n\n container.appendChild(formGroup)\n formGroup.appendChild(label)\n label.appendChild(input)\n label.appendChild(labelText)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow()\n col.classList.add('col-xs-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('col-md-offset-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('nav-stacked')\n\n if (config.stacked === false) {\n tabList.classList.remove('nav-stacked')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n\n if (config.active) {\n tab.list.classList.add('active')\n }\n\n tab.link.setAttribute('data-toggle', 'tab')\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('in')\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap3\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap4 instance.\n * @extends Theme\n */\nclass ThemeBootstrap4 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('btn-block')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('float-left')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('mr-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('form-group')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('form-group')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n formGroup.classList.add('form-group')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('form-group')\n input.classList.add('form-control')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('form-text')\n html.classList.add('d-block')\n return html\n }\n\n getColumnClass (size, cols) {\n return 'col-' + size + '-' + cols\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList()\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('sr-only')\n }\n\n visuallyVisible (element) {\n element.classList.remove('sr-only')\n }\n}\n\nexport default ThemeBootstrap4\n","import Theme from './theme.js'\n\n/**\n * Represents a ThemeBootstrap5 instance.\n * @extends Theme\n */\nclass ThemeBootstrap5 extends Theme {\n init () {\n this.useToggleEvents = false\n }\n\n getAddPropertyButton () {\n const btn = super.getAddPropertyButton()\n btn.classList.add('btn-primary')\n btn.classList.add('w-100')\n return btn\n }\n\n getCollapseToggle (config) {\n const toggle = super.getCollapseToggle(config)\n toggle.setAttribute('href', '#' + config.collapseId)\n toggle.setAttribute('data-bs-toggle', 'collapse')\n return toggle\n }\n\n getCollapse (config) {\n const collapse = super.getCollapse(config)\n collapse.classList.add('collapse')\n\n if (!config.startCollapsed) {\n collapse.classList.add('show')\n }\n\n return collapse\n }\n\n getFieldset () {\n const fieldset = document.createElement('fieldset')\n fieldset.classList.add('card')\n fieldset.classList.add('mb-3')\n return fieldset\n }\n\n getLegend (config) {\n const legend = super.getLegend(config)\n legend.classList.add('h6')\n legend.classList.add('card-header')\n legend.classList.add('d-flex')\n legend.classList.add('justify-content-between')\n legend.classList.add('align-items-center')\n legend.classList.add('py-2')\n return legend\n }\n\n getLabel (config) {\n const labelObj = super.getLabel(config)\n\n if (labelObj.icon.classList) {\n labelObj.icon.classList.add('me-1')\n }\n\n return labelObj\n }\n\n getCard () {\n const card = super.getCard()\n card.classList.add('card')\n card.classList.add('mb-3')\n return card\n }\n\n getCardHeader (config) {\n const html = super.getCardHeader(config)\n html.classList.add('card-header')\n html.classList.add('d-flex')\n html.classList.add('justify-content-end')\n html.classList.add('align-items-center')\n html.classList.add('py-1')\n return html\n }\n\n getCardBody () {\n const html = super.getCardBody()\n html.classList.add('card-body')\n html.classList.add('pb-0')\n return html\n }\n\n getControlSlot () {\n const controlSlot = super.getControlSlot()\n controlSlot.classList.add('mb-3')\n return controlSlot\n }\n\n getBtnGroup () {\n const html = super.getBtnGroup()\n html.classList.add('btn-group')\n return html\n }\n\n getButton (config) {\n const html = super.getButton(config)\n html.classList.add('btn')\n html.classList.add('btn-sm')\n return html\n }\n\n getDescription (config) {\n const description = super.getDescription(config)\n description.classList.add('text-muted')\n return description\n }\n\n getTextareaControl (config) {\n const control = super.getTextareaControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getInputControl (config) {\n const control = super.getInputControl(config)\n const { container, input, label } = control\n container.classList.add('mb-3')\n input.classList.add('form-control')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n return control\n }\n\n getRadiosControl (config) {\n const control = super.getRadiosControl(config)\n const { container, body, radios, labels, labelTexts, radioControls, description, messages } = control\n\n container.classList.add('mb-3')\n\n radioControls.forEach((radioControl, index) => {\n radioControl.classList.add('form-check')\n radios[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n\n body.appendChild(radioControls[index])\n radioControl.appendChild(radios[index])\n radioControl.appendChild(labels[index])\n labels[index].appendChild(labelTexts[index])\n })\n\n body.appendChild(description)\n body.appendChild(messages)\n\n return control\n }\n\n getCheckboxesControl (config) {\n const control = super.getCheckboxesControl(config)\n const { checkboxes, labels, checkboxControls } = control\n\n checkboxControls.forEach((checkboxControl, index) => {\n checkboxControl.classList.add('mb-3')\n checkboxControl.classList.add('form-check')\n checkboxes[index].classList.add('form-check-input')\n labels[index].classList.add('form-check-label')\n })\n\n return control\n }\n\n getCheckboxControl (config) {\n const control = super.getCheckboxControl(config)\n const { container, formGroup, input, label, description, messages } = control\n container.classList.add('mb-3')\n formGroup.classList.add('form-check')\n input.classList.add('form-check-input')\n label.classList.add('form-check-label')\n\n if (config.titleHidden) {\n this.visuallyHidden(label)\n }\n\n container.appendChild(formGroup)\n formGroup.appendChild(input)\n formGroup.appendChild(label)\n formGroup.appendChild(description)\n formGroup.appendChild(messages)\n return control\n }\n\n getSelectControl (config) {\n const control = super.getSelectControl(config)\n const { container, input } = control\n container.classList.add('mb-3')\n input.classList.add('form-select')\n return control\n }\n\n getAlert (config) {\n const html = super.getAlert(config)\n html.classList.add('alert')\n html.classList.add('alert-danger')\n return html\n }\n\n getInvalidFeedback (config) {\n const html = super.getInvalidFeedback(config)\n html.classList.add('text-danger')\n html.classList.add('d-block')\n html.classList.add('form-text')\n html.classList.add('form-text')\n return html\n }\n\n getRow () {\n const row = super.getRow()\n row.classList.add('row')\n return row\n }\n\n getCol (xs, md, offsetMd) {\n const col = super.getRow(xs, md, offsetMd)\n col.classList.add('col-' + xs)\n col.classList.add('col-md-' + md)\n\n if (offsetMd) {\n col.classList.add('offset-md-' + offsetMd)\n }\n\n return col\n }\n\n getTabList (config) {\n const tabList = super.getTabList(config)\n tabList.classList.add('nav')\n\n if (config.type === 'tabs') {\n tabList.classList.add('nav-tabs')\n } else {\n tabList.classList.add('nav-pills')\n }\n\n tabList.classList.add('flex-column')\n\n if (config.stacked === false) {\n tabList.classList.remove('flex-column')\n }\n\n return tabList\n }\n\n getTab (config) {\n const tab = super.getTab(config)\n tab.list.classList.add('nav-item')\n\n tab.link.classList.add('nav-link')\n tab.link.setAttribute('data-bs-toggle', 'tab')\n\n if (config.active) {\n tab.link.classList.add('active')\n }\n\n return tab\n }\n\n setTabPaneAttributes (element, active, id) {\n super.setTabPaneAttributes(element, active, id)\n element.classList.add('tab-pane')\n\n if (active) {\n element.classList.add('active')\n }\n }\n\n visuallyHidden (element) {\n element.classList.add('visually-hidden')\n }\n\n visuallyVisible (element) {\n element.classList.remove('visually-hidden')\n }\n}\n\nexport default ThemeBootstrap5\n","import { mergeDeep } from '../helpers/utils.js'\n\nclass RefParser {\n constructor () {\n this.refs = {}\n this.data = {}\n }\n\n async dereference (schema) {\n await this.collectRefs(schema)\n\n while (this.refsResolved() === false) {\n await this.collectRefs(schema)\n }\n }\n\n refsResolved () {\n return Object.values(this.refs).every((value) => {\n return value !== null\n })\n }\n\n /**\n * Traverses the given schema recursively and for each schema with $ref\n * add a new property in the this.refs object with key being the json path to that schema.\n * If the ref has no value in data will be given a value of null. This value will be later\n * replaced in a future iteration. At that time the data will be available\n * @param schema\n * @param path\n */\n async collectRefs (schema, path = '#') {\n if (typeof schema !== 'object' || schema === null) {\n return\n }\n\n for (const [key, value] of Object.entries(schema)) {\n const nextPath = path ? `${path}/${key}` : `/${key}`\n\n if (this.hasRef(schema)) {\n const ref = schema['$ref']\n\n if (this.isExternalRef(ref)) {\n const resolvedSchema = await this.load(ref)\n this.refs[ref] = resolvedSchema\n await this.collectRefs(resolvedSchema, nextPath)\n } else {\n this.refs[ref] = this.data[ref] ?? null\n }\n }\n\n this.data[path] = schema\n\n await this.collectRefs(value, nextPath)\n }\n }\n\n hasRef (schema) {\n return typeof schema['$ref'] !== 'undefined' && typeof schema['$ref'] === 'string'\n }\n\n isExternalRef (ref) {\n if (typeof ref !== 'string') {\n return false\n }\n\n return ref.startsWith('http') || ref.startsWith('https')\n }\n\n isObject (value) {\n return value !== null && typeof value === 'object'\n }\n\n expand (schema) {\n const cloneSchema = JSON.parse(JSON.stringify(schema))\n\n if (this.isObject(cloneSchema) && this.hasRef(cloneSchema)) {\n const ref = cloneSchema.$ref\n delete cloneSchema['$ref']\n return this.expand(mergeDeep({}, this.refs[ref], cloneSchema))\n }\n\n return cloneSchema\n }\n\n /**\n * Loads a schema with a synchronous http request\n * @param uri\n * @returns {any}\n */\n async load (uri) {\n try {\n const response = await fetch(uri)\n if (!response.ok) {\n throw new Error('Network response was not ok')\n }\n return await response.json()\n } catch (error) {\n console.error('Error loading', uri, error)\n throw error\n }\n }\n}\n\nexport default RefParser\n"],"names":["getCircularReplacer","ancestors","key","value","length","at","this","pop","includes","push","clone","thing","JSON","parse","stringify","escapeRegExp","string","replace","replaceAll","str","find","RegExp","pathToAttribute","path","hasOwn","obj","prop","Object","prototype","hasOwnProperty","call","sortObject","keys","sort","reduce","result","equal","a","b","isObject","different","isNull","isSet","notSet","isNumber","isInteger","Math","floor","isString","isBoolean","isArray","Array","getType","type","mergeDeep","target","sources","source","shift","forEach","assign","overwriteExistingProperties","obj1","obj2","getValueByJSONPath","data","split","test","index","parseInt","compileTemplate","template","match","clamp","number","min","max","removeDuplicatesFromArray","arr","uniqueObjects","uniqueValues","Set","objString","has","add","Utils","getSchemaAdditionalProperties","schema","additionalProperties","getSchemaPropertyNames","propertyNames","getSchemaAllOf","allOf","getSchemaAnyOf","anyOf","getSchemaConst","const","getSchemaContains","contains","getSchemaDefault","default","getSchemaDependentRequired","dependentRequired","getSchemaDependentSchemas","dependentSchemas","getSchemaDescription","description","getSchemaElse","else","getSchemaEnum","enum","getSchemaExclusiveMaximum","exclusiveMaximum","getSchemaExclusiveMinimum","exclusiveMinimum","getSchemaFormat","format","getSchemaIf","if","getSchemaItems","items","getSchemaMaximum","maximum","getSchemaMaxContains","maxContains","getSchemaMaxItems","maxItems","getSchemaMaxLength","maxLength","getSchemaMaxProperties","maxProperties","getSchemaMinimum","minimum","getSchemaMinContains","minContains","getSchemaMinItems","minItems","getSchemaMinLength","minLength","getSchemaMinProperties","minProperties","getSchemaMultipleOf","multipleOf","getSchemaNot","not","getSchemaXOption","option","getSchemaPattern","pattern","getSchemaPatternProperties","patternProperties","getSchemaPrefixItems","prefixItems","getSchemaProperties","properties","getSchemaReadOnly","readOnly","getSchemaRequired","required","getSchemaThen","then","getSchemaTitle","title","getSchemaType","getSchemaOneOf","oneOf","getSchemaUnevaluatedProperties","unevaluatedProperties","getSchemaUniqueItems","uniqueItems","Schema","getSchemaX","keyword","getSchemaSchema","$schema","validator","errors","subSchemaEditor","Jedi","refParser","rootName","subSchemaErrors","getErrors","destroy","error","i18n","messages","constrain","valid","anyOfEditor","anyOfErrors","_enum","schemaEnum","some","e","validateFormat","options","regexp","prefixItemsSchemasCount","toString","notEditor","notErrors","counter","oneOfEditor","oneOfErrors","propertyName","editor","editorErrors","map","schemaProperties","invalidProperties","propertySchema","join","constraint","missingProperties","types","integer","boolean","array","object","null","valueType","seen","hasDuplicatedItems","i","item","itemStringified","schemaAdditionalProperties","schemaPatternProperties","property","definedInPatternProperty","isDefinedInProperties","additionalPropertyErrors","draft04","_const","schemaConst","containsEditor","containsInvalid","requiredProperties","filter","dependentSchema","tmpEditor","tmpErrors","ifThenElse","schemaIf","schemaThen","schemaElse","ifEditor","ifErrors","thenErrors","elseErrors","thenEditor","elseEditor","itemSchema","itemValue","draft06","draft07","schemaUnevaluatedProperties","schemaAllOf","schemaAnyOf","schemaOneOf","subSchema","subschema","unevaluatedPropertiesErrors","draft201909","propertie","draft202012","schemaPropertyNames","Validator","constructor","config","draft","jsonSchemaDrafts","schemaErrors","schemaOptionsMessages","schemaClone","validatorErrors","EventEmitter","listeners","on","name","callback","off","listener","emit","payload","Instance","super","jedi","isActive","parent","children","ui","isDirty","init","register","setInitialValue","prepare","setDefaultValue","container","setUI","onChildChange","EditorClass","uiResolver","getClass","getKey","pathSeparator","registerChildRecursive","child","unregister","schemaType","schemaDefault","setValue","getValue","newValue","triggersChange","enforceConst","activate","deactivate","isReadOnly","Editor","instance","theme","control","disabled","showingValidationErrors","build","enforceEnumDefault","addEventListeners","setContainerAttributes","refreshUI","showErrors","showValidationErrors","resolves","setAttribute","force","innerHTML","label","message","invalidFeedback","getInvalidFeedback","appendChild","disable","enable","refreshInteractiveElements","querySelectorAll","element","removeAttribute","sanitize","parentNode","removeChild","EditorIfThenElse","getIfThenElseControl","titleHidden","id","switcherOptionValues","switcherOptionsLabels","switcher","input","addEventListener","Number","switchInstance","childrenSlot","activeInstance","getAlert","InstanceIfThenElse","instances","instanceStartingValues","instanceWithoutIf","schemas","ifThenElseShemas","traverseSchema","optionLabel","createInstance","currentValue","getFittestIndex","ifValue","startingValue","fittestIndex","ifValidator","getAllOfCombinations","generateCombinations","current","remaining","nextSchema","schema1","schema2","slice","InstanceMultiple","lastIndex","onSetValue","schemasOf","schemaCopy","expand","switcherOptionsLabel","switcherTitle","schemaTitle","toUpperCase","charAt","championErrors","instanceErrors","InstanceBoolean","InstanceObject","musstCreateChild","optionsDeactivateNonRequired","deactivateNonRequired","schemaDeactivateNonRequired","isNotRequired","createChild","refreshInstances","isRequired","schemaRequired","isDependentRequired","deleteChild","splice","getChild","getPropertySchema","sortChildrenByPropertyOrder","propertyOrderA","propertyOrderB","isValidNumberA","isValidNumberB","oldValue","InstanceArray","refreshChildren","createItemInstance","itemsCount","schemaItems","schemaPrefixItems","move","fromIndex","toIndex","addItem","tempEditor","deleteItem","itemIndex","InstanceString","InstanceNumber","InstanceNull","glyphicons","delete","moveUp","moveDown","collapse","drag","bootstrapIcons","fontAwesome3","fontAwesome4","fontAwesome5","fontAwesome6","EditorBoolean","Boolean","EditorBooleanEnumRadio","getRadiosControl","values","titles","radios","radio","radioValue","checked","EditorBooleanEnumSelect","getSelectControl","labelIconClass","EditorBooleanCheckbox","getCheckboxControl","EditorString","String","EditorStringEnumRadio","EditorStringEnumSelect","EditorStringTextarea","getTextareaControl","EditorStringAwesomplete","window","Awesomplete","getInputControl","awesomplete","querySelector","style","display","console","EditorStringInput","getTypes","optionFormat","EditorNumber","EditorNumberEnumRadio","EditorNumberEnumSelect","EditorNumberInput","EditorObject","propertyActivators","schemaOptions","addProperty","enablePropertiesToggle","getObjectControl","enableCollapseToggle","startCollapsed","addPropertyBtn","addPropertyControl","ariaLive","ariaLiveMessage","getAriaLiveMessage","textContent","propertiesContainer","close","showModal","refreshPropertiesSlot","schemaOptionEnablePropertiesToggle","propertiesActivators","firstChild","notRequired","checkboxControl","checkbox","refreshEditors","EditorObjectGrid","lastChild","row","getRow","grid","columns","offset","col","getCol","newRow","EditorObjectNav","activeTabIndex","nav","cols","tabListCol","tabContentCol","tabContent","getTabContent","tabList","getTabList","stacked","variant","active","tab","getTab","hasErrors","grandChild","list","setTabPaneAttributes","EditorArray","getArrayControl","addBtn","isSortable","Sortable","deleteBtn","getDeleteItemBtn","moveUpBtn","getMoveUpItemBtn","moveDownBtn","getMoveDownItemBtn","btnGroup","getBtnGroup","arrayActions","body","getArrayItem","dragBtn","getDragItemBtn","sortable","create","animation","handle","onEnd","evt","oldIndex","newIndex","EditorArrayNav","childTitle","schemaOptionItemTemplate","i0","i1","EditorMultiple","getMultipleControl","EditorNull","getNullControl","EditorStringQuill","Quill","getPlaceholderControl","quill","placeholder","root","quillText","getText","setText","EditorStringJodit","Jodit","jodit","make","events","joditValue","setReadOnly","destruct","EditorStringFlatpickr","flatpickr","setDate","EditorNumberRaty","Raty","raty","click","score","EditorArrayEnumItems","schemaItemsType","isArrayType","isUniqueItems","hasEnum","hasTypes","validTypes","hasValidItemType","getCheckboxesControl","checkboxes","indexOf","UiResolver","customEditors","editors","iconLib","mergeAllOf","hiddenInputAttributes","bindEventListeners","icons","appendHiddenInput","classList","hiddenInput","hiddenControl","attr","arguments","getInstance","errorsList","Theme","useToggleEvents","getEditorContainer","html","document","createElement","getFieldset","getLegend","legend","legendText","getLabel","for","icon","getIcon","labelText","text","visuallyHidden","classes","iconClasses","className","getCard","getCardHeader","getCardBody","getActionsSlot","getArrayActionsSlot","getChildrenSlot","getMessagesSlot","getControlSlot","getPropertiesToggle","toggle","getButton","open","getCollapse","getCollapseToggle","collapsed","transition","transform","getPropertiesSlot","event","getPropertiesAriaLive","getPropertiesActivators","button","getArrayBtnAdd","getAddPropertyButton","deleteItemBtn","moveUpItemBtn","moveDownItemBtn","dragItemBtn","getDescription","actions","descriptionId","messagesId","propertiesToggle","collapseId","collapseToggle","fieldset","card","header","getSwitcher","br","width","describedBy","radioControls","labels","labelTexts","radioControl","formGroup","checkboxControls","invalidFeedbackText","invalidFeedbackIcon","xs","md","offsetMd","link","visuallyVisible","ThemeBootstrap3","btn","labelObj","clear","remove","ThemeBootstrap4","getColumnClass","size","ThemeBootstrap5","controlSlot","RefParser","refs","dereference","collectRefs","refsResolved","every","entries","nextPath","hasRef","ref","isExternalRef","resolvedSchema","load","startsWith","cloneSchema","$ref","uri","response","fetch","ok","Error","json","Create"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vS,MAAM,gBAAiBiiB,EAAKjiB,GAC9BA,CACZ,CACA,GJvCEuiB,OAAAA"} \ No newline at end of file diff --git a/docs/assets/index-CB8zX2Yx.js b/docs/assets/index-CB8zX2Yx.js deleted file mode 100644 index 3ee4d30..0000000 --- a/docs/assets/index-CB8zX2Yx.js +++ /dev/null @@ -1,21 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=s(n);fetch(n.href,r)}})();/** -* @vue/shared v3.5.12 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function sn(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return s=>s in e}const J={},Lt=[],We=()=>{},fa=()=>!1,si=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),nn=t=>t.startsWith("onUpdate:"),ce=Object.assign,rn=(t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)},ma=Object.prototype.hasOwnProperty,U=(t,e)=>ma.call(t,e),D=Array.isArray,St=t=>ns(t)==="[object Map]",Dt=t=>ns(t)==="[object Set]",Bn=t=>ns(t)==="[object Date]",V=t=>typeof t=="function",re=t=>typeof t=="string",ze=t=>typeof t=="symbol",ee=t=>t!==null&&typeof t=="object",br=t=>(ee(t)||V(t))&&V(t.then)&&V(t.catch),vr=Object.prototype.toString,ns=t=>vr.call(t),ga=t=>ns(t).slice(8,-1),Cr=t=>ns(t)==="[object Object]",on=t=>re(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ut=sn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ii=t=>{const e=Object.create(null);return s=>e[s]||(e[s]=t(s))},ya=/-(\w)/g,ot=ii(t=>t.replace(ya,(e,s)=>s?s.toUpperCase():"")),ba=/\B([A-Z])/g,xt=ii(t=>t.replace(ba,"-$1").toLowerCase()),xr=ii(t=>t.charAt(0).toUpperCase()+t.slice(1)),Pi=ii(t=>t?`on${xr(t)}`:""),yt=(t,e)=>!Object.is(t,e),Ks=(t,...e)=>{for(let s=0;s{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:s})},Er=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Hn;const ni=()=>Hn||(Hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function an(t){if(D(t)){const e={};for(let s=0;s{if(s){const i=s.split(Ca);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ln(t){let e="";if(re(t))e=t;else if(D(t))for(let s=0;srs(s,e))}const Ir=t=>!!(t&&t.__v_isRef===!0),Tt=t=>re(t)?t:t==null?"":D(t)||ee(t)&&(t.toString===vr||!V(t.toString))?Ir(t)?Tt(t.value):JSON.stringify(t,Lr,2):String(t),Lr=(t,e)=>Ir(e)?Lr(t,e.value):St(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((s,[i,n],r)=>(s[Ai(i,r)+" =>"]=n,s),{})}:Dt(e)?{[`Set(${e.size})`]:[...e.values()].map(s=>Ai(s))}:ze(e)?Ai(e):ee(e)&&!D(e)&&!Cr(e)?String(e):e,Ai=(t,e="")=>{var s;return ze(t)?`Symbol(${(s=t.description)!=null?s:e})`:t};/** -* @vue/reactivity v3.5.12 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ie;class La{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ie,!e&&Ie&&(this.index=(Ie.scopes||(Ie.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,s;if(this.scopes)for(e=0,s=this.scopes.length;e0)return;if(Wt){let e=Wt;for(Wt=void 0;e;){const s=e.next;e.next=void 0,e.flags&=-9,e=s}}let t;for(;Kt;){let e=Kt;for(Kt=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=s}}if(t)throw t}function Pr(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ar(t){let e,s=t.depsTail,i=s;for(;i;){const n=i.prevDep;i.version===-1?(i===s&&(s=n),un(i),ja(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}t.deps=e,t.depsTail=s}function Fi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Or(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Or(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Yt))return;t.globalVersion=Yt;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Fi(t)){t.flags&=-3;return}const s=Q,i=ke;Q=t,ke=!0;try{Pr(t);const n=t.fn(t._value);(e.version===0||yt(n,t._value))&&(t._value=n,e.version++)}catch(n){throw e.version++,n}finally{Q=s,ke=i,Ar(t),t.flags&=-3}}function un(t,e=!1){const{dep:s,prevSub:i,nextSub:n}=t;if(i&&(i.nextSub=n,t.prevSub=void 0),n&&(n.prevSub=i,t.nextSub=void 0),s.subs===t&&(s.subs=i,!i&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)un(r,!0)}!e&&!--s.sc&&s.map&&s.map.delete(s.key)}function ja(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let ke=!0;const kr=[];function lt(){kr.push(ke),ke=!1}function ct(){const t=kr.pop();ke=t===void 0?!0:t}function Fn(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const s=Q;Q=void 0;try{e()}finally{Q=s}}}let Yt=0;class $a{constructor(e,s){this.sub=e,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class _r{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Q||!ke||Q===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Q)s=this.activeLink=new $a(Q,this),Q.deps?(s.prevDep=Q.depsTail,Q.depsTail.nextDep=s,Q.depsTail=s):Q.deps=Q.depsTail=s,Dr(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const i=s.nextDep;i.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=i),s.prevDep=Q.depsTail,s.nextDep=void 0,Q.depsTail.nextDep=s,Q.depsTail=s,Q.deps===s&&(Q.deps=i)}return s}trigger(e){this.version++,Yt++,this.notify(e)}notify(e){dn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{pn()}}}function Dr(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Dr(i)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const qi=new WeakMap,bt=Symbol(""),Ui=Symbol(""),Qt=Symbol("");function pe(t,e,s){if(ke&&Q){let i=qi.get(t);i||qi.set(t,i=new Map);let n=i.get(s);n||(i.set(s,n=new _r),n.map=i,n.key=s),n.track()}}function Qe(t,e,s,i,n,r){const o=qi.get(t);if(!o){Yt++;return}const a=l=>{l&&l.trigger()};if(dn(),e==="clear")o.forEach(a);else{const l=D(t),c=l&&on(s);if(l&&s==="length"){const d=Number(i);o.forEach((u,f)=>{(f==="length"||f===Qt||!ze(f)&&f>=d)&&a(u)})}else switch((s!==void 0||o.has(void 0))&&a(o.get(s)),c&&a(o.get(Qt)),e){case"add":l?c&&a(o.get("length")):(a(o.get(bt)),St(t)&&a(o.get(Ui)));break;case"delete":l||(a(o.get(bt)),St(t)&&a(o.get(Ui)));break;case"set":St(t)&&a(o.get(bt));break}}pn()}function wt(t){const e=z(t);return e===t?e:(pe(e,"iterate",Qt),_e(t)?e:e.map(ve))}function ri(t){return pe(t=z(t),"iterate",Qt),t}const Pa={__proto__:null,[Symbol.iterator](){return ki(this,Symbol.iterator,ve)},concat(...t){return wt(this).concat(...t.map(e=>D(e)?wt(e):e))},entries(){return ki(this,"entries",t=>(t[1]=ve(t[1]),t))},every(t,e){return Ge(this,"every",t,e,void 0,arguments)},filter(t,e){return Ge(this,"filter",t,e,s=>s.map(ve),arguments)},find(t,e){return Ge(this,"find",t,e,ve,arguments)},findIndex(t,e){return Ge(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ge(this,"findLast",t,e,ve,arguments)},findLastIndex(t,e){return Ge(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ge(this,"forEach",t,e,void 0,arguments)},includes(...t){return _i(this,"includes",t)},indexOf(...t){return _i(this,"indexOf",t)},join(t){return wt(this).join(t)},lastIndexOf(...t){return _i(this,"lastIndexOf",t)},map(t,e){return Ge(this,"map",t,e,void 0,arguments)},pop(){return Bt(this,"pop")},push(...t){return Bt(this,"push",t)},reduce(t,...e){return qn(this,"reduce",t,e)},reduceRight(t,...e){return qn(this,"reduceRight",t,e)},shift(){return Bt(this,"shift")},some(t,e){return Ge(this,"some",t,e,void 0,arguments)},splice(...t){return Bt(this,"splice",t)},toReversed(){return wt(this).toReversed()},toSorted(t){return wt(this).toSorted(t)},toSpliced(...t){return wt(this).toSpliced(...t)},unshift(...t){return Bt(this,"unshift",t)},values(){return ki(this,"values",ve)}};function ki(t,e,s){const i=ri(t),n=i[e]();return i!==t&&!_e(t)&&(n._next=n.next,n.next=()=>{const r=n._next();return r.value&&(r.value=s(r.value)),r}),n}const Aa=Array.prototype;function Ge(t,e,s,i,n,r){const o=ri(t),a=o!==t&&!_e(t),l=o[e];if(l!==Aa[e]){const u=l.apply(t,r);return a?ve(u):u}let c=s;o!==t&&(a?c=function(u,f){return s.call(this,ve(u),f,t)}:s.length>2&&(c=function(u,f){return s.call(this,u,f,t)}));const d=l.call(o,c,i);return a&&n?n(d):d}function qn(t,e,s,i){const n=ri(t);let r=s;return n!==t&&(_e(t)?s.length>3&&(r=function(o,a,l){return s.call(this,o,a,l,t)}):r=function(o,a,l){return s.call(this,o,ve(a),l,t)}),n[e](r,...i)}function _i(t,e,s){const i=z(t);pe(i,"iterate",Qt);const n=i[e](...s);return(n===-1||n===!1)&&gn(s[0])?(s[0]=z(s[0]),i[e](...s)):n}function Bt(t,e,s=[]){lt(),dn();const i=z(t)[e].apply(t,s);return pn(),ct(),i}const Oa=sn("__proto__,__v_isRef,__isVue"),Mr=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ze));function ka(t){ze(t)||(t=String(t));const e=z(this);return pe(e,"has",t),e.hasOwnProperty(t)}class Rr{constructor(e=!1,s=!1){this._isReadonly=e,this._isShallow=s}get(e,s,i){const n=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!n;if(s==="__v_isReadonly")return n;if(s==="__v_isShallow")return r;if(s==="__v_raw")return i===(n?r?qa:Hr:r?Br:Vr).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=D(e);if(!n){let l;if(o&&(l=Pa[s]))return l;if(s==="hasOwnProperty")return ka}const a=Reflect.get(e,s,ye(e)?e:i);return(ze(s)?Mr.has(s):Oa(s))||(n||pe(e,"get",s),r)?a:ye(a)?o&&on(s)?a:a.value:ee(a)?n?Fr(a):fn(a):a}}class Nr extends Rr{constructor(e=!1){super(!1,e)}set(e,s,i,n){let r=e[s];if(!this._isShallow){const l=Ot(r);if(!_e(i)&&!Ot(i)&&(r=z(r),i=z(i)),!D(e)&&ye(r)&&!ye(i))return l?!1:(r.value=i,!0)}const o=D(e)&&on(s)?Number(s)t,Hs=t=>Reflect.getPrototypeOf(t);function Na(t,e,s){return function(...i){const n=this.__v_raw,r=z(n),o=St(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=n[t](...i),d=s?Ki:e?Wi:ve;return!e&&pe(r,"iterate",l?Ui:bt),{next(){const{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:a?[d(u[0]),d(u[1])]:d(u),done:f}},[Symbol.iterator](){return this}}}}function Fs(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Va(t,e){const s={get(n){const r=this.__v_raw,o=z(r),a=z(n);t||(yt(n,a)&&pe(o,"get",n),pe(o,"get",a));const{has:l}=Hs(o),c=e?Ki:t?Wi:ve;if(l.call(o,n))return c(r.get(n));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(n)},get size(){const n=this.__v_raw;return!t&&pe(z(n),"iterate",bt),Reflect.get(n,"size",n)},has(n){const r=this.__v_raw,o=z(r),a=z(n);return t||(yt(n,a)&&pe(o,"has",n),pe(o,"has",a)),n===a?r.has(n):r.has(n)||r.has(a)},forEach(n,r){const o=this,a=o.__v_raw,l=z(a),c=e?Ki:t?Wi:ve;return!t&&pe(l,"iterate",bt),a.forEach((d,u)=>n.call(r,c(d),c(u),o))}};return ce(s,t?{add:Fs("add"),set:Fs("set"),delete:Fs("delete"),clear:Fs("clear")}:{add(n){!e&&!_e(n)&&!Ot(n)&&(n=z(n));const r=z(this);return Hs(r).has.call(r,n)||(r.add(n),Qe(r,"add",n,n)),this},set(n,r){!e&&!_e(r)&&!Ot(r)&&(r=z(r));const o=z(this),{has:a,get:l}=Hs(o);let c=a.call(o,n);c||(n=z(n),c=a.call(o,n));const d=l.call(o,n);return o.set(n,r),c?yt(r,d)&&Qe(o,"set",n,r):Qe(o,"add",n,r),this},delete(n){const r=z(this),{has:o,get:a}=Hs(r);let l=o.call(r,n);l||(n=z(n),l=o.call(r,n)),a&&a.call(r,n);const c=r.delete(n);return l&&Qe(r,"delete",n,void 0),c},clear(){const n=z(this),r=n.size!==0,o=n.clear();return r&&Qe(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=Na(n,t,e)}),s}function hn(t,e){const s=Va(t,e);return(i,n,r)=>n==="__v_isReactive"?!t:n==="__v_isReadonly"?t:n==="__v_raw"?i:Reflect.get(U(s,n)&&n in i?s:i,n,r)}const Ba={get:hn(!1,!1)},Ha={get:hn(!1,!0)},Fa={get:hn(!0,!1)};const Vr=new WeakMap,Br=new WeakMap,Hr=new WeakMap,qa=new WeakMap;function Ua(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ka(t){return t.__v_skip||!Object.isExtensible(t)?0:Ua(ga(t))}function fn(t){return Ot(t)?t:mn(t,!1,Da,Ba,Vr)}function Wa(t){return mn(t,!1,Ra,Ha,Br)}function Fr(t){return mn(t,!0,Ma,Fa,Hr)}function mn(t,e,s,i,n){if(!ee(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=n.get(t);if(r)return r;const o=Ka(t);if(o===0)return t;const a=new Proxy(t,o===2?i:s);return n.set(t,a),a}function jt(t){return Ot(t)?jt(t.__v_raw):!!(t&&t.__v_isReactive)}function Ot(t){return!!(t&&t.__v_isReadonly)}function _e(t){return!!(t&&t.__v_isShallow)}function gn(t){return t?!!t.__v_raw:!1}function z(t){const e=t&&t.__v_raw;return e?z(e):t}function za(t){return!U(t,"__v_skip")&&Object.isExtensible(t)&&wr(t,"__v_skip",!0),t}const ve=t=>ee(t)?fn(t):t,Wi=t=>ee(t)?Fr(t):t;function ye(t){return t?t.__v_isRef===!0:!1}function Ja(t){return ye(t)?t.value:t}const Ga={get:(t,e,s)=>e==="__v_raw"?t:Ja(Reflect.get(t,e,s)),set:(t,e,s,i)=>{const n=t[e];return ye(n)&&!ye(s)?(n.value=s,!0):Reflect.set(t,e,s,i)}};function qr(t){return jt(t)?t:new Proxy(t,Ga)}class Ya{constructor(e,s,i){this.fn=e,this.setter=s,this._value=void 0,this.dep=new _r(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Q!==this)return $r(this,!0),!0}get value(){const e=this.dep.track();return Or(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Qa(t,e,s=!1){let i,n;return V(t)?i=t:(i=t.get,n=t.set),new Ya(i,n,s)}const qs={},Gs=new WeakMap;let gt;function Za(t,e=!1,s=gt){if(s){let i=Gs.get(s);i||Gs.set(s,i=[]),i.push(t)}}function Xa(t,e,s=J){const{immediate:i,deep:n,once:r,scheduler:o,augmentJob:a,call:l}=s,c=O=>n?O:_e(O)||n===!1||n===0?Ze(O,1):Ze(O);let d,u,f,b,S=!1,$=!1;if(ye(t)?(u=()=>t.value,S=_e(t)):jt(t)?(u=()=>c(t),S=!0):D(t)?($=!0,S=t.some(O=>jt(O)||_e(O)),u=()=>t.map(O=>{if(ye(O))return O.value;if(jt(O))return c(O);if(V(O))return l?l(O,2):O()})):V(t)?e?u=l?()=>l(t,2):t:u=()=>{if(f){lt();try{f()}finally{ct()}}const O=gt;gt=d;try{return l?l(t,3,[b]):t(b)}finally{gt=O}}:u=We,e&&n){const O=u,X=n===!0?1/0:n;u=()=>Ze(O(),X)}const k=Sa(),j=()=>{d.stop(),k&&rn(k.effects,d)};if(r&&e){const O=e;e=(...X)=>{O(...X),j()}}let M=$?new Array(t.length).fill(qs):qs;const N=O=>{if(!(!(d.flags&1)||!d.dirty&&!O))if(e){const X=d.run();if(n||S||($?X.some((be,Ne)=>yt(be,M[Ne])):yt(X,M))){f&&f();const be=gt;gt=d;try{const Ne=[X,M===qs?void 0:$&&M[0]===qs?[]:M,b];l?l(e,3,Ne):e(...Ne),M=X}finally{gt=be}}}else d.run()};return a&&a(N),d=new Sr(u),d.scheduler=o?()=>o(N,!1):N,b=O=>Za(O,!1,d),f=d.onStop=()=>{const O=Gs.get(d);if(O){if(l)l(O,4);else for(const X of O)X();Gs.delete(d)}},e?i?N(!0):M=d.run():o?o(N.bind(null,!0),!0):d.run(),j.pause=d.pause.bind(d),j.resume=d.resume.bind(d),j.stop=j,j}function Ze(t,e=1/0,s){if(e<=0||!ee(t)||t.__v_skip||(s=s||new Set,s.has(t)))return t;if(s.add(t),e--,ye(t))Ze(t.value,e,s);else if(D(t))for(let i=0;i{Ze(i,e,s)});else if(Cr(t)){for(const i in t)Ze(t[i],e,s);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Ze(t[i],e,s)}return t}/** -* @vue/runtime-core v3.5.12 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function os(t,e,s,i){try{return i?t(...i):t()}catch(n){oi(n,e,s)}}function Je(t,e,s,i){if(V(t)){const n=os(t,e,s,i);return n&&br(n)&&n.catch(r=>{oi(r,e,s)}),n}if(D(t)){const n=[];for(let r=0;r>>1,n=me[i],r=Zt(n);r=Zt(s)?me.push(t):me.splice(tl(e),0,t),t.flags|=1,Wr()}}function Wr(){Ys||(Ys=Ur.then(Jr))}function sl(t){D(t)?$t.push(...t):it&&t.id===-1?it.splice(It+1,0,t):t.flags&1||($t.push(t),t.flags|=1),Wr()}function Un(t,e,s=qe+1){for(;sZt(s)-Zt(i));if($t.length=0,it){it.push(...e);return}for(it=e,It=0;Itt.id==null?t.flags&2?-1:1/0:t.id;function Jr(t){try{for(qe=0;qe{i._d&&Zn(-1);const r=Qs(e);let o;try{o=t(...n)}finally{Qs(r),i._d&&Zn(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function He(t,e){if($e===null)return t;const s=di($e),i=t.dirs||(t.dirs=[]);for(let n=0;nt.__isTeleport;function bn(t,e){t.shapeFlag&6&&t.component?(t.transition=e,bn(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Yr(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function zi(t,e,s,i,n=!1){if(D(t)){t.forEach((S,$)=>zi(S,e&&(D(e)?e[$]:e),s,i,n));return}if(zt(i)&&!n)return;const r=i.shapeFlag&4?di(i.component):i.el,o=n?null:r,{i:a,r:l}=t,c=e&&e.r,d=a.refs===J?a.refs={}:a.refs,u=a.setupState,f=z(u),b=u===J?()=>!1:S=>U(f,S);if(c!=null&&c!==l&&(re(c)?(d[c]=null,b(c)&&(u[c]=null)):ye(c)&&(c.value=null)),V(l))os(l,a,12,[o,d]);else{const S=re(l),$=ye(l);if(S||$){const k=()=>{if(t.f){const j=S?b(l)?u[l]:d[l]:l.value;n?D(j)&&rn(j,r):D(j)?j.includes(r)||j.push(r):S?(d[l]=[r],b(l)&&(u[l]=d[l])):(l.value=[r],t.k&&(d[t.k]=l.value))}else S?(d[l]=o,b(l)&&(u[l]=o)):$&&(l.value=o,t.k&&(d[t.k]=o))};o?(k.id=-1,Te(k,s)):k()}}}ni().requestIdleCallback;ni().cancelIdleCallback;const zt=t=>!!t.type.__asyncLoader,Qr=t=>t.type.__isKeepAlive;function ol(t,e){Zr(t,"a",e)}function al(t,e){Zr(t,"da",e)}function Zr(t,e,s=ge){const i=t.__wdc||(t.__wdc=()=>{let n=s;for(;n;){if(n.isDeactivated)return;n=n.parent}return t()});if(ai(e,i,s),s){let n=s.parent;for(;n&&n.parent;)Qr(n.parent.vnode)&&ll(i,e,s,n),n=n.parent}}function ll(t,e,s,i){const n=ai(e,t,i,!0);Xr(()=>{rn(i[e],n)},s)}function ai(t,e,s=ge,i=!1){if(s){const n=s[t]||(s[t]=[]),r=e.__weh||(e.__weh=(...o)=>{lt();const a=as(s),l=Je(e,s,t,o);return a(),ct(),l});return i?n.unshift(r):n.push(r),r}}const Xe=t=>(e,s=ge)=>{(!ts||t==="sp")&&ai(t,(...i)=>e(...i),s)},cl=Xe("bm"),dl=Xe("m"),pl=Xe("bu"),ul=Xe("u"),hl=Xe("bum"),Xr=Xe("um"),fl=Xe("sp"),ml=Xe("rtg"),gl=Xe("rtc");function yl(t,e=ge){ai("ec",t,e)}const bl=Symbol.for("v-ndc");function Ht(t,e,s,i){let n;const r=s,o=D(t);if(o||re(t)){const a=o&&jt(t);let l=!1;a&&(l=!_e(t),t=ri(t)),n=new Array(t.length);for(let c=0,d=t.length;ce(a,l,void 0,r));else{const a=Object.keys(t);n=new Array(a.length);for(let l=0,c=a.length;lt?Co(t)?di(t):Ji(t.parent):null,Jt=ce(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ji(t.parent),$root:t=>Ji(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>vn(t),$forceUpdate:t=>t.f||(t.f=()=>{yn(t.update)}),$nextTick:t=>t.n||(t.n=Kr.bind(t.proxy)),$watch:t=>Bl.bind(t)}),Di=(t,e)=>t!==J&&!t.__isScriptSetup&&U(t,e),vl={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:s,setupState:i,data:n,props:r,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const b=o[e];if(b!==void 0)switch(b){case 1:return i[e];case 2:return n[e];case 4:return s[e];case 3:return r[e]}else{if(Di(i,e))return o[e]=1,i[e];if(n!==J&&U(n,e))return o[e]=2,n[e];if((c=t.propsOptions[0])&&U(c,e))return o[e]=3,r[e];if(s!==J&&U(s,e))return o[e]=4,s[e];Gi&&(o[e]=0)}}const d=Jt[e];let u,f;if(d)return e==="$attrs"&&pe(t.attrs,"get",""),d(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(s!==J&&U(s,e))return o[e]=4,s[e];if(f=l.config.globalProperties,U(f,e))return f[e]},set({_:t},e,s){const{data:i,setupState:n,ctx:r}=t;return Di(n,e)?(n[e]=s,!0):i!==J&&U(i,e)?(i[e]=s,!0):U(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=s,!0)},has({_:{data:t,setupState:e,accessCache:s,ctx:i,appContext:n,propsOptions:r}},o){let a;return!!s[o]||t!==J&&U(t,o)||Di(e,o)||(a=r[0])&&U(a,o)||U(i,o)||U(Jt,o)||U(n.config.globalProperties,o)},defineProperty(t,e,s){return s.get!=null?t._.accessCache[e]=0:U(s,"value")&&this.set(t,e,s.value,null),Reflect.defineProperty(t,e,s)}};function Kn(t){return D(t)?t.reduce((e,s)=>(e[s]=null,e),{}):t}let Gi=!0;function Cl(t){const e=vn(t),s=t.proxy,i=t.ctx;Gi=!1,e.beforeCreate&&Wn(e.beforeCreate,t,"bc");const{data:n,computed:r,methods:o,watch:a,provide:l,inject:c,created:d,beforeMount:u,mounted:f,beforeUpdate:b,updated:S,activated:$,deactivated:k,beforeDestroy:j,beforeUnmount:M,destroyed:N,unmounted:O,render:X,renderTracked:be,renderTriggered:Ne,errorCaptured:st,serverPrefetch:Ms,expose:pt,inheritAttrs:Mt,components:Rs,directives:Ns,filters:ji}=e;if(c&&xl(c,i,null),o)for(const ie in o){const G=o[ie];V(G)&&(i[ie]=G.bind(s))}if(n){const ie=n.call(s,s);ee(ie)&&(t.data=fn(ie))}if(Gi=!0,r)for(const ie in r){const G=r[ie],ut=V(G)?G.bind(s,s):V(G.get)?G.get.bind(s,s):We,Vs=!V(G)&&V(G.set)?G.set.bind(s):We,ht=lc({get:ut,set:Vs});Object.defineProperty(i,ie,{enumerable:!0,configurable:!0,get:()=>ht.value,set:Ve=>ht.value=Ve})}if(a)for(const ie in a)eo(a[ie],i,s,ie);if(l){const ie=V(l)?l.call(s):l;Reflect.ownKeys(ie).forEach(G=>{Sl(G,ie[G])})}d&&Wn(d,t,"c");function he(ie,G){D(G)?G.forEach(ut=>ie(ut.bind(s))):G&&ie(G.bind(s))}if(he(cl,u),he(dl,f),he(pl,b),he(ul,S),he(ol,$),he(al,k),he(yl,st),he(gl,be),he(ml,Ne),he(hl,M),he(Xr,O),he(fl,Ms),D(pt))if(pt.length){const ie=t.exposed||(t.exposed={});pt.forEach(G=>{Object.defineProperty(ie,G,{get:()=>s[G],set:ut=>s[G]=ut})})}else t.exposed||(t.exposed={});X&&t.render===We&&(t.render=X),Mt!=null&&(t.inheritAttrs=Mt),Rs&&(t.components=Rs),Ns&&(t.directives=Ns),Ms&&Yr(t)}function xl(t,e,s=We){D(t)&&(t=Yi(t));for(const i in t){const n=t[i];let r;ee(n)?"default"in n?r=Ws(n.from||i,n.default,!0):r=Ws(n.from||i):r=Ws(n),ye(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function Wn(t,e,s){Je(D(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,s)}function eo(t,e,s,i){let n=i.includes(".")?mo(s,i):()=>s[i];if(re(t)){const r=e[t];V(r)&&Ri(n,r)}else if(V(t))Ri(n,t.bind(s));else if(ee(t))if(D(t))t.forEach(r=>eo(r,e,s,i));else{const r=V(t.handler)?t.handler.bind(s):e[t.handler];V(r)&&Ri(n,r,t)}}function vn(t){const e=t.type,{mixins:s,extends:i}=e,{mixins:n,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,a=r.get(e);let l;return a?l=a:!n.length&&!s&&!i?l=e:(l={},n.length&&n.forEach(c=>Zs(l,c,o,!0)),Zs(l,e,o)),ee(e)&&r.set(e,l),l}function Zs(t,e,s,i=!1){const{mixins:n,extends:r}=e;r&&Zs(t,r,s,!0),n&&n.forEach(o=>Zs(t,o,s,!0));for(const o in e)if(!(i&&o==="expose")){const a=wl[o]||s&&s[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const wl={data:zn,props:Jn,emits:Jn,methods:qt,computed:qt,beforeCreate:fe,created:fe,beforeMount:fe,mounted:fe,beforeUpdate:fe,updated:fe,beforeDestroy:fe,beforeUnmount:fe,destroyed:fe,unmounted:fe,activated:fe,deactivated:fe,errorCaptured:fe,serverPrefetch:fe,components:qt,directives:qt,watch:Tl,provide:zn,inject:El};function zn(t,e){return e?t?function(){return ce(V(t)?t.call(this,this):t,V(e)?e.call(this,this):e)}:e:t}function El(t,e){return qt(Yi(t),Yi(e))}function Yi(t){if(D(t)){const e={};for(let s=0;s1)return s&&V(e)?e.call(i&&i.proxy):e}}const so={},io=()=>Object.create(so),no=t=>Object.getPrototypeOf(t)===so;function jl(t,e,s,i=!1){const n={},r=io();t.propsDefaults=Object.create(null),ro(t,e,n,r);for(const o in t.propsOptions[0])o in n||(n[o]=void 0);s?t.props=i?n:Wa(n):t.type.props?t.props=n:t.props=r,t.attrs=r}function $l(t,e,s,i){const{props:n,attrs:r,vnode:{patchFlag:o}}=t,a=z(n),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const d=t.vnode.dynamicProps;for(let u=0;u{l=!0;const[f,b]=oo(u,e,!0);ce(o,f),b&&a.push(...b)};!s&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}if(!r&&!l)return ee(t)&&i.set(t,Lt),Lt;if(D(r))for(let d=0;dt[0]==="_"||t==="$stable",Cn=t=>D(t)?t.map(Ue):[Ue(t)],Al=(t,e,s)=>{if(e._n)return e;const i=il((...n)=>Cn(e(...n)),s);return i._c=!1,i},lo=(t,e,s)=>{const i=t._ctx;for(const n in t){if(ao(n))continue;const r=t[n];if(V(r))e[n]=Al(n,r,i);else if(r!=null){const o=Cn(r);e[n]=()=>o}}},co=(t,e)=>{const s=Cn(e);t.slots.default=()=>s},po=(t,e,s)=>{for(const i in e)(s||i!=="_")&&(t[i]=e[i])},Ol=(t,e,s)=>{const i=t.slots=io();if(t.vnode.shapeFlag&32){const n=e._;n?(po(i,e,s),s&&wr(i,"_",n,!0)):lo(e,i)}else e&&co(t,e)},kl=(t,e,s)=>{const{vnode:i,slots:n}=t;let r=!0,o=J;if(i.shapeFlag&32){const a=e._;a?s&&a===1?r=!1:po(n,e,s):(r=!e.$stable,lo(e,n)),o=e}else e&&(co(t,e),o={default:1});if(r)for(const a in n)!ao(a)&&o[a]==null&&delete n[a]},Te=zl;function _l(t){return Dl(t)}function Dl(t,e){const s=ni();s.__VUE__=!0;const{insert:i,remove:n,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:d,parentNode:u,nextSibling:f,setScopeId:b=We,insertStaticContent:S}=t,$=(p,h,g,C=null,y=null,v=null,I=void 0,T=null,E=!!h.dynamicChildren)=>{if(p===h)return;p&&!Ft(p,h)&&(C=Bs(p),Ve(p,y,v,!0),p=null),h.patchFlag===-2&&(E=!1,h.dynamicChildren=null);const{type:x,ref:_,shapeFlag:L}=h;switch(x){case ci:k(p,h,g,C);break;case Xt:j(p,h,g,C);break;case Vi:p==null&&M(h,g,C,I);break;case Ce:Rs(p,h,g,C,y,v,I,T,E);break;default:L&1?X(p,h,g,C,y,v,I,T,E):L&6?Ns(p,h,g,C,y,v,I,T,E):(L&64||L&128)&&x.process(p,h,g,C,y,v,I,T,E,Nt)}_!=null&&y&&zi(_,p&&p.ref,v,h||p,!h)},k=(p,h,g,C)=>{if(p==null)i(h.el=a(h.children),g,C);else{const y=h.el=p.el;h.children!==p.children&&c(y,h.children)}},j=(p,h,g,C)=>{p==null?i(h.el=l(h.children||""),g,C):h.el=p.el},M=(p,h,g,C)=>{[p.el,p.anchor]=S(p.children,h,g,C,p.el,p.anchor)},N=({el:p,anchor:h},g,C)=>{let y;for(;p&&p!==h;)y=f(p),i(p,g,C),p=y;i(h,g,C)},O=({el:p,anchor:h})=>{let g;for(;p&&p!==h;)g=f(p),n(p),p=g;n(h)},X=(p,h,g,C,y,v,I,T,E)=>{h.type==="svg"?I="svg":h.type==="math"&&(I="mathml"),p==null?be(h,g,C,y,v,I,T,E):Ms(p,h,y,v,I,T,E)},be=(p,h,g,C,y,v,I,T)=>{let E,x;const{props:_,shapeFlag:L,transition:A,dirs:R}=p;if(E=p.el=o(p.type,v,_&&_.is,_),L&8?d(E,p.children):L&16&&st(p.children,E,null,C,y,Mi(p,v),I,T),R&&ft(p,null,C,"created"),Ne(E,p,p.scopeId,I,C),_){for(const Y in _)Y!=="value"&&!Ut(Y)&&r(E,Y,null,_[Y],v,C);"value"in _&&r(E,"value",null,_.value,v),(x=_.onVnodeBeforeMount)&&Fe(x,C,p)}R&&ft(p,null,C,"beforeMount");const H=Ml(y,A);H&&A.beforeEnter(E),i(E,h,g),((x=_&&_.onVnodeMounted)||H||R)&&Te(()=>{x&&Fe(x,C,p),H&&A.enter(E),R&&ft(p,null,C,"mounted")},y)},Ne=(p,h,g,C,y)=>{if(g&&b(p,g),C)for(let v=0;v{for(let x=E;x{const T=h.el=p.el;let{patchFlag:E,dynamicChildren:x,dirs:_}=h;E|=p.patchFlag&16;const L=p.props||J,A=h.props||J;let R;if(g&&mt(g,!1),(R=A.onVnodeBeforeUpdate)&&Fe(R,g,h,p),_&&ft(h,p,g,"beforeUpdate"),g&&mt(g,!0),(L.innerHTML&&A.innerHTML==null||L.textContent&&A.textContent==null)&&d(T,""),x?pt(p.dynamicChildren,x,T,g,C,Mi(h,y),v):I||G(p,h,T,null,g,C,Mi(h,y),v,!1),E>0){if(E&16)Mt(T,L,A,g,y);else if(E&2&&L.class!==A.class&&r(T,"class",null,A.class,y),E&4&&r(T,"style",L.style,A.style,y),E&8){const H=h.dynamicProps;for(let Y=0;Y{R&&Fe(R,g,h,p),_&&ft(h,p,g,"updated")},C)},pt=(p,h,g,C,y,v,I)=>{for(let T=0;T{if(h!==g){if(h!==J)for(const v in h)!Ut(v)&&!(v in g)&&r(p,v,h[v],null,y,C);for(const v in g){if(Ut(v))continue;const I=g[v],T=h[v];I!==T&&v!=="value"&&r(p,v,T,I,y,C)}"value"in g&&r(p,"value",h.value,g.value,y)}},Rs=(p,h,g,C,y,v,I,T,E)=>{const x=h.el=p?p.el:a(""),_=h.anchor=p?p.anchor:a("");let{patchFlag:L,dynamicChildren:A,slotScopeIds:R}=h;R&&(T=T?T.concat(R):R),p==null?(i(x,g,C),i(_,g,C),st(h.children||[],g,_,y,v,I,T,E)):L>0&&L&64&&A&&p.dynamicChildren?(pt(p.dynamicChildren,A,g,y,v,I,T),(h.key!=null||y&&h===y.subTree)&&uo(p,h,!0)):G(p,h,g,_,y,v,I,T,E)},Ns=(p,h,g,C,y,v,I,T,E)=>{h.slotScopeIds=T,p==null?h.shapeFlag&512?y.ctx.activate(h,g,C,I,E):ji(h,g,C,y,v,I,E):kn(p,h,E)},ji=(p,h,g,C,y,v,I)=>{const T=p.component=sc(p,C,y);if(Qr(p)&&(T.ctx.renderer=Nt),ic(T,!1,I),T.asyncDep){if(y&&y.registerDep(T,he,I),!p.el){const E=T.subTree=vt(Xt);j(null,E,h,g)}}else he(T,p,h,g,y,v,I)},kn=(p,h,g)=>{const C=h.component=p.component;if(Kl(p,h,g))if(C.asyncDep&&!C.asyncResolved){ie(C,h,g);return}else C.next=h,C.update();else h.el=p.el,C.vnode=h},he=(p,h,g,C,y,v,I)=>{const T=()=>{if(p.isMounted){let{next:L,bu:A,u:R,parent:H,vnode:Y}=p;{const we=ho(p);if(we){L&&(L.el=Y.el,ie(p,L,I)),we.asyncDep.then(()=>{p.isUnmounted||T()});return}}let K=L,xe;mt(p,!1),L?(L.el=Y.el,ie(p,L,I)):L=Y,A&&Ks(A),(xe=L.props&&L.props.onVnodeBeforeUpdate)&&Fe(xe,H,L,Y),mt(p,!0);const de=Ni(p),Pe=p.subTree;p.subTree=de,$(Pe,de,u(Pe.el),Bs(Pe),p,y,v),L.el=de.el,K===null&&Wl(p,de.el),R&&Te(R,y),(xe=L.props&&L.props.onVnodeUpdated)&&Te(()=>Fe(xe,H,L,Y),y)}else{let L;const{el:A,props:R}=h,{bm:H,m:Y,parent:K,root:xe,type:de}=p,Pe=zt(h);if(mt(p,!1),H&&Ks(H),!Pe&&(L=R&&R.onVnodeBeforeMount)&&Fe(L,K,h),mt(p,!0),A&&Rn){const we=()=>{p.subTree=Ni(p),Rn(A,p.subTree,p,y,null)};Pe&&de.__asyncHydrate?de.__asyncHydrate(A,p,we):we()}else{xe.ce&&xe.ce._injectChildStyle(de);const we=p.subTree=Ni(p);$(null,we,g,C,p,y,v),h.el=we.el}if(Y&&Te(Y,y),!Pe&&(L=R&&R.onVnodeMounted)){const we=h;Te(()=>Fe(L,K,we),y)}(h.shapeFlag&256||K&&zt(K.vnode)&&K.vnode.shapeFlag&256)&&p.a&&Te(p.a,y),p.isMounted=!0,h=g=C=null}};p.scope.on();const E=p.effect=new Sr(T);p.scope.off();const x=p.update=E.run.bind(E),_=p.job=E.runIfDirty.bind(E);_.i=p,_.id=p.uid,E.scheduler=()=>yn(_),mt(p,!0),x()},ie=(p,h,g)=>{h.component=p;const C=p.vnode.props;p.vnode=h,p.next=null,$l(p,h.props,C,g),kl(p,h.children,g),lt(),Un(p),ct()},G=(p,h,g,C,y,v,I,T,E=!1)=>{const x=p&&p.children,_=p?p.shapeFlag:0,L=h.children,{patchFlag:A,shapeFlag:R}=h;if(A>0){if(A&128){Vs(x,L,g,C,y,v,I,T,E);return}else if(A&256){ut(x,L,g,C,y,v,I,T,E);return}}R&8?(_&16&&Rt(x,y,v),L!==x&&d(g,L)):_&16?R&16?Vs(x,L,g,C,y,v,I,T,E):Rt(x,y,v,!0):(_&8&&d(g,""),R&16&&st(L,g,C,y,v,I,T,E))},ut=(p,h,g,C,y,v,I,T,E)=>{p=p||Lt,h=h||Lt;const x=p.length,_=h.length,L=Math.min(x,_);let A;for(A=0;A_?Rt(p,y,v,!0,!1,L):st(h,g,C,y,v,I,T,E,L)},Vs=(p,h,g,C,y,v,I,T,E)=>{let x=0;const _=h.length;let L=p.length-1,A=_-1;for(;x<=L&&x<=A;){const R=p[x],H=h[x]=E?nt(h[x]):Ue(h[x]);if(Ft(R,H))$(R,H,g,null,y,v,I,T,E);else break;x++}for(;x<=L&&x<=A;){const R=p[L],H=h[A]=E?nt(h[A]):Ue(h[A]);if(Ft(R,H))$(R,H,g,null,y,v,I,T,E);else break;L--,A--}if(x>L){if(x<=A){const R=A+1,H=R<_?h[R].el:C;for(;x<=A;)$(null,h[x]=E?nt(h[x]):Ue(h[x]),g,H,y,v,I,T,E),x++}}else if(x>A)for(;x<=L;)Ve(p[x],y,v,!0),x++;else{const R=x,H=x,Y=new Map;for(x=H;x<=A;x++){const Ee=h[x]=E?nt(h[x]):Ue(h[x]);Ee.key!=null&&Y.set(Ee.key,x)}let K,xe=0;const de=A-H+1;let Pe=!1,we=0;const Vt=new Array(de);for(x=0;x=de){Ve(Ee,y,v,!0);continue}let Be;if(Ee.key!=null)Be=Y.get(Ee.key);else for(K=H;K<=A;K++)if(Vt[K-H]===0&&Ft(Ee,h[K])){Be=K;break}Be===void 0?Ve(Ee,y,v,!0):(Vt[Be-H]=x+1,Be>=we?we=Be:Pe=!0,$(Ee,h[Be],g,null,y,v,I,T,E),xe++)}const Nn=Pe?Rl(Vt):Lt;for(K=Nn.length-1,x=de-1;x>=0;x--){const Ee=H+x,Be=h[Ee],Vn=Ee+1<_?h[Ee+1].el:C;Vt[x]===0?$(null,Be,g,Vn,y,v,I,T,E):Pe&&(K<0||x!==Nn[K]?ht(Be,g,Vn,2):K--)}}},ht=(p,h,g,C,y=null)=>{const{el:v,type:I,transition:T,children:E,shapeFlag:x}=p;if(x&6){ht(p.component.subTree,h,g,C);return}if(x&128){p.suspense.move(h,g,C);return}if(x&64){I.move(p,h,g,Nt);return}if(I===Ce){i(v,h,g);for(let L=0;LT.enter(v),y);else{const{leave:L,delayLeave:A,afterLeave:R}=T,H=()=>i(v,h,g),Y=()=>{L(v,()=>{H(),R&&R()})};A?A(v,H,Y):Y()}else i(v,h,g)},Ve=(p,h,g,C=!1,y=!1)=>{const{type:v,props:I,ref:T,children:E,dynamicChildren:x,shapeFlag:_,patchFlag:L,dirs:A,cacheIndex:R}=p;if(L===-2&&(y=!1),T!=null&&zi(T,null,g,p,!0),R!=null&&(h.renderCache[R]=void 0),_&256){h.ctx.deactivate(p);return}const H=_&1&&A,Y=!zt(p);let K;if(Y&&(K=I&&I.onVnodeBeforeUnmount)&&Fe(K,h,p),_&6)ha(p.component,g,C);else{if(_&128){p.suspense.unmount(g,C);return}H&&ft(p,null,h,"beforeUnmount"),_&64?p.type.remove(p,h,g,Nt,C):x&&!x.hasOnce&&(v!==Ce||L>0&&L&64)?Rt(x,h,g,!1,!0):(v===Ce&&L&384||!y&&_&16)&&Rt(E,h,g),C&&_n(p)}(Y&&(K=I&&I.onVnodeUnmounted)||H)&&Te(()=>{K&&Fe(K,h,p),H&&ft(p,null,h,"unmounted")},g)},_n=p=>{const{type:h,el:g,anchor:C,transition:y}=p;if(h===Ce){ua(g,C);return}if(h===Vi){O(p);return}const v=()=>{n(g),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(p.shapeFlag&1&&y&&!y.persisted){const{leave:I,delayLeave:T}=y,E=()=>I(g,v);T?T(p.el,v,E):E()}else v()},ua=(p,h)=>{let g;for(;p!==h;)g=f(p),n(p),p=g;n(h)},ha=(p,h,g)=>{const{bum:C,scope:y,job:v,subTree:I,um:T,m:E,a:x}=p;Yn(E),Yn(x),C&&Ks(C),y.stop(),v&&(v.flags|=8,Ve(I,p,h,g)),T&&Te(T,h),Te(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Rt=(p,h,g,C=!1,y=!1,v=0)=>{for(let I=v;I{if(p.shapeFlag&6)return Bs(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),g=h&&h[nl];return g?f(g):h};let $i=!1;const Dn=(p,h,g)=>{p==null?h._vnode&&Ve(h._vnode,null,null,!0):$(h._vnode||null,p,h,null,null,null,g),h._vnode=p,$i||($i=!0,Un(),zr(),$i=!1)},Nt={p:$,um:Ve,m:ht,r:_n,mt:ji,mc:st,pc:G,pbc:pt,n:Bs,o:t};let Mn,Rn;return{render:Dn,hydrate:Mn,createApp:Ll(Dn,Mn)}}function Mi({type:t,props:e},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:s}function mt({effect:t,job:e},s){s?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function Ml(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function uo(t,e,s=!1){const i=t.children,n=e.children;if(D(i)&&D(n))for(let r=0;r>1,t[s[a]]0&&(e[i]=s[r-1]),s[r]=i)}}for(r=s.length,o=s[r-1];r-- >0;)s[r]=o,o=e[o];return s}function ho(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:ho(e)}function Yn(t){if(t)for(let e=0;eWs(Nl);function Ri(t,e,s){return fo(t,e,s)}function fo(t,e,s=J){const{immediate:i,deep:n,flush:r,once:o}=s,a=ce({},s),l=e&&i||!e&&r!=="post";let c;if(ts){if(r==="sync"){const b=Vl();c=b.__watcherHandles||(b.__watcherHandles=[])}else if(!l){const b=()=>{};return b.stop=We,b.resume=We,b.pause=We,b}}const d=ge;a.call=(b,S,$)=>Je(b,d,S,$);let u=!1;r==="post"?a.scheduler=b=>{Te(b,d&&d.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(b,S)=>{S?b():yn(b)}),a.augmentJob=b=>{e&&(b.flags|=4),u&&(b.flags|=2,d&&(b.id=d.uid,b.i=d))};const f=Xa(t,e,a);return ts&&(c?c.push(f):l&&f()),f}function Bl(t,e,s){const i=this.proxy,n=re(t)?t.includes(".")?mo(i,t):()=>i[t]:t.bind(i,i);let r;V(e)?r=e:(r=e.handler,s=e);const o=as(this),a=fo(n,r.bind(i),s);return o(),a}function mo(t,e){const s=e.split(".");return()=>{let i=t;for(let n=0;ne==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${ot(e)}Modifiers`]||t[`${xt(e)}Modifiers`];function Fl(t,e,...s){if(t.isUnmounted)return;const i=t.vnode.props||J;let n=s;const r=e.startsWith("update:"),o=r&&Hl(i,e.slice(7));o&&(o.trim&&(n=s.map(d=>re(d)?d.trim():d)),o.number&&(n=s.map(Er)));let a,l=i[a=Pi(e)]||i[a=Pi(ot(e))];!l&&r&&(l=i[a=Pi(xt(e))]),l&&Je(l,t,6,n);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Je(c,t,6,n)}}function go(t,e,s=!1){const i=e.emitsCache,n=i.get(t);if(n!==void 0)return n;const r=t.emits;let o={},a=!1;if(!V(t)){const l=c=>{const d=go(c,e,!0);d&&(a=!0,ce(o,d))};!s&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(ee(t)&&i.set(t,null),null):(D(r)?r.forEach(l=>o[l]=null):ce(o,r),ee(t)&&i.set(t,o),o)}function li(t,e){return!t||!si(e)?!1:(e=e.slice(2).replace(/Once$/,""),U(t,e[0].toLowerCase()+e.slice(1))||U(t,xt(e))||U(t,e))}function Ni(t){const{type:e,vnode:s,proxy:i,withProxy:n,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:d,props:u,data:f,setupState:b,ctx:S,inheritAttrs:$}=t,k=Qs(t);let j,M;try{if(s.shapeFlag&4){const O=n||i,X=O;j=Ue(c.call(X,O,d,u,b,f,S)),M=a}else{const O=e;j=Ue(O.length>1?O(u,{attrs:a,slots:o,emit:l}):O(u,null)),M=e.props?a:ql(a)}}catch(O){Gt.length=0,oi(O,t,1),j=vt(Xt)}let N=j;if(M&&$!==!1){const O=Object.keys(M),{shapeFlag:X}=N;O.length&&X&7&&(r&&O.some(nn)&&(M=Ul(M,r)),N=kt(N,M,!1,!0))}return s.dirs&&(N=kt(N,null,!1,!0),N.dirs=N.dirs?N.dirs.concat(s.dirs):s.dirs),s.transition&&bn(N,s.transition),j=N,Qs(k),j}const ql=t=>{let e;for(const s in t)(s==="class"||s==="style"||si(s))&&((e||(e={}))[s]=t[s]);return e},Ul=(t,e)=>{const s={};for(const i in t)(!nn(i)||!(i.slice(9)in e))&&(s[i]=t[i]);return s};function Kl(t,e,s){const{props:i,children:n,component:r}=t,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(s&&l>=0){if(l&1024)return!0;if(l&16)return i?Qn(i,o,c):!!o;if(l&8){const d=e.dynamicProps;for(let u=0;ut.__isSuspense;function zl(t,e){e&&e.pendingBranch?D(t)?e.effects.push(...t):e.effects.push(t):sl(t)}const Ce=Symbol.for("v-fgt"),ci=Symbol.for("v-txt"),Xt=Symbol.for("v-cmt"),Vi=Symbol.for("v-stc"),Gt=[];let Le=null;function Ae(t=!1){Gt.push(Le=t?null:[])}function Jl(){Gt.pop(),Le=Gt[Gt.length-1]||null}let es=1;function Zn(t){es+=t,t<0&&Le&&(Le.hasOnce=!0)}function Gl(t){return t.dynamicChildren=es>0?Le||Lt:null,Jl(),es>0&&Le&&Le.push(t),t}function Oe(t,e,s,i,n,r){return Gl(P(t,e,s,i,n,r,!0))}function bo(t){return t?t.__v_isVNode===!0:!1}function Ft(t,e){return t.type===e.type&&t.key===e.key}const vo=({key:t})=>t??null,zs=({ref:t,ref_key:e,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?re(t)||ye(t)||V(t)?{i:$e,r:t,k:e,f:!!s}:t:null);function P(t,e=null,s=null,i=0,n=null,r=t===Ce?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&vo(e),ref:e&&zs(e),scopeId:Gr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:$e};return a?(xn(l,s),r&128&&t.normalize(l)):s&&(l.shapeFlag|=re(s)?8:16),es>0&&!o&&Le&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&Le.push(l),l}const vt=Yl;function Yl(t,e=null,s=null,i=0,n=null,r=!1){if((!t||t===bl)&&(t=Xt),bo(t)){const a=kt(t,e,!0);return s&&xn(a,s),es>0&&!r&&Le&&(a.shapeFlag&6?Le[Le.indexOf(t)]=a:Le.push(a)),a.patchFlag=-2,a}if(ac(t)&&(t=t.__vccOpts),e){e=Ql(e);let{class:a,style:l}=e;a&&!re(a)&&(e.class=ln(a)),ee(l)&&(gn(l)&&!D(l)&&(l=ce({},l)),e.style=an(l))}const o=re(t)?1:yo(t)?128:rl(t)?64:ee(t)?4:V(t)?2:0;return P(t,e,s,i,n,o,r,!0)}function Ql(t){return t?gn(t)||no(t)?ce({},t):t:null}function kt(t,e,s=!1,i=!1){const{props:n,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?Xl(n||{},e):n,d={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&vo(c),ref:e&&e.ref?s&&r?D(r)?r.concat(zs(e)):[r,zs(e)]:zs(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ce?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&kt(t.ssContent),ssFallback:t.ssFallback&&kt(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&bn(d,l.clone(d)),d}function Zl(t=" ",e=0){return vt(ci,null,t,e)}function Ue(t){return t==null||typeof t=="boolean"?vt(Xt):D(t)?vt(Ce,null,t.slice()):bo(t)?nt(t):vt(ci,null,String(t))}function nt(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:kt(t)}function xn(t,e){let s=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(D(e))s=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),xn(t,n()),n._c&&(n._d=!0));return}else{s=32;const n=e._;!n&&!no(e)?e._ctx=$e:n===3&&$e&&($e.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else V(e)?(e={default:e,_ctx:$e},s=32):(e=String(e),i&64?(s=16,e=[Zl(e)]):s=8);t.children=e,t.shapeFlag|=s}function Xl(...t){const e={};for(let s=0;s{let n;return(n=t[s])||(n=t[s]=[]),n.push(i),r=>{n.length>1?n.forEach(o=>o(r)):n[0](r)}};Xs=e("__VUE_INSTANCE_SETTERS__",s=>ge=s),Zi=e("__VUE_SSR_SETTERS__",s=>ts=s)}const as=t=>{const e=ge;return Xs(t),t.scope.on(),()=>{t.scope.off(),Xs(e)}},Xn=()=>{ge&&ge.scope.off(),Xs(null)};function Co(t){return t.vnode.shapeFlag&4}let ts=!1;function ic(t,e=!1,s=!1){e&&Zi(e);const{props:i,children:n}=t.vnode,r=Co(t);jl(t,i,r,e),Ol(t,n,s);const o=r?nc(t,e):void 0;return e&&Zi(!1),o}function nc(t,e){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,vl);const{setup:i}=s;if(i){lt();const n=t.setupContext=i.length>1?oc(t):null,r=as(t),o=os(i,t,0,[t.props,n]),a=br(o);if(ct(),r(),(a||t.sp)&&!zt(t)&&Yr(t),a){if(o.then(Xn,Xn),e)return o.then(l=>{er(t,l,e)}).catch(l=>{oi(l,t,0)});t.asyncDep=o}else er(t,o,e)}else xo(t,e)}function er(t,e,s){V(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ee(e)&&(t.setupState=qr(e)),xo(t,s)}let tr;function xo(t,e,s){const i=t.type;if(!t.render){if(!e&&tr&&!i.render){const n=i.template||vn(t).template;if(n){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=ce(ce({isCustomElement:r,delimiters:a},o),l);i.render=tr(n,c)}}t.render=i.render||We}{const n=as(t);lt();try{Cl(t)}finally{ct(),n()}}}const rc={get(t,e){return pe(t,"get",""),t[e]}};function oc(t){const e=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,rc),slots:t.slots,emit:t.emit,expose:e}}function di(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(qr(za(t.exposed)),{get(e,s){if(s in e)return e[s];if(s in Jt)return Jt[s](t)},has(e,s){return s in e||s in Jt}})):t.proxy}function ac(t){return V(t)&&"__vccOpts"in t}const lc=(t,e)=>Qa(t,e,ts),cc="3.5.12";/** -* @vue/runtime-dom v3.5.12 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Xi;const sr=typeof window<"u"&&window.trustedTypes;if(sr)try{Xi=sr.createPolicy("vue",{createHTML:t=>t})}catch{}const wo=Xi?t=>Xi.createHTML(t):t=>t,dc="http://www.w3.org/2000/svg",pc="http://www.w3.org/1998/Math/MathML",Ye=typeof document<"u"?document:null,ir=Ye&&Ye.createElement("template"),uc={insert:(t,e,s)=>{e.insertBefore(t,s||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,s,i)=>{const n=e==="svg"?Ye.createElementNS(dc,t):e==="mathml"?Ye.createElementNS(pc,t):s?Ye.createElement(t,{is:s}):Ye.createElement(t);return t==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:t=>Ye.createTextNode(t),createComment:t=>Ye.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ye.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,s,i,n,r){const o=s?s.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),s),!(n===r||!(n=n.nextSibling)););else{ir.innerHTML=wo(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=ir.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,s)}return[o?o.nextSibling:e.firstChild,s?s.previousSibling:e.lastChild]}},hc=Symbol("_vtc");function fc(t,e,s){const i=t[hc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):s?t.setAttribute("class",e):t.className=e}const nr=Symbol("_vod"),mc=Symbol("_vsh"),gc=Symbol(""),yc=/(^|;)\s*display\s*:/;function bc(t,e,s){const i=t.style,n=re(s);let r=!1;if(s&&!n){if(e)if(re(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();s[a]==null&&Js(i,a,"")}else for(const o in e)s[o]==null&&Js(i,o,"");for(const o in s)o==="display"&&(r=!0),Js(i,o,s[o])}else if(n){if(e!==s){const o=i[gc];o&&(s+=";"+o),i.cssText=s,r=yc.test(s)}}else e&&t.removeAttribute("style");nr in t&&(t[nr]=r?i.display:"",t[mc]&&(i.display="none"))}const rr=/\s*!important$/;function Js(t,e,s){if(D(s))s.forEach(i=>Js(t,e,i));else if(s==null&&(s=""),e.startsWith("--"))t.setProperty(e,s);else{const i=vc(t,e);rr.test(s)?t.setProperty(xt(i),s.replace(rr,""),"important"):t[i]=s}}const or=["Webkit","Moz","ms"],Bi={};function vc(t,e){const s=Bi[e];if(s)return s;let i=ot(e);if(i!=="filter"&&i in t)return Bi[e]=i;i=xr(i);for(let n=0;nHi||(Ec.then(()=>Hi=0),Hi=Date.now());function Ic(t,e){const s=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=s.attached)return;Je(Lc(i,s.value),e,5,[i])};return s.value=t,s.attached=Tc(),s}function Lc(t,e){if(D(e)){const s=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{s.call(t),t._stopped=!0},e.map(i=>n=>!n._stopped&&i&&i(n))}else return e}const ur=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Sc=(t,e,s,i,n,r)=>{const o=n==="svg";e==="class"?fc(t,i,o):e==="style"?bc(t,s,i):si(e)?nn(e)||xc(t,e,s,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):jc(t,e,i,o))?(cr(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&lr(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!re(i))?cr(t,ot(e),i,r,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),lr(t,e,i,o))};function jc(t,e,s,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&ur(e)&&V(s));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=t.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return ur(e)&&re(s)?!1:e in t}const ei=t=>{const e=t.props["onUpdate:modelValue"]||!1;return D(e)?s=>Ks(e,s):e},At=Symbol("_assign"),Et={deep:!0,created(t,e,s){t[At]=ei(s),wn(t,"change",()=>{const i=t._modelValue,n=ss(t),r=t.checked,o=t[At];if(D(i)){const a=cn(i,n),l=a!==-1;if(r&&!l)o(i.concat(n));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Dt(i)){const a=new Set(i);r?a.add(n):a.delete(n),o(a)}else o(Eo(t,r))})},mounted:hr,beforeUpdate(t,e,s){t[At]=ei(s),hr(t,e,s)}};function hr(t,{value:e,oldValue:s},i){t._modelValue=e;let n;if(D(e))n=cn(e,i.props.value)>-1;else if(Dt(e))n=e.has(i.props.value);else{if(e===s)return;n=rs(e,Eo(t,!0))}t.checked!==n&&(t.checked=n)}const Us={deep:!0,created(t,{value:e,modifiers:{number:s}},i){const n=Dt(e);wn(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>s?Er(ss(o)):ss(o));t[At](t.multiple?n?new Set(r):r:r[0]),t._assigning=!0,Kr(()=>{t._assigning=!1})}),t[At]=ei(i)},mounted(t,{value:e}){fr(t,e)},beforeUpdate(t,e,s){t[At]=ei(s)},updated(t,{value:e}){t._assigning||fr(t,e)}};function fr(t,e){const s=t.multiple,i=D(e);if(!(s&&!i&&!Dt(e))){for(let n=0,r=t.options.length;nString(c)===String(a)):o.selected=cn(e,a)>-1}else o.selected=e.has(a);else if(rs(ss(o),e)){t.selectedIndex!==n&&(t.selectedIndex=n);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function ss(t){return"_value"in t?t._value:t.value}function Eo(t,e){const s=e?"_trueValue":"_falseValue";return s in t?t[s]:e}const $c=ce({patchProp:Sc},uc);let mr;function Pc(){return mr||(mr=_l($c))}const Ac=(...t)=>{const e=Pc().createApp(...t),{mount:s}=e;return e.mount=i=>{const n=kc(i);if(!n)return;const r=e._component;!V(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=s(n,!1,Oc(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e};function Oc(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function kc(t){return re(t)?document.querySelector(t):t}function To(){const t=[];return function(e,s){if(typeof s!="object"||s===null)return s;for(;t.length>0&&t.at(-1)!==this;)t.pop();return t.includes(s)?"[Circular]":(t.push(s),s)}}function Se(t){if(!(typeof t>"u"))return JSON.parse(JSON.stringify(t,To()))}function Io(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function en(t,e,s){return t.replace(new RegExp(Io(e),"g"),s)}function te(t){return en(en(t,"#","root"),"/","-")}function Me(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ti(t){return Object.keys(t).sort().reduce((e,s)=>(e[s]=t[s],e),{})}function is(t,e){return B(t)&&B(e)&&(t=ti(t),e=ti(e)),JSON.stringify(t)===JSON.stringify(e)}function pi(t,e){return!is(t,e)}function ui(t){return t===null}function m(t){return typeof t<"u"}function De(t){return typeof t>"u"}function oe(t){return typeof t=="number"}function Re(t){return oe(t)&&t===Math.floor(t)}function je(t){return typeof t=="string"}function ue(t){return typeof t=="boolean"}function se(t){return Array.isArray(t)}function B(t){return!ui(t)&&!se(t)&&typeof t=="object"}function Lo(t){let e="any";return oe(t)?e=Re(t)?"integer":"number":je(t)?e="string":ue(t)?e="boolean":se(t)?e="array":ui(t)?e="null":B(t)&&(e="object"),e}function at(t,...e){if(!e.length)return t;const s=e.shift();return B(t)&&B(s)&&Object.keys(s).forEach(i=>{B(s[i])?(t[i]||Object.assign(t,{[i]:{}}),at(t[i],s[i])):Object.assign(t,{[i]:s[i]})}),at(t,...e)}function So(t,e){return Object.keys(e).forEach(function(s){s in t&&typeof t[s]==typeof e[s]&&(t[s]=e[s])}),t}function jo(t,e){const s=e.split(".");let i=t;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const r=parseInt(n);if(r>=0&&r{s=s.replace(/\s/g,"");const i=s.split(/{{|}}/)[1];return jo(e,i)})}function $o(t,e,s){return Math.max(e,Math.min(t,s))}function En(t){const e=[],s=new Set;for(const i of t){const n=JSON.stringify(i);s.has(n)||(s.add(n),e.push(i))}return e}const _c={getCircularReplacer:To,clone:Se,escapeRegExp:Io,replaceAll:en,pathToAttribute:te,hasOwn:Me,sortObject:ti,equal:is,different:pi,isNull:ui,isSet:m,notSet:De,isNumber:oe,isInteger:Re,isString:je,isBoolean:ue,isArray:se,isObject:B,getType:Lo,mergeDeep:at,overwriteExistingProperties:So,getValueByJSONPath:jo,compileTemplate:W,clamp:$o,removeDuplicatesFromArray:En};function Dc(t,e){const s="x-"+e;return t[s]}function Mc(t){return je(t.$schema)?t.$schema:void 0}function hi(t){return B(t.additionalProperties)||ue(t.additionalProperties)?t.additionalProperties:void 0}function Po(t){return B(t.propertyNames)||ue(t.propertyNames)?t.propertyNames:void 0}function fi(t){return se(t.allOf)?t.allOf:void 0}function rt(t){return se(t.anyOf)?t.anyOf:void 0}function mi(t){return t.const}function Ao(t){return B(t.contains)||ue(t.contains)?t.contains:void 0}function Oo(t){return t.default}function Tn(t){return B(t.dependentRequired)?t.dependentRequired:void 0}function ko(t){return B(t.dependentSchemas)?t.dependentSchemas:void 0}function ne(t){return je(t.description)?t.description:void 0}function In(t){return B(t.else)||ue(t.else)?t.else:void 0}function ae(t){if(se(t.enum)&&t.enum.length>0)return t.enum}function _o(t){return oe(t.exclusiveMaximum)?t.exclusiveMaximum:void 0}function Do(t){return oe(t.exclusiveMinimum)?t.exclusiveMinimum:void 0}function Mo(t){return je(t.format)?t.format:void 0}function ls(t){if(B(t.if)||ue(t.if))return t.if}function gi(t){return B(t.items)||ue(t.items)?t.items:void 0}function Ro(t){return oe(t.maximum)?t.maximum:void 0}function No(t){if(Re(t.maxContains)&&t.maxContains>=0)return t.maxContains}function Ln(t){if(Re(t.maxItems)&&t.maxItems>=0)return t.maxItems}function Vo(t){if(Re(t.maxLength)&&t.maxLength>=0)return t.maxLength}function Bo(t){if(Re(t.maxProperties))return t.maxProperties}function Ho(t){return oe(t.minimum)?t.minimum:void 0}function Fo(t){if(Re(t.minContains)&&t.minContains>=0)return t.minContains}function Sn(t){if(Re(t.minItems)&&t.minItems>=0)return t.minItems}function qo(t){if(Re(t.minLength)&&t.minLength>=0)return t.minLength}function Uo(t){if(Re(t.minProperties)&&t.minProperties>=0)return t.minProperties}function Ko(t){if(oe(t.multipleOf)&&t.multipleOf>=0)return t.multipleOf}function Wo(t){return B(t.not)||ue(t.not)?t.not:void 0}function w(t,e){return t["x-options"]&&m(t["x-options"][e])?t["x-options"][e]:void 0}function zo(t){return je(t.pattern)?t.pattern:void 0}function cs(t){return B(t.patternProperties)?t.patternProperties:void 0}function yi(t){return se(t.prefixItems)?t.prefixItems:void 0}function _t(t){return B(t.properties)?t.properties:void 0}function tn(t){return ue(t.readOnly)?t.readOnly:void 0}function jn(t){return se(t.required)?[...new Set(t.required)]:void 0}function $n(t){return B(t.then)||ue(t.then)?t.then:void 0}function Z(t){return je(t.title)?t.title:void 0}function q(t){if(je(t.type)||se(t.type))return t.type}function Ct(t){return se(t.oneOf)?t.oneOf:void 0}function Jo(t){return ue(t.unevaluatedProperties)?t.unevaluatedProperties:void 0}function Pn(t){return ue(t.uniqueItems)?t.uniqueItems:void 0}const Rc={getSchemaX:Dc,getSchemaSchema:Mc,getSchemaAdditionalProperties:hi,getSchemaPropertyNames:Po,getSchemaAllOf:fi,getSchemaAnyOf:rt,getSchemaConst:mi,getSchemaContains:Ao,getSchemaDefault:Oo,getSchemaDependentRequired:Tn,getSchemaDependentSchemas:ko,getSchemaDescription:ne,getSchemaElse:In,getSchemaEnum:ae,getSchemaExclusiveMaximum:_o,getSchemaExclusiveMinimum:Do,getSchemaFormat:Mo,getSchemaIf:ls,getSchemaItems:gi,getSchemaMaximum:Ro,getSchemaMaxContains:No,getSchemaMaxItems:Ln,getSchemaMaxLength:Vo,getSchemaMaxProperties:Bo,getSchemaMinimum:Ho,getSchemaMinContains:Fo,getSchemaMinItems:Sn,getSchemaMinLength:qo,getSchemaMinProperties:Uo,getSchemaMultipleOf:Ko,getSchemaNot:Wo,getSchemaXOption:w,getSchemaPattern:zo,getSchemaPatternProperties:cs,getSchemaPrefixItems:yi,getSchemaProperties:_t,getSchemaReadOnly:tn,getSchemaRequired:jn,getSchemaThen:$n,getSchemaTitle:Z,getSchemaType:q,getSchemaOneOf:Ct,getSchemaUnevaluatedProperties:Jo,getSchemaUniqueItems:Pn};function ds(t,e,s,i,n){let r=[];const o=fi(s);return m(o)&&(o.forEach(a=>{const l=new le({refParser:t.refParser,schema:a,data:e,rootName:i}),c=l.getErrors();l.destroy(),c.forEach(d=>{d.path=n}),r.push(...c)}),r=En(r)),r}const F={errorAdditionalProperties:'Has additional property "{{ property }}" but no additional properties are allowed.',errorAnyOf:"Must validate against at least one of the provided schemas.",errorConst:"Must have value of: {{ const }}.",errorContains:"Must contain at least one item matching the provided schema.",errorDependentRequired:"Must have the required properties: {{ dependentRequired }}.",errorEnum:"Must be one of the enumerated values: {{ enum }}.",errorExclusiveMaximum:"Must be less than {{ exclusiveMaximum }}.",errorExclusiveMinimum:"Must be greater than {{ exclusiveMinimum }}.",errorFormat:"Must be a valid {{ format }}.",errorItems:"Must have items that validate against the provided schema.",errorMaximum:"Must be at most {{ maximum }}.",errorMaxItems:"Must have at most {{ maxItems }} items.",errorMaxLength:"Must be at most {{ maxLength }} characters long.",errorMaxProperties:"Must have at most {{ maxProperties }} properties.",errorMaxContains:"Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",errorMinContains:"Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",errorMinimum:"Must be at least {{ minimum }}.",errorMinItems:"Must have at least {{ minItems }} items.",errorMinLength:"Must be at least {{ minLength }} characters long.",errorMinProperties:"Must have at least {{ minProperties }} properties.",errorMultipleOf:"Must be multiple of {{ multipleOf }}.",errorNot:"Must not validate against the provided schema.",errorOneOf:"Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",errorPattern:'Must match the pattern: "{{ pattern }}".',errorPrefixItems:"Item {{ index }} fails validation.",errorPropertyNames:'Property name "{{ propertyName }}" fails validation.',errorProperties:"The following properties do not comply with their schemas: {{ properties }}",errorRequired:"Must have the required properties: {{ required }}.",errorType:"Must be of type {{ type }}.",errorUnevaluatedProperties:'Has invalid unevaluated property "{{ property }}"',errorUniqueItems:"Must have unique items."};function ps(t,e,s,i,n){const r=[],o=qo(s);return je(e)&&m(o)&&(e=e.replace(/[\uDCA9]/g,""),e.length{const c=new le({refParser:t.refParser,schema:l,data:e}),d=c.getErrors();c.destroy(),d.length===0&&(a=!0)}),a||r.push({messages:[F.errorAnyOf],path:n,constrain:"anyOf"})}return r}function hs(t,e,s,i,n){const r=[],o=ae(s);return m(o)&&!o.some(l=>JSON.stringify(e)===JSON.stringify(l))&&r.push({messages:[W(F.errorEnum,{enum:JSON.stringify(o)})],path:n,constrain:"enum"}),r}function fs(t,e,s,i,n){const r=[],o=_o(s);return oe(e)&&m(o)&&e>=o&&r.push({messages:[W(F.errorExclusiveMaximum,{exclusiveMaximum:o})],path:n,constrain:"exclusiveMaximum"}),r}function ms(t,e,s,i,n){const r=[],o=Do(s);return oe(e)&&m(o)&&e<=o&&r.push({messages:[W(F.errorExclusiveMinimum,{exclusiveMinimum:o})],path:n,constrain:"exclusiveMinimum"}),r}function gs(t,e,s,i,n){const r=[],o=Mo(s);let a=t.validateFormat;if(w(s,"validateFormat")&&(a=s.options.validateFormat),m(o)&&je(e)&&a){let l;o==="email"&&(l=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),o==="url"&&(l=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),o==="uuid"&&(l=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)),m(l)&&!l.test(e)&&r.push({messages:[W(F.errorFormat,{format:o})],path:n,constrain:"format"})}return r}function ys(t,e,s,i,n){const r=[],o=gi(s),a=yi(s);if(se(e)&&m(o)){const l=m(a)?a.length:0;o===!1&&e.length>0&&e.length>l&&r.push({messages:[F.errorItems],path:n,constrain:"items"})}return r}function bs(t,e,s,i,n){const r=[],o=Ln(s);return se(e)&&m(o)&&e.length>o&&r.push({messages:[W(F.errorMaxItems,{maxItems:o})],path:n,constrain:"maxItems"}),r}function vs(t,e,s,i,n){const r=[],o=Vo(s);return je(e)&&m(o)&&(e=e.replace(/[\uDCA9]/g,""),e.length>o&&r.push({messages:[W(F.errorMaxLength,{maxLength:o})],path:n,constrain:"maxLength"})),r}function Cs(t,e,s,i,n){const r=[],o=Bo(s);return B(e)&&m(o)&&Object.keys(e).length>o&&r.push({messages:[W(F.errorMaxProperties,{maxProperties:o})],path:n,constrain:"maxProperties"}),r}function xs(t,e,s,i,n){const r=[],o=Ho(s);return oe(e)&&m(o)&&e{const c=new le({refParser:t.refParser,schema:l,data:e}),d=c.getErrors();c.destroy(),d.length===0&&a++}),a!==1&&r.push({messages:[W(F.errorOneOf,{counter:a})],path:n,constrain:"oneOf"})}return r}function Ss(t,e,s,i,n){const r=[],o=zo(s);return je(e)&&m(o)&&!new RegExp(o).test(e)&&r.push({messages:[W(F.errorPattern,{pattern:o})],path:n,constrain:"pattern"}),r}function js(t,e,s,i){let n=[];const r=cs(s);return B(e)&&m(r)&&Object.keys(e).forEach(o=>{Object.keys(r).forEach(a=>{if(new RegExp(a).test(o)){const c=r[a],d=new le({refParser:t.refParser,schema:c,data:e[o]}),u=d.getErrors().map(f=>({messages:f.messages,path:i+"/"+o,constrain:"patternProperties"}));n=[...n,...u],d.destroy()}})}),n}function $s(t,e,s,i){const n=_t(s),r=[];return B(e)&&m(n)&&Object.keys(n).forEach(o=>{if(Me(e,o)){const a=n[o],l=new le({refParser:t.refParser,schema:a,data:e[o]});l.getErrors().length>0&&r.push(o),l.destroy()}}),r.length>0?[{messages:[W(F.errorProperties,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function Ps(t,e,s,i,n){const r=[],o=jn(s);if(B(e)&&m(o)){const a=[],l=Object.keys(e);o.forEach(d=>{l.includes(d)||a.push(d)}),a.length>0&&r.push({messages:[W(F.errorRequired,{required:a.join(", ")})],path:n,constrain:"required"})}return r}function As(t,e,s,i,n){const r=[],o=q(s);if(o==="any")return r;if(m(o)){const a={string:c=>je(c),number:c=>oe(c),integer:c=>Re(c),boolean:c=>ue(c),array:c=>se(c),object:c=>B(c),null:c=>ui(c)};let l=!0;se(o)?l=o.some(c=>a[c](e)):l=a[o](e),l||r.push({messages:[W(F.errorType,{type:o,valueType:Lo(e)})],path:n,constrain:"type"})}return r}function Os(t,e,s,i,n){const r=[],o=Ro(s);return oe(e)&&m(o)&&e>o&&r.push({messages:[W(F.errorMaximum,{maximum:o})],path:n,constrain:"maximum"}),r}function ks(t,e,s,i,n){const r=[],o=Pn(s);if(se(e)&&m(o)&&o===!0){const a=[];let l=!1;for(let d=0;db===f),l)break;a.push(f)}l&&r.push({messages:[F.errorUniqueItems],path:n,constrain:"uniqueItems"})}return r}function _s(t,e,s,i,n){const r=[],o=hi(s),a=cs(s),l=_t(s);if(B(e)&&m(o)){const c=l||{},d=o,u=a||{};Object.keys(e).forEach(f=>{const b=Object.keys(u).some($=>new RegExp($).test(f)),S=Me(c,f);if(!b&&!S){if(d===!1)r.push({messages:[W(F.errorAdditionalProperties,{property:f})],path:n,constrain:"additionalProperties"});else if(B(d)){const $=new le({refParser:t.refParser,schema:d,data:e[f]}),k=$.getErrors().map(j=>({messages:j.messages,path:`${n}.${f}`,constrain:"additionalProperties"}));r.push(...k),$.destroy()}}})}return r}const Nc={additionalProperties:_s,allOf:ds,anyOf:us,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,items:ys,maximum:Os,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,properties:$s,required:Ps,type:As,uniqueItems:ks};function bi(t,e,s,i,n){const r=[],o=mi(s);return m(o)&&pi(e,o)&&r.push({messages:[W(F.errorConst,{const:JSON.stringify(o)})],path:n,constrain:"const"}),r}function vi(t,e,s,i,n){const r=[],o=Ao(s),a=Fo(s),l=No(s);if(se(e)&&m(o)){let c=0;e.forEach(u=>{const f=new le({refParser:t.refParser,schema:o,data:u});f.getErrors().length===0&&c++,f.destroy()});const d=c===0;m(a)?cl&&r.push({messages:[W(F.errorMaxContains,{counter:c,maxContains:l})],path:n,constrain:"maxContains"})}return r}function Ci(t,e,s,i,n){const r=[],o=Tn(s);if(B(e)&&m(o)){let a=[];Object.keys(o).forEach(c=>{m(e[c])&&(a=o[c].filter(u=>!Me(e,u)))}),a.length>0&&r.push({messages:[W(F.errorDependentRequired,{dependentRequired:a.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function xi(t,e,s){let i=[];const n=ko(s);return B(e)&&m(n)&&Object.keys(n).forEach(r=>{if(m(e[r])){const o=n[r],a=new le({refParser:t.refParser,schema:o,data:e}),l=a.getErrors();a.destroy(),i=[...i,...l]}}),i}function wi(t,e,s){const i=[],n=ls(s),r=$n(s),o=In(s);if(m(n)){if(De(r)&&De(o))return i;const a=new le({refParser:t.refParser,schema:n,data:e}),l=a.getErrors();a.destroy();let c=[],d=[];if(m(r)){const u=new le({refParser:t.refParser,schema:r,data:e});c=u.getErrors(),u.destroy()}if(m(o)){const u=new le({refParser:t.refParser,schema:o,data:e});d=u.getErrors(),u.destroy()}if(n===!0)return c;if(n===!1)return d;if(l.length===0)return c;if(l.length>0)return d}return i}function Ei(t,e,s,i,n){const r=[],o=yi(s);return se(e)&&m(o)&&o.forEach((a,l)=>{const c=e[l];if(m(c)){const d=new le({refParser:t.refParser,schema:a,data:c}),u=d.getErrors();d.destroy(),u.length>0&&r.push({messages:[W(F.errorPrefixItems,{index:l})],path:n,constrain:"prefixItems"})}}),r}const Vc={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:Os,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,properties:$s,prefixItems:Ei,required:Ps,type:As,uniqueItems:ks},Bc={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:Os,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,properties:$s,prefixItems:Ei,required:Ps,type:As,uniqueItems:ks};function Go(t,e,s,i,n){let r=[];const o=Jo(s),a=cs(s),l=_t(s),c=fi(s),d=rt(s),u=Ct(s);if(B(e)&&m(o)){let f=m(l)?l:{};const b=o,S=a;[c,d,u].forEach(k=>{m(k)&&k.forEach(j=>{m(j.properties)&&(f={...f,...j.properties})})}),f&&Object.keys(e).forEach(k=>{let j=!1;if(m(S)&&Object.keys(S).forEach(M=>{j=new RegExp(M).test(k)}),!j&&b===!1&&!Me(f,k)&&r.push({messages:[W(F.errorUnevaluatedProperties,{property:k})],path:n,constrain:"unevaluatedProperties"}),!j&&B(b)&&!Me(f,k)){const M=new le({refParser:t.refParser,schema:b,data:e[k]}),N=M.getErrors().map(O=>({messages:O.messages,path:k,constrain:"unevaluatedProperties"}));r=[...r,...N],M.destroy()}})}return r}const Hc={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:Os,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,propertie:$s,prefixItems:Ei,required:Ps,type:As,unevaluatedProperties:Go,uniqueItems:ks};function Fc(t,e,s,i,n){const r=[],o=Po(s);return B(e)&&m(o)&&Object.keys(e).forEach(a=>{new le({refParser:t.refParser,schema:o,data:a}).getErrors().length>0&&r.push({messages:[W(F.errorPropertyNames,{propertyName:a})],path:n,constrain:"propertyNames"})}),r}const gr={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:Os,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,prefixItems:Ei,propertyNames:Fc,properties:$s,required:Ps,type:As,unevaluatedProperties:Go,uniqueItems:ks};class qc{constructor(e={}){this.refParser=e.refParser,this.validateFormat=e.validateFormat?e.validateFormat:!1,this.draft=gr,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":Nc,"http://json-schema.org/draft-06/schema#":Vc,"http://json-schema.org/draft-07/schema#":Bc,"https://json-schema.org/draft/2019-09/schema":Hc,"https://json-schema.org/draft/2020-12/schema":gr}}getErrors(e,s,i,n){let r=[];const o=w(s,"messages"),a=Se(s);return ue(a)&&a===!0?r:ue(a)&&a===!1?[{messages:m(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach(l=>{if(Me(a,l)){const c=this.draft[l],d=c(this,e,s,i,n);d&&(r=[...r,...d])}}),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Yo{constructor(){this.listeners=[]}on(e,s){this.listeners.push({name:e,callback:s})}off(e){this.listeners=this.listeners.filter(s=>s.name!==e)}emit(e,s=void 0){this.listeners.filter(n=>n.name===e).forEach(n=>{n.callback(s)})}destroy(){Object.keys(this).forEach(e=>{delete this[e]})}}class dt extends Yo{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=m(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())})}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=s=>{this.jedi.register(s),s.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(De(this.value)){let e;const s=q(this.schema);s==="boolean"&&(e=!1),s==="number"&&(e=0),s==="integer"&&(e=0),s==="string"&&(e=""),s==="array"&&(e=[]),s==="object"&&(e={}),s==="null"&&(e=null),this.value=e}}setDefaultValue(){const e=Oo(this.schema);m(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,s=!0){const i=this.jedi.options.enforceConst||w(this.schema,"enforceConst");if(m(i)&&is(i,!0)){const n=mi(this.schema);m(n)&&(e=n)}this.value=e,this.emit("set-value",e),s&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];const e=this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path);return En(e)}prepare(){}activate(){this.isActive===!1&&(this.isActive=!0,this.emit("change"))}deactivate(){this.isActive===!0&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return tn(this.schema)===!0&&(e=!0),this.parent&&tn(this.parent.schema)===!0&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach(e=>{e.destroy()}),this.ui&&this.ui.destroy(),Object.keys(this).forEach(e=>{delete this[e]}),super.destroy()}}class et{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI(),(this.instance.jedi.options.showErrors==="always"||w(this.instance.schema,"showErrors")==="always")&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}),this.instance.on("change",()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",q(this.instance.schema))}build(){}enforceEnumDefault(){const e=w(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,s=ae(this.instance.schema);m(s)&&!s.includes(this.instance.getValue())&&m(s[0])&&e&&this.instance.setValue(s[0],!1)}addEventListeners(){}showValidationErrors(e,s=!1){if(e=e.filter(r=>r.path===this.instance.path),this.control.messages.innerHTML="",this.showingValidationErrors=!1,(this.instance.jedi.options.showErrors==="never"||w(this.instance.schema,"showErrors")==="never")&&!s||e.length===0)return;const n=Z(this.instance.schema)||this.instance.getKey();e.forEach(r=>{r.constraint!=="properties"&&r.messages.forEach(o=>{const a=this.getInvalidFeedback({message:n+": "+o});this.control.messages.appendChild(a)})}),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach(s=>{this.disabled||this.readOnly?s.setAttribute("disabled",""):s.removeAttribute("disabled","")})}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach(e=>{delete this[e]})}}class An extends et{static resolves(e){const s=ls(e);return m(s)}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)})}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Uc extends dt{setUI(){this.ui=new An(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach(r=>{m(r.then)&&(this.schemas.push(at({},Se(this.schema),r.then)),this.switcherOptionValues.push(e),this.switcherOptionsLabels.push("then"),e++),m(r.else)&&(this.schemas.push(at({},Se(this.schema),r.else)),this.switcherOptionValues.push(e),this.switcherOptionsLabels.push("else"),e++)});const s=Se(this.schema);delete s.if,delete s.then,delete s.else;const i=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent});this.schemas.forEach(r=>{const o=this.jedi.createInstance({jedi:this.jedi,schema:r,path:this.path,parent:this.parent});this.instanceStartingValues.push(o.getValue()),o.on("change",()=>{const a=this.activeInstance.getValue();this.getFittestIndex(a)!==this.index?this.setValue(a):(this.value=this.activeInstance.getValue(),this.emit("change"))}),this.instances.push(o)}),this.on("set-value",r=>{this.instances.forEach(l=>{const c=l.getValue();B(c)&&B(r)&&(r=So(c,r),l.children.forEach(d=>{const u=mi(d.schema);m(u)&&(r[d.getKey()]=u)})),l.setValue(r,!1)});const o=this.getFittestIndex(r);o!==this.index&&this.switchInstance(o)}),this.value=i.getValue(),i.destroy();const n=this.getFittestIndex(this.value);this.switchInstance(n)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const s=ls(e);if(m(s)){const i=$n(e),n=In(e);this.ifThenElseShemas.push({if:s,then:m(i)?i:{}}),this.ifThenElseShemas.push({if:s,else:m(n)?n:{}})}}getFittestIndex(e){let s=this.index;return this.ifThenElseShemas.forEach((i,n)=>{const r=new le({schema:i.if,data:e,refParser:this.jedi.refParser}),o=r.getErrors();r.destroy(),o.length===0&&i.then&&(s=n),o.length>0&&i.else&&(s=n)}),s}destroy(){this.instances.forEach(e=>{e.destroy()}),super.destroy()}getAllOfCombinations(e){const s=[],i=(r,o)=>({...r,...o}),n=(r,o)=>{if(o.length===0){s.push(r);return}const a=o[0];n(i(r,a),o.slice(1)),n(r,o.slice(1))};for(let r=0;rObject.keys(r).length-Object.keys(o).length),s}}class Kc extends dt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",()=>{this.onSetValue()});const e=q(this.schema);if(m(rt(this.schema))||m(Ct(this.schema))){const i=m(rt(this.schema))?rt(this.schema):Ct(this.schema),n=Se(this.schema);delete n.anyOf,delete n.oneOf,delete n.options,i.forEach((r,o)=>{r={...n,...r},this.jedi.refParser&&(r=this.jedi.refParser.expand(r));let a="Option-"+(o+1);const l=w(r,"switcherTitle"),c=Z(r);m(c)&&(a=c),m(l)&&(a=l),this.switcherOptionValues.push(o),this.switcherOptionsLabels.push(a),this.schemas.push(r)})}else if(se(e))e.forEach((i,n)=>{const r=at(this.schema),o={...r,type:i,title:i[0].toUpperCase()+i.slice(1)};m(r.title)&&(o.title=r.title),this.switcherOptionValues.push(n),this.switcherOptionsLabels.push(i.charAt(0).toUpperCase()+i.slice(1)),this.schemas.push(o)});else if(e==="any"||!e){const i=Se(this.schema);this.schemas=[{...i,type:"object"},{...i,type:"array"},{...i,type:"string"},{...i,type:"number"},{...i,type:"integer"},{...i,type:"boolean"},{...i,type:"null"}],this.schemas.forEach((n,r)=>{this.switcherOptionValues.push(r)}),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach(i=>{const n=this.jedi.createInstance({jedi:this.jedi,schema:i,path:this.path,parent:this.parent,value:Se(this.value)});m(this.value)&&n.setValue(this.value,!1),n.unregister(),n.off("change"),n.on("change",()=>{this.value=this.activeInstance.getValue(),this.emit("change")}),this.instances.push(n),this.register()});const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,s){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],m(s)&&this.activeInstance.setValue(s,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(pi(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let s=0,i,n;for(const r of this.instances){const o=this.jedi.validator.getErrors(e,r.schema,r.getKey(),r.path);(De(i)||De(n))&&(i=s,n=o),o.length{e.destroy()}),super.destroy()}}class Wc extends dt{}class zc extends dt{prepare(){this.properties={};const e=_t(this.schema);m(e)&&Object.keys(e).forEach(s=>{const i=e[s];this.properties[s]={schema:i};let n=!0;const r=this.jedi.options.deactivateNonRequired,o=w(this.schema,"deactivateNonRequired"),a=w(i,"deactivateNonRequired");this.isNotRequired(s)&&m(r)&&r===!0&&(n=!1),this.isNotRequired(s)&&m(o)&&o===!0&&(n=!1),this.isNotRequired(s)&&m(a)&&a===!0&&(n=!1),n&&this.createChild(i,s)}),this.refreshInstances(),this.on("set-value",()=>{this.refreshInstances()})}isRequired(e){const s=jn(this.schema);return m(s)&&s.includes(e)}isDependentRequired(e){const s=Tn(this.schema);if(m(s)){let i=[];return Object.keys(s).forEach(n=>{m(this.value[n])&&(i=s[n].filter(o=>!Me(this.value,o)))}),i.includes(e)}return!1}createChild(e,s,i,n=!1){const r=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:Se(i)});this.children.push(r),this.value[s]=r.getValue();const o=this.jedi.options.deactivateNonRequired||w(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&m(o)&&o===!0&&!n&&r.deactivate(),r}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let s=this.children.length-1;s>=0;s--){const i=this.children[s];i.getKey()===e&&(i.destroy(),this.children.splice(s,1),this.onChildChange())}}getChild(e){return this.children.find(s=>e===s.getKey().split(this.jedi.pathSeparator).pop())}getPropertySchema(e){let s;const i=hi(this.schema),n=_t(this.schema),r=cs(this.schema);return m(n)&&Me(n,e)?s=n[e]:m(r)&&Object.keys(r).forEach(o=>{new RegExp(o).test(e)&&(s=r[o])}),De(s)&&m(i)&&(s=i),De(s)&&(s={}),s}onChildChange(){const e={};this.children.forEach(s=>{s.isActive&&(e[s.getKey()]=s.getValue())}),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort((e,s)=>{const i=w(e.schema,"propertyOrder"),n=w(s.schema,"propertyOrder"),r=oe(i),o=oe(n);return!r&&o?1:r&&!o||in?1:0})}refreshInstances(){const e=this.getValue();if(B(e)){Object.keys(e).forEach(s=>{const i=this.getChild(s);if(i){i.activate();const n=i.getValue(),r=e[i.getKey()];pi(n,r)&&i.setValue(r,!1)}else{const n=this.getPropertySchema(s);this.createChild(n,s,e[s],!0)}});for(let s=this.children.length-1;s>=0;s--){const i=this.children[s],n=i.getKey();De(e[n])&&(this.getChild(n)?i.deactivate():this.deleteChild(n))}this.sortChildrenByPropertyOrder()}}}class Jc extends dt{prepare(){this.refreshChildren(),this.on("set-value",()=>{this.refreshChildren()})}createItemInstance(e){let s;const i=this.children.length,n=gi(this.schema),r=yi(this.schema);s=m(n)?n:{},m(r)&&m(r[i])&&(s=r[i]);const a=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:Se(e)});return m(e)&&a.setValue(e,!1),a}move(e,s){const i=Se(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=Se(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const i=Se(this.getValue()).filter((n,r)=>r!==e);this.setValue(i)}onChildChange(){const e=[];this.children.forEach(s=>{e.push(s.getValue())}),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();se(e)&&e.forEach(s=>{const i=this.createItemInstance(s);this.children.push(i)})}}class Gc extends dt{}class Yc extends dt{}class Qc extends dt{}const Zc={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Xc={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},ed={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},td={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},sd={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},id={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Ti extends et{sanitize(e){return!!e}}class Qo extends Ti{static resolves(e){return q(e)==="boolean"&&w(e,"format")==="radio"}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:w(this.instance.schema,"enumTitles")||["false","true"],id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.radios.forEach(e=>{e.addEventListener("change",()=>{const s=e.value==="true";this.instance.setValue(s)})})}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach(e=>{const s=e.value==="true";e.checked=s===this.instance.getValue()})}}class Zo extends Ti{static resolves(e){return q(e)==="boolean"}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:w(this.instance.schema,"enumTitles")||["false","true"],id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{const e=this.control.input.value==="true";this.instance.setValue(e)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()===!0?"true":"false"}}class Xo extends Ti{static resolves(e){return q(e)==="boolean"&&w(e,"format")==="checkbox"}build(){this.control=this.theme.getCheckboxControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.checked)})}sanitize(e){return!!e}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class tt extends et{sanitize(e){return String(e)}}class ea extends tt{static resolves(e){return q(e)==="string"&&w(e,"format")==="radio"}build(){this.control=this.theme.getRadiosControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.radios.forEach(e=>{e.addEventListener("change",()=>{this.instance.setValue(e.value)})})}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach(e=>{e.checked=e.value===this.instance.getValue()})}}class ta extends tt{static resolves(e){return q(e)==="string"&&m(ae(e))}build(){this.control=this.theme.getSelectControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class sa extends tt{static resolves(e){return q(e)==="string"&&w(e,"format")==="textarea"}build(){this.control=this.theme.getTextareaControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ia extends tt{static resolves(e){return window.Awesomplete&&q(e)==="string"&&m(w(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,w(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class Ii extends tt{static resolves(e){return q(e)==="string"}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=w(this.instance.schema,"format");this.control=this.theme.getInputControl({type:Ii.getTypes().includes(e)?e:"text",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden")||e==="hidden",description:ne(this.instance.schema)}),e==="color"&&this.instance.value.length===0&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class Ds extends et{sanitize(e){return q(this.instance.schema)==="integer"?Math.floor(Number(e)):Number(e)}}class na extends Ds{static resolves(e){const s=q(e),i=ae(e),n=w(e,"format");return(s==="number"||s==="integer")&&m(i)&&n==="radio"}build(){this.control=this.theme.getRadiosControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.radios.forEach(e=>{e.addEventListener("change",()=>{const s=this.sanitize(e.value);this.instance.setValue(s)})})}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach(e=>{e.checked=Number(e.value)===Number(this.instance.getValue())})}}class ra extends Ds{static resolves(e){const s=q(e);return(s==="number"||s==="integer")&&m(ae(e))}build(){this.control=this.theme.getSelectControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)})}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();oe(e)&&(this.control.input.value=this.instance.getValue())}}class oa extends Ds{static resolves(e){const s=q(e);return s==="number"||s==="integer"}build(){this.control=this.theme.getInputControl({type:"number",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden")||w(this.instance.schema,"format")==="hidden",description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)})}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();oe(e)&&(this.control.input.value=this.instance.getValue())}}class Li extends et{static resolves(e){return q(e)==="object"}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let s=!0;const i=hi(this.instance.schema);m(i)&&i===!1&&(s=!1);let n=!1;m(this.instance.jedi.options.enablePropertiesToggle)&&(n=this.instance.jedi.options.enablePropertiesToggle),m(e.enablePropertiesToggle)&&(n=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),enablePropertiesToggle:n,addProperty:s,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||w(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||w(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(e.length===0||m(this.instance.value[e]))return;const n=this.instance.getPropertySchema(e),r=this.instance.createChild(n,e);r.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const o=this.control.ariaLive;o.innerHTML="";const a=Z(r.schema),l=m(a)?a:e,c=this.theme.getAriaLiveMessage();c.textContent=l+" field was added to the form",o.appendChild(c),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})}sanitize(e){return B(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=w(this.instance.schema,"enablePropertiesToggle");if(is(this.instance.jedi.options.enablePropertiesToggle,!0)||is(e,!0)){const s=this.instance.children.map(i=>i.getKey());for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);s.forEach(i=>{const n=this.instance.isRequired(i),r=this.instance.isDependentRequired(i),o=!n&&!r,a=this.control.ariaLive,l=this.instance.getPropertySchema(i),c=Z(l),d=this.instance.path+this.instance.jedi.pathSeparator+i,u=te(d)+"-activator",f=m(c)?c:i;if(o){const S=this.theme.getCheckboxControl({id:u,label:f,titleHidden:!1}),$=S.input;this.propertyActivators[i]=$,$.addEventListener("change",()=>{a.innerHTML="";const k=this.theme.getAriaLiveMessage();$.checked?(this.instance.getChild(i)||this.instance.createChild(l,i),this.instance.getChild(i).activate(),k.textContent=f+" field was added to the form",a.appendChild(k)):(this.instance.getChild(i).deactivate(),k.textContent=f+" field was removed from the form",a.appendChild(k)),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}),this.control.propertiesActivators.appendChild(S.container)}const b=this.propertyActivators[i];b&&(b.disabled=this.disabled,b.checked=Me(this.instance.getValue(),i))})}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach(e=>{e.isActive?(e.ui.control.container.parentNode===null&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)})}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class aa extends Li{static resolves(e){return q(e)==="object"&&m(w(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach(s=>{if(s.isActive){const i=w(s.schema,"grid"),n=(i==null?void 0:i.columns)||12,r=(i==null?void 0:i.offset)||0,o=this.theme.getCol(12,n,r);((i==null?void 0:i.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(o),o.appendChild(s.ui.control.container),this.disabled||this.instance.isReadOnly()?s.ui.disable():s.ui.enable()}})}}class la extends Li{static resolves(e){return q(e)==="object"&&m(w(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=w(this.instance.schema,"nav"),s=this.theme.getRow(),i=m(e.cols)?e.cols:4,n=this.theme.getCol(12,i),r=this.theme.getCol(12,12-i),o=this.theme.getTabContent(),a=this.theme.getTabList({stacked:m(e.stacked)?e.stacked:!1,type:m(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(s),s.appendChild(n),s.appendChild(r),n.appendChild(a),r.appendChild(o),this.instance.children.forEach((l,c)=>{if(l.isActive){const d=c===this.activeTabIndex,u=te(l.path),f=Z(l.schema),b=this.theme.getTab({hasErrors:l.children.some(S=>S.ui.showingValidationErrors),title:m(f)?f:l.getKey(),id:u,active:d});b.list.addEventListener("click",()=>{this.activeTabIndex=c}),this.theme.setTabPaneAttributes(l.ui.control.container,d,u),a.appendChild(b.list),o.appendChild(l.ui.control.container),this.disabled||this.instance.isReadOnly()?l.ui.disable():l.ui.enable()}})}}class On extends et{static resolves(e){return q(e)==="array"}build(){this.control=this.theme.getArrayControl({title:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||w(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||w(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",()=>{this.instance.addItem()})}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return se(e)?e:[]}isSortable(){return window.Sortable&&m(w(this.instance.schema,"sortable"))}refreshUI(){const e=Ln(this.instance.schema),s=Sn(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach(i=>{const n=Number(i.getKey()),r=this.theme.getDeleteItemBtn(),o=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),l=this.theme.getBtnGroup(),{container:c,arrayActions:d,body:u}=this.theme.getArrayItem();if(d.appendChild(l),l.appendChild(r),l.appendChild(o),l.appendChild(a),this.isSortable()){const f=this.theme.getDragItemBtn();l.appendChild(f)}this.control.childrenSlot.appendChild(c),u.appendChild(i.ui.control.container),r.addEventListener("click",()=>{const f=Number(i.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(f)}),o.addEventListener("click",()=>{const f=n-1;this.instance.move(n,f)}),a.addEventListener("click",()=>{const f=n+1;this.instance.move(n,f)}),this.disabled||this.instance.isReadOnly()?i.ui.disable():i.ui.enable(),m(s)&&this.instance.value.length<=s&&r.setAttribute("disabled","")}),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:i=>{this.instance.move(i.oldIndex,i.newIndex)}})),m(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ca extends On{static resolves(e){return q(e)==="array"&&m(w(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()})}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=w(this.instance.schema,"nav"),s=this.theme.getRow(),i=m(e.cols)?e.cols:4,n=this.theme.getCol(12,i),r=this.theme.getCol(12,12-i),o=this.theme.getTabContent(),a=this.theme.getTabList({stacked:m(e.stacked)?e.stacked:!1,type:m(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(s),s.appendChild(n),s.appendChild(r),n.appendChild(a),r.appendChild(o),this.instance.children.forEach((l,c)=>{const d=this.theme.getDeleteItemBtn(),u=this.theme.getMoveUpItemBtn(),f=this.theme.getMoveDownItemBtn();l.ui.control.arrayActions.innerHTML="",l.ui.control.arrayActions.appendChild(d),l.ui.control.arrayActions.appendChild(u),l.ui.control.arrayActions.appendChild(f),this.control.childrenSlot.appendChild(l.ui.control.container);let b;const S=w(this.instance.schema,"itemTemplate");if(S){const M=S,N={i0:c,i1:c+1,value:l.getValue()};b=W(M,N)}else{const M=Z(l.schema);b=m(M)?M+" "+(c+1):l.getKey()}d.addEventListener("click",()=>{this.activeTabIndex=$o(c-1,0,this.instance.value.length-1),this.instance.deleteItem(c)}),u.addEventListener("click",()=>{const M=c-1;this.activeTabIndex=M,this.instance.move(c,M)}),f.addEventListener("click",()=>{const M=c+1;this.activeTabIndex=M,this.instance.move(c,M)});const $=c===this.activeTabIndex,k=te(l.path),j=this.theme.getTab({hasErrors:l.children.some(M=>M.ui.showingValidationErrors),title:b,id:k,active:$});j.list.addEventListener("click",()=>{this.activeTabIndex=c}),this.theme.setTabPaneAttributes(l.ui.control.container,$,k),a.appendChild(j.list),o.appendChild(l.ui.control.container),this.disabled||this.instance.isReadOnly()?l.ui.disable():l.ui.enable(),c===0&&u.setAttribute("disabled",""),this.instance.value.length-1===c&&f.setAttribute("disabled","")})}}class da extends et{static resolves(e){const s=q(e),i=Ct(e),n=rt(e);return m(n)||m(i)||s==="any"||se(s)||De(s)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)})}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class pa extends et{static resolves(e){return q(e)==="null"}build(){this.control=this.theme.getNullControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden")||w(this.instance.schema,"format")==="hidden",description:ne(this.instance.schema)})}sanitize(){return null}}class nd extends tt{static resolves(e){return window.Quill&&q(e)==="string"&&m(w(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,w(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)})}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class rd extends tt{static resolves(e){return window.Jodit&&q(e)==="string"&&m(w(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,w(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)})}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class od extends tt{static resolves(e){return window.flatpickr&&q(e)==="string"&&m(w(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,w(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class ad extends Ds{static resolves(e){return typeof Raty<"u"&&q(e)==="number"&&m(w(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},w(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class ld extends et{static resolves(e){const s=q(e),i=gi(e),n=m(i)&&q(i),r=m(s)&&s==="array",o=Pn(e)===!0,a=m(i)&&m(ae(e.items)),l=m(i)&&m(n),c=["string","number","integer"],d=m(i)&&m(n)&&(c.includes(n)||se(n)&&n.some(u=>c.includes(u)));return r&&o&&a&&l&&d}build(){this.control=this.theme.getCheckboxesControl({values:ae(this.instance.schema.items),titles:w(this.instance.schema.items,"enumTitles")||ae(this.instance.schema.items),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach(e=>{e.addEventListener("change",()=>{const s=this.instance.getValue();if(e.checked)s.push(e.value);else{const i=s.indexOf(e.value);i>-1&&s.splice(i,1)}this.instance.setValue(s)})})}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach(s=>{s.checked=e.includes(s.value)})}}class cd{constructor(e){this.customEditors=e.customEditors??[],this.editors=[da,An,Qo,Xo,Zo,ea,ta,sa,ia,nd,rd,od,Ii,ad,na,ra,oa,aa,la,Li,ld,ca,On,pa]}getClass(e){for(const s of this.customEditors)if(s.resolves(e))return s;for(const s of this.editors)if(s.resolves(e))return s;return null}}let le=class extends Yo{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new cd({customEditors:this.options.customEditors}),this.theme=this.options.theme,m(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Zc;break;case"bootstrap-icons":this.theme.icons=Xc;break;case"fontawesome3":this.theme.icons=ed;break;case"fontawesome4":this.theme.icons=td;break;case"fontawesome5":this.theme.icons=sd;break;case"fontawesome6":this.theme.icons=id;break}this.schema=this.options.schema,this.validator=new qc({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),m(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",()=>{this.emit("change")}),this.hiddenInput&&this.on("change",()=>{this.hiddenInput.value=JSON.stringify(this.getValue())})}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&B(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach(s=>{this.hiddenInput.setAttribute(s,this.options.hiddenInputAttributes[s])}),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||w(e.schema,"mergeAllOf")){const a=fi(e.schema);m(a)&&a.forEach(l=>{e.schema=at({},e.schema,l)})}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const i=q(e.schema),n=Ct(e.schema),r=rt(e.schema),o=ls(e.schema);if(m(r)||m(n)||i==="any"||se(i)||De(i))return new Kc(e);if(m(o))return new Uc(e);if(i==="object")return new zc(e);if(i==="array")return new Jc(e);if(i==="string")return new Gc(e);if(i==="number"||i==="integer")return new Yc(e);if(i==="boolean")return new Wc(e);if(i==="null")return new Qc(e)}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach(s=>{const i=this.instances[s];e=[...e,...i.getErrors()]}),e}showValidationErrors(e=null){if(!this.options.container)return!1;const s=e||this.getErrors();Object.keys(this.instances).forEach(i=>{this.instances[i].ui.showValidationErrors(s,!0)})}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach(e=>{delete this[e]})}};class dd{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);this.refsResolved()===!1;)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every(e=>e!==null)}async collectRefs(e,s="#"){if(!(typeof e!="object"||e===null))for(const[i,n]of Object.entries(e)){const r=s?`${s}/${i}`:`/${i}`;if(this.hasRef(e)){const o=e.$ref;if(this.isExternalRef(o)){const a=await this.load(o);this.refs[o]=a,await this.collectRefs(a,r)}else this.refs[o]=this.data[o]??null}this.data[s]=e,await this.collectRefs(n,r)}}hasRef(e){return typeof e.$ref<"u"&&typeof e.$ref=="string"}isExternalRef(e){return typeof e!="string"?!1:e.startsWith("http")||e.startsWith("https")}isObject(e){return e!==null&&typeof e=="object"}expand(e){const s=JSON.parse(JSON.stringify(e));if(this.isObject(s)&&this.hasRef(s)){const i=s.$ref;return delete s.$ref,this.expand(at({},this.refs[i],s))}return s}async load(e){try{const s=await fetch(e);if(!s.ok)throw new Error("Network response was not ok");return await s.json()}catch(s){throw console.error("Error loading",e,s),s}}}class Si{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const s=document.createElement("legend"),i=document.createElement("span");return s.classList.add("jedi-editor-legend"),i.classList.add("jedi-editor-legend-text"),s.setAttribute("aria-labelledby","#legend-"+e.id),i.textContent=e.textContent,i.setAttribute("id","#legend-"+e.id),s.appendChild(i),s}getLabel(e){const s=document.createElement("label");s.setAttribute("for",e.for);const i=this.getIcon(e.labelIconClass),n=document.createElement("span");return n.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(s),s.classList.add("jedi-title"),s.appendChild(i),s.appendChild(n),{label:s,labelText:n,icon:i}}getIcon(e=""){const s=document.createElement("i");let i=e.split(" ");return i=i.filter(n=>n.length>0),i&&i.forEach(n=>{s.classList.add(n)}),s}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const s=document.createElement("div");return s.classList.add("jedi-messages-slot"),s.setAttribute("aria-atomic","false"),s.setAttribute("aria-live","polite"),e.id&&s.setAttribute("id",e.id),s}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const s=this.getButton(e);return s.classList.add("jedi-properties-toggle"),s.addEventListener("click",()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()}),s}getCollapse(e){const s=document.createElement("div");return s.classList.add("jedi-collapse"),s.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(s.style.display="none"),s}getCollapseToggle(e){const s=this.getButton(e);s.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&s.addEventListener("click",()=>{e.collapse.style.display==="none"?e.collapse.style.display="block":e.collapse.style.display="none"});let i=e.startCollapsed;return s.style.transition="transform 0.1s ease",i&&(s.style.transform="rotate(90deg)"),s.addEventListener("click",()=>{i?s.style.transform="rotate(0deg)":s.style.transform="rotate(90deg)",i=!i}),s}getPropertiesSlot(e){const s=document.createElement("dialog");return s.classList.add("jedi-properties-slot"),s.setAttribute("id",e.id),window.addEventListener("click",i=>{i.target===s&&s.close()}),s}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const s=document.createElement("p");return s.classList.add("jedi-aria-live-message"),s.textContent=e,this.visuallyHidden(s),s}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const s=document.createElement("button");s.classList.add("jedi-btn"),s.setAttribute("type","button"),e.value&&(s.value=e.value),e.id&&s.setAttribute("id",e.id);const i=document.createElement("span");if(i.textContent=e.textContent,this.icons&&e.icon){const n=this.getIcon(this.icons[e.icon]);n.setAttribute("title",e.textContent),s.appendChild(n),this.visuallyHidden(i)}return s.appendChild(i),s}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const s=document.createElement("small");return s.classList.add("jedi-description"),e.textContent&&(s.textContent=e.textContent),e.id&&s.setAttribute("id",e.id),s}getPlaceholderControl(e){const s=document.createElement("div"),i=document.createElement("div"),n=this.getActionsSlot(),r=this.getArrayActionsSlot(),{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d});return s.appendChild(o),s.appendChild(i),s.appendChild(c),s.appendChild(u),s.appendChild(n),n.appendChild(r),{container:s,placeholder:i,label:o,labelText:a,description:c,messages:u,actions:n,arrayActions:r}}getObjectControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getCardBody(),o=this.getPropertiesAriaLive(),a=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getPropertiesSlot({id:"properties-slot-"+e.id}),u=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:d}),f="collapse-"+e.id,b=this.getCollapse({id:f,startCollapsed:e.startCollapsed}),S=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:f,collapse:b,startCollapsed:e.startCollapsed}),$=this.getPropertiesActivators(),k=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),j=this.getAddPropertyButton(),M=this.getFieldset(),N=this.getLegend({textContent:e.title,id:e.id});return j.classList.add("jedi-object-add"),s.appendChild(M),s.appendChild(d),M.appendChild(N),M.appendChild(b),b.appendChild(r),r.appendChild(a),r.appendChild(l),N.appendChild(i),i.appendChild(n),r.appendChild(c),e.addProperty&&(d.appendChild(k.container),d.appendChild(j),d.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(i.appendChild(u),d.appendChild(o),d.appendChild($)),e.enableCollapseToggle&&i.appendChild(S),{container:s,collapse:b,collapseToggle:S,body:r,actions:i,messages:l,childrenSlot:c,propertiesToggle:u,propertiesContainer:d,addPropertyControl:k,addPropertyBtn:j,ariaLive:o,propertiesActivators:$,arrayActions:n}}getArrayControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),a=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getBtnGroup(),d=this.getArrayBtnAdd(),u=this.getFieldset(),f=this.getLegend({textContent:e.title,id:e.id}),b="collapse-"+e.id,S=this.getCollapse({id:b,startCollapsed:e.startCollapsed}),$=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:b,collapse:S,startCollapsed:e.startCollapsed});return s.appendChild(u),u.appendChild(f),u.appendChild(S),S.appendChild(r),r.appendChild(o),r.appendChild(a),f.appendChild(i),i.appendChild(c),c.appendChild(d),i.appendChild(n),r.appendChild(l),e.enableCollapseToggle&&i.appendChild($),{container:s,collapseToggle:$,collapse:S,body:r,actions:i,messages:a,childrenSlot:l,btnGroup:c,addBtn:d,arrayActions:n}}getArrayItem(){const e=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getCardHeader(),o=this.getCardBody();return e.appendChild(s),s.appendChild(r),s.appendChild(o),r.appendChild(i),i.appendChild(n),{container:e,card:s,header:r,body:o,actions:i,arrayActions:n}}getMultipleControl(e){const s=document.createElement("div"),i=this.getCard(),n=this.getActionsSlot(),r=this.getArrayActionsSlot(),o=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),a=this.getCardBody(),l=this.getDescription({textContent:e.description}),c=this.getMessagesSlot(),d=this.getChildrenSlot(),u=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return u.container.classList.add("jedi-switcher"),s.appendChild(l),s.appendChild(i),i.appendChild(o),i.appendChild(a),o.appendChild(n),e.switcher&&n.appendChild(u.container),n.appendChild(r),a.appendChild(c),a.appendChild(d),{container:s,card:i,header:o,body:a,actions:n,messages:c,childrenSlot:d,switcher:u,arrayActions:r}}getIfThenElseControl(e){const s=document.createElement("div"),i=this.getCard(),n=this.getActionsSlot(),r=this.getArrayActionsSlot(),o=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),a=this.getCardBody(),l=this.getDescription({textContent:e.description}),c=this.getMessagesSlot(),d=this.getChildrenSlot(),u=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return u.container.classList.add("jedi-switcher"),e.switcher&&s.appendChild(u.container),a.appendChild(l),s.appendChild(c),s.appendChild(d),{container:s,card:i,header:o,body:a,actions:n,messages:c,childrenSlot:d,switcher:u,arrayActions:r}}getNullControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),a=e.id+"-description",l=this.getDescription({textContent:e.description,id:a}),c=this.getMessagesSlot(),d=document.createElement("br");return s.appendChild(r),s.appendChild(d),s.appendChild(l),s.appendChild(c),s.appendChild(i),i.appendChild(n),{container:s,label:r,labelText:o,description:l,messages:c,actions:i,arrayActions:n}}getTextareaControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("textarea");r.setAttribute("id",e.id),r.style.width="100%";const{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d}),f=d+" "+l;return r.setAttribute("aria-describedby",f),s.appendChild(o),s.appendChild(r),s.appendChild(c),s.appendChild(u),s.appendChild(i),i.appendChild(n),{container:s,input:r,label:o,labelText:a,description:c,messages:u,actions:i,arrayActions:n}}getInputControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("input");r.setAttribute("type",e.type),r.setAttribute("id",e.id),r.style.width="100%";const{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d}),f=d+" "+l;return r.setAttribute("aria-describedby",f),s.appendChild(o),s.appendChild(r),s.appendChild(c),s.appendChild(u),s.appendChild(i),i.appendChild(n),{container:s,input:r,label:o,labelText:a,description:c,messages:u,actions:i,arrayActions:n}}getRadiosControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getFieldset(),o=this.getCardBody(),a=this.getLegend({textContent:e.label,id:e.id}),l=e.id+"-messages",c=this.getMessagesSlot({id:l}),d=e.id+"-description",u=this.getDescription({textContent:e.description,id:d});e.titleHidden&&this.visuallyHidden(a);const f=[],b=[],S=[],$=[];return e.values.forEach((k,j)=>{const M=document.createElement("div");f.push(M);const N=document.createElement("input");N.setAttribute("type","radio"),N.setAttribute("id",e.id+"-"+j),N.setAttribute("value",k),b.push(N);const O=l+" "+d;N.setAttribute("aria-describedby",O);const X=document.createElement("label");X.setAttribute("for",e.id+"-"+j);const be=document.createElement("span");$.push(be),e.titles&&e.titles[j]&&(be.textContent=e.titles[j]),S.push(X)}),s.appendChild(r),s.appendChild(i),r.appendChild(a),r.appendChild(o),i.appendChild(n),f.forEach((k,j)=>{o.appendChild(f[j]),k.appendChild(b[j]),k.appendChild(S[j]),S[j].appendChild($[j])}),r.appendChild(u),r.appendChild(c),{container:s,fieldset:r,legend:a,body:o,radios:b,labels:S,labelTexts:$,radioControls:f,description:u,messages:c,actions:i,arrayActions:n}}getCheckboxControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("div"),o=document.createElement("input");o.setAttribute("type","checkbox"),o.setAttribute("id",e.id);const{label:a,labelText:l}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c}),u=e.id+"-messages",f=this.getMessagesSlot({id:u}),b=u+" "+c;return o.setAttribute("aria-describedby",b),s.appendChild(r),s.appendChild(i),i.appendChild(n),r.appendChild(o),r.appendChild(a),r.appendChild(d),r.appendChild(f),{container:s,formGroup:r,input:o,label:a,labelText:l,description:d,messages:f,actions:i,arrayActions:n}}getCheckboxesControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getFieldset(),o=this.getCardBody(),a=this.getLegend({textContent:e.label,id:e.id}),l=e.id+"-messages",c=this.getMessagesSlot({id:l}),d=e.id+"-description",u=this.getDescription({textContent:e.description,id:d});e.titleHidden&&this.visuallyHidden(a);const f=[],b=[],S=[],$=[];return e.values.forEach((k,j)=>{const M=document.createElement("div");f.push(M);const N=document.createElement("input");N.setAttribute("type","checkbox"),N.setAttribute("id",e.id+"-"+j),N.setAttribute("value",k),b.push(N);const O=l+" "+d;N.setAttribute("aria-describedby",O);const X=document.createElement("label");X.setAttribute("for",e.id+"-"+j);const be=document.createElement("span");$.push(be),e.titles&&e.titles[j]&&(be.textContent=e.titles[j]),S.push(X)}),s.appendChild(r),s.appendChild(i),r.appendChild(a),r.appendChild(o),i.appendChild(n),f.forEach((k,j)=>{o.appendChild(f[j]),k.appendChild(b[j]),k.appendChild(S[j]),S[j].appendChild($[j])}),o.appendChild(u),o.appendChild(c),{container:s,fieldset:r,legend:a,body:o,checkboxes:b,labels:S,labelTexts:$,checkboxControls:f,description:u,messages:c,actions:i,arrayActions:n}}getSelectControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("select");r.setAttribute("id",e.id),e.values.forEach((b,S)=>{const $=document.createElement("option");$.setAttribute("value",b),e.titles&&e.titles[S]&&($.textContent=e.titles[S]),r.appendChild($)});const{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d}),f=d+" "+l;return r.setAttribute("aria-describedby",f),s.appendChild(o),s.appendChild(r),s.appendChild(c),s.appendChild(u),s.appendChild(i),i.appendChild(n),{container:s,input:r,label:o,labelText:a,description:c,messages:u,actions:i,arrayActions:n}}getSwitcher(e){const s=document.createElement("span"),i=document.createElement("select");i.setAttribute("id",e.id),e.values.forEach((o,a)=>{const l=document.createElement("option");l.setAttribute("value",o),e.titles&&e.titles[a]&&(l.textContent=e.titles[a]),i.appendChild(l)});const{label:n,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return s.appendChild(n),s.appendChild(i),{container:s,input:i,label:n,labelText:r}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const s=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return i.textContent=e.message,n.textContent="⚠ ",n.classList.add("jedi-error-message"),n.setAttribute("aria-hidden","true"),s.classList.add("jedi-error-message"),s.appendChild(n),s.appendChild(i),s}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,s,i){const n=document.createElement("div");return n.classList.add("jedi-col-xs-"+e),n.classList.add("jedi-col-md-"+s),i&&n.classList.add("jedi-col-md-offset-"+i),n}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const s=document.createElement("li"),i=document.createElement("a");return i.classList.add("jedi-nav-link"),i.setAttribute("href","#"+e.id),i.textContent=e.hasErrors?"⚠ "+e.title:e.title,s.appendChild(i),{list:s,link:i}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,s,i){e.setAttribute("id",i),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}class pd extends Si{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const s=super.getCollapseToggle(e);return s.setAttribute("href","#"+e.collapseId),s.setAttribute("data-toggle","collapse"),s}getCollapse(e){const s=super.getCollapse(e);return s.classList.add("collapse"),e.startCollapsed||s.classList.add("in"),s}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const s=super.getLegend(e);return s.classList.add("h5"),s.classList.add("panel-heading"),s.classList.add("pull-left"),s.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),s}getLabel(e){const s=super.getLabel(e);return s.icon.classList&&s.icon.setAttribute("style","margin-right: 5px;"),s}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const s=super.getCardHeader(e);return s.classList.add("panel-heading"),s.classList.add("text-right"),s}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const s=super.getButton(e);return s.classList.add("btn"),s.classList.add("btn-xs"),s.classList.add("btn-default"),s}getDescription(e){const s=super.getDescription(e);return s.classList.add("text-muted"),s}getTextareaControl(e){const s=super.getTextareaControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getInputControl(e){const s=super.getInputControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getRadiosControl(e){const s=super.getRadiosControl(e),{body:i,radios:n,labels:r,labelTexts:o,radioControls:a,description:l,messages:c}=s;return a.forEach((d,u)=>{d.classList.add("radio"),i.appendChild(a[u]),d.appendChild(r[u]),r[u].appendChild(n[u]),r[u].appendChild(o[u])}),i.appendChild(l),i.appendChild(c),s}getCheckboxesControl(e){const s=super.getCheckboxesControl(e),{body:i,checkboxes:n,labels:r,labelTexts:o,checkboxControls:a}=s;return a.forEach((l,c)=>{l.classList.add("checkbox"),i.appendChild(a[c]),l.appendChild(r[c]),r[c].appendChild(n[c]),r[c].appendChild(o[c])}),s}getCheckboxControl(e){const s=super.getCheckboxControl(e),{container:i,formGroup:n,input:r,label:o,labelText:a,description:l,messages:c}=s;return n.classList.add("checkbox"),i.appendChild(n),n.appendChild(o),o.appendChild(r),o.appendChild(a),n.appendChild(l),n.appendChild(c),s}getSelectControl(e){const s=super.getSelectControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getAlert(e){const s=super.getAlert(e);return s.classList.add("alert"),s.classList.add("alert-danger"),s}getInvalidFeedback(e){const s=super.getInvalidFeedback(e);return s.classList.add("text-danger"),s}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,s,i){const n=super.getRow();return n.classList.add("col-xs-"+e),n.classList.add("col-md-"+s),i&&n.classList.add("col-md-offset-"+i),n}getTabList(e){const s=super.getTabList(e);return s.classList.add("nav"),e.type==="tabs"?s.classList.add("nav-tabs"):s.classList.add("nav-pills"),s.classList.add("nav-stacked"),e.stacked===!1&&s.classList.remove("nav-stacked"),s}getTab(e){const s=super.getTab(e);return e.active&&s.list.classList.add("active"),s.link.setAttribute("data-toggle","tab"),s}setTabPaneAttributes(e,s,i){super.setTabPaneAttributes(e,s,i),e.classList.add("tab-pane"),s&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}}class ud extends Si{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const s=super.getCollapseToggle(e);return s.setAttribute("href","#"+e.collapseId),s.setAttribute("data-toggle","collapse"),s}getCollapse(e){const s=super.getCollapse(e);return s.classList.add("collapse"),e.startCollapsed||s.classList.add("show"),s}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const s=super.getLegend(e);return s.classList.add("h6"),s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-between"),s.classList.add("align-items-center"),s.classList.add("float-left"),s.classList.add("py-2"),s}getLabel(e){const s=super.getLabel(e);return s.icon.classList&&s.icon.classList.add("mr-1"),s}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const s=super.getCardHeader(e);return s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-end"),s.classList.add("align-items-center"),s.classList.add("py-1"),s}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const s=super.getButton(e);return s.classList.add("btn"),s.classList.add("btn-sm"),s}getDescription(e){const s=super.getDescription(e);return s.classList.add("text-muted"),s}getTextareaControl(e){const s=super.getTextareaControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getInputControl(e){const s=super.getInputControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getRadiosControl(e){const s=super.getRadiosControl(e),{container:i,body:n,radios:r,labels:o,labelTexts:a,radioControls:l,description:c,messages:d}=s;return i.classList.add("form-group"),l.forEach((u,f)=>{u.classList.add("form-check"),r[f].classList.add("form-check-input"),o[f].classList.add("form-check-label"),n.appendChild(l[f]),u.appendChild(r[f]),u.appendChild(o[f]),o[f].appendChild(a[f])}),n.appendChild(c),n.appendChild(d),s}getCheckboxesControl(e){const s=super.getCheckboxesControl(e),{checkboxes:i,labels:n,checkboxControls:r}=s;return r.forEach((o,a)=>{o.classList.add("form-group"),o.classList.add("form-check"),i[a].classList.add("form-check-input"),n[a].classList.add("form-check-label")}),s}getCheckboxControl(e){const s=super.getCheckboxControl(e),{container:i,formGroup:n,input:r,label:o,description:a,messages:l}=s;return n.classList.add("form-group"),n.classList.add("form-check"),r.classList.add("form-check-input"),o.classList.add("form-check-label"),i.appendChild(n),n.appendChild(r),n.appendChild(o),n.appendChild(a),n.appendChild(l),s}getSelectControl(e){const s=super.getSelectControl(e),{container:i,input:n}=s;return i.classList.add("form-group"),n.classList.add("form-control"),s}getAlert(e){const s=super.getAlert(e);return s.classList.add("alert"),s.classList.add("alert-danger"),s}getInvalidFeedback(e){const s=super.getInvalidFeedback(e);return s.classList.add("text-danger"),s.classList.add("form-text"),s.classList.add("d-block"),s}getColumnClass(e,s){return"col-"+e+"-"+s}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,s,i){const n=super.getRow(e,s,i);return n.classList.add("col-"+e),n.classList.add("col-md-"+s),i&&n.classList.add("offset-md-"+i),n}getTabList(e){const s=super.getTabList();return s.classList.add("nav"),e.type==="tabs"?s.classList.add("nav-tabs"):s.classList.add("nav-pills"),s.classList.add("flex-column"),e.stacked===!1&&s.classList.remove("flex-column"),s}getTab(e){const s=super.getTab(e);return s.list.classList.add("nav-item"),s.link.classList.add("nav-link"),s.link.setAttribute("data-toggle","tab"),e.active&&s.link.classList.add("active"),s}setTabPaneAttributes(e,s,i){super.setTabPaneAttributes(e,s,i),e.classList.add("tab-pane"),s&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}}class hd extends Si{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const s=super.getCollapseToggle(e);return s.setAttribute("href","#"+e.collapseId),s.setAttribute("data-bs-toggle","collapse"),s}getCollapse(e){const s=super.getCollapse(e);return s.classList.add("collapse"),e.startCollapsed||s.classList.add("show"),s}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const s=super.getLegend(e);return s.classList.add("h6"),s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-between"),s.classList.add("align-items-center"),s.classList.add("py-2"),s}getLabel(e){const s=super.getLabel(e);return s.icon.classList&&s.icon.classList.add("me-1"),s}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const s=super.getCardHeader(e);return s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-end"),s.classList.add("align-items-center"),s.classList.add("py-1"),s}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const s=super.getButton(e);return s.classList.add("btn"),s.classList.add("btn-sm"),s}getDescription(e){const s=super.getDescription(e);return s.classList.add("text-muted"),s}getTextareaControl(e){const s=super.getTextareaControl(e),{container:i,input:n,label:r}=s;return i.classList.add("mb-3"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getInputControl(e){const s=super.getInputControl(e),{container:i,input:n,label:r}=s;return i.classList.add("mb-3"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getRadiosControl(e){const s=super.getRadiosControl(e),{container:i,body:n,radios:r,labels:o,labelTexts:a,radioControls:l,description:c,messages:d}=s;return i.classList.add("mb-3"),l.forEach((u,f)=>{u.classList.add("form-check"),r[f].classList.add("form-check-input"),o[f].classList.add("form-check-label"),n.appendChild(l[f]),u.appendChild(r[f]),u.appendChild(o[f]),o[f].appendChild(a[f])}),n.appendChild(c),n.appendChild(d),s}getCheckboxesControl(e){const s=super.getCheckboxesControl(e),{checkboxes:i,labels:n,checkboxControls:r}=s;return r.forEach((o,a)=>{o.classList.add("mb-3"),o.classList.add("form-check"),i[a].classList.add("form-check-input"),n[a].classList.add("form-check-label")}),s}getCheckboxControl(e){const s=super.getCheckboxControl(e),{container:i,formGroup:n,input:r,label:o,description:a,messages:l}=s;return i.classList.add("mb-3"),n.classList.add("form-check"),r.classList.add("form-check-input"),o.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(o),i.appendChild(n),n.appendChild(r),n.appendChild(o),n.appendChild(a),n.appendChild(l),s}getSelectControl(e){const s=super.getSelectControl(e),{container:i,input:n}=s;return i.classList.add("mb-3"),n.classList.add("form-select"),s}getAlert(e){const s=super.getAlert(e);return s.classList.add("alert"),s.classList.add("alert-danger"),s}getInvalidFeedback(e){const s=super.getInvalidFeedback(e);return s.classList.add("text-danger"),s.classList.add("d-block"),s.classList.add("form-text"),s.classList.add("form-text"),s}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,s,i){const n=super.getRow(e,s,i);return n.classList.add("col-"+e),n.classList.add("col-md-"+s),i&&n.classList.add("offset-md-"+i),n}getTabList(e){const s=super.getTabList(e);return s.classList.add("nav"),e.type==="tabs"?s.classList.add("nav-tabs"):s.classList.add("nav-pills"),s.classList.add("flex-column"),e.stacked===!1&&s.classList.remove("flex-column"),s}getTab(e){const s=super.getTab(e);return s.list.classList.add("nav-item"),s.link.classList.add("nav-link"),s.link.setAttribute("data-bs-toggle","tab"),e.active&&s.link.classList.add("active"),s}setTabPaneAttributes(e,s,i){super.setTabPaneAttributes(e,s,i),e.classList.add("tab-pane"),s&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}}const Ke={Schema:Rc,Utils:_c,EditorBoolean:Ti,EditorBooleanEnumRadio:Qo,EditorBooleanEnumSelect:Zo,EditorBooleanCheckbox:Xo,EditorString:tt,EditorStringEnumRadio:ea,EditorStringEnumSelect:ta,EditorStringTextarea:sa,EditorStringAwesomplete:ia,EditorStringInput:Ii,EditorNumber:Ds,EditorNumberEnumRadio:na,EditorNumberEnumSelect:ra,EditorNumberInput:oa,EditorObjectGrid:aa,EditorObjectNav:la,EditorObject:Li,EditorArrayNav:ca,EditorArray:On,EditorMultiple:da,EditorIfThenElse:An,EditorNull:pa,Theme:Si,ThemeBootstrap3:pd,ThemeBootstrap4:ud,ThemeBootstrap5:hd,RefParser:dd,Create:le};class fd extends Ke.EditorNull{static resolves(e){const s=Ke.Schema.getSchemaType(e),i=Ke.Schema.getSchemaXOption(e,"custom");return s==="null"&&Ke.Utils.isSet(i)}build(){super.build();const e=document.createElement("iframe");e.src="https://json-schema.org/",e.setAttribute("width","100%"),e.setAttribute("height","1000px"),this.control.container.appendChild(e)}}const md="object",gd="All Editors",yd=6,bd={booleans:{type:"object",title:"Booleans",properties:{"boolean-enum-select":{type:"boolean",title:"Boolean enum select",description:"A boolean editor using select input.",const:!0,"x-options":{format:"select",enumTitles:["No","Yes"]}},"boolean-enum-radio":{type:"boolean",title:"Boolean enum radio",description:"A boolean editor using radios.",const:!0,"x-options":{format:"radio",enumTitles:["No","Yes"]}},boolean:{type:"boolean",title:"Boolean",description:"A boolean editor checkbox.",const:!0,"x-options":{format:"checkbox"}}}},strings:{type:"object",title:"Strings",properties:{string:{type:"string",title:"String",description:"A string editor.",minLength:1},"string-textarea":{type:"string",title:"String textarea",description:"A string editor using textarea.",minLength:1,"x-options":{format:"textarea"}},"string-enum-select":{type:"string",title:"String enum select",description:"A string editor using select.",enum:["albert","betti","carl"],"x-options":{enumTitles:["Albert","Betti","Carl"]}},"string-enum-radio":{type:"string",title:"String enum radio",description:"A string editor using radios.",enum:["albert","betti","carl"],"x-options":{format:"radio",enumTitles:["Albert","Betti","Carl"]}}}},numbers:{type:"object",title:"Numbers",properties:{number:{type:"number",title:"Number",description:"A number editor.",minimum:1},"number-enum-select":{type:"number",title:"Number enum select",description:"A number editor using select.",enum:[1.5,2.5,3.5],"x-options":{enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}},"number-enum-radio":{type:"number",title:"Number enum radio",description:"A number editor using radios.",enum:[1.5,2.5,3.5],"x-options":{format:"radio",enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}}}},integers:{type:"object",title:"Integers",properties:{integer:{type:"integer",title:"Integer",description:"A integer editor.",minimum:1},"integer-enum-select":{type:"integer",title:"Integer enum select",description:"A integer editor using select.",enum:[1,2,3],"x-options":{enumTitles:["small (1)","medium (2)","big (3)"]}},"integer-enum-radio":{type:"number",title:"Integer enum radio",description:"A integer editor using radios.",enum:[1,2,3],"x-options":{format:"radio",enumTitles:["small (1)","medium (2)","big (3)"]}}}},arrays:{type:"object",title:"Arrays",description:"Object editor with array editors properties.",properties:{"string-array":{type:"array",title:"Colors",description:"Array of colors",items:{type:"string",title:"Color",not:{const:"#000000"},"x-options":{format:"color"}},default:["#e8f3ee","#fff9e6","#ffffff"],minItems:2}}},multiple:{type:"object",title:"Multiple",properties:{nestedOf:{title:"Nested of",oneOf:[{type:"string","x-options":{switcherTitle:"String"}},{type:"boolean","x-options":{switcherTitle:"Boolean"}},{title:"Any of","x-options":{switcherTitle:"Any of"},anyOf:[{type:"integer","x-options":{switcherTitle:"Integer"}},{type:"number","x-options":{switcherTitle:"Number"}},{title:"One of","x-options":{switcherTitle:"One of"},oneOf:[{type:"object","x-options":{switcherTitle:"Object"}},{type:"array","x-options":{switcherTitle:"Array"}},{type:"null","x-options":{switcherTitle:"Null"}}]}]}]},oneof:{title:"One of",oneOf:[{type:"boolean","x-options":{switcherTitle:"Boolean"}},{type:"string","x-options":{switcherTitle:"String"}},{type:"integer","x-options":{switcherTitle:"Integer"}}]},anyof:{title:"Any Of",anyOf:[{type:"array","x-options":{switcherTitle:"Array"}},{type:"object","x-options":{switcherTitle:"Object"}},{type:"null","x-options":{switcherTitle:"Null"}}]},"type-array":{title:"Type string or boolean",type:["string","boolean"]},"type-undefined":{title:"Type is undefined"},"type-any":{type:"any",title:"Type: any"}}}},yr={type:md,title:gd,minProperties:yd,properties:bd},vd="object",Cd={array:{type:"array",title:"Array",description:"Arrays are used for ordered elements. In JSON, each element in an array may be of a different type."},items:{type:"array",title:"items",description:"List validation is useful for arrays of arbitrary length where each item matches the same schema. For this kind of array, set the items keyword to a single schema that will be used to validate all of the items in the array. In the following example, we define that each item in an array is a number:",items:{title:"This is a number editor",type:"number"},"x-options":{sortable:!0}},prefixItems:{type:"array",title:"prefixItems",description:"prefixItems is an array, where each item is a schema that corresponds to each index of the document’s array. That is, an array where the first element validates the first element of the input array, the second element validates the second element of the input array, etc.",prefixItems:[{type:"number"},{type:"string"},{enum:["Street","Avenue","Boulevard"]},{enum:["NW","NE","SW","SE"]}]}},xd={type:vd,properties:Cd},wd="array-enum-titles",Ed="Array of unique values wich item types can be string, number or integer",Td="array",Id=!0,Ld={type:"string",enum:["value1","value2"]},Sd={title:wd,description:Ed,type:Td,uniqueItems:Id,items:Ld,default:["value1"]},jd="array",$d="Colors",Pd={type:"object",title:"Person",properties:{name:{title:"Name",type:"string",default:"German"},children:{title:"Children",type:"array",items:{type:"object",title:"Object",properties:{name:{title:"Name",type:"string",default:"German"}}}}}},Ad={type:jd,title:$d,"x-options":{itemTemplate:"{{ i1 }}) {{ value.name }} {{ value.children.0.name }}",nav:{variant:"pills",stacked:!0}},default:[{name:"Albert",children:[{name:"Child 1"},{name:"Child 2"}]},{name:"Betti",children:[{name:"Child 1"},{name:"Child 2"}]}],items:Pd},Od="array",kd="array-nav-tabs",_d={type:"object",title:"Person",properties:{name:{title:"Name",type:"string",default:"German"},children:{title:"Children",type:"array",items:{type:"object",title:"Object",properties:{name:{title:"Name",type:"string",default:"German"}}}}}},Dd={type:Od,title:kd,"x-options":{itemTemplate:"{{ i1 }}) {{ value.name }} {{ value.children.0.name }}",nav:{type:"tabs",cols:"12",stacked:"false"}},default:[{name:"Albert",children:[{name:"Child 1"},{name:"Child 2"}]},{name:"Betti",children:[{name:"Child 1"},{name:"Child 2"}]}],items:_d},Md="boolean",Rd="Boolean",Nd="The boolean type matches only two special values: true and false. Note that values that evaluate to true or false, such as 1 and 0, are not accepted by the schema.",Vd={type:Md,title:Rd,description:Nd},Bd="integer",Hd="Integer",Fd="The integer type is used for integral numbers.",qd={type:Bd,title:Hd,description:Fd},Ud="null",Kd="Null",Wd="When a schema specifies a type of null, it has only one acceptable value: null.",zd={type:Ud,title:Kd,description:Wd},Jd="number",Gd="Number",Yd="The number type is used for any numeric type, either integers or floating point numbers.",Qd={type:Jd,title:Gd,description:Yd},Zd="object",Xd="Object",ep="Objects are the mapping type in JSON. They map “keys” to “values”. In JSON, the “keys” must always be strings. Each of these pairs is conventionally referred to as a “property”.",tp=["required"],sp=!0,ip={required:{title:"Required",type:"string"},notRequired:{title:"Not required",type:"string"}},np={type:Zd,title:Xd,description:ep,required:tp,additionalProperties:sp,properties:ip},rp="object",op="Grid",ap={a:{title:"a",type:"string","x-options":{grid:{columns:1}}},b:{title:"b",type:"string","x-options":{grid:{columns:2}}},c:{title:"c",type:"string","x-options":{grid:{columns:3}}},d:{title:"d",type:"string","x-options":{grid:{columns:4}}},e:{title:"e",type:"string","x-options":{grid:{columns:5}}},f:{title:"f",type:"string","x-options":{grid:{columns:6}}},g:{title:"g",type:"string","x-options":{grid:{columns:7}}},h:{title:"h",type:"string","x-options":{grid:{columns:8}}},i:{title:"i",type:"string","x-options":{grid:{columns:9}}},j:{title:"j",type:"string","x-options":{grid:{columns:10}}},k:{title:"k",type:"string","x-options":{grid:{columns:11}}},l:{title:"l",type:"string","x-options":{grid:{columns:12,newRow:!0}}},m:{title:"m",type:"string","x-options":{grid:{newRow:!0,columns:1}}},n:{title:"n",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:1}}},o:{title:"o",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:2}}},p:{title:"p",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:3}}},q:{title:"q",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:4}}},r:{title:"r",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:5}}},s:{title:"s",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:6}}},t:{title:"t",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:7}}},u:{title:"u",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:8}}},v:{title:"v",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:9}}},w:{title:"w",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:10}}},x:{title:"x",type:"string","x-options":{grid:{columns:1,offset:11}}}},lp={type:rp,title:op,"x-options":{grid:!0},properties:ap},cp="object",dp="All Editors",pp="Description",up=6,hp={booleans:{type:"object",title:"Booleans",description:"Description",properties:{"boolean-enum-select":{type:"boolean",title:"Boolean enum select",description:"Description",const:!0,"x-options":{format:"select",enumTitles:["No","Yes"]}},"boolean-enum-radio":{type:"boolean",title:"Boolean enum radio",description:"Description",const:!0,"x-options":{format:"radio",enumTitles:["No","Yes"]}},boolean:{type:"boolean",title:"Boolean",description:"Description",const:!0}}},strings:{type:"object",title:"Strings",description:"Description",properties:{string:{type:"string",title:"String",description:"Description",minLength:1},"string-textarea":{type:"string",title:"String textarea",description:"Description",minLength:1,"x-options":{format:"textarea"}},"string-enum-select":{type:"string",title:"String enum select",description:"Description",enum:["albert","betti","carl"],"x-options":{enumTitles:["Albert","Betti","Carl"]}},"string-enum-radio":{type:"string",title:"String enum radio",description:"Description",enum:["albert","betti","carl"],"x-options":{format:"radio",enumTitles:["Albert","Betti","Carl"]}}}},numbers:{type:"object",title:"Numbers",description:"Description",properties:{number:{type:"number",title:"Number",description:"Description",minimum:1},"number-enum-select":{type:"number",title:"Number enum select",description:"Description",enum:[1.5,2.5,3.5],"x-options":{enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}},"number-enum-radio":{type:"number",title:"Number enum radio",description:"Description",enum:[1.5,2.5,3.5],"x-options":{format:"radio",enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}}}},integers:{type:"object",title:"Integers",description:"Description",properties:{integer:{type:"integer",title:"Integer",description:"Description",minimum:1},"integer-enum-select":{type:"integer",title:"Integer enum select",description:"Description",enum:[1,2,3],"x-options":{enumTitles:["small (1)","medium (2)","big (3)"]}},"integer-enum-radio":{type:"number",title:"Integer enum radio",description:"Description",enum:[1,2,3],"x-options":{format:"radio",enumTitles:["small (1)","medium (2)","big (3)"]}}}},arrays:{type:"object",title:"Arrays",description:"Description",properties:{"string-array":{type:"array",title:"Colors",description:"Description",items:{type:"string",title:"Color",description:"Description",not:{const:"#000000"},"x-options":{format:"color"}},default:["#e8f3ee","#fff9e6","#ffffff"],minItems:3}}},multiple:{type:"object",title:"Multiple",description:"Description",properties:{nestedOf:{title:"Nested of",description:"Description",oneOf:[{type:"string","x-options":{switcherTitle:"String"}},{type:"boolean","x-options":{switcherTitle:"Boolean"}},{title:"Any of",description:"Description","x-options":{switcherTitle:"Any of"},anyOf:[{type:"integer","x-options":{switcherTitle:"Integer"}},{type:"number","x-options":{switcherTitle:"Number"}},{title:"One of",description:"Description","x-options":{switcherTitle:"One of"},oneOf:[{type:"object","x-options":{switcherTitle:"Object"}},{type:"array","x-options":{switcherTitle:"Array"}},{type:"null","x-options":{switcherTitle:"Null"}}]}]}]},oneof:{title:"One of",description:"Description",oneOf:[{type:"boolean","x-options":{switcherTitle:"Boolean"}},{type:"string","x-options":{switcherTitle:"String"}},{type:"integer","x-options":{switcherTitle:"Integer"}}]},anyof:{title:"Any Of",description:"Description",anyOf:[{type:"array","x-options":{switcherTitle:"Array"}},{type:"object","x-options":{switcherTitle:"Object"}},{type:"null","x-options":{switcherTitle:"Null"}}]},"type-array":{title:"Type string or boolean",description:"Description",type:["string","boolean"]},"type-undefined":{title:"Type is undefined",description:"Description"},"type-any":{type:"any",title:"Type: any",description:"Description"}}}},fp={"x-options":{nav:{variant:"pills",stacked:!0}},type:cp,title:dp,description:pp,minProperties:up,properties:hp},mp="object",gp="All Editors",yp="Description",bp=6,vp={booleans:{type:"object",title:"Booleans",description:"Description",properties:{"boolean-enum-select":{type:"boolean",title:"Boolean enum select",description:"Description",const:!0,"x-options":{format:"select",enumTitles:["No","Yes"]}},"boolean-enum-radio":{type:"boolean",title:"Boolean enum radio",description:"Description",const:!0,"x-options":{format:"radio",enumTitles:["No","Yes"]}},boolean:{type:"boolean",title:"Boolean",description:"Description",const:!0}}},strings:{type:"object",title:"Strings",description:"Description",properties:{string:{type:"string",title:"String",description:"Description",minLength:1},"string-textarea":{type:"string",title:"String textarea",description:"Description",minLength:1,"x-options":{format:"textarea"}},"string-enum-select":{type:"string",title:"String enum select",description:"Description",enum:["albert","betti","carl"],"x-options":{enumTitles:["Albert","Betti","Carl"]}},"string-enum-radio":{type:"string",title:"String enum radio",description:"Description",enum:["albert","betti","carl"],"x-options":{format:"radio",enumTitles:["Albert","Betti","Carl"]}}}},numbers:{type:"object",title:"Numbers",description:"Description",properties:{number:{type:"number",title:"Number",description:"Description",minimum:1},"number-enum-select":{type:"number",title:"Number enum select",description:"Description",enum:[1.5,2.5,3.5],"x-options":{enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}},"number-enum-radio":{type:"number",title:"Number enum radio",description:"Description",enum:[1.5,2.5,3.5],"x-options":{format:"radio",enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}}}},integers:{type:"object",title:"Integers",description:"Description",properties:{integer:{type:"integer",title:"Integer",description:"Description",minimum:1},"integer-enum-select":{type:"integer",title:"Integer enum select",description:"Description",enum:[1,2,3],"x-options":{enumTitles:["small (1)","medium (2)","big (3)"]}},"integer-enum-radio":{type:"number",title:"Integer enum radio",description:"Description",enum:[1,2,3],"x-options":{format:"radio",enumTitles:["small (1)","medium (2)","big (3)"]}}}},arrays:{type:"object",title:"Arrays",description:"Description",properties:{"string-array":{type:"array",title:"Colors",description:"Description",items:{type:"string",title:"Color",description:"Description",not:{const:"#000000"},"x-options":{format:"color"}},default:["#e8f3ee","#fff9e6","#ffffff"],minItems:3}}},multiple:{type:"object",title:"Multiple",description:"Description",properties:{nestedOf:{title:"Nested of",description:"Description",oneOf:[{type:"string","x-options":{switcherTitle:"String"}},{type:"boolean","x-options":{switcherTitle:"Boolean"}},{title:"Any of",description:"Description","x-options":{switcherTitle:"Any of"},anyOf:[{type:"integer","x-options":{switcherTitle:"Integer"}},{type:"number","x-options":{switcherTitle:"Number"}},{title:"One of",description:"Description","x-options":{switcherTitle:"One of"},oneOf:[{type:"object","x-options":{switcherTitle:"Object"}},{type:"array","x-options":{switcherTitle:"Array"}},{type:"null","x-options":{switcherTitle:"Null"}}]}]}]},oneof:{title:"One of",description:"Description",oneOf:[{type:"boolean","x-options":{switcherTitle:"Boolean"}},{type:"string","x-options":{switcherTitle:"String"}},{type:"integer","x-options":{switcherTitle:"Integer"}}]},anyof:{title:"Any Of",description:"Description",anyOf:[{type:"array","x-options":{switcherTitle:"Array"}},{type:"object","x-options":{switcherTitle:"Object"}},{type:"null","x-options":{switcherTitle:"Null"}}]},"type-array":{title:"Type string or boolean",description:"Description",type:["string","boolean"]},"type-undefined":{title:"Type is undefined",description:"Description"},"type-any":{type:"any",title:"Type: any",description:"Description"}}}},Cp={"x-options":{nav:{variant:"tabs",cols:12,stacked:!1}},type:mp,title:gp,description:yp,minProperties:bp,properties:vp},xp="object",wp={a:{type:"string","x-options":{propertyOrder:30}},b:{type:"string","x-options":{propertyOrder:20}},c:{type:"string","x-options":{propertyOrder:10}}},Ep={type:xp,properties:wp},Tp="string",Ip="String",Lp="The string type is used for strings of text. It may contain Unicode characters.",Sp={type:Tp,title:Ip,description:Lp},jp="http://json-schema.org/draft-04/schema#",$p=!1,Pp={iso8601:{type:"string",description:"Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04",pattern:"^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$"}},Ap={$schema:{type:"string",description:"link to the version of the schema that can validate the resume",format:"uri"},basics:{type:"object",additionalProperties:!0,properties:{name:{type:"string"},label:{type:"string",description:"e.g. Web Developer"},image:{type:"string",description:"URL (as per RFC 3986) to a image in JPEG or PNG format"},email:{type:"string",description:"e.g. thomas@gmail.com",format:"email"},phone:{type:"string",description:"Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923"},url:{type:"string",description:"URL (as per RFC 3986) to your website, e.g. personal homepage",format:"uri"},summary:{type:"string",description:"Write a short 2-3 sentence biography about yourself"},location:{type:"object",additionalProperties:!0,properties:{address:{type:"string",description:`To add multiple address lines, use -. For example, 1234 Glücklichkeit Straße -Hinterhaus 5. Etage li.`},postalCode:{type:"string"},city:{type:"string"},countryCode:{type:"string",description:"code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN"},region:{type:"string",description:"The general region where you live. Can be a US state, or a province, for instance."}}},profiles:{type:"array",description:"Specify any number of social networks that you participate in",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{network:{type:"string",description:"e.g. Facebook or Twitter"},username:{type:"string",description:"e.g. neutralthoughts"},url:{type:"string",description:"e.g. http://twitter.example.com/neutralthoughts",format:"uri"}}}}}},work:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Facebook"},location:{type:"string",description:"e.g. Menlo Park, CA"},description:{type:"string",description:"e.g. Social Media Company"},position:{type:"string",description:"e.g. Software Engineer"},url:{type:"string",description:"e.g. http://facebook.example.com",format:"uri"},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},summary:{type:"string",description:"Give an overview of your responsibilities at the company"},highlights:{type:"array",description:"Specify multiple accomplishments",additionalItems:!1,items:{type:"string",description:"e.g. Increased profits by 20% from 2011-2012 through viral advertising"}}}}},volunteer:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{organization:{type:"string",description:"e.g. Facebook"},position:{type:"string",description:"e.g. Software Engineer"},url:{type:"string",description:"e.g. http://facebook.example.com",format:"uri"},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},summary:{type:"string",description:"Give an overview of your responsibilities at the company"},highlights:{type:"array",description:"Specify accomplishments and achievements",additionalItems:!1,items:{type:"string",description:"e.g. Increased profits by 20% from 2011-2012 through viral advertising"}}}}},education:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{institution:{type:"string",description:"e.g. Massachusetts Institute of Technology"},url:{type:"string",description:"e.g. http://facebook.example.com",format:"uri"},area:{type:"string",description:"e.g. Arts"},studyType:{type:"string",description:"e.g. Bachelor"},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},score:{type:"string",description:"grade point average, e.g. 3.67/4.0"},courses:{type:"array",description:"List notable courses/subjects",additionalItems:!1,items:{type:"string",description:"e.g. H1302 - Introduction to American history"}}}}},awards:{type:"array",description:"Specify any awards you have received throughout your professional career",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{title:{type:"string",description:"e.g. One of the 100 greatest minds of the century"},date:{$ref:"#/definitions/iso8601"},awarder:{type:"string",description:"e.g. Time Magazine"},summary:{type:"string",description:"e.g. Received for my work with Quantum Physics"}}}},certificates:{type:"array",description:"Specify any certificates you have received throughout your professional career",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Certified Kubernetes Administrator"},date:{$ref:"#/definitions/iso8601"},url:{type:"string",description:"e.g. http://example.com",format:"uri"},issuer:{type:"string",description:"e.g. CNCF"}}}},publications:{type:"array",description:"Specify your publications through your career",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. The World Wide Web"},publisher:{type:"string",description:"e.g. IEEE, Computer Magazine"},releaseDate:{$ref:"#/definitions/iso8601"},url:{type:"string",description:"e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html",format:"uri"},summary:{type:"string",description:"Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML."}}}},skills:{type:"array",description:"List out your professional skill-set",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Web Development"},level:{type:"string",description:"e.g. Master"},keywords:{type:"array",description:"List some keywords pertaining to this skill",additionalItems:!1,items:{type:"string",description:"e.g. HTML"}}}}},languages:{type:"array",description:"List any other languages you speak",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{language:{type:"string",description:"e.g. English, Spanish"},fluency:{type:"string",description:"e.g. Fluent, Beginner"}}}},interests:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Philosophy"},keywords:{type:"array",additionalItems:!1,items:{type:"string",description:"e.g. Friedrich Nietzsche"}}}}},references:{type:"array",description:"List references you have received",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Timothy Cook"},reference:{type:"string",description:"e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing."}}}},projects:{type:"array",description:"Specify career projects",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. The World Wide Web"},description:{type:"string",description:"Short summary of project. e.g. Collated works of 2017."},highlights:{type:"array",description:"Specify multiple features",additionalItems:!1,items:{type:"string",description:"e.g. Directs you close but not quite there"}},keywords:{type:"array",description:"Specify special elements involved",additionalItems:!1,items:{type:"string",description:"e.g. AngularJS"}},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},url:{type:"string",format:"uri",description:"e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html"},roles:{type:"array",description:"Specify your role on this project or in company",additionalItems:!1,items:{type:"string",description:"e.g. Team Lead, Speaker, Writer"}},entity:{type:"string",description:"Specify the relevant company/entity affiliations e.g. 'greenpeace', 'corporationXYZ'"},type:{type:"string",description:" e.g. 'volunteering', 'presentation', 'talk', 'application', 'conference'"}}}},meta:{type:"object",description:"The schema version and any other tooling configuration lives here",additionalProperties:!0,properties:{canonical:{type:"string",description:"URL (as per RFC 3986) to latest version of this document",format:"uri"},version:{type:"string",description:"A version field which follows semver - e.g. v1.0.0"},lastModified:{type:"string",description:"Using ISO 8601 with YYYY-MM-DDThh:mm:ss"}}}},Op="Resume Schema",kp="object",_p={$schema:jp,additionalProperties:$p,definitions:Pp,properties:Ap,title:Op,type:kp},Dp="object",Mp="Login",Rp=["email","password","keep","csfr"],Np={email:{title:"E-Mail",type:"string",format:"email","x-options":{labelIconClass:"fas fa-envelope"}},password:{title:"Password",type:"string",minLength:8,"x-options":{format:"password",labelIconClass:"fas fa-lock"}},keep:{title:"Remember me",type:"boolean","x-options":{format:"checkbox"}},csfr:{type:"string",default:"csfr","x-options":{format:"hidden"}}},Vp={type:Dp,title:Mp,required:Rp,"x-options":{enablePropertiesToggle:!1},properties:Np},Bp="Contact",Hp="object",Fp={name:{title:"Name",type:"string",minLength:1},email:{title:"E-Mail",type:"string",format:"email",minLength:3},message:{title:"Message",type:"string",minLength:1,"x-options":{format:"textarea"}},gdpr:{title:"I have read and accept the privacy policy",type:"boolean",default:!1,const:!0,"x-options":{format:"checkbox"}}},qp={title:Bp,type:Hp,properties:Fp},Up="additionalProperties",Kp="The additionalProperties keyword is used to control the handling of extra stuff, that is, properties whose names are not listed in the properties keyword or match any of the regular expressions in the patternProperties keyword. By default any additional properties are allowed. The value of the additionalProperties keyword is a schema that will be used to validate any properties in the instance that are not matched by properties or patternProperties.",Wp="object",zp={boolean:{title:"additionalProperties: false",description:"Setting the additionalProperties schema to false means no additional properties will be allowed.",type:"object",properties:{builtin:{type:"number"}},additionalProperties:!1},schema:{title:'additionalProperties: {"type": "string"}',description:"You can use non-boolean schemas to put more complex constraints on the additional properties of an instance. For example, one can allow additional properties, but only if their values are each a string",type:"object",properties:{builtin:{type:"number"}},additionalProperties:{type:"string"}}},Jp={title:Up,description:Kp,type:Wp,properties:zp},Gp="allOf",Yp="object",Qp="To validate against allOf, the given data must be valid against all of the given subschemas.",Zp={string:{type:"string",allOf:[{const:"test"},{minLength:1}]}},Xp={title:Gp,type:Yp,description:Qp,properties:Zp},eu="anyOf",tu="object",su="To validate against anyOf, the given data must be valid against any (one or more) of the given subschemas.",iu={string:{type:"string",anyOf:[{const:"Albert"},{const:"Betty"}]}},nu={title:eu,type:tu,description:su,properties:iu},ru="Test: const",ou="object",au="The const keyword is used to restrict a value to a single value.",lu={string:{type:"string",const:"test"},number:{type:"number",const:2.5},integer:{type:"integer",const:3},boolean:{type:"boolean",const:!0},array:{type:"array",items:{type:"string"},const:["test"]},object:{type:"object",properties:{test:{type:"string"}},const:{test:"test"}},multiple:{const:"test"}},cu={title:ru,type:ou,description:au,properties:lu},du="Test: contains",pu="object",uu="While the items schema must be valid for every item in the array, the contains schema only needs to validate against one or more items in the array.",hu={array:{type:"array",contains:{type:"number"},items:{type:"number"}}},fu={title:du,type:pu,description:uu,properties:hu},mu="dependentRequired",gu="object",yu="The dependentRequired keyword conditionally requires that certain properties must be present if a given property is present in an object. The value of the dependentRequired keyword is an object. Each entry in the object maps from the name of a property, p, to an array of strings listing properties that are required if p is present.",bu=["creditCard"],vu={creditCard:{title:"Credit Card",type:"number"},address:{title:"Address",type:"string"},telephone:{title:"Telephone",type:"string"}},Cu={creditCard:["address","telephone"]},xu={title:mu,type:gu,description:yu,required:bu,properties:vu,dependentRequired:Cu,"x-options":{showErrors:!0}},wu="dependentSchemas",Eu="object",Tu="The dependentSchemas keyword conditionally applies a subschema when a given property is present. This schema is applied in the same way allOf applies schemas. Nothing is merged or extended. Both schemas apply independently.",Iu=["name"],Lu={name:{type:"string"},credit_card:{type:"number"}},Su={credit_card:{properties:{billing_address:{type:"string"}},required:["billing_address"]}},ju={title:wu,type:Eu,description:Tu,required:Iu,properties:Lu,dependentSchemas:Su},$u="enum",Pu="object",Au="The enum keyword is used to restrict a value to a fixed set of values. It must be an array with at least one element, where each element is unique.",Ou={string:{type:"string",default:"Carl"}},ku={title:$u,type:Pu,description:Au,enum:[{string:"Albert"},{string:"Betti"}],properties:Ou},_u="exclusiveMaximum",Du="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",Mu="object",Ru={number:{type:"number",exclusiveMaximum:100},integer:{type:"integer",exclusiveMaximum:100}},Nu={title:_u,description:Du,type:Mu,properties:Ru},Vu="exclusiveMinimum",Bu="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",Hu="object",Fu={number:{type:"number",exclusiveMinimum:100},integer:{type:"integer",exclusiveMinimum:100}},qu={title:Vu,description:Bu,type:Hu,properties:Fu},Uu="object",Ku="format",Wu="The format keyword allows for basic semantic identification of certain kinds of string values that are commonly used. For example, because JSON doesn’t have a “DateTime” type, dates need to be encoded as strings. format allows the schema author to indicate that the string value should be interpreted as a date. By default, format is just an annotation and does not effect validation.",zu={email:{title:"E-Mail",type:"string",format:"email"}},Ju={type:Uu,title:Ku,description:Wu,properties:zu},Gu="if-else",Yu="object",Qu="The if, then and else keywords allow the application of a subschema based on the outcome of another schema, much like the if/then/else constructs you’ve probably seen in traditional programming languages. If if is valid, then must also be valid (and else is ignored.) If if is invalid, else must also be valid (and then is ignored). If then or else is not defined, if behaves as if they have a value of true. If then and/or else appear in a schema without if, then and else are ignored.",Zu={country:{type:"string",default:"America",enum:["America","Canada"]},postal_code:{type:"string"}},Xu={title:Gu,type:Yu,description:Qu,properties:Zu,if:{properties:{country:{const:"America"}}},else:{properties:{postal_code:{pattern:"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}},eh="if-then",th="object",sh="The if, then and else keywords allow the application of a subschema based on the outcome of another schema, much like the if/then/else constructs you’ve probably seen in traditional programming languages. If if is valid, then must also be valid (and else is ignored.) If if is invalid, else must also be valid (and then is ignored). If then or else is not defined, if behaves as if they have a value of true. If then and/or else appear in a schema without if, then and else are ignored.",ih={country:{type:"string",default:"America",enum:["America","Canada"]},postal_code:{type:"string"}},nh={properties:{postal_code:{pattern:"[0-9]{5}(-[0-9]{4})?"}}},rh={title:eh,type:th,description:sh,properties:ih,if:{properties:{country:{const:"America"}}},then:nh},oh="if-then-else",ah="object",lh="The if, then and else keywords allow the application of a subschema based on the outcome of another schema, much like the if/then/else constructs you’ve probably seen in traditional programming languages. If if is valid, then must also be valid (and else is ignored.) If if is invalid, else must also be valid (and then is ignored). If then or else is not defined, if behaves as if they have a value of true. If then and/or else appear in a schema without if, then and else are ignored.",ch={country:{type:"string",default:"America",enum:["America","Canada"]},postal_code:{type:"string"}},dh={properties:{postal_code:{pattern:"[0-9]{5}(-[0-9]{4})?"}}},ph={title:oh,type:ah,description:lh,properties:ch,if:{properties:{country:{const:"America"}}},then:dh,else:{properties:{postal_code:{pattern:"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}},uh="if-then-else-allOf",hh="object",fh="WIP",mh={name:{type:"string",default:"Betti",enum:["Albert","Betti","Carl"]},initial:{type:"string",enum:["A","B","C"]}},gh=[{if:{properties:{name:{const:"Albert"}}},then:{properties:{initial:{const:"A"}}}},{if:{properties:{name:{const:"Betti"}}},then:{properties:{initial:{const:"B"}}}},{if:{properties:{name:{const:"Carl"}}},then:{properties:{initial:{const:"C"}}}}],yh={title:uh,type:hh,description:fh,properties:mh,allOf:gh},bh="http://json-schema.org/draft-07/schema#",vh="object",Ch={vehicleType:{type:"string",enum:["car","motorcycle","bicycle","other"],default:"motorcycle"}},xh={properties:{numDoors:{type:"integer"}}},wh={$schema:bh,type:vh,properties:Ch,if:{properties:{vehicleType:{const:"car"}}},then:xh,else:{if:{properties:{vehicleType:{const:"motorcycle"}}},then:{properties:{numWheels:{type:"integer"}}},else:{if:{properties:{vehicleType:{const:"bicycle"}}},then:{properties:{numPedals:{type:"integer"}}},else:{properties:{make:{type:"string"},model:{type:"string"}}}}}},Eh="Detailed Occurrence Query",Th="object",Ih={occurrence:{title:"Did grey herons appear in your area during the hunting year 2016/17?",type:"string",default:"yes",enum:["yes","no"],"x-options":{format:"radio"}}},Lh={properties:{count:{title:"Estimated number of individuals in 2016/17",type:"integer",default:4,minimum:1}}},Sh={title:Eh,type:Th,properties:Ih,if:{properties:{occurrence:{const:"yes"}}},then:Lh,else:{properties:{count:{title:"Estimated number of individuals in 2016/17",type:"integer",const:0,readOnly:!0,"x-options":{enforceConst:!0}},something:{title:"Something else",type:"string"}}}},jh="Birds Data",$h="object",Ph=["grayGoose"],Ah={grayGoose:{title:"Gray Goose",$ref:"#/$defs/animal"}},Oh={animal:{type:"object",properties:{presence:{title:"Presence",type:"string",default:"unknown",enum:["yes","no","unknown"],"x-options":{format:"radio"}}},if:{properties:{presence:{const:"yes"}}},then:{properties:{nesting:{title:"Nesting",type:"string",default:"unknown",enum:["yes","no","unknown"],"x-options":{format:"radio"}},pairCount:{title:"Nesting Pairs Count"}},if:{properties:{nesting:{const:"yes"}}},then:{properties:{pairCount:{title:"Nesting Pairs Count",type:"integer",default:0,minimum:0}}},else:{if:{properties:{nesting:{const:"no"}}},then:{properties:{pairCount:{title:"Nesting Pairs Count",type:"integer",default:0,readOnly:!0}}},else:{properties:{pairCount:{title:"Nesting Pairs Count",description:"This value is set to null.",type:"null"}}}}},else:{if:{properties:{presence:{const:"no"}}},then:{properties:{nesting:{title:"Nesting",type:"string",default:"no",enum:["yes","no","unknown"],"x-options":{format:"radio"},readOnly:!0},pairCount:{title:"Nesting Pairs Count",type:"integer",default:0,readOnly:!0}}},else:{if:{properties:{presence:{const:"unknown"}}},then:{properties:{nesting:{title:"Nesting",type:"string",default:"unknown",enum:["yes","no","unknown"],"x-options":{format:"radio"},readOnly:!0},pairCount:{title:"Nesting Pairs Count",description:"This value is set to null.",type:"null"}}}}}}},kh={title:jh,type:$h,required:Ph,properties:Ah,$defs:Oh},_h="items",Dh="List validation is useful for arrays of arbitrary length where each item matches the same schema. For this kind of array, set the items keyword to a single schema that will be used to validate all of the items in the array.",Mh="array",Rh={type:"string"},Nh={title:_h,description:Dh,type:Mh,items:Rh},Vh="Test: maxContains",Bh="object",Hh="maxContains can be used with contains to further specify how many times a schema matches a contains constraint. These keywords can be any non-negative number including zero.",Fh={array:{type:"array",items:{type:"number"},contains:{type:"number"},maxContains:2}},qh={title:Vh,type:Bh,description:Hh,properties:Fh},Uh="maximum",Kh="object",Wh="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",zh={number:{type:"number",maximum:100},integer:{type:"integer",maximum:100}},Jh={title:Uh,type:Kh,description:Wh,properties:zh},Gh="maxItems",Yh="object",Qh="The length of the array can be specified using the minItems and maxItems keywords. The value of each keyword must be a non-negative number.",Zh={array:{type:"array",default:["Albert","Betti","Carl"],maxItems:3,items:{type:"string"}}},Xh={title:Gh,type:Yh,description:Qh,properties:Zh},ef="maxLength",tf="object",sf="The length of a string can be constrained using the minLength and maxLength keywords. For both keywords, the value must be a non-negative number.",nf={string:{type:"string",maxLength:5}},rf={title:ef,type:tf,description:sf,properties:nf},of="maxProperties",af="object",lf="The number of properties on an object can be restricted using the minProperties and maxProperties keywords. Each of these must be a non-negative integer.",cf=1,df={prop1:{title:"Property 1",type:"string"},prop2:{title:"Property 2",type:"string"}},pf={title:of,type:af,description:lf,maxProperties:cf,properties:df},uf="Test: minContains",hf="object",ff="minContains can be used with contains to further specify how many times a schema matches a contains constraint. These keywords can be any non-negative number including zero.",mf={array:{type:"array",items:{type:"number"},contains:{type:"number"},minContains:2}},gf={title:uf,type:hf,description:ff,properties:mf},yf="minimum",bf="object",vf="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",Cf={number:{type:"number",minimum:100},integer:{type:"integer",minimum:100}},xf={title:yf,type:bf,description:vf,properties:Cf},wf="minItems",Ef="object",Tf="The length of the array can be specified using the minItems and maxItems keywords. The value of each keyword must be a non-negative number.",If={array:{type:"array",minItems:1,items:{type:"string"}}},Lf={title:wf,type:Ef,description:Tf,properties:If},Sf="minLength",jf="object",$f="The length of a string can be constrained using the minLength and maxLength keywords. For both keywords, the value must be a non-negative number.",Pf={string:{type:"string",minLength:5}},Af={title:Sf,type:jf,description:$f,properties:Pf},Of="minProperties",kf="object",_f="The number of properties on an object can be restricted using the minProperties and maxProperties keywords. Each of these must be a non-negative integer.",Df=1,Mf={},Rf={title:Of,type:kf,description:_f,minProperties:Df,properties:Mf},Nf="multipleOf",Vf="object",Bf="Numbers can be restricted to a multiple of a given number, using the multipleOf keyword. It may be set to any positive number.",Hf={number:{type:"number",multipleOf:10},integer:{type:"integer",multipleOf:10}},Ff={title:Nf,type:Vf,description:Bf,properties:Hf},qf="not",Uf="object",Kf="The not keyword declares that an instance validates if it doesn’t validate against the given subschema.",Wf={test:{not:{type:"object"}}},zf={title:qf,type:Uf,description:Kf,properties:Wf},Jf="oneOf",Gf="object",Yf="To validate against oneOf, the given data must be valid against exactly one of the given subschemas.",Qf={number:{type:"number",oneOf:[{type:"number",multipleOf:3},{type:"number",multipleOf:5}]}},Zf={title:Jf,type:Gf,description:Yf,properties:Qf},Xf="pattern",em="object",tm="The pattern keyword is used to restrict a string to a particular regular expression. The regular expression syntax is the one defined in JavaScript (ECMA 262 specifically) with Unicode support.",sm={string:{type:"string",pattern:"^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$"}},im={title:Xf,type:em,description:tm,properties:sm},nm="patternProperties",rm="object",om="",am={"^S":{type:"string",const:"test"},"^I":{type:"integer",const:21}},lm={title:nm,type:rm,description:om,patternProperties:am},cm="array",dm=[{type:"number"},{type:"string"},{type:"string",enum:["Street","Avenue","Boulevard"]},{type:"string",enum:["NW","NE","SW","SE"]}],pm={type:cm,prefixItems:dm},um="propertyNames",hm="The names of properties can be validated against a schema, irrespective of their values. This can be useful if you don't want to enforce specific properties, but you want to make sure that the names of those properties follow a specific convention. You might, for example, want to enforce that all names are valid ASCII tokens so they can be used as attributes in a particular programming language.",fm="object",mm={pattern:"^[A-Za-z_][A-Za-z0-9_]*$"},gm={title:um,description:hm,type:fm,propertyNames:mm},ym="Object",bm="object",vm=`By default, the properties defined by the properties keyword are not required. However, one can provide a list of required properties using the required keyword. - -The required keyword takes an array of zero or more strings. Each of these strings must be unique.`,Cm=["required"],xm={optional:{title:"Optional property",type:"string"},required:{title:"Required property",type:"string"}},wm={title:ym,type:bm,description:vm,required:Cm,properties:xm},Em="type",Tm="object",Im="The type keyword is fundamental to JSON Schema. It specifies the data type for a schema.",Lm={string:{type:"string"},number:{type:"number"},integer:{type:"integer"},boolean:{type:"boolean"},null:{type:"null"},array:{type:"array"},object:{type:"object"}},Sm={title:Em,type:Tm,description:Im,properties:Lm},jm="uniqueItems",$m="object",Pm="A schema can ensure that each of the items in an array is unique. Simply set the uniqueItems keyword to true.",Am={array:{type:"array",default:["Albert","Betti"],uniqueItems:!0,items:{type:"string"}}},Om={title:jm,type:$m,description:Pm,properties:Am},km="message",_m="object",Dm={string:{type:"string",minLength:5,"x-options":{messages:["5 chars please."]}}},Mm={title:km,type:_m,properties:Dm},Rm="Awesomplete",Nm="string",Vm="Awesomplete is an ultra lightweight, customizable, simple autocomplete widget with zero dependencies, built with modern standards for modern browsers.",Bm=1,Hm={title:Rm,type:Nm,description:Vm,default:"Awesomplete default",minLength:Bm,"x-options":{awesomplete:{list:["JavaScript","Java","Python","Ruby","C++","C#","PHP","Swift","Go","Kotlin"],minChars:1,maxItems:5,autoFirst:!0}}},Fm="Quill",qm="string",Um="Quill is a modern WYSIWYG editor built for compatibility and extensibility.",Km=3,Wm={title:Fm,type:qm,description:Um,default:"Quill default",minLength:Km,"x-options":{quill:{theme:"snow"}}},zm="Jodit",Jm="string",Gm="Jodit - Best WYSIWYG Editor for You.",Ym=3,Qm={title:zm,type:Jm,description:Gm,default:"Jodit default",minLength:Ym,"x-options":{jodit:{}}},Zm="Flatpickr",Xm="string",eg="Flatpickr is a lightweight and powerful datetime picker.",tg=3,sg={title:Zm,type:Xm,description:eg,default:"2024-08-27",minLength:tg,"x-options":{flatpickr:{}}},ig="Raty",ng="number",rg="Raty - A Star Rating Plugin",og=.5,ag={title:ig,type:ng,description:rg,default:3,minimum:og,"x-options":{raty:{half:!0,starType:"i"}}},lg="Custom",cg="null",dg="This is a custom editor",pg={title:lg,type:cg,description:dg,"x-options":{custom:!0}},ug="#/$defs/schema",hg={schema:{"x-options":{editableProperties:!0,deactivateNonRequired:!0},type:"object",properties:{$anchor:{title:"$anchor",type:"string"},$comment:{title:"$comment",type:"string"},$defs:{title:"$defs",type:"object",additionalProperties:{$ref:"#/$defs/schema"}},$id:{title:"$id",type:"string"},$schema:{title:"$schema",type:"string",format:"uri"},$ref:{title:"$ref",type:"string"},additionalProperties:{title:"additionalProperties",$ref:"#/$defs/schema"},allOf:{title:"allOf",type:"array",items:{$ref:"#/$defs/schema"}},anyOf:{title:"anyOf",type:"array",items:{$ref:"#/$defs/schema"}},const:{title:"const",type:["object","array","string","number","integer","boolean","null"]},contains:{title:"contains",$ref:"#/$defs/schema"},default:{title:"default",type:["null","boolean","object","array","number","string","integer"]},dependentRequired:{title:"dependentRequired",type:"object",additionalProperties:{type:"array",uniqueItems:!0,items:{title:"property",type:"string"}}},dependentSchemas:{title:"dependentSchemas",type:"object",additionalProperties:{$ref:"#/$defs/schema"}},description:{title:"description",type:"string"},deprecated:{title:"deprecated",type:"boolean"},enum:{title:"enum",type:"array",minItems:1,uniqueItems:!0},example:{title:"example",type:["null","boolean","object","array","number","string","integer"]},exclusiveMaximum:{title:"exclusiveMaximum",type:"number"},exclusiveMinimum:{title:"exclusiveMinimum",type:"number"},format:{title:"format",type:"string"},if:{title:"if",$ref:"#/$defs/schema"},then:{title:"then",$ref:"#/$defs/schema"},else:{title:"else",$ref:"#/$defs/schema"},items:{title:"items",$ref:"#/$defs/schema"},maxContains:{title:"maxContains",type:"integer",minimum:0},maximum:{title:"maximum",type:"number"},maxItems:{title:"maxItems",type:"integer",minimum:0},maxLength:{title:"maxLength",type:"integer",minimum:0},maxProperties:{title:"maxProperties",type:"integer",minimum:0},minContains:{title:"minContains",type:"integer",minimum:0},minimum:{title:"minimum",type:"number"},minItems:{title:"minItems",type:"integer",minimum:0},minLength:{title:"minLength",type:"integer",minimum:0},minProperties:{title:"minProperties",type:"integer",minimum:0},multipleOf:{title:"multipleOf",type:"number",exclusiveMinimum:0},not:{title:"not",$ref:"#/$defs/schema"},oneOf:{title:"oneOf",type:"array",items:{$ref:"#/$defs/schema"}},pattern:{title:"pattern",type:"string",format:"regex"},patternProperties:{title:"patternProperties",type:"object",additionalProperties:{$ref:"#/$defs/schema"}},prefixItems:{title:"prefixItems",type:"array",items:{$ref:"#/$defs/schema"}},properties:{title:"properties",type:"object",additionalProperties:{$ref:"#/$defs/schema"},"x-options":{nav:{variant:"pills",stacked:!0}}},readOnly:{title:"readOnly",type:"boolean"},required:{title:"required",type:"array",uniqueItems:!0,items:{type:"string"}},title:{title:"title",type:"string"},type:{title:"type",type:"string",enum:["null","boolean","object","array","number","string","integer"]},uniqueItems:{title:"uniqueItems",type:"boolean"},writeOnly:{title:"writeOnly",type:"boolean"},"x-options":{title:"x-options",type:"object",properties:{format:{title:"format",type:"string"},labelIconClass:{title:"labelIconClass",type:"string"},itemTemplate:{title:"itemTemplate",type:"string"},switcherTitle:{title:"switcherTitle",type:"string"},nav:{title:"nav",type:"object"},grid:{title:"grid",type:"object"},enumTitles:{title:"enumTitles",type:"array",items:{type:"string"}},messages:{title:"messages",type:"array",items:{type:"string"}},titleHidden:{title:"titleHidden",type:"boolean"},enableCollapseToggle:{title:"enableCollapseToggle",type:"boolean"},startCollapsed:{title:"startCollapsed",type:"boolean"},showErrors:{title:"showErrors",type:"boolean"},deactivateNonRequired:{title:"deactivateNonRequired",type:"boolean"},mergeAllOf:{title:"mergeAllOf",type:"boolean"},validateFormat:{title:"validateFormat",type:"boolean"}}}}}},fg={$ref:ug,$defs:hg},mg="http://json-schema.org/draft-04/schema",gg="http://europass.cedefop.europa.eu/json/schema/v3.3.0/Europass_JSONSchema.json",yg="A JSON Representation of a Europass Document corresponding to Europass XML 3.3.0",bg="object",vg={documentTypeType:{type:"string",enum:["ECV_ESP","ESP","ECV","ELP","ECL","EX"]},documentBundleType:{type:"array",items:{$ref:"#/definitions/documentTypeType"}},preferencesType:{type:"array",items:{type:"object",properties:{name:{type:"string"},show:{type:"boolean"},order:{type:"string",enum:["FirstName Surname","Surname FirstName","Title FirstName Surname","Title Surname FirstName","FirstName Surname Title","Surname FirstName Title","Identification Headline WorkExperience Education Skills Achievement ReferenceTo","Identification Headline Education WorkExperience Skills Achievement ReferenceTo","Identification Skills ReferenceTo","Addressee Letter.SubjectLine Letter.OpeningSalutation Letter.Body Letter.Localisation Letter.ClosingSalutation","Letter.SubjectLine Addressee Letter.OpeningSalutation Letter.Body Letter.Localisation Letter.ClosingSalutation","Letter.Localisation Addressee Letter.SubjectLine Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Letter.SubjectLine Addressee Letter.Localisation Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Letter.Localisation Letter.SubjectLine Addressee Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Addressee Letter.Localisation Letter.SubjectLine Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Addressee Letter.SubjectLine Letter.Localisation Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Date Place","Place Date"]},format:{type:"string",enum:["s z m (c)","s, z m (c)","s,m z c","s, m, z c","s z m (c)","s z m c","s p-z m (c)","s p-z m c","s, p-z m (c)","s, z m, c","s, m, p-z (c)","s, m z (c)","s, z-m (c)","s, m, z (c)","text/short","text/long","text/long/suffix","text/long/texts","numeric/long","numeric/medium","numeric/short"]},position:{type:"string",enum:["left-align","right-align","middle-align"]},justify:{type:"boolean"}},additionalProperties:!1},minItems:0},personNameType:{description:"Describes the name of a person. Consists of a title (optionally), a first-name and surname.",type:"object",properties:{Title:{type:"object",properties:{Code:{type:"string",enum:["mr","ms","mrs","miss","dr"]},Label:{type:"string"}}},FirstName:{type:"string"},Surname:{type:"string"}},additionalProperties:!1},structuredDateType:{type:"object",properties:{Year:{type:"number"},Month:{type:"number"},Day:{type:"number"}},additionalProperties:!1},countryType:{description:"Defines a country. The country is described by a code and a label. E.g. code: FR, label: France.",type:"object",properties:{Code:{description:"Defines the country code type. The type is defined in the included schema 'EuropassISOCountries'. ",type:"string",pattern:"^[A-Z]{2}$"},Label:{type:"string"}},additionalProperties:!1},occupationalFieldType:{description:"The occupational field is described by a code and a label. E.g. code: 41150, label: Secretary.",type:"object",properties:{Code:{type:"string",pattern:"^[0-9]{5}$"},Label:{type:"string"}},additionalProperties:!1},periodType:{type:"object",properties:{Period:{type:"object",properties:{From:{$ref:"#/definitions/structuredDateType"},To:{$ref:"#/definitions/structuredDateType"},Current:{type:"boolean"}},additionalProperties:!1}}},fileDataType:{type:"object",properties:{Name:{type:"string"},Data:{type:"string",contentEncoding:"base64"},Metadata:{type:"array",items:{type:"object",properties:{Key:{type:"string"},Value:{type:"string"}},additionalProperties:!1},minItems:0},Id:{type:"string"}}},addressType:{type:"object",properties:{AddressLine:{type:"string"},AddressLine2:{type:"string"},PostalCode:{type:"string"},Municipality:{type:"string"},Country:{$ref:"#/definitions/countryType"}},additionalProperties:!1},websiteType:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["personal","business","blog","portfolio"]},Label:{type:"string"}},additionalProperties:!1}},additionalProperties:!1},organisationalWebsiteType:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["business"]}},additionalProperties:!1}},additionalProperties:!1},organisationType:{type:"object",properties:{Name:{type:"string"},ContactInfo:{type:"object",properties:{Address:{type:"object",properties:{Contact:{$ref:"#/definitions/addressType"}}},Website:{$ref:"#/definitions/organisationalWebsiteType"}}}}},referenceToListType:{type:"array",items:{type:"object",properties:{idref:{type:"string"}}},minItems:0},sectionReferenceToListType:{type:"object",properties:{ReferenceTo:{$ref:"#/definitions/referenceToListType"}}},genericDocumentationType:{type:"object",properties:{Heading:{$ref:"#/definitions/documentationHeadingType"},InterDocument:{type:"array",items:{type:"object",properties:{ref:{$ref:"#/definitions/documentTypeType"}}},minItems:0},IntraDocument:{$ref:"#/definitions/referenceToListType"},ExtraDocument:{type:"array",items:{type:"object",properties:{Description:{type:"string"},href:{type:"string"}}},minItems:0}},additionalProperties:!1},languageNameType:{description:"The mother language code is defined in the included schema 'EuropassISOLanguages'.",type:"object",properties:{Description:{type:"object",properties:{Code:{type:"string"},Label:{type:"string"}},additionalProperties:!1}}},genericSkillType:{allOf:[{$ref:"#/definitions/sectionReferenceToListType"},{properties:{Description:{type:"string"}}}]},cefrLevelType:{type:"string",enum:["A1","A2","B1","B2","C1","C2"]},ictLevelType:{type:"string",enum:["A","B","C"]},basicExperienceType:{type:"object",allOf:[{$ref:"#/definitions/periodType"},{properties:{Description:{type:"string"}}},{$ref:"#/definitions/sectionReferenceToListType"}]},openingSalutationType:{description:"Defines the opening salutation in a letter. It is described by a code (optional) and a label. E.g. code: salutation_2, label: Dear Mrs.",type:"object",properties:{Code:{type:"string",pattern:"^opening-salut-[1-9]{1}([0-9]{1})?(-impersonal)?$"},Label:{type:"string"}},additionalProperties:!1},closingSalutationType:{description:"Defines the closing salutation in a letter. It is described by a code (optional) and a label. E.g. code: closing_salutation_2, label: Your's faithfully.",type:"object",properties:{Code:{type:"string",pattern:"^closing-salut-[1-9]{1}([0-9]{1})?$"},Label:{type:"string"}},additionalProperties:!1},documentationHeadingType:{description:"Defines the label to indicate that there are documents accompanying a letter. It is described by a code (optional) and a label. E.g. code: heading_1, label: Enclosed.",type:"object",properties:{Code:{type:"string",pattern:"^heading_[1-9]{1}$"},Label:{type:"string"}},additionalProperties:!1}},Cg=!1,xg={SkillsPassport:{type:"object",description:"Defines a sequence of elements that fully describe a Europass XML document.",properties:{Locale:{title:"the language of this document",type:"string",pattern:"^[a-z]{2}$"},DocumentInfo:{title:"metadata information about this document",type:"object",properties:{DocumentType:{$ref:"#/definitions/documentTypeType"},Document:{$ref:"#/definitions/documentBundleType"},CreationDate:{type:"string"},LastUpdateDate:{type:"string"},XSDVersion:{type:"string",pattern:"^V[0-9]\\.[0-9]$"},Generator:{type:"string"},Comment:{type:"string"},EuropassLogo:{type:"boolean"}},additionalProperties:!1},PrintingPreferences:{title:"Printing preferences",type:"object",anyOf:[{type:"object",properties:{ECV:{$ref:"#/definitions/preferencesType"}}},{type:"object",properties:{ELP:{$ref:"#/definitions/preferencesType"}}},{type:"object",properties:{ECL:{$ref:"#/definitions/preferencesType"}}},{type:"object",properties:{ESP:{$ref:"#/definitions/preferencesType"}}}]},LearnerInfo:{type:"object",properties:{Identification:{title:"Personal Information",description:"Contains the personal information of the individual, which includes at least the name, and contact information, demographics and photo.",type:"object",properties:{PersonName:{$ref:"#/definitions/personNameType"},ContactInfo:{description:"Contains all the available methods of contacting individual.",type:"object",properties:{Address:{description:"Defines the residence address of an individual.",type:"object",properties:{Contact:{$ref:"#/definitions/addressType"}},additionalProperties:!1},Email:{description:"Defines the email address of an individual.",type:"object",properties:{Contact:{type:"string"}},additionalProperties:!1},Telephone:{description:"Lists the telephone numbers owned by the individual.",type:"array",items:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["home","work","mobile"]},Label:{type:"string"}}}},additionalProperties:!1},minItems:0},Website:{description:"Lists the websites that are owned, built by or refer to the individual.",type:"array",items:{$ref:"#/definitions/websiteType"},minItems:0},InstantMessaging:{description:"Lists the instant messaging accounts numbers owned by the individual.",type:"array",items:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["gtalk","skype","icq","aim","msn","yahoo"]},Label:{type:"string"}}}},additionalProperties:!1},minItems:0}},additionalProperties:!1},Demographics:{description:"Contains demographics-related information about the individual. It includes the birthdate, gender and list of nationalities.",type:"object",properties:{Birthdate:{$ref:"#/definitions/structuredDateType"},Gender:{type:"object",properties:{Code:{type:"string",enum:["M","F"]},Label:{type:"string"}}},Nationality:{description:"Defines a nationality. The nationality is described by a code and is a text only element. E.g. code: DE, label: German.",type:"array",items:{type:"object",properties:{Code:{type:"string",pattern:"^[A-Z]{2}$"},Label:{type:"string"}},additionalProperties:!1},minItems:0}},additionalProperties:!1},Photo:{allOf:[{$ref:"#/definitions/fileDataType"},{properties:{MimeType:{type:"string",enum:["image/jpeg","image/pjpeg","image/png","image/x-png"]}}}]},Signature:{allOf:[{$ref:"#/definitions/fileDataType"},{properties:{MimeType:{type:"string",enum:["image/jpeg","image/pjpeg","image/png","image/x-png"]}}}]}}},Headline:{title:"desired employment/ occupation field",description:"Contains a headline label for the current document. It is optional and may accommodate various cases.",type:"object",properties:{Type:{type:"object",properties:{Code:{type:"string",enum:["preferred_job","job_applied_for","studies_applied_for","position","personal_statement"]},Label:{type:"string"}},additionalProperties:!1},Description:{type:"object",properties:{Code:{type:"string",pattern:"^[0-9]{5}$"},Label:{type:"string"}},additionalProperties:!1}},additionalProperties:!1},WorkExperience:{title:"list of work experiences",description:"Contains an list of work experiences. The order of those experiences is defined by the related printing preferences.",type:"array",items:{allOf:[{$ref:"#/definitions/basicExperienceType"},{properties:{Position:{$ref:"#/definitions/occupationalFieldType"},Activities:{type:"string"},Employer:{allOf:[{$ref:"#/definitions/organisationType"},{properties:{Sector:{type:"object",properties:{Code:{type:"string",pattern:"^[A-U]{1}$"},Label:{type:"string"}},additionalProperties:!1}}}]}}},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0},Education:{title:"list of education experiences",description:"Contains an list of learning achievements or a training periods (formal or not). The order of those experiences is defined by the related printing preferences.",type:"array",items:{allOf:[{$ref:"#/definitions/basicExperienceType"},{properties:{Title:{type:"string"},Activities:{type:"string"},Organisation:{$ref:"#/definitions/organisationType"},Field:{type:"object",properties:{Code:{type:"string",pattern:"^[0-9]{2}$"},Label:{type:"string"}},additionalProperties:!1},Level:{type:"object",properties:{Code:{type:"string",pattern:"^[1-8]{1}$"},Label:{type:"string"}},additionalProperties:!1}}},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0},Skills:{title:"Skills",description:"Contains a sequence of skills and competences that the learner has acquired during any formal or informal experience.",type:"object",properties:{Linguistic:{type:"object",properties:{MotherTongue:{type:"array",items:{allOf:[{$ref:"#/definitions/languageNameType"},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0},ForeignLanguage:{type:"array",items:{allOf:[{$ref:"#/definitions/languageNameType"},{properties:{ProficiencyLevel:{type:"object",properties:{Listening:{$ref:"#/definitions/cefrLevelType"},Reading:{$ref:"#/definitions/cefrLevelType"},SpokenInteraction:{$ref:"#/definitions/cefrLevelType"},SpokenProduction:{$ref:"#/definitions/cefrLevelType"},Writing:{$ref:"#/definitions/cefrLevelType"}},additionalProperties:!1},Experience:{description:"Describes a list of linguistic experiences",type:"array",items:{allOf:[{$ref:"#/definitions/basicExperienceType"},{properties:{Area:{type:"object",properties:{Code:{type:"string",enum:["studying_training_language","work_language","living_traveling_language","mediating_groups_language"]},Label:{type:"string"}}}}}]},minItems:0},Certificate:{description:"Describes a list of linguistic certificates",type:"array",items:{type:"object",properties:{Title:{type:"string"},AwardingBody:{type:"string"},Date:{$ref:"#/definitions/structuredDateType"},Level:{$ref:"#/definitions/cefrLevelType"}},additionalProperties:!1},minItems:0}}},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0}}},Communication:{$ref:"#/definitions/genericSkillType"},Organisational:{$ref:"#/definitions/genericSkillType"},JobRelated:{$ref:"#/definitions/genericSkillType"},Computer:{description:"Describes a person's computer skills, including self assesement and c ertifications if applicable",type:"object",allOf:[{properties:{Description:{type:"string"},ProficiencyLevel:{type:"object",properties:{Information:{$ref:"#/definitions/ictLevelType"},Communication:{$ref:"#/definitions/ictLevelType"},ContentCreation:{$ref:"#/definitions/ictLevelType"},Safety:{$ref:"#/definitions/ictLevelType"},ProblemSolving:{$ref:"#/definitions/ictLevelType"}},additionalProperties:!1},Certificate:{description:"Describes a list of computer certificates",type:"array",items:{type:"object",properties:{Title:{type:"string"}},additionalProperties:!1},minItems:0}}},{$ref:"#/definitions/sectionReferenceToListType"}]},Driving:{allOf:[{properties:{Description:{type:"array",items:{type:"string",enum:["A","B","C","D","A1","B1","C1","D1","BE","CE","DE","C1E","D1E"]},minItems:0}}},{$ref:"#/definitions/sectionReferenceToListType"}]},Other:{$ref:"#/definitions/genericSkillType"}},additionalProperties:!1},Achievement:{title:"Achievements",description:"Contains a list of additional information about the various achievements of an individual, such as participation to conferences, workshops, memberships to organisations, list of publications, etc.",type:"array",items:{allOf:[{$ref:"#/definitions/sectionReferenceToListType"},{properties:{Title:{type:"object",properties:{Code:{type:"string",enum:["honors_awards","publications","presentations","projects","citations","memberships","conferences","seminars","workshops","references","signature_equivalent","courses","certifications"]},Label:{type:"string"}}},Description:{type:"string"}}}]},minItems:0},ReferenceTo:{type:"array",items:{type:"object",properties:{idref:{type:"string"}}},minItems:0}}},Attachment:{type:"array",items:{allOf:[{$ref:"#/definitions/fileDataType"},{properties:{MimeType:{type:"string",enum:["image/jpeg","image/pjpeg","image/png","image/x-png","application/pdf"]},Description:{type:"string"}}}]},minItems:0},CoverLetter:{type:"object",properties:{Addressee:{type:"object",properties:{PersonName:{$ref:"#/definitions/personNameType"},Position:{$ref:"#/definitions/occupationalFieldType"},Organisation:{$ref:"#/definitions/organisationType"}},additionalProperties:!1},Letter:{type:"object",properties:{Localisation:{type:"object",properties:{Date:{$ref:"#/definitions/structuredDateType"},Place:{type:"object",properties:{Municipality:{type:"string"},Country:{$ref:"#/definitions/countryType"}},additionalProperties:!1}},additionalProperties:!1},SubjectLine:{type:"string"},OpeningSalutation:{type:"object",properties:{Salutation:{$ref:"#/definitions/openingSalutationType"},PersonName:{$ref:"#/definitions/personNameType"}},additionalProperties:!1},Body:{type:"object",properties:{Opening:{type:"string"},MainBody:{type:"string"},Closing:{type:"string"}},additionalProperties:!1},ClosingSalutation:{$ref:"#/definitions/closingSalutationType"}},additionalProperties:!1},Documentation:{$ref:"#/definitions/genericDocumentationType"}},additionalProperties:!1}},additionalProperties:!1}},wg={$schema:mg,id:gg,description:yg,type:bg,definitions:vg,additionalProperties:Cg,properties:xg},Eg="Rotfuchs",Tg="object",Ig={vk:{title:"Kamen die Arten im Jagdjahr 2018/2019 in Ihrem Revier vor?",type:"string",enum:["ja","nein","unbekannt","keine Angabe"],"x-options":{format:"radio"}}},Lg={properties:{anzahl:{$ref:"#/$defs/anzahl",type:"integer",minimum:1},jagdstrecke:{$ref:"#/$defs/jagdstrecke",properties:{erlegung:{$ref:"#/$defs/erlegung",minimum:1},fangjagd:{$ref:"#/$defs/fangjagd",minimum:1},unfallwild:{$ref:"#/$defs/unfallwild",minimum:1},fallwild:{$ref:"#/$defs/fallwild",minimum:1}}},summe:{$ref:"#/$defs/summe",minimum:1}}},Sg={anzahl:{title:"Anzahl der Gehecke",type:"integer"},jagdstrecke:{title:"Jagdstrecke 2022/23",type:"object"},erlegung:{title:"Erlegung Stk.",type:"integer"},fangjagd:{title:"Fangjagd Stk.",type:"integer"},unfallwild:{title:"Unfallwild Stk.",type:"integer"},fallwild:{title:"Fallwild Stk.",type:"integer"},summe:{title:"Summe Jagdstrecke 2022/23",type:"integer"}},jg={title:Eg,type:Tg,properties:Ig,if:{properties:{vk:{const:"ja"}}},then:Lg,else:{if:{properties:{vk:{const:"nein"}}},then:{properties:{anzahl:{$ref:"#/$defs/anzahl",readOnly:!0,default:0,const:0},jagdstrecke:{readOnly:!0,$ref:"#/$defs/jagdstrecke",properties:{erlegung:{$ref:"#/$defs/erlegung",default:0,const:0},fangjagd:{$ref:"#/$defs/fangjagd",default:0,const:0},unfallwild:{$ref:"#/$defs/unfallwild",default:0,const:0},fallwild:{$ref:"#/$defs/fallwild",default:0,const:0}}},summe:{$ref:"#/$defs/summe",readOnly:!0,default:0,const:0}}},else:{properties:{anzahl:{$ref:"#/$defs/anzahl",type:"null",description:"keine Angabe"},jagdstrecke:{readOnly:!0,$ref:"#/$defs/jagdstrecke",properties:{erlegung:{$ref:"#/$defs/erlegung",type:"null",description:"keine Angabe"},fangjagd:{$ref:"#/$defs/fangjagd",type:"null",description:"keine Angabe"},unfallwild:{$ref:"#/$defs/unfallwild",type:"null",description:"keine Angabe"},fallwild:{$ref:"#/$defs/fallwild",type:"null",description:"keine Angabe"}}},summe:{$ref:"#/$defs/summe",type:"null",description:"keine Angabe"}}}},$defs:Sg},$g=(t,e)=>{const s=t.__vccOpts||t;for(const[i,n]of e)s[i]=n;return s},Pg={data(){return{errorCount:0,examples:{Editors:{"editors/all":yr,"editors/array":xd,"editors/array-enum-items":Sd,"editors/array-nav-pills":Ad,"editors/array-nav-tabs":Dd,"editors/boolean":Vd,"editors/integer":qd,"editors/null":zd,"editors/number":Qd,"editors/object":np,"editors/object-grid":lp,"editors/object-nav-pills":fp,"editors/object-nav-tabs":Cp,"editors/object-propertyOrder":Ep,"editors/string":Sp},Validators:{"validator/additionalProperties":Jp,"validator/allOf":Xp,"validator/anyOf":nu,"validator/const":cu,"validator/contains":fu,"validator/dependentRequired":xu,"validator/dependentSchemas":ju,"validator/enum":ku,"validator/exclusiveMaximum":Nu,"validator/exclusiveMinimum":qu,"validator/format":Ju,"validator/if-else":Xu,"validator/if-then":rh,"validator/if-then-else":ph,"validator/if-then-else-allOf":yh,"validator/if-then-else-nested":wh,"validator/if-then-else-nested-simple":Sh,"validator/if-then-else-nested-complex":kh,"validator/items":Nh,"validator/maxContains":qh,"validator/maximum":Jh,"validator/maxItems":Xh,"validator/maxLength":rf,"validator/maxProperties":pf,"validator/minContains":gf,"validator/minimum":xf,"validator/minItems":Lf,"validator/minLength":Af,"validator/minProperties":Rf,"validator/multipleOf":Ff,"validator/not":zf,"validator/oneOf":Zf,"validator/pattern":im,"validator/patternProperties":lm,"validator/prefixItems":pm,"validator/propertyNames":gm,"validator/required":wm,"validator/type":Sm,"validator/uniqueItems":Om,"validator/messages":Mm},Plugins:{"plugins/awesomplete":Hm,"plugins/quill":Wm,"plugins/jodit":Qm,"plugins/flatpickr":sg,"plugins/raty":ag},Examples:{"examples/resume-schema":_p,"examples/login":Vp,"examples/contact":qp,"custom/custom":pg,"meta-schema":fg,"europass-xml-3.3.0":wg,test:jg}},example:"editors/all",themes:["bootstrap5","bootstrap4","bootstrap3","barebones"],iconLibs:["none","glyphicons","bootstrap-icons","fontawesome3","fontawesome4","fontawesome5","fontawesome6"],showErrorsOptions:["never","change","always"],enablePropertiesToggle:!0,enableCollapseToggle:!0,startCollapsed:!1,schema:yr,editor:null,theme:"barebones",iconLib:"bootstrap-icons",showErrors:"change",validateFormat:!1,mergeAllOf:!1,enforceEnumDefault:!1}},created(){this.theme=this.getQueryParam("theme")||"bootstrap5",this.iconLib=this.getQueryParam("iconLib")||"fontawesome5",this.example=this.getQueryParam("example")||"editors/all",this.showErrors=this.getQueryParam("showErrors")||"change",this.validateFormat=this.getQueryParam("validateFormat")?this.parseBooleanString(this.getQueryParam("validateFormat")):!1,this.mergeAllOf=this.getQueryParam("mergeAllOf")?this.parseBooleanString(this.getQueryParam("mergeAllOf")):!1,this.enforceEnumDefault=this.getQueryParam("enforceEnumDefault")?this.parseBooleanString(this.getQueryParam("enforceEnumDefault")):!0,this.enablePropertiesToggle=this.getQueryParam("enablePropertiesToggle")?this.parseBooleanString(this.getQueryParam("enablePropertiesToggle")):!0,this.enableCollapseToggle=this.getQueryParam("enableCollapseToggle")?this.parseBooleanString(this.getQueryParam("enableCollapseToggle")):!0},mounted(){switch(this.theme){case"bootstrap3":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css"]),this.loadScripts(["https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js","https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js"]);break;case"bootstrap4":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"]),this.loadScripts(["https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js","https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js","https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"]);break;case"bootstrap5":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"]),this.loadScripts(["https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"]);break}switch(this.iconLib){case"bootstrap-icons":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css"]);break;case"fontawesome3":this.loadStylesheets(["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.1/css/font-awesome.css"]);break;case"fontawesome4":this.loadStylesheets(["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css"]);break;case"fontawesome5":this.loadStylesheets(["https://use.fontawesome.com/releases/v5.6.1/css/all.css"]);break;case"fontawesome6":this.loadStylesheets(["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"]);break}this.initEditor()},methods:{getThemeInstance(t){let e;switch(t){case"barebones":e=new Ke.Theme;break;case"bootstrap3":e=new Ke.ThemeBootstrap3;break;case"bootstrap4":e=new Ke.ThemeBootstrap4;break;case"bootstrap5":e=new Ke.ThemeBootstrap5;break}return e},getSchema(){return Object.assign({},...Object.values(this.examples))[this.example]||null},async initEditor(t){this.editor&&this.editor.destroy(),this.schema=t??this.getSchema();const e=new Ke.RefParser;await e.dereference(this.schema);const s={container:document.querySelector("#jedi-container"),enablePropertiesToggle:this.enablePropertiesToggle,enableCollapseToggle:this.enableCollapseToggle,startCollapsed:this.startCollapsed,iconLib:this.iconLib,showErrors:this.showErrors,validateFormat:this.validateFormat,mergeAllOf:this.mergeAllOf,enforceEnumDefault:this.enforceEnumDefault,schema:this.schema,theme:this.getThemeInstance(this.theme),refParser:e,customEditors:[fd]};this.editor=new Ke.Create(s),window.editor=this.editor,this.editorChangeHandler(),this.editor.on("change",this.editorChangeHandler)},editorChangeHandler(){const t=this.editor.getErrors();this.errorCount=t.length,this.$refs.editorErrors.value=JSON.stringify(t,null,2),this.$refs.editorValue.value=JSON.stringify(this.editor.getValue(),null,2),this.$refs.schema.value=JSON.stringify(this.editor.schema,null,2)},showValidationErrors(){const t=this.editor.getErrors();this.editor.showValidationErrors(t)},destroyEditor(){this.editor.destroy()},enableEditor(){this.editor.enable()},disableEditor(){this.editor.disable()},setEditorValue(){this.editor.setValue(JSON.parse(this.$refs.editorValue.value))},setSchema(){this.schema=JSON.parse(this.$refs.schema.value),this.initEditor(this.schema)},reload(){let t=window.location.origin+window.location.pathname;t+="?theme="+this.theme,t+="&iconLib="+this.iconLib,t+="&example="+this.example,t+="&showErrors="+this.showErrors,t+="&validateFormat="+this.validateFormat,t+="&mergeAllOf="+this.mergeAllOf,t+="&enforceEnumDefault="+this.enforceEnumDefault,t+="&enablePropertiesToggle="+this.enablePropertiesToggle,t+="&enableCollapseToggle="+this.enableCollapseToggle,window.open(t,"_self")},getQueryParam(t){const e=RegExp("[?&]"+t+"=([^&]*)").exec(window.location.search);return e&&decodeURIComponent(e[1].replace(/\+/g," "))},parseBooleanString(t){return t==="true"},loadStylesheets(t){const e=document.head;for(let s=0;s0&&i(t[0])}}},Ag={class:"row"},Og={class:"col-xs-12 col-sm-8"},kg={class:"btn-group"},_g={action:"",method:"POST"},Dg={ref:"jediContainer",id:"jedi-container"},Mg={class:"col-xs-12 col-sm-4"},Rg={class:"form-group mb-3"},Ng=["label"],Vg=["value"],Bg={class:"form-group mb-3"},Hg={ref:"editorValue",class:"form-control",id:"editor-value",style:{"font-size":"14px","font-family":"monospace",height:"200px"}},Fg={class:"form-group mb-3"},qg={for:"editor-errors"},Ug={ref:"editorErrors",class:"form-control",id:"editor-errors",style:{"font-size":"14px","font-family":"monospace",height:"200px"}},Kg={class:"form-group mb-3"},Wg={ref:"schema",class:"form-control",id:"schema",style:{"font-size":"14px","font-family":"monospace",height:"200px"}},zg={class:"form-group mb-3"},Jg=["value"],Gg={class:"form-group mb-3"},Yg=["value"],Qg={class:"form-group mb-3"},Zg=["value"],Xg={class:"form-group mb-3"},ey={class:"form-group mb-3"},ty={class:"form-group mb-3"},sy={class:"form-group mb-3"},iy={class:"form-group mb-3"},ny={class:"form-group mb-3"};function ry(t,e,s,i,n,r){return Ae(),Oe("div",null,[e[40]||(e[40]=P("header",null,[P("h1",null,"Playground")],-1)),P("div",Ag,[P("div",Og,[P("main",null,[P("div",kg,[P("button",{class:"btn btn-primary",id:"disable-editor",onClick:e[0]||(e[0]=o=>r.disableEditor())},"Disable editor"),P("button",{class:"btn btn-primary",id:"enable-editor",onClick:e[1]||(e[1]=o=>r.enableEditor())},"Enable editor"),P("button",{class:"btn btn-primary",id:"show-validation-errors",onClick:e[2]||(e[2]=o=>r.showValidationErrors())},"Show validation errors"),P("button",{class:"btn btn-primary",id:"destroy-editor",onClick:e[3]||(e[3]=o=>r.destroyEditor())},"Destroy editor")]),e[26]||(e[26]=P("hr",null,null,-1)),P("form",_g,[P("div",Dg,null,512)])])]),P("div",Mg,[P("aside",null,[P("div",Rg,[e[27]||(e[27]=P("label",{for:"examples"},"Examples",-1)),He(P("select",{class:"form-control",id:"examples","onUpdate:modelValue":e[4]||(e[4]=o=>n.example=o),onChange:e[5]||(e[5]=(...o)=>r.reload&&r.reload(...o))},[(Ae(!0),Oe(Ce,null,Ht(n.examples,(o,a)=>(Ae(),Oe("optgroup",{label:a,key:a},[(Ae(!0),Oe(Ce,null,Ht(o,(l,c)=>(Ae(),Oe("option",{value:c,key:c},Tt(c),9,Vg))),128))],8,Ng))),128))],544),[[Us,n.example]])]),P("div",Bg,[e[28]||(e[28]=P("label",{for:"editor-value"},"Value",-1)),P("textarea",Hg,null,512)]),P("button",{class:"btn btn-primary btn-block mb-3",id:"set-value",onClick:e[6]||(e[6]=o=>r.setEditorValue())},"Set value"),P("div",Fg,[P("label",qg,[e[29]||(e[29]=P("span",null,"Errors: ",-1)),P("span",null,Tt(n.errorCount),1)]),P("textarea",Ug,null,512)]),P("div",Kg,[e[30]||(e[30]=P("label",{for:"schema"},"Schema",-1)),P("textarea",Wg,null,512)]),P("button",{class:"btn btn-primary btn-block mb-3",id:"set-schema",onClick:e[7]||(e[7]=o=>r.setSchema())},"Set schema"),P("div",zg,[e[31]||(e[31]=P("label",{for:"theme"},"theme",-1)),He(P("select",{class:"form-control",id:"theme","onUpdate:modelValue":e[8]||(e[8]=o=>n.theme=o),onChange:e[9]||(e[9]=o=>r.reload())},[(Ae(!0),Oe(Ce,null,Ht(n.themes,o=>(Ae(),Oe("option",{value:o},Tt(o),9,Jg))),256))],544),[[Us,n.theme]])]),P("div",Gg,[e[32]||(e[32]=P("label",{for:"icon-lib"},"iconLib",-1)),He(P("select",{class:"form-control",id:"icon-lib","onUpdate:modelValue":e[10]||(e[10]=o=>n.iconLib=o),onChange:e[11]||(e[11]=o=>r.reload())},[(Ae(!0),Oe(Ce,null,Ht(n.iconLibs,o=>(Ae(),Oe("option",{value:o},Tt(o),9,Yg))),256))],544),[[Us,n.iconLib]])]),P("div",Qg,[e[33]||(e[33]=P("label",{for:"show-errors"},"showErrors",-1)),He(P("select",{class:"form-control",id:"show-errors","onUpdate:modelValue":e[12]||(e[12]=o=>n.showErrors=o),onChange:e[13]||(e[13]=o=>r.reload())},[(Ae(!0),Oe(Ce,null,Ht(n.showErrorsOptions,o=>(Ae(),Oe("option",{value:o},Tt(o),9,Zg))),256))],544),[[Us,n.showErrors]])]),P("div",Xg,[He(P("input",{type:"checkbox",id:"enablePropertiesToggle","onUpdate:modelValue":e[14]||(e[14]=o=>n.enablePropertiesToggle=o),onChange:e[15]||(e[15]=o=>r.initEditor())},null,544),[[Et,n.enablePropertiesToggle]]),e[34]||(e[34]=P("label",{for:"enablePropertiesToggle"},"enablePropertiesToggle",-1))]),P("div",ey,[He(P("input",{type:"checkbox",id:"enableCollapseToggle","onUpdate:modelValue":e[16]||(e[16]=o=>n.enableCollapseToggle=o),onChange:e[17]||(e[17]=o=>r.initEditor())},null,544),[[Et,n.enableCollapseToggle]]),e[35]||(e[35]=P("label",{for:"enableCollapseToggle"},"enableCollapseToggle",-1))]),P("div",ty,[He(P("input",{type:"checkbox",id:"startCollapsed","onUpdate:modelValue":e[18]||(e[18]=o=>n.startCollapsed=o),onChange:e[19]||(e[19]=o=>r.initEditor())},null,544),[[Et,n.startCollapsed]]),e[36]||(e[36]=P("label",{for:"startCollapsed"},"startCollapsed",-1))]),P("div",sy,[He(P("input",{type:"checkbox",id:"validateFormat","onUpdate:modelValue":e[20]||(e[20]=o=>n.validateFormat=o),onChange:e[21]||(e[21]=o=>r.initEditor())},null,544),[[Et,n.validateFormat]]),e[37]||(e[37]=P("label",{for:"validateFormat"},"validateFormat",-1))]),P("div",iy,[He(P("input",{type:"checkbox",id:"mergeAllOf","onUpdate:modelValue":e[22]||(e[22]=o=>n.mergeAllOf=o),onChange:e[23]||(e[23]=o=>r.initEditor())},null,544),[[Et,n.mergeAllOf]]),e[38]||(e[38]=P("label",{for:"mergeAllOf"},"mergeAllOf",-1))]),P("div",ny,[He(P("input",{type:"checkbox",id:"enforceEnumDefault","onUpdate:modelValue":e[24]||(e[24]=o=>n.enforceEnumDefault=o),onChange:e[25]||(e[25]=o=>r.initEditor())},null,544),[[Et,n.enforceEnumDefault]]),e[39]||(e[39]=P("label",{for:"enforceEnumDefault"},"enforceEnumDefault",-1))])])])])])}const oy=$g(Pg,[["render",ry]]),ay=Ac(oy);ay.mount("#app"); diff --git a/docs/assets/index-SIDPvT3T.js b/docs/assets/index-SIDPvT3T.js new file mode 100644 index 0000000..d2aad79 --- /dev/null +++ b/docs/assets/index-SIDPvT3T.js @@ -0,0 +1,21 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=s(n);fetch(n.href,r)}})();/** +* @vue/shared v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function sn(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return s=>s in e}const J={},Lt=[],We=()=>{},fa=()=>!1,ii=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),nn=t=>t.startsWith("onUpdate:"),ce=Object.assign,rn=(t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)},ma=Object.prototype.hasOwnProperty,U=(t,e)=>ma.call(t,e),D=Array.isArray,St=t=>ns(t)==="[object Map]",Dt=t=>ns(t)==="[object Set]",Hn=t=>ns(t)==="[object Date]",V=t=>typeof t=="function",re=t=>typeof t=="string",ze=t=>typeof t=="symbol",ee=t=>t!==null&&typeof t=="object",vr=t=>(ee(t)||V(t))&&V(t.then)&&V(t.catch),Cr=Object.prototype.toString,ns=t=>Cr.call(t),ga=t=>ns(t).slice(8,-1),xr=t=>ns(t)==="[object Object]",on=t=>re(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ut=sn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ni=t=>{const e=Object.create(null);return s=>e[s]||(e[s]=t(s))},ya=/-(\w)/g,ot=ni(t=>t.replace(ya,(e,s)=>s?s.toUpperCase():"")),ba=/\B([A-Z])/g,xt=ni(t=>t.replace(ba,"-$1").toLowerCase()),wr=ni(t=>t.charAt(0).toUpperCase()+t.slice(1)),$i=ni(t=>t?`on${wr(t)}`:""),yt=(t,e)=>!Object.is(t,e),Ks=(t,...e)=>{for(let s=0;s{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:s})},Tr=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Fn;const ri=()=>Fn||(Fn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function an(t){if(D(t)){const e={};for(let s=0;s{if(s){const i=s.split(Ca);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ln(t){let e="";if(re(t))e=t;else if(D(t))for(let s=0;srs(s,e))}const Lr=t=>!!(t&&t.__v_isRef===!0),Tt=t=>re(t)?t:t==null?"":D(t)||ee(t)&&(t.toString===Cr||!V(t.toString))?Lr(t)?Tt(t.value):JSON.stringify(t,Sr,2):String(t),Sr=(t,e)=>Lr(e)?Sr(t,e.value):St(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((s,[i,n],r)=>(s[Oi(i,r)+" =>"]=n,s),{})}:Dt(e)?{[`Set(${e.size})`]:[...e.values()].map(s=>Oi(s))}:ze(e)?Oi(e):ee(e)&&!D(e)&&!xr(e)?String(e):e,Oi=(t,e="")=>{var s;return ze(t)?`Symbol(${(s=t.description)!=null?s:e})`:t};/** +* @vue/reactivity v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ie;class La{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ie,!e&&Ie&&(this.index=(Ie.scopes||(Ie.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,s;if(this.scopes)for(e=0,s=this.scopes.length;e0)return;if(Wt){let e=Wt;for(Wt=void 0;e;){const s=e.next;e.next=void 0,e.flags&=-9,e=s}}let t;for(;Kt;){let e=Kt;for(Kt=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=s}}if(t)throw t}function Or(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ar(t){let e,s=t.depsTail,i=s;for(;i;){const n=i.prevDep;i.version===-1?(i===s&&(s=n),un(i),ja(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}t.deps=e,t.depsTail=s}function Fi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(kr(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function kr(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Yt))return;t.globalVersion=Yt;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Fi(t)){t.flags&=-3;return}const s=Q,i=ke;Q=t,ke=!0;try{Or(t);const n=t.fn(t._value);(e.version===0||yt(n,t._value))&&(t._value=n,e.version++)}catch(n){throw e.version++,n}finally{Q=s,ke=i,Ar(t),t.flags&=-3}}function un(t,e=!1){const{dep:s,prevSub:i,nextSub:n}=t;if(i&&(i.nextSub=n,t.prevSub=void 0),n&&(n.prevSub=i,t.nextSub=void 0),s.subs===t&&(s.subs=i,!i&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)un(r,!0)}!e&&!--s.sc&&s.map&&s.map.delete(s.key)}function ja(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let ke=!0;const _r=[];function lt(){_r.push(ke),ke=!1}function ct(){const t=_r.pop();ke=t===void 0?!0:t}function qn(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const s=Q;Q=void 0;try{e()}finally{Q=s}}}let Yt=0;class Pa{constructor(e,s){this.sub=e,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dr{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Q||!ke||Q===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Q)s=this.activeLink=new Pa(Q,this),Q.deps?(s.prevDep=Q.depsTail,Q.depsTail.nextDep=s,Q.depsTail=s):Q.deps=Q.depsTail=s,Mr(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const i=s.nextDep;i.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=i),s.prevDep=Q.depsTail,s.nextDep=void 0,Q.depsTail.nextDep=s,Q.depsTail=s,Q.deps===s&&(Q.deps=i)}return s}trigger(e){this.version++,Yt++,this.notify(e)}notify(e){dn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{pn()}}}function Mr(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Mr(i)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const qi=new WeakMap,bt=Symbol(""),Ui=Symbol(""),Qt=Symbol("");function pe(t,e,s){if(ke&&Q){let i=qi.get(t);i||qi.set(t,i=new Map);let n=i.get(s);n||(i.set(s,n=new Dr),n.map=i,n.key=s),n.track()}}function Qe(t,e,s,i,n,r){const o=qi.get(t);if(!o){Yt++;return}const a=l=>{l&&l.trigger()};if(dn(),e==="clear")o.forEach(a);else{const l=D(t),c=l&&on(s);if(l&&s==="length"){const d=Number(i);o.forEach((u,f)=>{(f==="length"||f===Qt||!ze(f)&&f>=d)&&a(u)})}else switch((s!==void 0||o.has(void 0))&&a(o.get(s)),c&&a(o.get(Qt)),e){case"add":l?c&&a(o.get("length")):(a(o.get(bt)),St(t)&&a(o.get(Ui)));break;case"delete":l||(a(o.get(bt)),St(t)&&a(o.get(Ui)));break;case"set":St(t)&&a(o.get(bt));break}}pn()}function wt(t){const e=z(t);return e===t?e:(pe(e,"iterate",Qt),_e(t)?e:e.map(ve))}function oi(t){return pe(t=z(t),"iterate",Qt),t}const $a={__proto__:null,[Symbol.iterator](){return ki(this,Symbol.iterator,ve)},concat(...t){return wt(this).concat(...t.map(e=>D(e)?wt(e):e))},entries(){return ki(this,"entries",t=>(t[1]=ve(t[1]),t))},every(t,e){return Ge(this,"every",t,e,void 0,arguments)},filter(t,e){return Ge(this,"filter",t,e,s=>s.map(ve),arguments)},find(t,e){return Ge(this,"find",t,e,ve,arguments)},findIndex(t,e){return Ge(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ge(this,"findLast",t,e,ve,arguments)},findLastIndex(t,e){return Ge(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ge(this,"forEach",t,e,void 0,arguments)},includes(...t){return _i(this,"includes",t)},indexOf(...t){return _i(this,"indexOf",t)},join(t){return wt(this).join(t)},lastIndexOf(...t){return _i(this,"lastIndexOf",t)},map(t,e){return Ge(this,"map",t,e,void 0,arguments)},pop(){return Vt(this,"pop")},push(...t){return Vt(this,"push",t)},reduce(t,...e){return Un(this,"reduce",t,e)},reduceRight(t,...e){return Un(this,"reduceRight",t,e)},shift(){return Vt(this,"shift")},some(t,e){return Ge(this,"some",t,e,void 0,arguments)},splice(...t){return Vt(this,"splice",t)},toReversed(){return wt(this).toReversed()},toSorted(t){return wt(this).toSorted(t)},toSpliced(...t){return wt(this).toSpliced(...t)},unshift(...t){return Vt(this,"unshift",t)},values(){return ki(this,"values",ve)}};function ki(t,e,s){const i=oi(t),n=i[e]();return i!==t&&!_e(t)&&(n._next=n.next,n.next=()=>{const r=n._next();return r.value&&(r.value=s(r.value)),r}),n}const Oa=Array.prototype;function Ge(t,e,s,i,n,r){const o=oi(t),a=o!==t&&!_e(t),l=o[e];if(l!==Oa[e]){const u=l.apply(t,r);return a?ve(u):u}let c=s;o!==t&&(a?c=function(u,f){return s.call(this,ve(u),f,t)}:s.length>2&&(c=function(u,f){return s.call(this,u,f,t)}));const d=l.call(o,c,i);return a&&n?n(d):d}function Un(t,e,s,i){const n=oi(t);let r=s;return n!==t&&(_e(t)?s.length>3&&(r=function(o,a,l){return s.call(this,o,a,l,t)}):r=function(o,a,l){return s.call(this,o,ve(a),l,t)}),n[e](r,...i)}function _i(t,e,s){const i=z(t);pe(i,"iterate",Qt);const n=i[e](...s);return(n===-1||n===!1)&&gn(s[0])?(s[0]=z(s[0]),i[e](...s)):n}function Vt(t,e,s=[]){lt(),dn();const i=z(t)[e].apply(t,s);return pn(),ct(),i}const Aa=sn("__proto__,__v_isRef,__isVue"),Rr=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ze));function ka(t){ze(t)||(t=String(t));const e=z(this);return pe(e,"has",t),e.hasOwnProperty(t)}class Nr{constructor(e=!1,s=!1){this._isReadonly=e,this._isShallow=s}get(e,s,i){const n=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!n;if(s==="__v_isReadonly")return n;if(s==="__v_isShallow")return r;if(s==="__v_raw")return i===(n?r?qa:Fr:r?Hr:Vr).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=D(e);if(!n){let l;if(o&&(l=$a[s]))return l;if(s==="hasOwnProperty")return ka}const a=Reflect.get(e,s,ye(e)?e:i);return(ze(s)?Rr.has(s):Aa(s))||(n||pe(e,"get",s),r)?a:ye(a)?o&&on(s)?a:a.value:ee(a)?n?qr(a):fn(a):a}}class Br extends Nr{constructor(e=!1){super(!1,e)}set(e,s,i,n){let r=e[s];if(!this._isShallow){const l=At(r);if(!_e(i)&&!At(i)&&(r=z(r),i=z(i)),!D(e)&&ye(r)&&!ye(i))return l?!1:(r.value=i,!0)}const o=D(e)&&on(s)?Number(s)t,Hs=t=>Reflect.getPrototypeOf(t);function Na(t,e,s){return function(...i){const n=this.__v_raw,r=z(n),o=St(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=n[t](...i),d=s?Ki:e?Wi:ve;return!e&&pe(r,"iterate",l?Ui:bt),{next(){const{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:a?[d(u[0]),d(u[1])]:d(u),done:f}},[Symbol.iterator](){return this}}}}function Fs(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Ba(t,e){const s={get(n){const r=this.__v_raw,o=z(r),a=z(n);t||(yt(n,a)&&pe(o,"get",n),pe(o,"get",a));const{has:l}=Hs(o),c=e?Ki:t?Wi:ve;if(l.call(o,n))return c(r.get(n));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(n)},get size(){const n=this.__v_raw;return!t&&pe(z(n),"iterate",bt),Reflect.get(n,"size",n)},has(n){const r=this.__v_raw,o=z(r),a=z(n);return t||(yt(n,a)&&pe(o,"has",n),pe(o,"has",a)),n===a?r.has(n):r.has(n)||r.has(a)},forEach(n,r){const o=this,a=o.__v_raw,l=z(a),c=e?Ki:t?Wi:ve;return!t&&pe(l,"iterate",bt),a.forEach((d,u)=>n.call(r,c(d),c(u),o))}};return ce(s,t?{add:Fs("add"),set:Fs("set"),delete:Fs("delete"),clear:Fs("clear")}:{add(n){!e&&!_e(n)&&!At(n)&&(n=z(n));const r=z(this);return Hs(r).has.call(r,n)||(r.add(n),Qe(r,"add",n,n)),this},set(n,r){!e&&!_e(r)&&!At(r)&&(r=z(r));const o=z(this),{has:a,get:l}=Hs(o);let c=a.call(o,n);c||(n=z(n),c=a.call(o,n));const d=l.call(o,n);return o.set(n,r),c?yt(r,d)&&Qe(o,"set",n,r):Qe(o,"add",n,r),this},delete(n){const r=z(this),{has:o,get:a}=Hs(r);let l=o.call(r,n);l||(n=z(n),l=o.call(r,n)),a&&a.call(r,n);const c=r.delete(n);return l&&Qe(r,"delete",n,void 0),c},clear(){const n=z(this),r=n.size!==0,o=n.clear();return r&&Qe(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=Na(n,t,e)}),s}function hn(t,e){const s=Ba(t,e);return(i,n,r)=>n==="__v_isReactive"?!t:n==="__v_isReadonly"?t:n==="__v_raw"?i:Reflect.get(U(s,n)&&n in i?s:i,n,r)}const Va={get:hn(!1,!1)},Ha={get:hn(!1,!0)},Fa={get:hn(!0,!1)};const Vr=new WeakMap,Hr=new WeakMap,Fr=new WeakMap,qa=new WeakMap;function Ua(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ka(t){return t.__v_skip||!Object.isExtensible(t)?0:Ua(ga(t))}function fn(t){return At(t)?t:mn(t,!1,Da,Va,Vr)}function Wa(t){return mn(t,!1,Ra,Ha,Hr)}function qr(t){return mn(t,!0,Ma,Fa,Fr)}function mn(t,e,s,i,n){if(!ee(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=n.get(t);if(r)return r;const o=Ka(t);if(o===0)return t;const a=new Proxy(t,o===2?i:s);return n.set(t,a),a}function jt(t){return At(t)?jt(t.__v_raw):!!(t&&t.__v_isReactive)}function At(t){return!!(t&&t.__v_isReadonly)}function _e(t){return!!(t&&t.__v_isShallow)}function gn(t){return t?!!t.__v_raw:!1}function z(t){const e=t&&t.__v_raw;return e?z(e):t}function za(t){return!U(t,"__v_skip")&&Object.isExtensible(t)&&Er(t,"__v_skip",!0),t}const ve=t=>ee(t)?fn(t):t,Wi=t=>ee(t)?qr(t):t;function ye(t){return t?t.__v_isRef===!0:!1}function Ja(t){return ye(t)?t.value:t}const Ga={get:(t,e,s)=>e==="__v_raw"?t:Ja(Reflect.get(t,e,s)),set:(t,e,s,i)=>{const n=t[e];return ye(n)&&!ye(s)?(n.value=s,!0):Reflect.set(t,e,s,i)}};function Ur(t){return jt(t)?t:new Proxy(t,Ga)}class Ya{constructor(e,s,i){this.fn=e,this.setter=s,this._value=void 0,this.dep=new Dr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Q!==this)return $r(this,!0),!0}get value(){const e=this.dep.track();return kr(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Qa(t,e,s=!1){let i,n;return V(t)?i=t:(i=t.get,n=t.set),new Ya(i,n,s)}const qs={},Gs=new WeakMap;let gt;function Za(t,e=!1,s=gt){if(s){let i=Gs.get(s);i||Gs.set(s,i=[]),i.push(t)}}function Xa(t,e,s=J){const{immediate:i,deep:n,once:r,scheduler:o,augmentJob:a,call:l}=s,c=A=>n?A:_e(A)||n===!1||n===0?Ze(A,1):Ze(A);let d,u,f,b,S=!1,P=!1;if(ye(t)?(u=()=>t.value,S=_e(t)):jt(t)?(u=()=>c(t),S=!0):D(t)?(P=!0,S=t.some(A=>jt(A)||_e(A)),u=()=>t.map(A=>{if(ye(A))return A.value;if(jt(A))return c(A);if(V(A))return l?l(A,2):A()})):V(t)?e?u=l?()=>l(t,2):t:u=()=>{if(f){lt();try{f()}finally{ct()}}const A=gt;gt=d;try{return l?l(t,3,[b]):t(b)}finally{gt=A}}:u=We,e&&n){const A=u,X=n===!0?1/0:n;u=()=>Ze(A(),X)}const k=Sa(),j=()=>{d.stop(),k&&rn(k.effects,d)};if(r&&e){const A=e;e=(...X)=>{A(...X),j()}}let M=P?new Array(t.length).fill(qs):qs;const N=A=>{if(!(!(d.flags&1)||!d.dirty&&!A))if(e){const X=d.run();if(n||S||(P?X.some((be,Ne)=>yt(be,M[Ne])):yt(X,M))){f&&f();const be=gt;gt=d;try{const Ne=[X,M===qs?void 0:P&&M[0]===qs?[]:M,b];l?l(e,3,Ne):e(...Ne),M=X}finally{gt=be}}}else d.run()};return a&&a(N),d=new jr(u),d.scheduler=o?()=>o(N,!1):N,b=A=>Za(A,!1,d),f=d.onStop=()=>{const A=Gs.get(d);if(A){if(l)l(A,4);else for(const X of A)X();Gs.delete(d)}},e?i?N(!0):M=d.run():o?o(N.bind(null,!0),!0):d.run(),j.pause=d.pause.bind(d),j.resume=d.resume.bind(d),j.stop=j,j}function Ze(t,e=1/0,s){if(e<=0||!ee(t)||t.__v_skip||(s=s||new Set,s.has(t)))return t;if(s.add(t),e--,ye(t))Ze(t.value,e,s);else if(D(t))for(let i=0;i{Ze(i,e,s)});else if(xr(t)){for(const i in t)Ze(t[i],e,s);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Ze(t[i],e,s)}return t}/** +* @vue/runtime-core v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function os(t,e,s,i){try{return i?t(...i):t()}catch(n){ai(n,e,s)}}function Je(t,e,s,i){if(V(t)){const n=os(t,e,s,i);return n&&vr(n)&&n.catch(r=>{ai(r,e,s)}),n}if(D(t)){const n=[];for(let r=0;r>>1,n=me[i],r=Zt(n);r=Zt(s)?me.push(t):me.splice(tl(e),0,t),t.flags|=1,zr()}}function zr(){Ys||(Ys=Kr.then(Gr))}function sl(t){D(t)?Pt.push(...t):it&&t.id===-1?it.splice(It+1,0,t):t.flags&1||(Pt.push(t),t.flags|=1),zr()}function Kn(t,e,s=qe+1){for(;sZt(s)-Zt(i));if(Pt.length=0,it){it.push(...e);return}for(it=e,It=0;Itt.id==null?t.flags&2?-1:1/0:t.id;function Gr(t){try{for(qe=0;qe{i._d&&Xn(-1);const r=Qs(e);let o;try{o=t(...n)}finally{Qs(r),i._d&&Xn(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function He(t,e){if(Pe===null)return t;const s=pi(Pe),i=t.dirs||(t.dirs=[]);for(let n=0;nt.__isTeleport;function bn(t,e){t.shapeFlag&6&&t.component?(t.transition=e,bn(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Qr(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function zi(t,e,s,i,n=!1){if(D(t)){t.forEach((S,P)=>zi(S,e&&(D(e)?e[P]:e),s,i,n));return}if(zt(i)&&!n)return;const r=i.shapeFlag&4?pi(i.component):i.el,o=n?null:r,{i:a,r:l}=t,c=e&&e.r,d=a.refs===J?a.refs={}:a.refs,u=a.setupState,f=z(u),b=u===J?()=>!1:S=>U(f,S);if(c!=null&&c!==l&&(re(c)?(d[c]=null,b(c)&&(u[c]=null)):ye(c)&&(c.value=null)),V(l))os(l,a,12,[o,d]);else{const S=re(l),P=ye(l);if(S||P){const k=()=>{if(t.f){const j=S?b(l)?u[l]:d[l]:l.value;n?D(j)&&rn(j,r):D(j)?j.includes(r)||j.push(r):S?(d[l]=[r],b(l)&&(u[l]=d[l])):(l.value=[r],t.k&&(d[t.k]=l.value))}else S?(d[l]=o,b(l)&&(u[l]=o)):P&&(l.value=o,t.k&&(d[t.k]=o))};o?(k.id=-1,Te(k,s)):k()}}}ri().requestIdleCallback;ri().cancelIdleCallback;const zt=t=>!!t.type.__asyncLoader,Zr=t=>t.type.__isKeepAlive;function ol(t,e){Xr(t,"a",e)}function al(t,e){Xr(t,"da",e)}function Xr(t,e,s=ge){const i=t.__wdc||(t.__wdc=()=>{let n=s;for(;n;){if(n.isDeactivated)return;n=n.parent}return t()});if(li(e,i,s),s){let n=s.parent;for(;n&&n.parent;)Zr(n.parent.vnode)&&ll(i,e,s,n),n=n.parent}}function ll(t,e,s,i){const n=li(e,t,i,!0);eo(()=>{rn(i[e],n)},s)}function li(t,e,s=ge,i=!1){if(s){const n=s[t]||(s[t]=[]),r=e.__weh||(e.__weh=(...o)=>{lt();const a=as(s),l=Je(e,s,t,o);return a(),ct(),l});return i?n.unshift(r):n.push(r),r}}const Xe=t=>(e,s=ge)=>{(!ts||t==="sp")&&li(t,(...i)=>e(...i),s)},cl=Xe("bm"),dl=Xe("m"),pl=Xe("bu"),ul=Xe("u"),hl=Xe("bum"),eo=Xe("um"),fl=Xe("sp"),ml=Xe("rtg"),gl=Xe("rtc");function yl(t,e=ge){li("ec",t,e)}const bl=Symbol.for("v-ndc");function Ht(t,e,s,i){let n;const r=s,o=D(t);if(o||re(t)){const a=o&&jt(t);let l=!1;a&&(l=!_e(t),t=oi(t)),n=new Array(t.length);for(let c=0,d=t.length;ce(a,l,void 0,r));else{const a=Object.keys(t);n=new Array(a.length);for(let l=0,c=a.length;lt?xo(t)?pi(t):Ji(t.parent):null,Jt=ce(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ji(t.parent),$root:t=>Ji(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>vn(t),$forceUpdate:t=>t.f||(t.f=()=>{yn(t.update)}),$nextTick:t=>t.n||(t.n=Wr.bind(t.proxy)),$watch:t=>Vl.bind(t)}),Di=(t,e)=>t!==J&&!t.__isScriptSetup&&U(t,e),vl={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:s,setupState:i,data:n,props:r,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const b=o[e];if(b!==void 0)switch(b){case 1:return i[e];case 2:return n[e];case 4:return s[e];case 3:return r[e]}else{if(Di(i,e))return o[e]=1,i[e];if(n!==J&&U(n,e))return o[e]=2,n[e];if((c=t.propsOptions[0])&&U(c,e))return o[e]=3,r[e];if(s!==J&&U(s,e))return o[e]=4,s[e];Gi&&(o[e]=0)}}const d=Jt[e];let u,f;if(d)return e==="$attrs"&&pe(t.attrs,"get",""),d(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(s!==J&&U(s,e))return o[e]=4,s[e];if(f=l.config.globalProperties,U(f,e))return f[e]},set({_:t},e,s){const{data:i,setupState:n,ctx:r}=t;return Di(n,e)?(n[e]=s,!0):i!==J&&U(i,e)?(i[e]=s,!0):U(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=s,!0)},has({_:{data:t,setupState:e,accessCache:s,ctx:i,appContext:n,propsOptions:r}},o){let a;return!!s[o]||t!==J&&U(t,o)||Di(e,o)||(a=r[0])&&U(a,o)||U(i,o)||U(Jt,o)||U(n.config.globalProperties,o)},defineProperty(t,e,s){return s.get!=null?t._.accessCache[e]=0:U(s,"value")&&this.set(t,e,s.value,null),Reflect.defineProperty(t,e,s)}};function Wn(t){return D(t)?t.reduce((e,s)=>(e[s]=null,e),{}):t}let Gi=!0;function Cl(t){const e=vn(t),s=t.proxy,i=t.ctx;Gi=!1,e.beforeCreate&&zn(e.beforeCreate,t,"bc");const{data:n,computed:r,methods:o,watch:a,provide:l,inject:c,created:d,beforeMount:u,mounted:f,beforeUpdate:b,updated:S,activated:P,deactivated:k,beforeDestroy:j,beforeUnmount:M,destroyed:N,unmounted:A,render:X,renderTracked:be,renderTriggered:Ne,errorCaptured:st,serverPrefetch:Ms,expose:pt,inheritAttrs:Mt,components:Rs,directives:Ns,filters:ji}=e;if(c&&xl(c,i,null),o)for(const ie in o){const G=o[ie];V(G)&&(i[ie]=G.bind(s))}if(n){const ie=n.call(s,s);ee(ie)&&(t.data=fn(ie))}if(Gi=!0,r)for(const ie in r){const G=r[ie],ut=V(G)?G.bind(s,s):V(G.get)?G.get.bind(s,s):We,Bs=!V(G)&&V(G.set)?G.set.bind(s):We,ht=lc({get:ut,set:Bs});Object.defineProperty(i,ie,{enumerable:!0,configurable:!0,get:()=>ht.value,set:Be=>ht.value=Be})}if(a)for(const ie in a)to(a[ie],i,s,ie);if(l){const ie=V(l)?l.call(s):l;Reflect.ownKeys(ie).forEach(G=>{Sl(G,ie[G])})}d&&zn(d,t,"c");function he(ie,G){D(G)?G.forEach(ut=>ie(ut.bind(s))):G&&ie(G.bind(s))}if(he(cl,u),he(dl,f),he(pl,b),he(ul,S),he(ol,P),he(al,k),he(yl,st),he(gl,be),he(ml,Ne),he(hl,M),he(eo,A),he(fl,Ms),D(pt))if(pt.length){const ie=t.exposed||(t.exposed={});pt.forEach(G=>{Object.defineProperty(ie,G,{get:()=>s[G],set:ut=>s[G]=ut})})}else t.exposed||(t.exposed={});X&&t.render===We&&(t.render=X),Mt!=null&&(t.inheritAttrs=Mt),Rs&&(t.components=Rs),Ns&&(t.directives=Ns),Ms&&Qr(t)}function xl(t,e,s=We){D(t)&&(t=Yi(t));for(const i in t){const n=t[i];let r;ee(n)?"default"in n?r=Ws(n.from||i,n.default,!0):r=Ws(n.from||i):r=Ws(n),ye(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function zn(t,e,s){Je(D(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,s)}function to(t,e,s,i){let n=i.includes(".")?go(s,i):()=>s[i];if(re(t)){const r=e[t];V(r)&&Ri(n,r)}else if(V(t))Ri(n,t.bind(s));else if(ee(t))if(D(t))t.forEach(r=>to(r,e,s,i));else{const r=V(t.handler)?t.handler.bind(s):e[t.handler];V(r)&&Ri(n,r,t)}}function vn(t){const e=t.type,{mixins:s,extends:i}=e,{mixins:n,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,a=r.get(e);let l;return a?l=a:!n.length&&!s&&!i?l=e:(l={},n.length&&n.forEach(c=>Zs(l,c,o,!0)),Zs(l,e,o)),ee(e)&&r.set(e,l),l}function Zs(t,e,s,i=!1){const{mixins:n,extends:r}=e;r&&Zs(t,r,s,!0),n&&n.forEach(o=>Zs(t,o,s,!0));for(const o in e)if(!(i&&o==="expose")){const a=wl[o]||s&&s[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const wl={data:Jn,props:Gn,emits:Gn,methods:qt,computed:qt,beforeCreate:fe,created:fe,beforeMount:fe,mounted:fe,beforeUpdate:fe,updated:fe,beforeDestroy:fe,beforeUnmount:fe,destroyed:fe,unmounted:fe,activated:fe,deactivated:fe,errorCaptured:fe,serverPrefetch:fe,components:qt,directives:qt,watch:Tl,provide:Jn,inject:El};function Jn(t,e){return e?t?function(){return ce(V(t)?t.call(this,this):t,V(e)?e.call(this,this):e)}:e:t}function El(t,e){return qt(Yi(t),Yi(e))}function Yi(t){if(D(t)){const e={};for(let s=0;s1)return s&&V(e)?e.call(i&&i.proxy):e}}const io={},no=()=>Object.create(io),ro=t=>Object.getPrototypeOf(t)===io;function jl(t,e,s,i=!1){const n={},r=no();t.propsDefaults=Object.create(null),oo(t,e,n,r);for(const o in t.propsOptions[0])o in n||(n[o]=void 0);s?t.props=i?n:Wa(n):t.type.props?t.props=n:t.props=r,t.attrs=r}function Pl(t,e,s,i){const{props:n,attrs:r,vnode:{patchFlag:o}}=t,a=z(n),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const d=t.vnode.dynamicProps;for(let u=0;u{l=!0;const[f,b]=ao(u,e,!0);ce(o,f),b&&a.push(...b)};!s&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}if(!r&&!l)return ee(t)&&i.set(t,Lt),Lt;if(D(r))for(let d=0;dt[0]==="_"||t==="$stable",Cn=t=>D(t)?t.map(Ue):[Ue(t)],Ol=(t,e,s)=>{if(e._n)return e;const i=il((...n)=>Cn(e(...n)),s);return i._c=!1,i},co=(t,e,s)=>{const i=t._ctx;for(const n in t){if(lo(n))continue;const r=t[n];if(V(r))e[n]=Ol(n,r,i);else if(r!=null){const o=Cn(r);e[n]=()=>o}}},po=(t,e)=>{const s=Cn(e);t.slots.default=()=>s},uo=(t,e,s)=>{for(const i in e)(s||i!=="_")&&(t[i]=e[i])},Al=(t,e,s)=>{const i=t.slots=no();if(t.vnode.shapeFlag&32){const n=e._;n?(uo(i,e,s),s&&Er(i,"_",n,!0)):co(e,i)}else e&&po(t,e)},kl=(t,e,s)=>{const{vnode:i,slots:n}=t;let r=!0,o=J;if(i.shapeFlag&32){const a=e._;a?s&&a===1?r=!1:uo(n,e,s):(r=!e.$stable,co(e,n)),o=e}else e&&(po(t,e),o={default:1});if(r)for(const a in n)!lo(a)&&o[a]==null&&delete n[a]},Te=zl;function _l(t){return Dl(t)}function Dl(t,e){const s=ri();s.__VUE__=!0;const{insert:i,remove:n,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:d,parentNode:u,nextSibling:f,setScopeId:b=We,insertStaticContent:S}=t,P=(p,h,g,C=null,y=null,v=null,I=void 0,T=null,E=!!h.dynamicChildren)=>{if(p===h)return;p&&!Ft(p,h)&&(C=Vs(p),Be(p,y,v,!0),p=null),h.patchFlag===-2&&(E=!1,h.dynamicChildren=null);const{type:x,ref:_,shapeFlag:L}=h;switch(x){case di:k(p,h,g,C);break;case Xt:j(p,h,g,C);break;case Bi:p==null&&M(h,g,C,I);break;case Ce:Rs(p,h,g,C,y,v,I,T,E);break;default:L&1?X(p,h,g,C,y,v,I,T,E):L&6?Ns(p,h,g,C,y,v,I,T,E):(L&64||L&128)&&x.process(p,h,g,C,y,v,I,T,E,Nt)}_!=null&&y&&zi(_,p&&p.ref,v,h||p,!h)},k=(p,h,g,C)=>{if(p==null)i(h.el=a(h.children),g,C);else{const y=h.el=p.el;h.children!==p.children&&c(y,h.children)}},j=(p,h,g,C)=>{p==null?i(h.el=l(h.children||""),g,C):h.el=p.el},M=(p,h,g,C)=>{[p.el,p.anchor]=S(p.children,h,g,C,p.el,p.anchor)},N=({el:p,anchor:h},g,C)=>{let y;for(;p&&p!==h;)y=f(p),i(p,g,C),p=y;i(h,g,C)},A=({el:p,anchor:h})=>{let g;for(;p&&p!==h;)g=f(p),n(p),p=g;n(h)},X=(p,h,g,C,y,v,I,T,E)=>{h.type==="svg"?I="svg":h.type==="math"&&(I="mathml"),p==null?be(h,g,C,y,v,I,T,E):Ms(p,h,y,v,I,T,E)},be=(p,h,g,C,y,v,I,T)=>{let E,x;const{props:_,shapeFlag:L,transition:O,dirs:R}=p;if(E=p.el=o(p.type,v,_&&_.is,_),L&8?d(E,p.children):L&16&&st(p.children,E,null,C,y,Mi(p,v),I,T),R&&ft(p,null,C,"created"),Ne(E,p,p.scopeId,I,C),_){for(const Y in _)Y!=="value"&&!Ut(Y)&&r(E,Y,null,_[Y],v,C);"value"in _&&r(E,"value",null,_.value,v),(x=_.onVnodeBeforeMount)&&Fe(x,C,p)}R&&ft(p,null,C,"beforeMount");const H=Ml(y,O);H&&O.beforeEnter(E),i(E,h,g),((x=_&&_.onVnodeMounted)||H||R)&&Te(()=>{x&&Fe(x,C,p),H&&O.enter(E),R&&ft(p,null,C,"mounted")},y)},Ne=(p,h,g,C,y)=>{if(g&&b(p,g),C)for(let v=0;v{for(let x=E;x{const T=h.el=p.el;let{patchFlag:E,dynamicChildren:x,dirs:_}=h;E|=p.patchFlag&16;const L=p.props||J,O=h.props||J;let R;if(g&&mt(g,!1),(R=O.onVnodeBeforeUpdate)&&Fe(R,g,h,p),_&&ft(h,p,g,"beforeUpdate"),g&&mt(g,!0),(L.innerHTML&&O.innerHTML==null||L.textContent&&O.textContent==null)&&d(T,""),x?pt(p.dynamicChildren,x,T,g,C,Mi(h,y),v):I||G(p,h,T,null,g,C,Mi(h,y),v,!1),E>0){if(E&16)Mt(T,L,O,g,y);else if(E&2&&L.class!==O.class&&r(T,"class",null,O.class,y),E&4&&r(T,"style",L.style,O.style,y),E&8){const H=h.dynamicProps;for(let Y=0;Y{R&&Fe(R,g,h,p),_&&ft(h,p,g,"updated")},C)},pt=(p,h,g,C,y,v,I)=>{for(let T=0;T{if(h!==g){if(h!==J)for(const v in h)!Ut(v)&&!(v in g)&&r(p,v,h[v],null,y,C);for(const v in g){if(Ut(v))continue;const I=g[v],T=h[v];I!==T&&v!=="value"&&r(p,v,T,I,y,C)}"value"in g&&r(p,"value",h.value,g.value,y)}},Rs=(p,h,g,C,y,v,I,T,E)=>{const x=h.el=p?p.el:a(""),_=h.anchor=p?p.anchor:a("");let{patchFlag:L,dynamicChildren:O,slotScopeIds:R}=h;R&&(T=T?T.concat(R):R),p==null?(i(x,g,C),i(_,g,C),st(h.children||[],g,_,y,v,I,T,E)):L>0&&L&64&&O&&p.dynamicChildren?(pt(p.dynamicChildren,O,g,y,v,I,T),(h.key!=null||y&&h===y.subTree)&&ho(p,h,!0)):G(p,h,g,_,y,v,I,T,E)},Ns=(p,h,g,C,y,v,I,T,E)=>{h.slotScopeIds=T,p==null?h.shapeFlag&512?y.ctx.activate(h,g,C,I,E):ji(h,g,C,y,v,I,E):_n(p,h,E)},ji=(p,h,g,C,y,v,I)=>{const T=p.component=sc(p,C,y);if(Zr(p)&&(T.ctx.renderer=Nt),ic(T,!1,I),T.asyncDep){if(y&&y.registerDep(T,he,I),!p.el){const E=T.subTree=vt(Xt);j(null,E,h,g)}}else he(T,p,h,g,y,v,I)},_n=(p,h,g)=>{const C=h.component=p.component;if(Kl(p,h,g))if(C.asyncDep&&!C.asyncResolved){ie(C,h,g);return}else C.next=h,C.update();else h.el=p.el,C.vnode=h},he=(p,h,g,C,y,v,I)=>{const T=()=>{if(p.isMounted){let{next:L,bu:O,u:R,parent:H,vnode:Y}=p;{const we=fo(p);if(we){L&&(L.el=Y.el,ie(p,L,I)),we.asyncDep.then(()=>{p.isUnmounted||T()});return}}let K=L,xe;mt(p,!1),L?(L.el=Y.el,ie(p,L,I)):L=Y,O&&Ks(O),(xe=L.props&&L.props.onVnodeBeforeUpdate)&&Fe(xe,H,L,Y),mt(p,!0);const de=Ni(p),$e=p.subTree;p.subTree=de,P($e,de,u($e.el),Vs($e),p,y,v),L.el=de.el,K===null&&Wl(p,de.el),R&&Te(R,y),(xe=L.props&&L.props.onVnodeUpdated)&&Te(()=>Fe(xe,H,L,Y),y)}else{let L;const{el:O,props:R}=h,{bm:H,m:Y,parent:K,root:xe,type:de}=p,$e=zt(h);if(mt(p,!1),H&&Ks(H),!$e&&(L=R&&R.onVnodeBeforeMount)&&Fe(L,K,h),mt(p,!0),O&&Nn){const we=()=>{p.subTree=Ni(p),Nn(O,p.subTree,p,y,null)};$e&&de.__asyncHydrate?de.__asyncHydrate(O,p,we):we()}else{xe.ce&&xe.ce._injectChildStyle(de);const we=p.subTree=Ni(p);P(null,we,g,C,p,y,v),h.el=we.el}if(Y&&Te(Y,y),!$e&&(L=R&&R.onVnodeMounted)){const we=h;Te(()=>Fe(L,K,we),y)}(h.shapeFlag&256||K&&zt(K.vnode)&&K.vnode.shapeFlag&256)&&p.a&&Te(p.a,y),p.isMounted=!0,h=g=C=null}};p.scope.on();const E=p.effect=new jr(T);p.scope.off();const x=p.update=E.run.bind(E),_=p.job=E.runIfDirty.bind(E);_.i=p,_.id=p.uid,E.scheduler=()=>yn(_),mt(p,!0),x()},ie=(p,h,g)=>{h.component=p;const C=p.vnode.props;p.vnode=h,p.next=null,Pl(p,h.props,C,g),kl(p,h.children,g),lt(),Kn(p),ct()},G=(p,h,g,C,y,v,I,T,E=!1)=>{const x=p&&p.children,_=p?p.shapeFlag:0,L=h.children,{patchFlag:O,shapeFlag:R}=h;if(O>0){if(O&128){Bs(x,L,g,C,y,v,I,T,E);return}else if(O&256){ut(x,L,g,C,y,v,I,T,E);return}}R&8?(_&16&&Rt(x,y,v),L!==x&&d(g,L)):_&16?R&16?Bs(x,L,g,C,y,v,I,T,E):Rt(x,y,v,!0):(_&8&&d(g,""),R&16&&st(L,g,C,y,v,I,T,E))},ut=(p,h,g,C,y,v,I,T,E)=>{p=p||Lt,h=h||Lt;const x=p.length,_=h.length,L=Math.min(x,_);let O;for(O=0;O_?Rt(p,y,v,!0,!1,L):st(h,g,C,y,v,I,T,E,L)},Bs=(p,h,g,C,y,v,I,T,E)=>{let x=0;const _=h.length;let L=p.length-1,O=_-1;for(;x<=L&&x<=O;){const R=p[x],H=h[x]=E?nt(h[x]):Ue(h[x]);if(Ft(R,H))P(R,H,g,null,y,v,I,T,E);else break;x++}for(;x<=L&&x<=O;){const R=p[L],H=h[O]=E?nt(h[O]):Ue(h[O]);if(Ft(R,H))P(R,H,g,null,y,v,I,T,E);else break;L--,O--}if(x>L){if(x<=O){const R=O+1,H=R<_?h[R].el:C;for(;x<=O;)P(null,h[x]=E?nt(h[x]):Ue(h[x]),g,H,y,v,I,T,E),x++}}else if(x>O)for(;x<=L;)Be(p[x],y,v,!0),x++;else{const R=x,H=x,Y=new Map;for(x=H;x<=O;x++){const Ee=h[x]=E?nt(h[x]):Ue(h[x]);Ee.key!=null&&Y.set(Ee.key,x)}let K,xe=0;const de=O-H+1;let $e=!1,we=0;const Bt=new Array(de);for(x=0;x=de){Be(Ee,y,v,!0);continue}let Ve;if(Ee.key!=null)Ve=Y.get(Ee.key);else for(K=H;K<=O;K++)if(Bt[K-H]===0&&Ft(Ee,h[K])){Ve=K;break}Ve===void 0?Be(Ee,y,v,!0):(Bt[Ve-H]=x+1,Ve>=we?we=Ve:$e=!0,P(Ee,h[Ve],g,null,y,v,I,T,E),xe++)}const Bn=$e?Rl(Bt):Lt;for(K=Bn.length-1,x=de-1;x>=0;x--){const Ee=H+x,Ve=h[Ee],Vn=Ee+1<_?h[Ee+1].el:C;Bt[x]===0?P(null,Ve,g,Vn,y,v,I,T,E):$e&&(K<0||x!==Bn[K]?ht(Ve,g,Vn,2):K--)}}},ht=(p,h,g,C,y=null)=>{const{el:v,type:I,transition:T,children:E,shapeFlag:x}=p;if(x&6){ht(p.component.subTree,h,g,C);return}if(x&128){p.suspense.move(h,g,C);return}if(x&64){I.move(p,h,g,Nt);return}if(I===Ce){i(v,h,g);for(let L=0;LT.enter(v),y);else{const{leave:L,delayLeave:O,afterLeave:R}=T,H=()=>i(v,h,g),Y=()=>{L(v,()=>{H(),R&&R()})};O?O(v,H,Y):Y()}else i(v,h,g)},Be=(p,h,g,C=!1,y=!1)=>{const{type:v,props:I,ref:T,children:E,dynamicChildren:x,shapeFlag:_,patchFlag:L,dirs:O,cacheIndex:R}=p;if(L===-2&&(y=!1),T!=null&&zi(T,null,g,p,!0),R!=null&&(h.renderCache[R]=void 0),_&256){h.ctx.deactivate(p);return}const H=_&1&&O,Y=!zt(p);let K;if(Y&&(K=I&&I.onVnodeBeforeUnmount)&&Fe(K,h,p),_&6)ha(p.component,g,C);else{if(_&128){p.suspense.unmount(g,C);return}H&&ft(p,null,h,"beforeUnmount"),_&64?p.type.remove(p,h,g,Nt,C):x&&!x.hasOnce&&(v!==Ce||L>0&&L&64)?Rt(x,h,g,!1,!0):(v===Ce&&L&384||!y&&_&16)&&Rt(E,h,g),C&&Dn(p)}(Y&&(K=I&&I.onVnodeUnmounted)||H)&&Te(()=>{K&&Fe(K,h,p),H&&ft(p,null,h,"unmounted")},g)},Dn=p=>{const{type:h,el:g,anchor:C,transition:y}=p;if(h===Ce){ua(g,C);return}if(h===Bi){A(p);return}const v=()=>{n(g),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(p.shapeFlag&1&&y&&!y.persisted){const{leave:I,delayLeave:T}=y,E=()=>I(g,v);T?T(p.el,v,E):E()}else v()},ua=(p,h)=>{let g;for(;p!==h;)g=f(p),n(p),p=g;n(h)},ha=(p,h,g)=>{const{bum:C,scope:y,job:v,subTree:I,um:T,m:E,a:x}=p;Qn(E),Qn(x),C&&Ks(C),y.stop(),v&&(v.flags|=8,Be(I,p,h,g)),T&&Te(T,h),Te(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Rt=(p,h,g,C=!1,y=!1,v=0)=>{for(let I=v;I{if(p.shapeFlag&6)return Vs(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),g=h&&h[nl];return g?f(g):h};let Pi=!1;const Mn=(p,h,g)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):P(h._vnode||null,p,h,null,null,null,g),h._vnode=p,Pi||(Pi=!0,Kn(),Jr(),Pi=!1)},Nt={p:P,um:Be,m:ht,r:Dn,mt:ji,mc:st,pc:G,pbc:pt,n:Vs,o:t};let Rn,Nn;return{render:Mn,hydrate:Rn,createApp:Ll(Mn,Rn)}}function Mi({type:t,props:e},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:s}function mt({effect:t,job:e},s){s?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function Ml(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function ho(t,e,s=!1){const i=t.children,n=e.children;if(D(i)&&D(n))for(let r=0;r>1,t[s[a]]0&&(e[i]=s[r-1]),s[r]=i)}}for(r=s.length,o=s[r-1];r-- >0;)s[r]=o,o=e[o];return s}function fo(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:fo(e)}function Qn(t){if(t)for(let e=0;eWs(Nl);function Ri(t,e,s){return mo(t,e,s)}function mo(t,e,s=J){const{immediate:i,deep:n,flush:r,once:o}=s,a=ce({},s),l=e&&i||!e&&r!=="post";let c;if(ts){if(r==="sync"){const b=Bl();c=b.__watcherHandles||(b.__watcherHandles=[])}else if(!l){const b=()=>{};return b.stop=We,b.resume=We,b.pause=We,b}}const d=ge;a.call=(b,S,P)=>Je(b,d,S,P);let u=!1;r==="post"?a.scheduler=b=>{Te(b,d&&d.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(b,S)=>{S?b():yn(b)}),a.augmentJob=b=>{e&&(b.flags|=4),u&&(b.flags|=2,d&&(b.id=d.uid,b.i=d))};const f=Xa(t,e,a);return ts&&(c?c.push(f):l&&f()),f}function Vl(t,e,s){const i=this.proxy,n=re(t)?t.includes(".")?go(i,t):()=>i[t]:t.bind(i,i);let r;V(e)?r=e:(r=e.handler,s=e);const o=as(this),a=mo(n,r.bind(i),s);return o(),a}function go(t,e){const s=e.split(".");return()=>{let i=t;for(let n=0;ne==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${ot(e)}Modifiers`]||t[`${xt(e)}Modifiers`];function Fl(t,e,...s){if(t.isUnmounted)return;const i=t.vnode.props||J;let n=s;const r=e.startsWith("update:"),o=r&&Hl(i,e.slice(7));o&&(o.trim&&(n=s.map(d=>re(d)?d.trim():d)),o.number&&(n=s.map(Tr)));let a,l=i[a=$i(e)]||i[a=$i(ot(e))];!l&&r&&(l=i[a=$i(xt(e))]),l&&Je(l,t,6,n);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Je(c,t,6,n)}}function yo(t,e,s=!1){const i=e.emitsCache,n=i.get(t);if(n!==void 0)return n;const r=t.emits;let o={},a=!1;if(!V(t)){const l=c=>{const d=yo(c,e,!0);d&&(a=!0,ce(o,d))};!s&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(ee(t)&&i.set(t,null),null):(D(r)?r.forEach(l=>o[l]=null):ce(o,r),ee(t)&&i.set(t,o),o)}function ci(t,e){return!t||!ii(e)?!1:(e=e.slice(2).replace(/Once$/,""),U(t,e[0].toLowerCase()+e.slice(1))||U(t,xt(e))||U(t,e))}function Ni(t){const{type:e,vnode:s,proxy:i,withProxy:n,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:d,props:u,data:f,setupState:b,ctx:S,inheritAttrs:P}=t,k=Qs(t);let j,M;try{if(s.shapeFlag&4){const A=n||i,X=A;j=Ue(c.call(X,A,d,u,b,f,S)),M=a}else{const A=e;j=Ue(A.length>1?A(u,{attrs:a,slots:o,emit:l}):A(u,null)),M=e.props?a:ql(a)}}catch(A){Gt.length=0,ai(A,t,1),j=vt(Xt)}let N=j;if(M&&P!==!1){const A=Object.keys(M),{shapeFlag:X}=N;A.length&&X&7&&(r&&A.some(nn)&&(M=Ul(M,r)),N=kt(N,M,!1,!0))}return s.dirs&&(N=kt(N,null,!1,!0),N.dirs=N.dirs?N.dirs.concat(s.dirs):s.dirs),s.transition&&bn(N,s.transition),j=N,Qs(k),j}const ql=t=>{let e;for(const s in t)(s==="class"||s==="style"||ii(s))&&((e||(e={}))[s]=t[s]);return e},Ul=(t,e)=>{const s={};for(const i in t)(!nn(i)||!(i.slice(9)in e))&&(s[i]=t[i]);return s};function Kl(t,e,s){const{props:i,children:n,component:r}=t,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(s&&l>=0){if(l&1024)return!0;if(l&16)return i?Zn(i,o,c):!!o;if(l&8){const d=e.dynamicProps;for(let u=0;ut.__isSuspense;function zl(t,e){e&&e.pendingBranch?D(t)?e.effects.push(...t):e.effects.push(t):sl(t)}const Ce=Symbol.for("v-fgt"),di=Symbol.for("v-txt"),Xt=Symbol.for("v-cmt"),Bi=Symbol.for("v-stc"),Gt=[];let Le=null;function Oe(t=!1){Gt.push(Le=t?null:[])}function Jl(){Gt.pop(),Le=Gt[Gt.length-1]||null}let es=1;function Xn(t){es+=t,t<0&&Le&&(Le.hasOnce=!0)}function Gl(t){return t.dynamicChildren=es>0?Le||Lt:null,Jl(),es>0&&Le&&Le.push(t),t}function Ae(t,e,s,i,n,r){return Gl($(t,e,s,i,n,r,!0))}function vo(t){return t?t.__v_isVNode===!0:!1}function Ft(t,e){return t.type===e.type&&t.key===e.key}const Co=({key:t})=>t??null,zs=({ref:t,ref_key:e,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?re(t)||ye(t)||V(t)?{i:Pe,r:t,k:e,f:!!s}:t:null);function $(t,e=null,s=null,i=0,n=null,r=t===Ce?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Co(e),ref:e&&zs(e),scopeId:Yr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Pe};return a?(xn(l,s),r&128&&t.normalize(l)):s&&(l.shapeFlag|=re(s)?8:16),es>0&&!o&&Le&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&Le.push(l),l}const vt=Yl;function Yl(t,e=null,s=null,i=0,n=null,r=!1){if((!t||t===bl)&&(t=Xt),vo(t)){const a=kt(t,e,!0);return s&&xn(a,s),es>0&&!r&&Le&&(a.shapeFlag&6?Le[Le.indexOf(t)]=a:Le.push(a)),a.patchFlag=-2,a}if(ac(t)&&(t=t.__vccOpts),e){e=Ql(e);let{class:a,style:l}=e;a&&!re(a)&&(e.class=ln(a)),ee(l)&&(gn(l)&&!D(l)&&(l=ce({},l)),e.style=an(l))}const o=re(t)?1:bo(t)?128:rl(t)?64:ee(t)?4:V(t)?2:0;return $(t,e,s,i,n,o,r,!0)}function Ql(t){return t?gn(t)||ro(t)?ce({},t):t:null}function kt(t,e,s=!1,i=!1){const{props:n,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?Xl(n||{},e):n,d={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&Co(c),ref:e&&e.ref?s&&r?D(r)?r.concat(zs(e)):[r,zs(e)]:zs(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ce?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&kt(t.ssContent),ssFallback:t.ssFallback&&kt(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&bn(d,l.clone(d)),d}function Zl(t=" ",e=0){return vt(di,null,t,e)}function Ue(t){return t==null||typeof t=="boolean"?vt(Xt):D(t)?vt(Ce,null,t.slice()):vo(t)?nt(t):vt(di,null,String(t))}function nt(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:kt(t)}function xn(t,e){let s=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(D(e))s=16;else if(typeof e=="object")if(i&65){const n=e.default;n&&(n._c&&(n._d=!1),xn(t,n()),n._c&&(n._d=!0));return}else{s=32;const n=e._;!n&&!ro(e)?e._ctx=Pe:n===3&&Pe&&(Pe.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else V(e)?(e={default:e,_ctx:Pe},s=32):(e=String(e),i&64?(s=16,e=[Zl(e)]):s=8);t.children=e,t.shapeFlag|=s}function Xl(...t){const e={};for(let s=0;s{let n;return(n=t[s])||(n=t[s]=[]),n.push(i),r=>{n.length>1?n.forEach(o=>o(r)):n[0](r)}};Xs=e("__VUE_INSTANCE_SETTERS__",s=>ge=s),Zi=e("__VUE_SSR_SETTERS__",s=>ts=s)}const as=t=>{const e=ge;return Xs(t),t.scope.on(),()=>{t.scope.off(),Xs(e)}},er=()=>{ge&&ge.scope.off(),Xs(null)};function xo(t){return t.vnode.shapeFlag&4}let ts=!1;function ic(t,e=!1,s=!1){e&&Zi(e);const{props:i,children:n}=t.vnode,r=xo(t);jl(t,i,r,e),Al(t,n,s);const o=r?nc(t,e):void 0;return e&&Zi(!1),o}function nc(t,e){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,vl);const{setup:i}=s;if(i){lt();const n=t.setupContext=i.length>1?oc(t):null,r=as(t),o=os(i,t,0,[t.props,n]),a=vr(o);if(ct(),r(),(a||t.sp)&&!zt(t)&&Qr(t),a){if(o.then(er,er),e)return o.then(l=>{tr(t,l,e)}).catch(l=>{ai(l,t,0)});t.asyncDep=o}else tr(t,o,e)}else wo(t,e)}function tr(t,e,s){V(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ee(e)&&(t.setupState=Ur(e)),wo(t,s)}let sr;function wo(t,e,s){const i=t.type;if(!t.render){if(!e&&sr&&!i.render){const n=i.template||vn(t).template;if(n){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=ce(ce({isCustomElement:r,delimiters:a},o),l);i.render=sr(n,c)}}t.render=i.render||We}{const n=as(t);lt();try{Cl(t)}finally{ct(),n()}}}const rc={get(t,e){return pe(t,"get",""),t[e]}};function oc(t){const e=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,rc),slots:t.slots,emit:t.emit,expose:e}}function pi(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Ur(za(t.exposed)),{get(e,s){if(s in e)return e[s];if(s in Jt)return Jt[s](t)},has(e,s){return s in e||s in Jt}})):t.proxy}function ac(t){return V(t)&&"__vccOpts"in t}const lc=(t,e)=>Qa(t,e,ts),cc="3.5.12";/** +* @vue/runtime-dom v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Xi;const ir=typeof window<"u"&&window.trustedTypes;if(ir)try{Xi=ir.createPolicy("vue",{createHTML:t=>t})}catch{}const Eo=Xi?t=>Xi.createHTML(t):t=>t,dc="http://www.w3.org/2000/svg",pc="http://www.w3.org/1998/Math/MathML",Ye=typeof document<"u"?document:null,nr=Ye&&Ye.createElement("template"),uc={insert:(t,e,s)=>{e.insertBefore(t,s||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,s,i)=>{const n=e==="svg"?Ye.createElementNS(dc,t):e==="mathml"?Ye.createElementNS(pc,t):s?Ye.createElement(t,{is:s}):Ye.createElement(t);return t==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:t=>Ye.createTextNode(t),createComment:t=>Ye.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ye.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,s,i,n,r){const o=s?s.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),s),!(n===r||!(n=n.nextSibling)););else{nr.innerHTML=Eo(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=nr.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,s)}return[o?o.nextSibling:e.firstChild,s?s.previousSibling:e.lastChild]}},hc=Symbol("_vtc");function fc(t,e,s){const i=t[hc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):s?t.setAttribute("class",e):t.className=e}const rr=Symbol("_vod"),mc=Symbol("_vsh"),gc=Symbol(""),yc=/(^|;)\s*display\s*:/;function bc(t,e,s){const i=t.style,n=re(s);let r=!1;if(s&&!n){if(e)if(re(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();s[a]==null&&Js(i,a,"")}else for(const o in e)s[o]==null&&Js(i,o,"");for(const o in s)o==="display"&&(r=!0),Js(i,o,s[o])}else if(n){if(e!==s){const o=i[gc];o&&(s+=";"+o),i.cssText=s,r=yc.test(s)}}else e&&t.removeAttribute("style");rr in t&&(t[rr]=r?i.display:"",t[mc]&&(i.display="none"))}const or=/\s*!important$/;function Js(t,e,s){if(D(s))s.forEach(i=>Js(t,e,i));else if(s==null&&(s=""),e.startsWith("--"))t.setProperty(e,s);else{const i=vc(t,e);or.test(s)?t.setProperty(xt(i),s.replace(or,""),"important"):t[i]=s}}const ar=["Webkit","Moz","ms"],Vi={};function vc(t,e){const s=Vi[e];if(s)return s;let i=ot(e);if(i!=="filter"&&i in t)return Vi[e]=i;i=wr(i);for(let n=0;nHi||(Ec.then(()=>Hi=0),Hi=Date.now());function Ic(t,e){const s=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=s.attached)return;Je(Lc(i,s.value),e,5,[i])};return s.value=t,s.attached=Tc(),s}function Lc(t,e){if(D(e)){const s=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{s.call(t),t._stopped=!0},e.map(i=>n=>!n._stopped&&i&&i(n))}else return e}const hr=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Sc=(t,e,s,i,n,r)=>{const o=n==="svg";e==="class"?fc(t,i,o):e==="style"?bc(t,s,i):ii(e)?nn(e)||xc(t,e,s,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):jc(t,e,i,o))?(dr(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&cr(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!re(i))?dr(t,ot(e),i,r,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),cr(t,e,i,o))};function jc(t,e,s,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&hr(e)&&V(s));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const n=t.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return hr(e)&&re(s)?!1:e in t}const ei=t=>{const e=t.props["onUpdate:modelValue"]||!1;return D(e)?s=>Ks(e,s):e},Ot=Symbol("_assign"),Et={deep:!0,created(t,e,s){t[Ot]=ei(s),wn(t,"change",()=>{const i=t._modelValue,n=ss(t),r=t.checked,o=t[Ot];if(D(i)){const a=cn(i,n),l=a!==-1;if(r&&!l)o(i.concat(n));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Dt(i)){const a=new Set(i);r?a.add(n):a.delete(n),o(a)}else o(To(t,r))})},mounted:fr,beforeUpdate(t,e,s){t[Ot]=ei(s),fr(t,e,s)}};function fr(t,{value:e,oldValue:s},i){t._modelValue=e;let n;if(D(e))n=cn(e,i.props.value)>-1;else if(Dt(e))n=e.has(i.props.value);else{if(e===s)return;n=rs(e,To(t,!0))}t.checked!==n&&(t.checked=n)}const Us={deep:!0,created(t,{value:e,modifiers:{number:s}},i){const n=Dt(e);wn(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>s?Tr(ss(o)):ss(o));t[Ot](t.multiple?n?new Set(r):r:r[0]),t._assigning=!0,Wr(()=>{t._assigning=!1})}),t[Ot]=ei(i)},mounted(t,{value:e}){mr(t,e)},beforeUpdate(t,e,s){t[Ot]=ei(s)},updated(t,{value:e}){t._assigning||mr(t,e)}};function mr(t,e){const s=t.multiple,i=D(e);if(!(s&&!i&&!Dt(e))){for(let n=0,r=t.options.length;nString(c)===String(a)):o.selected=cn(e,a)>-1}else o.selected=e.has(a);else if(rs(ss(o),e)){t.selectedIndex!==n&&(t.selectedIndex=n);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function ss(t){return"_value"in t?t._value:t.value}function To(t,e){const s=e?"_trueValue":"_falseValue";return s in t?t[s]:e}const Pc=ce({patchProp:Sc},uc);let gr;function $c(){return gr||(gr=_l(Pc))}const Oc=(...t)=>{const e=$c().createApp(...t),{mount:s}=e;return e.mount=i=>{const n=kc(i);if(!n)return;const r=e._component;!V(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=s(n,!1,Ac(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e};function Ac(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function kc(t){return re(t)?document.querySelector(t):t}function Io(){const t=[];return function(e,s){if(typeof s!="object"||s===null)return s;for(;t.length>0&&t.at(-1)!==this;)t.pop();return t.includes(s)?"[Circular]":(t.push(s),s)}}function Se(t){if(!(typeof t>"u"))return JSON.parse(JSON.stringify(t,Io()))}function Lo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function en(t,e,s){return t.replace(new RegExp(Lo(e),"g"),s)}function te(t){return en(en(t,"#","root"),"/","-")}function Me(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ti(t){return Object.keys(t).sort().reduce((e,s)=>(e[s]=t[s],e),{})}function is(t,e){return B(t)&&B(e)&&(t=ti(t),e=ti(e)),JSON.stringify(t)===JSON.stringify(e)}function ui(t,e){return!is(t,e)}function hi(t){return t===null}function m(t){return typeof t<"u"}function De(t){return typeof t>"u"}function oe(t){return typeof t=="number"}function Re(t){return oe(t)&&t===Math.floor(t)}function je(t){return typeof t=="string"}function ue(t){return typeof t=="boolean"}function se(t){return Array.isArray(t)}function B(t){return!hi(t)&&!se(t)&&typeof t=="object"}function So(t){let e="any";return oe(t)?e=Re(t)?"integer":"number":je(t)?e="string":ue(t)?e="boolean":se(t)?e="array":hi(t)?e="null":B(t)&&(e="object"),e}function at(t,...e){if(!e.length)return t;const s=e.shift();return B(t)&&B(s)&&Object.keys(s).forEach(i=>{B(s[i])?(t[i]||Object.assign(t,{[i]:{}}),at(t[i],s[i])):Object.assign(t,{[i]:s[i]})}),at(t,...e)}const si=(t,e)=>(Object.keys(e).forEach(s=>{s in t&&typeof t[s]==typeof e[s]&&(B(t[s])&&B(e[s])?si(t[s],e[s]):t[s]=e[s])}),t);function jo(t,e){const s=e.split(".");let i=t;for(const n of s)if(Array.isArray(i)&&/^\d+$/.test(n)){const r=parseInt(n);if(r>=0&&r{s=s.replace(/\s/g,"");const i=s.split(/{{|}}/)[1];return jo(e,i)})}function Po(t,e,s){return Math.max(e,Math.min(t,s))}function En(t){const e=[],s=new Set;for(const i of t){const n=JSON.stringify(i);s.has(n)||(s.add(n),e.push(i))}return e}const _c={getCircularReplacer:Io,clone:Se,escapeRegExp:Lo,replaceAll:en,pathToAttribute:te,hasOwn:Me,sortObject:ti,equal:is,different:ui,isNull:hi,isSet:m,notSet:De,isNumber:oe,isInteger:Re,isString:je,isBoolean:ue,isArray:se,isObject:B,getType:So,mergeDeep:at,overwriteExistingProperties:si,getValueByJSONPath:jo,compileTemplate:W,clamp:Po,removeDuplicatesFromArray:En};function Dc(t,e){const s="x-"+e;return t[s]}function Mc(t){return je(t.$schema)?t.$schema:void 0}function fi(t){return B(t.additionalProperties)||ue(t.additionalProperties)?t.additionalProperties:void 0}function $o(t){return B(t.propertyNames)||ue(t.propertyNames)?t.propertyNames:void 0}function mi(t){return se(t.allOf)?t.allOf:void 0}function rt(t){return se(t.anyOf)?t.anyOf:void 0}function Tn(t){return t.const}function Oo(t){return B(t.contains)||ue(t.contains)?t.contains:void 0}function Ao(t){return t.default}function In(t){return B(t.dependentRequired)?t.dependentRequired:void 0}function ko(t){return B(t.dependentSchemas)?t.dependentSchemas:void 0}function ne(t){return je(t.description)?t.description:void 0}function Ln(t){return B(t.else)||ue(t.else)?t.else:void 0}function ae(t){if(se(t.enum)&&t.enum.length>0)return t.enum}function _o(t){return oe(t.exclusiveMaximum)?t.exclusiveMaximum:void 0}function Do(t){return oe(t.exclusiveMinimum)?t.exclusiveMinimum:void 0}function Mo(t){return je(t.format)?t.format:void 0}function ls(t){if(B(t.if)||ue(t.if))return t.if}function gi(t){return B(t.items)||ue(t.items)?t.items:void 0}function Ro(t){return oe(t.maximum)?t.maximum:void 0}function No(t){if(Re(t.maxContains)&&t.maxContains>=0)return t.maxContains}function Sn(t){if(Re(t.maxItems)&&t.maxItems>=0)return t.maxItems}function Bo(t){if(Re(t.maxLength)&&t.maxLength>=0)return t.maxLength}function Vo(t){if(Re(t.maxProperties))return t.maxProperties}function Ho(t){return oe(t.minimum)?t.minimum:void 0}function Fo(t){if(Re(t.minContains)&&t.minContains>=0)return t.minContains}function jn(t){if(Re(t.minItems)&&t.minItems>=0)return t.minItems}function qo(t){if(Re(t.minLength)&&t.minLength>=0)return t.minLength}function Uo(t){if(Re(t.minProperties)&&t.minProperties>=0)return t.minProperties}function Ko(t){if(oe(t.multipleOf)&&t.multipleOf>=0)return t.multipleOf}function Wo(t){return B(t.not)||ue(t.not)?t.not:void 0}function w(t,e){return t["x-options"]&&m(t["x-options"][e])?t["x-options"][e]:void 0}function zo(t){return je(t.pattern)?t.pattern:void 0}function cs(t){return B(t.patternProperties)?t.patternProperties:void 0}function yi(t){return se(t.prefixItems)?t.prefixItems:void 0}function _t(t){return B(t.properties)?t.properties:void 0}function tn(t){return ue(t.readOnly)?t.readOnly:void 0}function Pn(t){return se(t.required)?[...new Set(t.required)]:void 0}function $n(t){return B(t.then)||ue(t.then)?t.then:void 0}function Z(t){return je(t.title)?t.title:void 0}function q(t){if(je(t.type)||se(t.type))return t.type}function Ct(t){return se(t.oneOf)?t.oneOf:void 0}function Jo(t){return ue(t.unevaluatedProperties)?t.unevaluatedProperties:void 0}function On(t){return ue(t.uniqueItems)?t.uniqueItems:void 0}const Rc={getSchemaX:Dc,getSchemaSchema:Mc,getSchemaAdditionalProperties:fi,getSchemaPropertyNames:$o,getSchemaAllOf:mi,getSchemaAnyOf:rt,getSchemaConst:Tn,getSchemaContains:Oo,getSchemaDefault:Ao,getSchemaDependentRequired:In,getSchemaDependentSchemas:ko,getSchemaDescription:ne,getSchemaElse:Ln,getSchemaEnum:ae,getSchemaExclusiveMaximum:_o,getSchemaExclusiveMinimum:Do,getSchemaFormat:Mo,getSchemaIf:ls,getSchemaItems:gi,getSchemaMaximum:Ro,getSchemaMaxContains:No,getSchemaMaxItems:Sn,getSchemaMaxLength:Bo,getSchemaMaxProperties:Vo,getSchemaMinimum:Ho,getSchemaMinContains:Fo,getSchemaMinItems:jn,getSchemaMinLength:qo,getSchemaMinProperties:Uo,getSchemaMultipleOf:Ko,getSchemaNot:Wo,getSchemaXOption:w,getSchemaPattern:zo,getSchemaPatternProperties:cs,getSchemaPrefixItems:yi,getSchemaProperties:_t,getSchemaReadOnly:tn,getSchemaRequired:Pn,getSchemaThen:$n,getSchemaTitle:Z,getSchemaType:q,getSchemaOneOf:Ct,getSchemaUnevaluatedProperties:Jo,getSchemaUniqueItems:On};function ds(t,e,s,i,n){let r=[];const o=mi(s);return m(o)&&(o.forEach(a=>{const l=new le({refParser:t.refParser,schema:a,data:e,rootName:i}),c=l.getErrors();l.destroy(),c.forEach(d=>{d.path=n}),r.push(...c)}),r=En(r)),r}const F={errorAdditionalProperties:'Has additional property "{{ property }}" but no additional properties are allowed.',errorAnyOf:"Must validate against at least one of the provided schemas.",errorConst:"Must have value of: {{ const }}.",errorContains:"Must contain at least one item matching the provided schema.",errorDependentRequired:"Must have the required properties: {{ dependentRequired }}.",errorEnum:"Must be one of the enumerated values: {{ enum }}.",errorExclusiveMaximum:"Must be less than {{ exclusiveMaximum }}.",errorExclusiveMinimum:"Must be greater than {{ exclusiveMinimum }}.",errorFormat:"Must be a valid {{ format }}.",errorItems:"Must have items that validate against the provided schema.",errorMaximum:"Must be at most {{ maximum }}.",errorMaxItems:"Must have at most {{ maxItems }} items.",errorMaxLength:"Must be at most {{ maxLength }} characters long.",errorMaxProperties:"Must have at most {{ maxProperties }} properties.",errorMaxContains:"Must contain at most {{ maxContains }} items matching the provided schema. It currently contains {{ counter }}.",errorMinContains:"Must contain at least {{ minContains }} items matching the provided schema. It currently contains {{ counter }}.",errorMinimum:"Must be at least {{ minimum }}.",errorMinItems:"Must have at least {{ minItems }} items.",errorMinLength:"Must be at least {{ minLength }} characters long.",errorMinProperties:"Must have at least {{ minProperties }} properties.",errorMultipleOf:"Must be multiple of {{ multipleOf }}.",errorNot:"Must not validate against the provided schema.",errorOneOf:"Must validate against exactly one of the provided schemas. It currently validates against {{ counter }} of the schemas.",errorPattern:'Must match the pattern: "{{ pattern }}".',errorPrefixItems:"Item {{ index }} fails validation.",errorPropertyNames:'Property name "{{ propertyName }}" fails validation.',errorProperties:"The following properties do not comply with their schemas: {{ properties }}",errorRequired:"Must have the required properties: {{ required }}.",errorType:"Must be of type {{ type }}.",errorUnevaluatedProperties:'Has invalid unevaluated property "{{ property }}"',errorUniqueItems:"Must have unique items."};function ps(t,e,s,i,n){const r=[],o=qo(s);return je(e)&&m(o)&&(e=e.replace(/[\uDCA9]/g,""),e.length{const c=new le({refParser:t.refParser,schema:l,data:e}),d=c.getErrors();c.destroy(),d.length===0&&(a=!0)}),a||r.push({messages:[F.errorAnyOf],path:n,constrain:"anyOf"})}return r}function hs(t,e,s,i,n){const r=[],o=ae(s);return m(o)&&!o.some(l=>JSON.stringify(e)===JSON.stringify(l))&&r.push({messages:[W(F.errorEnum,{enum:JSON.stringify(o)})],path:n,constrain:"enum"}),r}function fs(t,e,s,i,n){const r=[],o=_o(s);return oe(e)&&m(o)&&e>=o&&r.push({messages:[W(F.errorExclusiveMaximum,{exclusiveMaximum:o})],path:n,constrain:"exclusiveMaximum"}),r}function ms(t,e,s,i,n){const r=[],o=Do(s);return oe(e)&&m(o)&&e<=o&&r.push({messages:[W(F.errorExclusiveMinimum,{exclusiveMinimum:o})],path:n,constrain:"exclusiveMinimum"}),r}function gs(t,e,s,i,n){const r=[],o=Mo(s);let a=t.validateFormat;if(w(s,"validateFormat")&&(a=s.options.validateFormat),m(o)&&je(e)&&a){let l;o==="email"&&(l=new RegExp(/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/i)),o==="url"&&(l=new RegExp(/^(?:https?|ftp):\/\/(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:(?:[^\s:@]+(?::[^\s:@]*)?@)?(?:[^\s:@](?:[^\s:@-]*[^\s:@])?\.?)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})(?::\d{2,5})?(?:\/[^\s]*)?$/i)),o==="uuid"&&(l=new RegExp(/^(?:urn:uuid:)?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/i)),m(l)&&!l.test(e)&&r.push({messages:[W(F.errorFormat,{format:o})],path:n,constrain:"format"})}return r}function ys(t,e,s,i,n){const r=[],o=gi(s),a=yi(s);if(se(e)&&m(o)){const l=m(a)?a.length:0;o===!1&&e.length>0&&e.length>l&&r.push({messages:[F.errorItems],path:n,constrain:"items"})}return r}function bs(t,e,s,i,n){const r=[],o=Sn(s);return se(e)&&m(o)&&e.length>o&&r.push({messages:[W(F.errorMaxItems,{maxItems:o})],path:n,constrain:"maxItems"}),r}function vs(t,e,s,i,n){const r=[],o=Bo(s);return je(e)&&m(o)&&(e=e.replace(/[\uDCA9]/g,""),e.length>o&&r.push({messages:[W(F.errorMaxLength,{maxLength:o})],path:n,constrain:"maxLength"})),r}function Cs(t,e,s,i,n){const r=[],o=Vo(s);return B(e)&&m(o)&&Object.keys(e).length>o&&r.push({messages:[W(F.errorMaxProperties,{maxProperties:o})],path:n,constrain:"maxProperties"}),r}function xs(t,e,s,i,n){const r=[],o=Ho(s);return oe(e)&&m(o)&&e{const c=new le({refParser:t.refParser,schema:l,data:e}),d=c.getErrors();c.destroy(),d.length===0&&a++}),a!==1&&r.push({messages:[W(F.errorOneOf,{counter:a})],path:n,constrain:"oneOf"})}return r}function Ss(t,e,s,i,n){const r=[],o=zo(s);return je(e)&&m(o)&&!new RegExp(o).test(e)&&r.push({messages:[W(F.errorPattern,{pattern:o})],path:n,constrain:"pattern"}),r}function js(t,e,s,i){let n=[];const r=cs(s);return B(e)&&m(r)&&Object.keys(e).forEach(o=>{Object.keys(r).forEach(a=>{if(new RegExp(a).test(o)){const c=r[a],d=new le({refParser:t.refParser,schema:c,data:e[o]}),u=d.getErrors().map(f=>({messages:f.messages,path:i+"/"+o,constrain:"patternProperties"}));n=[...n,...u],d.destroy()}})}),n}function Ps(t,e,s,i){const n=_t(s),r=[];return B(e)&&m(n)&&Object.keys(n).forEach(o=>{if(Me(e,o)){const a=n[o],l=new le({refParser:t.refParser,schema:a,data:e[o]});l.getErrors().length>0&&r.push(o),l.destroy()}}),r.length>0?[{messages:[W(F.errorProperties,{properties:r.join(", ")})],path:i,constraint:"properties"}]:[]}function $s(t,e,s,i,n){const r=[],o=Pn(s);if(B(e)&&m(o)){const a=[],l=Object.keys(e);o.forEach(d=>{l.includes(d)||a.push(d)}),a.length>0&&r.push({messages:[W(F.errorRequired,{required:a.join(", ")})],path:n,constrain:"required"})}return r}function Os(t,e,s,i,n){const r=[],o=q(s);if(o==="any")return r;if(m(o)){const a={string:c=>je(c),number:c=>oe(c),integer:c=>Re(c),boolean:c=>ue(c),array:c=>se(c),object:c=>B(c),null:c=>hi(c)};let l=!0;se(o)?l=o.some(c=>a[c](e)):l=a[o](e),l||r.push({messages:[W(F.errorType,{type:o,valueType:So(e)})],path:n,constrain:"type"})}return r}function As(t,e,s,i,n){const r=[],o=Ro(s);return oe(e)&&m(o)&&e>o&&r.push({messages:[W(F.errorMaximum,{maximum:o})],path:n,constrain:"maximum"}),r}function ks(t,e,s,i,n){const r=[],o=On(s);if(se(e)&&m(o)&&o===!0){const a=[];let l=!1;for(let d=0;db===f),l)break;a.push(f)}l&&r.push({messages:[F.errorUniqueItems],path:n,constrain:"uniqueItems"})}return r}function _s(t,e,s,i,n){const r=[],o=fi(s),a=cs(s),l=_t(s);if(B(e)&&m(o)){const c=l||{},d=o,u=a||{};Object.keys(e).forEach(f=>{const b=Object.keys(u).some(P=>new RegExp(P).test(f)),S=Me(c,f);if(!b&&!S){if(d===!1)r.push({messages:[W(F.errorAdditionalProperties,{property:f})],path:n,constrain:"additionalProperties"});else if(B(d)){const P=new le({refParser:t.refParser,schema:d,data:e[f]}),k=P.getErrors().map(j=>({messages:j.messages,path:`${n}.${f}`,constrain:"additionalProperties"}));r.push(...k),P.destroy()}}})}return r}const Nc={additionalProperties:_s,allOf:ds,anyOf:us,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,items:ys,maximum:As,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,properties:Ps,required:$s,type:Os,uniqueItems:ks};function bi(t,e,s,i,n){const r=[],o=Tn(s);return m(o)&&ui(e,o)&&r.push({messages:[W(F.errorConst,{const:JSON.stringify(o)})],path:n,constrain:"const"}),r}function vi(t,e,s,i,n){const r=[],o=Oo(s),a=Fo(s),l=No(s);if(se(e)&&m(o)){let c=0;e.forEach(u=>{const f=new le({refParser:t.refParser,schema:o,data:u});f.getErrors().length===0&&c++,f.destroy()});const d=c===0;m(a)?cl&&r.push({messages:[W(F.errorMaxContains,{counter:c,maxContains:l})],path:n,constrain:"maxContains"})}return r}function Ci(t,e,s,i,n){const r=[],o=In(s);if(B(e)&&m(o)){let a=[];Object.keys(o).forEach(c=>{m(e[c])&&(a=o[c].filter(u=>!Me(e,u)))}),a.length>0&&r.push({messages:[W(F.errorDependentRequired,{dependentRequired:a.join(", ")})],path:n,constrain:"dependentRequired"})}return r}function xi(t,e,s){let i=[];const n=ko(s);return B(e)&&m(n)&&Object.keys(n).forEach(r=>{if(m(e[r])){const o=n[r],a=new le({refParser:t.refParser,schema:o,data:e}),l=a.getErrors();a.destroy(),i=[...i,...l]}}),i}function wi(t,e,s){const i=[],n=ls(s),r=$n(s),o=Ln(s);if(m(n)){if(De(r)&&De(o))return i;const a=new le({refParser:t.refParser,schema:n,data:e}),l=a.getErrors();a.destroy();let c=[],d=[];if(m(r)){const u=new le({refParser:t.refParser,schema:r,data:e});c=u.getErrors(),u.destroy()}if(m(o)){const u=new le({refParser:t.refParser,schema:o,data:e});d=u.getErrors(),u.destroy()}if(n===!0)return c;if(n===!1)return d;if(l.length===0)return c;if(l.length>0)return d}return i}function Ei(t,e,s,i,n){const r=[],o=yi(s);return se(e)&&m(o)&&o.forEach((a,l)=>{const c=e[l];if(m(c)){const d=new le({refParser:t.refParser,schema:a,data:c}),u=d.getErrors();d.destroy(),u.length>0&&r.push({messages:[W(F.errorPrefixItems,{index:l})],path:n,constrain:"prefixItems"})}}),r}const Bc={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:As,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,properties:Ps,prefixItems:Ei,required:$s,type:Os,uniqueItems:ks},Vc={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:As,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,properties:Ps,prefixItems:Ei,required:$s,type:Os,uniqueItems:ks};function Go(t,e,s,i,n){let r=[];const o=Jo(s),a=cs(s),l=_t(s),c=mi(s),d=rt(s),u=Ct(s);if(B(e)&&m(o)){let f=m(l)?l:{};const b=o,S=a;[c,d,u].forEach(k=>{m(k)&&k.forEach(j=>{m(j.properties)&&(f={...f,...j.properties})})}),f&&Object.keys(e).forEach(k=>{let j=!1;if(m(S)&&Object.keys(S).forEach(M=>{j=new RegExp(M).test(k)}),!j&&b===!1&&!Me(f,k)&&r.push({messages:[W(F.errorUnevaluatedProperties,{property:k})],path:n,constrain:"unevaluatedProperties"}),!j&&B(b)&&!Me(f,k)){const M=new le({refParser:t.refParser,schema:b,data:e[k]}),N=M.getErrors().map(A=>({messages:A.messages,path:k,constrain:"unevaluatedProperties"}));r=[...r,...N],M.destroy()}})}return r}const Hc={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:As,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,propertie:Ps,prefixItems:Ei,required:$s,type:Os,unevaluatedProperties:Go,uniqueItems:ks};function Fc(t,e,s,i,n){const r=[],o=$o(s);return B(e)&&m(o)&&Object.keys(e).forEach(a=>{new le({refParser:t.refParser,schema:o,data:a}).getErrors().length>0&&r.push({messages:[W(F.errorPropertyNames,{propertyName:a})],path:n,constrain:"propertyNames"})}),r}const yr={additionalProperties:_s,allOf:ds,anyOf:us,const:bi,contains:vi,dependentRequired:Ci,dependentSchemas:xi,enum:hs,exclusiveMaximum:fs,exclusiveMinimum:ms,format:gs,if:wi,items:ys,maximum:As,maxItems:bs,maxLength:vs,maxProperties:Cs,minimum:xs,minItems:ws,minLength:ps,minProperties:Es,multipleOf:Ts,not:Is,oneOf:Ls,pattern:Ss,patternProperties:js,prefixItems:Ei,propertyNames:Fc,properties:Ps,required:$s,type:Os,unevaluatedProperties:Go,uniqueItems:ks};class qc{constructor(e={}){this.refParser=e.refParser,this.validateFormat=e.validateFormat?e.validateFormat:!1,this.draft=yr,this.jsonSchemaDrafts={"http://json-schema.org/draft-04/schema#":Nc,"http://json-schema.org/draft-06/schema#":Bc,"http://json-schema.org/draft-07/schema#":Vc,"https://json-schema.org/draft/2019-09/schema":Hc,"https://json-schema.org/draft/2020-12/schema":yr}}getErrors(e,s,i,n){let r=[];const o=w(s,"messages"),a=Se(s);return ue(a)&&a===!0?r:ue(a)&&a===!1?[{messages:m(o)?o:["invalid"],path:n}]:(Object.keys(this.draft).forEach(l=>{if(Me(a,l)){const c=this.draft[l],d=c(this,e,s,i,n);d&&(r=[...r,...d])}}),r.length>0&&o&&(r=[{messages:o,path:n}]),r)}}class Yo{constructor(){this.listeners=[]}on(e,s){this.listeners.push({name:e,callback:s})}off(e){this.listeners=this.listeners.filter(s=>s.name!==e)}emit(e,s=void 0){this.listeners.filter(n=>n.name===e).forEach(n=>{n.callback(s)})}destroy(){Object.keys(this).forEach(e=>{delete this[e]})}}class dt extends Yo{constructor(e){super(),this.jedi=e.jedi,this.path=e.path||this.jedi.rootName,this.schema=e.schema,this.value=m(e.value)?e.value:void 0,this.isActive=!0,this.parent=e.parent||null,this.children=[],this.ui=null,this.isDirty=!1,this.init()}init(){this.register(),this.setInitialValue(),this.prepare(),this.setDefaultValue(),this.jedi.options.container&&this.setUI(),this.on("change",()=>{this.parent&&(this.parent.isDirty=!0,this.parent.onChildChange())})}setUI(){const e=this.jedi.uiResolver.getClass(this.schema);this.ui=new e(this)}getKey(){return this.path.split(this.jedi.pathSeparator).pop()}register(){this.jedi.register(this);const e=s=>{this.jedi.register(s),s.children.forEach(e)};this.children.forEach(e)}unregister(){this.jedi.unregister(this)}setInitialValue(){if(De(this.value)){let e;const s=q(this.schema);s==="boolean"&&(e=!1),s==="number"&&(e=0),s==="integer"&&(e=0),s==="string"&&(e=""),s==="array"&&(e=[]),s==="object"&&(e={}),s==="null"&&(e=null),this.value=e}}setDefaultValue(){const e=Ao(this.schema);m(e)&&this.setValue(e,!1)}getValue(){return this.value}setValue(e,s=!0){const i=this.jedi.options.enforceConst||w(this.schema,"enforceConst");if(m(i)&&is(i,!0)){const n=Tn(this.schema);m(n)&&(e=n)}this.value=e,this.emit("set-value",e),s&&(this.isDirty=!0,this.emit("change"),this.jedi.emit("instance-change",this))}onChildChange(){}getErrors(){if(!this.isActive)return[];const e=this.jedi.validator.getErrors(this.getValue(),this.schema,this.getKey(),this.path);return En(e)}prepare(){}activate(){this.isActive===!1&&(this.isActive=!0,this.emit("change"))}deactivate(){this.isActive===!0&&(this.isActive=!1,this.emit("change"))}isReadOnly(){let e=!1;return tn(this.schema)===!0&&(e=!0),this.parent&&tn(this.parent.schema)===!0&&(e=!0),e}destroy(){this.unregister(),this.listeners=[],this.children.forEach(e=>{e.destroy()}),this.ui&&this.ui.destroy(),Object.keys(this).forEach(e=>{delete this[e]}),super.destroy()}}class et{constructor(e){this.instance=e,this.theme=null,this.control=null,this.disabled=!1,this.readOnly=this.instance.isReadOnly(),this.showingValidationErrors=!1,this.init(),this.build(),this.enforceEnumDefault(),this.addEventListeners(),this.setContainerAttributes(),this.refreshUI(),(this.instance.jedi.options.showErrors==="always"||w(this.instance.schema,"showErrors")==="always")&&this.showValidationErrors(this.instance.getErrors()),this.instance.on("set-value",()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())}),this.instance.on("change",()=>{this.refreshUI(),this.showValidationErrors(this.instance.getErrors())})}static resolves(e){}init(){this.theme=this.instance.jedi.theme}setContainerAttributes(){this.control.container.setAttribute("data-path",this.instance.path),this.control.container.setAttribute("data-type",q(this.instance.schema))}build(){}enforceEnumDefault(){const e=w(this.instance.schema,"enforceEnumDefault")??this.instance.jedi.options.enforceEnumDefault,s=ae(this.instance.schema);m(s)&&!s.includes(this.instance.getValue())&&m(s[0])&&e&&this.instance.setValue(s[0],!1)}addEventListeners(){}showValidationErrors(e,s=!1){if(e=e.filter(r=>r.path===this.instance.path),this.control.messages.innerHTML="",this.showingValidationErrors=!1,(this.instance.jedi.options.showErrors==="never"||w(this.instance.schema,"showErrors")==="never")&&!s||e.length===0)return;const n=Z(this.instance.schema)||this.instance.getKey();e.forEach(r=>{r.constraint!=="properties"&&r.messages.forEach(o=>{const a=this.getInvalidFeedback({message:n+": "+o});this.control.messages.appendChild(a)})}),this.showingValidationErrors=!0}getInvalidFeedback(e){return this.theme.getInvalidFeedback(e)}disable(){this.disabled=!0,this.refreshUI()}enable(){this.disabled=!1,this.refreshUI()}refreshUI(){this.refreshInteractiveElements()}refreshInteractiveElements(){this.control.container.querySelectorAll("button, input, select, textarea").forEach(s=>{this.disabled||this.readOnly?s.setAttribute("disabled",""):s.removeAttribute("disabled","")})}sanitize(e){return e}destroy(){this.control.container&&this.control.container.parentNode&&this.control.container.parentNode.removeChild(this.control.container),Object.keys(this).forEach(e=>{delete this[e]})}}class An extends et{static resolves(e){const s=ls(e);return m(s)}build(){this.control=this.theme.getIfThenElseControl({title:"Options",titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!1})}addEventListeners(){this.control.switcher.input.addEventListener("change",()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)})}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class Uc extends dt{setUI(){this.ui=new An(this)}prepare(){this.instances=[],this.instanceStartingValues=[],this.instanceWithoutIf=null,this.activeInstance=null,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.ifThenElseShemas=[],this.traverseSchema(this.schema),delete this.schema.if,delete this.schema.then,delete this.schema.else;let e=0;this.ifThenElseShemas.forEach(n=>{m(n.then)&&(this.schemas.push(at({},Se(this.schema),n.then)),this.switcherOptionValues.push(e),this.switcherOptionsLabels.push("then"),e++),m(n.else)&&(this.schemas.push(at({},Se(this.schema),n.else)),this.switcherOptionValues.push(e),this.switcherOptionsLabels.push("else"),e++)});const s=Se(this.schema);delete s.if,delete s.then,delete s.else,this.instanceWithoutIf=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path,parent:this.parent}),this.schemas.forEach(n=>{const r=this.jedi.createInstance({jedi:this.jedi,schema:n,path:this.path,parent:this.parent});this.instanceStartingValues.push(r.getValue()),r.on("change",()=>{const o=this.activeInstance.getValue();this.getFittestIndex(o)!==this.index?this.setValue(o):(this.value=this.activeInstance.getValue(),this.emit("change"))}),this.instances.push(r)}),this.on("set-value",n=>{let r=this.instanceWithoutIf.getValue();B(r)&&B(n)&&(r=si(r,n)),this.instances.forEach((l,c)=>{const d=this.instanceStartingValues[c];B(d)&&B(n)&&(n=si(d,r)),l.setValue(n,!1)});const o=this.getFittestIndex(n);o!==this.index&&this.switchInstance(o)}),this.value=this.instanceWithoutIf.getValue();const i=this.getFittestIndex(this.value);this.switchInstance(i)}switchInstance(e){this.activeInstance&&this.activeInstance.unregister(),this.index=e,this.activeInstance=this.instances[this.index],this.activeInstance.register(),this.value=this.activeInstance.getValue()}traverseSchema(e){const s=ls(e);if(m(s)){const i=$n(e),n=Ln(e);this.ifThenElseShemas.push({if:s,then:m(i)?i:{}}),this.ifThenElseShemas.push({if:s,else:m(n)?n:{}})}}getFittestIndex(e){let s=this.index;return this.ifThenElseShemas.forEach((i,n)=>{const r=new le({schema:i.if,data:e,refParser:this.jedi.refParser}),o=r.getErrors();r.destroy(),o.length===0&&i.then&&(s=n),o.length>0&&i.else&&(s=n)}),s}destroy(){this.instances.forEach(e=>{e.destroy()}),super.destroy()}getAllOfCombinations(e){const s=[],i=(r,o)=>({...r,...o}),n=(r,o)=>{if(o.length===0){s.push(r);return}const a=o[0];n(i(r,a),o.slice(1)),n(r,o.slice(1))};for(let r=0;rObject.keys(r).length-Object.keys(o).length),s}}class Kc extends dt{prepare(){this.instances=[],this.activeInstance=null,this.lastIndex=0,this.index=0,this.schemas=[],this.switcherOptionValues=[],this.switcherOptionsLabels=[],this.on("set-value",()=>{this.onSetValue()});const e=q(this.schema);if(m(rt(this.schema))||m(Ct(this.schema))){const i=m(rt(this.schema))?rt(this.schema):Ct(this.schema),n=Se(this.schema);delete n.anyOf,delete n.oneOf,delete n.options,i.forEach((r,o)=>{r={...n,...r},this.jedi.refParser&&(r=this.jedi.refParser.expand(r));let a="Option-"+(o+1);const l=w(r,"switcherTitle"),c=Z(r);m(c)&&(a=c),m(l)&&(a=l),this.switcherOptionValues.push(o),this.switcherOptionsLabels.push(a),this.schemas.push(r)})}else if(se(e))e.forEach((i,n)=>{const r=at(this.schema),o={...r,type:i,title:i[0].toUpperCase()+i.slice(1)};m(r.title)&&(o.title=r.title),this.switcherOptionValues.push(n),this.switcherOptionsLabels.push(i.charAt(0).toUpperCase()+i.slice(1)),this.schemas.push(o)});else if(e==="any"||!e){const i=Se(this.schema);this.schemas=[{...i,type:"object"},{...i,type:"array"},{...i,type:"string"},{...i,type:"number"},{...i,type:"integer"},{...i,type:"boolean"},{...i,type:"null"}],this.schemas.forEach((n,r)=>{this.switcherOptionValues.push(r)}),this.switcherOptionsLabels=["Object","Array","String","Number","Integer","Boolean","Null"]}this.schemas.forEach(i=>{const n=this.jedi.createInstance({jedi:this.jedi,schema:i,path:this.path,parent:this.parent,value:Se(this.value)});m(this.value)&&n.setValue(this.value,!1),n.unregister(),n.off("change"),n.on("change",()=>{this.value=this.activeInstance.getValue(),this.emit("change")}),this.instances.push(n),this.register()});const s=this.getFittestIndex(this.value);this.switchInstance(s,this.value)}switchInstance(e,s){this.lastIndex=this.index,this.index=e,this.activeInstance=this.instances[e],m(s)&&this.activeInstance.setValue(s,!1),this.setValue(this.activeInstance.getValue())}onSetValue(){if(ui(this.activeInstance.getValue(),this.value)){const e=this.getFittestIndex(this.value);this.switchInstance(e,this.value)}}getFittestIndex(e){let s=0,i,n;for(const r of this.instances){const o=this.jedi.validator.getErrors(e,r.schema,r.getKey(),r.path);(De(i)||De(n))&&(i=s,n=o),o.length{e.destroy()}),super.destroy()}}class Wc extends dt{}class zc extends dt{prepare(){this.properties={};const e=_t(this.schema);m(e)&&Object.keys(e).forEach(s=>{const i=e[s];this.properties[s]={schema:i};let n=!0;const r=this.jedi.options.deactivateNonRequired,o=w(this.schema,"deactivateNonRequired"),a=w(i,"deactivateNonRequired");this.isNotRequired(s)&&m(r)&&r===!0&&(n=!1),this.isNotRequired(s)&&m(o)&&o===!0&&(n=!1),this.isNotRequired(s)&&m(a)&&a===!0&&(n=!1),n&&this.createChild(i,s)}),this.refreshInstances(),this.on("set-value",()=>{this.refreshInstances()})}isRequired(e){const s=Pn(this.schema);return m(s)&&s.includes(e)}isDependentRequired(e){const s=In(this.schema);if(m(s)){let i=[];return Object.keys(s).forEach(n=>{m(this.value[n])&&(i=s[n].filter(o=>!Me(this.value,o)))}),i.includes(e)}return!1}createChild(e,s,i,n=!1){const r=this.jedi.createInstance({jedi:this.jedi,schema:e,path:this.path+this.jedi.pathSeparator+s,parent:this,value:Se(i)});this.children.push(r),this.value[s]=r.getValue();const o=this.jedi.options.deactivateNonRequired||w(this.schema,"deactivateNonRequired");return this.isNotRequired(s)&&m(o)&&o===!0&&!n&&r.deactivate(),r}isNotRequired(e){return!this.isRequired(e)&&!this.isDependentRequired(e)}deleteChild(e){for(let s=this.children.length-1;s>=0;s--){const i=this.children[s];i.getKey()===e&&(i.destroy(),this.children.splice(s,1),this.onChildChange())}}getChild(e){return this.children.find(s=>e===s.getKey().split(this.jedi.pathSeparator).pop())}getPropertySchema(e){let s;const i=fi(this.schema),n=_t(this.schema),r=cs(this.schema);return m(n)&&Me(n,e)?s=n[e]:m(r)&&Object.keys(r).forEach(o=>{new RegExp(o).test(e)&&(s=r[o])}),De(s)&&m(i)&&(s=i),De(s)&&(s={}),s}onChildChange(){const e={};this.children.forEach(s=>{s.isActive&&(e[s.getKey()]=s.getValue())}),this.value=e,this.emit("change")}sortChildrenByPropertyOrder(){this.children=this.children.sort((e,s)=>{const i=w(e.schema,"propertyOrder"),n=w(s.schema,"propertyOrder"),r=oe(i),o=oe(n);return!r&&o?1:r&&!o||in?1:0})}refreshInstances(){const e=this.getValue();if(B(e)){Object.keys(e).forEach(s=>{const i=this.getChild(s);if(i){i.activate();const n=i.getValue(),r=e[i.getKey()];ui(n,r)&&i.setValue(r,!1)}else{const n=this.getPropertySchema(s);this.createChild(n,s,e[s],!0)}});for(let s=this.children.length-1;s>=0;s--){const i=this.children[s],n=i.getKey();De(e[n])&&(this.getChild(n)?i.deactivate():this.deleteChild(n))}this.sortChildrenByPropertyOrder()}}}class Jc extends dt{prepare(){this.refreshChildren(),this.on("set-value",()=>{this.refreshChildren()})}createItemInstance(e){let s;const i=this.children.length,n=gi(this.schema),r=yi(this.schema);s=m(n)?n:{},m(r)&&m(r[i])&&(s=r[i]);const a=this.jedi.createInstance({jedi:this.jedi,schema:s,path:this.path+this.jedi.pathSeparator+i,parent:this,value:Se(e)});return m(e)&&a.setValue(e,!1),a}move(e,s){const i=Se(this.getValue()),n=i[e];i.splice(e,1),i.splice(s,0,n),this.setValue(i)}addItem(){const e=this.createItemInstance(),s=Se(this.getValue());s.push(e.getValue()),e.destroy(),this.setValue(s)}deleteItem(e){const i=Se(this.getValue()).filter((n,r)=>r!==e);this.setValue(i)}onChildChange(){const e=[];this.children.forEach(s=>{e.push(s.getValue())}),this.value=e,this.emit("change")}refreshChildren(){this.children=[];const e=this.getValue();se(e)&&e.forEach(s=>{const i=this.createItemInstance(s);this.children.push(i)})}}class Gc extends dt{}class Yc extends dt{}class Qc extends dt{}const Zc={properties:"glyphicon glyphicon-list",delete:"glyphicon glyphicon-trash",add:"glyphicon glyphicon-plus",moveUp:"glyphicon glyphicon-arrow-up",moveDown:"glyphicon glyphicon-arrow-down",collapse:"glyphicon glyphicon-chevron-down",drag:"glyphicon glyphicon-th"},Xc={properties:"bi bi-card-list",delete:"bi bi-trash2",add:"bi bi-plus",moveUp:"bi bi-arrow-up",moveDown:"bi bi-arrow-down",collapse:"bi bi-chevron-down",drag:"bi bi-grip-vertical"},ed={properties:"icon-list",delete:"icon-trash",add:"icon-plus",moveUp:"icon-arrow-up",moveDown:"icon-arrow-down",collapse:"icon-chevron-down",drag:"icon-th"},td={properties:"fa fa-list",delete:"fa fa-trash-o",add:"fa fa-plus",moveUp:"fa fa-arrow-up",moveDown:"fa fa-arrow-down",collapse:"fa fa-chevron-down",drag:"fa fa-th"},sd={properties:"fas fa-list",delete:"fas fa-trash",add:"fas fa-plus",moveUp:"fas fa-arrow-up",moveDown:"fas fa-arrow-down",collapse:"fas fa-chevron-down",drag:"fas fa-grip-vertical"},id={properties:"fa-solid fa-list",delete:"fa-solid fa-trash",add:"fa-solid fa-plus",moveUp:"fa-solid fa-arrow-up",moveDown:"fa-solid fa-arrow-down",collapse:"fa-solid fa-chevron-down",drag:"fa-solid fa-grip-vertical"};class Ti extends et{sanitize(e){return!!e}}class Qo extends Ti{static resolves(e){return q(e)==="boolean"&&w(e,"format")==="radio"}build(){this.control=this.theme.getRadiosControl({values:["false","true"],titles:w(this.instance.schema,"enumTitles")||["false","true"],id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.radios.forEach(e=>{e.addEventListener("change",()=>{const s=e.value==="true";this.instance.setValue(s)})})}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach(e=>{const s=e.value==="true";e.checked=s===this.instance.getValue()})}}class Zo extends Ti{static resolves(e){return q(e)==="boolean"}build(){this.control=this.theme.getSelectControl({values:["false","true"],titles:w(this.instance.schema,"enumTitles")||["false","true"],id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{const e=this.control.input.value==="true";this.instance.setValue(e)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()===!0?"true":"false"}}class Xo extends Ti{static resolves(e){return q(e)==="boolean"&&w(e,"format")==="checkbox"}build(){this.control=this.theme.getCheckboxControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.checked)})}sanitize(e){return!!e}refreshUI(){this.refreshInteractiveElements(),this.control.input.checked=this.instance.getValue()}}class tt extends et{sanitize(e){return String(e)}}class ea extends tt{static resolves(e){return q(e)==="string"&&w(e,"format")==="radio"}build(){this.control=this.theme.getRadiosControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.radios.forEach(e=>{e.addEventListener("change",()=>{this.instance.setValue(e.value)})})}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach(e=>{e.checked=e.value===this.instance.getValue()})}}class ta extends tt{static resolves(e){return q(e)==="string"&&m(ae(e))}build(){this.control=this.theme.getSelectControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class sa extends tt{static resolves(e){return q(e)==="string"&&w(e,"format")==="textarea"}build(){this.control=this.theme.getTextareaControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class ia extends tt{static resolves(e){return window.Awesomplete&&q(e)==="string"&&m(w(e,"awesomplete"))}build(){this.control=this.theme.getInputControl({type:"text",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.awesomplete=new window.Awesomplete(this.control.input,w(this.instance.schema,"awesomplete")),this.control.container.querySelector(".awesomplete").style.display="block"}catch(e){console.error("Awesomplete is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("awesomplete-selectcomplete",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}destroy(){this.awesomplete.destroy(),super.destroy()}}class Ii extends tt{static resolves(e){return q(e)==="string"}static getTypes(){return["hidden","color","date","datetime-local","email","number","month","password","search","time","tel","text","url","week"]}build(){const e=w(this.instance.schema,"format");this.control=this.theme.getInputControl({type:Ii.getTypes().includes(e)?e:"text",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden")||e==="hidden",description:ne(this.instance.schema)}),e==="color"&&this.instance.value.length===0&&this.instance.setValue("#000000",!1)}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}sanitize(e){return String(e)}refreshUI(){this.refreshInteractiveElements(),this.control.input.value=this.instance.getValue()}}class Ds extends et{sanitize(e){return q(this.instance.schema)==="integer"?Math.floor(Number(e)):Number(e)}}class na extends Ds{static resolves(e){const s=q(e),i=ae(e),n=w(e,"format");return(s==="number"||s==="integer")&&m(i)&&n==="radio"}build(){this.control=this.theme.getRadiosControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.radios.forEach(e=>{e.addEventListener("change",()=>{const s=this.sanitize(e.value);this.instance.setValue(s)})})}refreshUI(){this.refreshInteractiveElements(),this.control.radios.forEach(e=>{e.checked=Number(e.value)===Number(this.instance.getValue())})}}class ra extends Ds{static resolves(e){const s=q(e);return(s==="number"||s==="integer")&&m(ae(e))}build(){this.control=this.theme.getSelectControl({values:ae(this.instance.schema),titles:w(this.instance.schema,"enumTitles")||ae(this.instance.schema),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)})}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();oe(e)&&(this.control.input.value=this.instance.getValue())}}class oa extends Ds{static resolves(e){const s=q(e);return s==="number"||s==="integer"}build(){this.control=this.theme.getInputControl({type:"number",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden")||w(this.instance.schema,"format")==="hidden",description:ne(this.instance.schema)})}addEventListeners(){this.control.input.addEventListener("change",()=>{const e=this.sanitize(this.control.input.value);this.instance.setValue(e)})}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();oe(e)&&(this.control.input.value=this.instance.getValue())}}class Li extends et{static resolves(e){return q(e)==="object"}build(){this.propertyActivators={};const e=this.instance.schema.options||{};let s=!0;const i=fi(this.instance.schema);m(i)&&i===!1&&(s=!1);let n=!1;m(this.instance.jedi.options.enablePropertiesToggle)&&(n=this.instance.jedi.options.enablePropertiesToggle),m(e.enablePropertiesToggle)&&(n=e.enablePropertiesToggle),this.control=this.theme.getObjectControl({title:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),enablePropertiesToggle:n,addProperty:s,enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||w(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||w(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addPropertyBtn.addEventListener("click",()=>{const e=this.control.addPropertyControl.input.value.split(" ").join("");if(e.length===0||m(this.instance.value[e]))return;const n=this.instance.getPropertySchema(e),r=this.instance.createChild(n,e);r.activate(),this.instance.setValue(this.instance.value),this.control.addPropertyControl.input.value="";const o=this.control.ariaLive;o.innerHTML="";const a=Z(r.schema),l=m(a)?a:e,c=this.theme.getAriaLiveMessage();c.textContent=l+" field was added to the form",o.appendChild(c),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()})}sanitize(e){return B(e)?e:{}}getInvalidFeedback(e){return this.theme.getAlert(e)}refreshPropertiesSlot(){const e=w(this.instance.schema,"enablePropertiesToggle");if(is(this.instance.jedi.options.enablePropertiesToggle,!0)||is(e,!0)){const s=this.instance.children.map(i=>i.getKey());for(;this.control.propertiesActivators.firstChild;)this.control.propertiesActivators.removeChild(this.control.propertiesActivators.firstChild);s.forEach(i=>{const n=this.instance.isRequired(i),r=this.instance.isDependentRequired(i),o=!n&&!r,a=this.control.ariaLive,l=this.instance.getPropertySchema(i),c=Z(l),d=this.instance.path+this.instance.jedi.pathSeparator+i,u=te(d)+"-activator",f=m(c)?c:i;if(o){const S=this.theme.getCheckboxControl({id:u,label:f,titleHidden:!1}),P=S.input;this.propertyActivators[i]=P,P.addEventListener("change",()=>{a.innerHTML="";const k=this.theme.getAriaLiveMessage();P.checked?(this.instance.getChild(i)||this.instance.createChild(l,i),this.instance.getChild(i).activate(),k.textContent=f+" field was added to the form",a.appendChild(k)):(this.instance.getChild(i).deactivate(),k.textContent=f+" field was removed from the form",a.appendChild(k)),this.control.propertiesContainer.close(),this.control.propertiesContainer.showModal()}),this.control.propertiesActivators.appendChild(S.container)}const b=this.propertyActivators[i];b&&(b.disabled=this.disabled,b.checked=Me(this.instance.getValue(),i))})}}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.firstChild);this.instance.children.forEach(e=>{e.isActive?(e.ui.control.container.parentNode===null&&this.control.childrenSlot.appendChild(e.ui.control.container),this.disabled||this.instance.isReadOnly()?e.ui.disable():e.ui.enable()):e.ui.control.container.parentNode&&e.ui.control.container.parentNode.removeChild(e.ui.control.container)})}refreshUI(){this.refreshInteractiveElements(),this.refreshPropertiesSlot(),this.refreshEditors()}}class aa extends Li{static resolves(e){return q(e)==="object"&&m(w(e,"grid"))}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);let e=this.theme.getRow();this.control.childrenSlot.appendChild(e),this.instance.children.forEach(s=>{if(s.isActive){const i=w(s.schema,"grid"),n=(i==null?void 0:i.columns)||12,r=(i==null?void 0:i.offset)||0,o=this.theme.getCol(12,n,r);((i==null?void 0:i.newRow)||!1)&&(e=this.theme.getRow(),this.control.childrenSlot.appendChild(e)),e.appendChild(o),o.appendChild(s.ui.control.container),this.disabled||this.instance.isReadOnly()?s.ui.disable():s.ui.enable()}})}}class la extends Li{static resolves(e){return q(e)==="object"&&m(w(e,"nav"))}init(){super.init(),this.activeTabIndex=0}refreshEditors(){for(;this.control.childrenSlot.firstChild;)this.control.childrenSlot.removeChild(this.control.childrenSlot.lastChild);const e=w(this.instance.schema,"nav"),s=this.theme.getRow(),i=m(e.cols)?e.cols:4,n=this.theme.getCol(12,i),r=this.theme.getCol(12,12-i),o=this.theme.getTabContent(),a=this.theme.getTabList({stacked:m(e.stacked)?e.stacked:!1,type:m(e.variant)?e.variant:"pils"});this.control.childrenSlot.appendChild(s),s.appendChild(n),s.appendChild(r),n.appendChild(a),r.appendChild(o),this.instance.children.forEach((l,c)=>{if(l.isActive){const d=c===this.activeTabIndex,u=te(l.path),f=Z(l.schema),b=this.theme.getTab({hasErrors:l.children.some(S=>S.ui.showingValidationErrors),title:m(f)?f:l.getKey(),id:u,active:d});b.list.addEventListener("click",()=>{this.activeTabIndex=c}),this.theme.setTabPaneAttributes(l.ui.control.container,d,u),a.appendChild(b.list),o.appendChild(l.ui.control.container),this.disabled||this.instance.isReadOnly()?l.ui.disable():l.ui.enable()}})}}class kn extends et{static resolves(e){return q(e)==="array"}build(){this.control=this.theme.getArrayControl({title:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),enableCollapseToggle:this.instance.jedi.options.enableCollapseToggle||w(this.instance.schema,"enableCollapseToggle"),startCollapsed:this.instance.jedi.options.startCollapsed||w(this.instance.schema,"startCollapsed")})}addEventListeners(){this.control.addBtn.addEventListener("click",()=>{this.instance.addItem()})}getInvalidFeedback(e){return this.theme.getAlert(e)}sanitize(e){return se(e)?e:[]}isSortable(){return window.Sortable&&m(w(this.instance.schema,"sortable"))}refreshUI(){const e=Sn(this.instance.schema),s=jn(this.instance.schema);this.control.childrenSlot.innerHTML="",this.instance.children.forEach(i=>{const n=Number(i.getKey()),r=this.theme.getDeleteItemBtn(),o=this.theme.getMoveUpItemBtn(),a=this.theme.getMoveDownItemBtn(),l=this.theme.getBtnGroup(),{container:c,arrayActions:d,body:u}=this.theme.getArrayItem();if(d.appendChild(l),l.appendChild(r),l.appendChild(o),l.appendChild(a),this.isSortable()){const f=this.theme.getDragItemBtn();l.appendChild(f)}this.control.childrenSlot.appendChild(c),u.appendChild(i.ui.control.container),r.addEventListener("click",()=>{const f=Number(i.path.split(this.instance.jedi.pathSeparator).pop());this.instance.deleteItem(f)}),o.addEventListener("click",()=>{const f=n-1;this.instance.move(n,f)}),a.addEventListener("click",()=>{const f=n+1;this.instance.move(n,f)}),this.disabled||this.instance.isReadOnly()?i.ui.disable():i.ui.enable(),m(s)&&this.instance.value.length<=s&&r.setAttribute("disabled","")}),this.refreshInteractiveElements(),this.isSortable()&&(this.sortable&&this.sortable.destroy(),this.sortable=window.Sortable.create(this.control.childrenSlot,{animation:150,handle:".jedi-array-drag",disabled:this.disabled||this.readOnly,onEnd:i=>{this.instance.move(i.oldIndex,i.newIndex)}})),m(e)&&e===this.instance.value.length&&this.control.addBtn.setAttribute("disabled","")}}class ca extends kn{static resolves(e){return q(e)==="array"&&m(w(e,"nav"))}init(){super.init(),this.activeTabIndex=0}addEventListeners(){this.control.addBtn.addEventListener("click",()=>{this.activeTabIndex=this.instance.value.length,this.instance.addItem()})}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="";const e=w(this.instance.schema,"nav"),s=this.theme.getRow(),i=m(e.cols)?e.cols:4,n=this.theme.getCol(12,i),r=this.theme.getCol(12,12-i),o=this.theme.getTabContent(),a=this.theme.getTabList({stacked:m(e.stacked)?e.stacked:!1,type:m(e.type)?e.type:"pils"});this.control.childrenSlot.appendChild(s),s.appendChild(n),s.appendChild(r),n.appendChild(a),r.appendChild(o),this.instance.children.forEach((l,c)=>{const d=this.theme.getDeleteItemBtn(),u=this.theme.getMoveUpItemBtn(),f=this.theme.getMoveDownItemBtn();l.ui.control.arrayActions.innerHTML="",l.ui.control.arrayActions.appendChild(d),l.ui.control.arrayActions.appendChild(u),l.ui.control.arrayActions.appendChild(f),this.control.childrenSlot.appendChild(l.ui.control.container);let b;const S=w(this.instance.schema,"itemTemplate");if(S){const M=S,N={i0:c,i1:c+1,value:l.getValue()};b=W(M,N)}else{const M=Z(l.schema);b=m(M)?M+" "+(c+1):l.getKey()}d.addEventListener("click",()=>{this.activeTabIndex=Po(c-1,0,this.instance.value.length-1),this.instance.deleteItem(c)}),u.addEventListener("click",()=>{const M=c-1;this.activeTabIndex=M,this.instance.move(c,M)}),f.addEventListener("click",()=>{const M=c+1;this.activeTabIndex=M,this.instance.move(c,M)});const P=c===this.activeTabIndex,k=te(l.path),j=this.theme.getTab({hasErrors:l.children.some(M=>M.ui.showingValidationErrors),title:b,id:k,active:P});j.list.addEventListener("click",()=>{this.activeTabIndex=c}),this.theme.setTabPaneAttributes(l.ui.control.container,P,k),a.appendChild(j.list),o.appendChild(l.ui.control.container),this.disabled||this.instance.isReadOnly()?l.ui.disable():l.ui.enable(),c===0&&u.setAttribute("disabled",""),this.instance.value.length-1===c&&f.setAttribute("disabled","")})}}class da extends et{static resolves(e){const s=q(e),i=Ct(e),n=rt(e);return m(n)||m(i)||s==="any"||se(s)||De(s)}build(){this.control=this.theme.getMultipleControl({title:"Options",titleHidden:w(this.instance.schema,"titleHidden"),id:te(this.instance.path),description:ne(this.instance.schema),switcherOptionValues:this.instance.switcherOptionValues,switcherOptionsLabels:this.instance.switcherOptionsLabels,switcher:!0})}addEventListeners(){this.control.switcher.input.addEventListener("change",()=>{const e=Number(this.control.switcher.input.value);this.instance.switchInstance(e)})}refreshUI(){this.refreshInteractiveElements(),this.control.childrenSlot.innerHTML="",this.control.childrenSlot.appendChild(this.instance.activeInstance.ui.control.container),this.control.switcher.input.value=this.instance.index,this.disabled||this.instance.isReadOnly()?this.instance.activeInstance.ui.disable():this.instance.activeInstance.ui.enable()}getInvalidFeedback(e){return this.theme.getAlert(e)}}class pa extends et{static resolves(e){return q(e)==="null"}build(){this.control=this.theme.getNullControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden")||w(this.instance.schema,"format")==="hidden",description:ne(this.instance.schema)})}sanitize(){return null}}class nd extends tt{static resolves(e){return window.Quill&&q(e)==="string"&&m(w(e,"quill"))}build(){this.control=this.theme.getPlaceholderControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.quill=new window.Quill(this.control.placeholder,w(this.instance.schema,"quill"))}catch(e){console.error("Quill is not available or not loaded correctly.",e)}}addEventListeners(){this.quill.root.addEventListener("blur",()=>{const e=this.quill.getText();e!==this.instance.getValue()&&this.instance.setValue(e)})}refreshInteractiveElements(){this.disabled||this.readOnly?this.quill.disable():this.quill.enable()}refreshUI(){super.refreshUI(),this.quill.setText(this.instance.getValue())}}class rd extends tt{static resolves(e){return window.Jodit&&q(e)==="string"&&m(w(e,"jodit"))}build(){this.control=this.theme.getTextareaControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.jodit=window.Jodit.make(this.control.input,w(this.instance.schema,"jodit"))}catch(e){console.error("Jodit is not available or not loaded correctly.",e)}}addEventListeners(){this.jodit.events.on("change",()=>{const e=this.jodit.value;e!==this.instance.getValue()&&this.instance.setValue(e)})}refreshInteractiveElements(){this.disabled||this.readOnly?this.jodit.setReadOnly(!0):this.jodit.setReadOnly(!1)}refreshUI(){super.refreshUI(),this.jodit.value=this.instance.getValue()}destroy(){this.jodit.destruct(),super.destroy()}}class od extends tt{static resolves(e){return window.flatpickr&&q(e)==="string"&&m(w(e,"flatpickr"))}build(){this.control=this.theme.getInputControl({type:"text",id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.flatpickr=window.flatpickr(this.control.input,w(this.instance.schema,"flatpickr"))}catch(e){console.error("Flatpickr is not available or not loaded correctly.",e)}}addEventListeners(){this.control.input.addEventListener("change",()=>{this.instance.setValue(this.control.input.value)})}refreshUI(){this.refreshInteractiveElements(),this.flatpickr.setDate(this.instance.getValue())}destroy(){this.flatpickr.destroy(),super.destroy()}}class ad extends Ds{static resolves(e){return typeof Raty<"u"&&q(e)==="number"&&m(w(e,"raty"))}build(){this.control=this.theme.getPlaceholderControl({id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),labelIconClass:w(this.instance.schema,"labelIconClass"),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)});try{this.raty=new Raty(this.control.placeholder,Object.assign({},w(this.instance.schema,"raty"),{click:e=>{this.instance.setValue(e)}})),this.raty.init()}catch(e){console.error("Raty is not available or not loaded correctly.",e)}}refreshInteractiveElements(){this.disabled||this.readOnly?this.raty.readOnly(!0):this.raty.readOnly(!1)}refreshUI(){super.refreshUI(),this.raty.score(this.instance.getValue())}}class ld extends et{static resolves(e){const s=q(e),i=gi(e),n=m(i)&&q(i),r=m(s)&&s==="array",o=On(e)===!0,a=m(i)&&m(ae(e.items)),l=m(i)&&m(n),c=["string","number","integer"],d=m(i)&&m(n)&&(c.includes(n)||se(n)&&n.some(u=>c.includes(u)));return r&&o&&a&&l&&d}build(){this.control=this.theme.getCheckboxesControl({values:ae(this.instance.schema.items),titles:w(this.instance.schema.items,"enumTitles")||ae(this.instance.schema.items),id:te(this.instance.path),label:Z(this.instance.schema)||this.instance.getKey(),titleHidden:w(this.instance.schema,"titleHidden"),description:ne(this.instance.schema)})}addEventListeners(){this.control.checkboxes.forEach(e=>{e.addEventListener("change",()=>{const s=this.instance.getValue();if(e.checked)s.push(e.value);else{const i=s.indexOf(e.value);i>-1&&s.splice(i,1)}this.instance.setValue(s)})})}refreshUI(){this.refreshInteractiveElements();const e=this.instance.getValue();this.control.checkboxes.forEach(s=>{s.checked=e.includes(s.value)})}}class cd{constructor(e){this.customEditors=e.customEditors??[],this.editors=[da,An,Qo,Xo,Zo,ea,ta,sa,ia,nd,rd,od,Ii,ad,na,ra,oa,aa,la,Li,ld,ca,kn,pa]}getClass(e){for(const s of this.customEditors)if(s.resolves(e))return s;for(const s of this.editors)if(s.resolves(e))return s;return null}}let le=class extends Yo{constructor(e){super(),this.options=Object.assign({container:null,iconLib:null,theme:null,refParser:null,enablePropertiesToggle:!1,enableCollapseToggle:!1,startCollapsed:!1,deactivateNonRequired:!1,schema:{},showErrors:"change",data:void 0,validateFormat:!1,mergeAllOf:!1,enforceConst:!1,enforceEnumDefault:!0,customEditors:[],hiddenInputAttributes:{}},e),this.rootName="#",this.pathSeparator="/",this.instances={},this.root=null,this.validator=null,this.schema={},this.theme=null,this.uiResolver=null,this.refParser=this.options.refParser?this.options.refParser:null,this.init(),this.bindEventListeners()}init(){if(this.uiResolver=new cd({customEditors:this.options.customEditors}),this.theme=this.options.theme,m(this.options.iconLib))switch(this.options.iconLib){case"glyphicons":this.theme.icons=Zc;break;case"bootstrap-icons":this.theme.icons=Xc;break;case"fontawesome3":this.theme.icons=ed;break;case"fontawesome4":this.theme.icons=td;break;case"fontawesome5":this.theme.icons=sd;break;case"fontawesome6":this.theme.icons=id;break}this.schema=this.options.schema,this.validator=new qc({refParser:this.refParser,validateFormat:this.options.validateFormat}),this.root=this.createInstance({jedi:this,schema:this.options.schema,path:this.rootName}),m(this.options.data)&&this.root.setValue(this.options.data,!1),this.options.container&&(this.container=this.options.container,this.appendHiddenInput(),this.container.appendChild(this.root.ui.control.container),this.container.classList.add("jedi-ready"))}bindEventListeners(){this.root&&this.root.on("change",()=>{this.emit("change")}),this.hiddenInput&&this.on("change",()=>{this.hiddenInput.value=JSON.stringify(this.getValue())})}appendHiddenInput(){const e=this.root.ui.theme.getInputControl({type:"hidden",id:"jedi-hidden-input"});this.hiddenInput=e.input,this.hiddenInput.setAttribute("name","json"),this.hiddenInput.removeAttribute("aria-describedby"),this.options.hiddenInputAttributes&&B(this.options.hiddenInputAttributes)&&Object.keys(this.options.hiddenInputAttributes).forEach(s=>{this.hiddenInput.setAttribute(s,this.options.hiddenInputAttributes[s])}),this.container.appendChild(this.hiddenInput),this.hiddenInput.value=JSON.stringify(this.getValue())}register(e){this.instances[e.path]=e}unregister(e){this.instances[e.path]=null,delete this.instances[e.path]}createInstance(e){if(this.options.mergeAllOf||w(e.schema,"mergeAllOf")){const a=mi(e.schema);m(a)&&a.forEach(l=>{e.schema=at({},e.schema,l)})}this.refParser&&(e.schema=this.refParser.expand(e.schema,e.path));const i=q(e.schema),n=Ct(e.schema),r=rt(e.schema),o=ls(e.schema);if(m(r)||m(n)||i==="any"||se(i)||De(i))return new Kc(e);if(m(o))return new Uc(e);if(i==="object")return new zc(e);if(i==="array")return new Jc(e);if(i==="string")return new Gc(e);if(i==="number"||i==="integer")return new Yc(e);if(i==="boolean")return new Wc(e);if(i==="null")return new Qc(e)}getValue(){return this.root.getValue()}setValue(){this.root.setValue(...arguments)}getInstance(e){return this.instances[e]}disable(){this.root.ui.disable()}enable(){this.root.ui.enable()}getErrors(){let e=[];return Object.keys(this.instances).forEach(s=>{const i=this.instances[s];e=[...e,...i.getErrors()]}),e}showValidationErrors(e=null){if(!this.options.container)return!1;const s=e||this.getErrors();Object.keys(this.instances).forEach(i=>{this.instances[i].ui.showValidationErrors(s,!0)})}destroy(){this.root.destroy(),this.options.container&&(this.container.innerHTML=""),Object.keys(this).forEach(e=>{delete this[e]})}};class dd{constructor(){this.refs={},this.data={}}async dereference(e){for(await this.collectRefs(e);this.refsResolved()===!1;)await this.collectRefs(e)}refsResolved(){return Object.values(this.refs).every(e=>e!==null)}async collectRefs(e,s="#"){if(!(typeof e!="object"||e===null))for(const[i,n]of Object.entries(e)){const r=s?`${s}/${i}`:`/${i}`;if(this.hasRef(e)){const o=e.$ref;if(this.isExternalRef(o)){const a=await this.load(o);this.refs[o]=a,await this.collectRefs(a,r)}else this.refs[o]=this.data[o]??null}this.data[s]=e,await this.collectRefs(n,r)}}hasRef(e){return typeof e.$ref<"u"&&typeof e.$ref=="string"}isExternalRef(e){return typeof e!="string"?!1:e.startsWith("http")||e.startsWith("https")}isObject(e){return e!==null&&typeof e=="object"}expand(e){const s=JSON.parse(JSON.stringify(e));if(this.isObject(s)&&this.hasRef(s)){const i=s.$ref;return delete s.$ref,this.expand(at({},this.refs[i],s))}return s}async load(e){try{const s=await fetch(e);if(!s.ok)throw new Error("Network response was not ok");return await s.json()}catch(s){throw console.error("Error loading",e,s),s}}}class Si{constructor(e=null){this.icons=e,this.useToggleEvents=!0,this.init()}init(){this.useToggleEvents=!0}getEditorContainer(){const e=document.createElement("div");return e.classList.add("jedi-editor-container"),e}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("jedi-editor-fieldset"),e}getLegend(e){const s=document.createElement("legend"),i=document.createElement("span");return s.classList.add("jedi-editor-legend"),i.classList.add("jedi-editor-legend-text"),s.setAttribute("aria-labelledby","#legend-"+e.id),i.textContent=e.textContent,i.setAttribute("id","#legend-"+e.id),s.appendChild(i),s}getLabel(e){const s=document.createElement("label");s.setAttribute("for",e.for);const i=this.getIcon(e.labelIconClass),n=document.createElement("span");return n.textContent=e.text,e.visuallyHidden&&this.visuallyHidden(s),s.classList.add("jedi-title"),s.appendChild(i),s.appendChild(n),{label:s,labelText:n,icon:i}}getIcon(e=""){const s=document.createElement("i");let i=e.split(" ");return i=i.filter(n=>n.length>0),i&&i.forEach(n=>{s.classList.add(n)}),s}getCard(){const e=document.createElement("div");return e.classList.add("jedi-editor-card"),e}getCardHeader(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-header"),e}getCardBody(){const e=document.createElement("div");return e.classList.add("jedi-editor-card-body"),e}getActionsSlot(){const e=document.createElement("div");return e.classList.add("jedi-actions-slot"),e}getArrayActionsSlot(){const e=document.createElement("span");return e.classList.add("jedi-array-actions-slot"),e}getChildrenSlot(){const e=document.createElement("div");return e.classList.add("jedi-children-slot"),e}getMessagesSlot(e={}){const s=document.createElement("div");return s.classList.add("jedi-messages-slot"),s.setAttribute("aria-atomic","false"),s.setAttribute("aria-live","polite"),e.id&&s.setAttribute("id",e.id),s}getControlSlot(){const e=document.createElement("div");return e.classList.add("jedi-control-slot"),e}getPropertiesToggle(e){const s=this.getButton(e);return s.classList.add("jedi-properties-toggle"),s.addEventListener("click",()=>{e.propertiesContainer.open?e.propertiesContainer.close():e.propertiesContainer.showModal()}),s}getCollapse(e){const s=document.createElement("div");return s.classList.add("jedi-collapse"),s.setAttribute("id",e.id),this.useToggleEvents&&e.startCollapsed&&(s.style.display="none"),s}getCollapseToggle(e){const s=this.getButton(e);s.classList.add("jedi-collapse-toggle"),this.useToggleEvents&&s.addEventListener("click",()=>{e.collapse.style.display==="none"?e.collapse.style.display="block":e.collapse.style.display="none"});let i=e.startCollapsed;return s.style.transition="transform 0.1s ease",i&&(s.style.transform="rotate(90deg)"),s.addEventListener("click",()=>{i?s.style.transform="rotate(0deg)":s.style.transform="rotate(90deg)",i=!i}),s}getPropertiesSlot(e){const s=document.createElement("dialog");return s.classList.add("jedi-properties-slot"),s.setAttribute("id",e.id),window.addEventListener("click",i=>{i.target===s&&s.close()}),s}getPropertiesAriaLive(){const e=document.createElement("div");return e.classList.add("jedi-properties-aria-live"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e}getAriaLiveMessage(e){const s=document.createElement("p");return s.classList.add("jedi-aria-live-message"),s.textContent=e,this.visuallyHidden(s),s}getPropertiesActivators(){const e=document.createElement("div");return e.classList.add("jedi-properties-activators"),e}getBtnGroup(){const e=document.createElement("span");return e.classList.add("jedi-btn-group"),e}getButton(e){const s=document.createElement("button");s.classList.add("jedi-btn"),s.setAttribute("type","button"),e.value&&(s.value=e.value),e.id&&s.setAttribute("id",e.id);const i=document.createElement("span");if(i.textContent=e.textContent,this.icons&&e.icon){const n=this.getIcon(this.icons[e.icon]);n.setAttribute("title",e.textContent),s.appendChild(n),this.visuallyHidden(i)}return s.appendChild(i),s}getArrayBtnAdd(){const e=this.getButton({textContent:"Add item",icon:"add"});return e.classList.add("jedi-array-add"),e}getAddPropertyButton(){const e=this.getButton({textContent:"Add property"});return e.classList.add("jedi-add-property-btn"),e}getDeleteItemBtn(){const e=this.getButton({textContent:"Delete item",icon:"delete"});return e.classList.add("jedi-array-delete"),e}getMoveUpItemBtn(){const e=this.getButton({textContent:"Move up",icon:"moveUp"});return e.classList.add("jedi-array-move-up"),e}getMoveDownItemBtn(){const e=this.getButton({textContent:"Move down",icon:"moveDown"});return e.classList.add("jedi-array-move-down"),e}getDragItemBtn(){const e=this.getButton({textContent:"Drag",icon:"drag"});return e.classList.add("jedi-array-drag"),e}getDescription(e={}){const s=document.createElement("small");return s.classList.add("jedi-description"),e.textContent&&(s.textContent=e.textContent),e.id&&s.setAttribute("id",e.id),s}getPlaceholderControl(e){const s=document.createElement("div"),i=document.createElement("div"),n=this.getActionsSlot(),r=this.getArrayActionsSlot(),{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d});return s.appendChild(o),s.appendChild(i),s.appendChild(c),s.appendChild(u),s.appendChild(n),n.appendChild(r),{container:s,placeholder:i,label:o,labelText:a,description:c,messages:u,actions:n,arrayActions:r}}getObjectControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getCardBody(),o=this.getPropertiesAriaLive(),a=this.getDescription({textContent:e.description}),l=this.getMessagesSlot(),c=this.getChildrenSlot(),d=this.getPropertiesSlot({id:"properties-slot-"+e.id}),u=this.getPropertiesToggle({textContent:e.title+" properties",id:"properties-slot-toggle-"+e.id,icon:"properties",propertiesContainer:d}),f="collapse-"+e.id,b=this.getCollapse({id:f,startCollapsed:e.startCollapsed}),S=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:f,collapse:b,startCollapsed:e.startCollapsed}),P=this.getPropertiesActivators(),k=this.getInputControl({type:"text",id:"jedi-add-property-input-"+e.id,label:"Property"}),j=this.getAddPropertyButton(),M=this.getFieldset(),N=this.getLegend({textContent:e.title,id:e.id});return j.classList.add("jedi-object-add"),s.appendChild(M),s.appendChild(d),M.appendChild(N),M.appendChild(b),b.appendChild(r),r.appendChild(a),r.appendChild(l),N.appendChild(i),i.appendChild(n),r.appendChild(c),e.addProperty&&(d.appendChild(k.container),d.appendChild(j),d.appendChild(document.createElement("hr"))),e.enablePropertiesToggle&&(i.appendChild(u),d.appendChild(o),d.appendChild(P)),e.enableCollapseToggle&&i.appendChild(S),{container:s,collapse:b,collapseToggle:S,body:r,actions:i,messages:l,childrenSlot:c,propertiesToggle:u,propertiesContainer:d,addPropertyControl:k,addPropertyBtn:j,ariaLive:o,propertiesActivators:P,arrayActions:n}}getArrayControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getCardBody(),o=this.getDescription({textContent:e.description}),a=this.getMessagesSlot(),l=this.getChildrenSlot(),c=this.getBtnGroup(),d=this.getArrayBtnAdd(),u=this.getFieldset(),f=this.getLegend({textContent:e.title,id:e.id}),b="collapse-"+e.id,S=this.getCollapse({id:b,startCollapsed:e.startCollapsed}),P=this.getCollapseToggle({textContent:e.title+" properties",id:"collapse-toggle-"+e.id,icon:"collapse",collapseId:b,collapse:S,startCollapsed:e.startCollapsed});return s.appendChild(u),u.appendChild(f),u.appendChild(S),S.appendChild(r),r.appendChild(o),r.appendChild(a),f.appendChild(i),i.appendChild(c),c.appendChild(d),i.appendChild(n),r.appendChild(l),e.enableCollapseToggle&&i.appendChild(P),{container:s,collapseToggle:P,collapse:S,body:r,actions:i,messages:a,childrenSlot:l,btnGroup:c,addBtn:d,arrayActions:n}}getArrayItem(){const e=document.createElement("div"),s=this.getCard(),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getCardHeader(),o=this.getCardBody();return e.appendChild(s),s.appendChild(r),s.appendChild(o),r.appendChild(i),i.appendChild(n),{container:e,card:s,header:r,body:o,actions:i,arrayActions:n}}getMultipleControl(e){const s=document.createElement("div"),i=this.getCard(),n=this.getActionsSlot(),r=this.getArrayActionsSlot(),o=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),a=this.getCardBody(),l=this.getDescription({textContent:e.description}),c=this.getMessagesSlot(),d=this.getChildrenSlot(),u=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return u.container.classList.add("jedi-switcher"),s.appendChild(l),s.appendChild(i),i.appendChild(o),i.appendChild(a),o.appendChild(n),e.switcher&&n.appendChild(u.container),n.appendChild(r),a.appendChild(c),a.appendChild(d),{container:s,card:i,header:o,body:a,actions:n,messages:c,childrenSlot:d,switcher:u,arrayActions:r}}getIfThenElseControl(e){const s=document.createElement("div"),i=this.getCard(),n=this.getActionsSlot(),r=this.getArrayActionsSlot(),o=this.getCardHeader({textContent:e.title,titleHidden:e.titleHidden}),a=this.getCardBody(),l=this.getDescription({textContent:e.description}),c=this.getMessagesSlot(),d=this.getChildrenSlot(),u=this.getSwitcher({values:e.switcherOptionValues,titles:e.switcherOptionsLabels,id:e.id+"-switcher",label:e.id+"-switcher",titleHidden:!0,readOnly:e.readOnly});return u.container.classList.add("jedi-switcher"),e.switcher&&s.appendChild(u.container),a.appendChild(l),s.appendChild(c),s.appendChild(d),{container:s,card:i,header:o,body:a,actions:n,messages:c,childrenSlot:d,switcher:u,arrayActions:r}}getNullControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),{label:r,labelText:o}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),a=e.id+"-description",l=this.getDescription({textContent:e.description,id:a}),c=this.getMessagesSlot(),d=document.createElement("br");return s.appendChild(r),s.appendChild(d),s.appendChild(l),s.appendChild(c),s.appendChild(i),i.appendChild(n),{container:s,label:r,labelText:o,description:l,messages:c,actions:i,arrayActions:n}}getTextareaControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("textarea");r.setAttribute("id",e.id),r.style.width="100%";const{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d}),f=d+" "+l;return r.setAttribute("aria-describedby",f),s.appendChild(o),s.appendChild(r),s.appendChild(c),s.appendChild(u),s.appendChild(i),i.appendChild(n),{container:s,input:r,label:o,labelText:a,description:c,messages:u,actions:i,arrayActions:n}}getInputControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("input");r.setAttribute("type",e.type),r.setAttribute("id",e.id),r.style.width="100%";const{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden,labelIconClass:e.labelIconClass}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d}),f=d+" "+l;return r.setAttribute("aria-describedby",f),s.appendChild(o),s.appendChild(r),s.appendChild(c),s.appendChild(u),s.appendChild(i),i.appendChild(n),{container:s,input:r,label:o,labelText:a,description:c,messages:u,actions:i,arrayActions:n}}getRadiosControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getFieldset(),o=this.getCardBody(),a=this.getLegend({textContent:e.label,id:e.id}),l=e.id+"-messages",c=this.getMessagesSlot({id:l}),d=e.id+"-description",u=this.getDescription({textContent:e.description,id:d});e.titleHidden&&this.visuallyHidden(a);const f=[],b=[],S=[],P=[];return e.values.forEach((k,j)=>{const M=document.createElement("div");f.push(M);const N=document.createElement("input");N.setAttribute("type","radio"),N.setAttribute("id",e.id+"-"+j),N.setAttribute("value",k),b.push(N);const A=l+" "+d;N.setAttribute("aria-describedby",A);const X=document.createElement("label");X.setAttribute("for",e.id+"-"+j);const be=document.createElement("span");P.push(be),e.titles&&e.titles[j]&&(be.textContent=e.titles[j]),S.push(X)}),s.appendChild(r),s.appendChild(i),r.appendChild(a),r.appendChild(o),i.appendChild(n),f.forEach((k,j)=>{o.appendChild(f[j]),k.appendChild(b[j]),k.appendChild(S[j]),S[j].appendChild(P[j])}),r.appendChild(u),r.appendChild(c),{container:s,fieldset:r,legend:a,body:o,radios:b,labels:S,labelTexts:P,radioControls:f,description:u,messages:c,actions:i,arrayActions:n}}getCheckboxControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("div"),o=document.createElement("input");o.setAttribute("type","checkbox"),o.setAttribute("id",e.id);const{label:a,labelText:l}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),c=e.id+"-description",d=this.getDescription({textContent:e.description,id:c}),u=e.id+"-messages",f=this.getMessagesSlot({id:u}),b=u+" "+c;return o.setAttribute("aria-describedby",b),s.appendChild(r),s.appendChild(i),i.appendChild(n),r.appendChild(o),r.appendChild(a),r.appendChild(d),r.appendChild(f),{container:s,formGroup:r,input:o,label:a,labelText:l,description:d,messages:f,actions:i,arrayActions:n}}getCheckboxesControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=this.getFieldset(),o=this.getCardBody(),a=this.getLegend({textContent:e.label,id:e.id}),l=e.id+"-messages",c=this.getMessagesSlot({id:l}),d=e.id+"-description",u=this.getDescription({textContent:e.description,id:d});e.titleHidden&&this.visuallyHidden(a);const f=[],b=[],S=[],P=[];return e.values.forEach((k,j)=>{const M=document.createElement("div");f.push(M);const N=document.createElement("input");N.setAttribute("type","checkbox"),N.setAttribute("id",e.id+"-"+j),N.setAttribute("value",k),b.push(N);const A=l+" "+d;N.setAttribute("aria-describedby",A);const X=document.createElement("label");X.setAttribute("for",e.id+"-"+j);const be=document.createElement("span");P.push(be),e.titles&&e.titles[j]&&(be.textContent=e.titles[j]),S.push(X)}),s.appendChild(r),s.appendChild(i),r.appendChild(a),r.appendChild(o),i.appendChild(n),f.forEach((k,j)=>{o.appendChild(f[j]),k.appendChild(b[j]),k.appendChild(S[j]),S[j].appendChild(P[j])}),o.appendChild(u),o.appendChild(c),{container:s,fieldset:r,legend:a,body:o,checkboxes:b,labels:S,labelTexts:P,checkboxControls:f,description:u,messages:c,actions:i,arrayActions:n}}getSelectControl(e){const s=document.createElement("div"),i=this.getActionsSlot(),n=this.getArrayActionsSlot(),r=document.createElement("select");r.setAttribute("id",e.id),e.values.forEach((b,S)=>{const P=document.createElement("option");P.setAttribute("value",b),e.titles&&e.titles[S]&&(P.textContent=e.titles[S]),r.appendChild(P)});const{label:o,labelText:a}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden}),l=e.id+"-description",c=this.getDescription({textContent:e.description,id:l}),d=e.id+"-messages",u=this.getMessagesSlot({id:d}),f=d+" "+l;return r.setAttribute("aria-describedby",f),s.appendChild(o),s.appendChild(r),s.appendChild(c),s.appendChild(u),s.appendChild(i),i.appendChild(n),{container:s,input:r,label:o,labelText:a,description:c,messages:u,actions:i,arrayActions:n}}getSwitcher(e){const s=document.createElement("span"),i=document.createElement("select");i.setAttribute("id",e.id),e.values.forEach((o,a)=>{const l=document.createElement("option");l.setAttribute("value",o),e.titles&&e.titles[a]&&(l.textContent=e.titles[a]),i.appendChild(l)});const{label:n,labelText:r}=this.getLabel({for:e.id,text:e.label,visuallyHidden:e.titleHidden});return s.appendChild(n),s.appendChild(i),{container:s,input:i,label:n,labelText:r}}getAlert(e){return this.getInvalidFeedback(e)}getInvalidFeedback(e){const s=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return i.textContent=e.message,n.textContent="⚠ ",n.classList.add("jedi-error-message"),n.setAttribute("aria-hidden","true"),s.classList.add("jedi-error-message"),s.appendChild(n),s.appendChild(i),s}getRow(){const e=document.createElement("div");return e.classList.add("jedi-row"),e}getCol(e,s,i){const n=document.createElement("div");return n.classList.add("jedi-col-xs-"+e),n.classList.add("jedi-col-md-"+s),i&&n.classList.add("jedi-col-md-offset-"+i),n}getTabList(){const e=document.createElement("ul");return e.classList.add("jedi-nav-list"),e}getTab(e){const s=document.createElement("li"),i=document.createElement("a");return i.classList.add("jedi-nav-link"),i.setAttribute("href","#"+e.id),i.textContent=e.hasErrors?"⚠ "+e.title:e.title,s.appendChild(i),{list:s,link:i}}getTabContent(){const e=document.createElement("div");return e.classList.add("tab-content"),e}setTabPaneAttributes(e,s,i){e.setAttribute("id",i),e.classList.add("jedi-tab-pane")}visuallyHidden(e){e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}visuallyVisible(e){e.removeAttribute("style")}}class pd extends Si{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const s=super.getCollapseToggle(e);return s.setAttribute("href","#"+e.collapseId),s.setAttribute("data-toggle","collapse"),s}getCollapse(e){const s=super.getCollapse(e);return s.classList.add("collapse"),e.startCollapsed||s.classList.add("in"),s}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("panel"),e.classList.add("panel-default"),e}getLegend(e){const s=super.getLegend(e);return s.classList.add("h5"),s.classList.add("panel-heading"),s.classList.add("pull-left"),s.setAttribute("style","margin: 0; display: flex; justify-content: space-between; align-items: center;"),s}getLabel(e){const s=super.getLabel(e);return s.icon.classList&&s.icon.setAttribute("style","margin-right: 5px;"),s}getCard(){const e=super.getCard();return e.classList.add("panel"),e.classList.add("panel-default"),e}getCardHeader(e){const s=super.getCardHeader(e);return s.classList.add("panel-heading"),s.classList.add("text-right"),s}getCardBody(){const e=super.getCardBody();return e.classList.add("panel-body"),e.style.clear="both",e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const s=super.getButton(e);return s.classList.add("btn"),s.classList.add("btn-xs"),s.classList.add("btn-default"),s}getDescription(e){const s=super.getDescription(e);return s.classList.add("text-muted"),s}getTextareaControl(e){const s=super.getTextareaControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getInputControl(e){const s=super.getInputControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getRadiosControl(e){const s=super.getRadiosControl(e),{body:i,radios:n,labels:r,labelTexts:o,radioControls:a,description:l,messages:c}=s;return a.forEach((d,u)=>{d.classList.add("radio"),i.appendChild(a[u]),d.appendChild(r[u]),r[u].appendChild(n[u]),r[u].appendChild(o[u])}),i.appendChild(l),i.appendChild(c),s}getCheckboxesControl(e){const s=super.getCheckboxesControl(e),{body:i,checkboxes:n,labels:r,labelTexts:o,checkboxControls:a}=s;return a.forEach((l,c)=>{l.classList.add("checkbox"),i.appendChild(a[c]),l.appendChild(r[c]),r[c].appendChild(n[c]),r[c].appendChild(o[c])}),s}getCheckboxControl(e){const s=super.getCheckboxControl(e),{container:i,formGroup:n,input:r,label:o,labelText:a,description:l,messages:c}=s;return n.classList.add("checkbox"),i.appendChild(n),n.appendChild(o),o.appendChild(r),o.appendChild(a),n.appendChild(l),n.appendChild(c),s}getSelectControl(e){const s=super.getSelectControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getAlert(e){const s=super.getAlert(e);return s.classList.add("alert"),s.classList.add("alert-danger"),s}getInvalidFeedback(e){const s=super.getInvalidFeedback(e);return s.classList.add("text-danger"),s}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,s,i){const n=super.getRow();return n.classList.add("col-xs-"+e),n.classList.add("col-md-"+s),i&&n.classList.add("col-md-offset-"+i),n}getTabList(e){const s=super.getTabList(e);return s.classList.add("nav"),e.type==="tabs"?s.classList.add("nav-tabs"):s.classList.add("nav-pills"),s.classList.add("nav-stacked"),e.stacked===!1&&s.classList.remove("nav-stacked"),s}getTab(e){const s=super.getTab(e);return e.active&&s.list.classList.add("active"),s.link.setAttribute("data-toggle","tab"),s}setTabPaneAttributes(e,s,i){super.setTabPaneAttributes(e,s,i),e.classList.add("tab-pane"),s&&(e.classList.add("in"),e.classList.add("active"))}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}}class ud extends Si{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("btn-block"),e}getCollapseToggle(e){const s=super.getCollapseToggle(e);return s.setAttribute("href","#"+e.collapseId),s.setAttribute("data-toggle","collapse"),s}getCollapse(e){const s=super.getCollapse(e);return s.classList.add("collapse"),e.startCollapsed||s.classList.add("show"),s}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const s=super.getLegend(e);return s.classList.add("h6"),s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-between"),s.classList.add("align-items-center"),s.classList.add("float-left"),s.classList.add("py-2"),s}getLabel(e){const s=super.getLabel(e);return s.icon.classList&&s.icon.classList.add("mr-1"),s}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const s=super.getCardHeader(e);return s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-end"),s.classList.add("align-items-center"),s.classList.add("py-1"),s}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const s=super.getButton(e);return s.classList.add("btn"),s.classList.add("btn-sm"),s}getDescription(e){const s=super.getDescription(e);return s.classList.add("text-muted"),s}getTextareaControl(e){const s=super.getTextareaControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getInputControl(e){const s=super.getInputControl(e),{container:i,input:n,label:r}=s;return i.classList.add("form-group"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getRadiosControl(e){const s=super.getRadiosControl(e),{container:i,body:n,radios:r,labels:o,labelTexts:a,radioControls:l,description:c,messages:d}=s;return i.classList.add("form-group"),l.forEach((u,f)=>{u.classList.add("form-check"),r[f].classList.add("form-check-input"),o[f].classList.add("form-check-label"),n.appendChild(l[f]),u.appendChild(r[f]),u.appendChild(o[f]),o[f].appendChild(a[f])}),n.appendChild(c),n.appendChild(d),s}getCheckboxesControl(e){const s=super.getCheckboxesControl(e),{checkboxes:i,labels:n,checkboxControls:r}=s;return r.forEach((o,a)=>{o.classList.add("form-group"),o.classList.add("form-check"),i[a].classList.add("form-check-input"),n[a].classList.add("form-check-label")}),s}getCheckboxControl(e){const s=super.getCheckboxControl(e),{container:i,formGroup:n,input:r,label:o,description:a,messages:l}=s;return n.classList.add("form-group"),n.classList.add("form-check"),r.classList.add("form-check-input"),o.classList.add("form-check-label"),i.appendChild(n),n.appendChild(r),n.appendChild(o),n.appendChild(a),n.appendChild(l),s}getSelectControl(e){const s=super.getSelectControl(e),{container:i,input:n}=s;return i.classList.add("form-group"),n.classList.add("form-control"),s}getAlert(e){const s=super.getAlert(e);return s.classList.add("alert"),s.classList.add("alert-danger"),s}getInvalidFeedback(e){const s=super.getInvalidFeedback(e);return s.classList.add("text-danger"),s.classList.add("form-text"),s.classList.add("d-block"),s}getColumnClass(e,s){return"col-"+e+"-"+s}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,s,i){const n=super.getRow(e,s,i);return n.classList.add("col-"+e),n.classList.add("col-md-"+s),i&&n.classList.add("offset-md-"+i),n}getTabList(e){const s=super.getTabList();return s.classList.add("nav"),e.type==="tabs"?s.classList.add("nav-tabs"):s.classList.add("nav-pills"),s.classList.add("flex-column"),e.stacked===!1&&s.classList.remove("flex-column"),s}getTab(e){const s=super.getTab(e);return s.list.classList.add("nav-item"),s.link.classList.add("nav-link"),s.link.setAttribute("data-toggle","tab"),e.active&&s.link.classList.add("active"),s}setTabPaneAttributes(e,s,i){super.setTabPaneAttributes(e,s,i),e.classList.add("tab-pane"),s&&e.classList.add("active")}visuallyHidden(e){e.classList.add("sr-only")}visuallyVisible(e){e.classList.remove("sr-only")}}class hd extends Si{init(){this.useToggleEvents=!1}getAddPropertyButton(){const e=super.getAddPropertyButton();return e.classList.add("btn-primary"),e.classList.add("w-100"),e}getCollapseToggle(e){const s=super.getCollapseToggle(e);return s.setAttribute("href","#"+e.collapseId),s.setAttribute("data-bs-toggle","collapse"),s}getCollapse(e){const s=super.getCollapse(e);return s.classList.add("collapse"),e.startCollapsed||s.classList.add("show"),s}getFieldset(){const e=document.createElement("fieldset");return e.classList.add("card"),e.classList.add("mb-3"),e}getLegend(e){const s=super.getLegend(e);return s.classList.add("h6"),s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-between"),s.classList.add("align-items-center"),s.classList.add("py-2"),s}getLabel(e){const s=super.getLabel(e);return s.icon.classList&&s.icon.classList.add("me-1"),s}getCard(){const e=super.getCard();return e.classList.add("card"),e.classList.add("mb-3"),e}getCardHeader(e){const s=super.getCardHeader(e);return s.classList.add("card-header"),s.classList.add("d-flex"),s.classList.add("justify-content-end"),s.classList.add("align-items-center"),s.classList.add("py-1"),s}getCardBody(){const e=super.getCardBody();return e.classList.add("card-body"),e.classList.add("pb-0"),e}getControlSlot(){const e=super.getControlSlot();return e.classList.add("mb-3"),e}getBtnGroup(){const e=super.getBtnGroup();return e.classList.add("btn-group"),e}getButton(e){const s=super.getButton(e);return s.classList.add("btn"),s.classList.add("btn-sm"),s}getDescription(e){const s=super.getDescription(e);return s.classList.add("text-muted"),s}getTextareaControl(e){const s=super.getTextareaControl(e),{container:i,input:n,label:r}=s;return i.classList.add("mb-3"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getInputControl(e){const s=super.getInputControl(e),{container:i,input:n,label:r}=s;return i.classList.add("mb-3"),n.classList.add("form-control"),e.titleHidden&&this.visuallyHidden(r),s}getRadiosControl(e){const s=super.getRadiosControl(e),{container:i,body:n,radios:r,labels:o,labelTexts:a,radioControls:l,description:c,messages:d}=s;return i.classList.add("mb-3"),l.forEach((u,f)=>{u.classList.add("form-check"),r[f].classList.add("form-check-input"),o[f].classList.add("form-check-label"),n.appendChild(l[f]),u.appendChild(r[f]),u.appendChild(o[f]),o[f].appendChild(a[f])}),n.appendChild(c),n.appendChild(d),s}getCheckboxesControl(e){const s=super.getCheckboxesControl(e),{checkboxes:i,labels:n,checkboxControls:r}=s;return r.forEach((o,a)=>{o.classList.add("mb-3"),o.classList.add("form-check"),i[a].classList.add("form-check-input"),n[a].classList.add("form-check-label")}),s}getCheckboxControl(e){const s=super.getCheckboxControl(e),{container:i,formGroup:n,input:r,label:o,description:a,messages:l}=s;return i.classList.add("mb-3"),n.classList.add("form-check"),r.classList.add("form-check-input"),o.classList.add("form-check-label"),e.titleHidden&&this.visuallyHidden(o),i.appendChild(n),n.appendChild(r),n.appendChild(o),n.appendChild(a),n.appendChild(l),s}getSelectControl(e){const s=super.getSelectControl(e),{container:i,input:n}=s;return i.classList.add("mb-3"),n.classList.add("form-select"),s}getAlert(e){const s=super.getAlert(e);return s.classList.add("alert"),s.classList.add("alert-danger"),s}getInvalidFeedback(e){const s=super.getInvalidFeedback(e);return s.classList.add("text-danger"),s.classList.add("d-block"),s.classList.add("form-text"),s.classList.add("form-text"),s}getRow(){const e=super.getRow();return e.classList.add("row"),e}getCol(e,s,i){const n=super.getRow(e,s,i);return n.classList.add("col-"+e),n.classList.add("col-md-"+s),i&&n.classList.add("offset-md-"+i),n}getTabList(e){const s=super.getTabList(e);return s.classList.add("nav"),e.type==="tabs"?s.classList.add("nav-tabs"):s.classList.add("nav-pills"),s.classList.add("flex-column"),e.stacked===!1&&s.classList.remove("flex-column"),s}getTab(e){const s=super.getTab(e);return s.list.classList.add("nav-item"),s.link.classList.add("nav-link"),s.link.setAttribute("data-bs-toggle","tab"),e.active&&s.link.classList.add("active"),s}setTabPaneAttributes(e,s,i){super.setTabPaneAttributes(e,s,i),e.classList.add("tab-pane"),s&&e.classList.add("active")}visuallyHidden(e){e.classList.add("visually-hidden")}visuallyVisible(e){e.classList.remove("visually-hidden")}}const Ke={Schema:Rc,Utils:_c,EditorBoolean:Ti,EditorBooleanEnumRadio:Qo,EditorBooleanEnumSelect:Zo,EditorBooleanCheckbox:Xo,EditorString:tt,EditorStringEnumRadio:ea,EditorStringEnumSelect:ta,EditorStringTextarea:sa,EditorStringAwesomplete:ia,EditorStringInput:Ii,EditorNumber:Ds,EditorNumberEnumRadio:na,EditorNumberEnumSelect:ra,EditorNumberInput:oa,EditorObjectGrid:aa,EditorObjectNav:la,EditorObject:Li,EditorArrayNav:ca,EditorArray:kn,EditorMultiple:da,EditorIfThenElse:An,EditorNull:pa,Theme:Si,ThemeBootstrap3:pd,ThemeBootstrap4:ud,ThemeBootstrap5:hd,RefParser:dd,Create:le};class fd extends Ke.EditorNull{static resolves(e){const s=Ke.Schema.getSchemaType(e),i=Ke.Schema.getSchemaXOption(e,"custom");return s==="null"&&Ke.Utils.isSet(i)}build(){super.build();const e=document.createElement("iframe");e.src="https://json-schema.org/",e.setAttribute("width","100%"),e.setAttribute("height","1000px"),this.control.container.appendChild(e)}}const md="object",gd="All Editors",yd=6,bd={booleans:{type:"object",title:"Booleans",properties:{"boolean-enum-select":{type:"boolean",title:"Boolean enum select",description:"A boolean editor using select input.",const:!0,"x-options":{format:"select",enumTitles:["No","Yes"]}},"boolean-enum-radio":{type:"boolean",title:"Boolean enum radio",description:"A boolean editor using radios.",const:!0,"x-options":{format:"radio",enumTitles:["No","Yes"]}},boolean:{type:"boolean",title:"Boolean",description:"A boolean editor checkbox.",const:!0,"x-options":{format:"checkbox"}}}},strings:{type:"object",title:"Strings",properties:{string:{type:"string",title:"String",description:"A string editor.",minLength:1},"string-textarea":{type:"string",title:"String textarea",description:"A string editor using textarea.",minLength:1,"x-options":{format:"textarea"}},"string-enum-select":{type:"string",title:"String enum select",description:"A string editor using select.",enum:["albert","betti","carl"],"x-options":{enumTitles:["Albert","Betti","Carl"]}},"string-enum-radio":{type:"string",title:"String enum radio",description:"A string editor using radios.",enum:["albert","betti","carl"],"x-options":{format:"radio",enumTitles:["Albert","Betti","Carl"]}}}},numbers:{type:"object",title:"Numbers",properties:{number:{type:"number",title:"Number",description:"A number editor.",minimum:1},"number-enum-select":{type:"number",title:"Number enum select",description:"A number editor using select.",enum:[1.5,2.5,3.5],"x-options":{enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}},"number-enum-radio":{type:"number",title:"Number enum radio",description:"A number editor using radios.",enum:[1.5,2.5,3.5],"x-options":{format:"radio",enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}}}},integers:{type:"object",title:"Integers",properties:{integer:{type:"integer",title:"Integer",description:"A integer editor.",minimum:1},"integer-enum-select":{type:"integer",title:"Integer enum select",description:"A integer editor using select.",enum:[1,2,3],"x-options":{enumTitles:["small (1)","medium (2)","big (3)"]}},"integer-enum-radio":{type:"number",title:"Integer enum radio",description:"A integer editor using radios.",enum:[1,2,3],"x-options":{format:"radio",enumTitles:["small (1)","medium (2)","big (3)"]}}}},arrays:{type:"object",title:"Arrays",description:"Object editor with array editors properties.",properties:{"string-array":{type:"array",title:"Colors",description:"Array of colors",items:{type:"string",title:"Color",not:{const:"#000000"},"x-options":{format:"color"}},default:["#e8f3ee","#fff9e6","#ffffff"],minItems:2}}},multiple:{type:"object",title:"Multiple",properties:{nestedOf:{title:"Nested of",oneOf:[{type:"string","x-options":{switcherTitle:"String"}},{type:"boolean","x-options":{switcherTitle:"Boolean"}},{title:"Any of","x-options":{switcherTitle:"Any of"},anyOf:[{type:"integer","x-options":{switcherTitle:"Integer"}},{type:"number","x-options":{switcherTitle:"Number"}},{title:"One of","x-options":{switcherTitle:"One of"},oneOf:[{type:"object","x-options":{switcherTitle:"Object"}},{type:"array","x-options":{switcherTitle:"Array"}},{type:"null","x-options":{switcherTitle:"Null"}}]}]}]},oneof:{title:"One of",oneOf:[{type:"boolean","x-options":{switcherTitle:"Boolean"}},{type:"string","x-options":{switcherTitle:"String"}},{type:"integer","x-options":{switcherTitle:"Integer"}}]},anyof:{title:"Any Of",anyOf:[{type:"array","x-options":{switcherTitle:"Array"}},{type:"object","x-options":{switcherTitle:"Object"}},{type:"null","x-options":{switcherTitle:"Null"}}]},"type-array":{title:"Type string or boolean",type:["string","boolean"]},"type-undefined":{title:"Type is undefined"},"type-any":{type:"any",title:"Type: any"}}}},br={type:md,title:gd,minProperties:yd,properties:bd},vd="object",Cd={array:{type:"array",title:"Array",description:"Arrays are used for ordered elements. In JSON, each element in an array may be of a different type."},items:{type:"array",title:"items",description:"List validation is useful for arrays of arbitrary length where each item matches the same schema. For this kind of array, set the items keyword to a single schema that will be used to validate all of the items in the array. In the following example, we define that each item in an array is a number:",items:{title:"This is a number editor",type:"number"},"x-options":{sortable:!0}},prefixItems:{type:"array",title:"prefixItems",description:"prefixItems is an array, where each item is a schema that corresponds to each index of the document’s array. That is, an array where the first element validates the first element of the input array, the second element validates the second element of the input array, etc.",prefixItems:[{type:"number"},{type:"string"},{enum:["Street","Avenue","Boulevard"]},{enum:["NW","NE","SW","SE"]}]}},xd={type:vd,properties:Cd},wd="array-enum-titles",Ed="Array of unique values wich item types can be string, number or integer",Td="array",Id=!0,Ld={type:"string",enum:["value1","value2"]},Sd={title:wd,description:Ed,type:Td,uniqueItems:Id,items:Ld,default:["value1"]},jd="array",Pd="Colors",$d={type:"object",title:"Person",properties:{name:{title:"Name",type:"string",default:"German"},children:{title:"Children",type:"array",items:{type:"object",title:"Object",properties:{name:{title:"Name",type:"string",default:"German"}}}}}},Od={type:jd,title:Pd,"x-options":{itemTemplate:"{{ i1 }}) {{ value.name }} {{ value.children.0.name }}",nav:{variant:"pills",stacked:!0}},default:[{name:"Albert",children:[{name:"Child 1"},{name:"Child 2"}]},{name:"Betti",children:[{name:"Child 1"},{name:"Child 2"}]}],items:$d},Ad="array",kd="array-nav-tabs",_d={type:"object",title:"Person",properties:{name:{title:"Name",type:"string",default:"German"},children:{title:"Children",type:"array",items:{type:"object",title:"Object",properties:{name:{title:"Name",type:"string",default:"German"}}}}}},Dd={type:Ad,title:kd,"x-options":{itemTemplate:"{{ i1 }}) {{ value.name }} {{ value.children.0.name }}",nav:{type:"tabs",cols:"12",stacked:"false"}},default:[{name:"Albert",children:[{name:"Child 1"},{name:"Child 2"}]},{name:"Betti",children:[{name:"Child 1"},{name:"Child 2"}]}],items:_d},Md="boolean",Rd="Boolean",Nd="The boolean type matches only two special values: true and false. Note that values that evaluate to true or false, such as 1 and 0, are not accepted by the schema.",Bd={type:Md,title:Rd,description:Nd},Vd="integer",Hd="Integer",Fd="The integer type is used for integral numbers.",qd={type:Vd,title:Hd,description:Fd},Ud="null",Kd="Null",Wd="When a schema specifies a type of null, it has only one acceptable value: null.",zd={type:Ud,title:Kd,description:Wd},Jd="number",Gd="Number",Yd="The number type is used for any numeric type, either integers or floating point numbers.",Qd={type:Jd,title:Gd,description:Yd},Zd="object",Xd="Object",ep="Objects are the mapping type in JSON. They map “keys” to “values”. In JSON, the “keys” must always be strings. Each of these pairs is conventionally referred to as a “property”.",tp=["required"],sp=!0,ip={required:{title:"Required",type:"string"},notRequired:{title:"Not required",type:"string"}},np={type:Zd,title:Xd,description:ep,required:tp,additionalProperties:sp,properties:ip},rp="object",op="Grid",ap={a:{title:"a",type:"string","x-options":{grid:{columns:1}}},b:{title:"b",type:"string","x-options":{grid:{columns:2}}},c:{title:"c",type:"string","x-options":{grid:{columns:3}}},d:{title:"d",type:"string","x-options":{grid:{columns:4}}},e:{title:"e",type:"string","x-options":{grid:{columns:5}}},f:{title:"f",type:"string","x-options":{grid:{columns:6}}},g:{title:"g",type:"string","x-options":{grid:{columns:7}}},h:{title:"h",type:"string","x-options":{grid:{columns:8}}},i:{title:"i",type:"string","x-options":{grid:{columns:9}}},j:{title:"j",type:"string","x-options":{grid:{columns:10}}},k:{title:"k",type:"string","x-options":{grid:{columns:11}}},l:{title:"l",type:"string","x-options":{grid:{columns:12,newRow:!0}}},m:{title:"m",type:"string","x-options":{grid:{newRow:!0,columns:1}}},n:{title:"n",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:1}}},o:{title:"o",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:2}}},p:{title:"p",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:3}}},q:{title:"q",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:4}}},r:{title:"r",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:5}}},s:{title:"s",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:6}}},t:{title:"t",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:7}}},u:{title:"u",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:8}}},v:{title:"v",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:9}}},w:{title:"w",type:"string","x-options":{grid:{newRow:!0,columns:1,offset:10}}},x:{title:"x",type:"string","x-options":{grid:{columns:1,offset:11}}}},lp={type:rp,title:op,"x-options":{grid:!0},properties:ap},cp="object",dp="All Editors",pp="Description",up=6,hp={booleans:{type:"object",title:"Booleans",description:"Description",properties:{"boolean-enum-select":{type:"boolean",title:"Boolean enum select",description:"Description",const:!0,"x-options":{format:"select",enumTitles:["No","Yes"]}},"boolean-enum-radio":{type:"boolean",title:"Boolean enum radio",description:"Description",const:!0,"x-options":{format:"radio",enumTitles:["No","Yes"]}},boolean:{type:"boolean",title:"Boolean",description:"Description",const:!0}}},strings:{type:"object",title:"Strings",description:"Description",properties:{string:{type:"string",title:"String",description:"Description",minLength:1},"string-textarea":{type:"string",title:"String textarea",description:"Description",minLength:1,"x-options":{format:"textarea"}},"string-enum-select":{type:"string",title:"String enum select",description:"Description",enum:["albert","betti","carl"],"x-options":{enumTitles:["Albert","Betti","Carl"]}},"string-enum-radio":{type:"string",title:"String enum radio",description:"Description",enum:["albert","betti","carl"],"x-options":{format:"radio",enumTitles:["Albert","Betti","Carl"]}}}},numbers:{type:"object",title:"Numbers",description:"Description",properties:{number:{type:"number",title:"Number",description:"Description",minimum:1},"number-enum-select":{type:"number",title:"Number enum select",description:"Description",enum:[1.5,2.5,3.5],"x-options":{enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}},"number-enum-radio":{type:"number",title:"Number enum radio",description:"Description",enum:[1.5,2.5,3.5],"x-options":{format:"radio",enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}}}},integers:{type:"object",title:"Integers",description:"Description",properties:{integer:{type:"integer",title:"Integer",description:"Description",minimum:1},"integer-enum-select":{type:"integer",title:"Integer enum select",description:"Description",enum:[1,2,3],"x-options":{enumTitles:["small (1)","medium (2)","big (3)"]}},"integer-enum-radio":{type:"number",title:"Integer enum radio",description:"Description",enum:[1,2,3],"x-options":{format:"radio",enumTitles:["small (1)","medium (2)","big (3)"]}}}},arrays:{type:"object",title:"Arrays",description:"Description",properties:{"string-array":{type:"array",title:"Colors",description:"Description",items:{type:"string",title:"Color",description:"Description",not:{const:"#000000"},"x-options":{format:"color"}},default:["#e8f3ee","#fff9e6","#ffffff"],minItems:3}}},multiple:{type:"object",title:"Multiple",description:"Description",properties:{nestedOf:{title:"Nested of",description:"Description",oneOf:[{type:"string","x-options":{switcherTitle:"String"}},{type:"boolean","x-options":{switcherTitle:"Boolean"}},{title:"Any of",description:"Description","x-options":{switcherTitle:"Any of"},anyOf:[{type:"integer","x-options":{switcherTitle:"Integer"}},{type:"number","x-options":{switcherTitle:"Number"}},{title:"One of",description:"Description","x-options":{switcherTitle:"One of"},oneOf:[{type:"object","x-options":{switcherTitle:"Object"}},{type:"array","x-options":{switcherTitle:"Array"}},{type:"null","x-options":{switcherTitle:"Null"}}]}]}]},oneof:{title:"One of",description:"Description",oneOf:[{type:"boolean","x-options":{switcherTitle:"Boolean"}},{type:"string","x-options":{switcherTitle:"String"}},{type:"integer","x-options":{switcherTitle:"Integer"}}]},anyof:{title:"Any Of",description:"Description",anyOf:[{type:"array","x-options":{switcherTitle:"Array"}},{type:"object","x-options":{switcherTitle:"Object"}},{type:"null","x-options":{switcherTitle:"Null"}}]},"type-array":{title:"Type string or boolean",description:"Description",type:["string","boolean"]},"type-undefined":{title:"Type is undefined",description:"Description"},"type-any":{type:"any",title:"Type: any",description:"Description"}}}},fp={"x-options":{nav:{variant:"pills",stacked:!0}},type:cp,title:dp,description:pp,minProperties:up,properties:hp},mp="object",gp="All Editors",yp="Description",bp=6,vp={booleans:{type:"object",title:"Booleans",description:"Description",properties:{"boolean-enum-select":{type:"boolean",title:"Boolean enum select",description:"Description",const:!0,"x-options":{format:"select",enumTitles:["No","Yes"]}},"boolean-enum-radio":{type:"boolean",title:"Boolean enum radio",description:"Description",const:!0,"x-options":{format:"radio",enumTitles:["No","Yes"]}},boolean:{type:"boolean",title:"Boolean",description:"Description",const:!0}}},strings:{type:"object",title:"Strings",description:"Description",properties:{string:{type:"string",title:"String",description:"Description",minLength:1},"string-textarea":{type:"string",title:"String textarea",description:"Description",minLength:1,"x-options":{format:"textarea"}},"string-enum-select":{type:"string",title:"String enum select",description:"Description",enum:["albert","betti","carl"],"x-options":{enumTitles:["Albert","Betti","Carl"]}},"string-enum-radio":{type:"string",title:"String enum radio",description:"Description",enum:["albert","betti","carl"],"x-options":{format:"radio",enumTitles:["Albert","Betti","Carl"]}}}},numbers:{type:"object",title:"Numbers",description:"Description",properties:{number:{type:"number",title:"Number",description:"Description",minimum:1},"number-enum-select":{type:"number",title:"Number enum select",description:"Description",enum:[1.5,2.5,3.5],"x-options":{enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}},"number-enum-radio":{type:"number",title:"Number enum radio",description:"Description",enum:[1.5,2.5,3.5],"x-options":{format:"radio",enumTitles:["small (1.5)","medium (2.5)","big (3.5)"]}}}},integers:{type:"object",title:"Integers",description:"Description",properties:{integer:{type:"integer",title:"Integer",description:"Description",minimum:1},"integer-enum-select":{type:"integer",title:"Integer enum select",description:"Description",enum:[1,2,3],"x-options":{enumTitles:["small (1)","medium (2)","big (3)"]}},"integer-enum-radio":{type:"number",title:"Integer enum radio",description:"Description",enum:[1,2,3],"x-options":{format:"radio",enumTitles:["small (1)","medium (2)","big (3)"]}}}},arrays:{type:"object",title:"Arrays",description:"Description",properties:{"string-array":{type:"array",title:"Colors",description:"Description",items:{type:"string",title:"Color",description:"Description",not:{const:"#000000"},"x-options":{format:"color"}},default:["#e8f3ee","#fff9e6","#ffffff"],minItems:3}}},multiple:{type:"object",title:"Multiple",description:"Description",properties:{nestedOf:{title:"Nested of",description:"Description",oneOf:[{type:"string","x-options":{switcherTitle:"String"}},{type:"boolean","x-options":{switcherTitle:"Boolean"}},{title:"Any of",description:"Description","x-options":{switcherTitle:"Any of"},anyOf:[{type:"integer","x-options":{switcherTitle:"Integer"}},{type:"number","x-options":{switcherTitle:"Number"}},{title:"One of",description:"Description","x-options":{switcherTitle:"One of"},oneOf:[{type:"object","x-options":{switcherTitle:"Object"}},{type:"array","x-options":{switcherTitle:"Array"}},{type:"null","x-options":{switcherTitle:"Null"}}]}]}]},oneof:{title:"One of",description:"Description",oneOf:[{type:"boolean","x-options":{switcherTitle:"Boolean"}},{type:"string","x-options":{switcherTitle:"String"}},{type:"integer","x-options":{switcherTitle:"Integer"}}]},anyof:{title:"Any Of",description:"Description",anyOf:[{type:"array","x-options":{switcherTitle:"Array"}},{type:"object","x-options":{switcherTitle:"Object"}},{type:"null","x-options":{switcherTitle:"Null"}}]},"type-array":{title:"Type string or boolean",description:"Description",type:["string","boolean"]},"type-undefined":{title:"Type is undefined",description:"Description"},"type-any":{type:"any",title:"Type: any",description:"Description"}}}},Cp={"x-options":{nav:{variant:"tabs",cols:12,stacked:!1}},type:mp,title:gp,description:yp,minProperties:bp,properties:vp},xp="object",wp={a:{type:"string","x-options":{propertyOrder:30}},b:{type:"string","x-options":{propertyOrder:20}},c:{type:"string","x-options":{propertyOrder:10}}},Ep={type:xp,properties:wp},Tp="string",Ip="String",Lp="The string type is used for strings of text. It may contain Unicode characters.",Sp={type:Tp,title:Ip,description:Lp},jp="http://json-schema.org/draft-04/schema#",Pp=!1,$p={iso8601:{type:"string",description:"Similar to the standard date type, but each section after the year is optional. e.g. 2014-06-29 or 2023-04",pattern:"^([1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]|[1-2][0-9]{3}-[0-1][0-9]|[1-2][0-9]{3})$"}},Op={$schema:{type:"string",description:"link to the version of the schema that can validate the resume",format:"uri"},basics:{type:"object",additionalProperties:!0,properties:{name:{type:"string"},label:{type:"string",description:"e.g. Web Developer"},image:{type:"string",description:"URL (as per RFC 3986) to a image in JPEG or PNG format"},email:{type:"string",description:"e.g. thomas@gmail.com",format:"email"},phone:{type:"string",description:"Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923"},url:{type:"string",description:"URL (as per RFC 3986) to your website, e.g. personal homepage",format:"uri"},summary:{type:"string",description:"Write a short 2-3 sentence biography about yourself"},location:{type:"object",additionalProperties:!0,properties:{address:{type:"string",description:`To add multiple address lines, use +. For example, 1234 Glücklichkeit Straße +Hinterhaus 5. Etage li.`},postalCode:{type:"string"},city:{type:"string"},countryCode:{type:"string",description:"code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN"},region:{type:"string",description:"The general region where you live. Can be a US state, or a province, for instance."}}},profiles:{type:"array",description:"Specify any number of social networks that you participate in",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{network:{type:"string",description:"e.g. Facebook or Twitter"},username:{type:"string",description:"e.g. neutralthoughts"},url:{type:"string",description:"e.g. http://twitter.example.com/neutralthoughts",format:"uri"}}}}}},work:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Facebook"},location:{type:"string",description:"e.g. Menlo Park, CA"},description:{type:"string",description:"e.g. Social Media Company"},position:{type:"string",description:"e.g. Software Engineer"},url:{type:"string",description:"e.g. http://facebook.example.com",format:"uri"},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},summary:{type:"string",description:"Give an overview of your responsibilities at the company"},highlights:{type:"array",description:"Specify multiple accomplishments",additionalItems:!1,items:{type:"string",description:"e.g. Increased profits by 20% from 2011-2012 through viral advertising"}}}}},volunteer:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{organization:{type:"string",description:"e.g. Facebook"},position:{type:"string",description:"e.g. Software Engineer"},url:{type:"string",description:"e.g. http://facebook.example.com",format:"uri"},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},summary:{type:"string",description:"Give an overview of your responsibilities at the company"},highlights:{type:"array",description:"Specify accomplishments and achievements",additionalItems:!1,items:{type:"string",description:"e.g. Increased profits by 20% from 2011-2012 through viral advertising"}}}}},education:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{institution:{type:"string",description:"e.g. Massachusetts Institute of Technology"},url:{type:"string",description:"e.g. http://facebook.example.com",format:"uri"},area:{type:"string",description:"e.g. Arts"},studyType:{type:"string",description:"e.g. Bachelor"},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},score:{type:"string",description:"grade point average, e.g. 3.67/4.0"},courses:{type:"array",description:"List notable courses/subjects",additionalItems:!1,items:{type:"string",description:"e.g. H1302 - Introduction to American history"}}}}},awards:{type:"array",description:"Specify any awards you have received throughout your professional career",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{title:{type:"string",description:"e.g. One of the 100 greatest minds of the century"},date:{$ref:"#/definitions/iso8601"},awarder:{type:"string",description:"e.g. Time Magazine"},summary:{type:"string",description:"e.g. Received for my work with Quantum Physics"}}}},certificates:{type:"array",description:"Specify any certificates you have received throughout your professional career",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Certified Kubernetes Administrator"},date:{$ref:"#/definitions/iso8601"},url:{type:"string",description:"e.g. http://example.com",format:"uri"},issuer:{type:"string",description:"e.g. CNCF"}}}},publications:{type:"array",description:"Specify your publications through your career",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. The World Wide Web"},publisher:{type:"string",description:"e.g. IEEE, Computer Magazine"},releaseDate:{$ref:"#/definitions/iso8601"},url:{type:"string",description:"e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html",format:"uri"},summary:{type:"string",description:"Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML."}}}},skills:{type:"array",description:"List out your professional skill-set",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Web Development"},level:{type:"string",description:"e.g. Master"},keywords:{type:"array",description:"List some keywords pertaining to this skill",additionalItems:!1,items:{type:"string",description:"e.g. HTML"}}}}},languages:{type:"array",description:"List any other languages you speak",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{language:{type:"string",description:"e.g. English, Spanish"},fluency:{type:"string",description:"e.g. Fluent, Beginner"}}}},interests:{type:"array",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Philosophy"},keywords:{type:"array",additionalItems:!1,items:{type:"string",description:"e.g. Friedrich Nietzsche"}}}}},references:{type:"array",description:"List references you have received",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. Timothy Cook"},reference:{type:"string",description:"e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing."}}}},projects:{type:"array",description:"Specify career projects",additionalItems:!1,items:{type:"object",additionalProperties:!0,properties:{name:{type:"string",description:"e.g. The World Wide Web"},description:{type:"string",description:"Short summary of project. e.g. Collated works of 2017."},highlights:{type:"array",description:"Specify multiple features",additionalItems:!1,items:{type:"string",description:"e.g. Directs you close but not quite there"}},keywords:{type:"array",description:"Specify special elements involved",additionalItems:!1,items:{type:"string",description:"e.g. AngularJS"}},startDate:{$ref:"#/definitions/iso8601"},endDate:{$ref:"#/definitions/iso8601"},url:{type:"string",format:"uri",description:"e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html"},roles:{type:"array",description:"Specify your role on this project or in company",additionalItems:!1,items:{type:"string",description:"e.g. Team Lead, Speaker, Writer"}},entity:{type:"string",description:"Specify the relevant company/entity affiliations e.g. 'greenpeace', 'corporationXYZ'"},type:{type:"string",description:" e.g. 'volunteering', 'presentation', 'talk', 'application', 'conference'"}}}},meta:{type:"object",description:"The schema version and any other tooling configuration lives here",additionalProperties:!0,properties:{canonical:{type:"string",description:"URL (as per RFC 3986) to latest version of this document",format:"uri"},version:{type:"string",description:"A version field which follows semver - e.g. v1.0.0"},lastModified:{type:"string",description:"Using ISO 8601 with YYYY-MM-DDThh:mm:ss"}}}},Ap="Resume Schema",kp="object",_p={$schema:jp,additionalProperties:Pp,definitions:$p,properties:Op,title:Ap,type:kp},Dp="object",Mp="Login",Rp=["email","password","keep","csfr"],Np={email:{title:"E-Mail",type:"string",format:"email","x-options":{labelIconClass:"fas fa-envelope"}},password:{title:"Password",type:"string",minLength:8,"x-options":{format:"password",labelIconClass:"fas fa-lock"}},keep:{title:"Remember me",type:"boolean","x-options":{format:"checkbox"}},csfr:{type:"string",default:"csfr","x-options":{format:"hidden"}}},Bp={type:Dp,title:Mp,required:Rp,"x-options":{enablePropertiesToggle:!1},properties:Np},Vp="Contact",Hp="object",Fp={name:{title:"Name",type:"string",minLength:1},email:{title:"E-Mail",type:"string",format:"email",minLength:3},message:{title:"Message",type:"string",minLength:1,"x-options":{format:"textarea"}},gdpr:{title:"I have read and accept the privacy policy",type:"boolean",default:!1,const:!0,"x-options":{format:"checkbox"}}},qp={title:Vp,type:Hp,properties:Fp},Up="additionalProperties",Kp="The additionalProperties keyword is used to control the handling of extra stuff, that is, properties whose names are not listed in the properties keyword or match any of the regular expressions in the patternProperties keyword. By default any additional properties are allowed. The value of the additionalProperties keyword is a schema that will be used to validate any properties in the instance that are not matched by properties or patternProperties.",Wp="object",zp={boolean:{title:"additionalProperties: false",description:"Setting the additionalProperties schema to false means no additional properties will be allowed.",type:"object",properties:{builtin:{type:"number"}},additionalProperties:!1},schema:{title:'additionalProperties: {"type": "string"}',description:"You can use non-boolean schemas to put more complex constraints on the additional properties of an instance. For example, one can allow additional properties, but only if their values are each a string",type:"object",properties:{builtin:{type:"number"}},additionalProperties:{type:"string"}}},Jp={title:Up,description:Kp,type:Wp,properties:zp},Gp="allOf",Yp="object",Qp="To validate against allOf, the given data must be valid against all of the given subschemas.",Zp={string:{type:"string",allOf:[{const:"test"},{minLength:1}]}},Xp={title:Gp,type:Yp,description:Qp,properties:Zp},eu="anyOf",tu="object",su="To validate against anyOf, the given data must be valid against any (one or more) of the given subschemas.",iu={string:{type:"string",anyOf:[{const:"Albert"},{const:"Betty"}]}},nu={title:eu,type:tu,description:su,properties:iu},ru="Test: const",ou="object",au="The const keyword is used to restrict a value to a single value.",lu={string:{type:"string",const:"test"},number:{type:"number",const:2.5},integer:{type:"integer",const:3},boolean:{type:"boolean",const:!0},array:{type:"array",items:{type:"string"},const:["test"]},object:{type:"object",properties:{test:{type:"string"}},const:{test:"test"}},multiple:{const:"test"}},cu={title:ru,type:ou,description:au,properties:lu},du="Test: contains",pu="object",uu="While the items schema must be valid for every item in the array, the contains schema only needs to validate against one or more items in the array.",hu={array:{type:"array",contains:{type:"number"},items:{type:"number"}}},fu={title:du,type:pu,description:uu,properties:hu},mu="dependentRequired",gu="object",yu="The dependentRequired keyword conditionally requires that certain properties must be present if a given property is present in an object. The value of the dependentRequired keyword is an object. Each entry in the object maps from the name of a property, p, to an array of strings listing properties that are required if p is present.",bu=["creditCard"],vu={creditCard:{title:"Credit Card",type:"number"},address:{title:"Address",type:"string"},telephone:{title:"Telephone",type:"string"}},Cu={creditCard:["address","telephone"]},xu={title:mu,type:gu,description:yu,required:bu,properties:vu,dependentRequired:Cu,"x-options":{showErrors:!0}},wu="dependentSchemas",Eu="object",Tu="The dependentSchemas keyword conditionally applies a subschema when a given property is present. This schema is applied in the same way allOf applies schemas. Nothing is merged or extended. Both schemas apply independently.",Iu=["name"],Lu={name:{type:"string"},credit_card:{type:"number"}},Su={credit_card:{properties:{billing_address:{type:"string"}},required:["billing_address"]}},ju={title:wu,type:Eu,description:Tu,required:Iu,properties:Lu,dependentSchemas:Su},Pu="enum",$u="object",Ou="The enum keyword is used to restrict a value to a fixed set of values. It must be an array with at least one element, where each element is unique.",Au={string:{type:"string",default:"Carl"}},ku={title:Pu,type:$u,description:Ou,enum:[{string:"Albert"},{string:"Betti"}],properties:Au},_u="exclusiveMaximum",Du="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",Mu="object",Ru={number:{type:"number",exclusiveMaximum:100},integer:{type:"integer",exclusiveMaximum:100}},Nu={title:_u,description:Du,type:Mu,properties:Ru},Bu="exclusiveMinimum",Vu="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",Hu="object",Fu={number:{type:"number",exclusiveMinimum:100},integer:{type:"integer",exclusiveMinimum:100}},qu={title:Bu,description:Vu,type:Hu,properties:Fu},Uu="object",Ku="format",Wu="The format keyword allows for basic semantic identification of certain kinds of string values that are commonly used. For example, because JSON doesn’t have a “DateTime” type, dates need to be encoded as strings. format allows the schema author to indicate that the string value should be interpreted as a date. By default, format is just an annotation and does not effect validation.",zu={email:{title:"E-Mail",type:"string",format:"email"}},Ju={type:Uu,title:Ku,description:Wu,properties:zu},Gu="if-else",Yu="object",Qu="The if, then and else keywords allow the application of a subschema based on the outcome of another schema, much like the if/then/else constructs you’ve probably seen in traditional programming languages. If if is valid, then must also be valid (and else is ignored.) If if is invalid, else must also be valid (and then is ignored). If then or else is not defined, if behaves as if they have a value of true. If then and/or else appear in a schema without if, then and else are ignored.",Zu={country:{type:"string",default:"America",enum:["America","Canada"]},postal_code:{type:"string"}},Xu={title:Gu,type:Yu,description:Qu,properties:Zu,if:{properties:{country:{const:"America"}}},else:{properties:{postal_code:{pattern:"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}},eh="if-then",th="object",sh="The if, then and else keywords allow the application of a subschema based on the outcome of another schema, much like the if/then/else constructs you’ve probably seen in traditional programming languages. If if is valid, then must also be valid (and else is ignored.) If if is invalid, else must also be valid (and then is ignored). If then or else is not defined, if behaves as if they have a value of true. If then and/or else appear in a schema without if, then and else are ignored.",ih={country:{type:"string",default:"America",enum:["America","Canada"]},postal_code:{type:"string"}},nh={properties:{postal_code:{pattern:"[0-9]{5}(-[0-9]{4})?"}}},rh={title:eh,type:th,description:sh,properties:ih,if:{properties:{country:{const:"America"}}},then:nh},oh="if-then-else",ah="object",lh="The if, then and else keywords allow the application of a subschema based on the outcome of another schema, much like the if/then/else constructs you’ve probably seen in traditional programming languages. If if is valid, then must also be valid (and else is ignored.) If if is invalid, else must also be valid (and then is ignored). If then or else is not defined, if behaves as if they have a value of true. If then and/or else appear in a schema without if, then and else are ignored.",ch={country:{type:"string",default:"America",enum:["America","Canada"]},postal_code:{type:"string"}},dh={properties:{postal_code:{pattern:"[0-9]{5}(-[0-9]{4})?"}}},ph={title:oh,type:ah,description:lh,properties:ch,if:{properties:{country:{const:"America"}}},then:dh,else:{properties:{postal_code:{pattern:"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]"}}}},uh="if-then-else-allOf",hh="object",fh="WIP",mh={name:{type:"string",default:"Betti",enum:["Albert","Betti","Carl"]},initial:{type:"string",enum:["A","B","C"]}},gh=[{if:{properties:{name:{const:"Albert"}}},then:{properties:{initial:{const:"A"}}}},{if:{properties:{name:{const:"Betti"}}},then:{properties:{initial:{const:"B"}}}},{if:{properties:{name:{const:"Carl"}}},then:{properties:{initial:{const:"C"}}}}],yh={title:uh,type:hh,description:fh,properties:mh,allOf:gh},bh="http://json-schema.org/draft-07/schema#",vh="object",Ch={vehicleType:{type:"string",enum:["car","motorcycle","bicycle","other"],default:"motorcycle"}},xh={properties:{numDoors:{type:"integer"}}},wh={$schema:bh,type:vh,properties:Ch,if:{properties:{vehicleType:{const:"car"}}},then:xh,else:{if:{properties:{vehicleType:{const:"motorcycle"}}},then:{properties:{numWheels:{type:"integer"}}},else:{if:{properties:{vehicleType:{const:"bicycle"}}},then:{properties:{numPedals:{type:"integer"}}},else:{properties:{make:{type:"string"},model:{type:"string"}}}}}},Eh="Detailed Occurrence Query",Th="object",Ih={occurrence:{title:"Did grey herons appear in your area during the hunting year 2016/17?",type:"string",default:"yes",enum:["yes","no"],"x-options":{format:"radio"}}},Lh={properties:{count:{title:"Estimated number of individuals in 2016/17",type:"integer",default:4,minimum:1}}},Sh={title:Eh,type:Th,properties:Ih,if:{properties:{occurrence:{const:"yes"}}},then:Lh,else:{properties:{count:{title:"Estimated number of individuals in 2016/17",type:"integer",const:0,readOnly:!0,"x-options":{enforceConst:!0}},something:{title:"Something else",type:"string"}}}},jh="Birds Data",Ph="object",$h=["grayGoose"],Oh={grayGoose:{title:"Gray Goose",$ref:"#/$defs/animal"}},Ah={animal:{type:"object",properties:{presence:{title:"Presence",type:"string",default:"unknown",enum:["yes","no","unknown"],"x-options":{format:"radio"}}},if:{properties:{presence:{const:"yes"}}},then:{properties:{nesting:{title:"Nesting",type:"string",default:"unknown",enum:["yes","no","unknown"],"x-options":{format:"radio"}},pairCount:{title:"Nesting Pairs Count"}},if:{properties:{nesting:{const:"yes"}}},then:{properties:{pairCount:{title:"Nesting Pairs Count",type:"integer",default:0,minimum:0}}},else:{if:{properties:{nesting:{const:"no"}}},then:{properties:{pairCount:{title:"Nesting Pairs Count",type:"integer",default:0,readOnly:!0}}},else:{properties:{pairCount:{title:"Nesting Pairs Count",description:"This value is set to null.",type:"null"}}}}},else:{if:{properties:{presence:{const:"no"}}},then:{properties:{nesting:{title:"Nesting",type:"string",default:"no",enum:["yes","no","unknown"],"x-options":{format:"radio"},readOnly:!0},pairCount:{title:"Nesting Pairs Count",type:"integer",default:0,readOnly:!0}}},else:{if:{properties:{presence:{const:"unknown"}}},then:{properties:{nesting:{title:"Nesting",type:"string",default:"unknown",enum:["yes","no","unknown"],"x-options":{format:"radio"},readOnly:!0},pairCount:{title:"Nesting Pairs Count",description:"This value is set to null.",type:"null"}}}}}}},kh={title:jh,type:Ph,required:$h,properties:Oh,$defs:Ah},_h="Red Deer",Dh="object",Mh=["occurrence"],Rh={occurrence:{title:"Did the species occur in your hunting area during the hunting year 2020/2021?",type:"string",enum:["Resident game","Transient game","Individual occurrence","No occurrence","No information"],"x-options":{enforceEnumDefault:!1,format:"radio"}}},Nh={properties:{huntingBag:{$ref:"#/$defs/huntingBag",required:["harvest","accidentGame","foundDead","unknown"],properties:{harvest:{$ref:"#/$defs/harvest",minimum:0},accidentGame:{$ref:"#/$defs/accidentGame",minimum:0},foundDead:{$ref:"#/$defs/foundDead",minimum:0},unknown:{$ref:"#/$defs/unknown",minimum:0}}},total:{$ref:"#/$defs/total",minimum:1}}},Bh={huntingBag:{title:"Hunting Bag 2020/21",type:"object"},harvest:{title:"Harvest Count",type:"integer"},accidentGame:{title:"Accident Game Count",type:"integer"},foundDead:{title:"Other Found Dead Count",type:"integer"},unknown:{title:"Unknown Count",type:"integer"},total:{title:"Total Hunting Bag 2020/21:",type:"integer",readOnly:!0}},Vh={title:_h,type:Dh,required:Mh,properties:Rh,if:{properties:{occurrence:{enum:["Resident game","Transient game","Individual occurrence"]}}},then:Nh,else:{properties:{huntingBag:{readOnly:!0,$ref:"#/$defs/huntingBag",properties:{harvest:{$ref:"#/$defs/harvest",default:0,const:0},accidentGame:{$ref:"#/$defs/accidentGame",default:0,const:0},foundDead:{$ref:"#/$defs/foundDead",default:0,const:0}}},total:{$ref:"#/$defs/total",default:0,const:0,"x-options":{}}}},$defs:Bh},Hh="items",Fh="List validation is useful for arrays of arbitrary length where each item matches the same schema. For this kind of array, set the items keyword to a single schema that will be used to validate all of the items in the array.",qh="array",Uh={type:"string"},Kh={title:Hh,description:Fh,type:qh,items:Uh},Wh="Test: maxContains",zh="object",Jh="maxContains can be used with contains to further specify how many times a schema matches a contains constraint. These keywords can be any non-negative number including zero.",Gh={array:{type:"array",items:{type:"number"},contains:{type:"number"},maxContains:2}},Yh={title:Wh,type:zh,description:Jh,properties:Gh},Qh="maximum",Zh="object",Xh="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",ef={number:{type:"number",maximum:100},integer:{type:"integer",maximum:100}},tf={title:Qh,type:Zh,description:Xh,properties:ef},sf="maxItems",nf="object",rf="The length of the array can be specified using the minItems and maxItems keywords. The value of each keyword must be a non-negative number.",of={array:{type:"array",default:["Albert","Betti","Carl"],maxItems:3,items:{type:"string"}}},af={title:sf,type:nf,description:rf,properties:of},lf="maxLength",cf="object",df="The length of a string can be constrained using the minLength and maxLength keywords. For both keywords, the value must be a non-negative number.",pf={string:{type:"string",maxLength:5}},uf={title:lf,type:cf,description:df,properties:pf},hf="maxProperties",ff="object",mf="The number of properties on an object can be restricted using the minProperties and maxProperties keywords. Each of these must be a non-negative integer.",gf=1,yf={prop1:{title:"Property 1",type:"string"},prop2:{title:"Property 2",type:"string"}},bf={title:hf,type:ff,description:mf,maxProperties:gf,properties:yf},vf="Test: minContains",Cf="object",xf="minContains can be used with contains to further specify how many times a schema matches a contains constraint. These keywords can be any non-negative number including zero.",wf={array:{type:"array",items:{type:"number"},contains:{type:"number"},minContains:2}},Ef={title:vf,type:Cf,description:xf,properties:wf},Tf="minimum",If="object",Lf="Ranges of numbers are specified using a combination of the minimum and maximum keywords, (or exclusiveMinimum and exclusiveMaximum for expressing exclusive range).",Sf={number:{type:"number",minimum:100},integer:{type:"integer",minimum:100}},jf={title:Tf,type:If,description:Lf,properties:Sf},Pf="minItems",$f="object",Of="The length of the array can be specified using the minItems and maxItems keywords. The value of each keyword must be a non-negative number.",Af={array:{type:"array",minItems:1,items:{type:"string"}}},kf={title:Pf,type:$f,description:Of,properties:Af},_f="minLength",Df="object",Mf="The length of a string can be constrained using the minLength and maxLength keywords. For both keywords, the value must be a non-negative number.",Rf={string:{type:"string",minLength:5}},Nf={title:_f,type:Df,description:Mf,properties:Rf},Bf="minProperties",Vf="object",Hf="The number of properties on an object can be restricted using the minProperties and maxProperties keywords. Each of these must be a non-negative integer.",Ff=1,qf={},Uf={title:Bf,type:Vf,description:Hf,minProperties:Ff,properties:qf},Kf="multipleOf",Wf="object",zf="Numbers can be restricted to a multiple of a given number, using the multipleOf keyword. It may be set to any positive number.",Jf={number:{type:"number",multipleOf:10},integer:{type:"integer",multipleOf:10}},Gf={title:Kf,type:Wf,description:zf,properties:Jf},Yf="not",Qf="object",Zf="The not keyword declares that an instance validates if it doesn’t validate against the given subschema.",Xf={test:{not:{type:"object"}}},em={title:Yf,type:Qf,description:Zf,properties:Xf},tm="oneOf",sm="object",im="To validate against oneOf, the given data must be valid against exactly one of the given subschemas.",nm={number:{type:"number",oneOf:[{type:"number",multipleOf:3},{type:"number",multipleOf:5}]}},rm={title:tm,type:sm,description:im,properties:nm},om="pattern",am="object",lm="The pattern keyword is used to restrict a string to a particular regular expression. The regular expression syntax is the one defined in JavaScript (ECMA 262 specifically) with Unicode support.",cm={string:{type:"string",pattern:"^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$"}},dm={title:om,type:am,description:lm,properties:cm},pm="patternProperties",um="object",hm="",fm={"^S":{type:"string",const:"test"},"^I":{type:"integer",const:21}},mm={title:pm,type:um,description:hm,patternProperties:fm},gm="array",ym=[{type:"number"},{type:"string"},{type:"string",enum:["Street","Avenue","Boulevard"]},{type:"string",enum:["NW","NE","SW","SE"]}],bm={type:gm,prefixItems:ym},vm="propertyNames",Cm="The names of properties can be validated against a schema, irrespective of their values. This can be useful if you don't want to enforce specific properties, but you want to make sure that the names of those properties follow a specific convention. You might, for example, want to enforce that all names are valid ASCII tokens so they can be used as attributes in a particular programming language.",xm="object",wm={pattern:"^[A-Za-z_][A-Za-z0-9_]*$"},Em={title:vm,description:Cm,type:xm,propertyNames:wm},Tm="Object",Im="object",Lm=`By default, the properties defined by the properties keyword are not required. However, one can provide a list of required properties using the required keyword. + +The required keyword takes an array of zero or more strings. Each of these strings must be unique.`,Sm=["required"],jm={optional:{title:"Optional property",type:"string"},required:{title:"Required property",type:"string"}},Pm={title:Tm,type:Im,description:Lm,required:Sm,properties:jm},$m="type",Om="object",Am="The type keyword is fundamental to JSON Schema. It specifies the data type for a schema.",km={string:{type:"string"},number:{type:"number"},integer:{type:"integer"},boolean:{type:"boolean"},null:{type:"null"},array:{type:"array"},object:{type:"object"}},_m={title:$m,type:Om,description:Am,properties:km},Dm="uniqueItems",Mm="object",Rm="A schema can ensure that each of the items in an array is unique. Simply set the uniqueItems keyword to true.",Nm={array:{type:"array",default:["Albert","Betti"],uniqueItems:!0,items:{type:"string"}}},Bm={title:Dm,type:Mm,description:Rm,properties:Nm},Vm="message",Hm="object",Fm={string:{type:"string",minLength:5,"x-options":{messages:["5 chars please."]}}},qm={title:Vm,type:Hm,properties:Fm},Um="Awesomplete",Km="string",Wm="Awesomplete is an ultra lightweight, customizable, simple autocomplete widget with zero dependencies, built with modern standards for modern browsers.",zm=1,Jm={title:Um,type:Km,description:Wm,default:"Awesomplete default",minLength:zm,"x-options":{awesomplete:{list:["JavaScript","Java","Python","Ruby","C++","C#","PHP","Swift","Go","Kotlin"],minChars:1,maxItems:5,autoFirst:!0}}},Gm="Quill",Ym="string",Qm="Quill is a modern WYSIWYG editor built for compatibility and extensibility.",Zm=3,Xm={title:Gm,type:Ym,description:Qm,default:"Quill default",minLength:Zm,"x-options":{quill:{theme:"snow"}}},eg="Jodit",tg="string",sg="Jodit - Best WYSIWYG Editor for You.",ig=3,ng={title:eg,type:tg,description:sg,default:"Jodit default",minLength:ig,"x-options":{jodit:{}}},rg="Flatpickr",og="string",ag="Flatpickr is a lightweight and powerful datetime picker.",lg=3,cg={title:rg,type:og,description:ag,default:"2024-08-27",minLength:lg,"x-options":{flatpickr:{}}},dg="Raty",pg="number",ug="Raty - A Star Rating Plugin",hg=.5,fg={title:dg,type:pg,description:ug,default:3,minimum:hg,"x-options":{raty:{half:!0,starType:"i"}}},mg="Custom",gg="null",yg="This is a custom editor",bg={title:mg,type:gg,description:yg,"x-options":{custom:!0}},vg="#/$defs/schema",Cg={schema:{"x-options":{editableProperties:!0,deactivateNonRequired:!0},type:"object",properties:{$anchor:{title:"$anchor",type:"string"},$comment:{title:"$comment",type:"string"},$defs:{title:"$defs",type:"object",additionalProperties:{$ref:"#/$defs/schema"}},$id:{title:"$id",type:"string"},$schema:{title:"$schema",type:"string",format:"uri"},$ref:{title:"$ref",type:"string"},additionalProperties:{title:"additionalProperties",$ref:"#/$defs/schema"},allOf:{title:"allOf",type:"array",items:{$ref:"#/$defs/schema"}},anyOf:{title:"anyOf",type:"array",items:{$ref:"#/$defs/schema"}},const:{title:"const",type:["object","array","string","number","integer","boolean","null"]},contains:{title:"contains",$ref:"#/$defs/schema"},default:{title:"default",type:["null","boolean","object","array","number","string","integer"]},dependentRequired:{title:"dependentRequired",type:"object",additionalProperties:{type:"array",uniqueItems:!0,items:{title:"property",type:"string"}}},dependentSchemas:{title:"dependentSchemas",type:"object",additionalProperties:{$ref:"#/$defs/schema"}},description:{title:"description",type:"string"},deprecated:{title:"deprecated",type:"boolean"},enum:{title:"enum",type:"array",minItems:1,uniqueItems:!0},example:{title:"example",type:["null","boolean","object","array","number","string","integer"]},exclusiveMaximum:{title:"exclusiveMaximum",type:"number"},exclusiveMinimum:{title:"exclusiveMinimum",type:"number"},format:{title:"format",type:"string"},if:{title:"if",$ref:"#/$defs/schema"},then:{title:"then",$ref:"#/$defs/schema"},else:{title:"else",$ref:"#/$defs/schema"},items:{title:"items",$ref:"#/$defs/schema"},maxContains:{title:"maxContains",type:"integer",minimum:0},maximum:{title:"maximum",type:"number"},maxItems:{title:"maxItems",type:"integer",minimum:0},maxLength:{title:"maxLength",type:"integer",minimum:0},maxProperties:{title:"maxProperties",type:"integer",minimum:0},minContains:{title:"minContains",type:"integer",minimum:0},minimum:{title:"minimum",type:"number"},minItems:{title:"minItems",type:"integer",minimum:0},minLength:{title:"minLength",type:"integer",minimum:0},minProperties:{title:"minProperties",type:"integer",minimum:0},multipleOf:{title:"multipleOf",type:"number",exclusiveMinimum:0},not:{title:"not",$ref:"#/$defs/schema"},oneOf:{title:"oneOf",type:"array",items:{$ref:"#/$defs/schema"}},pattern:{title:"pattern",type:"string",format:"regex"},patternProperties:{title:"patternProperties",type:"object",additionalProperties:{$ref:"#/$defs/schema"}},prefixItems:{title:"prefixItems",type:"array",items:{$ref:"#/$defs/schema"}},properties:{title:"properties",type:"object",additionalProperties:{$ref:"#/$defs/schema"},"x-options":{nav:{variant:"pills",stacked:!0}}},readOnly:{title:"readOnly",type:"boolean"},required:{title:"required",type:"array",uniqueItems:!0,items:{type:"string"}},title:{title:"title",type:"string"},type:{title:"type",type:"string",enum:["null","boolean","object","array","number","string","integer"]},uniqueItems:{title:"uniqueItems",type:"boolean"},writeOnly:{title:"writeOnly",type:"boolean"},"x-options":{title:"x-options",type:"object",properties:{format:{title:"format",type:"string"},labelIconClass:{title:"labelIconClass",type:"string"},itemTemplate:{title:"itemTemplate",type:"string"},switcherTitle:{title:"switcherTitle",type:"string"},nav:{title:"nav",type:"object"},grid:{title:"grid",type:"object"},enumTitles:{title:"enumTitles",type:"array",items:{type:"string"}},messages:{title:"messages",type:"array",items:{type:"string"}},titleHidden:{title:"titleHidden",type:"boolean"},enableCollapseToggle:{title:"enableCollapseToggle",type:"boolean"},startCollapsed:{title:"startCollapsed",type:"boolean"},showErrors:{title:"showErrors",type:"boolean"},deactivateNonRequired:{title:"deactivateNonRequired",type:"boolean"},mergeAllOf:{title:"mergeAllOf",type:"boolean"},validateFormat:{title:"validateFormat",type:"boolean"}}}}}},xg={$ref:vg,$defs:Cg},wg="http://json-schema.org/draft-04/schema",Eg="http://europass.cedefop.europa.eu/json/schema/v3.3.0/Europass_JSONSchema.json",Tg="A JSON Representation of a Europass Document corresponding to Europass XML 3.3.0",Ig="object",Lg={documentTypeType:{type:"string",enum:["ECV_ESP","ESP","ECV","ELP","ECL","EX"]},documentBundleType:{type:"array",items:{$ref:"#/definitions/documentTypeType"}},preferencesType:{type:"array",items:{type:"object",properties:{name:{type:"string"},show:{type:"boolean"},order:{type:"string",enum:["FirstName Surname","Surname FirstName","Title FirstName Surname","Title Surname FirstName","FirstName Surname Title","Surname FirstName Title","Identification Headline WorkExperience Education Skills Achievement ReferenceTo","Identification Headline Education WorkExperience Skills Achievement ReferenceTo","Identification Skills ReferenceTo","Addressee Letter.SubjectLine Letter.OpeningSalutation Letter.Body Letter.Localisation Letter.ClosingSalutation","Letter.SubjectLine Addressee Letter.OpeningSalutation Letter.Body Letter.Localisation Letter.ClosingSalutation","Letter.Localisation Addressee Letter.SubjectLine Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Letter.SubjectLine Addressee Letter.Localisation Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Letter.Localisation Letter.SubjectLine Addressee Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Addressee Letter.Localisation Letter.SubjectLine Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Addressee Letter.SubjectLine Letter.Localisation Letter.OpeningSalutation Letter.Body Letter.ClosingSalutation","Date Place","Place Date"]},format:{type:"string",enum:["s z m (c)","s, z m (c)","s,m z c","s, m, z c","s z m (c)","s z m c","s p-z m (c)","s p-z m c","s, p-z m (c)","s, z m, c","s, m, p-z (c)","s, m z (c)","s, z-m (c)","s, m, z (c)","text/short","text/long","text/long/suffix","text/long/texts","numeric/long","numeric/medium","numeric/short"]},position:{type:"string",enum:["left-align","right-align","middle-align"]},justify:{type:"boolean"}},additionalProperties:!1},minItems:0},personNameType:{description:"Describes the name of a person. Consists of a title (optionally), a first-name and surname.",type:"object",properties:{Title:{type:"object",properties:{Code:{type:"string",enum:["mr","ms","mrs","miss","dr"]},Label:{type:"string"}}},FirstName:{type:"string"},Surname:{type:"string"}},additionalProperties:!1},structuredDateType:{type:"object",properties:{Year:{type:"number"},Month:{type:"number"},Day:{type:"number"}},additionalProperties:!1},countryType:{description:"Defines a country. The country is described by a code and a label. E.g. code: FR, label: France.",type:"object",properties:{Code:{description:"Defines the country code type. The type is defined in the included schema 'EuropassISOCountries'. ",type:"string",pattern:"^[A-Z]{2}$"},Label:{type:"string"}},additionalProperties:!1},occupationalFieldType:{description:"The occupational field is described by a code and a label. E.g. code: 41150, label: Secretary.",type:"object",properties:{Code:{type:"string",pattern:"^[0-9]{5}$"},Label:{type:"string"}},additionalProperties:!1},periodType:{type:"object",properties:{Period:{type:"object",properties:{From:{$ref:"#/definitions/structuredDateType"},To:{$ref:"#/definitions/structuredDateType"},Current:{type:"boolean"}},additionalProperties:!1}}},fileDataType:{type:"object",properties:{Name:{type:"string"},Data:{type:"string",contentEncoding:"base64"},Metadata:{type:"array",items:{type:"object",properties:{Key:{type:"string"},Value:{type:"string"}},additionalProperties:!1},minItems:0},Id:{type:"string"}}},addressType:{type:"object",properties:{AddressLine:{type:"string"},AddressLine2:{type:"string"},PostalCode:{type:"string"},Municipality:{type:"string"},Country:{$ref:"#/definitions/countryType"}},additionalProperties:!1},websiteType:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["personal","business","blog","portfolio"]},Label:{type:"string"}},additionalProperties:!1}},additionalProperties:!1},organisationalWebsiteType:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["business"]}},additionalProperties:!1}},additionalProperties:!1},organisationType:{type:"object",properties:{Name:{type:"string"},ContactInfo:{type:"object",properties:{Address:{type:"object",properties:{Contact:{$ref:"#/definitions/addressType"}}},Website:{$ref:"#/definitions/organisationalWebsiteType"}}}}},referenceToListType:{type:"array",items:{type:"object",properties:{idref:{type:"string"}}},minItems:0},sectionReferenceToListType:{type:"object",properties:{ReferenceTo:{$ref:"#/definitions/referenceToListType"}}},genericDocumentationType:{type:"object",properties:{Heading:{$ref:"#/definitions/documentationHeadingType"},InterDocument:{type:"array",items:{type:"object",properties:{ref:{$ref:"#/definitions/documentTypeType"}}},minItems:0},IntraDocument:{$ref:"#/definitions/referenceToListType"},ExtraDocument:{type:"array",items:{type:"object",properties:{Description:{type:"string"},href:{type:"string"}}},minItems:0}},additionalProperties:!1},languageNameType:{description:"The mother language code is defined in the included schema 'EuropassISOLanguages'.",type:"object",properties:{Description:{type:"object",properties:{Code:{type:"string"},Label:{type:"string"}},additionalProperties:!1}}},genericSkillType:{allOf:[{$ref:"#/definitions/sectionReferenceToListType"},{properties:{Description:{type:"string"}}}]},cefrLevelType:{type:"string",enum:["A1","A2","B1","B2","C1","C2"]},ictLevelType:{type:"string",enum:["A","B","C"]},basicExperienceType:{type:"object",allOf:[{$ref:"#/definitions/periodType"},{properties:{Description:{type:"string"}}},{$ref:"#/definitions/sectionReferenceToListType"}]},openingSalutationType:{description:"Defines the opening salutation in a letter. It is described by a code (optional) and a label. E.g. code: salutation_2, label: Dear Mrs.",type:"object",properties:{Code:{type:"string",pattern:"^opening-salut-[1-9]{1}([0-9]{1})?(-impersonal)?$"},Label:{type:"string"}},additionalProperties:!1},closingSalutationType:{description:"Defines the closing salutation in a letter. It is described by a code (optional) and a label. E.g. code: closing_salutation_2, label: Your's faithfully.",type:"object",properties:{Code:{type:"string",pattern:"^closing-salut-[1-9]{1}([0-9]{1})?$"},Label:{type:"string"}},additionalProperties:!1},documentationHeadingType:{description:"Defines the label to indicate that there are documents accompanying a letter. It is described by a code (optional) and a label. E.g. code: heading_1, label: Enclosed.",type:"object",properties:{Code:{type:"string",pattern:"^heading_[1-9]{1}$"},Label:{type:"string"}},additionalProperties:!1}},Sg=!1,jg={SkillsPassport:{type:"object",description:"Defines a sequence of elements that fully describe a Europass XML document.",properties:{Locale:{title:"the language of this document",type:"string",pattern:"^[a-z]{2}$"},DocumentInfo:{title:"metadata information about this document",type:"object",properties:{DocumentType:{$ref:"#/definitions/documentTypeType"},Document:{$ref:"#/definitions/documentBundleType"},CreationDate:{type:"string"},LastUpdateDate:{type:"string"},XSDVersion:{type:"string",pattern:"^V[0-9]\\.[0-9]$"},Generator:{type:"string"},Comment:{type:"string"},EuropassLogo:{type:"boolean"}},additionalProperties:!1},PrintingPreferences:{title:"Printing preferences",type:"object",anyOf:[{type:"object",properties:{ECV:{$ref:"#/definitions/preferencesType"}}},{type:"object",properties:{ELP:{$ref:"#/definitions/preferencesType"}}},{type:"object",properties:{ECL:{$ref:"#/definitions/preferencesType"}}},{type:"object",properties:{ESP:{$ref:"#/definitions/preferencesType"}}}]},LearnerInfo:{type:"object",properties:{Identification:{title:"Personal Information",description:"Contains the personal information of the individual, which includes at least the name, and contact information, demographics and photo.",type:"object",properties:{PersonName:{$ref:"#/definitions/personNameType"},ContactInfo:{description:"Contains all the available methods of contacting individual.",type:"object",properties:{Address:{description:"Defines the residence address of an individual.",type:"object",properties:{Contact:{$ref:"#/definitions/addressType"}},additionalProperties:!1},Email:{description:"Defines the email address of an individual.",type:"object",properties:{Contact:{type:"string"}},additionalProperties:!1},Telephone:{description:"Lists the telephone numbers owned by the individual.",type:"array",items:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["home","work","mobile"]},Label:{type:"string"}}}},additionalProperties:!1},minItems:0},Website:{description:"Lists the websites that are owned, built by or refer to the individual.",type:"array",items:{$ref:"#/definitions/websiteType"},minItems:0},InstantMessaging:{description:"Lists the instant messaging accounts numbers owned by the individual.",type:"array",items:{type:"object",properties:{Contact:{type:"string"},Use:{type:"object",properties:{Code:{type:"string",enum:["gtalk","skype","icq","aim","msn","yahoo"]},Label:{type:"string"}}}},additionalProperties:!1},minItems:0}},additionalProperties:!1},Demographics:{description:"Contains demographics-related information about the individual. It includes the birthdate, gender and list of nationalities.",type:"object",properties:{Birthdate:{$ref:"#/definitions/structuredDateType"},Gender:{type:"object",properties:{Code:{type:"string",enum:["M","F"]},Label:{type:"string"}}},Nationality:{description:"Defines a nationality. The nationality is described by a code and is a text only element. E.g. code: DE, label: German.",type:"array",items:{type:"object",properties:{Code:{type:"string",pattern:"^[A-Z]{2}$"},Label:{type:"string"}},additionalProperties:!1},minItems:0}},additionalProperties:!1},Photo:{allOf:[{$ref:"#/definitions/fileDataType"},{properties:{MimeType:{type:"string",enum:["image/jpeg","image/pjpeg","image/png","image/x-png"]}}}]},Signature:{allOf:[{$ref:"#/definitions/fileDataType"},{properties:{MimeType:{type:"string",enum:["image/jpeg","image/pjpeg","image/png","image/x-png"]}}}]}}},Headline:{title:"desired employment/ occupation field",description:"Contains a headline label for the current document. It is optional and may accommodate various cases.",type:"object",properties:{Type:{type:"object",properties:{Code:{type:"string",enum:["preferred_job","job_applied_for","studies_applied_for","position","personal_statement"]},Label:{type:"string"}},additionalProperties:!1},Description:{type:"object",properties:{Code:{type:"string",pattern:"^[0-9]{5}$"},Label:{type:"string"}},additionalProperties:!1}},additionalProperties:!1},WorkExperience:{title:"list of work experiences",description:"Contains an list of work experiences. The order of those experiences is defined by the related printing preferences.",type:"array",items:{allOf:[{$ref:"#/definitions/basicExperienceType"},{properties:{Position:{$ref:"#/definitions/occupationalFieldType"},Activities:{type:"string"},Employer:{allOf:[{$ref:"#/definitions/organisationType"},{properties:{Sector:{type:"object",properties:{Code:{type:"string",pattern:"^[A-U]{1}$"},Label:{type:"string"}},additionalProperties:!1}}}]}}},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0},Education:{title:"list of education experiences",description:"Contains an list of learning achievements or a training periods (formal or not). The order of those experiences is defined by the related printing preferences.",type:"array",items:{allOf:[{$ref:"#/definitions/basicExperienceType"},{properties:{Title:{type:"string"},Activities:{type:"string"},Organisation:{$ref:"#/definitions/organisationType"},Field:{type:"object",properties:{Code:{type:"string",pattern:"^[0-9]{2}$"},Label:{type:"string"}},additionalProperties:!1},Level:{type:"object",properties:{Code:{type:"string",pattern:"^[1-8]{1}$"},Label:{type:"string"}},additionalProperties:!1}}},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0},Skills:{title:"Skills",description:"Contains a sequence of skills and competences that the learner has acquired during any formal or informal experience.",type:"object",properties:{Linguistic:{type:"object",properties:{MotherTongue:{type:"array",items:{allOf:[{$ref:"#/definitions/languageNameType"},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0},ForeignLanguage:{type:"array",items:{allOf:[{$ref:"#/definitions/languageNameType"},{properties:{ProficiencyLevel:{type:"object",properties:{Listening:{$ref:"#/definitions/cefrLevelType"},Reading:{$ref:"#/definitions/cefrLevelType"},SpokenInteraction:{$ref:"#/definitions/cefrLevelType"},SpokenProduction:{$ref:"#/definitions/cefrLevelType"},Writing:{$ref:"#/definitions/cefrLevelType"}},additionalProperties:!1},Experience:{description:"Describes a list of linguistic experiences",type:"array",items:{allOf:[{$ref:"#/definitions/basicExperienceType"},{properties:{Area:{type:"object",properties:{Code:{type:"string",enum:["studying_training_language","work_language","living_traveling_language","mediating_groups_language"]},Label:{type:"string"}}}}}]},minItems:0},Certificate:{description:"Describes a list of linguistic certificates",type:"array",items:{type:"object",properties:{Title:{type:"string"},AwardingBody:{type:"string"},Date:{$ref:"#/definitions/structuredDateType"},Level:{$ref:"#/definitions/cefrLevelType"}},additionalProperties:!1},minItems:0}}},{$ref:"#/definitions/sectionReferenceToListType"}]},minItems:0}}},Communication:{$ref:"#/definitions/genericSkillType"},Organisational:{$ref:"#/definitions/genericSkillType"},JobRelated:{$ref:"#/definitions/genericSkillType"},Computer:{description:"Describes a person's computer skills, including self assesement and c ertifications if applicable",type:"object",allOf:[{properties:{Description:{type:"string"},ProficiencyLevel:{type:"object",properties:{Information:{$ref:"#/definitions/ictLevelType"},Communication:{$ref:"#/definitions/ictLevelType"},ContentCreation:{$ref:"#/definitions/ictLevelType"},Safety:{$ref:"#/definitions/ictLevelType"},ProblemSolving:{$ref:"#/definitions/ictLevelType"}},additionalProperties:!1},Certificate:{description:"Describes a list of computer certificates",type:"array",items:{type:"object",properties:{Title:{type:"string"}},additionalProperties:!1},minItems:0}}},{$ref:"#/definitions/sectionReferenceToListType"}]},Driving:{allOf:[{properties:{Description:{type:"array",items:{type:"string",enum:["A","B","C","D","A1","B1","C1","D1","BE","CE","DE","C1E","D1E"]},minItems:0}}},{$ref:"#/definitions/sectionReferenceToListType"}]},Other:{$ref:"#/definitions/genericSkillType"}},additionalProperties:!1},Achievement:{title:"Achievements",description:"Contains a list of additional information about the various achievements of an individual, such as participation to conferences, workshops, memberships to organisations, list of publications, etc.",type:"array",items:{allOf:[{$ref:"#/definitions/sectionReferenceToListType"},{properties:{Title:{type:"object",properties:{Code:{type:"string",enum:["honors_awards","publications","presentations","projects","citations","memberships","conferences","seminars","workshops","references","signature_equivalent","courses","certifications"]},Label:{type:"string"}}},Description:{type:"string"}}}]},minItems:0},ReferenceTo:{type:"array",items:{type:"object",properties:{idref:{type:"string"}}},minItems:0}}},Attachment:{type:"array",items:{allOf:[{$ref:"#/definitions/fileDataType"},{properties:{MimeType:{type:"string",enum:["image/jpeg","image/pjpeg","image/png","image/x-png","application/pdf"]},Description:{type:"string"}}}]},minItems:0},CoverLetter:{type:"object",properties:{Addressee:{type:"object",properties:{PersonName:{$ref:"#/definitions/personNameType"},Position:{$ref:"#/definitions/occupationalFieldType"},Organisation:{$ref:"#/definitions/organisationType"}},additionalProperties:!1},Letter:{type:"object",properties:{Localisation:{type:"object",properties:{Date:{$ref:"#/definitions/structuredDateType"},Place:{type:"object",properties:{Municipality:{type:"string"},Country:{$ref:"#/definitions/countryType"}},additionalProperties:!1}},additionalProperties:!1},SubjectLine:{type:"string"},OpeningSalutation:{type:"object",properties:{Salutation:{$ref:"#/definitions/openingSalutationType"},PersonName:{$ref:"#/definitions/personNameType"}},additionalProperties:!1},Body:{type:"object",properties:{Opening:{type:"string"},MainBody:{type:"string"},Closing:{type:"string"}},additionalProperties:!1},ClosingSalutation:{$ref:"#/definitions/closingSalutationType"}},additionalProperties:!1},Documentation:{$ref:"#/definitions/genericDocumentationType"}},additionalProperties:!1}},additionalProperties:!1}},Pg={$schema:wg,id:Eg,description:Tg,type:Ig,definitions:Lg,additionalProperties:Sg,properties:jg},$g="Lebensraumverbessernde Maßnahmen",Og="object",Ag={massnahmen:{title:"Wurden im Jagdjahr 2021/2022 in Ihrem Revier biotopverbessernde Maßnahmen durchgeführt?",type:"string",enum:["ja","nein"],"x-options":{enforceEnumDefault:!1,format:"radio"}}},kg={properties:{offenland:{title:"Maßnahmen im Offenland:",type:"object",properties:{bluehflaeche:{title:"ha Blühfläche/ Blühstreifen/ Brache angelegt",type:"number",minimum:0,default:0},hecken:{title:"lfd. m Hecken angelegt bzw. gepflegt",type:"number",minimum:0,default:0},rebhuhn:{title:"Fütterung",type:"array",uniqueItems:!0,items:{type:"string",enum:["Fütterung von Rebhuhn und/oder Fasan"]}}}},wald:{title:"Maßnahmen im Wald:",type:"object",properties:{aesungsflaeche:{title:"ha Äsungsfläche angelegt",type:"number",minimum:0,default:0},bepflanzung:{title:"Bepflanzung",type:"array",uniqueItems:!0,items:{type:"string",enum:["Baumpflanzung (Obstgehölz, Verbissgehölz, Mastbäume etc.)","Anlage von Kleinstgewässern"]}}}},sonstige:{title:"Sonstige lebensraumverbessernde Maßnahmen:",type:"string","x-options":{format:"textarea"}}}},_g={title:$g,type:Og,properties:Ag,if:{properties:{massnahmen:{const:"ja"}}},then:kg,else:{if:{properties:{massnahmen:{const:"nein"}}},then:{properties:{offenland:{title:"Maßnahmen im Offenland:",type:"object",properties:{bluehflaeche:{title:"ha Blühfläche/ Blühstreifen/ Brache angelegt",type:"number",minimum:0,default:0,readOnly:!0},hecken:{title:"lfd. m Hecken angelegt bzw. gepflegt",type:"number",minimum:0,default:0,readOnly:!0},rebhuhn:{title:"Fütterung",type:"array",readOnly:!0,uniqueItems:!0,const:[""],items:{type:"string",enum:["Fütterung von Rebhuhn und/oder Fasan"]}}}},wald:{title:"Maßnahmen im Wald:",type:"object",properties:{aesungsflaeche:{title:"ha Äsungsfläche angelegt",type:"number",readOnly:!0,minimum:0,default:0},bepflanzung:{title:"Bepflanzung",type:"array",readOnly:!0,uniqueItems:!0,items:{type:"string",enum:["Baumpflanzung (Obstgehölz, Verbissgehölz, Mastbäume etc.)","Anlage von Kleinstgewässern"]}}}},sonstige:{title:"Sonstige lebensraumverbessernde Maßnahmen:",type:"string",readOnly:!0,const:"","x-options":{format:"textarea"}}}},else:{if:{properties:{massnahmen:{const:""}}},then:{properties:{offenland:{title:"Maßnahmen im Offenland:",type:"object",properties:{bluehflaeche:{title:"ha Blühfläche/ Blühstreifen/ Brache angelegt",type:"null",description:"keine Angabe"},hecken:{title:"lfd. m Hecken angelegt bzw. gepflegt",type:"null",description:"keine Angabe"},rebhuhn:{title:"Fütterung",type:"array",readOnly:!0,uniqueItems:!0,const:[""],items:{type:"string",enum:["Fütterung von Rebhuhn und/oder Fasan"]}}}},wald:{title:"Maßnahmen im Wald:",type:"object",properties:{aesungsflaeche:{title:"ha Äsungsfläche angelegt",type:"null",description:"keine Angabe"},bepflanzung:{title:"Bepflanzung",type:"array",readOnly:!0,uniqueItems:!0,items:{type:"string",enum:["Baumpflanzung (Obstgehölz, Verbissgehölz, Mastbäume etc.)","Anlage von Kleinstgewässern"]}}}},sonstige:{title:"Sonstige lebensraumverbessernde Maßnahmen:",type:"string",readOnly:!0,const:"","x-options":{format:"textarea"}}}}}}},Dg=(t,e)=>{const s=t.__vccOpts||t;for(const[i,n]of e)s[i]=n;return s},Mg={data(){return{errorCount:0,examples:{Editors:{"editors/all":br,"editors/array":xd,"editors/array-enum-items":Sd,"editors/array-nav-pills":Od,"editors/array-nav-tabs":Dd,"editors/boolean":Bd,"editors/integer":qd,"editors/null":zd,"editors/number":Qd,"editors/object":np,"editors/object-grid":lp,"editors/object-nav-pills":fp,"editors/object-nav-tabs":Cp,"editors/object-propertyOrder":Ep,"editors/string":Sp},Validators:{"validator/additionalProperties":Jp,"validator/allOf":Xp,"validator/anyOf":nu,"validator/const":cu,"validator/contains":fu,"validator/dependentRequired":xu,"validator/dependentSchemas":ju,"validator/enum":ku,"validator/exclusiveMaximum":Nu,"validator/exclusiveMinimum":qu,"validator/format":Ju,"validator/if-else":Xu,"validator/if-then":rh,"validator/if-then-else":ph,"validator/if-then-else-allOf":yh,"validator/if-then-else-nested":wh,"validator/if-then-else-nested-simple":Sh,"validator/if-then-else-nested-complex":kh,"validator/if-then-else-deeply-nested-and-unselected":Vh,"validator/items":Kh,"validator/maxContains":Yh,"validator/maximum":tf,"validator/maxItems":af,"validator/maxLength":uf,"validator/maxProperties":bf,"validator/minContains":Ef,"validator/minimum":jf,"validator/minItems":kf,"validator/minLength":Nf,"validator/minProperties":Uf,"validator/multipleOf":Gf,"validator/not":em,"validator/oneOf":rm,"validator/pattern":dm,"validator/patternProperties":mm,"validator/prefixItems":bm,"validator/propertyNames":Em,"validator/required":Pm,"validator/type":_m,"validator/uniqueItems":Bm,"validator/messages":qm},Plugins:{"plugins/awesomplete":Jm,"plugins/quill":Xm,"plugins/jodit":ng,"plugins/flatpickr":cg,"plugins/raty":fg},Examples:{"examples/resume-schema":_p,"examples/login":Bp,"examples/contact":qp,"custom/custom":bg,"meta-schema":xg,"europass-xml-3.3.0":Pg,test:_g}},example:"editors/all",themes:["bootstrap5","bootstrap4","bootstrap3","barebones"],iconLibs:["none","glyphicons","bootstrap-icons","fontawesome3","fontawesome4","fontawesome5","fontawesome6"],showErrorsOptions:["never","change","always"],enablePropertiesToggle:!0,enableCollapseToggle:!0,startCollapsed:!1,schema:br,editor:null,theme:"barebones",iconLib:"bootstrap-icons",showErrors:"change",validateFormat:!1,mergeAllOf:!1,enforceEnumDefault:!1}},created(){this.theme=this.getQueryParam("theme")||"bootstrap5",this.iconLib=this.getQueryParam("iconLib")||"fontawesome5",this.example=this.getQueryParam("example")||"editors/all",this.showErrors=this.getQueryParam("showErrors")||"change",this.validateFormat=this.getQueryParam("validateFormat")?this.parseBooleanString(this.getQueryParam("validateFormat")):!1,this.mergeAllOf=this.getQueryParam("mergeAllOf")?this.parseBooleanString(this.getQueryParam("mergeAllOf")):!1,this.enforceEnumDefault=this.getQueryParam("enforceEnumDefault")?this.parseBooleanString(this.getQueryParam("enforceEnumDefault")):!0,this.enablePropertiesToggle=this.getQueryParam("enablePropertiesToggle")?this.parseBooleanString(this.getQueryParam("enablePropertiesToggle")):!0,this.enableCollapseToggle=this.getQueryParam("enableCollapseToggle")?this.parseBooleanString(this.getQueryParam("enableCollapseToggle")):!0},mounted(){switch(this.theme){case"bootstrap3":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css"]),this.loadScripts(["https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js","https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js"]);break;case"bootstrap4":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"]),this.loadScripts(["https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js","https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js","https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"]);break;case"bootstrap5":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"]),this.loadScripts(["https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"]);break}switch(this.iconLib){case"bootstrap-icons":this.loadStylesheets(["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css"]);break;case"fontawesome3":this.loadStylesheets(["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.1/css/font-awesome.css"]);break;case"fontawesome4":this.loadStylesheets(["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css"]);break;case"fontawesome5":this.loadStylesheets(["https://use.fontawesome.com/releases/v5.6.1/css/all.css"]);break;case"fontawesome6":this.loadStylesheets(["https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"]);break}this.initEditor()},methods:{getThemeInstance(t){let e;switch(t){case"barebones":e=new Ke.Theme;break;case"bootstrap3":e=new Ke.ThemeBootstrap3;break;case"bootstrap4":e=new Ke.ThemeBootstrap4;break;case"bootstrap5":e=new Ke.ThemeBootstrap5;break}return e},getSchema(){return Object.assign({},...Object.values(this.examples))[this.example]||null},async initEditor(t){this.editor&&this.editor.destroy(),this.schema=t??this.getSchema();const e=new Ke.RefParser;await e.dereference(this.schema);const s={container:document.querySelector("#jedi-container"),enablePropertiesToggle:this.enablePropertiesToggle,enableCollapseToggle:this.enableCollapseToggle,startCollapsed:this.startCollapsed,iconLib:this.iconLib,showErrors:this.showErrors,validateFormat:this.validateFormat,mergeAllOf:this.mergeAllOf,enforceEnumDefault:this.enforceEnumDefault,schema:this.schema,theme:this.getThemeInstance(this.theme),refParser:e,customEditors:[fd]};this.editor=new Ke.Create(s),window.editor=this.editor,this.editorChangeHandler(),this.editor.on("change",this.editorChangeHandler)},editorChangeHandler(){const t=this.editor.getErrors();this.errorCount=t.length,this.$refs.editorErrors.value=JSON.stringify(t,null,2),this.$refs.editorValue.value=JSON.stringify(this.editor.getValue(),null,2),this.$refs.schema.value=JSON.stringify(this.editor.schema,null,2)},showValidationErrors(){const t=this.editor.getErrors();this.editor.showValidationErrors(t)},destroyEditor(){this.editor.destroy()},enableEditor(){this.editor.enable()},disableEditor(){this.editor.disable()},setEditorValue(){this.editor.setValue(JSON.parse(this.$refs.editorValue.value))},setSchema(){this.schema=JSON.parse(this.$refs.schema.value),this.initEditor(this.schema)},reload(){let t=window.location.origin+window.location.pathname;t+="?theme="+this.theme,t+="&iconLib="+this.iconLib,t+="&example="+this.example,t+="&showErrors="+this.showErrors,t+="&validateFormat="+this.validateFormat,t+="&mergeAllOf="+this.mergeAllOf,t+="&enforceEnumDefault="+this.enforceEnumDefault,t+="&enablePropertiesToggle="+this.enablePropertiesToggle,t+="&enableCollapseToggle="+this.enableCollapseToggle,window.open(t,"_self")},getQueryParam(t){const e=RegExp("[?&]"+t+"=([^&]*)").exec(window.location.search);return e&&decodeURIComponent(e[1].replace(/\+/g," "))},parseBooleanString(t){return t==="true"},loadStylesheets(t){const e=document.head;for(let s=0;s0&&i(t[0])}}},Rg={class:"row"},Ng={class:"col-xs-12 col-sm-8"},Bg={class:"btn-group"},Vg={action:"",method:"POST"},Hg={ref:"jediContainer",id:"jedi-container"},Fg={class:"col-xs-12 col-sm-4"},qg={class:"form-group mb-3"},Ug=["label"],Kg=["value"],Wg={class:"form-group mb-3"},zg={ref:"editorValue",class:"form-control",id:"editor-value",style:{"font-size":"14px","font-family":"monospace",height:"200px"}},Jg={class:"form-group mb-3"},Gg={for:"editor-errors"},Yg={ref:"editorErrors",class:"form-control",id:"editor-errors",style:{"font-size":"14px","font-family":"monospace",height:"200px"}},Qg={class:"form-group mb-3"},Zg={ref:"schema",class:"form-control",id:"schema",style:{"font-size":"14px","font-family":"monospace",height:"200px"}},Xg={class:"form-group mb-3"},ey=["value"],ty={class:"form-group mb-3"},sy=["value"],iy={class:"form-group mb-3"},ny=["value"],ry={class:"form-group mb-3"},oy={class:"form-group mb-3"},ay={class:"form-group mb-3"},ly={class:"form-group mb-3"},cy={class:"form-group mb-3"},dy={class:"form-group mb-3"};function py(t,e,s,i,n,r){return Oe(),Ae("div",null,[e[40]||(e[40]=$("header",null,[$("h1",null,"Playground")],-1)),$("div",Rg,[$("div",Ng,[$("main",null,[$("div",Bg,[$("button",{class:"btn btn-primary",id:"disable-editor",onClick:e[0]||(e[0]=o=>r.disableEditor())},"Disable"),$("button",{class:"btn btn-primary",id:"enable-editor",onClick:e[1]||(e[1]=o=>r.enableEditor())},"Enable"),$("button",{class:"btn btn-primary",id:"show-validation-errors",onClick:e[2]||(e[2]=o=>r.showValidationErrors())},"Show validation errors"),$("button",{class:"btn btn-primary",id:"destroy-editor",onClick:e[3]||(e[3]=o=>r.destroyEditor())},"Destroy")]),e[26]||(e[26]=$("hr",null,null,-1)),$("form",Vg,[$("div",Hg,null,512)])])]),$("div",Fg,[$("aside",null,[$("div",qg,[e[27]||(e[27]=$("label",{for:"examples"},"Examples",-1)),He($("select",{class:"form-control",id:"examples","onUpdate:modelValue":e[4]||(e[4]=o=>n.example=o),onChange:e[5]||(e[5]=(...o)=>r.reload&&r.reload(...o))},[(Oe(!0),Ae(Ce,null,Ht(n.examples,(o,a)=>(Oe(),Ae("optgroup",{label:a,key:a},[(Oe(!0),Ae(Ce,null,Ht(o,(l,c)=>(Oe(),Ae("option",{value:c,key:c},Tt(c),9,Kg))),128))],8,Ug))),128))],544),[[Us,n.example]])]),$("div",Wg,[e[28]||(e[28]=$("label",{for:"editor-value"},"Value",-1)),$("textarea",zg,null,512)]),$("button",{class:"btn btn-primary btn-block mb-3",id:"set-value",onClick:e[6]||(e[6]=o=>r.setEditorValue())},"Set value"),$("div",Jg,[$("label",Gg,[e[29]||(e[29]=$("span",null,"Errors: ",-1)),$("span",null,Tt(n.errorCount),1)]),$("textarea",Yg,null,512)]),$("div",Qg,[e[30]||(e[30]=$("label",{for:"schema"},"Schema",-1)),$("textarea",Zg,null,512)]),$("button",{class:"btn btn-primary btn-block mb-3",id:"set-schema",onClick:e[7]||(e[7]=o=>r.setSchema())},"Set schema"),$("div",Xg,[e[31]||(e[31]=$("label",{for:"theme"},"theme",-1)),He($("select",{class:"form-control",id:"theme","onUpdate:modelValue":e[8]||(e[8]=o=>n.theme=o),onChange:e[9]||(e[9]=o=>r.reload())},[(Oe(!0),Ae(Ce,null,Ht(n.themes,o=>(Oe(),Ae("option",{value:o},Tt(o),9,ey))),256))],544),[[Us,n.theme]])]),$("div",ty,[e[32]||(e[32]=$("label",{for:"icon-lib"},"iconLib",-1)),He($("select",{class:"form-control",id:"icon-lib","onUpdate:modelValue":e[10]||(e[10]=o=>n.iconLib=o),onChange:e[11]||(e[11]=o=>r.reload())},[(Oe(!0),Ae(Ce,null,Ht(n.iconLibs,o=>(Oe(),Ae("option",{value:o},Tt(o),9,sy))),256))],544),[[Us,n.iconLib]])]),$("div",iy,[e[33]||(e[33]=$("label",{for:"show-errors"},"showErrors",-1)),He($("select",{class:"form-control",id:"show-errors","onUpdate:modelValue":e[12]||(e[12]=o=>n.showErrors=o),onChange:e[13]||(e[13]=o=>r.reload())},[(Oe(!0),Ae(Ce,null,Ht(n.showErrorsOptions,o=>(Oe(),Ae("option",{value:o},Tt(o),9,ny))),256))],544),[[Us,n.showErrors]])]),$("div",ry,[He($("input",{type:"checkbox",id:"enablePropertiesToggle","onUpdate:modelValue":e[14]||(e[14]=o=>n.enablePropertiesToggle=o),onChange:e[15]||(e[15]=o=>r.initEditor())},null,544),[[Et,n.enablePropertiesToggle]]),e[34]||(e[34]=$("label",{for:"enablePropertiesToggle"},"enablePropertiesToggle",-1))]),$("div",oy,[He($("input",{type:"checkbox",id:"enableCollapseToggle","onUpdate:modelValue":e[16]||(e[16]=o=>n.enableCollapseToggle=o),onChange:e[17]||(e[17]=o=>r.initEditor())},null,544),[[Et,n.enableCollapseToggle]]),e[35]||(e[35]=$("label",{for:"enableCollapseToggle"},"enableCollapseToggle",-1))]),$("div",ay,[He($("input",{type:"checkbox",id:"startCollapsed","onUpdate:modelValue":e[18]||(e[18]=o=>n.startCollapsed=o),onChange:e[19]||(e[19]=o=>r.initEditor())},null,544),[[Et,n.startCollapsed]]),e[36]||(e[36]=$("label",{for:"startCollapsed"},"startCollapsed",-1))]),$("div",ly,[He($("input",{type:"checkbox",id:"validateFormat","onUpdate:modelValue":e[20]||(e[20]=o=>n.validateFormat=o),onChange:e[21]||(e[21]=o=>r.initEditor())},null,544),[[Et,n.validateFormat]]),e[37]||(e[37]=$("label",{for:"validateFormat"},"validateFormat",-1))]),$("div",cy,[He($("input",{type:"checkbox",id:"mergeAllOf","onUpdate:modelValue":e[22]||(e[22]=o=>n.mergeAllOf=o),onChange:e[23]||(e[23]=o=>r.initEditor())},null,544),[[Et,n.mergeAllOf]]),e[38]||(e[38]=$("label",{for:"mergeAllOf"},"mergeAllOf",-1))]),$("div",dy,[He($("input",{type:"checkbox",id:"enforceEnumDefault","onUpdate:modelValue":e[24]||(e[24]=o=>n.enforceEnumDefault=o),onChange:e[25]||(e[25]=o=>r.initEditor())},null,544),[[Et,n.enforceEnumDefault]]),e[39]||(e[39]=$("label",{for:"enforceEnumDefault"},"enforceEnumDefault",-1))])])])])])}const uy=Dg(Mg,[["render",py]]),hy=Oc(uy);hy.mount("#app"); diff --git a/docs/index.html b/docs/index.html index 92c2fb4..dfaf510 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,7 +14,7 @@ - + diff --git a/src-docs/App.vue b/src-docs/App.vue index a551b32..2c7b9d8 100644 --- a/src-docs/App.vue +++ b/src-docs/App.vue @@ -8,10 +8,10 @@
- - + + - +

@@ -154,6 +154,7 @@ import ifThenElseAllOf from './json/validator/if-then-else-allOf.json' import ifThenElseNested from './json/validator/if-then-else-nested.json' import ifThenElseNestedSimple from './json/validator/if-then-else-nested-simple.json' import ifThenElseNestedComplex from './json/validator/if-then-else-nested-complex.json' +import ifThenElseDeeplyNestedAndUnselected from './json/validator/if-then-else-deeply-nested-and-unselected.json' import items from './json/validator/items.json' import maxContains from './json/validator/maxContains.json' import maximum from './json/validator/maximum.json' @@ -227,6 +228,7 @@ export default { 'validator/if-then-else-nested': ifThenElseNested, 'validator/if-then-else-nested-simple': ifThenElseNestedSimple, 'validator/if-then-else-nested-complex': ifThenElseNestedComplex, + 'validator/if-then-else-deeply-nested-and-unselected': ifThenElseDeeplyNestedAndUnselected, 'validator/items': items, 'validator/maxContains': maxContains, 'validator/maximum': maximum, diff --git a/src-docs/json/validator/if-then-else-deeply-nested-and-unselected.json b/src-docs/json/validator/if-then-else-deeply-nested-and-unselected.json new file mode 100644 index 0000000..83c0dfe --- /dev/null +++ b/src-docs/json/validator/if-then-else-deeply-nested-and-unselected.json @@ -0,0 +1,128 @@ +{ + "title": "Red Deer", + "type": "object", + "required": [ + "occurrence" + ], + "properties": { + "occurrence": { + "title": "Did the species occur in your hunting area during the hunting year 2020/2021?", + "type": "string", + "enum": [ + "Resident game", + "Transient game", + "Individual occurrence", + "No occurrence", + "No information" + ], + "x-options": { + "enforceEnumDefault": false, + "format": "radio" + } + } + }, + "if": { + "properties": { + "occurrence": { + "enum": [ + "Resident game", + "Transient game", + "Individual occurrence" + ] + } + } + }, + "then": { + "properties": { + "huntingBag": { + "$ref": "#/$defs/huntingBag", + "required": [ + "harvest", + "accidentGame", + "foundDead", + "unknown" + ], + "properties": { + "harvest": { + "$ref": "#/$defs/harvest", + "minimum": 0 + }, + "accidentGame": { + "$ref": "#/$defs/accidentGame", + "minimum": 0 + }, + "foundDead": { + "$ref": "#/$defs/foundDead", + "minimum": 0 + }, + "unknown": { + "$ref": "#/$defs/unknown", + "minimum": 0 + } + } + }, + "total": { + "$ref": "#/$defs/total", + "minimum": 1 + } + } + }, + "else": { + "properties": { + "huntingBag": { + "readOnly": true, + "$ref": "#/$defs/huntingBag", + "properties": { + "harvest": { + "$ref": "#/$defs/harvest", + "default": 0, + "const": 0 + }, + "accidentGame": { + "$ref": "#/$defs/accidentGame", + "default": 0, + "const": 0 + }, + "foundDead": { + "$ref": "#/$defs/foundDead", + "default": 0, + "const": 0 + } + } + }, + "total": { + "$ref": "#/$defs/total", + "default": 0, + "const": 0, + "x-options": {} + } + } + }, + "$defs": { + "huntingBag": { + "title": "Hunting Bag 2020/21", + "type": "object" + }, + "harvest": { + "title": "Harvest Count", + "type": "integer" + }, + "accidentGame": { + "title": "Accident Game Count", + "type": "integer" + }, + "foundDead": { + "title": "Other Found Dead Count", + "type": "integer" + }, + "unknown": { + "title": "Unknown Count", + "type": "integer" + }, + "total": { + "title": "Total Hunting Bag 2020/21:", + "type": "integer", + "readOnly": true + } + } +} diff --git a/src/editors/object.js b/src/editors/object.js index de18bdf..51f04c6 100644 --- a/src/editors/object.js +++ b/src/editors/object.js @@ -1,7 +1,7 @@ import Editor from './editor.js' import { equal, - hasOwn, isNumber, + hasOwn, isObject, isSet, pathToAttribute diff --git a/src/helpers/utils.js b/src/helpers/utils.js index 6e95ae2..5815ad4 100644 --- a/src/helpers/utils.js +++ b/src/helpers/utils.js @@ -248,17 +248,22 @@ export function mergeDeep (target, ...sources) { } /** - * Merges objects but only the properties that exists in both objects - * if they are the same type of value + * Merges objects but only the properties that exist in both objects + * if they are the same type of value. + * Handles nested objects recursively. * @param {object} obj1 - The target object - * @param {object[]} obj2 - Objects whose properties are the overrides + * @param {object} obj2 - Object whose properties are the overrides * @return {object} The overwritten object */ -export function overwriteExistingProperties (obj1, obj2) { - Object.keys(obj2).forEach(function (key) { +export const overwriteExistingProperties = (obj1, obj2) => { + Object.keys(obj2).forEach((key) => { if (key in obj1) { if (typeof obj1[key] === typeof obj2[key]) { - obj1[key] = obj2[key] + if (isObject(obj1[key]) && isObject(obj2[key])) { + overwriteExistingProperties(obj1[key], obj2[key]) + } else { + obj1[key] = obj2[key] + } } } }) diff --git a/src/instances/if-then-else.js b/src/instances/if-then-else.js index d38ecb3..336e9e7 100644 --- a/src/instances/if-then-else.js +++ b/src/instances/if-then-else.js @@ -11,7 +11,6 @@ import { } from '../helpers/utils.js' import { - getSchemaConst, getSchemaElse, getSchemaIf, getSchemaThen @@ -29,6 +28,7 @@ class InstanceIfThenElse extends Instance { prepare () { this.instances = [] this.instanceStartingValues = [] + this.instanceWithoutIf = null this.activeInstance = null this.index = 0 this.schemas = [] @@ -67,7 +67,7 @@ class InstanceIfThenElse extends Instance { delete schemaClone.then delete schemaClone.else - const instanceWithoutIf = this.jedi.createInstance({ + this.instanceWithoutIf = this.jedi.createInstance({ jedi: this.jedi, schema: schemaClone, path: this.path, @@ -101,20 +101,17 @@ class InstanceIfThenElse extends Instance { }) this.on('set-value', (newValue) => { - this.instances.forEach((instance) => { - const currentValue = instance.getValue() + let ifValue = this.instanceWithoutIf.getValue() - if (isObject(currentValue) && isObject(newValue)) { - newValue = overwriteExistingProperties(currentValue, newValue) + if (isObject(ifValue) && isObject(newValue)) { + ifValue = overwriteExistingProperties(ifValue, newValue) + } - // restore any const value here - instance.children.forEach((child) => { - const schemaConst = getSchemaConst(child.schema) + this.instances.forEach((instance, index) => { + const startingValue = this.instanceStartingValues[index] - if (isSet(schemaConst)) { - newValue[child.getKey()] = schemaConst - } - }) + if (isObject(startingValue) && isObject(newValue)) { + newValue = overwriteExistingProperties(startingValue, ifValue) } instance.setValue(newValue, false) @@ -129,8 +126,7 @@ class InstanceIfThenElse extends Instance { }) // initial value and active instance - this.value = instanceWithoutIf.getValue() - instanceWithoutIf.destroy() + this.value = this.instanceWithoutIf.getValue() const fittestIndex = this.getFittestIndex(this.value) this.switchInstance(fittestIndex) } diff --git a/tests/e2e/tests/validation/constrains/if-then-else_test.cjs b/tests/e2e/tests/validation/constrains/if-then-else_test.cjs index e7c2036..ba7343d 100644 --- a/tests/e2e/tests/validation/constrains/if-then-else_test.cjs +++ b/tests/e2e/tests/validation/constrains/if-then-else_test.cjs @@ -3,6 +3,75 @@ const theme = process.env.THEME || 'barebones' Feature('if-then-else') +Scenario('@constrain-if-then-else validate against @if-then-else-deeply-nested-and-unselected', async ({ I }) => { + I.amOnPage(`playground.html?theme=${theme}`) + I._waitForElement('.jedi-ready') + I.selectOption('#examples', 'validator/if-then-else-deeply-nested-and-unselected') + I._scrollTo('[data-path="#"]') + + I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ + "occurrence": "", + "huntingBag": { + "harvest": 0, + "accidentGame": 0, + "foundDead": 0 + }, + "total": 0 + })) + + I.click('label[for="root-occurrence-0"]') + + I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ + "occurrence": "Resident game", + "huntingBag": { + "harvest": 0, + "accidentGame": 0, + "foundDead": 0, + "unknown": 0 + }, + "total": 0 + })) + + I.fillField('[id="root-huntingBag-harvest"]', 1) + I.pressKey('Tab') + + I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ + "occurrence": "Resident game", + "huntingBag": { + "harvest": 1, + "accidentGame": 0, + "foundDead": 0, + "unknown": 0 + }, + "total": 0 + })) + + I.click('label[for="root-occurrence-4"]') + + I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ + "occurrence": "No information", + "huntingBag": { + "harvest": 0, + "accidentGame": 0, + "foundDead": 0 + }, + "total": 0 + })) + + I.click('label[for="root-occurrence-0"]') + + I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ + "occurrence": "Resident game", + "huntingBag": { + "harvest": 0, + "accidentGame": 0, + "foundDead": 0, + "unknown": 0 + }, + "total": 0 + })) +}) + Scenario('@constrain-if-then-else validate against @if-then-else-nested-simple', async ({ I }) => { I.amOnPage(`playground.html?theme=${theme}`) I._waitForElement('.jedi-ready') @@ -35,7 +104,7 @@ Scenario('@constrain-if-then-else validate against @if-then-else-nested-simple', I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ "occurrence": "yes", - "count": 0 + "count": 4 })) }) @@ -142,12 +211,12 @@ Scenario('@constrain-if-then-else validate against @if-then-else-nested-complex' "grayGoose": { "presence": "yes", "nesting": "yes", - "pairCount": 5 + "pairCount": 0 } })) }) -Scenario('@constrain-if-then-else validate against @if-then-else-nested', async ({ I }) => { +Scenario('@constrain-if-then-else validate against @if-then-else-nested-basic', async ({ I }) => { I.amOnPage(`playground.html?theme=${theme}`) I._waitForElement('.jedi-ready') I.selectOption('#examples', 'validator/if-then-else-nested') @@ -163,18 +232,18 @@ Scenario('@constrain-if-then-else validate against @if-then-else-nested', async "numPedals": 0 })) - I.selectOption('[id="root-vehicleType"]', 'car') - I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ - "vehicleType": "car", - "numDoors": 0 - })) - I.selectOption('[id="root-vehicleType"]', 'other') I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ "vehicleType": "other", "make": "", "model": "" })) + + I.selectOption('[id="root-vehicleType"]', 'car') + I.waitForValue('[id="jedi-hidden-input"]', JSON.stringify({ + "vehicleType": "car", + "numDoors": 0 + })) }) Scenario('@constrain-if-then-else validate against @if-then-else ', async ({ I }) => {