@eox/layercontrol 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +7380 -7273
- package/dist/eox-layercontrol.umd.cjs +240 -306
- package/package.json +1 -1
- package/test/cases/general/check-layer-size.js +25 -0
- package/test/cases/general/check-pre-open-layer-tools.js +26 -0
- package/test/cases/general/check-pre-open-section.js +26 -0
- package/test/cases/general/disable-drag.js +26 -0
- package/test/cases/general/hide-layers.js +23 -0
- package/test/cases/general/index.js +7 -0
- package/test/cases/general/render-optional-layer.js +31 -0
- package/test/cases/general/show-layer-title.js +23 -0
- package/test/cases/layer-update/add-external-layer.js +68 -0
- package/test/cases/layer-update/add-layer-from-optional.js +51 -0
- package/test/cases/layer-update/check-if-layer-pushed-to-group.js +33 -0
- package/test/cases/layer-update/check-layer-is-pushed-to-root.js +22 -0
- package/test/cases/layer-update/check-layer-removed-from-group.js +33 -0
- package/test/cases/layer-update/check-layer-removed-from-root.js +27 -0
- package/test/cases/layer-update/check-layer-size-after-multiple-calls.js +34 -0
- package/test/cases/layer-update/check-layer-zoom-state.js +54 -0
- package/test/cases/layer-update/index.js +8 -0
- package/test/general.cy.js +34 -118
- package/test/layersUpdate.cy.js +42 -289
|
@@ -1,78 +1,91 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ke,ye){typeof exports=="object"&&typeof module<"u"?ye(exports):typeof define=="function"&&define.amd?define(["exports"],ye):(ke=typeof globalThis<"u"?globalThis:ke||self,ye(ke["eox-layercontrol"]={}))})(this,function(ke){"use strict";var Yf=Object.defineProperty;var Xf=(ke,ye,Fe)=>ye in ke?Yf(ke,ye,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ke[ye]=Fe;var Xe=(ke,ye,Fe)=>(Xf(ke,typeof ye!="symbol"?ye+"":ye,Fe),Fe),ic=(ke,ye,Fe)=>{if(!ye.has(ke))throw TypeError("Cannot "+Fe)};var Ee=(ke,ye,Fe)=>(ic(ke,ye,"read from private field"),Fe?Fe.call(ke):ye.get(ke)),se=(ke,ye,Fe)=>{if(ye.has(ke))throw TypeError("Cannot add the same private member more than once");ye instanceof WeakSet?ye.add(ke):ye.set(ke,Fe)},Si=(ke,ye,Fe,Po)=>(ic(ke,ye,"write to private field"),Po?Po.call(ke,Fe):ye.set(ke,Fe),Fe);var rr=(ke,ye,Fe)=>(ic(ke,ye,"access private method"),Fe);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var Cu,$i,ci,Ma,Uu,Ha,qu,Yo,Xo,Ko,Fa,Gu,Va,za,Qo,Ua,qa,Ga,Wa,Mi,As,Za,Wu,Ja,Ya,Xa,Ka,Qa,ts,es,Zu,rs,Ju,ns,Yu,ta,oc,is,Xu,os,Ku,Hi,Ls,as,ss,Fi,ls,Qu,cs;const ye=globalThis,Fe=ye.ShadowRoot&&(ye.ShadyCSS===void 0||ye.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Po=Symbol(),ac=new WeakMap;let th=class{constructor(s,p,b){if(this._$cssResult$=!0,b!==Po)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=s,this.t=p}get styleSheet(){let s=this.o;const p=this.t;if(Fe&&s===void 0){const b=p!==void 0&&p.length===1;b&&(s=ac.get(p)),s===void 0&&((this.o=s=new CSSStyleSheet).replaceSync(this.cssText),b&&ac.set(p,s))}return s}toString(){return this.cssText}};const eh=m=>new th(typeof m=="string"?m:m+"",void 0,Po),rh=(m,s)=>{if(Fe)m.adoptedStyleSheets=s.map(p=>p instanceof CSSStyleSheet?p:p.styleSheet);else for(const p of s){const b=document.createElement("style"),_=ye.litNonce;_!==void 0&&b.setAttribute("nonce",_),b.textContent=p.cssText,m.appendChild(b)}},sc=Fe?m=>m:m=>m instanceof CSSStyleSheet?(s=>{let p="";for(const b of s.cssRules)p+=b.cssText;return eh(p)})(m):m;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:nh,defineProperty:ih,getOwnPropertyDescriptor:oh,getOwnPropertyNames:ah,getOwnPropertySymbols:sh,getPrototypeOf:lh}=Object,An=globalThis,lc=An.trustedTypes,ch=lc?lc.emptyScript:"",Rs=An.reactiveElementPolyfillSupport,To=(m,s)=>m,Is={toAttribute(m,s){switch(s){case Boolean:m=m?ch:null;break;case Object:case Array:m=m==null?m:JSON.stringify(m)}return m},fromAttribute(m,s){let p=m;switch(s){case Boolean:p=m!==null;break;case Number:p=m===null?null:Number(m);break;case Object:case Array:try{p=JSON.parse(m)}catch{p=null}}return p}},cc=(m,s)=>!nh(m,s),uc={attribute:!0,type:String,converter:Is,reflect:!1,hasChanged:cc};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),An.litPropertyMetadata??(An.litPropertyMetadata=new WeakMap);class Pi extends HTMLElement{static addInitializer(s){this._$Ei(),(this.l??(this.l=[])).push(s)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(s,p=uc){if(p.state&&(p.attribute=!1),this._$Ei(),this.elementProperties.set(s,p),!p.noAccessor){const b=Symbol(),_=this.getPropertyDescriptor(s,b,p);_!==void 0&&ih(this.prototype,s,_)}}static getPropertyDescriptor(s,p,b){const{get:_,set:E}=oh(this.prototype,s)??{get(){return this[p]},set(y){this[p]=y}};return{get(){return _==null?void 0:_.call(this)},set(y){const j=_==null?void 0:_.call(this);E.call(this,y),this.requestUpdate(s,j,b)},configurable:!0,enumerable:!0}}static getPropertyOptions(s){return this.elementProperties.get(s)??uc}static _$Ei(){if(this.hasOwnProperty(To("elementProperties")))return;const s=lh(this);s.finalize(),s.l!==void 0&&(this.l=[...s.l]),this.elementProperties=new Map(s.elementProperties)}static finalize(){if(this.hasOwnProperty(To("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(To("properties"))){const p=this.properties,b=[...ah(p),...sh(p)];for(const _ of b)this.createProperty(_,p[_])}const s=this[Symbol.metadata];if(s!==null){const p=litPropertyMetadata.get(s);if(p!==void 0)for(const[b,_]of p)this.elementProperties.set(b,_)}this._$Eh=new Map;for(const[p,b]of this.elementProperties){const _=this._$Eu(p,b);_!==void 0&&this._$Eh.set(_,p)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const p=[];if(Array.isArray(s)){const b=new Set(s.flat(1/0).reverse());for(const _ of b)p.unshift(sc(_))}else s!==void 0&&p.push(sc(s));return p}static _$Eu(s,p){const b=p.attribute;return b===!1?void 0:typeof b=="string"?b:typeof s=="string"?s.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var s;this._$Eg=new Promise(p=>this.enableUpdating=p),this._$AL=new Map,this._$E_(),this.requestUpdate(),(s=this.constructor.l)==null||s.forEach(p=>p(this))}addController(s){var p;(this._$ES??(this._$ES=[])).push(s),this.renderRoot!==void 0&&this.isConnected&&((p=s.hostConnected)==null||p.call(s))}removeController(s){var p;(p=this._$ES)==null||p.splice(this._$ES.indexOf(s)>>>0,1)}_$E_(){const s=new Map,p=this.constructor.elementProperties;for(const b of p.keys())this.hasOwnProperty(b)&&(s.set(b,this[b]),delete this[b]);s.size>0&&(this._$Ep=s)}createRenderRoot(){const s=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return rh(s,this.constructor.elementStyles),s}connectedCallback(){var s;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(s=this._$ES)==null||s.forEach(p=>{var b;return(b=p.hostConnected)==null?void 0:b.call(p)})}enableUpdating(s){}disconnectedCallback(){var s;(s=this._$ES)==null||s.forEach(p=>{var b;return(b=p.hostDisconnected)==null?void 0:b.call(p)})}attributeChangedCallback(s,p,b){this._$AK(s,b)}_$EO(s,p){var E;const b=this.constructor.elementProperties.get(s),_=this.constructor._$Eu(s,b);if(_!==void 0&&b.reflect===!0){const y=(((E=b.converter)==null?void 0:E.toAttribute)!==void 0?b.converter:Is).toAttribute(p,b.type);this._$Em=s,y==null?this.removeAttribute(_):this.setAttribute(_,y),this._$Em=null}}_$AK(s,p){var E;const b=this.constructor,_=b._$Eh.get(s);if(_!==void 0&&this._$Em!==_){const y=b.getPropertyOptions(_),j=typeof y.converter=="function"?{fromAttribute:y.converter}:((E=y.converter)==null?void 0:E.fromAttribute)!==void 0?y.converter:Is;this._$Em=_,this[_]=j.fromAttribute(p,y.type),this._$Em=null}}requestUpdate(s,p,b,_=!1,E){if(s!==void 0){if(b??(b=this.constructor.getPropertyOptions(s)),!(b.hasChanged??cc)(_?E:this[s],p))return;this.C(s,p,b)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(s,p,b){this._$AL.has(s)||this._$AL.set(s,p),b.reflect===!0&&this._$Em!==s&&(this._$Ej??(this._$Ej=new Set)).add(s)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(p){Promise.reject(p)}const s=this.scheduleUpdate();return s!=null&&await s,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var b;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[E,y]of this._$Ep)this[E]=y;this._$Ep=void 0}const _=this.constructor.elementProperties;if(_.size>0)for(const[E,y]of _)y.wrapped!==!0||this._$AL.has(E)||this[E]===void 0||this.C(E,this[E],y)}let s=!1;const p=this._$AL;try{s=this.shouldUpdate(p),s?(this.willUpdate(p),(b=this._$ES)==null||b.forEach(_=>{var E;return(E=_.hostUpdate)==null?void 0:E.call(_)}),this.update(p)):this._$ET()}catch(_){throw s=!1,this._$ET(),_}s&&this._$AE(p)}willUpdate(s){}_$AE(s){var p;(p=this._$ES)==null||p.forEach(b=>{var _;return(_=b.hostUpdated)==null?void 0:_.call(b)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(s)),this.updated(s)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(s){return!0}update(s){this._$Ej&&(this._$Ej=this._$Ej.forEach(p=>this._$EO(p,this[p]))),this._$ET()}updated(s){}firstUpdated(s){}}Pi.elementStyles=[],Pi.shadowRootOptions={mode:"open"},Pi[To("elementProperties")]=new Map,Pi[To("finalized")]=new Map,Rs==null||Rs({ReactiveElement:Pi}),(An.reactiveElementVersions??(An.reactiveElementVersions=[])).push("2.0.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const Ao=globalThis,
|
|
14
|
-
\f\r]`,Io=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const Ao=globalThis,ba=Ao.trustedTypes,hc=ba?ba.createPolicy("lit-html",{createHTML:m=>m}):void 0,Bs="$lit$",bn=`lit$${(Math.random()+"").slice(9)}$`,Ds="?"+bn,uh=`<${Ds}>`,ti=document,Lo=()=>ti.createComment(""),Ro=m=>m===null||typeof m!="object"&&typeof m!="function",dc=Array.isArray,pc=m=>dc(m)||typeof(m==null?void 0:m[Symbol.iterator])=="function",Ns=`[
|
|
14
|
+
\f\r]`,Io=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fc=/-->/g,mc=/>/g,ei=RegExp(`>|${Ns}(?:([^\\s"'>=/]+)(${Ns}*=${Ns}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),yc=/'/g,bc=/"/g,vc=/^(?:script|style|textarea|title)$/i,hh=m=>(s,...p)=>({_$litType$:m,strings:s,values:p}),ae=hh(1),Nr=Symbol.for("lit-noChange"),je=Symbol.for("lit-nothing"),gc=new WeakMap,ri=ti.createTreeWalker(ti,129);function wc(m,s){if(!Array.isArray(m)||!m.hasOwnProperty("raw"))throw Error("invalid template strings array");return hc!==void 0?hc.createHTML(s):s}const _c=(m,s)=>{const p=m.length-1,b=[];let _,E=s===2?"<svg>":"",y=Io;for(let j=0;j<p;j++){const r=m[j];let v,g,w=-1,k=0;for(;k<r.length&&(y.lastIndex=k,g=y.exec(r),g!==null);)k=y.lastIndex,y===Io?g[1]==="!--"?y=fc:g[1]!==void 0?y=mc:g[2]!==void 0?(vc.test(g[2])&&(_=RegExp("</"+g[2],"g")),y=ei):g[3]!==void 0&&(y=ei):y===ei?g[0]===">"?(y=_??Io,w=-1):g[1]===void 0?w=-2:(w=y.lastIndex-g[2].length,v=g[1],y=g[3]===void 0?ei:g[3]==='"'?bc:yc):y===bc||y===yc?y=ei:y===fc||y===mc?y=Io:(y=ei,_=void 0);const O=y===ei&&m[j+1].startsWith("/>")?" ":"";E+=y===Io?r+uh:w>=0?(b.push(v),r.slice(0,w)+Bs+r.slice(w)+bn+O):r+bn+(w===-2?j:O)}return[wc(m,E+(m[p]||"<?>")+(s===2?"</svg>":"")),b]};class Bo{constructor({strings:s,_$litType$:p},b){let _;this.parts=[];let E=0,y=0;const j=s.length-1,r=this.parts,[v,g]=_c(s,p);if(this.el=Bo.createElement(v,b),ri.currentNode=this.el.content,p===2){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(_=ri.nextNode())!==null&&r.length<j;){if(_.nodeType===1){if(_.hasAttributes())for(const w of _.getAttributeNames())if(w.endsWith(Bs)){const k=g[y++],O=_.getAttribute(w).split(bn),C=/([.?@])?(.*)/.exec(k);r.push({type:1,index:E,name:C[2],strings:O,ctor:C[1]==="."?kc:C[1]==="?"?jc:C[1]==="@"?Oc:Do}),_.removeAttribute(w)}else w.startsWith(bn)&&(r.push({type:6,index:E}),_.removeAttribute(w));if(vc.test(_.tagName)){const w=_.textContent.split(bn),k=w.length-1;if(k>0){_.textContent=ba?ba.emptyScript:"";for(let O=0;O<k;O++)_.append(w[O],Lo()),ri.nextNode(),r.push({type:2,index:++E});_.append(w[k],Lo())}}}else if(_.nodeType===8)if(_.data===Ds)r.push({type:2,index:E});else{let w=-1;for(;(w=_.data.indexOf(bn,w+1))!==-1;)r.push({type:7,index:E}),w+=bn.length-1}E++}}static createElement(s,p){const b=ti.createElement("template");return b.innerHTML=s,b}}function ni(m,s,p=m,b){var y,j;if(s===Nr)return s;let _=b!==void 0?(y=p._$Co)==null?void 0:y[b]:p._$Cl;const E=Ro(s)?void 0:s._$litDirective$;return(_==null?void 0:_.constructor)!==E&&((j=_==null?void 0:_._$AO)==null||j.call(_,!1),E===void 0?_=void 0:(_=new E(m),_._$AT(m,p,b)),b!==void 0?(p._$Co??(p._$Co=[]))[b]=_:p._$Cl=_),_!==void 0&&(s=ni(m,_._$AS(m,s.values),_,b)),s}class xc{constructor(s,p){this._$AV=[],this._$AN=void 0,this._$AD=s,this._$AM=p}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(s){const{el:{content:p},parts:b}=this._$AD,_=((s==null?void 0:s.creationScope)??ti).importNode(p,!0);ri.currentNode=_;let E=ri.nextNode(),y=0,j=0,r=b[0];for(;r!==void 0;){if(y===r.index){let v;r.type===2?v=new Ti(E,E.nextSibling,this,s):r.type===1?v=new r.ctor(E,r.name,r.strings,this,s):r.type===6&&(v=new Ec(E,this,s)),this._$AV.push(v),r=b[++j]}y!==(r==null?void 0:r.index)&&(E=ri.nextNode(),y++)}return ri.currentNode=ti,_}p(s){let p=0;for(const b of this._$AV)b!==void 0&&(b.strings!==void 0?(b._$AI(s,b,p),p+=b.strings.length-2):b._$AI(s[p])),p++}}class Ti{get _$AU(){var s;return((s=this._$AM)==null?void 0:s._$AU)??this._$Cv}constructor(s,p,b,_){this.type=2,this._$AH=je,this._$AN=void 0,this._$AA=s,this._$AB=p,this._$AM=b,this.options=_,this._$Cv=(_==null?void 0:_.isConnected)??!0}get parentNode(){let s=this._$AA.parentNode;const p=this._$AM;return p!==void 0&&(s==null?void 0:s.nodeType)===11&&(s=p.parentNode),s}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(s,p=this){s=ni(this,s,p),Ro(s)?s===je||s==null||s===""?(this._$AH!==je&&this._$AR(),this._$AH=je):s!==this._$AH&&s!==Nr&&this._(s):s._$litType$!==void 0?this.g(s):s.nodeType!==void 0?this.$(s):pc(s)?this.T(s):this._(s)}k(s){return this._$AA.parentNode.insertBefore(s,this._$AB)}$(s){this._$AH!==s&&(this._$AR(),this._$AH=this.k(s))}_(s){this._$AH!==je&&Ro(this._$AH)?this._$AA.nextSibling.data=s:this.$(ti.createTextNode(s)),this._$AH=s}g(s){var E;const{values:p,_$litType$:b}=s,_=typeof b=="number"?this._$AC(s):(b.el===void 0&&(b.el=Bo.createElement(wc(b.h,b.h[0]),this.options)),b);if(((E=this._$AH)==null?void 0:E._$AD)===_)this._$AH.p(p);else{const y=new xc(_,this),j=y.u(this.options);y.p(p),this.$(j),this._$AH=y}}_$AC(s){let p=gc.get(s.strings);return p===void 0&&gc.set(s.strings,p=new Bo(s)),p}T(s){dc(this._$AH)||(this._$AH=[],this._$AR());const p=this._$AH;let b,_=0;for(const E of s)_===p.length?p.push(b=new Ti(this.k(Lo()),this.k(Lo()),this,this.options)):b=p[_],b._$AI(E),_++;_<p.length&&(this._$AR(b&&b._$AB.nextSibling,_),p.length=_)}_$AR(s=this._$AA.nextSibling,p){var b;for((b=this._$AP)==null?void 0:b.call(this,!1,!0,p);s&&s!==this._$AB;){const _=s.nextSibling;s.remove(),s=_}}setConnected(s){var p;this._$AM===void 0&&(this._$Cv=s,(p=this._$AP)==null||p.call(this,s))}}class Do{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(s,p,b,_,E){this.type=1,this._$AH=je,this._$AN=void 0,this.element=s,this.name=p,this._$AM=_,this.options=E,b.length>2||b[0]!==""||b[1]!==""?(this._$AH=Array(b.length-1).fill(new String),this.strings=b):this._$AH=je}_$AI(s,p=this,b,_){const E=this.strings;let y=!1;if(E===void 0)s=ni(this,s,p,0),y=!Ro(s)||s!==this._$AH&&s!==Nr,y&&(this._$AH=s);else{const j=s;let r,v;for(s=E[0],r=0;r<E.length-1;r++)v=ni(this,j[b+r],p,r),v===Nr&&(v=this._$AH[r]),y||(y=!Ro(v)||v!==this._$AH[r]),v===je?s=je:s!==je&&(s+=(v??"")+E[r+1]),this._$AH[r]=v}y&&!_&&this.O(s)}O(s){s===je?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,s??"")}}class kc extends Do{constructor(){super(...arguments),this.type=3}O(s){this.element[this.name]=s===je?void 0:s}}class jc extends Do{constructor(){super(...arguments),this.type=4}O(s){this.element.toggleAttribute(this.name,!!s&&s!==je)}}class Oc extends Do{constructor(s,p,b,_,E){super(s,p,b,_,E),this.type=5}_$AI(s,p=this){if((s=ni(this,s,p,0)??je)===Nr)return;const b=this._$AH,_=s===je&&b!==je||s.capture!==b.capture||s.once!==b.once||s.passive!==b.passive,E=s!==je&&(b===je||_);_&&this.element.removeEventListener(this.name,this,b),E&&this.element.addEventListener(this.name,this,s),this._$AH=s}handleEvent(s){var p;typeof this._$AH=="function"?this._$AH.call(((p=this.options)==null?void 0:p.host)??this.element,s):this._$AH.handleEvent(s)}}class Ec{constructor(s,p,b){this.element=s,this.type=6,this._$AN=void 0,this._$AM=p,this.options=b}get _$AU(){return this._$AM._$AU}_$AI(s){ni(this,s)}}const dh={j:Bs,P:bn,A:Ds,C:1,M:_c,L:xc,R:pc,V:ni,D:Ti,I:Do,H:jc,N:Oc,U:kc,B:Ec},$s=Ao.litHtmlPolyfillSupport;$s==null||$s(Bo,Ti),(Ao.litHtmlVersions??(Ao.litHtmlVersions=[])).push("3.1.0");const ph=(m,s,p)=>{const b=(p==null?void 0:p.renderBefore)??s;let _=b._$litPart$;if(_===void 0){const E=(p==null?void 0:p.renderBefore)??null;b._$litPart$=_=new Ti(s.insertBefore(Lo(),E),E,void 0,p??{})}return _._$AI(m),_};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let
|
|
19
|
+
*/let jr=class extends Pi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var p;const s=super.createRenderRoot();return(p=this.renderOptions).renderBefore??(p.renderBefore=s.firstChild),s}update(s){const p=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(s),this._$Do=ph(p,this.renderRoot,this.renderOptions)}connectedCallback(){var s;super.connectedCallback(),(s=this._$Do)==null||s.setConnected(!0)}disconnectedCallback(){var s;super.disconnectedCallback(),(s=this._$Do)==null||s.setConnected(!1)}render(){return Nr}};jr._$litElement$=!0,jr.finalized=!0,(Cu=globalThis.litElementHydrateSupport)==null||Cu.call(globalThis,{LitElement:jr});const Ms=globalThis.litElementPolyfillSupport;Ms==null||Ms({LitElement:jr}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function
|
|
23
|
+
*/function qr(m,s,p){return m?s(m):p==null?void 0:p(m)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Ln={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},
|
|
27
|
+
*/const Ln={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Hs=m=>(...s)=>({_$litDirective$:m,values:s});class Fs{constructor(s){}get _$AU(){return this._$AM._$AU}_$AT(s,p,b){this._$Ct=s,this._$AM=p,this._$Ci=b}_$AS(s,p){return this.update(s,p)}update(s,p){return this.render(...p)}}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{D:
|
|
31
|
+
*/const{D:fh}=dh,mh=m=>m.strings===void 0,Cc=()=>document.createComment(""),No=(m,s,p)=>{var E;const b=m._$AA.parentNode,_=s===void 0?m._$AB:s._$AA;if(p===void 0){const y=b.insertBefore(Cc(),_),j=b.insertBefore(Cc(),_);p=new fh(y,j,m,m.options)}else{const y=p._$AB.nextSibling,j=p._$AM,r=j!==m;if(r){let v;(E=p._$AQ)==null||E.call(p,m),p._$AM=m,p._$AP!==void 0&&(v=m._$AU)!==j._$AU&&p._$AP(v)}if(y!==_||r){let v=p._$AA;for(;v!==y;){const g=v.nextSibling;b.insertBefore(v,_),v=g}}}return p},ii=(m,s,p=m)=>(m._$AI(s,p),m),yh={},Sc=(m,s=yh)=>m._$AH=s,bh=m=>m._$AH,Vs=m=>{var b;(b=m._$AP)==null||b.call(m,!1,!0);let s=m._$AA;const p=m._$AB.nextSibling;for(;s!==p;){const _=s.nextSibling;s.remove(),s=_}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
36
|
-
* Sortable 1.15.1
|
|
37
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
38
|
-
* @author owenm <owen23355@gmail.com>
|
|
39
|
-
* @license MIT
|
|
40
|
-
*/function Cu(y,l){var p=Object.keys(y);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(y);l&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(y,k).enumerable})),p.push.apply(p,v)}return p}function en(y){for(var l=1;l<arguments.length;l++){var p=arguments[l]!=null?arguments[l]:{};l%2?Cu(Object(p),!0).forEach(function(v){ph(y,v,p[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(p)):Cu(Object(p)).forEach(function(v){Object.defineProperty(y,v,Object.getOwnPropertyDescriptor(p,v))})}return y}function ba(y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ba=function(l){return typeof l}:ba=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},ba(y)}function ph(y,l,p){return l in y?Object.defineProperty(y,l,{value:p,enumerable:!0,configurable:!0,writable:!0}):y[l]=p,y}function vn(){return vn=Object.assign||function(y){for(var l=1;l<arguments.length;l++){var p=arguments[l];for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(y[v]=p[v])}return y},vn.apply(this,arguments)}function fh(y,l){if(y==null)return{};var p={},v=Object.keys(y),k,C;for(C=0;C<v.length;C++)k=v[C],!(l.indexOf(k)>=0)&&(p[k]=y[k]);return p}function yh(y,l){if(y==null)return{};var p=fh(y,l),v,k;if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(y);for(k=0;k<C.length;k++)v=C[k],!(l.indexOf(v)>=0)&&Object.prototype.propertyIsEnumerable.call(y,v)&&(p[v]=y[v])}return p}var mh="1.15.1";function gn(y){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(y)}var wn=gn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$o=gn(/Edge/i),Su=gn(/firefox/i),Mo=gn(/safari/i)&&!gn(/chrome/i)&&!gn(/android/i),Pu=gn(/iP(ad|od|hone)/i),Tu=gn(/chrome/i)&&gn(/android/i),Au={capture:!1,passive:!1};function be(y,l,p){y.addEventListener(l,p,!wn&&Au)}function he(y,l,p){y.removeEventListener(l,p,!wn&&Au)}function va(y,l){if(l){if(l[0]===">"&&(l=l.substring(1)),y)try{if(y.matches)return y.matches(l);if(y.msMatchesSelector)return y.msMatchesSelector(l);if(y.webkitMatchesSelector)return y.webkitMatchesSelector(l)}catch{return!1}return!1}}function bh(y){return y.host&&y!==document&&y.host.nodeType?y.host:y.parentNode}function rn(y,l,p,v){if(y){p=p||document;do{if(l!=null&&(l[0]===">"?y.parentNode===p&&va(y,l):va(y,l))||v&&y===p)return y;if(y===p)break}while(y=bh(y))}return null}var Lu=/\s+/g;function Ar(y,l,p){if(y&&l)if(y.classList)y.classList[p?"add":"remove"](l);else{var v=(" "+y.className+" ").replace(Lu," ").replace(" "+l+" "," ");y.className=(v+(p?" "+l:"")).replace(Lu," ")}}function Rt(y,l,p){var v=y&&y.style;if(v){if(p===void 0)return document.defaultView&&document.defaultView.getComputedStyle?p=document.defaultView.getComputedStyle(y,""):y.currentStyle&&(p=y.currentStyle),l===void 0?p:p[l];!(l in v)&&l.indexOf("webkit")===-1&&(l="-webkit-"+l),v[l]=p+(typeof p=="string"?"":"px")}}function Ai(y,l){var p="";if(typeof y=="string")p=y;else do{var v=Rt(y,"transform");v&&v!=="none"&&(p=v+" "+p)}while(!l&&(y=y.parentNode));var k=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return k&&new k(p)}function Ru(y,l,p){if(y){var v=y.getElementsByTagName(l),k=0,C=v.length;if(p)for(;k<C;k++)p(v[k],k);return v}return[]}function nn(){var y=document.scrollingElement;return y||document.documentElement}function Ye(y,l,p,v,k){if(!(!y.getBoundingClientRect&&y!==window)){var C,m,O,r,b,g,w;if(y!==window&&y.parentNode&&y!==nn()?(C=y.getBoundingClientRect(),m=C.top,O=C.left,r=C.bottom,b=C.right,g=C.height,w=C.width):(m=0,O=0,r=window.innerHeight,b=window.innerWidth,g=window.innerHeight,w=window.innerWidth),(l||p)&&y!==window&&(k=k||y.parentNode,!wn))do if(k&&k.getBoundingClientRect&&(Rt(k,"transform")!=="none"||p&&Rt(k,"position")!=="static")){var x=k.getBoundingClientRect();m-=x.top+parseInt(Rt(k,"border-top-width")),O-=x.left+parseInt(Rt(k,"border-left-width")),r=m+C.height,b=O+C.width;break}while(k=k.parentNode);if(v&&y!==window){var j=Ai(k||y),E=j&&j.a,S=j&&j.d;j&&(m/=S,O/=E,w/=E,g/=S,r=m+g,b=O+w)}return{top:m,left:O,bottom:r,right:b,width:w,height:g}}}function Iu(y){var l=Ye(y),p=parseInt(Rt(y,"padding-left")),v=parseInt(Rt(y,"padding-top")),k=parseInt(Rt(y,"padding-right")),C=parseInt(Rt(y,"padding-bottom"));return l.top+=v+parseInt(Rt(y,"border-top-width")),l.left+=p+parseInt(Rt(y,"border-left-width")),l.width=y.clientWidth-p-k,l.height=y.clientHeight-v-C,l.bottom=l.top+l.height,l.right=l.left+l.width,l}function Bu(y,l,p){for(var v=Rn(y,!0),k=Ye(y)[l];v;){var C=Ye(v)[p],m=void 0;if(p==="top"||p==="left"?m=k>=C:m=k<=C,!m)return v;if(v===nn())break;v=Rn(v,!1)}return!1}function Li(y,l,p,v){for(var k=0,C=0,m=y.children;C<m.length;){if(m[C].style.display!=="none"&&m[C]!==Ft.ghost&&(v||m[C]!==Ft.dragged)&&rn(m[C],p.draggable,y,!1)){if(k===l)return m[C];k++}C++}return null}function Hs(y,l){for(var p=y.lastElementChild;p&&(p===Ft.ghost||Rt(p,"display")==="none"||l&&!va(p,l));)p=p.previousElementSibling;return p||null}function $r(y,l){var p=0;if(!y||!y.parentNode)return-1;for(;y=y.previousElementSibling;)y.nodeName.toUpperCase()!=="TEMPLATE"&&y!==Ft.clone&&(!l||va(y,l))&&p++;return p}function Du(y){var l=0,p=0,v=nn();if(y)do{var k=Ai(y),C=k.a,m=k.d;l+=y.scrollLeft*C,p+=y.scrollTop*m}while(y!==v&&(y=y.parentNode));return[l,p]}function vh(y,l){for(var p in y)if(y.hasOwnProperty(p)){for(var v in l)if(l.hasOwnProperty(v)&&l[v]===y[p][v])return Number(p)}return-1}function Rn(y,l){if(!y||!y.getBoundingClientRect)return nn();var p=y,v=!1;do if(p.clientWidth<p.scrollWidth||p.clientHeight<p.scrollHeight){var k=Rt(p);if(p.clientWidth<p.scrollWidth&&(k.overflowX=="auto"||k.overflowX=="scroll")||p.clientHeight<p.scrollHeight&&(k.overflowY=="auto"||k.overflowY=="scroll")){if(!p.getBoundingClientRect||p===document.body)return nn();if(v||l)return p;v=!0}}while(p=p.parentNode);return nn()}function gh(y,l){if(y&&l)for(var p in l)l.hasOwnProperty(p)&&(y[p]=l[p]);return y}function Fs(y,l){return Math.round(y.top)===Math.round(l.top)&&Math.round(y.left)===Math.round(l.left)&&Math.round(y.height)===Math.round(l.height)&&Math.round(y.width)===Math.round(l.width)}var Ho;function Nu(y,l){return function(){if(!Ho){var p=arguments,v=this;p.length===1?y.call(v,p[0]):y.apply(v,p),Ho=setTimeout(function(){Ho=void 0},l)}}}function wh(){clearTimeout(Ho),Ho=void 0}function $u(y,l,p){y.scrollLeft+=l,y.scrollTop+=p}function Mu(y){var l=window.Polymer,p=window.jQuery||window.Zepto;return l&&l.dom?l.dom(y).cloneNode(!0):p?p(y).clone(!0)[0]:y.cloneNode(!0)}var Lr="Sortable"+new Date().getTime();function _h(){var y=[],l;return{captureAnimationState:function(){if(y=[],!!this.options.animation){var v=[].slice.call(this.el.children);v.forEach(function(k){if(!(Rt(k,"display")==="none"||k===Ft.ghost)){y.push({target:k,rect:Ye(k)});var C=en({},y[y.length-1].rect);if(k.thisAnimationDuration){var m=Ai(k,!0);m&&(C.top-=m.f,C.left-=m.e)}k.fromRect=C}})}},addAnimationState:function(v){y.push(v)},removeAnimationState:function(v){y.splice(vh(y,{target:v}),1)},animateAll:function(v){var k=this;if(!this.options.animation){clearTimeout(l),typeof v=="function"&&v();return}var C=!1,m=0;y.forEach(function(O){var r=0,b=O.target,g=b.fromRect,w=Ye(b),x=b.prevFromRect,j=b.prevToRect,E=O.rect,S=Ai(b,!0);S&&(w.top-=S.f,w.left-=S.e),b.toRect=w,b.thisAnimationDuration&&Fs(x,w)&&!Fs(g,w)&&(E.top-w.top)/(E.left-w.left)===(g.top-w.top)/(g.left-w.left)&&(r=kh(E,x,j,k.options)),Fs(w,g)||(b.prevFromRect=g,b.prevToRect=w,r||(r=k.options.animation),k.animate(b,E,w,r)),r&&(C=!0,m=Math.max(m,r),clearTimeout(b.animationResetTimer),b.animationResetTimer=setTimeout(function(){b.animationTime=0,b.prevFromRect=null,b.fromRect=null,b.prevToRect=null,b.thisAnimationDuration=null},r),b.thisAnimationDuration=r)}),clearTimeout(l),C?l=setTimeout(function(){typeof v=="function"&&v()},m):typeof v=="function"&&v(),y=[]},animate:function(v,k,C,m){if(m){Rt(v,"transition",""),Rt(v,"transform","");var O=Ai(this.el),r=O&&O.a,b=O&&O.d,g=(k.left-C.left)/(r||1),w=(k.top-C.top)/(b||1);v.animatingX=!!g,v.animatingY=!!w,Rt(v,"transform","translate3d("+g+"px,"+w+"px,0)"),this.forRepaintDummy=xh(v),Rt(v,"transition","transform "+m+"ms"+(this.options.easing?" "+this.options.easing:"")),Rt(v,"transform","translate3d(0,0,0)"),typeof v.animated=="number"&&clearTimeout(v.animated),v.animated=setTimeout(function(){Rt(v,"transition",""),Rt(v,"transform",""),v.animated=!1,v.animatingX=!1,v.animatingY=!1},m)}}}}function xh(y){return y.offsetWidth}function kh(y,l,p,v){return Math.sqrt(Math.pow(l.top-y.top,2)+Math.pow(l.left-y.left,2))/Math.sqrt(Math.pow(l.top-p.top,2)+Math.pow(l.left-p.left,2))*v.animation}var Ri=[],Vs={initializeByDefault:!0},Fo={mount:function(l){for(var p in Vs)Vs.hasOwnProperty(p)&&!(p in l)&&(l[p]=Vs[p]);Ri.forEach(function(v){if(v.pluginName===l.pluginName)throw"Sortable: Cannot mount plugin ".concat(l.pluginName," more than once")}),Ri.push(l)},pluginEvent:function(l,p,v){var k=this;this.eventCanceled=!1,v.cancel=function(){k.eventCanceled=!0};var C=l+"Global";Ri.forEach(function(m){p[m.pluginName]&&(p[m.pluginName][C]&&p[m.pluginName][C](en({sortable:p},v)),p.options[m.pluginName]&&p[m.pluginName][l]&&p[m.pluginName][l](en({sortable:p},v)))})},initializePlugins:function(l,p,v,k){Ri.forEach(function(O){var r=O.pluginName;if(!(!l.options[r]&&!O.initializeByDefault)){var b=new O(l,p,l.options);b.sortable=l,b.options=l.options,l[r]=b,vn(v,b.defaults)}});for(var C in l.options)if(l.options.hasOwnProperty(C)){var m=this.modifyOption(l,C,l.options[C]);typeof m<"u"&&(l.options[C]=m)}},getEventProperties:function(l,p){var v={};return Ri.forEach(function(k){typeof k.eventProperties=="function"&&vn(v,k.eventProperties.call(p[k.pluginName],l))}),v},modifyOption:function(l,p,v){var k;return Ri.forEach(function(C){l[C.pluginName]&&C.optionListeners&&typeof C.optionListeners[p]=="function"&&(k=C.optionListeners[p].call(l[C.pluginName],v))}),k}};function Oh(y){var l=y.sortable,p=y.rootEl,v=y.name,k=y.targetEl,C=y.cloneEl,m=y.toEl,O=y.fromEl,r=y.oldIndex,b=y.newIndex,g=y.oldDraggableIndex,w=y.newDraggableIndex,x=y.originalEvent,j=y.putSortable,E=y.extraEventProperties;if(l=l||p&&p[Lr],!!l){var S,T=l.options,A="on"+v.charAt(0).toUpperCase()+v.substr(1);window.CustomEvent&&!wn&&!$o?S=new CustomEvent(v,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(v,!0,!0)),S.to=m||p,S.from=O||p,S.item=k||p,S.clone=C,S.oldIndex=r,S.newIndex=b,S.oldDraggableIndex=g,S.newDraggableIndex=w,S.originalEvent=x,S.pullMode=j?j.lastPutMode:void 0;var R=en(en({},E),Fo.getEventProperties(v,l));for(var I in R)S[I]=R[I];p&&p.dispatchEvent(S),T[A]&&T[A].call(l,S)}}var jh=["evt"],Or=function(l,p){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=v.evt,C=yh(v,jh);Fo.pluginEvent.bind(Ft)(l,p,en({dragEl:ht,parentEl:Ve,ghostEl:Yt,rootEl:Ie,nextEl:oi,lastDownEl:ga,cloneEl:De,cloneHidden:In,dragStarted:zo,putSortable:ir,activeSortable:Ft.active,originalEvent:k,oldIndex:Ii,oldDraggableIndex:Vo,newIndex:Rr,newDraggableIndex:Bn,hideGhostForTarget:Gu,unhideGhostForTarget:Wu,cloneNowHidden:function(){In=!0},cloneNowShown:function(){In=!1},dispatchSortableEvent:function(O){wr({sortable:p,name:O,originalEvent:k})}},C))};function wr(y){Oh(en({putSortable:ir,cloneEl:De,targetEl:ht,rootEl:Ie,oldIndex:Ii,oldDraggableIndex:Vo,newIndex:Rr,newDraggableIndex:Bn},y))}var ht,Ve,Yt,Ie,oi,ga,De,In,Ii,Rr,Vo,Bn,wa,ir,Bi=!1,_a=!1,xa=[],ai,qr,zs,Us,Hu,Fu,zo,Di,Uo,qo=!1,ka=!1,Oa,cr,qs=[],Gs=!1,ja=[],Ea=typeof document<"u",Ca=Pu,Vu=$o||wn?"cssFloat":"float",Eh=Ea&&!Tu&&!Pu&&"draggable"in document.createElement("div"),zu=function(){if(Ea){if(wn)return!1;var y=document.createElement("x");return y.style.cssText="pointer-events:auto",y.style.pointerEvents==="auto"}}(),Uu=function(l,p){var v=Rt(l),k=parseInt(v.width)-parseInt(v.paddingLeft)-parseInt(v.paddingRight)-parseInt(v.borderLeftWidth)-parseInt(v.borderRightWidth),C=Li(l,0,p),m=Li(l,1,p),O=C&&Rt(C),r=m&&Rt(m),b=O&&parseInt(O.marginLeft)+parseInt(O.marginRight)+Ye(C).width,g=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Ye(m).width;if(v.display==="flex")return v.flexDirection==="column"||v.flexDirection==="column-reverse"?"vertical":"horizontal";if(v.display==="grid")return v.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(C&&O.float&&O.float!=="none"){var w=O.float==="left"?"left":"right";return m&&(r.clear==="both"||r.clear===w)?"vertical":"horizontal"}return C&&(O.display==="block"||O.display==="flex"||O.display==="table"||O.display==="grid"||b>=k&&v[Vu]==="none"||m&&v[Vu]==="none"&&b+g>k)?"vertical":"horizontal"},Ch=function(l,p,v){var k=v?l.left:l.top,C=v?l.right:l.bottom,m=v?l.width:l.height,O=v?p.left:p.top,r=v?p.right:p.bottom,b=v?p.width:p.height;return k===O||C===r||k+m/2===O+b/2},Sh=function(l,p){var v;return xa.some(function(k){var C=k[Lr].options.emptyInsertThreshold;if(!(!C||Hs(k))){var m=Ye(k),O=l>=m.left-C&&l<=m.right+C,r=p>=m.top-C&&p<=m.bottom+C;if(O&&r)return v=k}}),v},qu=function(l){function p(C,m){return function(O,r,b,g){var w=O.options.group.name&&r.options.group.name&&O.options.group.name===r.options.group.name;if(C==null&&(m||w))return!0;if(C==null||C===!1)return!1;if(m&&C==="clone")return C;if(typeof C=="function")return p(C(O,r,b,g),m)(O,r,b,g);var x=(m?O:r).options.group.name;return C===!0||typeof C=="string"&&C===x||C.join&&C.indexOf(x)>-1}}var v={},k=l.group;(!k||ba(k)!="object")&&(k={name:k}),v.name=k.name,v.checkPull=p(k.pull,!0),v.checkPut=p(k.put),v.revertClone=k.revertClone,l.group=v},Gu=function(){!zu&&Yt&&Rt(Yt,"display","none")},Wu=function(){!zu&&Yt&&Rt(Yt,"display","")};Ea&&!Tu&&document.addEventListener("click",function(y){if(_a)return y.preventDefault(),y.stopPropagation&&y.stopPropagation(),y.stopImmediatePropagation&&y.stopImmediatePropagation(),_a=!1,!1},!0);var si=function(l){if(ht){l=l.touches?l.touches[0]:l;var p=Sh(l.clientX,l.clientY);if(p){var v={};for(var k in l)l.hasOwnProperty(k)&&(v[k]=l[k]);v.target=v.rootEl=p,v.preventDefault=void 0,v.stopPropagation=void 0,p[Lr]._onDragOver(v)}}},Ph=function(l){ht&&ht.parentNode[Lr]._isOutsideThisEl(l.target)};function Ft(y,l){if(!(y&&y.nodeType&&y.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(y));this.el=y,this.options=l=vn({},l),y[Lr]=this;var p={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(y.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Uu(y,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(m,O){m.setData("Text",O.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ft.supportPointer!==!1&&"PointerEvent"in window&&!Mo,emptyInsertThreshold:5};Fo.initializePlugins(this,y,p);for(var v in p)!(v in l)&&(l[v]=p[v]);qu(l);for(var k in this)k.charAt(0)==="_"&&typeof this[k]=="function"&&(this[k]=this[k].bind(this));this.nativeDraggable=l.forceFallback?!1:Eh,this.nativeDraggable&&(this.options.touchStartThreshold=1),l.supportPointer?be(y,"pointerdown",this._onTapStart):(be(y,"mousedown",this._onTapStart),be(y,"touchstart",this._onTapStart)),this.nativeDraggable&&(be(y,"dragover",this),be(y,"dragenter",this)),xa.push(this.el),l.store&&l.store.get&&this.sort(l.store.get(this)||[]),vn(this,_h())}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(l){!this.el.contains(l)&&l!==this.el&&(Di=null)},_getDirection:function(l,p){return typeof this.options.direction=="function"?this.options.direction.call(this,l,p,ht):this.options.direction},_onTapStart:function(l){if(l.cancelable){var p=this,v=this.el,k=this.options,C=k.preventOnFilter,m=l.type,O=l.touches&&l.touches[0]||l.pointerType&&l.pointerType==="touch"&&l,r=(O||l).target,b=l.target.shadowRoot&&(l.path&&l.path[0]||l.composedPath&&l.composedPath()[0])||r,g=k.filter;if(Nh(v),!ht&&!(/mousedown|pointerdown/.test(m)&&l.button!==0||k.disabled)&&!b.isContentEditable&&!(!this.nativeDraggable&&Mo&&r&&r.tagName.toUpperCase()==="SELECT")&&(r=rn(r,k.draggable,v,!1),!(r&&r.animated)&&ga!==r)){if(Ii=$r(r),Vo=$r(r,k.draggable),typeof g=="function"){if(g.call(this,l,r,this)){wr({sortable:p,rootEl:b,name:"filter",targetEl:r,toEl:v,fromEl:v}),Or("filter",p,{evt:l}),C&&l.cancelable&&l.preventDefault();return}}else if(g&&(g=g.split(",").some(function(w){if(w=rn(b,w.trim(),v,!1),w)return wr({sortable:p,rootEl:w,name:"filter",targetEl:r,fromEl:v,toEl:v}),Or("filter",p,{evt:l}),!0}),g)){C&&l.cancelable&&l.preventDefault();return}k.handle&&!rn(b,k.handle,v,!1)||this._prepareDragStart(l,O,r)}}},_prepareDragStart:function(l,p,v){var k=this,C=k.el,m=k.options,O=C.ownerDocument,r;if(v&&!ht&&v.parentNode===C){var b=Ye(v);if(Ie=C,ht=v,Ve=ht.parentNode,oi=ht.nextSibling,ga=v,wa=m.group,Ft.dragged=ht,ai={target:ht,clientX:(p||l).clientX,clientY:(p||l).clientY},Hu=ai.clientX-b.left,Fu=ai.clientY-b.top,this._lastX=(p||l).clientX,this._lastY=(p||l).clientY,ht.style["will-change"]="all",r=function(){if(Or("delayEnded",k,{evt:l}),Ft.eventCanceled){k._onDrop();return}k._disableDelayedDragEvents(),!Su&&k.nativeDraggable&&(ht.draggable=!0),k._triggerDragStart(l,p),wr({sortable:k,name:"choose",originalEvent:l}),Ar(ht,m.chosenClass,!0)},m.ignore.split(",").forEach(function(g){Ru(ht,g.trim(),Ws)}),be(O,"dragover",si),be(O,"mousemove",si),be(O,"touchmove",si),be(O,"mouseup",k._onDrop),be(O,"touchend",k._onDrop),be(O,"touchcancel",k._onDrop),Su&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ht.draggable=!0),Or("delayStart",this,{evt:l}),m.delay&&(!m.delayOnTouchOnly||p)&&(!this.nativeDraggable||!($o||wn))){if(Ft.eventCanceled){this._onDrop();return}be(O,"mouseup",k._disableDelayedDrag),be(O,"touchend",k._disableDelayedDrag),be(O,"touchcancel",k._disableDelayedDrag),be(O,"mousemove",k._delayedDragTouchMoveHandler),be(O,"touchmove",k._delayedDragTouchMoveHandler),m.supportPointer&&be(O,"pointermove",k._delayedDragTouchMoveHandler),k._dragStartTimer=setTimeout(r,m.delay)}else r()}},_delayedDragTouchMoveHandler:function(l){var p=l.touches?l.touches[0]:l;Math.max(Math.abs(p.clientX-this._lastX),Math.abs(p.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ht&&Ws(ht),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var l=this.el.ownerDocument;he(l,"mouseup",this._disableDelayedDrag),he(l,"touchend",this._disableDelayedDrag),he(l,"touchcancel",this._disableDelayedDrag),he(l,"mousemove",this._delayedDragTouchMoveHandler),he(l,"touchmove",this._delayedDragTouchMoveHandler),he(l,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(l,p){p=p||l.pointerType=="touch"&&l,!this.nativeDraggable||p?this.options.supportPointer?be(document,"pointermove",this._onTouchMove):p?be(document,"touchmove",this._onTouchMove):be(document,"mousemove",this._onTouchMove):(be(ht,"dragend",this),be(Ie,"dragstart",this._onDragStart));try{document.selection?Pa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(l,p){if(Bi=!1,Ie&&ht){Or("dragStarted",this,{evt:p}),this.nativeDraggable&&be(document,"dragover",Ph);var v=this.options;!l&&Ar(ht,v.dragClass,!1),Ar(ht,v.ghostClass,!0),Ft.active=this,l&&this._appendGhost(),wr({sortable:this,name:"start",originalEvent:p})}else this._nulling()},_emulateDragOver:function(){if(qr){this._lastX=qr.clientX,this._lastY=qr.clientY,Gu();for(var l=document.elementFromPoint(qr.clientX,qr.clientY),p=l;l&&l.shadowRoot&&(l=l.shadowRoot.elementFromPoint(qr.clientX,qr.clientY),l!==p);)p=l;if(ht.parentNode[Lr]._isOutsideThisEl(l),p)do{if(p[Lr]){var v=void 0;if(v=p[Lr]._onDragOver({clientX:qr.clientX,clientY:qr.clientY,target:l,rootEl:p}),v&&!this.options.dragoverBubble)break}l=p}while(p=p.parentNode);Wu()}},_onTouchMove:function(l){if(ai){var p=this.options,v=p.fallbackTolerance,k=p.fallbackOffset,C=l.touches?l.touches[0]:l,m=Yt&&Ai(Yt,!0),O=Yt&&m&&m.a,r=Yt&&m&&m.d,b=Ca&&cr&&Du(cr),g=(C.clientX-ai.clientX+k.x)/(O||1)+(b?b[0]-qs[0]:0)/(O||1),w=(C.clientY-ai.clientY+k.y)/(r||1)+(b?b[1]-qs[1]:0)/(r||1);if(!Ft.active&&!Bi){if(v&&Math.max(Math.abs(C.clientX-this._lastX),Math.abs(C.clientY-this._lastY))<v)return;this._onDragStart(l,!0)}if(Yt){m?(m.e+=g-(zs||0),m.f+=w-(Us||0)):m={a:1,b:0,c:0,d:1,e:g,f:w};var x="matrix(".concat(m.a,",").concat(m.b,",").concat(m.c,",").concat(m.d,",").concat(m.e,",").concat(m.f,")");Rt(Yt,"webkitTransform",x),Rt(Yt,"mozTransform",x),Rt(Yt,"msTransform",x),Rt(Yt,"transform",x),zs=g,Us=w,qr=C}l.cancelable&&l.preventDefault()}},_appendGhost:function(){if(!Yt){var l=this.options.fallbackOnBody?document.body:Ie,p=Ye(ht,!0,Ca,!0,l),v=this.options;if(Ca){for(cr=l;Rt(cr,"position")==="static"&&Rt(cr,"transform")==="none"&&cr!==document;)cr=cr.parentNode;cr!==document.body&&cr!==document.documentElement?(cr===document&&(cr=nn()),p.top+=cr.scrollTop,p.left+=cr.scrollLeft):cr=nn(),qs=Du(cr)}Yt=ht.cloneNode(!0),Ar(Yt,v.ghostClass,!1),Ar(Yt,v.fallbackClass,!0),Ar(Yt,v.dragClass,!0),Rt(Yt,"transition",""),Rt(Yt,"transform",""),Rt(Yt,"box-sizing","border-box"),Rt(Yt,"margin",0),Rt(Yt,"top",p.top),Rt(Yt,"left",p.left),Rt(Yt,"width",p.width),Rt(Yt,"height",p.height),Rt(Yt,"opacity","0.8"),Rt(Yt,"position",Ca?"absolute":"fixed"),Rt(Yt,"zIndex","100000"),Rt(Yt,"pointerEvents","none"),Ft.ghost=Yt,l.appendChild(Yt),Rt(Yt,"transform-origin",Hu/parseInt(Yt.style.width)*100+"% "+Fu/parseInt(Yt.style.height)*100+"%")}},_onDragStart:function(l,p){var v=this,k=l.dataTransfer,C=v.options;if(Or("dragStart",this,{evt:l}),Ft.eventCanceled){this._onDrop();return}Or("setupClone",this),Ft.eventCanceled||(De=Mu(ht),De.removeAttribute("id"),De.draggable=!1,De.style["will-change"]="",this._hideClone(),Ar(De,this.options.chosenClass,!1),Ft.clone=De),v.cloneId=Pa(function(){Or("clone",v),!Ft.eventCanceled&&(v.options.removeCloneOnHide||Ie.insertBefore(De,ht),v._hideClone(),wr({sortable:v,name:"clone"}))}),!p&&Ar(ht,C.dragClass,!0),p?(_a=!0,v._loopId=setInterval(v._emulateDragOver,50)):(he(document,"mouseup",v._onDrop),he(document,"touchend",v._onDrop),he(document,"touchcancel",v._onDrop),k&&(k.effectAllowed="move",C.setData&&C.setData.call(v,k,ht)),be(document,"drop",v),Rt(ht,"transform","translateZ(0)")),Bi=!0,v._dragStartId=Pa(v._dragStarted.bind(v,p,l)),be(document,"selectstart",v),zo=!0,Mo&&Rt(document.body,"user-select","none")},_onDragOver:function(l){var p=this.el,v=l.target,k,C,m,O=this.options,r=O.group,b=Ft.active,g=wa===r,w=O.sort,x=ir||b,j,E=this,S=!1;if(Gs)return;function T(mt,ut){Or(mt,E,en({evt:l,isOwner:g,axis:j?"vertical":"horizontal",revert:m,dragRect:k,targetRect:C,canSort:w,fromSortable:x,target:v,completed:R,onMove:function(At,Vt){return Sa(Ie,p,ht,k,At,Ye(At),l,Vt)},changed:I},ut))}function A(){T("dragOverAnimationCapture"),E.captureAnimationState(),E!==x&&x.captureAnimationState()}function R(mt){return T("dragOverCompleted",{insertion:mt}),mt&&(g?b._hideClone():b._showClone(E),E!==x&&(Ar(ht,ir?ir.options.ghostClass:b.options.ghostClass,!1),Ar(ht,O.ghostClass,!0)),ir!==E&&E!==Ft.active?ir=E:E===Ft.active&&ir&&(ir=null),x===E&&(E._ignoreWhileAnimating=v),E.animateAll(function(){T("dragOverAnimationComplete"),E._ignoreWhileAnimating=null}),E!==x&&(x.animateAll(),x._ignoreWhileAnimating=null)),(v===ht&&!ht.animated||v===p&&!v.animated)&&(Di=null),!O.dragoverBubble&&!l.rootEl&&v!==document&&(ht.parentNode[Lr]._isOutsideThisEl(l.target),!mt&&si(l)),!O.dragoverBubble&&l.stopPropagation&&l.stopPropagation(),S=!0}function I(){Rr=$r(ht),Bn=$r(ht,O.draggable),wr({sortable:E,name:"change",toEl:p,newIndex:Rr,newDraggableIndex:Bn,originalEvent:l})}if(l.preventDefault!==void 0&&l.cancelable&&l.preventDefault(),v=rn(v,O.draggable,p,!0),T("dragOver"),Ft.eventCanceled)return S;if(ht.contains(l.target)||v.animated&&v.animatingX&&v.animatingY||E._ignoreWhileAnimating===v)return R(!1);if(_a=!1,b&&!O.disabled&&(g?w||(m=Ve!==Ie):ir===this||(this.lastPutMode=wa.checkPull(this,b,ht,l))&&r.checkPut(this,b,ht,l))){if(j=this._getDirection(l,v)==="vertical",k=Ye(ht),T("dragOverValid"),Ft.eventCanceled)return S;if(m)return Ve=Ie,A(),this._hideClone(),T("revert"),Ft.eventCanceled||(oi?Ie.insertBefore(ht,oi):Ie.appendChild(ht)),R(!0);var $=Hs(p,O.draggable);if(!$||Rh(l,j,this)&&!$.animated){if($===ht)return R(!1);if($&&p===l.target&&(v=$),v&&(C=Ye(v)),Sa(Ie,p,ht,k,v,C,l,!!v)!==!1)return A(),$&&$.nextSibling?p.insertBefore(ht,$.nextSibling):p.appendChild(ht),Ve=p,I(),R(!0)}else if($&&Lh(l,j,this)){var M=Li(p,0,O,!0);if(M===ht)return R(!1);if(v=M,C=Ye(v),Sa(Ie,p,ht,k,v,C,l,!1)!==!1)return A(),p.insertBefore(ht,M),Ve=p,I(),R(!0)}else if(v.parentNode===p){C=Ye(v);var B=0,q,F=ht.parentNode!==p,N=!Ch(ht.animated&&ht.toRect||k,v.animated&&v.toRect||C,j),U=j?"top":"left",H=Bu(v,"top","top")||Bu(ht,"top","top"),X=H?H.scrollTop:void 0;Di!==v&&(q=C[U],qo=!1,ka=!N&&O.invertSwap||F),B=Ih(l,v,C,j,N?1:O.swapThreshold,O.invertedSwapThreshold==null?O.swapThreshold:O.invertedSwapThreshold,ka,Di===v);var Y;if(B!==0){var Q=$r(ht);do Q-=B,Y=Ve.children[Q];while(Y&&(Rt(Y,"display")==="none"||Y===Yt))}if(B===0||Y===v)return R(!1);Di=v,Uo=B;var tt=v.nextElementSibling,it=!1;it=B===1;var st=Sa(Ie,p,ht,k,v,C,l,it);if(st!==!1)return(st===1||st===-1)&&(it=st===1),Gs=!0,setTimeout(Ah,30),A(),it&&!tt?p.appendChild(ht):v.parentNode.insertBefore(ht,it?tt:v),H&&$u(H,0,X-H.scrollTop),Ve=ht.parentNode,q!==void 0&&!ka&&(Oa=Math.abs(q-Ye(v)[U])),I(),R(!0)}if(p.contains(ht))return R(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){he(document,"mousemove",this._onTouchMove),he(document,"touchmove",this._onTouchMove),he(document,"pointermove",this._onTouchMove),he(document,"dragover",si),he(document,"mousemove",si),he(document,"touchmove",si)},_offUpEvents:function(){var l=this.el.ownerDocument;he(l,"mouseup",this._onDrop),he(l,"touchend",this._onDrop),he(l,"pointerup",this._onDrop),he(l,"touchcancel",this._onDrop),he(document,"selectstart",this)},_onDrop:function(l){var p=this.el,v=this.options;if(Rr=$r(ht),Bn=$r(ht,v.draggable),Or("drop",this,{evt:l}),Ve=ht&&ht.parentNode,Rr=$r(ht),Bn=$r(ht,v.draggable),Ft.eventCanceled){this._nulling();return}Bi=!1,ka=!1,qo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zs(this.cloneId),Zs(this._dragStartId),this.nativeDraggable&&(he(document,"drop",this),he(p,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Mo&&Rt(document.body,"user-select",""),Rt(ht,"transform",""),l&&(zo&&(l.cancelable&&l.preventDefault(),!v.dropBubble&&l.stopPropagation()),Yt&&Yt.parentNode&&Yt.parentNode.removeChild(Yt),(Ie===Ve||ir&&ir.lastPutMode!=="clone")&&De&&De.parentNode&&De.parentNode.removeChild(De),ht&&(this.nativeDraggable&&he(ht,"dragend",this),Ws(ht),ht.style["will-change"]="",zo&&!Bi&&Ar(ht,ir?ir.options.ghostClass:this.options.ghostClass,!1),Ar(ht,this.options.chosenClass,!1),wr({sortable:this,name:"unchoose",toEl:Ve,newIndex:null,newDraggableIndex:null,originalEvent:l}),Ie!==Ve?(Rr>=0&&(wr({rootEl:Ve,name:"add",toEl:Ve,fromEl:Ie,originalEvent:l}),wr({sortable:this,name:"remove",toEl:Ve,originalEvent:l}),wr({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Ie,originalEvent:l}),wr({sortable:this,name:"sort",toEl:Ve,originalEvent:l})),ir&&ir.save()):Rr!==Ii&&Rr>=0&&(wr({sortable:this,name:"update",toEl:Ve,originalEvent:l}),wr({sortable:this,name:"sort",toEl:Ve,originalEvent:l})),Ft.active&&((Rr==null||Rr===-1)&&(Rr=Ii,Bn=Vo),wr({sortable:this,name:"end",toEl:Ve,originalEvent:l}),this.save()))),this._nulling()},_nulling:function(){Or("nulling",this),Ie=ht=Ve=Yt=oi=De=ga=In=ai=qr=zo=Rr=Bn=Ii=Vo=Di=Uo=ir=wa=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,ja.forEach(function(l){l.checked=!0}),ja.length=zs=Us=0},handleEvent:function(l){switch(l.type){case"drop":case"dragend":this._onDrop(l);break;case"dragenter":case"dragover":ht&&(this._onDragOver(l),Th(l));break;case"selectstart":l.preventDefault();break}},toArray:function(){for(var l=[],p,v=this.el.children,k=0,C=v.length,m=this.options;k<C;k++)p=v[k],rn(p,m.draggable,this.el,!1)&&l.push(p.getAttribute(m.dataIdAttr)||Dh(p));return l},sort:function(l,p){var v={},k=this.el;this.toArray().forEach(function(C,m){var O=k.children[m];rn(O,this.options.draggable,k,!1)&&(v[C]=O)},this),p&&this.captureAnimationState(),l.forEach(function(C){v[C]&&(k.removeChild(v[C]),k.appendChild(v[C]))}),p&&this.animateAll()},save:function(){var l=this.options.store;l&&l.set&&l.set(this)},closest:function(l,p){return rn(l,p||this.options.draggable,this.el,!1)},option:function(l,p){var v=this.options;if(p===void 0)return v[l];var k=Fo.modifyOption(this,l,p);typeof k<"u"?v[l]=k:v[l]=p,l==="group"&&qu(v)},destroy:function(){Or("destroy",this);var l=this.el;l[Lr]=null,he(l,"mousedown",this._onTapStart),he(l,"touchstart",this._onTapStart),he(l,"pointerdown",this._onTapStart),this.nativeDraggable&&(he(l,"dragover",this),he(l,"dragenter",this)),Array.prototype.forEach.call(l.querySelectorAll("[draggable]"),function(p){p.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xa.splice(xa.indexOf(this.el),1),this.el=l=null},_hideClone:function(){if(!In){if(Or("hideClone",this),Ft.eventCanceled)return;Rt(De,"display","none"),this.options.removeCloneOnHide&&De.parentNode&&De.parentNode.removeChild(De),In=!0}},_showClone:function(l){if(l.lastPutMode!=="clone"){this._hideClone();return}if(In){if(Or("showClone",this),Ft.eventCanceled)return;ht.parentNode==Ie&&!this.options.group.revertClone?Ie.insertBefore(De,ht):oi?Ie.insertBefore(De,oi):Ie.appendChild(De),this.options.group.revertClone&&this.animate(ht,De),Rt(De,"display",""),In=!1}}};function Th(y){y.dataTransfer&&(y.dataTransfer.dropEffect="move"),y.cancelable&&y.preventDefault()}function Sa(y,l,p,v,k,C,m,O){var r,b=y[Lr],g=b.options.onMove,w;return window.CustomEvent&&!wn&&!$o?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=l,r.from=y,r.dragged=p,r.draggedRect=v,r.related=k||l,r.relatedRect=C||Ye(l),r.willInsertAfter=O,r.originalEvent=m,y.dispatchEvent(r),g&&(w=g.call(b,r,m)),w}function Ws(y){y.draggable=!1}function Ah(){Gs=!1}function Lh(y,l,p){var v=Ye(Li(p.el,0,p.options,!0)),k=Iu(p.el),C=10;return l?y.clientX<k.left-C||y.clientY<v.top&&y.clientX<v.right:y.clientY<k.top-C||y.clientY<v.bottom&&y.clientX<v.left}function Rh(y,l,p){var v=Ye(Hs(p.el,p.options.draggable)),k=Iu(p.el),C=10;return l?y.clientX>k.right+C||y.clientY>v.bottom&&y.clientX>v.left:y.clientY>k.bottom+C||y.clientX>v.right&&y.clientY>v.top}function Ih(y,l,p,v,k,C,m,O){var r=v?y.clientY:y.clientX,b=v?p.height:p.width,g=v?p.top:p.left,w=v?p.bottom:p.right,x=!1;if(!m){if(O&&Oa<b*k){if(!qo&&(Uo===1?r>g+b*C/2:r<w-b*C/2)&&(qo=!0),qo)x=!0;else if(Uo===1?r<g+Oa:r>w-Oa)return-Uo}else if(r>g+b*(1-k)/2&&r<w-b*(1-k)/2)return Bh(l)}return x=x||m,x&&(r<g+b*C/2||r>w-b*C/2)?r>g+b/2?1:-1:0}function Bh(y){return $r(ht)<$r(y)?1:-1}function Dh(y){for(var l=y.tagName+y.className+y.src+y.href+y.textContent,p=l.length,v=0;p--;)v+=l.charCodeAt(p);return v.toString(36)}function Nh(y){ja.length=0;for(var l=y.getElementsByTagName("input"),p=l.length;p--;){var v=l[p];v.checked&&ja.push(v)}}function Pa(y){return setTimeout(y,0)}function Zs(y){return clearTimeout(y)}Ea&&be(document,"touchmove",function(y){(Ft.active||Bi)&&y.cancelable&&y.preventDefault()}),Ft.utils={on:be,off:he,css:Rt,find:Ru,is:function(l,p){return!!rn(l,p,l,!1)},extend:gh,throttle:Nu,closest:rn,toggleClass:Ar,clone:Mu,index:$r,nextTick:Pa,cancelNextTick:Zs,detectDirection:Uu,getChild:Li},Ft.get=function(y){return y[Lr]},Ft.mount=function(){for(var y=arguments.length,l=new Array(y),p=0;p<y;p++)l[p]=arguments[p];l[0].constructor===Array&&(l=l[0]),l.forEach(function(v){if(!v.prototype||!v.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(v));v.utils&&(Ft.utils=en(en({},Ft.utils),v.utils)),Fo.mount(v)})},Ft.create=function(y,l){return new Ft(y,l)},Ft.version=mh;var Xe=[],Go,Js,Ys=!1,Xs,Qs,Ta,Wo;function $h(){function y(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this))}return y.prototype={dragStarted:function(p){var v=p.originalEvent;this.sortable.nativeDraggable?be(document,"dragover",this._handleAutoScroll):this.options.supportPointer?be(document,"pointermove",this._handleFallbackAutoScroll):v.touches?be(document,"touchmove",this._handleFallbackAutoScroll):be(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(p){var v=p.originalEvent;!this.options.dragOverBubble&&!v.rootEl&&this._handleAutoScroll(v)},drop:function(){this.sortable.nativeDraggable?he(document,"dragover",this._handleAutoScroll):(he(document,"pointermove",this._handleFallbackAutoScroll),he(document,"touchmove",this._handleFallbackAutoScroll),he(document,"mousemove",this._handleFallbackAutoScroll)),Zu(),Aa(),wh()},nulling:function(){Ta=Js=Go=Ys=Wo=Xs=Qs=null,Xe.length=0},_handleFallbackAutoScroll:function(p){this._handleAutoScroll(p,!0)},_handleAutoScroll:function(p,v){var k=this,C=(p.touches?p.touches[0]:p).clientX,m=(p.touches?p.touches[0]:p).clientY,O=document.elementFromPoint(C,m);if(Ta=p,v||this.options.forceAutoScrollFallback||$o||wn||Mo){Ks(p,this.options,O,v);var r=Rn(O,!0);Ys&&(!Wo||C!==Xs||m!==Qs)&&(Wo&&Zu(),Wo=setInterval(function(){var b=Rn(document.elementFromPoint(C,m),!0);b!==r&&(r=b,Aa()),Ks(p,k.options,b,v)},10),Xs=C,Qs=m)}else{if(!this.options.bubbleScroll||Rn(O,!0)===nn()){Aa();return}Ks(p,this.options,Rn(O,!1),!1)}}},vn(y,{pluginName:"scroll",initializeByDefault:!0})}function Aa(){Xe.forEach(function(y){clearInterval(y.pid)}),Xe=[]}function Zu(){clearInterval(Wo)}var Ks=Nu(function(y,l,p,v){if(l.scroll){var k=(y.touches?y.touches[0]:y).clientX,C=(y.touches?y.touches[0]:y).clientY,m=l.scrollSensitivity,O=l.scrollSpeed,r=nn(),b=!1,g;Js!==p&&(Js=p,Aa(),Go=l.scroll,g=l.scrollFn,Go===!0&&(Go=Rn(p,!0)));var w=0,x=Go;do{var j=x,E=Ye(j),S=E.top,T=E.bottom,A=E.left,R=E.right,I=E.width,$=E.height,M=void 0,B=void 0,q=j.scrollWidth,F=j.scrollHeight,N=Rt(j),U=j.scrollLeft,H=j.scrollTop;j===r?(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"));var X=M&&(Math.abs(R-k)<=m&&U+I<q)-(Math.abs(A-k)<=m&&!!U),Y=B&&(Math.abs(T-C)<=m&&H+$<F)-(Math.abs(S-C)<=m&&!!H);if(!Xe[w])for(var Q=0;Q<=w;Q++)Xe[Q]||(Xe[Q]={});(Xe[w].vx!=X||Xe[w].vy!=Y||Xe[w].el!==j)&&(Xe[w].el=j,Xe[w].vx=X,Xe[w].vy=Y,clearInterval(Xe[w].pid),(X!=0||Y!=0)&&(b=!0,Xe[w].pid=setInterval((function(){v&&this.layer===0&&Ft.active._onTouchMove(Ta);var tt=Xe[this.layer].vy?Xe[this.layer].vy*O:0,it=Xe[this.layer].vx?Xe[this.layer].vx*O:0;typeof g=="function"&&g.call(Ft.dragged.parentNode[Lr],it,tt,y,Ta,Xe[this.layer].el)!=="continue"||$u(Xe[this.layer].el,it,tt)}).bind({layer:w}),24))),w++}while(l.bubbleScroll&&x!==r&&(x=Rn(x,!1)));Ys=b}},30),Ju=function(l){var p=l.originalEvent,v=l.putSortable,k=l.dragEl,C=l.activeSortable,m=l.dispatchSortableEvent,O=l.hideGhostForTarget,r=l.unhideGhostForTarget;if(p){var b=v||C;O();var g=p.changedTouches&&p.changedTouches.length?p.changedTouches[0]:p,w=document.elementFromPoint(g.clientX,g.clientY);r(),b&&!b.el.contains(w)&&(m("spill"),this.onSpill({dragEl:k,putSortable:v}))}};function tl(){}tl.prototype={startIndex:null,dragStart:function(l){var p=l.oldDraggableIndex;this.startIndex=p},onSpill:function(l){var p=l.dragEl,v=l.putSortable;this.sortable.captureAnimationState(),v&&v.captureAnimationState();var k=Li(this.sortable.el,this.startIndex,this.options);k?this.sortable.el.insertBefore(p,k):this.sortable.el.appendChild(p),this.sortable.animateAll(),v&&v.animateAll()},drop:Ju},vn(tl,{pluginName:"revertOnSpill"});function el(){}el.prototype={onSpill:function(l){var p=l.dragEl,v=l.putSortable,k=v||this.sortable;k.captureAnimationState(),p.parentNode&&p.parentNode.removeChild(p),k.animateAll()},drop:Ju},vn(el,{pluginName:"removeOnSpill"}),Ft.mount(new $h),Ft.mount(el,tl);/**
|
|
35
|
+
*/const Pc=(m,s,p)=>{const b=new Map;for(let _=s;_<=p;_++)b.set(m[_],_);return b},vh=Hs(class extends Fs{constructor(m){if(super(m),m.type!==Ln.CHILD)throw Error("repeat() can only be used in text expressions")}ht(m,s,p){let b;p===void 0?p=s:s!==void 0&&(b=s);const _=[],E=[];let y=0;for(const j of m)_[y]=b?b(j,y):y,E[y]=p(j,y),y++;return{values:E,keys:_}}render(m,s,p){return this.ht(m,s,p).values}update(m,[s,p,b]){const _=bh(m),{values:E,keys:y}=this.ht(s,p,b);if(!Array.isArray(_))return this.dt=y,E;const j=this.dt??(this.dt=[]),r=[];let v,g,w=0,k=_.length-1,O=0,C=E.length-1;for(;w<=k&&O<=C;)if(_[w]===null)w++;else if(_[k]===null)k--;else if(j[w]===y[O])r[O]=ii(_[w],E[O]),w++,O++;else if(j[k]===y[C])r[C]=ii(_[k],E[C]),k--,C--;else if(j[w]===y[C])r[C]=ii(_[w],E[C]),No(m,r[C+1],_[w]),w++,C--;else if(j[k]===y[O])r[O]=ii(_[k],E[O]),No(m,_[w],_[k]),k--,O++;else if(v===void 0&&(v=Pc(y,O,C),g=Pc(j,w,k)),v.has(j[w]))if(v.has(j[k])){const S=g.get(y[O]),T=S!==void 0?_[S]:null;if(T===null){const A=No(m,_[w]);ii(A,E[O]),r[O]=A}else r[O]=ii(T,E[O]),No(m,_[w],T),_[S]=null;O++}else Vs(_[k]),k--;else Vs(_[w]),w++;for(;O<=C;){const S=No(m,r[C+1]);ii(S,E[O]),r[O++]=S}for(;w<=k;){const S=_[w++];S!==null&&Vs(S)}return this.dt=y,Sc(m,r),Nr}});/**
|
|
41
36
|
* wms-capabilities @0.6.0
|
|
42
37
|
* @description WMS service Capabilities > JSON, based on openlayers
|
|
43
38
|
* @license BSD-2-Clause
|
|
44
39
|
* @preserve
|
|
45
|
-
*/var ie=y=>y!==void 0,Yu=(y,l,p)=>l in y?y[l]:y[l]=p;const Zo={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class Mh{constructor(l){this._parser=new l}toDocument(l){return this._parser.parseFromString(l,"application/xml")}getAllTextContent(l,p){return La(l,p).join("")}}function La(y,l){return Xu(y,l,[]).join("")}function Xu(y,l,p){if(y.nodeType===Zo.CDATA_SECTION||y.nodeType===Zo.TEXT)l?p.push(String(y.nodeValue).replace(/(\r\n|\r|\n)/g,"")):p.push(y.nodeValue);else{var v;for(v=y.firstChild;v;v=v.nextSibling)Xu(v,l,p)}return p}function Hh(y,l,p,v){for(var k=Fh(l);k;k=Vh(k)){var C=k.namespaceURI||null,m=y[C];if(ie(m)){var O=m[k.localName];ie(O)&&O.call(v,k,p)}}}function Fh(y){let l=y.firstElementChild||y.firstChild;for(;l&&l.nodeType!==Zo.ELEMENT;)l=l.nextSibling;return l}function Vh(y){let l=y.nextElementSibling||y.nextSibling;for(;l&&l.nodeType!==Zo.ELEMENT;)l=l.nextSibling;return l}function or(y,l,p){return zh(y,l,p)}function zh(y,l,p){var v=ie(p)?p:{},k,C;for(k=0,C=y.length;k<C;++k)v[y[k]]=l;return v}function Qu(y,l){return function(p,v){var k=y.call(ie(l)?l:this,p,v);if(ie(k)){var C=v[v.length-1];C.push(k)}}}function rr(y,l,p,v,k){return v.push(y),Hh(l,p,v,k),v.pop()}function Pt(y,l,p){return function(v,k){let C=y.call(ie(p)?p:this,v,k);if(ie(C)){var m=k[k.length-1],O=ie(l)?l:v.localName;m[O]=C}}}function jr(y,l,p){return function(v,k){var C=y.call(ie(p)?p:this,v,k);if(ie(C)){var m=k[k.length-1],O=ie(l)?l:v.localName,r=Yu(m,O,[]);r.push(C)}}}const Uh=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function qh(y){return y.replace(Uh,"")}function li(y){const l=/^\s*(true|1)|(false|0)\s*$/.exec(y);if(l)return ie(l[1])||!1}function Ni(y){return _n(La(y,!1))}function _n(y){const l=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(y);if(l)return parseFloat(l[1])}function rl(y){return Ra(La(y,!1))}function Ra(y){const l=/^\s*(\d+)\s*$/.exec(y);if(l)return parseInt(l[1],10)}function pe(y){return qh(La(y,!1))}const Gh="http://www.w3.org/1999/xlink";function nl(y){return y.getAttributeNS(Gh,"href")}function Wh(y,l){return rr({},wd,y,l)}function Ku(y){return[_n(y.getAttribute("minx")),_n(y.getAttribute("miny")),_n(y.getAttribute("maxx")),_n(y.getAttribute("maxy"))]}function Zh(y,l){const p=Ku(y),v=[_n(y.getAttribute("resx")),_n(y.getAttribute("resy"))];return{crs:y.getAttribute("CRS")||y.getAttribute("SRS"),extent:p,res:v}}function Jh(y,l){const p=Ku(y);if(!(!ie(p[0])||!ie(p[1])||!ie(p[2])||!ie(p[3])))return p}function Yh(y,l){const p=parseFloat(y.getAttribute("min")),v=parseFloat(y.getAttribute("max"));return{min:p,max:v}}function Xh(y,l){const p=rr({},_d,y,l);if(!ie(p))return;const v=p.westBoundLongitude,k=p.southBoundLatitude,C=p.eastBoundLongitude,m=p.northBoundLatitude;if(!(!ie(v)||!ie(k)||!ie(C)||!ie(m)))return[v,k,C,m]}function Qh(y,l){return rr({},fd,y,l)}function Kh(y,l){return rr({},yd,y,l)}function td(y,l){return rr({},md,y,l)}function ed(y,l){return rr({},bd,y,l)}function rd(y,l){return rr({},vd,y,l)}function nd(y,l){return rr([],gd,y,l)}function id(y,l){const p=li(y.getAttribute("queryable"));return rr({queryable:ie(p)?p:!1},rc,y,l)}function od(y,l){var p=l[l.length-1];const v=rr({},rc,y,l);if(!ie(v))return;let k=li(y.getAttribute("queryable"));ie(k)||(k=p.queryable),v.queryable=ie(k)?k:!1;let C=Ra(y.getAttribute("cascaded"));ie(C)||(C=p.cascaded),v.cascaded=C;let m=li(y.getAttribute("opaque"));ie(m)||(m=p.opaque),v.opaque=ie(m)?m:!1;let O=li(y.getAttribute("noSubsets"));ie(O)||(O=p.noSubsets),v.noSubsets=ie(O)?O:!1;let r=_n(y.getAttribute("fixedWidth"));ie(r)||(r=p.fixedWidth),v.fixedWidth=r;let b=_n(y.getAttribute("fixedHeight"));ie(b)||(b=p.fixedHeight),v.fixedHeight=b;const g=["Style","CRS","AuthorityURL"];for(let x=0,j=g.length;x<j;x++){const E=g[x],S=p[E];if(ie(S)){let T=Yu(v,E,[]);T=T.concat(S),v[E]=T}}const w=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let x=0,j=w.length;x<j;x++){const E=w[x],S=v[E];if(!ie(S)){const T=p[E];v[E]=T}}return v}function ad(y,l){return{name:y.getAttribute("name"),units:y.getAttribute("units"),unitSymbol:y.getAttribute("unitSymbol"),default:y.getAttribute("default"),multipleValues:li(y.getAttribute("multipleValues")),nearestValue:li(y.getAttribute("nearestValue")),current:li(y.getAttribute("current")),values:pe(y)}}function xn(y,l){return rr({},Cd,y,l)}function sd(y,l){return rr({},xd,y,l)}function ld(y,l){return rr({},Od,y,l)}function ud(y,l){return rr({},jd,y,l)}function il(y,l){return rr({},kd,y,l)}function tc(y,l){var p=xn(y,l);if(ie(p)){const v=[Ra(y.getAttribute("width")),Ra(y.getAttribute("height"))];return p.size=v,p}}function cd(y,l){var p=xn(y,l);if(ie(p))return p.name=y.getAttribute("name"),p}function hd(y,l){var p=xn(y,l);if(ie(p))return p.type=y.getAttribute("type"),p}function dd(y,l){return rr({},Ed,y,l)}function ec(y,l){return rr([],Sd,y,l)}const ar=[null,"http://www.opengis.net/wms"],pd=or(ar,{Service:Pt(Kh),Capability:Pt(Qh)}),fd=or(ar,{Request:Pt(sd),Exception:Pt(nd),Layer:Pt(id)}),yd=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),KeywordList:Pt(ec),OnlineResource:Pt(nl),ContactInformation:Pt(td),Fees:Pt(pe),AccessConstraints:Pt(pe),LayerLimit:Pt(rl),MaxWidth:Pt(rl),MaxHeight:Pt(rl)}),md=or(ar,{ContactPersonPrimary:Pt(ed),ContactPosition:Pt(pe),ContactAddress:Pt(rd),ContactVoiceTelephone:Pt(pe),ContactFacsimileTelephone:Pt(pe),ContactElectronicMailAddress:Pt(pe)}),bd=or(ar,{ContactPerson:Pt(pe),ContactOrganization:Pt(pe)}),vd=or(ar,{AddressType:Pt(pe),Address:Pt(pe),City:Pt(pe),StateOrProvince:Pt(pe),PostCode:Pt(pe),Country:Pt(pe)}),gd=or(ar,{Format:Qu(pe)}),rc=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),KeywordList:Pt(ec),CRS:jr(pe),SRS:jr(pe),EX_GeographicBoundingBox:Pt(Xh),LatLonBoundingBox:Pt(Jh),BoundingBox:jr(Zh),Dimension:jr(ad),Attribution:Pt(Wh),AuthorityURL:jr(cd),Identifier:jr(pe),MetadataURL:jr(hd),DataURL:jr(xn),FeatureListURL:jr(xn),Style:jr(dd),MinScaleDenominator:Pt(Ni),MaxScaleDenominator:Pt(Ni),ScaleHint:Pt(Yh),Layer:jr(od)}),wd=or(ar,{Title:Pt(pe),OnlineResource:Pt(nl),LogoURL:Pt(tc)}),_d=or(ar,{westBoundLongitude:Pt(Ni),eastBoundLongitude:Pt(Ni),southBoundLatitude:Pt(Ni),northBoundLatitude:Pt(Ni)}),xd=or(ar,{GetCapabilities:Pt(il),GetMap:Pt(il),GetFeatureInfo:Pt(il)}),kd=or(ar,{Format:jr(pe),DCPType:jr(ld)}),Od=or(ar,{HTTP:Pt(ud)}),jd=or(ar,{Get:Pt(xn),Post:Pt(xn)}),Ed=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),LegendURL:jr(tc),StyleSheetURL:Pt(xn),StyleURL:Pt(xn)}),Cd=or(ar,{Format:Pt(pe),OnlineResource:Pt(nl)}),Sd=or(ar,{Keyword:Qu(pe)});class Pd{constructor(l,p){!p&&typeof window<"u"&&(p=window.DOMParser),this.version=void 0,this._parser=new Mh(p),this._data=l}data(l){return this._data=l,this}toJSON(l){return l=l||this._data,this.parse(l)}parse(l){return this.readFromDocument(this._parser.toDocument(l))}readFromDocument(l){for(let p=l.firstChild;p;p=p.nextSibling)if(p.nodeType==Zo.ELEMENT)return this.readFromNode(p);return null}readFromNode(l){return this.version=l.getAttribute("version"),rr({version:this.version},pd,l,[])||null}}const Td=(y,l,p,v)=>{let k=[],C=null;y._sortable=Ft.create(y,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:m=>{const O=m.item;k=Array.prototype.slice.call(O.parentNode.childNodes),k=k.filter(r=>r.nodeType!=Node.ELEMENT_NODE||!r.classList.contains("sortable-fallback"))},onMove(m){C=m.related},onEnd:m=>{const r=m.item.parentNode;for(const E of k)r.appendChild(E);if(m.oldIndex==m.newIndex)return;const b=l.getArray(),g=b.find(E=>E.get(p)===m.item.querySelector("eox-layercontrol-layer").layer.get(p)),w=b.find(E=>E.get(p)==C.dataset.layer);let x,j;for(x=0;x<b.length;x++)if(b[x]==g){l.removeAt(x);break}for(j=0;j<b.length;j++)if(b[j]===w){x>j?l.insertAt(j,g):l.insertAt(j+1,g);break}v.requestUpdate()}})};function Ad(y,l,p){y.getArray().forEach(k=>{k.get(l)||k.set(l,k.ol_uid),k.get(p)||k.set(p,`layer ${k.ol_uid}`)})}const ol=(y,l,p)=>{let v=[];const k=(C,m,O)=>{v=[...v,...C.filter(b=>b.get(m)===O)];const r=C.filter(b=>b.getLayers);return r.length>0&&r.forEach(b=>k(b.getLayers().getArray(),m,O)),v};return k(y,l,p),v},Ld=(y,l)=>{var p,v,k;if(!(!y||!l))return y.getLayers?"group":(k=(p=l.getInteractions().getArray().filter(C=>C.freehand_!==void 0).map(C=>C.source_))==null?void 0:p.ol_uid)!=null&&k.includes(y.getSource?(v=y.getSource())==null?void 0:v.ol_uid:void 0)?"draw":y.declutter_!==void 0?"vector":"raster"},nc=(y,l)=>{const p=y.get("minZoom"),v=y.get("maxZoom");return!!(l&&(p!==-1/0||v!==1/0))},Rd=(y,l,p)=>{if(!y||!l)return!1;if(!nc(y,p))return!0;const v=y.get("minZoom"),k=y.get("maxZoom"),C=l.getView().getZoom();return C>v&&C<k};function Id(y,l){const p=new URL(y).searchParams;Object.entries(l).forEach(([m,O])=>{typeof O=="object"&&!Array.isArray(O)&&O!==null?Object.keys(O).forEach(r=>{p.set(r,O[r])}):p.set(m,O)});const v=y.split("?")[0],k=p.toString();return`${v}?${k}`}function ic(y,l){var v;let p={};for(const k in y){const C=y[k].type;if(C&&C!=="object")p[k]=C==="number"?Number(l[k]):l[k];else if(typeof y[k]=="object"&&((v=y[k])!=null&&v.properties)){const m=ic(y[k].properties,l);Object.keys(m).length>0&&(p[k]=m)}}return p}function Bd(y,l){var C;if(!y.getSource().getTileUrlFunction())return null;const p=new URL(y.getSource().getTileUrlFunction()([0,0,0])),v=Object.fromEntries(p.searchParams.entries()),k=ic(((C=l.schema)==null?void 0:C.properties)||l.schema,v);return Object.keys(k).length?k:null}function Dd(y){try{return JSON.parse(oc(y)),!!y}catch{return!1}}function Nd(y,l){l.jsonInput=y.target.value,l.requestUpdate()}function oc(y){return y.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function ac(y){const l=JSON.parse(`{"data":${oc(y.jsonInput)}}`);Array.isArray(l.data)?l.data.forEach(p=>{y.eoxMap.addOrUpdateLayer(p)}):y.eoxMap.addOrUpdateLayer(l.data),y.jsonInput=null,y.requestUpdate()}function $d(y,l){l.urlInput=y.target.value,l.requestUpdate()}function Md(y){const p=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(y),v=al(y);return!!(y&&p&&v)}function al(y){const l=/\b(?:wms|ows)\b/i,p=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return l.test(y)?"TileWMS":p.test(y)?"XYZ":!1}async function Hd(y){let l=new URL(y),p=l.searchParams;p.set("SERVICE","WMS"),p.set("REQUEST","GetCapabilities");let v=l.toString();const k=await fetch(v);if(k.ok){const C=await k.text();return new Pd(C).toJSON()}else throw new Error(`Error: ${k.status}`)}async function Fd(y){const l=y.urlInput;if(y.wmsCapabilities=null,y.searchLoad=!0,y.requestUpdate(),!l)return!1;if(al(l)==="XYZ")return{Name:l};try{const p=await Hd(l);y.wmsCapabilities=p}catch{}finally{y.searchLoad=!1,y.requestUpdate()}return!1}function Vd(y,l){const{Name:p}=y,v=al(l.urlInput)||"XYZ",k={type:"Tile",properties:{id:p,title:p},source:{type:v,url:l.urlInput,params:{LAYERS:p}}};l.jsonInput=JSON.stringify(k)}function zd(y,l){l.open=y||null,l.urlInput=null,l.jsonInput=null,l.wmsCapabilities=null,l.requestUpdate()}/**
|
|
40
|
+
*/var ie=m=>m!==void 0,Tc=(m,s,p)=>s in m?m[s]:m[s]=p;const $o={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class gh{constructor(s){this._parser=new s}toDocument(s){return this._parser.parseFromString(s,"application/xml")}getAllTextContent(s,p){return va(s,p).join("")}}function va(m,s){return Ac(m,s,[]).join("")}function Ac(m,s,p){if(m.nodeType===$o.CDATA_SECTION||m.nodeType===$o.TEXT)s?p.push(String(m.nodeValue).replace(/(\r\n|\r|\n)/g,"")):p.push(m.nodeValue);else{var b;for(b=m.firstChild;b;b=b.nextSibling)Ac(b,s,p)}return p}function wh(m,s,p,b){for(var _=_h(s);_;_=xh(_)){var E=_.namespaceURI||null,y=m[E];if(ie(y)){var j=y[_.localName];ie(j)&&j.call(b,_,p)}}}function _h(m){let s=m.firstElementChild||m.firstChild;for(;s&&s.nodeType!==$o.ELEMENT;)s=s.nextSibling;return s}function xh(m){let s=m.nextElementSibling||m.nextSibling;for(;s&&s.nodeType!==$o.ELEMENT;)s=s.nextSibling;return s}function or(m,s,p){return kh(m,s,p)}function kh(m,s,p){var b=ie(p)?p:{},_,E;for(_=0,E=m.length;_<E;++_)b[m[_]]=s;return b}function Lc(m,s){return function(p,b){var _=m.call(ie(s)?s:this,p,b);if(ie(_)){var E=b[b.length-1];E.push(_)}}}function nr(m,s,p,b,_){return b.push(m),wh(s,p,b,_),b.pop()}function Pt(m,s,p){return function(b,_){let E=m.call(ie(p)?p:this,b,_);if(ie(E)){var y=_[_.length-1],j=ie(s)?s:b.localName;y[j]=E}}}function Or(m,s,p){return function(b,_){var E=m.call(ie(p)?p:this,b,_);if(ie(E)){var y=_[_.length-1],j=ie(s)?s:b.localName,r=Tc(y,j,[]);r.push(E)}}}const jh=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function Oh(m){return m.replace(jh,"")}function oi(m){const s=/^\s*(true|1)|(false|0)\s*$/.exec(m);if(s)return ie(s[1])||!1}function Ai(m){return vn(va(m,!1))}function vn(m){const s=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(m);if(s)return parseFloat(s[1])}function zs(m){return ga(va(m,!1))}function ga(m){const s=/^\s*(\d+)\s*$/.exec(m);if(s)return parseInt(s[1],10)}function pe(m){return Oh(va(m,!1))}const Eh="http://www.w3.org/1999/xlink";function Us(m){return m.getAttributeNS(Eh,"href")}function Ch(m,s){return nr({},td,m,s)}function Rc(m){return[vn(m.getAttribute("minx")),vn(m.getAttribute("miny")),vn(m.getAttribute("maxx")),vn(m.getAttribute("maxy"))]}function Sh(m,s){const p=Rc(m),b=[vn(m.getAttribute("resx")),vn(m.getAttribute("resy"))];return{crs:m.getAttribute("CRS")||m.getAttribute("SRS"),extent:p,res:b}}function Ph(m,s){const p=Rc(m);if(!(!ie(p[0])||!ie(p[1])||!ie(p[2])||!ie(p[3])))return p}function Th(m,s){const p=parseFloat(m.getAttribute("min")),b=parseFloat(m.getAttribute("max"));return{min:p,max:b}}function Ah(m,s){const p=nr({},ed,m,s);if(!ie(p))return;const b=p.westBoundLongitude,_=p.southBoundLatitude,E=p.eastBoundLongitude,y=p.northBoundLatitude;if(!(!ie(b)||!ie(_)||!ie(E)||!ie(y)))return[b,_,E,y]}function Lh(m,s){return nr({},Zh,m,s)}function Rh(m,s){return nr({},Jh,m,s)}function Ih(m,s){return nr({},Yh,m,s)}function Bh(m,s){return nr({},Xh,m,s)}function Dh(m,s){return nr({},Kh,m,s)}function Nh(m,s){return nr([],Qh,m,s)}function $h(m,s){const p=oi(m.getAttribute("queryable"));return nr({queryable:ie(p)?p:!1},Dc,m,s)}function Mh(m,s){var p=s[s.length-1];const b=nr({},Dc,m,s);if(!ie(b))return;let _=oi(m.getAttribute("queryable"));ie(_)||(_=p.queryable),b.queryable=ie(_)?_:!1;let E=ga(m.getAttribute("cascaded"));ie(E)||(E=p.cascaded),b.cascaded=E;let y=oi(m.getAttribute("opaque"));ie(y)||(y=p.opaque),b.opaque=ie(y)?y:!1;let j=oi(m.getAttribute("noSubsets"));ie(j)||(j=p.noSubsets),b.noSubsets=ie(j)?j:!1;let r=vn(m.getAttribute("fixedWidth"));ie(r)||(r=p.fixedWidth),b.fixedWidth=r;let v=vn(m.getAttribute("fixedHeight"));ie(v)||(v=p.fixedHeight),b.fixedHeight=v;const g=["Style","CRS","AuthorityURL"];for(let k=0,O=g.length;k<O;k++){const C=g[k],S=p[C];if(ie(S)){let T=Tc(b,C,[]);T=T.concat(S),b[C]=T}}const w=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let k=0,O=w.length;k<O;k++){const C=w[k],S=b[C];if(!ie(S)){const T=p[C];b[C]=T}}return b}function Hh(m,s){return{name:m.getAttribute("name"),units:m.getAttribute("units"),unitSymbol:m.getAttribute("unitSymbol"),default:m.getAttribute("default"),multipleValues:oi(m.getAttribute("multipleValues")),nearestValue:oi(m.getAttribute("nearestValue")),current:oi(m.getAttribute("current")),values:pe(m)}}function gn(m,s){return nr({},sd,m,s)}function Fh(m,s){return nr({},rd,m,s)}function Vh(m,s){return nr({},id,m,s)}function zh(m,s){return nr({},od,m,s)}function qs(m,s){return nr({},nd,m,s)}function Ic(m,s){var p=gn(m,s);if(ie(p)){const b=[ga(m.getAttribute("width")),ga(m.getAttribute("height"))];return p.size=b,p}}function Uh(m,s){var p=gn(m,s);if(ie(p))return p.name=m.getAttribute("name"),p}function qh(m,s){var p=gn(m,s);if(ie(p))return p.type=m.getAttribute("type"),p}function Gh(m,s){return nr({},ad,m,s)}function Bc(m,s){return nr([],ld,m,s)}const ar=[null,"http://www.opengis.net/wms"],Wh=or(ar,{Service:Pt(Rh),Capability:Pt(Lh)}),Zh=or(ar,{Request:Pt(Fh),Exception:Pt(Nh),Layer:Pt($h)}),Jh=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),KeywordList:Pt(Bc),OnlineResource:Pt(Us),ContactInformation:Pt(Ih),Fees:Pt(pe),AccessConstraints:Pt(pe),LayerLimit:Pt(zs),MaxWidth:Pt(zs),MaxHeight:Pt(zs)}),Yh=or(ar,{ContactPersonPrimary:Pt(Bh),ContactPosition:Pt(pe),ContactAddress:Pt(Dh),ContactVoiceTelephone:Pt(pe),ContactFacsimileTelephone:Pt(pe),ContactElectronicMailAddress:Pt(pe)}),Xh=or(ar,{ContactPerson:Pt(pe),ContactOrganization:Pt(pe)}),Kh=or(ar,{AddressType:Pt(pe),Address:Pt(pe),City:Pt(pe),StateOrProvince:Pt(pe),PostCode:Pt(pe),Country:Pt(pe)}),Qh=or(ar,{Format:Lc(pe)}),Dc=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),KeywordList:Pt(Bc),CRS:Or(pe),SRS:Or(pe),EX_GeographicBoundingBox:Pt(Ah),LatLonBoundingBox:Pt(Ph),BoundingBox:Or(Sh),Dimension:Or(Hh),Attribution:Pt(Ch),AuthorityURL:Or(Uh),Identifier:Or(pe),MetadataURL:Or(qh),DataURL:Or(gn),FeatureListURL:Or(gn),Style:Or(Gh),MinScaleDenominator:Pt(Ai),MaxScaleDenominator:Pt(Ai),ScaleHint:Pt(Th),Layer:Or(Mh)}),td=or(ar,{Title:Pt(pe),OnlineResource:Pt(Us),LogoURL:Pt(Ic)}),ed=or(ar,{westBoundLongitude:Pt(Ai),eastBoundLongitude:Pt(Ai),southBoundLatitude:Pt(Ai),northBoundLatitude:Pt(Ai)}),rd=or(ar,{GetCapabilities:Pt(qs),GetMap:Pt(qs),GetFeatureInfo:Pt(qs)}),nd=or(ar,{Format:Or(pe),DCPType:Or(Vh)}),id=or(ar,{HTTP:Pt(zh)}),od=or(ar,{Get:Pt(gn),Post:Pt(gn)}),ad=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),LegendURL:Or(Ic),StyleSheetURL:Pt(gn),StyleURL:Pt(gn)}),sd=or(ar,{Format:Pt(pe),OnlineResource:Pt(Us)}),ld=or(ar,{Keyword:Lc(pe)});class cd{constructor(s,p){!p&&typeof window<"u"&&(p=window.DOMParser),this.version=void 0,this._parser=new gh(p),this._data=s}data(s){return this._data=s,this}toJSON(s){return s=s||this._data,this.parse(s)}parse(s){return this.readFromDocument(this._parser.toDocument(s))}readFromDocument(s){for(let p=s.firstChild;p;p=p.nextSibling)if(p.nodeType==$o.ELEMENT)return this.readFromNode(p);return null}readFromNode(s){return this.version=s.getAttribute("version"),nr({version:this.version},Wh,s,[])||null}}async function ud(m){let s=new URL(m),p=s.searchParams;p.set("SERVICE","WMS"),p.set("REQUEST","GetCapabilities");let b=s.toString();const _=await fetch(b);if(_.ok){const E=await _.text();return new cd(E).toJSON()}else throw new Error(`Error: ${_.status}`)}function Gs(m){const s=/\b(?:wms|ows)\b/i,p=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return s.test(m)?"TileWMS":p.test(m)?"XYZ":!1}function hd(m){const p=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(m),b=Gs(m);return!!(m&&p&&b)}function Nc(m){return m.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function dd(m){try{return JSON.parse(Nc(m)),!!m}catch{return!1}}function pd(m,s){const p=new URL(m).searchParams;Object.entries(s).forEach(([y,j])=>{typeof j=="object"&&!Array.isArray(j)&&j!==null?Object.keys(j).forEach(r=>{p.set(r,j[r])}):p.set(y,j)});const b=m.split("?")[0],_=p.toString();return`${b}?${_}`}/**!
|
|
41
|
+
* Sortable 1.15.1
|
|
42
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
43
|
+
* @author owenm <owen23355@gmail.com>
|
|
44
|
+
* @license MIT
|
|
45
|
+
*/function $c(m,s){var p=Object.keys(m);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(m);s&&(b=b.filter(function(_){return Object.getOwnPropertyDescriptor(m,_).enumerable})),p.push.apply(p,b)}return p}function en(m){for(var s=1;s<arguments.length;s++){var p=arguments[s]!=null?arguments[s]:{};s%2?$c(Object(p),!0).forEach(function(b){fd(m,b,p[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(p)):$c(Object(p)).forEach(function(b){Object.defineProperty(m,b,Object.getOwnPropertyDescriptor(p,b))})}return m}function wa(m){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wa=function(s){return typeof s}:wa=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},wa(m)}function fd(m,s,p){return s in m?Object.defineProperty(m,s,{value:p,enumerable:!0,configurable:!0,writable:!0}):m[s]=p,m}function wn(){return wn=Object.assign||function(m){for(var s=1;s<arguments.length;s++){var p=arguments[s];for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(m[b]=p[b])}return m},wn.apply(this,arguments)}function md(m,s){if(m==null)return{};var p={},b=Object.keys(m),_,E;for(E=0;E<b.length;E++)_=b[E],!(s.indexOf(_)>=0)&&(p[_]=m[_]);return p}function yd(m,s){if(m==null)return{};var p=md(m,s),b,_;if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(m);for(_=0;_<E.length;_++)b=E[_],!(s.indexOf(b)>=0)&&Object.prototype.propertyIsEnumerable.call(m,b)&&(p[b]=m[b])}return p}var bd="1.15.1";function _n(m){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(m)}var xn=_n(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Mo=_n(/Edge/i),Mc=_n(/firefox/i),Ho=_n(/safari/i)&&!_n(/chrome/i)&&!_n(/android/i),Hc=_n(/iP(ad|od|hone)/i),Fc=_n(/chrome/i)&&_n(/android/i),Vc={capture:!1,passive:!1};function be(m,s,p){m.addEventListener(s,p,!xn&&Vc)}function he(m,s,p){m.removeEventListener(s,p,!xn&&Vc)}function _a(m,s){if(s){if(s[0]===">"&&(s=s.substring(1)),m)try{if(m.matches)return m.matches(s);if(m.msMatchesSelector)return m.msMatchesSelector(s);if(m.webkitMatchesSelector)return m.webkitMatchesSelector(s)}catch{return!1}return!1}}function vd(m){return m.host&&m!==document&&m.host.nodeType?m.host:m.parentNode}function rn(m,s,p,b){if(m){p=p||document;do{if(s!=null&&(s[0]===">"?m.parentNode===p&&_a(m,s):_a(m,s))||b&&m===p)return m;if(m===p)break}while(m=vd(m))}return null}var zc=/\s+/g;function Lr(m,s,p){if(m&&s)if(m.classList)m.classList[p?"add":"remove"](s);else{var b=(" "+m.className+" ").replace(zc," ").replace(" "+s+" "," ");m.className=(b+(p?" "+s:"")).replace(zc," ")}}function Rt(m,s,p){var b=m&&m.style;if(b){if(p===void 0)return document.defaultView&&document.defaultView.getComputedStyle?p=document.defaultView.getComputedStyle(m,""):m.currentStyle&&(p=m.currentStyle),s===void 0?p:p[s];!(s in b)&&s.indexOf("webkit")===-1&&(s="-webkit-"+s),b[s]=p+(typeof p=="string"?"":"px")}}function Li(m,s){var p="";if(typeof m=="string")p=m;else do{var b=Rt(m,"transform");b&&b!=="none"&&(p=b+" "+p)}while(!s&&(m=m.parentNode));var _=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return _&&new _(p)}function Uc(m,s,p){if(m){var b=m.getElementsByTagName(s),_=0,E=b.length;if(p)for(;_<E;_++)p(b[_],_);return b}return[]}function nn(){var m=document.scrollingElement;return m||document.documentElement}function Je(m,s,p,b,_){if(!(!m.getBoundingClientRect&&m!==window)){var E,y,j,r,v,g,w;if(m!==window&&m.parentNode&&m!==nn()?(E=m.getBoundingClientRect(),y=E.top,j=E.left,r=E.bottom,v=E.right,g=E.height,w=E.width):(y=0,j=0,r=window.innerHeight,v=window.innerWidth,g=window.innerHeight,w=window.innerWidth),(s||p)&&m!==window&&(_=_||m.parentNode,!xn))do if(_&&_.getBoundingClientRect&&(Rt(_,"transform")!=="none"||p&&Rt(_,"position")!=="static")){var k=_.getBoundingClientRect();y-=k.top+parseInt(Rt(_,"border-top-width")),j-=k.left+parseInt(Rt(_,"border-left-width")),r=y+E.height,v=j+E.width;break}while(_=_.parentNode);if(b&&m!==window){var O=Li(_||m),C=O&&O.a,S=O&&O.d;O&&(y/=S,j/=C,w/=C,g/=S,r=y+g,v=j+w)}return{top:y,left:j,bottom:r,right:v,width:w,height:g}}}function qc(m){var s=Je(m),p=parseInt(Rt(m,"padding-left")),b=parseInt(Rt(m,"padding-top")),_=parseInt(Rt(m,"padding-right")),E=parseInt(Rt(m,"padding-bottom"));return s.top+=b+parseInt(Rt(m,"border-top-width")),s.left+=p+parseInt(Rt(m,"border-left-width")),s.width=m.clientWidth-p-_,s.height=m.clientHeight-b-E,s.bottom=s.top+s.height,s.right=s.left+s.width,s}function Gc(m,s,p){for(var b=Rn(m,!0),_=Je(m)[s];b;){var E=Je(b)[p],y=void 0;if(p==="top"||p==="left"?y=_>=E:y=_<=E,!y)return b;if(b===nn())break;b=Rn(b,!1)}return!1}function Ri(m,s,p,b){for(var _=0,E=0,y=m.children;E<y.length;){if(y[E].style.display!=="none"&&y[E]!==Ft.ghost&&(b||y[E]!==Ft.dragged)&&rn(y[E],p.draggable,m,!1)){if(_===s)return y[E];_++}E++}return null}function Ws(m,s){for(var p=m.lastElementChild;p&&(p===Ft.ghost||Rt(p,"display")==="none"||s&&!_a(p,s));)p=p.previousElementSibling;return p||null}function $r(m,s){var p=0;if(!m||!m.parentNode)return-1;for(;m=m.previousElementSibling;)m.nodeName.toUpperCase()!=="TEMPLATE"&&m!==Ft.clone&&(!s||_a(m,s))&&p++;return p}function Wc(m){var s=0,p=0,b=nn();if(m)do{var _=Li(m),E=_.a,y=_.d;s+=m.scrollLeft*E,p+=m.scrollTop*y}while(m!==b&&(m=m.parentNode));return[s,p]}function gd(m,s){for(var p in m)if(m.hasOwnProperty(p)){for(var b in s)if(s.hasOwnProperty(b)&&s[b]===m[p][b])return Number(p)}return-1}function Rn(m,s){if(!m||!m.getBoundingClientRect)return nn();var p=m,b=!1;do if(p.clientWidth<p.scrollWidth||p.clientHeight<p.scrollHeight){var _=Rt(p);if(p.clientWidth<p.scrollWidth&&(_.overflowX=="auto"||_.overflowX=="scroll")||p.clientHeight<p.scrollHeight&&(_.overflowY=="auto"||_.overflowY=="scroll")){if(!p.getBoundingClientRect||p===document.body)return nn();if(b||s)return p;b=!0}}while(p=p.parentNode);return nn()}function wd(m,s){if(m&&s)for(var p in s)s.hasOwnProperty(p)&&(m[p]=s[p]);return m}function Zs(m,s){return Math.round(m.top)===Math.round(s.top)&&Math.round(m.left)===Math.round(s.left)&&Math.round(m.height)===Math.round(s.height)&&Math.round(m.width)===Math.round(s.width)}var Fo;function Zc(m,s){return function(){if(!Fo){var p=arguments,b=this;p.length===1?m.call(b,p[0]):m.apply(b,p),Fo=setTimeout(function(){Fo=void 0},s)}}}function _d(){clearTimeout(Fo),Fo=void 0}function Jc(m,s,p){m.scrollLeft+=s,m.scrollTop+=p}function Yc(m){var s=window.Polymer,p=window.jQuery||window.Zepto;return s&&s.dom?s.dom(m).cloneNode(!0):p?p(m).clone(!0)[0]:m.cloneNode(!0)}var Rr="Sortable"+new Date().getTime();function xd(){var m=[],s;return{captureAnimationState:function(){if(m=[],!!this.options.animation){var b=[].slice.call(this.el.children);b.forEach(function(_){if(!(Rt(_,"display")==="none"||_===Ft.ghost)){m.push({target:_,rect:Je(_)});var E=en({},m[m.length-1].rect);if(_.thisAnimationDuration){var y=Li(_,!0);y&&(E.top-=y.f,E.left-=y.e)}_.fromRect=E}})}},addAnimationState:function(b){m.push(b)},removeAnimationState:function(b){m.splice(gd(m,{target:b}),1)},animateAll:function(b){var _=this;if(!this.options.animation){clearTimeout(s),typeof b=="function"&&b();return}var E=!1,y=0;m.forEach(function(j){var r=0,v=j.target,g=v.fromRect,w=Je(v),k=v.prevFromRect,O=v.prevToRect,C=j.rect,S=Li(v,!0);S&&(w.top-=S.f,w.left-=S.e),v.toRect=w,v.thisAnimationDuration&&Zs(k,w)&&!Zs(g,w)&&(C.top-w.top)/(C.left-w.left)===(g.top-w.top)/(g.left-w.left)&&(r=jd(C,k,O,_.options)),Zs(w,g)||(v.prevFromRect=g,v.prevToRect=w,r||(r=_.options.animation),_.animate(v,C,w,r)),r&&(E=!0,y=Math.max(y,r),clearTimeout(v.animationResetTimer),v.animationResetTimer=setTimeout(function(){v.animationTime=0,v.prevFromRect=null,v.fromRect=null,v.prevToRect=null,v.thisAnimationDuration=null},r),v.thisAnimationDuration=r)}),clearTimeout(s),E?s=setTimeout(function(){typeof b=="function"&&b()},y):typeof b=="function"&&b(),m=[]},animate:function(b,_,E,y){if(y){Rt(b,"transition",""),Rt(b,"transform","");var j=Li(this.el),r=j&&j.a,v=j&&j.d,g=(_.left-E.left)/(r||1),w=(_.top-E.top)/(v||1);b.animatingX=!!g,b.animatingY=!!w,Rt(b,"transform","translate3d("+g+"px,"+w+"px,0)"),this.forRepaintDummy=kd(b),Rt(b,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),Rt(b,"transform","translate3d(0,0,0)"),typeof b.animated=="number"&&clearTimeout(b.animated),b.animated=setTimeout(function(){Rt(b,"transition",""),Rt(b,"transform",""),b.animated=!1,b.animatingX=!1,b.animatingY=!1},y)}}}}function kd(m){return m.offsetWidth}function jd(m,s,p,b){return Math.sqrt(Math.pow(s.top-m.top,2)+Math.pow(s.left-m.left,2))/Math.sqrt(Math.pow(s.top-p.top,2)+Math.pow(s.left-p.left,2))*b.animation}var Ii=[],Js={initializeByDefault:!0},Vo={mount:function(s){for(var p in Js)Js.hasOwnProperty(p)&&!(p in s)&&(s[p]=Js[p]);Ii.forEach(function(b){if(b.pluginName===s.pluginName)throw"Sortable: Cannot mount plugin ".concat(s.pluginName," more than once")}),Ii.push(s)},pluginEvent:function(s,p,b){var _=this;this.eventCanceled=!1,b.cancel=function(){_.eventCanceled=!0};var E=s+"Global";Ii.forEach(function(y){p[y.pluginName]&&(p[y.pluginName][E]&&p[y.pluginName][E](en({sortable:p},b)),p.options[y.pluginName]&&p[y.pluginName][s]&&p[y.pluginName][s](en({sortable:p},b)))})},initializePlugins:function(s,p,b,_){Ii.forEach(function(j){var r=j.pluginName;if(!(!s.options[r]&&!j.initializeByDefault)){var v=new j(s,p,s.options);v.sortable=s,v.options=s.options,s[r]=v,wn(b,v.defaults)}});for(var E in s.options)if(s.options.hasOwnProperty(E)){var y=this.modifyOption(s,E,s.options[E]);typeof y<"u"&&(s.options[E]=y)}},getEventProperties:function(s,p){var b={};return Ii.forEach(function(_){typeof _.eventProperties=="function"&&wn(b,_.eventProperties.call(p[_.pluginName],s))}),b},modifyOption:function(s,p,b){var _;return Ii.forEach(function(E){s[E.pluginName]&&E.optionListeners&&typeof E.optionListeners[p]=="function"&&(_=E.optionListeners[p].call(s[E.pluginName],b))}),_}};function Od(m){var s=m.sortable,p=m.rootEl,b=m.name,_=m.targetEl,E=m.cloneEl,y=m.toEl,j=m.fromEl,r=m.oldIndex,v=m.newIndex,g=m.oldDraggableIndex,w=m.newDraggableIndex,k=m.originalEvent,O=m.putSortable,C=m.extraEventProperties;if(s=s||p&&p[Rr],!!s){var S,T=s.options,A="on"+b.charAt(0).toUpperCase()+b.substr(1);window.CustomEvent&&!xn&&!Mo?S=new CustomEvent(b,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(b,!0,!0)),S.to=y||p,S.from=j||p,S.item=_||p,S.clone=E,S.oldIndex=r,S.newIndex=v,S.oldDraggableIndex=g,S.newDraggableIndex=w,S.originalEvent=k,S.pullMode=O?O.lastPutMode:void 0;var R=en(en({},C),Vo.getEventProperties(b,s));for(var I in R)S[I]=R[I];p&&p.dispatchEvent(S),T[A]&&T[A].call(s,S)}}var Ed=["evt"],Er=function(s,p){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=b.evt,E=yd(b,Ed);Vo.pluginEvent.bind(Ft)(s,p,en({dragEl:ht,parentEl:Ve,ghostEl:Yt,rootEl:Ie,nextEl:ai,lastDownEl:xa,cloneEl:De,cloneHidden:In,dragStarted:Uo,putSortable:sr,activeSortable:Ft.active,originalEvent:_,oldIndex:Bi,oldDraggableIndex:zo,newIndex:Ir,newDraggableIndex:Bn,hideGhostForTarget:nu,unhideGhostForTarget:iu,cloneNowHidden:function(){In=!0},cloneNowShown:function(){In=!1},dispatchSortableEvent:function(j){_r({sortable:p,name:j,originalEvent:_})}},E))};function _r(m){Od(en({putSortable:sr,cloneEl:De,targetEl:ht,rootEl:Ie,oldIndex:Bi,oldDraggableIndex:zo,newIndex:Ir,newDraggableIndex:Bn},m))}var ht,Ve,Yt,Ie,ai,xa,De,In,Bi,Ir,zo,Bn,ka,sr,Di=!1,ja=!1,Oa=[],si,Gr,Ys,Xs,Xc,Kc,Uo,Ni,qo,Go=!1,Ea=!1,Ca,hr,Ks=[],Qs=!1,Sa=[],Pa=typeof document<"u",Ta=Hc,Qc=Mo||xn?"cssFloat":"float",Cd=Pa&&!Fc&&!Hc&&"draggable"in document.createElement("div"),tu=function(){if(Pa){if(xn)return!1;var m=document.createElement("x");return m.style.cssText="pointer-events:auto",m.style.pointerEvents==="auto"}}(),eu=function(s,p){var b=Rt(s),_=parseInt(b.width)-parseInt(b.paddingLeft)-parseInt(b.paddingRight)-parseInt(b.borderLeftWidth)-parseInt(b.borderRightWidth),E=Ri(s,0,p),y=Ri(s,1,p),j=E&&Rt(E),r=y&&Rt(y),v=j&&parseInt(j.marginLeft)+parseInt(j.marginRight)+Je(E).width,g=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Je(y).width;if(b.display==="flex")return b.flexDirection==="column"||b.flexDirection==="column-reverse"?"vertical":"horizontal";if(b.display==="grid")return b.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(E&&j.float&&j.float!=="none"){var w=j.float==="left"?"left":"right";return y&&(r.clear==="both"||r.clear===w)?"vertical":"horizontal"}return E&&(j.display==="block"||j.display==="flex"||j.display==="table"||j.display==="grid"||v>=_&&b[Qc]==="none"||y&&b[Qc]==="none"&&v+g>_)?"vertical":"horizontal"},Sd=function(s,p,b){var _=b?s.left:s.top,E=b?s.right:s.bottom,y=b?s.width:s.height,j=b?p.left:p.top,r=b?p.right:p.bottom,v=b?p.width:p.height;return _===j||E===r||_+y/2===j+v/2},Pd=function(s,p){var b;return Oa.some(function(_){var E=_[Rr].options.emptyInsertThreshold;if(!(!E||Ws(_))){var y=Je(_),j=s>=y.left-E&&s<=y.right+E,r=p>=y.top-E&&p<=y.bottom+E;if(j&&r)return b=_}}),b},ru=function(s){function p(E,y){return function(j,r,v,g){var w=j.options.group.name&&r.options.group.name&&j.options.group.name===r.options.group.name;if(E==null&&(y||w))return!0;if(E==null||E===!1)return!1;if(y&&E==="clone")return E;if(typeof E=="function")return p(E(j,r,v,g),y)(j,r,v,g);var k=(y?j:r).options.group.name;return E===!0||typeof E=="string"&&E===k||E.join&&E.indexOf(k)>-1}}var b={},_=s.group;(!_||wa(_)!="object")&&(_={name:_}),b.name=_.name,b.checkPull=p(_.pull,!0),b.checkPut=p(_.put),b.revertClone=_.revertClone,s.group=b},nu=function(){!tu&&Yt&&Rt(Yt,"display","none")},iu=function(){!tu&&Yt&&Rt(Yt,"display","")};Pa&&!Fc&&document.addEventListener("click",function(m){if(ja)return m.preventDefault(),m.stopPropagation&&m.stopPropagation(),m.stopImmediatePropagation&&m.stopImmediatePropagation(),ja=!1,!1},!0);var li=function(s){if(ht){s=s.touches?s.touches[0]:s;var p=Pd(s.clientX,s.clientY);if(p){var b={};for(var _ in s)s.hasOwnProperty(_)&&(b[_]=s[_]);b.target=b.rootEl=p,b.preventDefault=void 0,b.stopPropagation=void 0,p[Rr]._onDragOver(b)}}},Td=function(s){ht&&ht.parentNode[Rr]._isOutsideThisEl(s.target)};function Ft(m,s){if(!(m&&m.nodeType&&m.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(m));this.el=m,this.options=s=wn({},s),m[Rr]=this;var p={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(m.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return eu(m,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(y,j){y.setData("Text",j.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ft.supportPointer!==!1&&"PointerEvent"in window&&!Ho,emptyInsertThreshold:5};Vo.initializePlugins(this,m,p);for(var b in p)!(b in s)&&(s[b]=p[b]);ru(s);for(var _ in this)_.charAt(0)==="_"&&typeof this[_]=="function"&&(this[_]=this[_].bind(this));this.nativeDraggable=s.forceFallback?!1:Cd,this.nativeDraggable&&(this.options.touchStartThreshold=1),s.supportPointer?be(m,"pointerdown",this._onTapStart):(be(m,"mousedown",this._onTapStart),be(m,"touchstart",this._onTapStart)),this.nativeDraggable&&(be(m,"dragover",this),be(m,"dragenter",this)),Oa.push(this.el),s.store&&s.store.get&&this.sort(s.store.get(this)||[]),wn(this,xd())}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(s){!this.el.contains(s)&&s!==this.el&&(Ni=null)},_getDirection:function(s,p){return typeof this.options.direction=="function"?this.options.direction.call(this,s,p,ht):this.options.direction},_onTapStart:function(s){if(s.cancelable){var p=this,b=this.el,_=this.options,E=_.preventOnFilter,y=s.type,j=s.touches&&s.touches[0]||s.pointerType&&s.pointerType==="touch"&&s,r=(j||s).target,v=s.target.shadowRoot&&(s.path&&s.path[0]||s.composedPath&&s.composedPath()[0])||r,g=_.filter;if($d(b),!ht&&!(/mousedown|pointerdown/.test(y)&&s.button!==0||_.disabled)&&!v.isContentEditable&&!(!this.nativeDraggable&&Ho&&r&&r.tagName.toUpperCase()==="SELECT")&&(r=rn(r,_.draggable,b,!1),!(r&&r.animated)&&xa!==r)){if(Bi=$r(r),zo=$r(r,_.draggable),typeof g=="function"){if(g.call(this,s,r,this)){_r({sortable:p,rootEl:v,name:"filter",targetEl:r,toEl:b,fromEl:b}),Er("filter",p,{evt:s}),E&&s.cancelable&&s.preventDefault();return}}else if(g&&(g=g.split(",").some(function(w){if(w=rn(v,w.trim(),b,!1),w)return _r({sortable:p,rootEl:w,name:"filter",targetEl:r,fromEl:b,toEl:b}),Er("filter",p,{evt:s}),!0}),g)){E&&s.cancelable&&s.preventDefault();return}_.handle&&!rn(v,_.handle,b,!1)||this._prepareDragStart(s,j,r)}}},_prepareDragStart:function(s,p,b){var _=this,E=_.el,y=_.options,j=E.ownerDocument,r;if(b&&!ht&&b.parentNode===E){var v=Je(b);if(Ie=E,ht=b,Ve=ht.parentNode,ai=ht.nextSibling,xa=b,ka=y.group,Ft.dragged=ht,si={target:ht,clientX:(p||s).clientX,clientY:(p||s).clientY},Xc=si.clientX-v.left,Kc=si.clientY-v.top,this._lastX=(p||s).clientX,this._lastY=(p||s).clientY,ht.style["will-change"]="all",r=function(){if(Er("delayEnded",_,{evt:s}),Ft.eventCanceled){_._onDrop();return}_._disableDelayedDragEvents(),!Mc&&_.nativeDraggable&&(ht.draggable=!0),_._triggerDragStart(s,p),_r({sortable:_,name:"choose",originalEvent:s}),Lr(ht,y.chosenClass,!0)},y.ignore.split(",").forEach(function(g){Uc(ht,g.trim(),tl)}),be(j,"dragover",li),be(j,"mousemove",li),be(j,"touchmove",li),be(j,"mouseup",_._onDrop),be(j,"touchend",_._onDrop),be(j,"touchcancel",_._onDrop),Mc&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ht.draggable=!0),Er("delayStart",this,{evt:s}),y.delay&&(!y.delayOnTouchOnly||p)&&(!this.nativeDraggable||!(Mo||xn))){if(Ft.eventCanceled){this._onDrop();return}be(j,"mouseup",_._disableDelayedDrag),be(j,"touchend",_._disableDelayedDrag),be(j,"touchcancel",_._disableDelayedDrag),be(j,"mousemove",_._delayedDragTouchMoveHandler),be(j,"touchmove",_._delayedDragTouchMoveHandler),y.supportPointer&&be(j,"pointermove",_._delayedDragTouchMoveHandler),_._dragStartTimer=setTimeout(r,y.delay)}else r()}},_delayedDragTouchMoveHandler:function(s){var p=s.touches?s.touches[0]:s;Math.max(Math.abs(p.clientX-this._lastX),Math.abs(p.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ht&&tl(ht),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var s=this.el.ownerDocument;he(s,"mouseup",this._disableDelayedDrag),he(s,"touchend",this._disableDelayedDrag),he(s,"touchcancel",this._disableDelayedDrag),he(s,"mousemove",this._delayedDragTouchMoveHandler),he(s,"touchmove",this._delayedDragTouchMoveHandler),he(s,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(s,p){p=p||s.pointerType=="touch"&&s,!this.nativeDraggable||p?this.options.supportPointer?be(document,"pointermove",this._onTouchMove):p?be(document,"touchmove",this._onTouchMove):be(document,"mousemove",this._onTouchMove):(be(ht,"dragend",this),be(Ie,"dragstart",this._onDragStart));try{document.selection?La(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(s,p){if(Di=!1,Ie&&ht){Er("dragStarted",this,{evt:p}),this.nativeDraggable&&be(document,"dragover",Td);var b=this.options;!s&&Lr(ht,b.dragClass,!1),Lr(ht,b.ghostClass,!0),Ft.active=this,s&&this._appendGhost(),_r({sortable:this,name:"start",originalEvent:p})}else this._nulling()},_emulateDragOver:function(){if(Gr){this._lastX=Gr.clientX,this._lastY=Gr.clientY,nu();for(var s=document.elementFromPoint(Gr.clientX,Gr.clientY),p=s;s&&s.shadowRoot&&(s=s.shadowRoot.elementFromPoint(Gr.clientX,Gr.clientY),s!==p);)p=s;if(ht.parentNode[Rr]._isOutsideThisEl(s),p)do{if(p[Rr]){var b=void 0;if(b=p[Rr]._onDragOver({clientX:Gr.clientX,clientY:Gr.clientY,target:s,rootEl:p}),b&&!this.options.dragoverBubble)break}s=p}while(p=p.parentNode);iu()}},_onTouchMove:function(s){if(si){var p=this.options,b=p.fallbackTolerance,_=p.fallbackOffset,E=s.touches?s.touches[0]:s,y=Yt&&Li(Yt,!0),j=Yt&&y&&y.a,r=Yt&&y&&y.d,v=Ta&&hr&&Wc(hr),g=(E.clientX-si.clientX+_.x)/(j||1)+(v?v[0]-Ks[0]:0)/(j||1),w=(E.clientY-si.clientY+_.y)/(r||1)+(v?v[1]-Ks[1]:0)/(r||1);if(!Ft.active&&!Di){if(b&&Math.max(Math.abs(E.clientX-this._lastX),Math.abs(E.clientY-this._lastY))<b)return;this._onDragStart(s,!0)}if(Yt){y?(y.e+=g-(Ys||0),y.f+=w-(Xs||0)):y={a:1,b:0,c:0,d:1,e:g,f:w};var k="matrix(".concat(y.a,",").concat(y.b,",").concat(y.c,",").concat(y.d,",").concat(y.e,",").concat(y.f,")");Rt(Yt,"webkitTransform",k),Rt(Yt,"mozTransform",k),Rt(Yt,"msTransform",k),Rt(Yt,"transform",k),Ys=g,Xs=w,Gr=E}s.cancelable&&s.preventDefault()}},_appendGhost:function(){if(!Yt){var s=this.options.fallbackOnBody?document.body:Ie,p=Je(ht,!0,Ta,!0,s),b=this.options;if(Ta){for(hr=s;Rt(hr,"position")==="static"&&Rt(hr,"transform")==="none"&&hr!==document;)hr=hr.parentNode;hr!==document.body&&hr!==document.documentElement?(hr===document&&(hr=nn()),p.top+=hr.scrollTop,p.left+=hr.scrollLeft):hr=nn(),Ks=Wc(hr)}Yt=ht.cloneNode(!0),Lr(Yt,b.ghostClass,!1),Lr(Yt,b.fallbackClass,!0),Lr(Yt,b.dragClass,!0),Rt(Yt,"transition",""),Rt(Yt,"transform",""),Rt(Yt,"box-sizing","border-box"),Rt(Yt,"margin",0),Rt(Yt,"top",p.top),Rt(Yt,"left",p.left),Rt(Yt,"width",p.width),Rt(Yt,"height",p.height),Rt(Yt,"opacity","0.8"),Rt(Yt,"position",Ta?"absolute":"fixed"),Rt(Yt,"zIndex","100000"),Rt(Yt,"pointerEvents","none"),Ft.ghost=Yt,s.appendChild(Yt),Rt(Yt,"transform-origin",Xc/parseInt(Yt.style.width)*100+"% "+Kc/parseInt(Yt.style.height)*100+"%")}},_onDragStart:function(s,p){var b=this,_=s.dataTransfer,E=b.options;if(Er("dragStart",this,{evt:s}),Ft.eventCanceled){this._onDrop();return}Er("setupClone",this),Ft.eventCanceled||(De=Yc(ht),De.removeAttribute("id"),De.draggable=!1,De.style["will-change"]="",this._hideClone(),Lr(De,this.options.chosenClass,!1),Ft.clone=De),b.cloneId=La(function(){Er("clone",b),!Ft.eventCanceled&&(b.options.removeCloneOnHide||Ie.insertBefore(De,ht),b._hideClone(),_r({sortable:b,name:"clone"}))}),!p&&Lr(ht,E.dragClass,!0),p?(ja=!0,b._loopId=setInterval(b._emulateDragOver,50)):(he(document,"mouseup",b._onDrop),he(document,"touchend",b._onDrop),he(document,"touchcancel",b._onDrop),_&&(_.effectAllowed="move",E.setData&&E.setData.call(b,_,ht)),be(document,"drop",b),Rt(ht,"transform","translateZ(0)")),Di=!0,b._dragStartId=La(b._dragStarted.bind(b,p,s)),be(document,"selectstart",b),Uo=!0,Ho&&Rt(document.body,"user-select","none")},_onDragOver:function(s){var p=this.el,b=s.target,_,E,y,j=this.options,r=j.group,v=Ft.active,g=ka===r,w=j.sort,k=sr||v,O,C=this,S=!1;if(Qs)return;function T(yt,ct){Er(yt,C,en({evt:s,isOwner:g,axis:O?"vertical":"horizontal",revert:y,dragRect:_,targetRect:E,canSort:w,fromSortable:k,target:b,completed:R,onMove:function(At,Vt){return Aa(Ie,p,ht,_,At,Je(At),s,Vt)},changed:I},ct))}function A(){T("dragOverAnimationCapture"),C.captureAnimationState(),C!==k&&k.captureAnimationState()}function R(yt){return T("dragOverCompleted",{insertion:yt}),yt&&(g?v._hideClone():v._showClone(C),C!==k&&(Lr(ht,sr?sr.options.ghostClass:v.options.ghostClass,!1),Lr(ht,j.ghostClass,!0)),sr!==C&&C!==Ft.active?sr=C:C===Ft.active&&sr&&(sr=null),k===C&&(C._ignoreWhileAnimating=b),C.animateAll(function(){T("dragOverAnimationComplete"),C._ignoreWhileAnimating=null}),C!==k&&(k.animateAll(),k._ignoreWhileAnimating=null)),(b===ht&&!ht.animated||b===p&&!b.animated)&&(Ni=null),!j.dragoverBubble&&!s.rootEl&&b!==document&&(ht.parentNode[Rr]._isOutsideThisEl(s.target),!yt&&li(s)),!j.dragoverBubble&&s.stopPropagation&&s.stopPropagation(),S=!0}function I(){Ir=$r(ht),Bn=$r(ht,j.draggable),_r({sortable:C,name:"change",toEl:p,newIndex:Ir,newDraggableIndex:Bn,originalEvent:s})}if(s.preventDefault!==void 0&&s.cancelable&&s.preventDefault(),b=rn(b,j.draggable,p,!0),T("dragOver"),Ft.eventCanceled)return S;if(ht.contains(s.target)||b.animated&&b.animatingX&&b.animatingY||C._ignoreWhileAnimating===b)return R(!1);if(ja=!1,v&&!j.disabled&&(g?w||(y=Ve!==Ie):sr===this||(this.lastPutMode=ka.checkPull(this,v,ht,s))&&r.checkPut(this,v,ht,s))){if(O=this._getDirection(s,b)==="vertical",_=Je(ht),T("dragOverValid"),Ft.eventCanceled)return S;if(y)return Ve=Ie,A(),this._hideClone(),T("revert"),Ft.eventCanceled||(ai?Ie.insertBefore(ht,ai):Ie.appendChild(ht)),R(!0);var $=Ws(p,j.draggable);if(!$||Id(s,O,this)&&!$.animated){if($===ht)return R(!1);if($&&p===s.target&&(b=$),b&&(E=Je(b)),Aa(Ie,p,ht,_,b,E,s,!!b)!==!1)return A(),$&&$.nextSibling?p.insertBefore(ht,$.nextSibling):p.appendChild(ht),Ve=p,I(),R(!0)}else if($&&Rd(s,O,this)){var M=Ri(p,0,j,!0);if(M===ht)return R(!1);if(b=M,E=Je(b),Aa(Ie,p,ht,_,b,E,s,!1)!==!1)return A(),p.insertBefore(ht,M),Ve=p,I(),R(!0)}else if(b.parentNode===p){E=Je(b);var B=0,q,F=ht.parentNode!==p,N=!Sd(ht.animated&&ht.toRect||_,b.animated&&b.toRect||E,O),U=O?"top":"left",H=Gc(b,"top","top")||Gc(ht,"top","top"),X=H?H.scrollTop:void 0;Ni!==b&&(q=E[U],Go=!1,Ea=!N&&j.invertSwap||F),B=Bd(s,b,E,O,N?1:j.swapThreshold,j.invertedSwapThreshold==null?j.swapThreshold:j.invertedSwapThreshold,Ea,Ni===b);var Y;if(B!==0){var K=$r(ht);do K-=B,Y=Ve.children[K];while(Y&&(Rt(Y,"display")==="none"||Y===Yt))}if(B===0||Y===b)return R(!1);Ni=b,qo=B;var tt=b.nextElementSibling,it=!1;it=B===1;var st=Aa(Ie,p,ht,_,b,E,s,it);if(st!==!1)return(st===1||st===-1)&&(it=st===1),Qs=!0,setTimeout(Ld,30),A(),it&&!tt?p.appendChild(ht):b.parentNode.insertBefore(ht,it?tt:b),H&&Jc(H,0,X-H.scrollTop),Ve=ht.parentNode,q!==void 0&&!Ea&&(Ca=Math.abs(q-Je(b)[U])),I(),R(!0)}if(p.contains(ht))return R(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){he(document,"mousemove",this._onTouchMove),he(document,"touchmove",this._onTouchMove),he(document,"pointermove",this._onTouchMove),he(document,"dragover",li),he(document,"mousemove",li),he(document,"touchmove",li)},_offUpEvents:function(){var s=this.el.ownerDocument;he(s,"mouseup",this._onDrop),he(s,"touchend",this._onDrop),he(s,"pointerup",this._onDrop),he(s,"touchcancel",this._onDrop),he(document,"selectstart",this)},_onDrop:function(s){var p=this.el,b=this.options;if(Ir=$r(ht),Bn=$r(ht,b.draggable),Er("drop",this,{evt:s}),Ve=ht&&ht.parentNode,Ir=$r(ht),Bn=$r(ht,b.draggable),Ft.eventCanceled){this._nulling();return}Di=!1,Ea=!1,Go=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),el(this.cloneId),el(this._dragStartId),this.nativeDraggable&&(he(document,"drop",this),he(p,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ho&&Rt(document.body,"user-select",""),Rt(ht,"transform",""),s&&(Uo&&(s.cancelable&&s.preventDefault(),!b.dropBubble&&s.stopPropagation()),Yt&&Yt.parentNode&&Yt.parentNode.removeChild(Yt),(Ie===Ve||sr&&sr.lastPutMode!=="clone")&&De&&De.parentNode&&De.parentNode.removeChild(De),ht&&(this.nativeDraggable&&he(ht,"dragend",this),tl(ht),ht.style["will-change"]="",Uo&&!Di&&Lr(ht,sr?sr.options.ghostClass:this.options.ghostClass,!1),Lr(ht,this.options.chosenClass,!1),_r({sortable:this,name:"unchoose",toEl:Ve,newIndex:null,newDraggableIndex:null,originalEvent:s}),Ie!==Ve?(Ir>=0&&(_r({rootEl:Ve,name:"add",toEl:Ve,fromEl:Ie,originalEvent:s}),_r({sortable:this,name:"remove",toEl:Ve,originalEvent:s}),_r({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Ie,originalEvent:s}),_r({sortable:this,name:"sort",toEl:Ve,originalEvent:s})),sr&&sr.save()):Ir!==Bi&&Ir>=0&&(_r({sortable:this,name:"update",toEl:Ve,originalEvent:s}),_r({sortable:this,name:"sort",toEl:Ve,originalEvent:s})),Ft.active&&((Ir==null||Ir===-1)&&(Ir=Bi,Bn=zo),_r({sortable:this,name:"end",toEl:Ve,originalEvent:s}),this.save()))),this._nulling()},_nulling:function(){Er("nulling",this),Ie=ht=Ve=Yt=ai=De=xa=In=si=Gr=Uo=Ir=Bn=Bi=zo=Ni=qo=sr=ka=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,Sa.forEach(function(s){s.checked=!0}),Sa.length=Ys=Xs=0},handleEvent:function(s){switch(s.type){case"drop":case"dragend":this._onDrop(s);break;case"dragenter":case"dragover":ht&&(this._onDragOver(s),Ad(s));break;case"selectstart":s.preventDefault();break}},toArray:function(){for(var s=[],p,b=this.el.children,_=0,E=b.length,y=this.options;_<E;_++)p=b[_],rn(p,y.draggable,this.el,!1)&&s.push(p.getAttribute(y.dataIdAttr)||Nd(p));return s},sort:function(s,p){var b={},_=this.el;this.toArray().forEach(function(E,y){var j=_.children[y];rn(j,this.options.draggable,_,!1)&&(b[E]=j)},this),p&&this.captureAnimationState(),s.forEach(function(E){b[E]&&(_.removeChild(b[E]),_.appendChild(b[E]))}),p&&this.animateAll()},save:function(){var s=this.options.store;s&&s.set&&s.set(this)},closest:function(s,p){return rn(s,p||this.options.draggable,this.el,!1)},option:function(s,p){var b=this.options;if(p===void 0)return b[s];var _=Vo.modifyOption(this,s,p);typeof _<"u"?b[s]=_:b[s]=p,s==="group"&&ru(b)},destroy:function(){Er("destroy",this);var s=this.el;s[Rr]=null,he(s,"mousedown",this._onTapStart),he(s,"touchstart",this._onTapStart),he(s,"pointerdown",this._onTapStart),this.nativeDraggable&&(he(s,"dragover",this),he(s,"dragenter",this)),Array.prototype.forEach.call(s.querySelectorAll("[draggable]"),function(p){p.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Oa.splice(Oa.indexOf(this.el),1),this.el=s=null},_hideClone:function(){if(!In){if(Er("hideClone",this),Ft.eventCanceled)return;Rt(De,"display","none"),this.options.removeCloneOnHide&&De.parentNode&&De.parentNode.removeChild(De),In=!0}},_showClone:function(s){if(s.lastPutMode!=="clone"){this._hideClone();return}if(In){if(Er("showClone",this),Ft.eventCanceled)return;ht.parentNode==Ie&&!this.options.group.revertClone?Ie.insertBefore(De,ht):ai?Ie.insertBefore(De,ai):Ie.appendChild(De),this.options.group.revertClone&&this.animate(ht,De),Rt(De,"display",""),In=!1}}};function Ad(m){m.dataTransfer&&(m.dataTransfer.dropEffect="move"),m.cancelable&&m.preventDefault()}function Aa(m,s,p,b,_,E,y,j){var r,v=m[Rr],g=v.options.onMove,w;return window.CustomEvent&&!xn&&!Mo?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=s,r.from=m,r.dragged=p,r.draggedRect=b,r.related=_||s,r.relatedRect=E||Je(s),r.willInsertAfter=j,r.originalEvent=y,m.dispatchEvent(r),g&&(w=g.call(v,r,y)),w}function tl(m){m.draggable=!1}function Ld(){Qs=!1}function Rd(m,s,p){var b=Je(Ri(p.el,0,p.options,!0)),_=qc(p.el),E=10;return s?m.clientX<_.left-E||m.clientY<b.top&&m.clientX<b.right:m.clientY<_.top-E||m.clientY<b.bottom&&m.clientX<b.left}function Id(m,s,p){var b=Je(Ws(p.el,p.options.draggable)),_=qc(p.el),E=10;return s?m.clientX>_.right+E||m.clientY>b.bottom&&m.clientX>b.left:m.clientY>_.bottom+E||m.clientX>b.right&&m.clientY>b.top}function Bd(m,s,p,b,_,E,y,j){var r=b?m.clientY:m.clientX,v=b?p.height:p.width,g=b?p.top:p.left,w=b?p.bottom:p.right,k=!1;if(!y){if(j&&Ca<v*_){if(!Go&&(qo===1?r>g+v*E/2:r<w-v*E/2)&&(Go=!0),Go)k=!0;else if(qo===1?r<g+Ca:r>w-Ca)return-qo}else if(r>g+v*(1-_)/2&&r<w-v*(1-_)/2)return Dd(s)}return k=k||y,k&&(r<g+v*E/2||r>w-v*E/2)?r>g+v/2?1:-1:0}function Dd(m){return $r(ht)<$r(m)?1:-1}function Nd(m){for(var s=m.tagName+m.className+m.src+m.href+m.textContent,p=s.length,b=0;p--;)b+=s.charCodeAt(p);return b.toString(36)}function $d(m){Sa.length=0;for(var s=m.getElementsByTagName("input"),p=s.length;p--;){var b=s[p];b.checked&&Sa.push(b)}}function La(m){return setTimeout(m,0)}function el(m){return clearTimeout(m)}Pa&&be(document,"touchmove",function(m){(Ft.active||Di)&&m.cancelable&&m.preventDefault()}),Ft.utils={on:be,off:he,css:Rt,find:Uc,is:function(s,p){return!!rn(s,p,s,!1)},extend:wd,throttle:Zc,closest:rn,toggleClass:Lr,clone:Yc,index:$r,nextTick:La,cancelNextTick:el,detectDirection:eu,getChild:Ri},Ft.get=function(m){return m[Rr]},Ft.mount=function(){for(var m=arguments.length,s=new Array(m),p=0;p<m;p++)s[p]=arguments[p];s[0].constructor===Array&&(s=s[0]),s.forEach(function(b){if(!b.prototype||!b.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(b));b.utils&&(Ft.utils=en(en({},Ft.utils),b.utils)),Vo.mount(b)})},Ft.create=function(m,s){return new Ft(m,s)},Ft.version=bd;var Ye=[],Wo,rl,nl=!1,il,ol,Ra,Zo;function Md(){function m(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this))}return m.prototype={dragStarted:function(p){var b=p.originalEvent;this.sortable.nativeDraggable?be(document,"dragover",this._handleAutoScroll):this.options.supportPointer?be(document,"pointermove",this._handleFallbackAutoScroll):b.touches?be(document,"touchmove",this._handleFallbackAutoScroll):be(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(p){var b=p.originalEvent;!this.options.dragOverBubble&&!b.rootEl&&this._handleAutoScroll(b)},drop:function(){this.sortable.nativeDraggable?he(document,"dragover",this._handleAutoScroll):(he(document,"pointermove",this._handleFallbackAutoScroll),he(document,"touchmove",this._handleFallbackAutoScroll),he(document,"mousemove",this._handleFallbackAutoScroll)),ou(),Ia(),_d()},nulling:function(){Ra=rl=Wo=nl=Zo=il=ol=null,Ye.length=0},_handleFallbackAutoScroll:function(p){this._handleAutoScroll(p,!0)},_handleAutoScroll:function(p,b){var _=this,E=(p.touches?p.touches[0]:p).clientX,y=(p.touches?p.touches[0]:p).clientY,j=document.elementFromPoint(E,y);if(Ra=p,b||this.options.forceAutoScrollFallback||Mo||xn||Ho){al(p,this.options,j,b);var r=Rn(j,!0);nl&&(!Zo||E!==il||y!==ol)&&(Zo&&ou(),Zo=setInterval(function(){var v=Rn(document.elementFromPoint(E,y),!0);v!==r&&(r=v,Ia()),al(p,_.options,v,b)},10),il=E,ol=y)}else{if(!this.options.bubbleScroll||Rn(j,!0)===nn()){Ia();return}al(p,this.options,Rn(j,!1),!1)}}},wn(m,{pluginName:"scroll",initializeByDefault:!0})}function Ia(){Ye.forEach(function(m){clearInterval(m.pid)}),Ye=[]}function ou(){clearInterval(Zo)}var al=Zc(function(m,s,p,b){if(s.scroll){var _=(m.touches?m.touches[0]:m).clientX,E=(m.touches?m.touches[0]:m).clientY,y=s.scrollSensitivity,j=s.scrollSpeed,r=nn(),v=!1,g;rl!==p&&(rl=p,Ia(),Wo=s.scroll,g=s.scrollFn,Wo===!0&&(Wo=Rn(p,!0)));var w=0,k=Wo;do{var O=k,C=Je(O),S=C.top,T=C.bottom,A=C.left,R=C.right,I=C.width,$=C.height,M=void 0,B=void 0,q=O.scrollWidth,F=O.scrollHeight,N=Rt(O),U=O.scrollLeft,H=O.scrollTop;O===r?(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"));var X=M&&(Math.abs(R-_)<=y&&U+I<q)-(Math.abs(A-_)<=y&&!!U),Y=B&&(Math.abs(T-E)<=y&&H+$<F)-(Math.abs(S-E)<=y&&!!H);if(!Ye[w])for(var K=0;K<=w;K++)Ye[K]||(Ye[K]={});(Ye[w].vx!=X||Ye[w].vy!=Y||Ye[w].el!==O)&&(Ye[w].el=O,Ye[w].vx=X,Ye[w].vy=Y,clearInterval(Ye[w].pid),(X!=0||Y!=0)&&(v=!0,Ye[w].pid=setInterval((function(){b&&this.layer===0&&Ft.active._onTouchMove(Ra);var tt=Ye[this.layer].vy?Ye[this.layer].vy*j:0,it=Ye[this.layer].vx?Ye[this.layer].vx*j:0;typeof g=="function"&&g.call(Ft.dragged.parentNode[Rr],it,tt,m,Ra,Ye[this.layer].el)!=="continue"||Jc(Ye[this.layer].el,it,tt)}).bind({layer:w}),24))),w++}while(s.bubbleScroll&&k!==r&&(k=Rn(k,!1)));nl=v}},30),au=function(s){var p=s.originalEvent,b=s.putSortable,_=s.dragEl,E=s.activeSortable,y=s.dispatchSortableEvent,j=s.hideGhostForTarget,r=s.unhideGhostForTarget;if(p){var v=b||E;j();var g=p.changedTouches&&p.changedTouches.length?p.changedTouches[0]:p,w=document.elementFromPoint(g.clientX,g.clientY);r(),v&&!v.el.contains(w)&&(y("spill"),this.onSpill({dragEl:_,putSortable:b}))}};function sl(){}sl.prototype={startIndex:null,dragStart:function(s){var p=s.oldDraggableIndex;this.startIndex=p},onSpill:function(s){var p=s.dragEl,b=s.putSortable;this.sortable.captureAnimationState(),b&&b.captureAnimationState();var _=Ri(this.sortable.el,this.startIndex,this.options);_?this.sortable.el.insertBefore(p,_):this.sortable.el.appendChild(p),this.sortable.animateAll(),b&&b.animateAll()},drop:au},wn(sl,{pluginName:"revertOnSpill"});function ll(){}ll.prototype={onSpill:function(s){var p=s.dragEl,b=s.putSortable,_=b||this.sortable;_.captureAnimationState(),p.parentNode&&p.parentNode.removeChild(p),_.animateAll()},drop:au},wn(ll,{pluginName:"removeOnSpill"}),Ft.mount(new Md),Ft.mount(ll,sl);const Hd=m=>{const s=m.item;let p=Array.prototype.slice.call(s.parentNode.childNodes);return p=p.filter(b=>b.nodeType!=Node.ELEMENT_NODE||!b.classList.contains("sortable-fallback")),p},Fd=(m,s,p,b,_,E)=>{const j=m.item.parentNode;for(const S of p)j.appendChild(S);if(m.oldIndex==m.newIndex)return;const r=b.getArray(),v=m.item.querySelector("eox-layercontrol-layer").layer.get(_),g=r.find(S=>S.get(_)===v),w=E.dataset.layer,k=r.find(S=>S.get(_)==w);let O,C;for(O=0;O<r.length;O++)if(r[O]==g){b.removeAt(O);break}for(C=0;C<r.length;C++)if(r[C]===k){O>C?b.insertAt(C,g):b.insertAt(C+1,g);break}s.requestUpdate()};function Vd(m,s,p,b){let _=[],E=null;m._sortable=Ft.create(m,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:y=>_=Hd(y),onMove:y=>{E=y.related},onEnd:y=>Fd(y,b,_,s,p,E)})}function zd(m,s,p){m.getArray().forEach(_=>{const E=_.ol_uid;_.get(s)||_.set(s,E),_.get(p)||_.set(p,`layer ${E}`)})}function cl(m,s,p){let b=[];const _=(E,y,j)=>{b=[...b,...E.filter(v=>v.get(y)===j)];const r=E.filter(v=>v.getLayers);return r.length>0&&r.forEach(v=>_(v.getLayers().getArray(),y,j)),b};return _(m,s,p),b}function Ud(m,s,p){if(!m||!s)return!1;if(!su(m,p))return!0;const b=m.get("minZoom"),_=m.get("maxZoom"),E=s.getView().getZoom();return E>b&&E<_}function su(m,s){const p=m.get("minZoom"),b=m.get("maxZoom");return!!(s&&(p!==-1/0||b!==1/0))}function qd(m,s){var _,E,y;return!m||!s?void 0:m.getLayers?"group":((y=(_=s.getInteractions().getArray().filter(j=>j.freehand_!==void 0).map(j=>j.source_))==null?void 0:_.ol_uid)==null?void 0:y.includes(m.getSource?(E=m.getSource())==null?void 0:E.ol_uid:void 0))?"draw":m.declutter_!==void 0?"vector":"raster"}function lu(m,s){var b;let p={};for(const _ in m){const E=m[_].type;if(E&&E!=="object")p[_]=E==="number"?Number(s[_]):s[_];else if(typeof m[_]=="object"&&((b=m[_])!=null&&b.properties)){const y=lu(m[_].properties,s);Object.keys(y).length>0&&(p[_]=y)}}return p}function Gd(m,s){var E;if(!s||!m.getSource().getTileUrlFunction())return null;const p=new URL(m.getSource().getTileUrlFunction()([0,0,0])),b=Object.fromEntries(p.searchParams.entries()),_=lu(((E=s.schema)==null?void 0:E.properties)||s.schema,b);return Object.keys(_).length?_:null}const Wd=(m,s)=>m==null?void 0:m.filter(p=>["remove","sort"].filter(b=>s!=null&&s.get("layerControlDisable")?b!=="sort":!0).includes(p)),Zd=(m,s)=>m==null?void 0:m.filter(p=>{let b=!0;return["remove","sort"].includes(p)&&(b=!1),p==="info"&&(b=s.get("description")),p==="config"&&(b=s.get("layerConfig")),b}),Jd=(m,s)=>ae`
|
|
46
|
+
<button slot="${m}-icon" class="icon">${s?m:je}</button>
|
|
47
|
+
`,Yd=m=>ae`
|
|
48
|
+
<button
|
|
49
|
+
class="remove-icon icon"
|
|
50
|
+
@click=${()=>{const{layer:s}=m;s==null||s.set("layerControlOptional",!0),s==null||s.setVisible(!1),m.dispatchEvent(new CustomEvent("changed",{detail:s,bubbles:!0}))}}
|
|
51
|
+
>
|
|
52
|
+
${m.unstyled?"x":je}
|
|
53
|
+
</button>
|
|
54
|
+
`,Xd=m=>ae`
|
|
55
|
+
<button class="sort-icon icon drag-handle">
|
|
56
|
+
${m?"sort":je}
|
|
57
|
+
</button>
|
|
58
|
+
`;/**
|
|
46
59
|
* @license
|
|
47
60
|
* Copyright 2020 Google LLC
|
|
48
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/const
|
|
62
|
+
*/const cu=Hs(class extends Fs{constructor(m){if(super(m),m.type!==Ln.PROPERTY&&m.type!==Ln.ATTRIBUTE&&m.type!==Ln.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!mh(m))throw Error("`live` bindings can only contain a single expression")}render(m){return m}update(m,[s]){if(s===Nr||s===je)return s;const p=m.element,b=m.name;if(m.type===Ln.PROPERTY){if(s===p[b])return Nr}else if(m.type===Ln.BOOLEAN_ATTRIBUTE){if(!!s===p.hasAttribute(b))return Nr}else if(m.type===Ln.ATTRIBUTE&&p.getAttribute(b)===s+"")return Nr;return Sc(m),s}});/**
|
|
50
63
|
* @license
|
|
51
64
|
* Copyright 2017 Google LLC
|
|
52
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/class
|
|
66
|
+
*/class ul extends Fs{constructor(s){if(super(s),this.et=je,s.type!==Ln.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(s){if(s===je||s==null)return this.vt=void 0,this.et=s;if(s===Nr)return s;if(typeof s!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(s===this.et)return this.vt;this.et=s;const p=[s];return p.raw=p,this.vt={_$litType$:this.constructor.resultType,strings:p,values:[]}}}ul.directiveName="unsafeHTML",ul.resultType=1;const Kd=Hs(ul);/**
|
|
54
67
|
* @license
|
|
55
68
|
* Copyright 2021 Google LLC
|
|
56
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
|
-
*/function*Ia(y,l){if(y!==void 0){let p=0;for(const v of y)yield l(v,p++)}}var Ba=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qd(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var lc={exports:{}};/*! For license information please see jsoneditor.js.LICENSE.txt */(function(y,l){(function(p,v){y.exports=v()})(self,()=>(()=>{var p={9662:(m,O,r)=>{var b=r(614),g=r(6330),w=TypeError;m.exports=function(x){if(b(x))return x;throw w(g(x)+" is not a function")}},9483:(m,O,r)=>{var b=r(4411),g=r(6330),w=TypeError;m.exports=function(x){if(b(x))return x;throw w(g(x)+" is not a constructor")}},6077:(m,O,r)=>{var b=r(614),g=String,w=TypeError;m.exports=function(x){if(typeof x=="object"||b(x))return x;throw w("Can't set "+g(x)+" as a prototype")}},1223:(m,O,r)=>{var b=r(5112),g=r(30),w=r(3070).f,x=b("unscopables"),j=Array.prototype;j[x]==null&&w(j,x,{configurable:!0,value:g(null)}),m.exports=function(E){j[x][E]=!0}},1530:(m,O,r)=>{var b=r(8710).charAt;m.exports=function(g,w,x){return w+(x?b(g,w).length:1)}},5787:(m,O,r)=>{var b=r(7976),g=TypeError;m.exports=function(w,x){if(b(x,w))return w;throw g("Incorrect invocation")}},9670:(m,O,r)=>{var b=r(111),g=String,w=TypeError;m.exports=function(x){if(b(x))return x;throw w(g(x)+" is not an object")}},8533:(m,O,r)=>{var b=r(2092).forEach,g=r(9341)("forEach");m.exports=g?[].forEach:function(w){return b(this,w,arguments.length>1?arguments[1]:void 0)}},8457:(m,O,r)=>{var b=r(9974),g=r(6916),w=r(7908),x=r(3411),j=r(7659),E=r(4411),S=r(6244),T=r(6135),A=r(4121),R=r(1246),I=Array;m.exports=function($){var M=w($),B=E(this),q=arguments.length,F=q>1?arguments[1]:void 0,N=F!==void 0;N&&(F=b(F,q>2?arguments[2]:void 0));var U,H,X,Y,Q,tt,it=R(M),st=0;if(!it||this===I&&j(it))for(U=S(M),H=B?new this(U):I(U);U>st;st++)tt=N?F(M[st],st):M[st],T(H,st,tt);else for(Q=(Y=A(M,it)).next,H=B?new this:[];!(X=g(Q,Y)).done;st++)tt=N?x(Y,F,[X.value,st],!0):X.value,T(H,st,tt);return H.length=st,H}},1318:(m,O,r)=>{var b=r(5656),g=r(1400),w=r(6244),x=function(j){return function(E,S,T){var A,R=b(E),I=w(R),$=g(T,I);if(j&&S!=S){for(;I>$;)if((A=R[$++])!=A)return!0}else for(;I>$;$++)if((j||$ in R)&&R[$]===S)return j||$||0;return!j&&-1}};m.exports={includes:x(!0),indexOf:x(!1)}},2092:(m,O,r)=>{var b=r(9974),g=r(1702),w=r(8361),x=r(7908),j=r(6244),E=r(5417),S=g([].push),T=function(A){var R=A==1,I=A==2,$=A==3,M=A==4,B=A==6,q=A==7,F=A==5||B;return function(N,U,H,X){for(var Y,Q,tt=x(N),it=w(tt),st=b(U,H),mt=j(it),ut=0,Et=X||E,At=R?Et(N,mt):I||q?Et(N,0):void 0;mt>ut;ut++)if((F||ut in it)&&(Q=st(Y=it[ut],ut,tt),A))if(R)At[ut]=Q;else if(Q)switch(A){case 3:return!0;case 5:return Y;case 6:return ut;case 2:S(At,Y)}else switch(A){case 4:return!1;case 7:S(At,Y)}return B?-1:$||M?M:At}};m.exports={forEach:T(0),map:T(1),filter:T(2),some:T(3),every:T(4),find:T(5),findIndex:T(6),filterReject:T(7)}},1194:(m,O,r)=>{var b=r(7293),g=r(5112),w=r(7392),x=g("species");m.exports=function(j){return w>=51||!b(function(){var E=[];return(E.constructor={})[x]=function(){return{foo:1}},E[j](Boolean).foo!==1})}},9341:(m,O,r)=>{var b=r(7293);m.exports=function(g,w){var x=[][g];return!!x&&b(function(){x.call(null,w||function(){return 1},1)})}},3671:(m,O,r)=>{var b=r(9662),g=r(7908),w=r(8361),x=r(6244),j=TypeError,E=function(S){return function(T,A,R,I){b(A);var $=g(T),M=w($),B=x($),q=S?B-1:0,F=S?-1:1;if(R<2)for(;;){if(q in M){I=M[q],q+=F;break}if(q+=F,S?q<0:B<=q)throw j("Reduce of empty array with no initial value")}for(;S?q>=0:B>q;q+=F)q in M&&(I=A(I,M[q],q,$));return I}};m.exports={left:E(!1),right:E(!0)}},3658:(m,O,r)=>{var b=r(9781),g=r(3157),w=TypeError,x=Object.getOwnPropertyDescriptor,j=b&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}}();m.exports=j?function(E,S){if(g(E)&&!x(E,"length").writable)throw w("Cannot set read only .length");return E.length=S}:function(E,S){return E.length=S}},1589:(m,O,r)=>{var b=r(1400),g=r(6244),w=r(6135),x=Array,j=Math.max;m.exports=function(E,S,T){for(var A=g(E),R=b(S,A),I=b(T===void 0?A:T,A),$=x(j(I-R,0)),M=0;R<I;R++,M++)w($,M,E[R]);return $.length=M,$}},206:(m,O,r)=>{var b=r(1702);m.exports=b([].slice)},4362:(m,O,r)=>{var b=r(1589),g=Math.floor,w=function(E,S){var T=E.length,A=g(T/2);return T<8?x(E,S):j(E,w(b(E,0,A),S),w(b(E,A),S),S)},x=function(E,S){for(var T,A,R=E.length,I=1;I<R;){for(A=I,T=E[I];A&&S(E[A-1],T)>0;)E[A]=E[--A];A!==I++&&(E[A]=T)}return E},j=function(E,S,T,A){for(var R=S.length,I=T.length,$=0,M=0;$<R||M<I;)E[$+M]=$<R&&M<I?A(S[$],T[M])<=0?S[$++]:T[M++]:$<R?S[$++]:T[M++];return E};m.exports=w},7475:(m,O,r)=>{var b=r(3157),g=r(4411),w=r(111),x=r(5112)("species"),j=Array;m.exports=function(E){var S;return b(E)&&(S=E.constructor,(g(S)&&(S===j||b(S.prototype))||w(S)&&(S=S[x])===null)&&(S=void 0)),S===void 0?j:S}},5417:(m,O,r)=>{var b=r(7475);m.exports=function(g,w){return new(b(g))(w===0?0:w)}},3411:(m,O,r)=>{var b=r(9670),g=r(9212);m.exports=function(w,x,j,E){try{return E?x(b(j)[0],j[1]):x(j)}catch(S){g(w,"throw",S)}}},7072:(m,O,r)=>{var b=r(5112)("iterator"),g=!1;try{var w=0,x={next:function(){return{done:!!w++}},return:function(){g=!0}};x[b]=function(){return this},Array.from(x,function(){throw 2})}catch{}m.exports=function(j,E){if(!E&&!g)return!1;var S=!1;try{var T={};T[b]=function(){return{next:function(){return{done:S=!0}}}},j(T)}catch{}return S}},4326:(m,O,r)=>{var b=r(1702),g=b({}.toString),w=b("".slice);m.exports=function(x){return w(g(x),8,-1)}},648:(m,O,r)=>{var b=r(1694),g=r(614),w=r(4326),x=r(5112)("toStringTag"),j=Object,E=w(function(){return arguments}())=="Arguments";m.exports=b?w:function(S){var T,A,R;return S===void 0?"Undefined":S===null?"Null":typeof(A=function(I,$){try{return I[$]}catch{}}(T=j(S),x))=="string"?A:E?w(T):(R=w(T))=="Object"&&g(T.callee)?"Arguments":R}},9920:(m,O,r)=>{var b=r(2597),g=r(3887),w=r(1236),x=r(3070);m.exports=function(j,E,S){for(var T=g(E),A=x.f,R=w.f,I=0;I<T.length;I++){var $=T[I];b(j,$)||S&&b(S,$)||A(j,$,R(E,$))}}},4964:(m,O,r)=>{var b=r(5112)("match");m.exports=function(g){var w=/./;try{"/./"[g](w)}catch{try{return w[b]=!1,"/./"[g](w)}catch{}}return!1}},8544:(m,O,r)=>{var b=r(7293);m.exports=!b(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})},6178:m=>{m.exports=function(O,r){return{value:O,done:r}}},8880:(m,O,r)=>{var b=r(9781),g=r(3070),w=r(9114);m.exports=b?function(x,j,E){return g.f(x,j,w(1,E))}:function(x,j,E){return x[j]=E,x}},9114:m=>{m.exports=function(O,r){return{enumerable:!(1&O),configurable:!(2&O),writable:!(4&O),value:r}}},6135:(m,O,r)=>{var b=r(4948),g=r(3070),w=r(9114);m.exports=function(x,j,E){var S=b(j);S in x?g.f(x,S,w(0,E)):x[S]=E}},5573:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(6650).start,x=RangeError,j=isFinite,E=Math.abs,S=Date.prototype,T=S.toISOString,A=b(S.getTime),R=b(S.getUTCDate),I=b(S.getUTCFullYear),$=b(S.getUTCHours),M=b(S.getUTCMilliseconds),B=b(S.getUTCMinutes),q=b(S.getUTCMonth),F=b(S.getUTCSeconds);m.exports=g(function(){return T.call(new Date(-50000000000001))!="0385-07-25T07:06:39.999Z"})||!g(function(){T.call(new Date(NaN))})?function(){if(!j(A(this)))throw x("Invalid time value");var N=this,U=I(N),H=M(N),X=U<0?"-":U>9999?"+":"";return X+w(E(U),X?6:4,0)+"-"+w(q(N)+1,2,0)+"-"+w(R(N),2,0)+"T"+w($(N),2,0)+":"+w(B(N),2,0)+":"+w(F(N),2,0)+"."+w(H,3,0)+"Z"}:T},8709:(m,O,r)=>{var b=r(9670),g=r(2140),w=TypeError;m.exports=function(x){if(b(this),x==="string"||x==="default")x="string";else if(x!=="number")throw w("Incorrect hint");return g(this,x)}},7045:(m,O,r)=>{var b=r(6339),g=r(3070);m.exports=function(w,x,j){return j.get&&b(j.get,x,{getter:!0}),j.set&&b(j.set,x,{setter:!0}),g.f(w,x,j)}},8052:(m,O,r)=>{var b=r(614),g=r(3070),w=r(6339),x=r(3072);m.exports=function(j,E,S,T){T||(T={});var A=T.enumerable,R=T.name!==void 0?T.name:E;if(b(S)&&w(S,R,T),T.global)A?j[E]=S:x(E,S);else{try{T.unsafe?j[E]&&(A=!0):delete j[E]}catch{}A?j[E]=S:g.f(j,E,{value:S,enumerable:!1,configurable:!T.nonConfigurable,writable:!T.nonWritable})}return j}},3072:(m,O,r)=>{var b=r(7854),g=Object.defineProperty;m.exports=function(w,x){try{g(b,w,{value:x,configurable:!0,writable:!0})}catch{b[w]=x}return x}},5117:(m,O,r)=>{var b=r(6330),g=TypeError;m.exports=function(w,x){if(!delete w[x])throw g("Cannot delete property "+b(x)+" of "+b(w))}},9781:(m,O,r)=>{var b=r(7293);m.exports=!b(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},4154:m=>{var O=typeof document=="object"&&document.all,r=O===void 0&&O!==void 0;m.exports={all:O,IS_HTMLDDA:r}},317:(m,O,r)=>{var b=r(7854),g=r(111),w=b.document,x=g(w)&&g(w.createElement);m.exports=function(j){return x?w.createElement(j):{}}},7207:m=>{var O=TypeError;m.exports=function(r){if(r>9007199254740991)throw O("Maximum allowed index exceeded");return r}},8324:m=>{m.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(m,O,r)=>{var b=r(317)("span").classList,g=b&&b.constructor&&b.constructor.prototype;m.exports=g===Object.prototype?void 0:g},8886:(m,O,r)=>{var b=r(8113).match(/firefox\/(\d+)/i);m.exports=!!b&&+b[1]},7871:(m,O,r)=>{var b=r(3823),g=r(5268);m.exports=!b&&!g&&typeof window=="object"&&typeof document=="object"},9363:m=>{m.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},3823:m=>{m.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},256:(m,O,r)=>{var b=r(8113);m.exports=/MSIE|Trident/.test(b)},1528:(m,O,r)=>{var b=r(8113);m.exports=/ipad|iphone|ipod/i.test(b)&&typeof Pebble<"u"},8334:(m,O,r)=>{var b=r(8113);m.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(b)},5268:(m,O,r)=>{var b=r(4326);m.exports=typeof process<"u"&&b(process)=="process"},1036:(m,O,r)=>{var b=r(8113);m.exports=/web0s(?!.*chrome)/i.test(b)},8113:m=>{m.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7392:(m,O,r)=>{var b,g,w=r(7854),x=r(8113),j=w.process,E=w.Deno,S=j&&j.versions||E&&E.version,T=S&&S.v8;T&&(g=(b=T.split("."))[0]>0&&b[0]<4?1:+(b[0]+b[1])),!g&&x&&(!(b=x.match(/Edge\/(\d+)/))||b[1]>=74)&&(b=x.match(/Chrome\/(\d+)/))&&(g=+b[1]),m.exports=g},8008:(m,O,r)=>{var b=r(8113).match(/AppleWebKit\/(\d+)\./);m.exports=!!b&&+b[1]},748:m=>{m.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(m,O,r)=>{var b=r(7854),g=r(1236).f,w=r(8880),x=r(8052),j=r(3072),E=r(9920),S=r(4705);m.exports=function(T,A){var R,I,$,M,B,q=T.target,F=T.global,N=T.stat;if(R=F?b:N?b[q]||j(q,{}):(b[q]||{}).prototype)for(I in A){if(M=A[I],$=T.dontCallGetSet?(B=g(R,I))&&B.value:R[I],!S(F?I:q+(N?".":"#")+I,T.forced)&&$!==void 0){if(typeof M==typeof $)continue;E(M,$)}(T.sham||$&&$.sham)&&w(M,"sham",!0),x(R,I,M,T)}}},7293:m=>{m.exports=function(O){try{return!!O()}catch{return!0}}},7007:(m,O,r)=>{r(4916);var b=r(1470),g=r(8052),w=r(2261),x=r(7293),j=r(5112),E=r(8880),S=j("species"),T=RegExp.prototype;m.exports=function(A,R,I,$){var M=j(A),B=!x(function(){var U={};return U[M]=function(){return 7},""[A](U)!=7}),q=B&&!x(function(){var U=!1,H=/a/;return A==="split"&&((H={}).constructor={},H.constructor[S]=function(){return H},H.flags="",H[M]=/./[M]),H.exec=function(){return U=!0,null},H[M](""),!U});if(!B||!q||I){var F=b(/./[M]),N=R(M,""[A],function(U,H,X,Y,Q){var tt=b(U),it=H.exec;return it===w||it===T.exec?B&&!Q?{done:!0,value:F(H,X,Y)}:{done:!0,value:tt(X,H,Y)}:{done:!1}});g(String.prototype,A,N[0]),g(T,M,N[1])}$&&E(T[M],"sham",!0)}},2104:(m,O,r)=>{var b=r(4374),g=Function.prototype,w=g.apply,x=g.call;m.exports=typeof Reflect=="object"&&Reflect.apply||(b?x.bind(w):function(){return x.apply(w,arguments)})},9974:(m,O,r)=>{var b=r(1470),g=r(9662),w=r(4374),x=b(b.bind);m.exports=function(j,E){return g(j),E===void 0?j:w?x(j,E):function(){return j.apply(E,arguments)}}},4374:(m,O,r)=>{var b=r(7293);m.exports=!b(function(){var g=(function(){}).bind();return typeof g!="function"||g.hasOwnProperty("prototype")})},7065:(m,O,r)=>{var b=r(1702),g=r(9662),w=r(111),x=r(2597),j=r(206),E=r(4374),S=Function,T=b([].concat),A=b([].join),R={},I=function($,M,B){if(!x(R,M)){for(var q=[],F=0;F<M;F++)q[F]="a["+F+"]";R[M]=S("C,a","return new C("+A(q,",")+")")}return R[M]($,B)};m.exports=E?S.bind:function($){var M=g(this),B=M.prototype,q=j(arguments,1),F=function(){var N=T(q,j(arguments));return this instanceof F?I(M,N.length,N):M.apply($,N)};return w(B)&&(F.prototype=B),F}},6916:(m,O,r)=>{var b=r(4374),g=Function.prototype.call;m.exports=b?g.bind(g):function(){return g.apply(g,arguments)}},6530:(m,O,r)=>{var b=r(9781),g=r(2597),w=Function.prototype,x=b&&Object.getOwnPropertyDescriptor,j=g(w,"name"),E=j&&(function(){}).name==="something",S=j&&(!b||b&&x(w,"name").configurable);m.exports={EXISTS:j,PROPER:E,CONFIGURABLE:S}},5668:(m,O,r)=>{var b=r(1702),g=r(9662);m.exports=function(w,x,j){try{return b(g(Object.getOwnPropertyDescriptor(w,x)[j]))}catch{}}},1470:(m,O,r)=>{var b=r(4326),g=r(1702);m.exports=function(w){if(b(w)==="Function")return g(w)}},1702:(m,O,r)=>{var b=r(4374),g=Function.prototype,w=g.call,x=b&&g.bind.bind(w,w);m.exports=b?x:function(j){return function(){return w.apply(j,arguments)}}},5005:(m,O,r)=>{var b=r(7854),g=r(614),w=function(x){return g(x)?x:void 0};m.exports=function(x,j){return arguments.length<2?w(b[x]):b[x]&&b[x][j]}},1246:(m,O,r)=>{var b=r(648),g=r(8173),w=r(8554),x=r(7497),j=r(5112)("iterator");m.exports=function(E){if(!w(E))return g(E,j)||g(E,"@@iterator")||x[b(E)]}},4121:(m,O,r)=>{var b=r(6916),g=r(9662),w=r(9670),x=r(6330),j=r(1246),E=TypeError;m.exports=function(S,T){var A=arguments.length<2?j(S):T;if(g(A))return w(b(A,S));throw E(x(S)+" is not iterable")}},8044:(m,O,r)=>{var b=r(1702),g=r(3157),w=r(614),x=r(4326),j=r(1340),E=b([].push);m.exports=function(S){if(w(S))return S;if(g(S)){for(var T=S.length,A=[],R=0;R<T;R++){var I=S[R];typeof I=="string"?E(A,I):typeof I!="number"&&x(I)!="Number"&&x(I)!="String"||E(A,j(I))}var $=A.length,M=!0;return function(B,q){if(M)return M=!1,q;if(g(this))return q;for(var F=0;F<$;F++)if(A[F]===B)return q}}}},8173:(m,O,r)=>{var b=r(9662),g=r(8554);m.exports=function(w,x){var j=w[x];return g(j)?void 0:b(j)}},647:(m,O,r)=>{var b=r(1702),g=r(7908),w=Math.floor,x=b("".charAt),j=b("".replace),E=b("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;m.exports=function(A,R,I,$,M,B){var q=I+A.length,F=$.length,N=T;return M!==void 0&&(M=g(M),N=S),j(B,N,function(U,H){var X;switch(x(H,0)){case"$":return"$";case"&":return A;case"`":return E(R,0,I);case"'":return E(R,q);case"<":X=M[E(H,1,-1)];break;default:var Y=+H;if(Y===0)return U;if(Y>F){var Q=w(Y/10);return Q===0?U:Q<=F?$[Q-1]===void 0?x(H,1):$[Q-1]+x(H,1):U}X=$[Y-1]}return X===void 0?"":X})}},7854:(m,O,r)=>{var b=function(g){return g&&g.Math==Math&&g};m.exports=b(typeof globalThis=="object"&&globalThis)||b(typeof window=="object"&&window)||b(typeof self=="object"&&self)||b(typeof r.g=="object"&&r.g)||function(){return this}()||Function("return this")()},2597:(m,O,r)=>{var b=r(1702),g=r(7908),w=b({}.hasOwnProperty);m.exports=Object.hasOwn||function(x,j){return w(g(x),j)}},3501:m=>{m.exports={}},842:m=>{m.exports=function(O,r){try{arguments.length==1?console.error(O):console.error(O,r)}catch{}}},490:(m,O,r)=>{var b=r(5005);m.exports=b("document","documentElement")},4664:(m,O,r)=>{var b=r(9781),g=r(7293),w=r(317);m.exports=!b&&!g(function(){return Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a!=7})},8361:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(4326),x=Object,j=b("".split);m.exports=g(function(){return!x("z").propertyIsEnumerable(0)})?function(E){return w(E)=="String"?j(E,""):x(E)}:x},9587:(m,O,r)=>{var b=r(614),g=r(111),w=r(7674);m.exports=function(x,j,E){var S,T;return w&&b(S=j.constructor)&&S!==E&&g(T=S.prototype)&&T!==E.prototype&&w(x,T),x}},2788:(m,O,r)=>{var b=r(1702),g=r(614),w=r(5465),x=b(Function.toString);g(w.inspectSource)||(w.inspectSource=function(j){return x(j)}),m.exports=w.inspectSource},9909:(m,O,r)=>{var b,g,w,x=r(4811),j=r(7854),E=r(111),S=r(8880),T=r(2597),A=r(5465),R=r(6200),I=r(3501),$="Object already initialized",M=j.TypeError,B=j.WeakMap;if(x||A.state){var q=A.state||(A.state=new B);q.get=q.get,q.has=q.has,q.set=q.set,b=function(N,U){if(q.has(N))throw M($);return U.facade=N,q.set(N,U),U},g=function(N){return q.get(N)||{}},w=function(N){return q.has(N)}}else{var F=R("state");I[F]=!0,b=function(N,U){if(T(N,F))throw M($);return U.facade=N,S(N,F,U),U},g=function(N){return T(N,F)?N[F]:{}},w=function(N){return T(N,F)}}m.exports={set:b,get:g,has:w,enforce:function(N){return w(N)?g(N):b(N,{})},getterFor:function(N){return function(U){var H;if(!E(U)||(H=g(U)).type!==N)throw M("Incompatible receiver, "+N+" required");return H}}}},7659:(m,O,r)=>{var b=r(5112),g=r(7497),w=b("iterator"),x=Array.prototype;m.exports=function(j){return j!==void 0&&(g.Array===j||x[w]===j)}},3157:(m,O,r)=>{var b=r(4326);m.exports=Array.isArray||function(g){return b(g)=="Array"}},614:(m,O,r)=>{var b=r(4154),g=b.all;m.exports=b.IS_HTMLDDA?function(w){return typeof w=="function"||w===g}:function(w){return typeof w=="function"}},4411:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(614),x=r(648),j=r(5005),E=r(2788),S=function(){},T=[],A=j("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=b(R.exec),$=!R.exec(S),M=function(q){if(!w(q))return!1;try{return A(S,T,q),!0}catch{return!1}},B=function(q){if(!w(q))return!1;switch(x(q)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $||!!I(R,E(q))}catch{return!0}};B.sham=!0,m.exports=!A||g(function(){var q;return M(M.call)||!M(Object)||!M(function(){q=!0})||q})?B:M},5032:(m,O,r)=>{var b=r(2597);m.exports=function(g){return g!==void 0&&(b(g,"value")||b(g,"writable"))}},4705:(m,O,r)=>{var b=r(7293),g=r(614),w=/#|\.prototype\./,x=function(A,R){var I=E[j(A)];return I==T||I!=S&&(g(R)?b(R):!!R)},j=x.normalize=function(A){return String(A).replace(w,".").toLowerCase()},E=x.data={},S=x.NATIVE="N",T=x.POLYFILL="P";m.exports=x},8554:m=>{m.exports=function(O){return O==null}},111:(m,O,r)=>{var b=r(614),g=r(4154),w=g.all;m.exports=g.IS_HTMLDDA?function(x){return typeof x=="object"?x!==null:b(x)||x===w}:function(x){return typeof x=="object"?x!==null:b(x)}},1913:m=>{m.exports=!1},7850:(m,O,r)=>{var b=r(111),g=r(4326),w=r(5112)("match");m.exports=function(x){var j;return b(x)&&((j=x[w])!==void 0?!!j:g(x)=="RegExp")}},2190:(m,O,r)=>{var b=r(5005),g=r(614),w=r(7976),x=r(3307),j=Object;m.exports=x?function(E){return typeof E=="symbol"}:function(E){var S=b("Symbol");return g(S)&&w(S.prototype,j(E))}},408:(m,O,r)=>{var b=r(9974),g=r(6916),w=r(9670),x=r(6330),j=r(7659),E=r(6244),S=r(7976),T=r(4121),A=r(1246),R=r(9212),I=TypeError,$=function(B,q){this.stopped=B,this.result=q},M=$.prototype;m.exports=function(B,q,F){var N,U,H,X,Y,Q,tt,it=F&&F.that,st=!(!F||!F.AS_ENTRIES),mt=!(!F||!F.IS_RECORD),ut=!(!F||!F.IS_ITERATOR),Et=!(!F||!F.INTERRUPTED),At=b(q,it),Vt=function(wt){return N&&R(N,"normal",wt),new $(!0,wt)},lt=function(wt){return st?(w(wt),Et?At(wt[0],wt[1],Vt):At(wt[0],wt[1])):Et?At(wt,Vt):At(wt)};if(mt)N=B.iterator;else if(ut)N=B;else{if(!(U=A(B)))throw I(x(B)+" is not iterable");if(j(U)){for(H=0,X=E(B);X>H;H++)if((Y=lt(B[H]))&&S(M,Y))return Y;return new $(!1)}N=T(B,U)}for(Q=mt?B.next:N.next;!(tt=g(Q,N)).done;){try{Y=lt(tt.value)}catch(wt){R(N,"throw",wt)}if(typeof Y=="object"&&Y&&S(M,Y))return Y}return new $(!1)}},9212:(m,O,r)=>{var b=r(6916),g=r(9670),w=r(8173);m.exports=function(x,j,E){var S,T;g(x);try{if(!(S=w(x,"return"))){if(j==="throw")throw E;return E}S=b(S,x)}catch(A){T=!0,S=A}if(j==="throw")throw E;if(T)throw S;return g(S),E}},3061:(m,O,r)=>{var b=r(3383).IteratorPrototype,g=r(30),w=r(9114),x=r(8003),j=r(7497),E=function(){return this};m.exports=function(S,T,A,R){var I=T+" Iterator";return S.prototype=g(b,{next:w(+!R,A)}),x(S,I,!1,!0),j[I]=E,S}},1656:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(1913),x=r(6530),j=r(614),E=r(3061),S=r(9518),T=r(7674),A=r(8003),R=r(8880),I=r(8052),$=r(5112),M=r(7497),B=r(3383),q=x.PROPER,F=x.CONFIGURABLE,N=B.IteratorPrototype,U=B.BUGGY_SAFARI_ITERATORS,H=$("iterator"),X="keys",Y="values",Q="entries",tt=function(){return this};m.exports=function(it,st,mt,ut,Et,At,Vt){E(mt,st,ut);var lt,wt,_t,Ut=function(xt){if(xt===Et&&Bt)return Bt;if(!U&&xt in St)return St[xt];switch(xt){case X:case Y:case Q:return function(){return new mt(this,xt)}}return function(){return new mt(this)}},Qt=st+" Iterator",fe=!1,St=it.prototype,Ot=St[H]||St["@@iterator"]||Et&&St[Et],Bt=!U&&Ot||Ut(Et),qt=st=="Array"&&St.entries||Ot;if(qt&&(lt=S(qt.call(new it)))!==Object.prototype&<.next&&(w||S(lt)===N||(T?T(lt,N):j(lt[H])||I(lt,H,tt)),A(lt,Qt,!0,!0),w&&(M[Qt]=tt)),q&&Et==Y&&Ot&&Ot.name!==Y&&(!w&&F?R(St,"name",Y):(fe=!0,Bt=function(){return g(Ot,this)})),Et)if(wt={values:Ut(Y),keys:At?Bt:Ut(X),entries:Ut(Q)},Vt)for(_t in wt)(U||fe||!(_t in St))&&I(St,_t,wt[_t]);else b({target:st,proto:!0,forced:U||fe},wt);return w&&!Vt||St[H]===Bt||I(St,H,Bt,{name:Et}),M[st]=Bt,wt}},3383:(m,O,r)=>{var b,g,w,x=r(7293),j=r(614),E=r(111),S=r(30),T=r(9518),A=r(8052),R=r(5112),I=r(1913),$=R("iterator"),M=!1;[].keys&&("next"in(w=[].keys())?(g=T(T(w)))!==Object.prototype&&(b=g):M=!0),!E(b)||x(function(){var B={};return b[$].call(B)!==B})?b={}:I&&(b=S(b)),j(b[$])||A(b,$,function(){return this}),m.exports={IteratorPrototype:b,BUGGY_SAFARI_ITERATORS:M}},7497:m=>{m.exports={}},6244:(m,O,r)=>{var b=r(7466);m.exports=function(g){return b(g.length)}},6339:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(614),x=r(2597),j=r(9781),E=r(6530).CONFIGURABLE,S=r(2788),T=r(9909),A=T.enforce,R=T.get,I=String,$=Object.defineProperty,M=b("".slice),B=b("".replace),q=b([].join),F=j&&!g(function(){return $(function(){},"length",{value:8}).length!==8}),N=String(String).split("String"),U=m.exports=function(H,X,Y){M(I(X),0,7)==="Symbol("&&(X="["+B(I(X),/^Symbol\(([^)]*)\)/,"$1")+"]"),Y&&Y.getter&&(X="get "+X),Y&&Y.setter&&(X="set "+X),(!x(H,"name")||E&&H.name!==X)&&(j?$(H,"name",{value:X,configurable:!0}):H.name=X),F&&Y&&x(Y,"arity")&&H.length!==Y.arity&&$(H,"length",{value:Y.arity});try{Y&&x(Y,"constructor")&&Y.constructor?j&&$(H,"prototype",{writable:!1}):H.prototype&&(H.prototype=void 0)}catch{}var Q=A(H);return x(Q,"source")||(Q.source=q(N,typeof X=="string"?X:"")),H};Function.prototype.toString=U(function(){return w(this)&&R(this).source||S(this)},"toString")},4758:m=>{var O=Math.ceil,r=Math.floor;m.exports=Math.trunc||function(b){var g=+b;return(g>0?r:O)(g)}},5948:(m,O,r)=>{var b,g,w,x,j,E=r(7854),S=r(9974),T=r(1236).f,A=r(261).set,R=r(8572),I=r(8334),$=r(1528),M=r(1036),B=r(5268),q=E.MutationObserver||E.WebKitMutationObserver,F=E.document,N=E.process,U=E.Promise,H=T(E,"queueMicrotask"),X=H&&H.value;if(!X){var Y=new R,Q=function(){var tt,it;for(B&&(tt=N.domain)&&tt.exit();it=Y.get();)try{it()}catch(st){throw Y.head&&b(),st}tt&&tt.enter()};I||B||M||!q||!F?!$&&U&&U.resolve?((x=U.resolve(void 0)).constructor=U,j=S(x.then,x),b=function(){j(Q)}):B?b=function(){N.nextTick(Q)}:(A=S(A,E),b=function(){A(Q)}):(g=!0,w=F.createTextNode(""),new q(Q).observe(w,{characterData:!0}),b=function(){w.data=g=!g}),X=function(tt){Y.head||b(),Y.add(tt)}}m.exports=X},8523:(m,O,r)=>{var b=r(9662),g=TypeError,w=function(x){var j,E;this.promise=new x(function(S,T){if(j!==void 0||E!==void 0)throw g("Bad Promise constructor");j=S,E=T}),this.resolve=b(j),this.reject=b(E)};m.exports.f=function(x){return new w(x)}},3929:(m,O,r)=>{var b=r(7850),g=TypeError;m.exports=function(w){if(b(w))throw g("The method doesn't accept regular expressions");return w}},2814:(m,O,r)=>{var b=r(7854),g=r(7293),w=r(1702),x=r(1340),j=r(3111).trim,E=r(1361),S=w("".charAt),T=b.parseFloat,A=b.Symbol,R=A&&A.iterator,I=1/T(E+"-0")!=-1/0||R&&!g(function(){T(Object(R))});m.exports=I?function($){var M=j(x($)),B=T(M);return B===0&&S(M,0)=="-"?-0:B}:T},3009:(m,O,r)=>{var b=r(7854),g=r(7293),w=r(1702),x=r(1340),j=r(3111).trim,E=r(1361),S=b.parseInt,T=b.Symbol,A=T&&T.iterator,R=/^[+-]?0x/i,I=w(R.exec),$=S(E+"08")!==8||S(E+"0x16")!==22||A&&!g(function(){S(Object(A))});m.exports=$?function(M,B){var q=j(x(M));return S(q,B>>>0||(I(R,q)?16:10))}:S},1574:(m,O,r)=>{var b=r(9781),g=r(1702),w=r(6916),x=r(7293),j=r(1956),E=r(5181),S=r(5296),T=r(7908),A=r(8361),R=Object.assign,I=Object.defineProperty,$=g([].concat);m.exports=!R||x(function(){if(b&&R({b:1},R(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},B={},q=Symbol(),F="abcdefghijklmnopqrst";return M[q]=7,F.split("").forEach(function(N){B[N]=N}),R({},M)[q]!=7||j(R({},B)).join("")!=F})?function(M,B){for(var q=T(M),F=arguments.length,N=1,U=E.f,H=S.f;F>N;)for(var X,Y=A(arguments[N++]),Q=U?$(j(Y),U(Y)):j(Y),tt=Q.length,it=0;tt>it;)X=Q[it++],b&&!w(H,Y,X)||(q[X]=Y[X]);return q}:R},30:(m,O,r)=>{var b,g=r(9670),w=r(6048),x=r(748),j=r(3501),E=r(490),S=r(317),T=r(6200),A="prototype",R="script",I=T("IE_PROTO"),$=function(){},M=function(F){return"<"+R+">"+F+"</"+R+">"},B=function(F){F.write(M("")),F.close();var N=F.parentWindow.Object;return F=null,N},q=function(){try{b=new ActiveXObject("htmlfile")}catch{}var F,N,U;q=typeof document<"u"?document.domain&&b?B(b):(N=S("iframe"),U="java"+R+":",N.style.display="none",E.appendChild(N),N.src=String(U),(F=N.contentWindow.document).open(),F.write(M("document.F=Object")),F.close(),F.F):B(b);for(var H=x.length;H--;)delete q[A][x[H]];return q()};j[I]=!0,m.exports=Object.create||function(F,N){var U;return F!==null?($[A]=g(F),U=new $,$[A]=null,U[I]=F):U=q(),N===void 0?U:w.f(U,N)}},6048:(m,O,r)=>{var b=r(9781),g=r(3353),w=r(3070),x=r(9670),j=r(5656),E=r(1956);O.f=b&&!g?Object.defineProperties:function(S,T){x(S);for(var A,R=j(T),I=E(T),$=I.length,M=0;$>M;)w.f(S,A=I[M++],R[A]);return S}},3070:(m,O,r)=>{var b=r(9781),g=r(4664),w=r(3353),x=r(9670),j=r(4948),E=TypeError,S=Object.defineProperty,T=Object.getOwnPropertyDescriptor,A="enumerable",R="configurable",I="writable";O.f=b?w?function($,M,B){if(x($),M=j(M),x(B),typeof $=="function"&&M==="prototype"&&"value"in B&&I in B&&!B[I]){var q=T($,M);q&&q[I]&&($[M]=B.value,B={configurable:R in B?B[R]:q[R],enumerable:A in B?B[A]:q[A],writable:!1})}return S($,M,B)}:S:function($,M,B){if(x($),M=j(M),x(B),g)try{return S($,M,B)}catch{}if("get"in B||"set"in B)throw E("Accessors not supported");return"value"in B&&($[M]=B.value),$}},1236:(m,O,r)=>{var b=r(9781),g=r(6916),w=r(5296),x=r(9114),j=r(5656),E=r(4948),S=r(2597),T=r(4664),A=Object.getOwnPropertyDescriptor;O.f=b?A:function(R,I){if(R=j(R),I=E(I),T)try{return A(R,I)}catch{}if(S(R,I))return x(!g(w.f,R,I),R[I])}},1156:(m,O,r)=>{var b=r(4326),g=r(5656),w=r(8006).f,x=r(1589),j=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];m.exports.f=function(E){return j&&b(E)=="Window"?function(S){try{return w(S)}catch{return x(j)}}(E):w(g(E))}},8006:(m,O,r)=>{var b=r(6324),g=r(748).concat("length","prototype");O.f=Object.getOwnPropertyNames||function(w){return b(w,g)}},5181:(m,O)=>{O.f=Object.getOwnPropertySymbols},9518:(m,O,r)=>{var b=r(2597),g=r(614),w=r(7908),x=r(6200),j=r(8544),E=x("IE_PROTO"),S=Object,T=S.prototype;m.exports=j?S.getPrototypeOf:function(A){var R=w(A);if(b(R,E))return R[E];var I=R.constructor;return g(I)&&R instanceof I?I.prototype:R instanceof S?T:null}},7976:(m,O,r)=>{var b=r(1702);m.exports=b({}.isPrototypeOf)},6324:(m,O,r)=>{var b=r(1702),g=r(2597),w=r(5656),x=r(1318).indexOf,j=r(3501),E=b([].push);m.exports=function(S,T){var A,R=w(S),I=0,$=[];for(A in R)!g(j,A)&&g(R,A)&&E($,A);for(;T.length>I;)g(R,A=T[I++])&&(~x($,A)||E($,A));return $}},1956:(m,O,r)=>{var b=r(6324),g=r(748);m.exports=Object.keys||function(w){return b(w,g)}},5296:(m,O)=>{var r={}.propertyIsEnumerable,b=Object.getOwnPropertyDescriptor,g=b&&!r.call({1:2},1);O.f=g?function(w){var x=b(this,w);return!!x&&x.enumerable}:r},7674:(m,O,r)=>{var b=r(5668),g=r(9670),w=r(6077);m.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var x,j=!1,E={};try{(x=b(Object.prototype,"__proto__","set"))(E,[]),j=E instanceof Array}catch{}return function(S,T){return g(S),w(T),j?x(S,T):S.__proto__=T,S}}():void 0)},4699:(m,O,r)=>{var b=r(9781),g=r(1702),w=r(1956),x=r(5656),j=g(r(5296).f),E=g([].push),S=function(T){return function(A){for(var R,I=x(A),$=w(I),M=$.length,B=0,q=[];M>B;)R=$[B++],b&&!j(I,R)||E(q,T?[R,I[R]]:I[R]);return q}};m.exports={entries:S(!0),values:S(!1)}},288:(m,O,r)=>{var b=r(1694),g=r(648);m.exports=b?{}.toString:function(){return"[object "+g(this)+"]"}},2140:(m,O,r)=>{var b=r(6916),g=r(614),w=r(111),x=TypeError;m.exports=function(j,E){var S,T;if(E==="string"&&g(S=j.toString)&&!w(T=b(S,j))||g(S=j.valueOf)&&!w(T=b(S,j))||E!=="string"&&g(S=j.toString)&&!w(T=b(S,j)))return T;throw x("Can't convert object to primitive value")}},3887:(m,O,r)=>{var b=r(5005),g=r(1702),w=r(8006),x=r(5181),j=r(9670),E=g([].concat);m.exports=b("Reflect","ownKeys")||function(S){var T=w.f(j(S)),A=x.f;return A?E(T,A(S)):T}},857:(m,O,r)=>{var b=r(7854);m.exports=b},2534:m=>{m.exports=function(O){try{return{error:!1,value:O()}}catch(r){return{error:!0,value:r}}}},3702:(m,O,r)=>{var b=r(7854),g=r(2492),w=r(614),x=r(4705),j=r(2788),E=r(5112),S=r(7871),T=r(3823),A=r(1913),R=r(7392),I=g&&g.prototype,$=E("species"),M=!1,B=w(b.PromiseRejectionEvent),q=x("Promise",function(){var F=j(g),N=F!==String(g);if(!N&&R===66||A&&(!I.catch||!I.finally))return!0;if(!R||R<51||!/native code/.test(F)){var U=new g(function(X){X(1)}),H=function(X){X(function(){},function(){})};if((U.constructor={})[$]=H,!(M=U.then(function(){})instanceof H))return!0}return!N&&(S||T)&&!B});m.exports={CONSTRUCTOR:q,REJECTION_EVENT:B,SUBCLASSING:M}},2492:(m,O,r)=>{var b=r(7854);m.exports=b.Promise},9478:(m,O,r)=>{var b=r(9670),g=r(111),w=r(8523);m.exports=function(x,j){if(b(x),g(j)&&j.constructor===x)return j;var E=w.f(x);return(0,E.resolve)(j),E.promise}},612:(m,O,r)=>{var b=r(2492),g=r(7072),w=r(3702).CONSTRUCTOR;m.exports=w||!g(function(x){b.all(x).then(void 0,function(){})})},2626:(m,O,r)=>{var b=r(3070).f;m.exports=function(g,w,x){x in g||b(g,x,{configurable:!0,get:function(){return w[x]},set:function(j){w[x]=j}})}},8572:m=>{var O=function(){this.head=null,this.tail=null};O.prototype={add:function(r){var b={item:r,next:null},g=this.tail;g?g.next=b:this.head=b,this.tail=b},get:function(){var r=this.head;if(r)return(this.head=r.next)===null&&(this.tail=null),r.item}},m.exports=O},7651:(m,O,r)=>{var b=r(6916),g=r(9670),w=r(614),x=r(4326),j=r(2261),E=TypeError;m.exports=function(S,T){var A=S.exec;if(w(A)){var R=b(A,S,T);return R!==null&&g(R),R}if(x(S)==="RegExp")return b(j,S,T);throw E("RegExp#exec called on incompatible receiver")}},2261:(m,O,r)=>{var b,g,w=r(6916),x=r(1702),j=r(1340),E=r(7066),S=r(2999),T=r(2309),A=r(30),R=r(9909).get,I=r(9441),$=r(7168),M=T("native-string-replace",String.prototype.replace),B=RegExp.prototype.exec,q=B,F=x("".charAt),N=x("".indexOf),U=x("".replace),H=x("".slice),X=(g=/b*/g,w(B,b=/a/,"a"),w(B,g,"a"),b.lastIndex!==0||g.lastIndex!==0),Y=S.BROKEN_CARET,Q=/()??/.exec("")[1]!==void 0;(X||Q||Y||I||$)&&(q=function(tt){var it,st,mt,ut,Et,At,Vt,lt=this,wt=R(lt),_t=j(tt),Ut=wt.raw;if(Ut)return Ut.lastIndex=lt.lastIndex,it=w(q,Ut,_t),lt.lastIndex=Ut.lastIndex,it;var Qt=wt.groups,fe=Y&<.sticky,St=w(E,lt),Ot=lt.source,Bt=0,qt=_t;if(fe&&(St=U(St,"y",""),N(St,"g")===-1&&(St+="g"),qt=H(_t,lt.lastIndex),lt.lastIndex>0&&(!lt.multiline||lt.multiline&&F(_t,lt.lastIndex-1)!==`
|
|
58
|
-
`)&&(
|
|
59
|
-
`)&&w.flags==="s")})},7168:(
|
|
60
|
-
\v\f\r \u2028\u2029\uFEFF`},2222:(m,O,r)=>{var b=r(2109),g=r(7293),w=r(3157),x=r(111),j=r(7908),E=r(6244),S=r(7207),T=r(6135),A=r(5417),R=r(1194),I=r(5112),$=r(7392),M=I("isConcatSpreadable"),B=$>=51||!g(function(){var F=[];return F[M]=!1,F.concat()[0]!==F}),q=function(F){if(!x(F))return!1;var N=F[M];return N!==void 0?!!N:w(F)};b({target:"Array",proto:!0,arity:1,forced:!B||!R("concat")},{concat:function(F){var N,U,H,X,Y,Q=j(this),tt=A(Q,0),it=0;for(N=-1,H=arguments.length;N<H;N++)if(q(Y=N===-1?Q:arguments[N]))for(X=E(Y),S(it+X),U=0;U<X;U++,it++)U in Y&&T(tt,it,Y[U]);else S(it+1),T(tt,it++,Y);return tt.length=it,tt}})},6541:(m,O,r)=>{var b=r(2109),g=r(2092).every;b({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},7327:(m,O,r)=>{var b=r(2109),g=r(2092).filter;b({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},9826:(m,O,r)=>{var b=r(2109),g=r(2092).find,w=r(1223),x="find",j=!0;x in[]&&Array(1)[x](function(){j=!1}),b({target:"Array",proto:!0,forced:j},{find:function(E){return g(this,E,arguments.length>1?arguments[1]:void 0)}}),w(x)},9554:(m,O,r)=>{var b=r(2109),g=r(8533);b({target:"Array",proto:!0,forced:[].forEach!=g},{forEach:g})},1038:(m,O,r)=>{var b=r(2109),g=r(8457);b({target:"Array",stat:!0,forced:!r(7072)(function(w){Array.from(w)})},{from:g})},6699:(m,O,r)=>{var b=r(2109),g=r(1318).includes,w=r(7293),x=r(1223);b({target:"Array",proto:!0,forced:w(function(){return!Array(1).includes()})},{includes:function(j){return g(this,j,arguments.length>1?arguments[1]:void 0)}}),x("includes")},2772:(m,O,r)=>{var b=r(2109),g=r(1470),w=r(1318).indexOf,x=r(9341),j=g([].indexOf),E=!!j&&1/j([1],1,-0)<0;b({target:"Array",proto:!0,forced:E||!x("indexOf")},{indexOf:function(S){var T=arguments.length>1?arguments[1]:void 0;return E?j(this,S,T)||0:w(this,S,T)}})},9753:(m,O,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(m,O,r)=>{var b=r(5656),g=r(1223),w=r(7497),x=r(9909),j=r(3070).f,E=r(1656),S=r(6178),T=r(1913),A=r(9781),R="Array Iterator",I=x.set,$=x.getterFor(R);m.exports=E(Array,"Array",function(B,q){I(this,{type:R,target:b(B),index:0,kind:q})},function(){var B=$(this),q=B.target,F=B.kind,N=B.index++;return!q||N>=q.length?(B.target=void 0,S(void 0,!0)):S(F=="keys"?N:F=="values"?q[N]:[N,q[N]],!1)},"values");var M=w.Arguments=w.Array;if(g("keys"),g("values"),g("entries"),!T&&A&&M.name!=="values")try{j(M,"name",{value:"values"})}catch{}},9600:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(8361),x=r(5656),j=r(9341),E=g([].join);b({target:"Array",proto:!0,forced:w!=Object||!j("join",",")},{join:function(S){return E(x(this),S===void 0?",":S)}})},1249:(m,O,r)=>{var b=r(2109),g=r(2092).map;b({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},5827:(m,O,r)=>{var b=r(2109),g=r(3671).left,w=r(9341),x=r(7392);b({target:"Array",proto:!0,forced:!r(5268)&&x>79&&x<83||!w("reduce")},{reduce:function(j){var E=arguments.length;return g(this,j,E,E>1?arguments[1]:void 0)}})},5069:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(3157),x=g([].reverse),j=[1,2];b({target:"Array",proto:!0,forced:String(j)===String(j.reverse())},{reverse:function(){return w(this)&&(this.length=this.length),x(this)}})},7042:(m,O,r)=>{var b=r(2109),g=r(3157),w=r(4411),x=r(111),j=r(1400),E=r(6244),S=r(5656),T=r(6135),A=r(5112),R=r(1194),I=r(206),$=R("slice"),M=A("species"),B=Array,q=Math.max;b({target:"Array",proto:!0,forced:!$},{slice:function(F,N){var U,H,X,Y=S(this),Q=E(Y),tt=j(F,Q),it=j(N===void 0?Q:N,Q);if(g(Y)&&(U=Y.constructor,(w(U)&&(U===B||g(U.prototype))||x(U)&&(U=U[M])===null)&&(U=void 0),U===B||U===void 0))return I(Y,tt,it);for(H=new(U===void 0?B:U)(q(it-tt,0)),X=0;tt<it;tt++,X++)tt in Y&&T(H,X,Y[tt]);return H.length=X,H}})},5212:(m,O,r)=>{var b=r(2109),g=r(2092).some;b({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},2707:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(9662),x=r(7908),j=r(6244),E=r(5117),S=r(1340),T=r(7293),A=r(4362),R=r(9341),I=r(8886),$=r(256),M=r(7392),B=r(8008),q=[],F=g(q.sort),N=g(q.push),U=T(function(){q.sort(void 0)}),H=T(function(){q.sort(null)}),X=R("sort"),Y=!T(function(){if(M)return M<70;if(!(I&&I>3)){if($)return!0;if(B)return B<603;var Q,tt,it,st,mt="";for(Q=65;Q<76;Q++){switch(tt=String.fromCharCode(Q),Q){case 66:case 69:case 70:case 72:it=3;break;case 68:case 71:it=4;break;default:it=2}for(st=0;st<47;st++)q.push({k:tt+st,v:it})}for(q.sort(function(ut,Et){return Et.v-ut.v}),st=0;st<q.length;st++)tt=q[st].k.charAt(0),mt.charAt(mt.length-1)!==tt&&(mt+=tt);return mt!=="DGBEFHACIJK"}});b({target:"Array",proto:!0,forced:U||!H||!X||!Y},{sort:function(Q){Q!==void 0&&w(Q);var tt=x(this);if(Y)return Q===void 0?F(tt):F(tt,Q);var it,st,mt=[],ut=j(tt);for(st=0;st<ut;st++)st in tt&&N(mt,tt[st]);for(A(mt,function(Et){return function(At,Vt){return Vt===void 0?-1:At===void 0?1:Et!==void 0?+Et(At,Vt)||0:S(At)>S(Vt)?1:-1}}(Q)),it=j(mt),st=0;st<it;)tt[st]=mt[st++];for(;st<ut;)E(tt,st++);return tt}})},561:(m,O,r)=>{var b=r(2109),g=r(7908),w=r(1400),x=r(9303),j=r(6244),E=r(3658),S=r(7207),T=r(5417),A=r(6135),R=r(5117),I=r(1194)("splice"),$=Math.max,M=Math.min;b({target:"Array",proto:!0,forced:!I},{splice:function(B,q){var F,N,U,H,X,Y,Q=g(this),tt=j(Q),it=w(B,tt),st=arguments.length;for(st===0?F=N=0:st===1?(F=0,N=tt-it):(F=st-2,N=M($(x(q),0),tt-it)),S(tt+F-N),U=T(Q,N),H=0;H<N;H++)(X=it+H)in Q&&A(U,H,Q[X]);if(U.length=N,F<N){for(H=it;H<tt-N;H++)Y=H+F,(X=H+N)in Q?Q[Y]=Q[X]:R(Q,Y);for(H=tt;H>tt-N+F;H--)R(Q,H-1)}else if(F>N)for(H=tt-N;H>it;H--)Y=H+F-1,(X=H+N-1)in Q?Q[Y]=Q[X]:R(Q,Y);for(H=0;H<F;H++)Q[H+it]=arguments[H+2];return E(Q,tt-N+F),U}})},3843:(m,O,r)=>{var b=r(2109),g=r(1702),w=Date,x=g(w.prototype.getTime);b({target:"Date",stat:!0},{now:function(){return x(new w)}})},8733:(m,O,r)=>{var b=r(2109),g=r(5573);b({target:"Date",proto:!0,forced:Date.prototype.toISOString!==g},{toISOString:g})},6078:(m,O,r)=>{var b=r(2597),g=r(8052),w=r(8709),x=r(5112)("toPrimitive"),j=Date.prototype;b(j,x)||g(j,x,w)},3710:(m,O,r)=>{var b=r(1702),g=r(8052),w=Date.prototype,x="Invalid Date",j="toString",E=b(w[j]),S=b(w.getTime);String(new Date(NaN))!=x&&g(w,j,function(){var T=S(this);return T==T?E(this):x})},4812:(m,O,r)=>{var b=r(2109),g=r(7065);b({target:"Function",proto:!0,forced:Function.bind!==g},{bind:g})},8309:(m,O,r)=>{var b=r(9781),g=r(6530).EXISTS,w=r(1702),x=r(7045),j=Function.prototype,E=w(j.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=w(S.exec);b&&!g&&x(j,"name",{configurable:!0,get:function(){try{return T(S,E(this))[1]}catch{return""}}})},8862:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(2104),x=r(6916),j=r(1702),E=r(7293),S=r(614),T=r(2190),A=r(206),R=r(8044),I=r(6293),$=String,M=g("JSON","stringify"),B=j(/./.exec),q=j("".charAt),F=j("".charCodeAt),N=j("".replace),U=j(1 .toString),H=/[\uD800-\uDFFF]/g,X=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,Q=!I||E(function(){var mt=g("Symbol")();return M([mt])!="[null]"||M({a:mt})!="{}"||M(Object(mt))!="{}"}),tt=E(function(){return M("\uDF06\uD834")!=='"\\udf06\\ud834"'||M("\uDEAD")!=='"\\udead"'}),it=function(mt,ut){var Et=A(arguments),At=R(ut);if(S(At)||mt!==void 0&&!T(mt))return Et[1]=function(Vt,lt){if(S(At)&&(lt=x(At,this,$(Vt),lt)),!T(lt))return lt},w(M,null,Et)},st=function(mt,ut,Et){var At=q(Et,ut-1),Vt=q(Et,ut+1);return B(X,mt)&&!B(Y,Vt)||B(Y,mt)&&!B(X,At)?"\\u"+U(F(mt,0),16):mt};M&&b({target:"JSON",stat:!0,arity:3,forced:Q||tt},{stringify:function(mt,ut,Et){var At=A(arguments),Vt=w(Q?it:M,null,At);return tt&&typeof Vt=="string"?N(Vt,H,st):Vt}})},3706:(m,O,r)=>{var b=r(7854);r(8003)(b.JSON,"JSON",!0)},2703:(m,O,r)=>{r(8003)(Math,"Math",!0)},9653:(m,O,r)=>{var b=r(2109),g=r(1913),w=r(9781),x=r(7854),j=r(857),E=r(1702),S=r(4705),T=r(2597),A=r(9587),R=r(7976),I=r(2190),$=r(7593),M=r(7293),B=r(8006).f,q=r(1236).f,F=r(3070).f,N=r(863),U=r(3111).trim,H="Number",X=x[H],Y=j[H],Q=X.prototype,tt=x.TypeError,it=E("".slice),st=E("".charCodeAt),mt=function(wt){var _t=$(wt,"number");return typeof _t=="bigint"?_t:ut(_t)},ut=function(wt){var _t,Ut,Qt,fe,St,Ot,Bt,qt,xt=$(wt,"number");if(I(xt))throw tt("Cannot convert a Symbol value to a number");if(typeof xt=="string"&&xt.length>2){if(xt=U(xt),(_t=st(xt,0))===43||_t===45){if((Ut=st(xt,2))===88||Ut===120)return NaN}else if(_t===48){switch(st(xt,1)){case 66:case 98:Qt=2,fe=49;break;case 79:case 111:Qt=8,fe=55;break;default:return+xt}for(Ot=(St=it(xt,2)).length,Bt=0;Bt<Ot;Bt++)if((qt=st(St,Bt))<48||qt>fe)return NaN;return parseInt(St,Qt)}}return+xt},Et=S(H,!X(" 0o1")||!X("0b1")||X("+0x1")),At=function(wt){return R(Q,wt)&&M(function(){N(wt)})},Vt=function(wt){var _t=arguments.length<1?0:X(mt(wt));return At(this)?A(Object(_t),this,Vt):_t};Vt.prototype=Q,Et&&!g&&(Q.constructor=Vt),b({global:!0,constructor:!0,wrap:!0,forced:Et},{Number:Vt});var lt=function(wt,_t){for(var Ut,Qt=w?B(_t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),fe=0;Qt.length>fe;fe++)T(_t,Ut=Qt[fe])&&!T(wt,Ut)&&F(wt,Ut,q(_t,Ut))};g&&Y&<(j[H],Y),(Et||g)&<(j[H],X)},6977:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(9303),x=r(863),j=r(8415),E=r(7293),S=RangeError,T=String,A=Math.floor,R=g(j),I=g("".slice),$=g(1 .toFixed),M=function(N,U,H){return U===0?H:U%2==1?M(N,U-1,H*N):M(N*N,U/2,H)},B=function(N,U,H){for(var X=-1,Y=H;++X<6;)Y+=U*N[X],N[X]=Y%1e7,Y=A(Y/1e7)},q=function(N,U){for(var H=6,X=0;--H>=0;)X+=N[H],N[H]=A(X/U),X=X%U*1e7},F=function(N){for(var U=6,H="";--U>=0;)if(H!==""||U===0||N[U]!==0){var X=T(N[U]);H=H===""?X:H+R("0",7-X.length)+X}return H};b({target:"Number",proto:!0,forced:E(function(){return $(8e-5,3)!=="0.000"||$(.9,0)!=="1"||$(1.255,2)!=="1.25"||$(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!E(function(){$({})})},{toFixed:function(N){var U,H,X,Y,Q=x(this),tt=w(N),it=[0,0,0,0,0,0],st="",mt="0";if(tt<0||tt>20)throw S("Incorrect fraction digits");if(Q!=Q)return"NaN";if(Q<=-1e21||Q>=1e21)return T(Q);if(Q<0&&(st="-",Q=-Q),Q>1e-21)if(H=(U=function(ut){for(var Et=0,At=ut;At>=4096;)Et+=12,At/=4096;for(;At>=2;)Et+=1,At/=2;return Et}(Q*M(2,69,1))-69)<0?Q*M(2,-U,1):Q/M(2,U,1),H*=4503599627370496,(U=52-U)>0){for(B(it,0,H),X=tt;X>=7;)B(it,1e7,0),X-=7;for(B(it,M(10,X,1),0),X=U-1;X>=23;)q(it,8388608),X-=23;q(it,1<<X),B(it,1,1),q(it,2),mt=F(it)}else B(it,0,H),B(it,1<<-U,0),mt=F(it)+R("0",tt);return tt>0?st+((Y=mt.length)<=tt?"0."+R("0",tt-Y)+mt:I(mt,0,Y-tt)+"."+I(mt,Y-tt)):st+mt}})},9601:(m,O,r)=>{var b=r(2109),g=r(1574);b({target:"Object",stat:!0,arity:2,forced:Object.assign!==g},{assign:g})},8011:(m,O,r)=>{r(2109)({target:"Object",stat:!0,sham:!r(9781)},{create:r(30)})},3321:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(6048).f;b({target:"Object",stat:!0,forced:Object.defineProperties!==w,sham:!g},{defineProperties:w})},9070:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(3070).f;b({target:"Object",stat:!0,forced:Object.defineProperty!==w,sham:!g},{defineProperty:w})},9720:(m,O,r)=>{var b=r(2109),g=r(4699).entries;b({target:"Object",stat:!0},{entries:function(w){return g(w)}})},5003:(m,O,r)=>{var b=r(2109),g=r(7293),w=r(5656),x=r(1236).f,j=r(9781);b({target:"Object",stat:!0,forced:!j||g(function(){x(1)}),sham:!j},{getOwnPropertyDescriptor:function(E,S){return x(w(E),S)}})},9337:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(3887),x=r(5656),j=r(1236),E=r(6135);b({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(S){for(var T,A,R=x(S),I=j.f,$=w(R),M={},B=0;$.length>B;)(A=I(R,T=$[B++]))!==void 0&&E(M,T,A);return M}})},9660:(m,O,r)=>{var b=r(2109),g=r(6293),w=r(7293),x=r(5181),j=r(7908);b({target:"Object",stat:!0,forced:!g||w(function(){x.f(1)})},{getOwnPropertySymbols:function(E){var S=x.f;return S?S(j(E)):[]}})},489:(m,O,r)=>{var b=r(2109),g=r(7293),w=r(7908),x=r(9518),j=r(8544);b({target:"Object",stat:!0,forced:g(function(){x(1)}),sham:!j},{getPrototypeOf:function(E){return x(w(E))}})},7941:(m,O,r)=>{var b=r(2109),g=r(7908),w=r(1956);b({target:"Object",stat:!0,forced:r(7293)(function(){w(1)})},{keys:function(x){return w(g(x))}})},8304:(m,O,r)=>{r(2109)({target:"Object",stat:!0},{setPrototypeOf:r(7674)})},1539:(m,O,r)=>{var b=r(1694),g=r(8052),w=r(288);b||g(Object.prototype,"toString",w,{unsafe:!0})},6833:(m,O,r)=>{var b=r(2109),g=r(4699).values;b({target:"Object",stat:!0},{values:function(w){return g(w)}})},4678:(m,O,r)=>{var b=r(2109),g=r(2814);b({global:!0,forced:parseFloat!=g},{parseFloat:g})},1058:(m,O,r)=>{var b=r(2109),g=r(3009);b({global:!0,forced:parseInt!=g},{parseInt:g})},821:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(9662),x=r(8523),j=r(2534),E=r(408);b({target:"Promise",stat:!0,forced:r(612)},{all:function(S){var T=this,A=x.f(T),R=A.resolve,I=A.reject,$=j(function(){var M=w(T.resolve),B=[],q=0,F=1;E(S,function(N){var U=q++,H=!1;F++,g(M,T,N).then(function(X){H||(H=!0,B[U]=X,--F||R(B))},I)}),--F||R(B)});return $.error&&I($.value),A.promise}})},4164:(m,O,r)=>{var b=r(2109),g=r(1913),w=r(3702).CONSTRUCTOR,x=r(2492),j=r(5005),E=r(614),S=r(8052),T=x&&x.prototype;if(b({target:"Promise",proto:!0,forced:w,real:!0},{catch:function(R){return this.then(void 0,R)}}),!g&&E(x)){var A=j("Promise").prototype.catch;T.catch!==A&&S(T,"catch",A,{unsafe:!0})}},3401:(m,O,r)=>{var b,g,w,x=r(2109),j=r(1913),E=r(5268),S=r(7854),T=r(6916),A=r(8052),R=r(7674),I=r(8003),$=r(6340),M=r(9662),B=r(614),q=r(111),F=r(5787),N=r(6707),U=r(261).set,H=r(5948),X=r(842),Y=r(2534),Q=r(8572),tt=r(9909),it=r(2492),st=r(3702),mt=r(8523),ut="Promise",Et=st.CONSTRUCTOR,At=st.REJECTION_EVENT,Vt=st.SUBCLASSING,lt=tt.getterFor(ut),wt=tt.set,_t=it&&it.prototype,Ut=it,Qt=_t,fe=S.TypeError,St=S.document,Ot=S.process,Bt=mt.f,qt=Bt,xt=!!(St&&St.createEvent&&S.dispatchEvent),sr="unhandledrejection",de=function(ot){var bt;return!(!q(ot)||!B(bt=ot.then))&&bt},Ne=function(ot,bt){var Ht,Mt,Kt,Ze=bt.value,Qe=bt.state==1,_r=Qe?ot.ok:ot.fail,Ke=ot.resolve,pr=ot.reject,Se=ot.domain;try{_r?(Qe||(bt.rejection===2&&Le(bt),bt.rejection=1),_r===!0?Ht=Ze:(Se&&Se.enter(),Ht=_r(Ze),Se&&(Se.exit(),Kt=!0)),Ht===ot.promise?pr(fe("Promise-chain cycle")):(Mt=de(Ht))?T(Mt,Ht,Ke,pr):Ke(Ht)):pr(Ze)}catch(Dn){Se&&!Kt&&Se.exit(),pr(Dn)}},_e=function(ot,bt){ot.notified||(ot.notified=!0,H(function(){for(var Ht,Mt=ot.reactions;Ht=Mt.get();)Ne(Ht,ot);ot.notified=!1,bt&&!ot.rejection&&Ae(ot)}))},lr=function(ot,bt,Ht){var Mt,Kt;xt?((Mt=St.createEvent("Event")).promise=bt,Mt.reason=Ht,Mt.initEvent(ot,!1,!0),S.dispatchEvent(Mt)):Mt={promise:bt,reason:Ht},!At&&(Kt=S["on"+ot])?Kt(Mt):ot===sr&&X("Unhandled promise rejection",Ht)},Ae=function(ot){T(U,S,function(){var bt,Ht=ot.facade,Mt=ot.value;if(hr(ot)&&(bt=Y(function(){E?Ot.emit("unhandledRejection",Mt,Ht):lr(sr,Ht,Mt)}),ot.rejection=E||hr(ot)?2:1,bt.error))throw bt.value})},hr=function(ot){return ot.rejection!==1&&!ot.parent},Le=function(ot){T(U,S,function(){var bt=ot.facade;E?Ot.emit("rejectionHandled",bt):lr("rejectionhandled",bt,ot.value)})},We=function(ot,bt,Ht){return function(Mt){ot(bt,Mt,Ht)}},Ce=function(ot,bt,Ht){ot.done||(ot.done=!0,Ht&&(ot=Ht),ot.value=bt,ot.state=2,_e(ot,!0))},dr=function(ot,bt,Ht){if(!ot.done){ot.done=!0,Ht&&(ot=Ht);try{if(ot.facade===bt)throw fe("Promise can't be resolved itself");var Mt=de(bt);Mt?H(function(){var Kt={done:!1};try{T(Mt,bt,We(dr,Kt,ot),We(Ce,Kt,ot))}catch(Ze){Ce(Kt,Ze,ot)}}):(ot.value=bt,ot.state=1,_e(ot,!1))}catch(Kt){Ce({done:!1},Kt,ot)}}};if(Et&&(Qt=(Ut=function(ot){F(this,Qt),M(ot),T(b,this);var bt=lt(this);try{ot(We(dr,bt),We(Ce,bt))}catch(Ht){Ce(bt,Ht)}}).prototype,(b=function(ot){wt(this,{type:ut,done:!1,notified:!1,parent:!1,reactions:new Q,rejection:!1,state:0,value:void 0})}).prototype=A(Qt,"then",function(ot,bt){var Ht=lt(this),Mt=Bt(N(this,Ut));return Ht.parent=!0,Mt.ok=!B(ot)||ot,Mt.fail=B(bt)&&bt,Mt.domain=E?Ot.domain:void 0,Ht.state==0?Ht.reactions.add(Mt):H(function(){Ne(Mt,Ht)}),Mt.promise}),g=function(){var ot=new b,bt=lt(ot);this.promise=ot,this.resolve=We(dr,bt),this.reject=We(Ce,bt)},mt.f=Bt=function(ot){return ot===Ut||ot===void 0?new g(ot):qt(ot)},!j&&B(it)&&_t!==Object.prototype)){w=_t.then,Vt||A(_t,"then",function(ot,bt){var Ht=this;return new Ut(function(Mt,Kt){T(w,Ht,Mt,Kt)}).then(ot,bt)},{unsafe:!0});try{delete _t.constructor}catch{}R&&R(_t,Qt)}x({global:!0,constructor:!0,wrap:!0,forced:Et},{Promise:Ut}),I(Ut,ut,!1,!0),$(ut)},8674:(m,O,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(9662),x=r(8523),j=r(2534),E=r(408);b({target:"Promise",stat:!0,forced:r(612)},{race:function(S){var T=this,A=x.f(T),R=A.reject,I=j(function(){var $=w(T.resolve);E(S,function(M){g($,T,M).then(A.resolve,R)})});return I.error&&R(I.value),A.promise}})},683:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(8523);b({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(x){var j=w.f(this);return g(j.reject,void 0,x),j.promise}})},6294:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(1913),x=r(2492),j=r(3702).CONSTRUCTOR,E=r(9478),S=g("Promise"),T=w&&!j;b({target:"Promise",stat:!0,forced:w||j},{resolve:function(A){return E(T&&this===S?x:this,A)}})},2419:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(2104),x=r(7065),j=r(9483),E=r(9670),S=r(111),T=r(30),A=r(7293),R=g("Reflect","construct"),I=Object.prototype,$=[].push,M=A(function(){function F(){}return!(R(function(){},[],F)instanceof F)}),B=!A(function(){R(function(){})}),q=M||B;b({target:"Reflect",stat:!0,forced:q,sham:q},{construct:function(F,N){j(F),E(N);var U=arguments.length<3?F:j(arguments[2]);if(B&&!M)return R(F,N,U);if(F==U){switch(N.length){case 0:return new F;case 1:return new F(N[0]);case 2:return new F(N[0],N[1]);case 3:return new F(N[0],N[1],N[2]);case 4:return new F(N[0],N[1],N[2],N[3])}var H=[null];return w($,H,N),new(w(x,F,H))}var X=U.prototype,Y=T(S(X)?X:I),Q=w(F,Y,N);return S(Q)?Q:Y}})},4819:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(111),x=r(9670),j=r(5032),E=r(1236),S=r(9518);b({target:"Reflect",stat:!0},{get:function T(A,R){var I,$,M=arguments.length<3?A:arguments[2];return x(A)===M?A[R]:(I=E.f(A,R))?j(I)?I.value:I.get===void 0?void 0:g(I.get,M):w($=S(A))?T($,R,M):void 0}})},4603:(m,O,r)=>{var b=r(9781),g=r(7854),w=r(1702),x=r(4705),j=r(9587),E=r(8880),S=r(8006).f,T=r(7976),A=r(7850),R=r(1340),I=r(4706),$=r(2999),M=r(2626),B=r(8052),q=r(7293),F=r(2597),N=r(9909).enforce,U=r(6340),H=r(5112),X=r(9441),Y=r(7168),Q=H("match"),tt=g.RegExp,it=tt.prototype,st=g.SyntaxError,mt=w(it.exec),ut=w("".charAt),Et=w("".replace),At=w("".indexOf),Vt=w("".slice),lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,wt=/a/g,_t=/a/g,Ut=new tt(wt)!==wt,Qt=$.MISSED_STICKY,fe=$.UNSUPPORTED_Y;if(x("RegExp",b&&(!Ut||Qt||X||Y||q(function(){return _t[Q]=!1,tt(wt)!=wt||tt(_t)==_t||tt(wt,"i")!="/a/i"})))){for(var St=function(qt,xt){var sr,de,Ne,_e,lr,Ae,hr=T(it,this),Le=A(qt),We=xt===void 0,Ce=[],dr=qt;if(!hr&&Le&&We&&qt.constructor===St)return qt;if((Le||T(it,qt))&&(qt=qt.source,We&&(xt=I(dr))),qt=qt===void 0?"":R(qt),xt=xt===void 0?"":R(xt),dr=qt,X&&"dotAll"in wt&&(de=!!xt&&At(xt,"s")>-1)&&(xt=Et(xt,/s/g,"")),sr=xt,Qt&&"sticky"in wt&&(Ne=!!xt&&At(xt,"y")>-1)&&fe&&(xt=Et(xt,/y/g,"")),Y&&(_e=function(ot){for(var bt,Ht=ot.length,Mt=0,Kt="",Ze=[],Qe={},_r=!1,Ke=!1,pr=0,Se="";Mt<=Ht;Mt++){if((bt=ut(ot,Mt))==="\\")bt+=ut(ot,++Mt);else if(bt==="]")_r=!1;else if(!_r)switch(!0){case bt==="[":_r=!0;break;case bt==="(":mt(lt,Vt(ot,Mt+1))&&(Mt+=2,Ke=!0),Kt+=bt,pr++;continue;case(bt===">"&&Ke):if(Se===""||F(Qe,Se))throw new st("Invalid capture group name");Qe[Se]=!0,Ze[Ze.length]=[Se,pr],Ke=!1,Se="";continue}Ke?Se+=bt:Kt+=bt}return[Kt,Ze]}(qt),qt=_e[0],Ce=_e[1]),lr=j(tt(qt,xt),hr?this:it,St),(de||Ne||Ce.length)&&(Ae=N(lr),de&&(Ae.dotAll=!0,Ae.raw=St(function(ot){for(var bt,Ht=ot.length,Mt=0,Kt="",Ze=!1;Mt<=Ht;Mt++)(bt=ut(ot,Mt))!=="\\"?Ze||bt!=="."?(bt==="["?Ze=!0:bt==="]"&&(Ze=!1),Kt+=bt):Kt+="[\\s\\S]":Kt+=bt+ut(ot,++Mt);return Kt}(qt),sr)),Ne&&(Ae.sticky=!0),Ce.length&&(Ae.groups=Ce)),qt!==dr)try{E(lr,"source",dr===""?"(?:)":dr)}catch{}return lr},Ot=S(tt),Bt=0;Ot.length>Bt;)M(St,tt,Ot[Bt++]);it.constructor=St,St.prototype=it,B(g,"RegExp",St,{constructor:!0})}U("RegExp")},4916:(m,O,r)=>{var b=r(2109),g=r(2261);b({target:"RegExp",proto:!0,forced:/./.exec!==g},{exec:g})},9714:(m,O,r)=>{var b=r(6530).PROPER,g=r(8052),w=r(9670),x=r(1340),j=r(7293),E=r(4706),S="toString",T=RegExp.prototype[S],A=j(function(){return T.call({source:"a",flags:"b"})!="/a/b"}),R=b&&T.name!=S;(A||R)&&g(RegExp.prototype,S,function(){var I=w(this);return"/"+x(I.source)+"/"+x(E(I))},{unsafe:!0})},2023:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(3929),x=r(4488),j=r(1340),E=r(4964),S=g("".indexOf);b({target:"String",proto:!0,forced:!E("includes")},{includes:function(T){return!!~S(j(x(this)),j(w(T)),arguments.length>1?arguments[1]:void 0)}})},8783:(m,O,r)=>{var b=r(8710).charAt,g=r(1340),w=r(9909),x=r(1656),j=r(6178),E="String Iterator",S=w.set,T=w.getterFor(E);x(String,"String",function(A){S(this,{type:E,string:g(A),index:0})},function(){var A,R=T(this),I=R.string,$=R.index;return $>=I.length?j(void 0,!0):(A=b(I,$),R.index+=A.length,j(A,!1))})},4723:(m,O,r)=>{var b=r(6916),g=r(7007),w=r(9670),x=r(8554),j=r(7466),E=r(1340),S=r(4488),T=r(8173),A=r(1530),R=r(7651);g("match",function(I,$,M){return[function(B){var q=S(this),F=x(B)?void 0:T(B,I);return F?b(F,B,q):new RegExp(B)[I](E(q))},function(B){var q=w(this),F=E(B),N=M($,q,F);if(N.done)return N.value;if(!q.global)return R(q,F);var U=q.unicode;q.lastIndex=0;for(var H,X=[],Y=0;(H=R(q,F))!==null;){var Q=E(H[0]);X[Y]=Q,Q===""&&(q.lastIndex=A(F,j(q.lastIndex),U)),Y++}return Y===0?null:X}]})},5306:(m,O,r)=>{var b=r(2104),g=r(6916),w=r(1702),x=r(7007),j=r(7293),E=r(9670),S=r(614),T=r(8554),A=r(9303),R=r(7466),I=r(1340),$=r(4488),M=r(1530),B=r(8173),q=r(647),F=r(7651),N=r(5112)("replace"),U=Math.max,H=Math.min,X=w([].concat),Y=w([].push),Q=w("".indexOf),tt=w("".slice),it="a".replace(/./,"$0")==="$0",st=!!/./[N]&&/./[N]("a","$0")==="";x("replace",function(mt,ut,Et){var At=st?"$":"$0";return[function(Vt,lt){var wt=$(this),_t=T(Vt)?void 0:B(Vt,N);return _t?g(_t,Vt,wt,lt):g(ut,I(wt),Vt,lt)},function(Vt,lt){var wt=E(this),_t=I(Vt);if(typeof lt=="string"&&Q(lt,At)===-1&&Q(lt,"$<")===-1){var Ut=Et(ut,wt,_t,lt);if(Ut.done)return Ut.value}var Qt=S(lt);Qt||(lt=I(lt));var fe=wt.global;if(fe){var St=wt.unicode;wt.lastIndex=0}for(var Ot=[];;){var Bt=F(wt,_t);if(Bt===null||(Y(Ot,Bt),!fe))break;I(Bt[0])===""&&(wt.lastIndex=M(_t,R(wt.lastIndex),St))}for(var qt,xt="",sr=0,de=0;de<Ot.length;de++){for(var Ne=I((Bt=Ot[de])[0]),_e=U(H(A(Bt.index),_t.length),0),lr=[],Ae=1;Ae<Bt.length;Ae++)Y(lr,(qt=Bt[Ae])===void 0?qt:String(qt));var hr=Bt.groups;if(Qt){var Le=X([Ne],lr,_e,_t);hr!==void 0&&Y(Le,hr);var We=I(b(lt,void 0,Le))}else We=q(Ne,_t,_e,lr,hr,lt);_e>=sr&&(xt+=tt(_t,sr,_e)+We,sr=_e+Ne.length)}return xt+tt(_t,sr)}]},!!j(function(){var mt=/./;return mt.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(mt,"$<a>")!=="7"})||!it||st)},6755:(m,O,r)=>{var b,g=r(2109),w=r(1470),x=r(1236).f,j=r(7466),E=r(1340),S=r(3929),T=r(4488),A=r(4964),R=r(1913),I=w("".startsWith),$=w("".slice),M=Math.min,B=A("startsWith");g({target:"String",proto:!0,forced:!(!R&&!B&&(b=x(String.prototype,"startsWith"),b&&!b.writable)||B)},{startsWith:function(q){var F=E(T(this));S(q);var N=j(M(arguments.length>1?arguments[1]:void 0,F.length)),U=E(q);return I?I(F,U,N):$(F,N,N+U.length)===U}})},3210:(m,O,r)=>{var b=r(2109),g=r(3111).trim;b({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return g(this)}})},2443:(m,O,r)=>{r(6800)("asyncIterator")},4032:(m,O,r)=>{var b=r(2109),g=r(7854),w=r(6916),x=r(1702),j=r(1913),E=r(9781),S=r(6293),T=r(7293),A=r(2597),R=r(7976),I=r(9670),$=r(5656),M=r(4948),B=r(1340),q=r(9114),F=r(30),N=r(1956),U=r(8006),H=r(1156),X=r(5181),Y=r(1236),Q=r(3070),tt=r(6048),it=r(5296),st=r(8052),mt=r(7045),ut=r(2309),Et=r(6200),At=r(3501),Vt=r(9711),lt=r(5112),wt=r(6061),_t=r(6800),Ut=r(6532),Qt=r(8003),fe=r(9909),St=r(2092).forEach,Ot=Et("hidden"),Bt="Symbol",qt="prototype",xt=fe.set,sr=fe.getterFor(Bt),de=Object[qt],Ne=g.Symbol,_e=Ne&&Ne[qt],lr=g.TypeError,Ae=g.QObject,hr=Y.f,Le=Q.f,We=H.f,Ce=it.f,dr=x([].push),ot=ut("symbols"),bt=ut("op-symbols"),Ht=ut("wks"),Mt=!Ae||!Ae[qt]||!Ae[qt].findChild,Kt=E&&T(function(){return F(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(Nt,te,Xt){var le=hr(de,te);le&&delete de[te],Le(Nt,te,Xt),le&&Nt!==de&&Le(de,te,le)}:Le,Ze=function(Nt,te){var Xt=ot[Nt]=F(_e);return xt(Xt,{type:Bt,tag:Nt,description:te}),E||(Xt.description=te),Xt},Qe=function(Nt,te,Xt){Nt===de&&Qe(bt,te,Xt),I(Nt);var le=M(te);return I(Xt),A(ot,le)?(Xt.enumerable?(A(Nt,Ot)&&Nt[Ot][le]&&(Nt[Ot][le]=!1),Xt=F(Xt,{enumerable:q(0,!1)})):(A(Nt,Ot)||Le(Nt,Ot,q(1,{})),Nt[Ot][le]=!0),Kt(Nt,le,Xt)):Le(Nt,le,Xt)},_r=function(Nt,te){I(Nt);var Xt=$(te),le=N(Xt).concat(Dn(Xt));return St(le,function(ze){E&&!w(Ke,Xt,ze)||Qe(Nt,ze,Xt[ze])}),Nt},Ke=function(Nt){var te=M(Nt),Xt=w(Ce,this,te);return!(this===de&&A(ot,te)&&!A(bt,te))&&(!(Xt||!A(this,te)||!A(ot,te)||A(this,Ot)&&this[Ot][te])||Xt)},pr=function(Nt,te){var Xt=$(Nt),le=M(te);if(Xt!==de||!A(ot,le)||A(bt,le)){var ze=hr(Xt,le);return!ze||!A(ot,le)||A(Xt,Ot)&&Xt[Ot][le]||(ze.enumerable=!0),ze}},Se=function(Nt){var te=We($(Nt)),Xt=[];return St(te,function(le){A(ot,le)||A(At,le)||dr(Xt,le)}),Xt},Dn=function(Nt){var te=Nt===de,Xt=We(te?bt:$(Nt)),le=[];return St(Xt,function(ze){!A(ot,ze)||te&&!A(de,ze)||dr(le,ot[ze])}),le};S||(st(_e=(Ne=function(){if(R(_e,this))throw lr("Symbol is not a constructor");var Nt=arguments.length&&arguments[0]!==void 0?B(arguments[0]):void 0,te=Vt(Nt),Xt=function(le){this===de&&w(Xt,bt,le),A(this,Ot)&&A(this[Ot],te)&&(this[Ot][te]=!1),Kt(this,te,q(1,le))};return E&&Mt&&Kt(de,te,{configurable:!0,set:Xt}),Ze(te,Nt)})[qt],"toString",function(){return sr(this).tag}),st(Ne,"withoutSetter",function(Nt){return Ze(Vt(Nt),Nt)}),it.f=Ke,Q.f=Qe,tt.f=_r,Y.f=pr,U.f=H.f=Se,X.f=Dn,wt.f=function(Nt){return Ze(lt(Nt),Nt)},E&&(mt(_e,"description",{configurable:!0,get:function(){return sr(this).description}}),j||st(de,"propertyIsEnumerable",Ke,{unsafe:!0}))),b({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:Ne}),St(N(Ht),function(Nt){_t(Nt)}),b({target:Bt,stat:!0,forced:!S},{useSetter:function(){Mt=!0},useSimple:function(){Mt=!1}}),b({target:"Object",stat:!0,forced:!S,sham:!E},{create:function(Nt,te){return te===void 0?F(Nt):_r(F(Nt),te)},defineProperty:Qe,defineProperties:_r,getOwnPropertyDescriptor:pr}),b({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:Se}),Ut(),Qt(Ne,Bt),At[Ot]=!0},1817:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(7854),x=r(1702),j=r(2597),E=r(614),S=r(7976),T=r(1340),A=r(7045),R=r(9920),I=w.Symbol,$=I&&I.prototype;if(g&&E(I)&&(!("description"in $)||I().description!==void 0)){var M={},B=function(){var Y=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),Q=S($,this)?new I(Y):Y===void 0?I():I(Y);return Y===""&&(M[Q]=!0),Q};R(B,I),B.prototype=$,$.constructor=B;var q=String(I("test"))=="Symbol(test)",F=x($.valueOf),N=x($.toString),U=/^Symbol\((.*)\)[^)]+$/,H=x("".replace),X=x("".slice);A($,"description",{configurable:!0,get:function(){var Y=F(this);if(j(M,Y))return"";var Q=N(Y),tt=q?X(Q,7,-1):H(Q,U,"$1");return tt===""?void 0:tt}}),b({global:!0,constructor:!0,forced:!0},{Symbol:B})}},763:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(2597),x=r(1340),j=r(2309),E=r(2015),S=j("string-to-symbol-registry"),T=j("symbol-to-string-registry");b({target:"Symbol",stat:!0,forced:!E},{for:function(A){var R=x(A);if(w(S,R))return S[R];var I=g("Symbol")(R);return S[R]=I,T[I]=R,I}})},2165:(m,O,r)=>{r(6800)("iterator")},2526:(m,O,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(m,O,r)=>{var b=r(2109),g=r(2597),w=r(2190),x=r(6330),j=r(2309),E=r(2015),S=j("symbol-to-string-registry");b({target:"Symbol",stat:!0,forced:!E},{keyFor:function(T){if(!w(T))throw TypeError(x(T)+" is not a symbol");if(g(S,T))return S[T]}})},6649:(m,O,r)=>{var b=r(6800),g=r(6532);b("toPrimitive"),g()},3680:(m,O,r)=>{var b=r(5005),g=r(6800),w=r(8003);g("toStringTag"),w(b("Symbol"),"Symbol")},4747:(m,O,r)=>{var b=r(7854),g=r(8324),w=r(8509),x=r(8533),j=r(8880),E=function(T){if(T&&T.forEach!==x)try{j(T,"forEach",x)}catch{T.forEach=x}};for(var S in g)g[S]&&E(b[S]&&b[S].prototype);E(w)},3948:(m,O,r)=>{var b=r(7854),g=r(8324),w=r(8509),x=r(6992),j=r(8880),E=r(5112),S=E("iterator"),T=E("toStringTag"),A=x.values,R=function($,M){if($){if($[S]!==A)try{j($,S,A)}catch{$[S]=A}if($[T]||j($,T,M),g[M]){for(var B in x)if($[B]!==x[B])try{j($,B,x[B])}catch{$[B]=x[B]}}}};for(var I in g)R(b[I]&&b[I].prototype,I);R(w,"DOMTokenList")},6815:(m,O,r)=>{var b=r(2109),g=r(7854),w=r(7152)(g.setInterval,!0);b({global:!0,bind:!0,forced:g.setInterval!==w},{setInterval:w})},8417:(m,O,r)=>{var b=r(2109),g=r(7854),w=r(7152)(g.setTimeout,!0);b({global:!0,bind:!0,forced:g.setTimeout!==w},{setTimeout:w})},2564:(m,O,r)=>{r(6815),r(8417)}},v={};function k(m){var O=v[m];if(O!==void 0)return O.exports;var r=v[m]={exports:{}};return p[m](r,r.exports,k),r.exports}k.d=(m,O)=>{for(var r in O)k.o(O,r)&&!k.o(m,r)&&Object.defineProperty(m,r,{enumerable:!0,get:O[r]})},k.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),k.o=(m,O)=>Object.prototype.hasOwnProperty.call(m,O),k.r=m=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})};var C={};return(()=>{k.r(C),k.d(C,{JSONEditor:()=>Tn}),k(3710),k(1539),k(9714),k(5827),k(6833),k(9826),k(9554),k(4747),k(7941),k(2222),k(9601),k(6649),k(6078),k(2526),k(1817),k(9653),k(9070),k(8674),k(2165),k(6992),k(8783),k(3948),k(2443),k(3680),k(3706),k(2703),k(8011),k(489),k(8309),k(8304),k(5069),k(7042),k(9753),k(1038),k(4916),k(9720),k(5306),k(4603),k(6699);var m=["actionscript","batchfile","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","groovy","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","prql","r","ruby","rust","sass","scala","scss","sh","smarty","sql","sqlserver","stylus","svg","typescript","twig","vbscript","xml","yaml","zig"],O=[function(u){return u.type==="string"&&u.format==="color"&&"colorpicker"},function(u){return u.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(u.format)&&"ip"},function(u){return u.type==="string"&&m.includes(u.format)&&"ace"},function(u){return u.type==="string"&&["xhtml","bbcode"].includes(u.format)&&"sceditor"},function(u){return u.type==="string"&&u.format==="markdown"&&"simplemde"},function(u){return u.type==="string"&&u.format==="jodit"&&"jodit"},function(u){return u.type==="string"&&u.format==="autocomplete"&&"autocomplete"},function(u){return u.type==="string"&&u.format==="uuid"&&"uuid"},function(u){return u.format==="info"&&"info"},function(u){return u.format==="button"&&"button"},function(u){if((u.type==="integer"||u.type==="number")&&u.format==="stepper")return"stepper"},function(u){if(u.links){for(var n=0;n<u.links.length;n++)if(u.links[n].rel&&u.links[n].rel.toLowerCase()==="describedby")return"describedBy"}},function(u){return["string","integer"].includes(u.type)&&["starrating","rating"].includes(u.format)&&"starrating"},function(u){return["string","integer"].includes(u.type)&&["date","time","datetime-local"].includes(u.format)&&"datetime"},function(u){return(u.oneOf||u.anyOf)&&"multiple"},function(u){return u.if&&"multiple"},function(u,n){if(u.items&&(u.items=n.expandSchema(u.items)),u.type==="array"&&u.items&&!Array.isArray(u.items)&&["string","number","integer"].includes(u.items.type)){if(u.format==="choices")return"arrayChoices";if(u.uniqueItems){if(u.format==="selectize")return"arraySelectize";if(u.format==="select2")return"arraySelect2";if(u.items.enum)return"multiselect"}}},function(u){if(u.enum){if(u.type==="array"||u.type==="object")return"enum";if(u.type==="number"||u.type==="integer"||u.type==="string")return u.format==="radio"?"radio":u.format==="select2"?"select2":u.format==="selectize"?"selectize":u.format==="choices"?"choices":"select"}},function(u){if(u.enumSource)return u.format==="radio"?"radio":u.format==="select2"?"select2":u.format==="selectize"?"selectize":u.format==="choices"?"choices":"select"},function(u){return u.type==="array"&&u.format==="table"&&"table"},function(u){return u.type==="string"&&u.format==="url"&&window.FileReader&&u.options&&u.options.upload===Object(u.options.upload)&&"upload"},function(u){return u.type==="string"&&u.media&&u.media.binaryEncoding==="base64"&&"base64"},function(u){return u.type==="any"&&"multiple"},function(u){if(u.type==="boolean")return u.format==="checkbox"||u.options&&u.options.checkbox?"checkbox":u.format==="select2"?"select2":u.format==="selectize"?"selectize":u.format==="choices"?"choices":"select"},function(u){return u.type==="string"&&u.format==="signature"&&"signature"},function(u){return typeof u.type=="string"&&u.type},function(u){return!u.type&&u.properties&&"object"},function(u){return typeof u.type!="string"&&"multiple"}];function r(u,n,f){return(n=function(i){var h=function(a,s){if(b(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(b(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i);return b(h)==="symbol"?h:String(h)}(n))in u?Object.defineProperty(u,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):u[n]=f,u}function b(u){return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},b(u)}function g(u){return!(u===null||b(u)!=="object"||u.nodeType||u===u.window||u.constructor&&!S(u.constructor.prototype,"isPrototypeOf"))}function w(u){return g(u)?x({},u):Array.isArray(u)?u.map(w):u}function x(u){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];return f.forEach(function(h){h&&Object.keys(h).forEach(function(a){h[a]&&g(h[a])?(S(u,a)||(u[a]={}),x(u[a],h[a])):Array.isArray(h[a])?u[a]=w(h[a]):u[a]=h[a]})}),u}function j(u,n){var f=document.createEvent("HTMLEvents");f.initEvent(n,!0,!0),u.dispatchEvent(f)}function E(u){return u&&(u.toString()==="[object ShadowRoot]"?u:E(u.parentNode))}function S(u,n){return u&&Object.prototype.hasOwnProperty.call(u,n)}k(4812),k(2419),k(4819),k(5003),k(4723),k(2023),k(9600),k(6755),k(5212),k(1249),k(4678),k(1058);var T=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,A=/^\s*(-|\+)?(\d+)\s*$/;function R(){var u=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(u+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var f=(u+16*Math.random())%16|0;return u=Math.floor(u/16),(n==="x"?f:3&f|8).toString(16)})}function I(u){return u&&b(u)==="object"&&!Array.isArray(u)}function $(u){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];if(!f.length)return u;var h=f.shift();if(I(u)&&I(h))for(var a in h)I(h[a])?(u[a]||Object.assign(u,r({},a,{})),$(u[a],h[a])):Object.assign(u,r({},a,h[a]));return $.apply(void 0,[u].concat(f))}function M(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function B(u){return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},B(u)}function q(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(B(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(B(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),B(h)==="symbol"?h:String(h)),i)}var h}var F=function(){function u(i,h){(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,u),this.defaults=h,this.jsoneditor=i.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=i.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=x({},this.options||{},this.schema.options||{},i.schema.options||{},i),this.formname=this.jsoneditor.options.form_name_root||"root",i.path||this.schema.id||(this.schema.id=this.formname),this.path=i.path||this.formname,this.formname=i.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=i.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,i.container&&this.setContainer(i.container),this.registerDependencies()}var n,f;return n=u,f=[{key:"onChildEditorChange",value:function(i){this.onChange(!0)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}},{key:"onChange",value:function(i){this.notify(),this.watch_listener&&this.watch_listener(),i&&this.change()}},{key:"register",value:function(){this.jsoneditor.registerEditor(this),this.onChange()}},{key:"unregister",value:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}},{key:"getNumColumns",value:function(){return 12}},{key:"isActive",value:function(){return this.active}},{key:"activate",value:function(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}},{key:"registerDependencies",value:function(){var i=this;this.dependenciesFulfilled=!0;var h=this.options.dependencies;h&&Object.keys(h).forEach(function(a){var s;a.startsWith(i.jsoneditor.root.path)?s=a:((s=i.path.split("."))[s.length-1]=a,s=s.join(".")),i.jsoneditor.watch(s,function(){i.evaluateDependencies()})})}},{key:"evaluateDependencies",value:function(){var i=this,h=this.container||this.control;if(h&&this.jsoneditor!==null){var a=this.options.dependencies;if(a){var s=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(a).forEach(function(e){var o;e.startsWith(i.jsoneditor.root.path)?o=e:((o=i.path.split("."))[o.length-1]=e,o=o.join("."));var c=a[e];i.checkDependency(o,c)}),this.dependenciesFulfilled!==s&&this.notify();var t=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(t="none"),h.tagName==="TD"?Object.keys(h.childNodes).forEach(function(e){return h.childNodes[e].style.display=t}):h.style.display=t}}}},{key:"checkDependency",value:function(i,h){var a=this;if(this.path!==i&&this.jsoneditor!==null){var s=this.jsoneditor.getEditor(i),t=s?s.getValue():void 0;s&&s.dependenciesFulfilled?Array.isArray(h)?this.dependenciesFulfilled=h.some(function(e){if(JSON.stringify(t)===JSON.stringify(e))return!0}):B(h)==="object"?B(t)!=="object"?this.dependenciesFulfilled=h===t:Object.keys(h).some(function(e){return!!S(h,e)&&(S(t,e)&&h[e]===t[e]?void 0:(a.dependenciesFulfilled=!1,!0))}):typeof h=="string"||typeof h=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&t===h:typeof h=="boolean"&&(this.dependenciesFulfilled=h?this.dependenciesFulfilled&&(t||t.length>0):this.dependenciesFulfilled&&(!t||t.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(i){this.container=i,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(i){var h=this;this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",function(){h.isActive()?h.deactivate():h.activate()});var a=this.jsoneditor.options.show_opt_in,s=this.parent.options.show_opt_in!==void 0,t=s&&this.parent.options.show_opt_in===!0,e=s&&this.parent.options.show_opt_in===!1;(t||!e&&a||!s&&a)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}},{key:"setupWatchListeners",value:function(){var i=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){i.refreshWatchedFieldValues()&&i.onWatchedFieldChange()},S(this.schema,"watch")){var h,a,s,t,e,o=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(function(c){if(h=i.schema.watch[c],Array.isArray(h)){if(h.length<2)return;a=[h[0]].concat(h[1].split("."))}else a=h.split("."),i.theme.closest(i.container,'[data-schemaid="'.concat(a[0],'"]'))||a.unshift("#");if((s=a.shift())==="#"&&(s=i.jsoneditor.schema.id||i.jsoneditor.root.formname),!(t=i.theme.closest(i.container,'[data-schemaid="'.concat(s,'"]'))))throw new Error("Could not find ancestor node with id ".concat(s));e="".concat(t.getAttribute("data-schemapath"),".").concat(a.join(".")),o.startsWith(e)&&(i.watchLoop=!0),i.jsoneditor.watch(e,i.watch_listener),i.watched[c]=e})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}},{key:"addLinks",value:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.description!==void 0?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var i=0;i<this.schema.links.length;i++)this.addLink(this.getLink(this.schema.links[i]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(i,h,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],t="json-editor-btn-".concat(h);h=this.iconlib?this.iconlib.getIcon(h):null,i=this.translate(i,s),a=this.translate(a,s),!h&&a&&(i=a,a=null);var e=this.theme.getButton(i,h,a);return e.classList.add(t),e}},{key:"setButtonText",value:function(i,h,a,s){var t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return a=this.iconlib?this.iconlib.getIcon(a):null,h=this.translate(h,t),s=this.translate(s,t),!a&&s&&(h=s,s=null),this.theme.setButtonText(i,h,a,s)}},{key:"addLink",value:function(i){this.link_holder&&this.link_holder.appendChild(i)}},{key:"getLink",value:function(i){var h,a,s=(i.mediaType||"application/javascript").split("/")[0],t=this.jsoneditor.compileTemplate(i.href,this.template_engine),e=this.jsoneditor.compileTemplate(i.rel?i.rel:i.href,this.template_engine),o=null;if(i.download&&(o=i.download),o&&o!==!0&&(o=this.jsoneditor.compileTemplate(o,this.template_engine)),s==="image"){h=this.theme.getBlockLinkHolder(),(a=document.createElement("a")).setAttribute("target","_blank");var c=document.createElement("img");this.theme.createImageLink(h,a,c),this.link_watchers.push(function(_){var P=t(_),D=e(_);a.setAttribute("href",P),a.setAttribute("title",D||P),c.setAttribute("src",P)})}else if(["audio","video"].includes(s)){h=this.theme.getBlockLinkHolder(),(a=this.theme.getBlockLink()).setAttribute("target","_blank");var d=document.createElement(s);d.setAttribute("controls","controls"),this.theme.createMediaLink(h,a,d),this.link_watchers.push(function(_){var P=t(_),D=e(_);a.setAttribute("href",P),a.textContent=D||P,d.setAttribute("src",P)})}else a=h=this.theme.getBlockLink(),h.setAttribute("target","_blank"),h.textContent=i.rel,h.style.display="none",this.link_watchers.push(function(_){var P=t(_),D=e(_);P&&(h.style.display=""),h.setAttribute("href",P),h.textContent=D||P});return o&&a&&(o===!0?a.setAttribute("download",""):this.link_watchers.push(function(_){a.setAttribute("download",o(_))})),i.class&&a.classList.add(i.class),h}},{key:"refreshWatchedFieldValues",value:function(){var i=this;if(this.watched_values){var h={},a=!1;return this.watched&&Object.keys(this.watched).forEach(function(s){var t=i.jsoneditor.getEditor(i.watched[s]),e=t?t.getValue():null;i.watched_values[s]!==e&&(a=!0),h[s]=e}),h.self=this.getValue(),this.watched_values.self!==h.self&&(a=!0),this.watched_values=h,a}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var i=this.getHeaderText();if(this.header.children.length){for(var h=0;h<this.header.childNodes.length;h++)if(this.header.childNodes[h].nodeType===3){this.header.childNodes[h].nodeValue=this.cleanText(i);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(i):this.header.textContent=this.cleanText(i)}}},{key:"getHeaderText",value:function(i){return this.header_text?this.header_text:i?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"onWatchedFieldChange",value:function(){var i;if(this.header_template){i=x(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()});var h=this.header_template(i);h!==this.header_text&&(this.header_text=h,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){i=this.getWatchedFieldValues();for(var a=0;a<this.link_watchers.length;a++)this.link_watchers[a](i)}}},{key:"setValue",value:function(i){this.value=i}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.value}},{key:"refreshValue",value:function(){}},{key:"getChildEditors",value:function(){return!1}},{key:"destroy",value:function(){var i=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach(function(h){return i.jsoneditor.unwatch(h,i.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}},{key:"isDefaultRequired",value:function(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}},{key:"getDefault",value:function(){if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var i=this.schema.type||this.schema.oneOf;if(i&&Array.isArray(i)&&(i=i[0]),i&&B(i)==="object"&&(i=i.type),i&&Array.isArray(i)&&(i=i[0]),typeof i=="string"){if(i==="number")return this.isDefaultRequired()?0:void 0;if(i==="boolean")return!this.isDefaultRequired()&&void 0;if(i==="integer")return this.isDefaultRequired()?0:void 0;if(i==="string")return this.isDefaultRequired()?"":void 0;if(i==="null")return null;if(i==="object")return{};if(i==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"isEnabled",value:function(){return!this.disabled}},{key:"isRequired",value:function(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}},{key:"getDisplayText",value:function(i){var h=[],a={};i.forEach(function(t){t.title&&(a[t.title]=a[t.title]||0,a[t.title]++),t.description&&(a[t.description]=a[t.description]||0,a[t.description]++),t.format&&(a[t.format]=a[t.format]||0,a[t.format]++),t.type&&(a[t.type]=a[t.type]||0,a[t.type]++)}),i.forEach(function(t){var e;e=typeof t=="string"?t:t.title&&a[t.title]<=1?t.title:t.format&&a[t.format]<=1?t.format:t.type&&a[t.type]<=1?t.type:t.description&&a[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",h.push(e)});var s={};return h.forEach(function(t,e){s[t]=s[t]||0,s[t]++,a[t]>1&&(h[e]="".concat(t," ").concat(s[t]))}),h}},{key:"getValidId",value:function(i){return(i=i===void 0?"":i.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(i){var h=this;if(this.schema.options&&this.schema.options.inputAttributes){var a=this.schema.options.inputAttributes,s=["name","type"].concat(i);Object.keys(a).forEach(function(t){s.includes(t.toLowerCase())||h.input.setAttribute(t,a[t])})}}},{key:"setContainerAttributes",value:function(){var i=this;if(this.schema.options&&this.schema.options.containerAttributes){var h=this.schema.options.containerAttributes,a=["data-schemapath","data-schematype","data-schemaid"];Object.keys(h).forEach(function(s){a.includes(s.toLowerCase())||i.container.setAttribute(s,h[s])})}}},{key:"expandCallbacks",value:function(i,h){var a=this,s=this.defaults.callbacks[i];return Object.entries(h).forEach(function(t){var e,o,c=(o=2,function(P){if(Array.isArray(P))return P}(e=t)||function(P,D){var J=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(J!=null){var nt,ct,dt,kt,Ct=[],$t=!0,ne=!1;try{if(dt=(J=J.call(P)).next,D===0){if(Object(J)!==J)return;$t=!1}else for(;!($t=(nt=dt.call(J)).done)&&(Ct.push(nt.value),Ct.length!==D);$t=!0);}catch(Re){ne=!0,ct=Re}finally{try{if(!$t&&J.return!=null&&(kt=J.return(),Object(kt)!==kt))return}finally{if(ne)throw ct}}return Ct}}(e,o)||function(P,D){if(P){if(typeof P=="string")return M(P,D);var J=Object.prototype.toString.call(P).slice(8,-1);return J==="Object"&&P.constructor&&(J=P.constructor.name),J==="Map"||J==="Set"?Array.from(P):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?M(P,D):void 0}}(e,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),d=c[0],_=c[1];_===Object(_)?h[d]=a.expandCallbacks(i,_):typeof _=="string"&&B(s)==="object"&&typeof s[_]=="function"&&(h[d]=s[_].bind(null,a))}),h}},{key:"showValidationErrors",value:function(i){}}],f&&q(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function N(u){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},N(u)}function U(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(N(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(N(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),N(h)==="symbol"?h:String(h)),i)}var h}function H(){return H=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Y(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},H.apply(this,arguments)}function X(u,n){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},X(u,n)}function Y(u){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Y(u)}var Q=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Y(i);if(h){var o=Y(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(N(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){H(Y(s.prototype),"register",this).call(this),this.input&&(this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname),this.input.setAttribute("aria-label",this.formname))}},{key:"unregister",value:function(){H(Y(s.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(this.shouldBeUnset()||t!=null?N(t)==="object"?t=JSON.stringify(t):this.shouldBeUnset()||typeof t=="string"||(t="".concat(t)):t="",t!==this.serialized)){var c=this.sanitize(t);if(this.input.value!==c){if(this.setValueToInputField(c),this.format==="range"){var d=this.control.querySelector("output");d&&(d.value=c)}var _=o||this.getValue()!==t;return this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(_),{changed:_,value:c}}}}},{key:"setValueToInputField",value:function(t){this.input.value=t===void 0?"":t}},{key:"getNumColumns",value:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t=this.input_type==="textarea"?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(e,t))}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if(this.format==="textarea")this.input_type="textarea",this.input=this.theme.getTextareaInput();else if(this.format==="range"){this.input_type="range";var e=this.schema.minimum||0,o=this.schema.maximum||Math.max(100,e+1),c=1;this.schema.multipleOf&&(e%this.schema.multipleOf&&(e=Math.ceil(e/this.schema.multipleOf)*this.schema.multipleOf),o%this.schema.multipleOf&&(o=Math.floor(o/this.schema.multipleOf)*this.schema.multipleOf),c=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,o,c)}else this.input_type="text",["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","reset","search","submit","tel","text","time","url","week"].includes(this.format)&&(this.input_type=this.format),this.input=this.theme.getFormInputField(this.input_type);else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);this.schema.maxLength!==void 0&&this.input.setAttribute("maxlength",this.schema.maxLength),this.schema.pattern!==void 0?this.input.setAttribute("pattern",this.schema.pattern):this.schema.minLength!==void 0&&this.input.setAttribute("pattern",".{".concat(this.schema.minLength,",}")),this.options.compact?this.container.classList.add("compact"):this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"]),this.input.addEventListener("change",function(P){if(P.preventDefault(),P.stopPropagation(),t.schema.template)P.currentTarget.value=t.value;else{var D=P.currentTarget.value,J=t.sanitize(D);D!==J&&(P.currentTarget.value=J),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(P){if(P){var D,J=P.offsetHeight;if(P.offsetHeight<P.scrollHeight)for(D=0;P.offsetHeight<P.scrollHeight+3&&!(D>100);)D++,J++,P.style.height="".concat(J,"px");else{for(D=0;P.offsetHeight>=P.scrollHeight+3&&!(D>100);)D++,J--,P.style.height="".concat(J,"px");P.style.height="".concat(J+1,"px")}}},this.input.addEventListener("keyup",function(P){t.adjust_height(P.currentTarget)}),this.input.addEventListener("change",function(P){t.adjust_height(P.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var d=this.input;if(this.format==="range"&&(d=this.theme.getRangeControl(this.input,this.theme.getRangeOutput(this.input,this.schema.default||Math.max(this.schema.minimum||0,0)))),this.control=this.theme.getFormControl(this.label,d,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input),t.format==="range"&&(t.control.querySelector("output").value=t.input.value)}),this.schema.template){var _=this.expandCallbacks("template",{template:this.schema.template});typeof _.template=="function"?this.template=_.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(t){var e=this.expandCallbacks("cleave",x({},this.defaults.options.cleave||{},this.options.cleave||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",x({},this.defaults.options.imask||{},this.options.imask||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach(function(o){if(t[o]===Object(t[o]))t[o]=e.ajustIMaskOptions(t[o]);else if(o==="mask")if(t[o].substr(0,6)==="regex:"){var c=t[o].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(c!==null)try{t[o]=new RegExp(c[1],c[2])}catch{}}else t[o]=e.getGlobalPropertyFromString(t[o])}),t}},{key:"getGlobalPropertyFromString",value:function(t){if(t.includes(".")){var e=t.split("."),o=e[0],c=e[1];if(window[o]!==void 0&&window[o][c]!==void 0)return window[o][c]}else if(window[t]!==void 0)return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:H(Y(s.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,H(Y(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,H(Y(s.prototype),"disable",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}},{key:"refreshValue",value:function(){this.input&&(this.value=this.input.value,typeof this.value=="string"||this.shouldBeUnset()||(this.value=""),this.serialized=this.value)}},{key:"destroy",value:function(){this.cleave_instance&&this.cleave_instance.destroy(),this.imask_instance&&this.imask_instance.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),H(Y(s.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),H(Y(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.jsoneditor.options.show_errors!=="always"){if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return}this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&U(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function tt(u){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tt(u)}function it(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(tt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(tt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),tt(h)==="symbol"?h:String(h)),i)}var h}function st(){return st=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ut(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},st.apply(this,arguments)}function mt(u,n){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},mt(u,n)}function ut(u){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ut(u)}var Et=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ut(i);if(h){var o=ut(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(tt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=st(ut(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(c.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",st(ut(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;if(window.ace){var o=this.input_type;o!=="cpp"&&o!=="c++"&&o!=="c"||(o="c_cpp"),t=this.expandCallbacks("ace",x({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(o)})),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor_instance=window.ace.edit(this.ace_container,t),this.ace_editor_instance.setValue(this.getValue()),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize(),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.ace_editor_instance.setReadOnly(!0),this.ace_editor_instance.on("change",function(){e.input.value=e.ace_editor_instance.getValue(),e.refreshValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)}else st(ut(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!1),st(ut(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),st(ut(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),st(ut(s.prototype),"destroy",this).call(this)}}])&&it(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function At(u){return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},At(u)}function Vt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(At(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(At(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),At(h)==="symbol"?h:String(h)),i)}var h}function lt(){return lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=_t(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},lt.apply(this,arguments)}function wt(u,n){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},wt(u,n)}function _t(u){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_t(u)}k(7327);var Ut=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_t(i);if(h){var o=_t(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(At(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,f=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"getDefault",value:function(){return this.schema.default||[]}},{key:"register",value:function(){lt(_t(s.prototype),"register",this).call(this),this.rows&&this.rows.forEach(function(t){return t.register()})}},{key:"unregister",value:function(){lt(_t(s.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){var t=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,t.width+2),4):t.width}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach(function(e){e.enable(),t.setAvailability(e,!1)}),lt(_t(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach(function(o){o.disable(t),e.setAvailability(o,!0)}),lt(_t(s.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(t,e){t.add_row_button&&(t.add_row_button.disabled=e),t.remove_all_rows_button&&(t.remove_all_rows_button.disabled=e),t.delete_last_row_button&&(t.delete_last_row_button.disabled=e),t.copy_button&&(t.copy_button.disabled=e),t.delete_button&&(t.delete_button.disabled=e),t.moveup_button&&(t.moveup_button.disabled=e),t.movedown_button&&(t.movedown_button.disabled=e)}},{key:"preBuild",value:function(){lt(_t(s.prototype),"preBuild",this).call(this),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_delete_all_rows_buttons=this.hide_delete_buttons||this.options.disable_array_delete_all_rows||this.jsoneditor.options.disable_array_delete_all_rows,this.hide_delete_last_row_buttons=this.hide_delete_buttons||this.options.disable_array_delete_last_row||this.jsoneditor.options.disable_array_delete_last_row,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add,this.show_copy_button=this.options.enable_array_copy||this.jsoneditor.options.enable_array_copy,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top}},{key:"build",value:function(){this.options.compact?(this.title=this.theme.getHeader("",this.getPathDepth()),this.container.appendChild(this.title),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.schema.format==="tabs-top"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTopTabContentHolder(this.tabs_holder),this.active_tab=null):this.schema.format==="tabs"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls))),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),this.refreshTabs(!0),lt(_t(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(t.title)||this.translate("default_array_item_title")}else this.item_title=this.translate("default_array_item_title");return this.cleanText(this.item_title)}},{key:"getItemSchema",value:function(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?x({},this.schema.additionalItems):void 0:x({},this.schema.items[t]):this.schema.items?x({},this.schema.items):{}}},{key:"getItemInfo",value:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var o=JSON.stringify(e);return this.item_info[o]!==void 0||(e=this.jsoneditor.expandRefs(e),this.item_info[o]={title:this.translateProperty(e.title)||this.translate("default_array_item_title"),default:e.default,width:12,child_editors:e.properties||e.items}),this.item_info[o]}},{key:"getElementEditor",value:function(t){var e=this.getItemInfo(t),o=this.getItemSchema(t);(o=this.jsoneditor.expandRefs(o)).title="".concat(e.title," ").concat(t+1);var c,d=this.jsoneditor.getEditorClass(o);this.tabs_holder?(c=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):c=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(c);var _=this.jsoneditor.createEditor(d,{jsoneditor:this.jsoneditor,schema:o,container:c,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return _.preBuild(),_.build(),_.postBuild(),_.title_controls||(_.array_controls=this.theme.getButtonHolder(),c.appendChild(_.array_controls)),_}},{key:"checkParent",value:function(t){return t&&t.parentNode}},{key:"destroy",value:function(){this.empty(!0),this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.controls)&&this.controls.parentNode.removeChild(this.controls),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,lt(_t(s.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;this.rows&&(this.rows.forEach(function(o,c){t&&(e.checkParent(o.tab)&&o.tab.parentNode.removeChild(o.tab),e.destroyRow(o,!0),e.row_cache[c]=null),e.rows[c]=null}),this.rows=[],t&&(this.row_cache=[]))}},{key:"destroyRow",value:function(t,e){var o=t.container;e?(t.destroy(),o.parentNode&&o.parentNode.removeChild(o),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),o.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach(function(o){o.tab&&(t?o.tab_text.textContent=o.getHeaderText():o.tab===e.active_tab?e.theme.markTabActive(o):e.theme.markTabInactive(o))})}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach(function(P,D){if(t.rows[D])t.rows[D].setValue(P,o);else if(t.row_cache[D])t.rows[D]=t.row_cache[D],t.rows[D].setValue(P,o),t.rows[D].container.style.display="",t.rows[D].tab&&(t.rows[D].tab.style.display=""),t.rows[D].register(),t.jsoneditor.trigger("addRow",t.rows[D]);else{var J=t.addRow(P,o);t.jsoneditor.trigger("addRow",J)}});for(var c=e.length;c<this.rows.length;c++)this.destroyRow(this.rows[c]),this.rows[c]=null;this.rows=this.rows.slice(0,e.length);var d=this.rows.find(function(P){return P.tab===t.active_tab}),_=d!==void 0?d.tab:null;!_&&this.rows.length&&(_=this.rows[0].tab),this.active_tab=_,this.refreshValue(o),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}}},{key:"setButtonState",value:function(t,e){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:t.style.display=e?"":"none";break;case 2:t.disabled=!e}}},{key:"setupButtons",value:function(t){var e=[];if(this.value.length)if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);var o=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,o),e.push(o)}else{var c=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,c),e.push(c);var d=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,d),e.push(d)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var _=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,_),e.push(_),e.some(function(P){return P})}},{key:"refreshValue",value:function(t){var e=this,o=this.value?this.value.length:0;if(this.value=this.rows.map(function(d){return d.getValue()}),o!==this.value.length||t){var c=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach(function(d,_){if(d.movedown_button){var P=_!==e.rows.length-1;e.setButtonState(d.movedown_button,P)}d.delete_button&&e.setButtonState(d.delete_button,!c),e.value[_]=d.getValue()}),!this.collapsed&&this.setupButtons(c)?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t,e){var o=this,c=this.rows.length;this.rows[c]=this.getElementEditor(c),this.row_cache[c]=this.rows[c],this.tabs_holder&&(this.rows[c].tab_text=document.createElement("span"),this.rows[c].tab_text.textContent=this.rows[c].getHeaderText(),this.schema.format==="tabs-top"?(this.rows[c].tab=this.theme.getTopTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTopTab(this.tabs_holder,this.rows[c].tab)):(this.rows[c].tab=this.theme.getTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTab(this.tabs_holder,this.rows[c].tab)),this.rows[c].tab.addEventListener("click",function(_){o.active_tab=o.rows[c].tab,o.refreshTabs(),_.preventDefault(),_.stopPropagation()}));var d=this.rows[c].title_controls||this.rows[c].array_controls;return this.hide_delete_buttons||(this.rows[c].delete_button=this._createDeleteButton(c,d)),this.show_copy_button&&(this.rows[c].copy_button=this._createCopyButton(c,d)),c&&!this.hide_move_buttons&&(this.rows[c].moveup_button=this._createMoveUpButton(c,d)),this.hide_move_buttons||(this.rows[c].movedown_button=this._createMoveDownButton(c,d)),t!==void 0&&this.rows[c].setValue(t,e),this.refreshTabs(),this.rows[c]}},{key:"_createDeleteButton",value:function(t,e){var o=this,c=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue().filter(function(nt,ct){return ct!==_}),D=null,J=o.rows[_].getValue();o.setValue(P),o.rows[_]?D=o.rows[_].tab:o.rows[_-1]&&(D=o.rows[_-1].tab),D&&(o.active_tab=D,o.refreshTabs()),o.onChange(!0),o.jsoneditor.trigger("deleteRow",J)}),e&&e.appendChild(c),c}},{key:"_createCopyButton",value:function(t,e){var o=this,c=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),d=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(_){var P=o.getValue();_.preventDefault(),_.stopPropagation();var D=1*_.currentTarget.getAttribute("data-i");P.forEach(function(J,nt){if(nt===D){if(d.items.type==="string"&&d.items.format==="uuid")J=R();else if(d.items.type==="object"&&d.items.properties)for(var ct=0,dt=Object.keys(J);ct<dt.length;ct++){var kt=dt[ct];d.items.properties&&d.items.properties[kt]&&d.items.properties[kt].format==="uuid"&&(J[kt]=R())}P.push(J)}}),o.setValue(P),o.refreshValue(!0),o.onChange(!0)}),e.appendChild(c),c}},{key:"_createMoveUpButton",value:function(t,e){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveleft":"moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i");if(!(_<=0)){var P=o.getValue(),D=P[_-1];P[_-1]=P[_],P[_]=D,o.setValue(P),o.active_tab=o.rows[_-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_-1])}}),e&&e.appendChild(c),c}},{key:"_createMoveDownButton",value:function(t,e){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveright":"movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();if(!(_>=P.length-1)){var D=P[_+1];P[_+1]=P[_],P[_]=D,o.setValue(P),o.active_tab=o.rows[_+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_+1])}}),e&&e.appendChild(c),c}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton(),this.tabs&&(this.add_row_button.classList.add("je-array-control-btn"),this.delete_last_row_button.classList.add("je-array-control-btn"),this.remove_all_rows_button.classList.add("je-array-control-btn"))}},{key:"_createToggleButton",value:function(){var t=this,e=this.getButton("","collapse","button_collapse");e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var o=this.row_holder.style.display,c=this.controls.style.display;return e.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),t.panel&&t.setButtonState(t.panel,t.collapsed),t.tabs_holder&&t.setButtonState(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=o,t.controls.style.display=c,t.setButtonText(d.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(d.currentTarget,"","expand","button_expand"))}),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var c,d=t.rows.length;t.row_cache[d]?(c=t.rows[d]=t.row_cache[d],t.rows[d].setValue(t.rows[d].getDefault(),!0),t.rows[d].container.style.display="",t.rows[d].tab&&(t.rows[d].tab.style.display=""),t.rows[d].register()):c=t.addRow(),t.active_tab=t.rows[d].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",c)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue(),d=null,_=c.pop();t.setValue(c),t.rows[t.rows.length-1]&&(d=t.rows[t.rows.length-1].tab),d&&(t.active_tab=d,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",_)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",c)}),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(d){d.path===e.path?o.push(d):c.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.rows.forEach(function(d){return d.showValidationErrors(c)})}}],f&&Vt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Qt(u){return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qt(u)}function fe(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Qt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Qt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Qt(h)==="symbol"?h:String(h)),i)}var h}function St(){return St=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Bt(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},St.apply(this,arguments)}function Ot(u,n){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ot(u,n)}function Bt(u){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bt(u)}Ut.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var qt=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Bt(i);if(h){var o=Bt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Qt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){St(Bt(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){St(Bt(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach(function(o){return e=Math.max(e,"".concat(t.select_values[o]).length+4)}),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;St(Bt(s.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var e=this.jsoneditor.expandRefs(this.schema.items||{}),o=e.enum||[],c=e.options&&e.options.enum||[],d=e.options&&e.options.enum_titles||[];for(t=0;t<o.length;t++)if(this.sanitize(o[t])===o[t]){var _=c[t]||{};"title"in _||(_.title="".concat(d[t]||o[t])),this.option_keys.push("".concat(o[t])),this.option_enum.push(_),this.select_values["".concat(o[t])]=o[t]}}},{key:"build",value:function(){var t,e=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),!this.schema.format&&this.option_keys.length<8||this.schema.format==="checkbox"){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){var o=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=o,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var c=this.theme.getCheckboxLabel(this.option_enum[t].title);if(c.htmlFor=o,this.option_enum[t].infoText){var d=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));c.appendChild(d)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(c,this.inputs[this.option_keys[t]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description,this.infoButton),this.inputs.controlgroup=this.inputs.controls=this.control}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys,!0),this.theme.setSelectOptions(this.input,this.option_keys,this.option_enum.map(function(_){return _.title})),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton)}(this.schema.readOnly||this.schema.readonly)&&this.disable(!0),this.container.appendChild(this.control),this.multiselectChangeHandler=function(_){var P=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&P.push(e.select_values[e.option_keys[t]]);e.updateValue(P),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(function(){e.afterInputReady()})}},{key:"postBuild",value:function(){St(Bt(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(t,e){var o=this;t=t||[],Array.isArray(t)||(t=[t]),t=t.map(function(c){return"".concat(c)}),Object.keys(this.select_options).forEach(function(c){o.select_options[c][o.input_type==="select"?"selected":"checked"]=t.includes(c)}),this.updateValue(t),this.onChange(!0)}},{key:"removeValue",value:function(t){t=[].concat(t),this.setValue(this.getValue().filter(function(e){return!t.includes(e)}))}},{key:"addValue",value:function(t){this.setValue(this.getValue().concat(t))}},{key:"updateValue",value:function(t){for(var e=!1,o=[],c=0;c<t.length;c++)if(this.select_options["".concat(t[c])]){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}else e=!0;return this.value=o,e}},{key:"sanitize",value:function(t){return this.schema.items.type==="boolean"?!!t:this.schema.items.type==="number"?1*t||0:this.schema.items.type==="integer"?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach(function(e){return t.inputs[e].disabled=!1}),St(Bt(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach(function(o){return e.inputs[o].disabled=!0}),St(Bt(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){St(Bt(s.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(t){var e=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),o=t.reduce(function(c,d){return d.path.match(e)&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input||this.inputs,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&fe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function xt(u){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xt(u)}function sr(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(xt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xt(h)==="symbol"?h:String(h)),i)}var h}function de(){return de=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=_e(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},de.apply(this,arguments)}function Ne(u,n){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ne(u,n)}function _e(u){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_e(u)}var lr=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ne(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_e(i);if(h){var o=_e(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(xt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){this.choices_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):de(_e(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",x({},{removeItems:!0,removeItemButton:!0},this.defaults.options.choices||{},this.options.choices||{},{addItems:!0,editItems:!1,duplicateItemsAllowed:!1}));this.newEnumAllowed=!1,this.choices_instance=new window.Choices(this.input,e),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var c=t.choices_instance.getValue(!0);t.updateValue(c),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}de(_e(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),de(_e(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),de(_e(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),de(_e(s.prototype),"destroy",this).call(this)}}])&&sr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function Ae(u){return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ae(u)}function hr(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Ae(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ae(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ae(h)==="symbol"?h:String(h)),i)}var h}function Le(){return Le=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ce(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Le.apply(this,arguments)}function We(u,n){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},We(u,n)}function Ce(u){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ce(u)}var dr=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&We(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ce(i);if(h){var o=Ce(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ae(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){this.select2_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Le(Ce(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(t=this.expandCallbacks("select2",x({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(o),e.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Le(Ce(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!1,!1)).trigger("change"),!0}},{key:"enable",value:function(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Le(Ce(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Le(Ce(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Le(Ce(s.prototype),"destroy",this).call(this)}}])&&hr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function ot(u){return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ot(u)}function bt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ot(h)==="symbol"?h:String(h)),i)}var h}function Ht(){return Ht=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Kt(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ht.apply(this,arguments)}function Mt(u,n){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Mt(u,n)}function Kt(u){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kt(u)}var Ze=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Kt(i);if(h){var o=Kt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){this.selectize_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):Ht(Kt(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance&&(t=this.expandCallbacks("selectize",x({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=t.create=!!t.create&&this.schema.items&&this.schema.items.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var c=e.selectize_instance.getValue();e.updateValue(c),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)),Ht(Kt(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Ht(Kt(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Ht(Kt(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Ht(Kt(s.prototype),"destroy",this).call(this)}}])&&bt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function Qe(u){return Qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qe(u)}function _r(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Qe(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Qe(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Qe(h)==="symbol"?h:String(h)),i)}var h}function Ke(){return Ke=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Se(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ke.apply(this,arguments)}function pr(u,n){return pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},pr(u,n)}function Se(u){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Se(u)}var Dn=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pr(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Se(i);if(h){var o=Se(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Qe(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"postBuild",value:function(){window.Autocomplete&&(this.autocomplete_wrapper=document.createElement("div"),this.input.parentNode.insertBefore(this.autocomplete_wrapper,this.input.nextSibling),this.autocomplete_wrapper.appendChild(this.input),this.autocomplete_dropdown=document.createElement("ul"),this.input.parentNode.insertBefore(this.autocomplete_dropdown,this.input.nextSibling)),Ke(Se(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",x({},{search:function(o){return console.log('No "search" callback defined for autocomplete in property "'.concat(o.key,'"')),[]},onSubmit:function(){e.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add("".concat(t.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),Ke(Se(s.prototype),"afterInputReady",this).call(this)}},{key:"destroy",value:function(){this.autocomplete_instance&&(this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.autocomplete_dropdown&&this.autocomplete_dropdown.parentNode&&this.autocomplete_dropdown.parentNode.removeChild(this.autocomplete_dropdown),this.autocomplete_wrapper&&this.autocomplete_wrapper.parentNode&&this.autocomplete_wrapper.parentNode.removeChild(this.autocomplete_wrapper),this.autocomplete_instance=null),Ke(Se(s.prototype),"destroy",this).call(this)}}])&&_r(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Nt(u){return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nt(u)}function te(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Nt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nt(h)==="symbol"?h:String(h)),i)}var h}function Xt(){return Xt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ze(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Xt.apply(this,arguments)}function le(u,n){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},le(u,n)}function ze(u){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ze(u)}k(561);var Vi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ze(i);if(h){var o=ze(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Nt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",function(o){if(e.count===e.current_item_index)e.value[e.count][e.key]=o.target.result;else{var c={};for(var d in e.parent.schema.properties)c[d]="";c[e.key]=o.target.result,e.value.splice(e.count,0,c)}e.count+=1,e.count===e.total+e.current_item_index&&e.arrayEditor.setValue(e.value)})}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw new Error("FileReader required for base64 editor");this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.schema.options&&this.schema.options.multiple&&this.schema.options.multiple===!0&&this.parent&&this.parent.schema.type==="object"&&this.parent.parent&&this.parent.parent.schema.type==="array"&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",function(o){if(o.preventDefault(),o.stopPropagation(),o.currentTarget.files&&o.currentTarget.files.length)if(o.currentTarget.files.length>1&&t.schema.options&&t.schema.options.multiple&&t.schema.options.multiple===!0&&t.parent&&t.parent.schema.type==="object"&&t.parent.parent&&t.parent.parent.schema.type==="array"){t.arrayEditor=t.jsoneditor.getEditor(t.parent.parent.path),t.value=t.arrayEditor.getValue(),t.total=o.currentTarget.files.length,t.current_item_index=parseInt(t.parent.key),t.count=t.current_item_index;for(var c=0;c<t.total;c++){var d=new FileReader;t.setFileReaderListener(d),d.readAsDataURL(o.currentTarget.files[c])}}else{var _=new FileReader;_.onload=function(P){t.value=P.target.result,t.refreshPreview(),t.onChange(!0),_=null},_.readAsDataURL(o.currentTarget.files[0])}})}this.preview=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview,this.infoButton),this.container.appendChild(this.control);var e=this.getButton("button_upload","upload","button_upload");e.addEventListener("click",function(){t.uploader.click()}),this.control.appendChild(e)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),t.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Xt(ze(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Xt(ze(s.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,this.input.value=this.value,this.refreshPreview(),this.onChange())}},{key:"destroy",value:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),Xt(ze(s.prototype),"destroy",this).call(this)}}])&&te(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Nn(u){return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nn(u)}function ls(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Nn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nn(h)==="symbol"?h:String(h)),i)}var h}function ci(){return ci=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Gr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ci.apply(this,arguments)}function on(u,n){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},on(u,n)}function Gr(u){return Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gr(u)}var us=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&on(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Gr(i);if(h){var o=Gr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Nn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t,e){var o;return function(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,t,e)).active=!1,o.parent&&o.parent.schema&&(Array.isArray(o.parent.schema.required)?o.parent.schema.required.includes(o.key)||o.parent.schema.required.push(o.key):o.parent.schema.required=[o.key]),o}return n=s,(f=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.translateProperty(this.schema.title)||this.key,o=this.expandCallbacks("button",x({},{icon:"",validated:!1,align:"left",action:function(c,d){window.alert('No button action defined for "'.concat(c.path,'"'))}},this.defaults.options.button||{},this.options.button||{}));this.input=this.getButton(e,o.icon,e),this.input.addEventListener("click",o.action,!1),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["readonly"]),this.control=this.theme.getFormButtonHolder(o.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){t.jsoneditor.validate(t.jsoneditor.getValue()).length>0?t.disable():t.enable()},o.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,ci(Gr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,ci(Gr(s.prototype),"disable",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"activate",value:function(){this.active=!1,this.enable()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.disable())}},{key:"destroy",value:function(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,ci(Gr(s.prototype),"destroy",this).call(this)}}])&&ls(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function $n(u){return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$n(u)}function cs(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if($n(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if($n(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),$n(h)==="symbol"?h:String(h)),i)}var h}function kn(){return kn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Mr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},kn.apply(this,arguments)}function zi(u,n){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zi(u,n)}function Mr(u){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mr(u)}var hs=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Mr(i);if(h){var o=Mr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&($n(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){t=!!t;var o=this.getValue()!==t;this.value=t,this.input.checked=this.value,this.onChange(o)}},{key:"register",value:function(){kn(Mr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){kn(Mr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))}},{key:"build",value:function(){var t=this;this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.onChange(!0)}),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,kn(Mr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,kn(Mr(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),kn(Mr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&cs(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Mn(u){return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mn(u)}function ta(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Mn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Mn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Mn(h)==="symbol"?h:String(h)),i)}var h}function Er(){return Er=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Cr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Er.apply(this,arguments)}function an(u,n){return an=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},an(u,n)}function Cr(u){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cr(u)}k(2772),k(2707);var hi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&an(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Cr(i);if(h){var o=Cr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Mn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){var o=this.typecast(t),c=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;(this.enum_options.length>0&&!this.enum_values.includes(o)||e&&!this.isRequired()&&!c)&&(o=this.enum_values[0]),this.value!==o&&(e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.value=o,this.onChange(),this.change())}},{key:"register",value:function(){Er(Cr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Er(Cr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))}},{key:"typecast",value:function(t){return this.schema.type==="boolean"?t==="undefined"||t===void 0?void 0:!!t:this.schema.type==="number"?1*t||0:this.schema.type==="integer"?Math.floor(1*t||0):this.schema.enum&&t===void 0?void 0:"".concat(t)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var t,e,o=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema.enum){var c=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach(function(d,_){o.enum_options[_]="".concat(d),o.enum_display[_]="".concat(o.translateProperty(c[_])||d),o.enum_values[_]=o.typecast(d)})}else if(this.schema.type==="boolean")this.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],this.enum_options=["1",""],this.enum_values=[!0,!1],this.isRequired()||(this.enum_display.unshift(" "),this.enum_options.unshift("undefined"),this.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw new Error("'select' editor requires the enum property to be set.");if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(t=0;t<this.schema.enumSource.length;t++)typeof this.schema.enumSource[t]=="string"?this.enumSource[t]={source:this.schema.enumSource[t]}:Array.isArray(this.schema.enumSource[t])?this.enumSource[t]=this.schema.enumSource[t]:this.enumSource[t]=x({},this.schema.enumSource[t]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(t=0;t<this.enumSource.length;t++)this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].value})).template=="function"?this.enumSource[t].value=e.template:this.enumSource[t].value=this.jsoneditor.compileTemplate(this.enumSource[t].value,this.template_engine)),this.enumSource[t].title&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].title})).template=="function"?this.enumSource[t].title=e.template:this.enumSource[t].title=this.jsoneditor.compileTemplate(this.enumSource[t].title,this.template_engine)),this.enumSource[t].filter&&this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].filter})).template=="function"?this.enumSource[t].filter=e.template:this.enumSource[t].filter=this.jsoneditor.compileTemplate(this.enumSource[t].filter,this.template_engine))}}},{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getSelectInput(this.enum_options,!1),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),this.container.appendChild(this.control),this.value=this.enum_values[0],window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var t,e=this.typecast(this.input.value);(t=this.enum_values.includes(e)?this.enum_values[this.enum_values.indexOf(e)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=t,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var t,e,o=[],c=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var d=0;d<this.enumSource.length;d++)if(Array.isArray(this.enumSource[d]))o=o.concat(this.enumSource[d]),c=c.concat(this.enumSource[d]);else{var _=[];if(_=Array.isArray(this.enumSource[d].source)?this.enumSource[d].source:t[this.enumSource[d].source]){if(this.enumSource[d].slice&&(_=Array.prototype.slice.apply(_,this.enumSource[d].slice)),this.enumSource[d].filter){var P=[];for(e=0;e<_.length;e++)this.enumSource[d].filter({i:e,item:_[e],watched:t})&&P.push(_[e]);_=P}var D=[],J=[];for(e=0;e<_.length;e++){var nt=_[e];this.enumSource[d].value?J[e]=this.typecast(this.enumSource[d].value({i:e,item:nt})):J[e]=_[e],this.enumSource[d].title?D[e]=this.enumSource[d].title({i:e,item:nt}):D[e]=J[e]}this.enumSource[d].sort&&(function(dt,kt,Ct){dt.map(function($t,ne){return{v:$t,t:kt[ne]}}).sort(function($t,ne){return $t.v<ne.v?-Ct:$t.v===ne.v?0:Ct}).forEach(function($t,ne){dt[ne]=$t.v,kt[ne]=$t.t})}).bind(null,J,D,this.enumSource[d].sort==="desc"?1:-1)(),o=o.concat(J),c=c.concat(D)}}var ct=this.value;this.theme.setSelectOptions(this.input,o,c),this.enum_options=o,this.enum_display=c,this.enum_values=o,o.includes(ct)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=ct,this.value=ct):(this.input.value=o[0],this.value=this.typecast(o[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}Er(Cr(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Er(Cr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Er(Cr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Er(Cr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&ta(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Hn(u){return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(u)}function dl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Hn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Hn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Hn(h)==="symbol"?h:String(h)),i)}var h}function Hr(){return Hr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=z(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Hr.apply(this,arguments)}function L(u,n){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},L(u,n)}function z(u){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(u)}var rt=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=z(i);if(h){var o=z(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Hn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){if(this.choices_instance){var o=this.typecast(t||"");if(this.enum_values.includes(o)||(o=this.enum_values[0]),this.value===o)return;e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.choices_instance.setChoiceByValue(this.input.value),this.value=o,this.onChange()}else Hr(z(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",x({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Hr(z(s.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Hr(z(s.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var e=this.enum_options.map(function(o,c){return{value:o,label:t.enum_display[c]}});this.choices_instance.setChoices(e,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Hr(z(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Hr(z(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Hr(z(s.prototype),"destroy",this).call(this)}}])&&dl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function K(u){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},K(u)}function yt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(K(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(K(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),K(h)==="symbol"?h:String(h)),i)}var h}function Dt(){return Dt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ft(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Dt.apply(this,arguments)}function Jt(u,n){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jt(u,n)}function ft(u){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ft(u)}rt.rules={".choices > *":"box-sizing:border-box"};var vt=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ft(i);if(h){var o=ft(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(K(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){if(Dt(ft(s.prototype),"build",this).call(this),this.input&&(this.schema.max&&typeof this.schema.max=="string"&&this.input.setAttribute("max",this.schema.max),this.schema.min&&typeof this.schema.max=="string"&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&K(this.options.flatpickr)==="object")){this.options.flatpickr.enableTime=this.schema.format!=="date",this.options.flatpickr.noCalendar=this.schema.format==="time",this.schema.type==="integer"&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var t=this.input;if(this.options.flatpickr.wrap===!0){var e=[];if(this.options.flatpickr.showToggleButton!==!1){var o=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");o.setAttribute("data-toggle",""),e.push(o)}if(this.options.flatpickr.showClearButton!==!1){var c=this.getButton("","clear","flatpickr_clear_button");c.setAttribute("data-clear",""),e.push(c)}var d=this.input.parentNode,_=this.input.nextSibling,P=this.theme.getInputGroup(this.input,e);P!==void 0?(this.options.flatpickr.inline=!1,d.insertBefore(P,_),t=P):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),this.options.flatpickr.inline===!0&&this.options.flatpickr.inlineHideInput===!0&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if(this.schema.type==="string")return this.value;if(this.value!==""&&this.value!==void 0){var t=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,e,o){if(this.schema.type==="string")Dt(ft(s.prototype),"setValue",this).call(this,t,e,o),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var c=new Date(1e3*t),d=c.getFullYear(),_=this.zeroPad(c.getMonth()+1),P=this.zeroPad(c.getDate()),D=this.zeroPad(c.getHours()),J=this.zeroPad(c.getMinutes()),nt=this.zeroPad(c.getSeconds()),ct=[d,_,P].join("-"),dt=[D,J,nt].join(":"),kt="".concat(ct,"T").concat(dt);this.schema.format==="date"?kt=ct:this.schema.format==="time"&&(kt=dt),this.input.value=kt,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(kt)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Dt(ft(s.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&yt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Wt(u){return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wt(u)}function oe(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Wt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wt(h)==="symbol"?h:String(h)),i)}var h}function Tt(){return Tt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Be(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Tt.apply(this,arguments)}function ue(u,n){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ue(u,n)}function Be(u){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Be(u)}var nr=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Be(i);if(h){var o=Be(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Wt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Tt(Be(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Tt(Be(s.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}},{key:"enable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Tt(Be(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Tt(Be(s.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var t=this,e=this.getWatchedFieldValues();if(e){var o=document.location.origin+document.location.pathname+this.template(e);this.editors[this.refs[o]]||this.buildChildEditor(o),this.currentEditor=this.refs[o],this.register(),this.editors.forEach(function(c,d){c&&(t.currentEditor===d?c.container.style.display="":c.container.style.display="none")}),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(t){this.refs[t]=this.editors.length;var e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);var o=x({},this.schema,this.jsoneditor.refs[t]),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:e,path:this.path,parent:this,required:!0});this.editors.push(d),d.preBuild(),d.build(),d.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if(this.schema.links[t].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=x({},this.schema)}},{key:"build",value:function(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}},{key:"onWatchedFieldChange",value:function(){this.switchEditor()}},{key:"onChildEditorChange",value:function(t){this.editors[this.currentEditor]&&this.refreshValue(),Tt(Be(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Tt(Be(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach(function(e){e&&e.showValidationErrors(t)})}}])&&oe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function It(u){return It=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},It(u)}function ee(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function zt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(It(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(It(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),It(h)==="symbol"?h:String(h)),i)}var h}function ye(){return ye=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ee(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ye.apply(this,arguments)}function Ue(u,n){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ue(u,n)}function Ee(u){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ee(u)}var $e=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ee(i);if(h){var o=Ee(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(It(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(o){t.selected=t.select_options.indexOf(o.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)}),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach(function(o,c){if(e===JSON.stringify(o))return t.selected=c,!1}),this.selected<0?this.setValue(this.enum[0]):(this.switcher.value=this.select_options[this.selected],this.display_area.innerHTML=this.html_values[this.selected])}},{key:"enable",value:function(){this.always_disabled||(this.switcher.disabled=!1,ye(Ee(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,ye(Ee(s.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,o,c=this;if(t===null)return"<em>null</em>";if(It(t)==="object"){var d="";return e=t,o=function(_,P){var D=c.getHTML(P);Array.isArray(t)||(D="<div><em>".concat(_,"</em>: ").concat(D,"</div>")),d+="<li>".concat(D,"</li>")},Array.isArray(e)||typeof e.length=="number"&&e.length>0&&e.length-1 in e?Array.from(e).forEach(function(_,P){return o(P,_)}):Object.entries(e).forEach(function(_){var P,D,J=(D=2,function(dt){if(Array.isArray(dt))return dt}(P=_)||function(dt,kt){var Ct=dt==null?null:typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(Ct!=null){var $t,ne,Re,Gt,gt=[],Zt=!0,Ge=!1;try{if(Re=(Ct=Ct.call(dt)).next,kt===0){if(Object(Ct)!==Ct)return;Zt=!1}else for(;!(Zt=($t=Re.call(Ct)).done)&&(gt.push($t.value),gt.length!==kt);Zt=!0);}catch(W){Ge=!0,ne=W}finally{try{if(!Zt&&Ct.return!=null&&(Gt=Ct.return(),Object(Gt)!==Gt))return}finally{if(Ge)throw ne}}return gt}}(P,D)||function(dt,kt){if(dt){if(typeof dt=="string")return ee(dt,kt);var Ct=Object.prototype.toString.call(dt).slice(8,-1);return Ct==="Object"&&dt.constructor&&(Ct=dt.constructor.name),Ct==="Map"||Ct==="Set"?Array.from(dt):Ct==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ct)?ee(dt,kt):void 0}}(P,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),nt=J[0],ct=J[1];return o(nt,ct)}),d=Array.isArray(t)?"<ol>".concat(d,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(d,"</ul>")}return typeof t=="boolean"?t?"true":"false":typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):t}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ye(Ee(s.prototype),"destroy",this).call(this)}}])&&zt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function ke(u){return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ke(u)}function fr(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ke(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ke(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ke(h)==="symbol"?h:String(h)),i)}var h}function Me(){return Me=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Sr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Me.apply(this,arguments)}function Fr(u,n){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Fr(u,n)}function Sr(u){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sr(u)}var ds=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fr(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Sr(i);if(h){var o=Sr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ke(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){Me(Sr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Me(Sr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(t==null?t="":ke(t)==="object"?t=JSON.stringify(t):typeof t!="string"&&(t="".concat(t)),t!==this.serialized)){var c=this.sanitize(t);if(this.input.value!==c){this.input.value=c;var d=o||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(d)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Me(Sr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Me(Sr(s.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Me(Sr(s.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),Me(Sr(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"build",value:function(){if(this.format=this.schema.format,!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.input_type="hidden",this.input=this.theme.getFormInputField(this.input_type),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.container.appendChild(this.input),this.schema.template){var t=this.expandCallbacks("template",{template:this.schema.template});typeof t.template=="function"?this.template=t.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&fr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Wr(u){return Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wr(u)}function pl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Wr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wr(h)==="symbol"?h:String(h)),i)}var h}function Ui(u,n){return Ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ui(u,n)}function Vr(u){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vr(u)}var qi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Vr(i);if(h){var o=Vr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Wr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){this.options.compact=!1,this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}}])&&pl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(us);function On(u){return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},On(u)}function ps(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(On(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(On(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),On(h)==="symbol"?h:String(h)),i)}var h}function Gi(){return Gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Fn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Gi.apply(this,arguments)}function Wi(u,n){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wi(u,n)}function Fn(u){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fn(u)}var fs=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wi(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Fn(i);if(h){var o=Fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(On(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){if(Gi(Fn(s.prototype),"build",this).call(this),this.schema.minimum!==void 0){var t=this.schema.minimum;this.schema.exclusiveMinimum!==void 0&&(t+=1),this.input.setAttribute("min",t)}if(this.schema.maximum!==void 0){var e=this.schema.maximum;this.schema.exclusiveMaximum!==void 0&&(e-=1),this.input.setAttribute("max",e)}if(this.schema.step!==void 0){var o=this.schema.step||1;this.input.setAttribute("step",o)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(T),o=parseFloat(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&ps(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function zr(u){return zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(u)}function di(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(zr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(zr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),zr(h)==="symbol"?h:String(h)),i)}var h}function Zr(u,n){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Zr(u,n)}function Zi(u){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zi(u)}var ys=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Zi(i);if(h){var o=Zi(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(zr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(A),o=parseInt(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&di(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(fs);function Vn(u){return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vn(u)}function Ji(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Vn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Vn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Vn(h)==="symbol"?h:String(h)),i)}var h}function sn(){return sn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Jr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},sn.apply(this,arguments)}function zn(u,n){return zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zn(u,n)}function Jr(u){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jr(u)}var ea=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zn(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Jr(i);if(h){var o=Jr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Vn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"preBuild",value:function(){if(sn(Jr(s.prototype),"preBuild",this).call(this),this.schema.options||(this.schema.options={}),!this.schema.options.cleave)switch(this.format){case"ipv6":this.schema.options.cleave={delimiters:[":"],blocks:[4,4,4,4,4,4,4,4],uppercase:!0};break;case"ipv4":this.schema.options.cleave={delimiters:["."],blocks:[3,3,3,3],numericOnly:!0}}this.options=x(this.options,this.schema.options||{})}}])&&Ji(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Un(u){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Un(u)}function fl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Un(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Un(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Un(h)==="symbol"?h:String(h)),i)}var h}function Yr(){return Yr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Pr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Yr.apply(this,arguments)}function Yi(u,n){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yi(u,n)}function Pr(u){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pr(u)}var ms=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yi(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pr(i);if(h){var o=Pr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Un(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=Yr(Pr(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(c.value)}},{key:"build",value:function(){this.options.format="textarea",Yr(Pr(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.Jodit?(t=this.expandCallbacks("jodit",x({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",function(){e.value=e.jodit_instance.getEditorValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)):Yr(Pr(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),Yr(Pr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Yr(Pr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Yr(Pr(s.prototype),"destroy",this).call(this)}}])&&fl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),bs=(k(6541),k(9337),k(3321),function(u){var n=u.split(".");if(n.length!==4)throw new Error("error_ipv4");n.forEach(function(f){if(isNaN(+f)||+f<0||+f>255)throw new Error("error_ipv4")})}),ra=function(u){if(!u.match("^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$"))throw new Error("error_ipv6")},na=function(u){if(!u.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function ia(u,n,f,i){try{switch(u.format){case"ipv4":bs(n);break;case"ipv6":ra(n);break;case"hostname":na(n)}return[]}catch(h){return[{path:f,property:"format",message:i(h.message)}]}}function Xi(u,n){var f=Object.keys(u);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(u);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(u,h).enumerable})),f.push.apply(f,i)}return f}function oa(u,n,f){return(n=Qi(n))in u?Object.defineProperty(u,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):u[n]=f,u}function pi(u,n){return function(f){if(Array.isArray(f))return f}(u)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,s,t,e,o=[],c=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;c=!1}else for(;!(c=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);c=!0);}catch(_){d=!0,s=_}finally{try{if(!c&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw s}}return o}}(u,n)||fi(u,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yr(
|
|
64
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fi(u,n){if(u){if(typeof u=="string")return yi(u,n);var f=Object.prototype.toString.call(u).slice(8,-1);return f==="Object"&&u.constructor&&(f=u.constructor.name),f==="Map"||f==="Set"?Array.from(u):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?yi(u,n):void 0}}function yi(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function aa(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,Qi(i.key),i)}}function Qi(u){var n=function(f,i){if(yr(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(yr(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(u);return yr(n)==="symbol"?n:String(n)}var Ki=function(){function u(i,h,a,s){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,u),this.jsoneditor=i,this.schema=h||this.jsoneditor.schema,this.options=a||{},this.translate=this.jsoneditor.translate||s.translate,this.translateProperty=this.jsoneditor.translateProperty||s.translateProperty,this.defaults=s,this._validateSubSchema={dependentRequired:function(t,e,o){var c=[];if(t.dependentRequired!==void 0){var d=[];Object.keys(t.dependentRequired).forEach(function(_){if(e[_]!==void 0){var P=t.dependentRequired[_];d=P.filter(function(D){return!S(e,D)})}}),d.length>0&&c.push({message:"Must have the required properties: "+d.join(", "),path:o})}return c},dependentSchemas:function(t,e,o){var c=this,d=[];return Object.keys(t.dependentSchemas).forEach(function(_){if(e[_]!==void 0){var P=t.dependentSchemas[_],D=c._validateSchema(P,e,o);d=[].concat(Oe(d),Oe(D))}}),d},contains:function(t,e,o){var c=this,d=[],_=0;e.forEach(function(D){c._validateSchema(t.contains,D,o).length===0&&_++});var P=_===0;return t.minContains!==void 0?_<t.minContains&&d.push({message:this.translate("error_minContains",[_,t.minContains],t),path:o}):P&&d.push({message:this.translate("error_contains",null,t),path:o}),t.maxContains!==void 0&&_>t.maxContains&&d.push({message:this.translate("error_maxContains",[_,t.maxContains],t),path:o}),d},if:function(t,e,o){if(t.then===void 0&&t.else===void 0)return[];var c=this._validateSchema(t.if,e,o),d=[],_=[];return t.then!==void 0&&(d=this._validateSchema(t.then,e,o)),t.else!==void 0&&(_=this._validateSchema(t.else,e,o)),t.if===!0?d:t.if===!1?_:c.length===0?d:c.length>0?_:[]},const:function(t,e,o){return JSON.stringify(t.const)!==JSON.stringify(e)||Array.isArray(e)||yr(e)==="object"?[{path:o,property:"const",message:this.translate("error_const",null,t)}]:[]},enum:function(t,e,o){var c=JSON.stringify(e);return t.enum.some(function(d){return c===JSON.stringify(d)})?[]:[{path:o,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,o){var c=this;return t.extends.reduce(function(d,_){return d.push.apply(d,Oe(c._validateSchema(_,e,o))),d},[])},allOf:function(t,e,o){var c=this;return t.allOf.reduce(function(d,_){return d.push.apply(d,Oe(c._validateSchema(_,e,o))),d},[])},anyOf:function(t,e,o){var c=this;return t.anyOf.some(function(d){return!c._validateSchema(d,e,o).length})?[]:[{path:o,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,o){var c=this,d=0,_=[];t.oneOf.forEach(function(D,J){var nt=c._validateSchema(D,e,o);nt.length||d++,nt.forEach(function(ct){ct.path="".concat(o,".oneOf[").concat(J,"]").concat(ct.path.substr(o.length))}),_.push.apply(_,Oe(nt))});var P=[];return d!==1&&(P.push({path:o,property:"oneOf",message:this.translate("error_oneOf",[d],t)}),P.push.apply(P,_)),P},not:function(t,e,o){return this._validateSchema(t.not,e,o).length?[]:[{path:o,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,o){var c=this;if(Array.isArray(t.type)){if(!t.type.some(function(d){return c._checkType(d,e)}))return[{path:o,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&t.type==="integer"){if(!this._checkType("string","".concat(e)))return[{path:o,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:o,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,o){var c=this;if(Array.isArray(t.disallow)){if(t.disallow.some(function(d){return c._checkType(d,e)}))return[{path:o,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:o,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},divisibleBy:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},maximum:function(t,e,o){var c=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?c=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(c=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),c?[]:[{path:o,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,o){var c=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?c=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(c=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),c?[]:[{path:o,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum],t)}]}},this._validateStringSubSchema={maxLength:function(t,e,o){var c=[];return"".concat(e).length>t.maxLength&&c.push({path:o,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),c},minLength:function(t,e,o){return"".concat(e).length<t.minLength?[{path:o,property:"minLength",message:this.translate(t.minLength===1?"error_notempty":"error_minLength",[t.minLength],t)}]:[]},pattern:function(t,e,o){return new RegExp(t.pattern).test(e)?[]:[{path:o,property:"pattern",message:t.options&&t.options.patternmessage?t.options.patternmessage:this.translate("error_pattern",[t.pattern],t)}]}},this._validateArraySubSchema={items:function(t,e,o){var c=this,d=[];if(Array.isArray(t.items))for(var _=0;_<e.length;_++)if(t.items[_])d.push.apply(d,Oe(this._validateSchema(t.items[_],e[_],"".concat(o,".").concat(_))));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){d.push({path:o,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}d.push.apply(d,Oe(this._validateSchema(t.additionalItems,e[_],"".concat(o,".").concat(_))))}else e.forEach(function(P,D){d.push.apply(d,Oe(c._validateSchema(t.items,P,"".concat(o,".").concat(D))))});return d},maxItems:function(t,e,o){return e.length>t.maxItems?[{path:o,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,o){return e.length<t.minItems?[{path:o,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,o){for(var c={},d=0;d<e.length;d++){var _=JSON.stringify(e[d]);if(c[_])return[{path:o,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];c[_]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(t,e,o){return Object.keys(e).length>t.maxProperties?[{path:o,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties],t)}]:[]},minProperties:function(t,e,o){return Object.keys(e).length<t.minProperties?[{path:o,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties],t)}]:[]},required:function(t,e,o){var c=this,d=[];return Array.isArray(t.required)&&t.required.forEach(function(_){if(e[_]===void 0){var P=c.jsoneditor.getEditor("".concat(o,".").concat(_));P&&P.dependenciesFulfilled===!1||P&&["button","info"].includes(P.schema.format||P.schema.type)||d.push({path:o,property:"required",message:c.translate("error_required",[t&&t.properties&&t.properties[_]&&t.properties[_].title?t.properties[_].title:_],t)})}}),d},properties:function(t,e,o,c){var d=this,_=[];return Object.entries(t.properties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1];c[J]=!0,_.push.apply(_,Oe(d._validateSchema(nt,e[J],"".concat(o,".").concat(J))))}),_},patternProperties:function(t,e,o,c){var d=this,_=[];return Object.entries(t.patternProperties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1],ct=new RegExp(J);Object.entries(e).forEach(function(dt){var kt=pi(dt,2),Ct=kt[0],$t=kt[1];ct.test(Ct)&&(c[Ct]=!0,_.push.apply(_,Oe(d._validateSchema(nt,$t,"".concat(o,".").concat(Ct)))))})}),_}},this._validateObjectSubSchema2={propertyNames:function(t,e,o,c){for(var d=this,_=[],P=Object.keys(e),D=null,J=function(){var dt="";return D=P[nt],typeof t.propertyNames=="boolean"?t.propertyNames===!0?"continue":(_.push({path:o,property:"propertyNames",message:d.translate("error_property_names_false",[D],t)}),"break"):Object.entries(t.propertyNames).every(function(kt){var Ct=pi(kt,2),$t=Ct[0],ne=Ct[1],Re=!1;switch($t){case"maxLength":if(typeof ne!="number"){dt="error_property_names_maxlength";break}if(D.length>ne){dt="error_property_names_exceeds_maxlength";break}return!0;case"const":if(ne!==D){dt="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(ne)){dt="error_property_names_enum";break}if(ne.forEach(function(Gt){Gt===D&&(Re=!0)}),!Re){dt="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof ne!="string"){dt="error_property_names_pattern";break}if(!new RegExp(ne).test(D)){dt="error_property_names_pattern_mismatch";break}return!0;default:return _.push({path:o,property:"propertyNames",message:d.translate("error_property_names_unsupported",[$t],t)}),!1}return _.push({path:o,property:"propertyNames",message:d.translate(dt,[D],t)}),!1})?void 0:"break"},nt=0;nt<P.length;nt++){var ct=J();if(ct!=="continue"&&ct==="break")break}return _},additionalProperties:function(t,e,o,c){for(var d=[],_=Object.keys(e),P=0;P<_.length;P++){var D=_[P];if(!c[D]){if(!t.additionalProperties){d.push({path:o,property:"additionalProperties",message:this.translate("error_additional_properties",[D],t)});break}if(t.additionalProperties===!0)break;d.push.apply(d,Oe(this._validateSchema(t.additionalProperties,e[D],"".concat(o,".").concat(D))))}}return d},dependencies:function(t,e,o){var c=this,d=[];return Object.entries(t.dependencies).forEach(function(_){var P=pi(_,2),D=P[0],J=P[1];e[D]!==void 0&&(Array.isArray(J)?J.forEach(function(nt){e[nt]===void 0&&d.push({path:o,property:"dependencies",message:c.translate("error_dependency",[nt],t)})}):d.push.apply(d,Oe(c._validateSchema(J,e,o))))}),d}}}var n,f;return n=u,f=[{key:"fitTest",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,s={match:0,extra:0};if(yr(i)==="object"&&i!==null){var t=this._getSchema(h);if(t.anyOf){var e,o=function(nt){for(var ct=1;ct<arguments.length;ct++){var dt=arguments[ct]!=null?arguments[ct]:{};ct%2?Xi(Object(dt),!0).forEach(function(kt){oa(nt,kt,dt[kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(dt)):Xi(Object(dt)).forEach(function(kt){Object.defineProperty(nt,kt,Object.getOwnPropertyDescriptor(dt,kt))})}return nt}({},s),c=function(nt,ct){var dt=typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(!dt){if(Array.isArray(nt)||(dt=fi(nt))){dt&&(nt=dt);var kt=0,Ct=function(){};return{s:Ct,n:function(){return kt>=nt.length?{done:!0}:{done:!1,value:nt[kt++]}},e:function(Gt){throw Gt},f:Ct}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
65
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $t,ne=!0,Re=!1;return{s:function(){dt=dt.call(nt)},n:function(){var Gt=dt.next();return ne=Gt.done,Gt},e:function(Gt){Re=!0,$t=Gt},f:function(){try{ne||dt.return==null||dt.return()}finally{if(Re)throw $t}}}}(t.anyOf);try{for(c.s();!(e=c.n()).done;){var d=e.value,_=this.fitTest(i,d,a);(_.match>o.match||_.match===o.match&&_.extra<o.extra)&&(o=_)}}catch(nt){c.e(nt)}finally{c.f()}return o}var P=this._getSchema(h).properties;for(var D in P)if(S(P,D)){if(yr(i[D])==="object"&&yr(P[D])==="object"&&yr(P[D].properties)==="object"){var J=this.fitTest(i[D],P[D],a/100);s.match+=J.match,s.extra+=J.extra}i[D]!==void 0&&(s.match+=a)}else s.extra+=a}return s}},{key:"_getSchema",value:function(i){return i===void 0?x({},this.jsoneditor.expandRefs(this.schema)):i}},{key:"validate",value:function(i){return this._validateSchema(this.schema,i)}},{key:"_validateSchema",value:function(i,h,a){var s=this,t=[];return a=a||this.jsoneditor.root.formname,i=x({},this.jsoneditor.expandRefs(i)),h===void 0?this._validateV3Required(i,h,a):(Object.keys(i).forEach(function(e){s._validateSubSchema[e]&&t.push.apply(t,Oe(s._validateSubSchema[e].call(s,i,h,a)))}),t.push.apply(t,Oe(this._validateByValueType(i,h,a))),i.links&&i.links.forEach(function(e,o){e.rel&&e.rel.toLowerCase()==="describedby"&&(i=s._expandSchemaLink(i,o),t.push.apply(t,Oe(s._validateSchema(i,h,a,s.translate))))}),["date","time","datetime-local"].includes(i.format)&&t.push.apply(t,Oe(this._validateDateTimeSubSchema(i,h,a))),["uuid"].includes(i.format)&&t.push.apply(t,Oe(this._validateUUIDSchema(i,h,a))),t.push.apply(t,Oe(this._validateCustomValidator(i,h,a))),this._removeDuplicateErrors(t))}},{key:"_expandSchemaLink",value:function(i,h){var a=i.links[h].href,s=this.jsoneditor.root.getValue(),t=this.jsoneditor.compileTemplate(a,this.jsoneditor.template),e=document.location.origin+document.location.pathname+t(s);return i.links=i.links.slice(0,h).concat(i.links.slice(h+1)),x({},i,this.jsoneditor.refs[e])}},{key:"_validateV3Required",value:function(i,h,a){return(i.required!==void 0&&i.required===!0||i.required===void 0&&this.jsoneditor.options.required_by_default===!0)&&i.type!=="info"?[{path:a,property:"required",message:this.translate("error_notset",null,i)}]:[]}},{key:"_validateByValueType",value:function(i,h,a){var s=this,t=[];if(h===null)return t;if(typeof h=="number")Object.keys(i).forEach(function(o){s._validateNumberSubSchema[o]&&t.push.apply(t,Oe(s._validateNumberSubSchema[o].call(s,i,h,a)))});else if(typeof h=="string")Object.keys(i).forEach(function(o){s._validateStringSubSchema[o]&&t.push.apply(t,Oe(s._validateStringSubSchema[o].call(s,i,h,a)))});else if(Array.isArray(h))Object.keys(i).forEach(function(o){s._validateArraySubSchema[o]&&t.push.apply(t,Oe(s._validateArraySubSchema[o].call(s,i,h,a)))});else if(yr(h)==="object"){var e={};Object.keys(i).forEach(function(o){s._validateObjectSubSchema[o]&&t.push.apply(t,Oe(s._validateObjectSubSchema[o].call(s,i,h,a,e)))}),i.additionalProperties!==void 0||!this.jsoneditor.options.no_additional_properties||i.oneOf||i.anyOf||i.allOf||(i.additionalProperties=!1),Object.keys(i).forEach(function(o){s._validateObjectSubSchema2[o]!==void 0&&t.push.apply(t,Oe(s._validateObjectSubSchema2[o].call(s,i,h,a,e)))})}return t}},{key:"_validateUUIDSchema",value:function(i,h,a){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(h)?[]:[{path:a,property:"format",message:this.translate("error_pattern",["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"],i)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(i,h,a){var s=i.multipleOf||i.divisibleBy,t=h/s===Math.floor(h/s);return window.math?t=window.math.mod(window.math.bignumber(h),window.math.bignumber(s)).equals(0):window.Decimal&&(t=new window.Decimal(h).mod(new window.Decimal(s)).equals(0)),t?[]:[{path:a,property:i.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[s],i)}]}},{key:"_validateDateTimeSubSchema",value:function(i,h,a){var s=this,t=this.jsoneditor.getEditor(a),e=t&&t.flatpickr?t.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[i.format];if(i.type==="integer")return function(o,c,d){return 1*c<1?[{path:d,property:"format",message:s.translate("error_invalid_epoch",null,o)}]:c!==Math.abs(parseInt(c))?[{path:d,property:"format",message:s.translate("error_".concat(o.format.replace(/-/g,"_")),[e],o)}]:[]}(i,h,a);if(t&&t.flatpickr){if(t)return function(o,c,d,_){if(c!==""){var P;if(_.flatpickr.config.mode!=="single"){var D=_.flatpickr.config.mode==="range"?_.flatpickr.l10n.rangeSeparator:", ";P=_.flatpickr.selectedDates.map(function(nt){return _.flatpickr.formatDate(nt,_.flatpickr.config.dateFormat)}).join(D)}try{if(P){if(P!==c)throw new Error("".concat(_.flatpickr.config.mode," mismatch"))}else if(_.flatpickr.formatDate(_.flatpickr.parseDate(c,_.flatpickr.config.dateFormat),_.flatpickr.config.dateFormat)!==c)throw new Error("mismatch")}catch{var J=_.flatpickr.config.errorDateFormat!==void 0?_.flatpickr.config.errorDateFormat:_.flatpickr.config.dateFormat;return[{path:d,property:"format",message:s.translate("error_".concat(_.format.replace(/-/g,"_")),[J],o)}]}}return[]}(i,h,a,t)}else if(!{date:/^(\d{4}\D\d{2}\D\d{2})?$/,time:/^(\d{2}:\d{2}(?::\d{2})?)?$/,"datetime-local":/^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)?$/}[i.format].test(h))return[{path:a,property:"format",message:this.translate("error_".concat(i.format.replace(/-/g,"_")),[e],i)}];return[]}},{key:"_validateCustomValidator",value:function(i,h,a){var s=this,t=[];t.push.apply(t,Oe(ia.call(this,i,h,a,this.translate)));var e=function(o){t.push.apply(t,Oe(o.call(s,i,h,a)))};return this.defaults.custom_validators.forEach(e),this.options.custom_validators&&this.options.custom_validators.forEach(e),t}},{key:"_removeDuplicateErrors",value:function(i){return i.reduce(function(h,a){var s=!0;return h||(h=[]),h.forEach(function(t){t.message===a.message&&t.path===a.path&&t.property===a.property&&(t.errorcount++,s=!1)}),s&&(a.errorcount=1,h.push(a)),h},[])}},{key:"_checkType",value:function(i,h){var a={string:function(s){return typeof s=="string"},number:function(s){return typeof s=="number"},integer:function(s){return typeof s=="number"&&s===Math.floor(s)},boolean:function(s){return typeof s=="boolean"},array:function(s){return Array.isArray(s)},object:function(s){return s!==null&&!Array.isArray(s)&&yr(s)==="object"},null:function(s){return s===null}};return typeof i=="string"?!a[i]||a[i](h):!this._validateSchema(i,h).length}}],f&&aa(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function qe(u){return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qe(u)}function Ur(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(qe(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(qe(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),qe(h)==="symbol"?h:String(h)),i)}var h}function ln(){return ln=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=mr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ln.apply(this,arguments)}function sa(u,n){return sa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},sa(u,n)}function mr(u){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mr(u)}var to=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sa(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=mr(i);if(h){var o=mr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(qe(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}ln(mr(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(ln(mr(s.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}},{key:"enable",value:function(){if(!this.always_disabled){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,ln(mr(s.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable(t);this.switcher.disabled=!0,ln(mr(s.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(t){var e=this;this.lastType=this.type,this.editors[t]||this.buildChildEditor(t);var o=this.getValue();this.type=t,this.register(),this.editors.forEach(function(c,d){var _,P;c&&(e.type===d?(e.keep_only_existing_values&&(_=c.getValue(),P=o,Object.keys(P).forEach(function(D){D in _&&(_[D]=P[D])}),o=_),(e.keep_values||e.if)&&c.setValue(o,!0),c.container.style.display=""):c.container.style.display="none")}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,o=this,c=this.types[t],d=this.theme.getChildEditorHolder();this.editor_holder.appendChild(d),typeof c=="string"?(e=x({},this.schema)).type=c:(e=x({},this.schema,c),e=this.jsoneditor.expandRefs(e),c&&c.required&&Array.isArray(c.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(e.required=this.schema.required.concat(c.required)));var _=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(_,{jsoneditor:this.jsoneditor,schema:e,container:d,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&(this.editors[t].header.style.display="none"),this.editors[t].option=this.switcher_options[t],d.addEventListener("change_header_text",function(){o.refreshHeaderText()}),t!==this.type&&(d.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,this.jsoneditor.options.keep_oneof_values!==void 0&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),this.options.keep_oneof_values!==void 0&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,this.jsoneditor.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),this.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.options.keep_only_existing_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,delete this.schema.oneOf;else if(this.schema.anyOf)this.anyOf=!0,this.types=this.schema.anyOf,delete this.schema.anyOf;else if(this.schema.if)this.if=!0,this.ifSchema=JSON.parse(JSON.stringify(this.schema.if)),this.thenSchema={title:"then"},this.elseSchema={title:"else"},this.types=[],this.schema.then&&$(this.thenSchema,this.schema,this.schema.then),this.schema.else&&$(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach(function(o){delete o.if,delete o.then,delete o.else}),delete this.schema.if;else{if(this.schema.type&&this.schema.type!=="any")Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var t=this.schema.disallow;qe(t)==="object"&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach(function(o){t.includes(o)||e.push(o)}),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.switcher=this.theme.getSwitcher(this.display_text),this.if||(this.container.appendChild(this.header),e.appendChild(this.switcher)),this.switcher.addEventListener("change",function(c){c.preventDefault(),c.stopPropagation(),t.switchEditor(t.display_text.indexOf(c.currentTarget.value)),t.onChange(!0)}),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder);var o={};this.jsoneditor.options.custom_validators&&(o.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach(function(c,d){var _;t.editors[d]=!1,typeof c=="string"?(_=x({},t.schema)).type=c:(_=x({},t.schema,c),c.required&&Array.isArray(c.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(_.required=t.schema.required.concat(c.required))),t.validators[d]=new Ki(t.jsoneditor,_,o,t.defaults)}),this.jsoneditor.on("change",function(){t.switchIf()}),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),ln(mr(s.prototype),"onChildEditorChange",this).call(this)}},{key:"refreshHeaderText",value:function(){var t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach(function(e,o){e.textContent=t[o]})}},{key:"refreshValue",value:function(){this.editors[this.type]&&(this.value=this.editors[this.type].getValue())}},{key:"switchIf",value:function(){if(this.ifSchema&&this.value){var t=this.getIfType(this.value);this.lastType!==t&&(this.switchEditor(t),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(t){return this.jsoneditor.validator._validateSchema(this.ifSchema,t).length===0?0:1}},{key:"setValue",value:function(t,e){var o=this,c=this.type,d={match:0,extra:0,i:this.type},_={match:0,i:null};this.validators.forEach(function(J,nt){var ct=null;o.anyOf!==void 0&&o.anyOf&&(ct=J.fitTest(t),(d.match<ct.match||d.match===ct.match&&d.extra>ct.extra)&&((d=ct).i=nt)),J.validate(t).length||_.i!==null?d=_:(_.i=nt,ct!==null&&(_.match=ct.match))});var P=_.i;this.anyOf!==void 0&&this.anyOf&&_.match<d.match&&(P=d.i),this.if&&(P=this.getIfType(t)),P===null&&(P=this.type),this.type=P,this.switcher.value=this.display_text[P];var D=this.type!==c;D&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),t!==void 0&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(D)}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ln(mr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.oneOf||this.anyOf){var o=this.oneOf?"oneOf":"anyOf";this.editors.forEach(function(c,d){if(c){var _="".concat(e.path,".").concat(o,"[").concat(d,"]");c.showValidationErrors(t.reduce(function(P,D){if(D.path.startsWith(_)||D.path===_.substr(0,D.path.length)){var J=x({},D);D.path.startsWith(_)&&(J.path=e.path+J.path.substr(_.length)),P.push(J)}return P},[]))}})}else this.editors.forEach(function(c){c&&c.showValidationErrors(t)})}},{key:"addLinks",value:function(){}}])&&Ur(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function jn(u){return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jn(u)}function eo(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(jn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jn(h)==="symbol"?h:String(h)),i)}var h}function qn(u,n){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},qn(u,n)}function Gn(u){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gn(u)}var la=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Gn(i);if(h){var o=Gn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(jn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&eo(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function ro(u,n){var f=Object.keys(u);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(u);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(u,h).enumerable})),f.push.apply(f,i)}return f}function un(u){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?ro(Object(f),!0).forEach(function(i){mi(u,i,f[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(f)):ro(Object(f)).forEach(function(i){Object.defineProperty(u,i,Object.getOwnPropertyDescriptor(f,i))})}return u}function mi(u,n,f){return(n=io(n))in u?Object.defineProperty(u,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):u[n]=f,u}function En(u,n){return function(f){if(Array.isArray(f))return f}(u)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,s,t,e,o=[],c=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;c=!1}else for(;!(c=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);c=!0);}catch(_){d=!0,s=_}finally{try{if(!c&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw s}}return o}}(u,n)||function(f,i){if(f){if(typeof f=="string")return no(f,i);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?no(f,i):void 0}}(u,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function no(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function Ir(u){return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ir(u)}function ua(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,io(i.key),i)}}function io(u){var n=function(f,i){if(Ir(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(Ir(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(u);return Ir(n)==="symbol"?n:String(n)}function Tr(){return Tr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=br(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Tr.apply(this,arguments)}function oo(u,n){return oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},oo(u,n)}function br(u){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},br(u)}var bi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oo(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=br(i);if(h){var o=br(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ir(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t,e,o){var c;return function(d,_){if(!(d instanceof _))throw new TypeError("Cannot call a class as a function")}(this,s),(c=a.call(this,t,e)).currentDepth=o,c}return n=s,(f=[{key:"getDefault",value:function(){return x({},this.schema.default||{})}},{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Tr(br(s.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.register()})}},{key:"unregister",value:function(){Tr(br(s.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.maxwidth),3)}},{key:"enable",value:function(){this.always_disabled||(this.editjson_control&&(this.editjson_control.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),Tr(br(s.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){t.isActive()&&t.enable(),t.optInCheckbox.disabled=!1}))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),Tr(br(s.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(e){e.isActive()&&e.disable(t),e.optInCheckbox.disabled=!0})}},{key:"layoutEditors",value:function(){var t,e,o=this;if(this.row_container){var c;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(Gt,gt){var Zt=o.editors[Gt].schema.propertyOrder,Ge=o.editors[gt].schema.propertyOrder;return typeof Zt!="number"&&(Zt=1e3),typeof Ge!="number"&&(Ge=1e3),Zt-Ge});var d,_=this.format==="categories",P=[],D=null,J=null;if(this.format==="grid-strict"){var nt=0;if(d=[],this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Zt=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),Ge=gt.options.hidden?0:gt.options.grid_offset||0,W=!gt.options.hidden&&(gt.options.grid_break||!1),G={key:Gt,width:Zt,offset:Ge,height:gt.options.hidden?0:gt.container.offsetHeight};d.push(G),P[nt]=d,W&&(nt++,d=[])}}),this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),c=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),c.appendChild(d),e=0;e<P[t].length;e++)D=P[t][e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t][e].width,P[t][e].offset),d.appendChild(J.container)}else if(this.format==="grid"){for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){for(var Zt=!1,Ge=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),W=gt.options.hidden?0:gt.container.offsetHeight,G=0;G<P.length;G++)P[G].width+Ge<=12&&(!W||.5*P[G].minh<W&&2*P[G].maxh>W)&&(Zt=G);Zt===!1&&(P.push({width:0,minh:999999,maxh:0,editors:[]}),Zt=P.length-1),P[Zt].editors.push({key:Gt,width:Ge,height:W}),P[Zt].width+=Ge,P[Zt].minh=Math.min(P[Zt].minh,W),P[Zt].maxh=Math.max(P[Zt].maxh,W)}}),t=0;t<P.length;t++)if(P[t].width<12){var ct=!1,dt=0;for(e=0;e<P[t].editors.length;e++)(ct===!1||P[t].editors[e].width>P[t].editors[ct].width)&&(ct=e),P[t].editors[e].width*=12/P[t].width,P[t].editors[e].width=Math.floor(P[t].editors[e].width),dt+=P[t].editors[e].width;dt<12&&(P[t].editors[ct].width+=12-dt),P[t].width=12}if(this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),c=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),c.appendChild(d),e=0;e<P[t].editors.length;e++)D=P[t].editors[e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t].editors[e].width),d.appendChild(J.container)}else{if(c=document.createElement("div"),_){var kt=document.createElement("div"),Ct=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),$t=this.theme.getTopTabContentHolder(Ct);for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Zt=o.theme.getTabContent(),Ge=gt.schema&&(gt.schema.type==="object"||gt.schema.type==="array");Zt.isObjOrArray=Ge;var W=o.theme.getGridRow();gt.tab||(o.basicPane===void 0?o.addRow(gt,Ct,Zt):o.addRow(gt,Ct,o.basicPane)),Zt.id=o.getValidId(gt.tab_text.textContent),Ge?(Zt.appendChild(W),$t.appendChild(Zt),o.theme.addTopTab(Ct,gt.tab)):(kt.appendChild(W),$t.childElementCount>0?$t.firstChild.isObjOrArray&&(Zt.appendChild(kt),$t.insertBefore(Zt,$t.firstChild),o.theme.insertBasicTopTab(gt.tab,Ct),gt.basicPane=Zt):(Zt.appendChild(kt),$t.appendChild(Zt),o.theme.addTopTab(Ct,gt.tab),gt.basicPane=Zt)),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),W.appendChild(gt.container),gt.rowPane=Zt}});this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var ne=this.tabs_holder.parentNode;ne.removeChild(ne.firstChild),ne.appendChild(Ct),this.tabPanesContainer=$t,this.tabs_holder=Ct;var Re=this.theme.getFirstTab(this.tabs_holder);return void(Re&&j(Re,"click"))}this.property_order.forEach(function(Gt){var gt=o.editors[Gt];gt.property_removed||(d=o.theme.getGridRow(),c.appendChild(d),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),d.appendChild(gt.container))})}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(c)}}},{key:"getPropertySchema",value:function(t){var e=this,o=this.schema.properties[t]||{};o=x({},o);var c=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(function(d){new RegExp(d).test(t)&&(o.allOf=o.allOf||[],o.allOf.push(e.schema.patternProperties[d]),c=!0)}),!c&&this.schema.additionalProperties&&Ir(this.schema.additionalProperties)==="object"&&(o=x({},this.schema.additionalProperties)),o}},{key:"preBuild",value:function(){var t=this;if(Tr(br(s.prototype),"preBuild",this).call(this),this.editors={},this.cached_editors={},this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)Object.entries(this.schema.properties).forEach(function(e){var o=En(e,2),c=o[0],d=o[1],_=t.jsoneditor.getEditorClass(d);t.editors[c]=t.jsoneditor.createEditor(_,{jsoneditor:t.jsoneditor,schema:d,path:"".concat(t.path,".").concat(c),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[c].preBuild();var P=t.editors[c].options.hidden?0:t.editors[c].options.grid_columns||t.editors[c].getNumColumns();t.minwidth+=P,t.maxwidth+=P}),this.no_link_holder=!0;else{if(this.options.table)throw new Error("Not supported yet");this.schema.defaultProperties||(this.jsoneditor.options.display_required_only||this.options.display_required_only?this.schema.defaultProperties=Object.keys(this.schema.properties).filter(function(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})}):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach(function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(e,o){var c=t.editors[e].schema.propertyOrder,d=t.editors[o].schema.propertyOrder;return typeof c!="number"&&(c=1e3),typeof d!="number"&&(d=1e3),c-d})}},{key:"addTab",value:function(t){var e=this,o=this.rows[t].schema&&(this.rows[t].schema.type==="object"||this.rows[t].schema.type==="array");this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=o?this.rows[t].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",function(c){e.active_tab=e.rows[t].tab,e.refreshTabs(),c.preventDefault(),c.stopPropagation()}))}},{key:"addRow",value:function(t,e,o){var c=this.rows.length,d=t.schema.type==="object"||t.schema.type==="array";this.rows[c]=t,this.rows[c].rowPane=o,d?(this.addTab(c),this.theme.addTopTab(e,this.rows[c].tab)):this.basicTab===void 0?(this.addTab(c),this.basicTab=c,this.basicPane=o,this.theme.addTopTab(e,this.rows[c].tab)):(this.rows[c].tab=this.rows[this.basicTab].tab,this.rows[c].tab_text=this.rows[this.basicTab].tab_text,this.rows[c].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,o=this.basicTab!==void 0,c=!1;this.rows.forEach(function(d){d.tab&&d.rowPane&&d.rowPane.parentNode&&(o&&d.tab===e.rows[e.basicTab].tab&&c||(t?d.tab_text.textContent=d.getHeaderText():(o&&d.tab===e.rows[e.basicTab].tab&&(c=!0),d.tab===e.active_tab?e.theme.markTabActive(d):e.theme.markTabInactive(d))))})}},{key:"build",value:function(){var t=this,e=this.format==="categories";if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach(function(c){var d=En(c,2),_=d[0],P=d[1],D=t.theme.getTableCell();t.editor_holder.appendChild(D),P.setContainer(D),P.build(),P.postBuild(),P.setOptInCheckbox(P.header),P.setValue(P.getDefault(),!0),t.editors[_].options.hidden&&(D.style.display="none"),t.editors[_].options.input_width&&(D.style.width=t.editors[_].options.input_width)});else{if(this.options.table)throw new Error("Not supported yet");this.header="",this.options.compact||(this.header=document.createElement("label"),this.header.textContent=this.getTitle()),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.title.classList.add("je-object__title"),this.controls=this.theme.getButtonHolder(),this.controls.classList.add("je-object__controls"),this.container.appendChild(this.title),this.container.appendChild(this.controls),this.container.classList.add("je-object__container"),this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.classList.add("je-edit-json--textarea"),this.editjson_save=this.getButton("button_save","save","button_save"),this.editjson_save.classList.add("json-editor-btntype-save"),this.editjson_save.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.saveJSON()}),this.editjson_copy=this.getButton("button_copy","copy","button_copy"),this.editjson_copy.classList.add("json-editor-btntype-copy"),this.editjson_copy.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.copyJSON()}),this.editjson_cancel=this.getButton("button_cancel","cancel","button_cancel"),this.editjson_cancel.classList.add("json-editor-btntype-cancel"),this.editjson_cancel.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_copy),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.classList.add("property-selector"),this.addproperty_add=this.getButton("button_add","add","button_add"),this.addproperty_add.classList.add("json-editor-btntype-add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.classList.add("property-selector-input"),this.addproperty_add.addEventListener("click",function(c){if(c.preventDefault(),c.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable(),t.onChange(!0)}}),this.addproperty_input.addEventListener("input",function(c){c.target.previousSibling.childNodes.forEach(function(d){var _=d.innerText,P=c.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(_=_.toLowerCase(),P=P.toLowerCase()),_.includes(P)?d.style.display="":d.style.display="none"})}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var o=document.createElement("div");o.style.clear="both",this.addproperty_holder.appendChild(o),this.onOutsideModalClickListener=this.onOutsideModalClick.bind(this),document.addEventListener("click",this.onOutsideModalClickListener,!0),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),e?(this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTopTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.tabs_holder)):(this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.row_container)),Object.values(this.editors).forEach(function(c){var d=t.theme.getTabContent(),_=t.theme.getGridColumn(),P=!(!c.schema||c.schema.type!=="object"&&c.schema.type!=="array");if(d.isObjOrArray=P,e){if(P){var D=t.theme.getGridContainer();D.appendChild(_),d.appendChild(D),t.tabPanesContainer.appendChild(d),t.row_container=D}else t.row_container_basic===void 0&&(t.row_container_basic=t.theme.getGridContainer(),d.appendChild(t.row_container_basic),t.tabPanesContainer.childElementCount===0?t.tabPanesContainer.appendChild(d):t.tabPanesContainer.insertBefore(d,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(_);t.addRow(c,t.tabs_holder,d),d.id=t.getValidId(c.schema.title)}else t.row_container.appendChild(_);c.setContainer(_),c.build(),c.postBuild(),c.setOptInCheckbox(c.header)}),this.rows[0]&&j(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse","button_collapse"),this.collapse_control.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(this.collapse_control,this.title.childNodes[0]),this.collapse_control.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.collapse_control,"","collapse","button_collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand","button_expand"))}),this.options.collapsed&&j(this.collapse_control,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.collapse_control.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.collapse_control.style.display="none"),this.editjson_control=this.getButton("JSON","edit","button_edit_json"),this.editjson_control.classList.add("json-editor-btntype-editjson"),this.editjson_control.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.toggleEditJSON()}),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&this.schema.options.disable_edit_json!==void 0?this.schema.options.disable_edit_json&&(this.editjson_control.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_control.style.display="none"),this.addproperty_button=this.getButton("properties","edit_properties","button_object_properties"),this.addproperty_button.classList.add("json-editor-btntype-properties"),this.addproperty_button.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.toggleAddProperty()}),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties()}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach(function(c){t.editor_holder.appendChild(t.editors[c].container)})):(this.layoutEditors(),this.layoutEditors())}},{key:"deactivateNonRequiredProperties",value:function(){var t=this,e=this.jsoneditor.options.show_opt_in,o=this.options.show_opt_in!==void 0,c=o&&this.options.show_opt_in===!0,d=o&&this.options.show_opt_in===!1;(c||!d&&e||!o&&e)&&Object.entries(this.editors).forEach(function(_){var P=En(_,2),D=P[0],J=P[1];t.isRequiredObject(J)||t.editors[D].deactivate()})}},{key:"showEditJSON",value:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left="".concat(this.editjson_control.offsetLeft,"px"),this.editjson_holder.style.top="".concat(this.editjson_control.offsetTop+this.editjson_control.offsetHeight,"px"),this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_control.disabled=!1,this.editing_json=!0)}},{key:"hideEditJSON",value:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}},{key:"copyJSON",value:function(){if(this.editjson_holder){var t=document.createElement("textarea");t.value=this.editjson_textarea.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON(),this.onChange(!0)}catch(e){throw window.alert("invalid JSON"),e}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(t,e,o){var c;this.schema.properties[t]&&(c=this.schema.properties[t].propertyOrder),typeof c!="number"&&(c=1e3),e.propertyOrder=c;for(var d=0;d<o.childNodes.length;d++){var _=o.childNodes[d];if(e.propertyOrder<_.propertyOrder){this.addproperty_list.insertBefore(e,_),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,o=this,c=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var d=this.theme.getCheckboxLabel(e),_=this.theme.getFormControl(d,c);return _.style.paddingBottom=_.style.marginBottom=_.style.paddingTop=_.style.marginTop=0,_.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,_,this.addproperty_list),c.checked=t in this.editors,c.addEventListener("change",function(){c.checked?o.addObjectProperty(t):o.removeObjectProperty(t),o.onChange(!0)}),this.addproperty_checkboxes[t]=c,c}},{key:"showAddProperty",value:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left="".concat(this.addproperty_button.offsetLeft,"px"),this.addproperty_holder.style.top="".concat(this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight,"px"),this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())}},{key:"hideAddProperty",value:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)}},{key:"toggleAddProperty",value:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()}},{key:"removeObjectProperty",value:function(t){this.editors[t]&&(this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors())}},{key:"getSchemaOnMaxDepth",value:function(t){return Object.keys(t).reduce(function(e,o){switch(o){case"$ref":return e;case"properties":case"items":return un(un({},e),{},mi({},o,{}));case"additionalProperties":case"propertyNames":return un(un({},e),{},mi({},o,!0));default:return un(un({},e),{},mi({},o,t[o]))}},{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find(function(P){return new RegExp(P).test(t)})))return;var o=this.getPropertySchema(t);typeof o.propertyOrder!="number"&&(o.propertyOrder=Object.keys(this.editors).length+1e3);var c=this.jsoneditor.getEditorClass(o),d=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:d&&this.currentDepth>=d?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var _=this.theme.getChildEditorHolder();this.editor_holder.appendChild(_),this.editors[t].setContainer(_),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(c.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){var e=t.path||t.composedPath&&t.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(e[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),Tr(br(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:Ir(this.schema.additionalProperties)==="object"&&this.schema.additionalProperties!==null||(typeof this.options.no_additional_properties=="boolean"?!this.options.no_additional_properties:typeof this.jsoneditor.options.no_additional_properties!="boolean"||!this.jsoneditor.options.no_additional_properties)}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach(function(t){return t.destroy()}),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,document.removeEventListener("click",this.onOutsideModalClickListener,!0),Tr(br(s.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=Tr(br(s.prototype),"getValue",this).call(this);return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach(function(e){var o;((o=t[e])===void 0||o===""||o===Object(o)&&Object.keys(o).length===0&&o.constructor===Object)&&delete t[e]}),t}}},{key:"refreshValue",value:function(){var t=this;this.value={},this.editors&&(Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&(t.editors[e].refreshValue(),t.value[e]=t.editors[e].getValue())}),Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&t.activateDependentRequired(t.editors[e].key)}),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(t){var e=this;this.getDependentRequired(t).forEach(function(o){var c;Object.entries(e.cached_editors).forEach(function(d){var _=En(d,2),P=(_[0],_[1]);P.key===o&&(c=P)}),c&&!c.isActive()&&c.activate()})}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&S(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,o=0,c=!1;Object.keys(this.editors).forEach(function(d){return o++}),e=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&o>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach(function(d){t.addPropertyCheckbox(d),t.isRequiredObject(t.cached_editors[d])&&d in t.editors&&(t.addproperty_checkboxes[d].disabled=!0),t.schema.minProperties!==void 0&&o<=t.schema.minProperties?(t.addproperty_checkboxes[d].disabled=t.addproperty_checkboxes[d].checked,t.addproperty_checkboxes[d].checked||(c=!0)):d in t.editors?c=!0:e||S(t.schema.properties,d)?(t.addproperty_checkboxes[d].disabled=!1,c=!0):t.addproperty_checkboxes[d].disabled=!0}),this.canHaveAdditionalProperties()&&(c=!0),Object.keys(this.schema.properties).forEach(function(d){t.cached_editors[d]||(c=!0,t.addPropertyCheckbox(d))}),c?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!e:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(t){if(t)return typeof t.schema.required=="boolean"?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(t.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(t,e){var o=this;(Ir(t=t||{})!=="object"||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach(function(c){var d=En(c,2),_=d[0],P=d[1];t[_]!==void 0?(o.addObjectProperty(_),P.setValue(t[_],e),P.activate()):e||o.isRequiredObject(P)?P.setValue(P.getDefault(),e):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?P.deactivate():o.removeObjectProperty(_)}),Object.entries(t).forEach(function(c){var d=En(c,2),_=d[0],P=d[1];o.cached_editors[_]||(o.addObjectProperty(_),o.editors[_]&&o.editors[_].setValue(P,e,!!o.editors[_].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(d){d.path===e.path?o.push(d):c.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){d.errorcount&&d.errorcount>1&&(d.message+=" (".concat(d.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.options.table_row&&(o.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach(function(d){d.showValidationErrors(c)})}}])&&ua(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Wn(u){return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wn(u)}function yl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Wn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wn(h)==="symbol"?h:String(h)),i)}var h}function Zn(){return Zn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=V(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Zn.apply(this,arguments)}function ca(u,n){return ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ca(u,n)}function V(u){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},V(u)}bi.rules={".je-object__title":"display:inline-block",".je-object__controls":"margin:0%200%200%2010px",".je-object__container":"position:relative",".je-object__property-checkbox":"margin:0;height:auto",".property-selector":"width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",".property-selector-input":"width:220px;margin-bottom:0;display:inline-block",".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-edit-json--textarea":"height:170px;width:300px;display:block"};var at=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ca(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=V(i);if(h){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Wn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"preBuild",value:function(){Zn(V(s.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var t=this;this.label="",this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.radioContainer=document.createElement("div"),this.radioGroup=[];for(var e=function(J){t.setValue(J.currentTarget.value),t.onChange(!0)},o=0;o<this.enum_values.length;o++){var c={id:"".concat(this.formname,"[").concat(o,"]"),value:this.enum_values[o]};this.jsoneditor.options.use_name_attributes&&(c.name=this.formname),this.input=this.theme.getFormRadio(c),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var d=this.theme.getFormRadioLabel(this.enum_display[o]);d.htmlFor=this.input.id;var _=this.theme.getFormRadioControl(d,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(_)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var P=0;P<this.radioGroup.length;P++)this.radioGroup[P].disabled=!0;this.radioContainer.classList.add("readonly")}var D=this.theme.getContainer();D.appendChild(this.radioContainer),D.dataset.containerFor="radio",this.input=D,this.control=this.theme.getFormControl(this.label,D,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),Zn(V(s.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.radioContainer.classList.add("readonly"),Zn(V(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.radioContainer.parentNode&&this.radioContainer.parentNode.parentNode&&this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Zn(V(s.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(t){typeof t!="string"&&(t=String(t));for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0,this.value=t,this.onChange();break}}}])&&yl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function jt(u){return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jt(u)}function ve(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(jt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jt(h)==="symbol"?h:String(h)),i)}var h}function xe(){return xe=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=He(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},xe.apply(this,arguments)}function se(u,n){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},se(u,n)}function He(u){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},He(u)}var ao=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=He(i);if(h){var o=He(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(jt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=xe(He(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.sceditor_instance&&this.sceditor_instance.val(c.value)}},{key:"build",value:function(){this.options.format="textarea",xe(He(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t=this;if(window.sceditor){var e=this.expandCallbacks("sceditor",x({},{format:this.input_type,emoticonsEnabled:!1,width:"100%",height:300,readOnly:this.schema.readOnly||this.schema.readonly||this.schema.template},this.defaults.options.sceditor||{},this.options.sceditor||{},{element:this.input})),o=window.sceditor.instance(this.input);o===void 0&&window.sceditor.create(this.input,e),this.sceditor_instance=o||window.sceditor.instance(this.input),this.sceditor_instance.blur(function(){t.value=t.sceditor_instance.val(),t.sceditor_instance.updateOriginal(),t.is_dirty=!0,t.onChange(!0)}),this.theme.afterInputReady(this.input)}else xe(He(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.sceditor_instance&&this.sceditor_instance.readOnly(!1),xe(He(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),xe(He(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),xe(He(s.prototype),"destroy",this).call(this)}}])&&ve(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function so(u){return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(u)}function gp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(so(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(so(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),so(h)==="symbol"?h:String(h)),i)}var h}function vi(){return vi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=cn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},vi.apply(this,arguments)}function ml(u,n){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ml(u,n)}function cn(u){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cn(u)}var wp=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ml(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=cn(i);if(h){var o=cn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(so(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){if(this.select2_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.select2v4?this.select2_instance.val(o).trigger("change"):this.select2_instance.select2("val",o),this.onChange(!0)}else vi(cn(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var e=this.expandCallbacks("select2",x({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=e.tags=!!e.tags&&this.schema.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(o),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}vi(cn(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e,o=this.typecast(t),c=!1;return this.enum_values.includes(o)||o===""||(this.enum_options.push("".concat(o)),this.enum_display.push("".concat(o)),this.enum_values.push(o),this.schema.enum.push(o),(e=this.input.querySelector('option[value="'.concat(o,'"]')))?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(o,o,!1,!1)).trigger("change"),c=!0),c}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),vi(cn(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),vi(cn(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),vi(cn(s.prototype),"destroy",this).call(this)}}])&&gp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function lo(u){return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lo(u)}function _p(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(lo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(lo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),lo(h)==="symbol"?h:String(h)),i)}var h}function Jn(){return Jn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Xr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Jn.apply(this,arguments)}function bl(u,n){return bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},bl(u,n)}function Xr(u){return Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xr(u)}var xp=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xr(i);if(h){var o=Xr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(lo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){if(this.selectize_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.selectize_instance.clear(!0),this.selectize_instance.setValue(o),this.onChange(!0)}else Jn(Xr(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var e=this.expandCallbacks("selectize",x({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=e.create=!!e.create&&this.schema.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){t.updateValue(o),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Jn(Xr(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),o=!1;return this.enum_values.includes(e)||e===""||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),o=!0),o}},{key:"onWatchedFieldChange",value:function(){var t=this;Jn(Xr(s.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach(function(e,o){t.selectize_instance.addOption({value:e,text:t.enum_display[o]})}),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Jn(Xr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Jn(Xr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Jn(Xr(s.prototype),"destroy",this).call(this)}}])&&_p(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function uo(u){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uo(u)}function kp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(uo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(uo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),uo(h)==="symbol"?h:String(h)),i)}var h}function vl(u,n){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},vl(u,n)}function vs(u){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vs(u)}var Op=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=vs(i);if(h){var o=vs(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(uo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)));var e=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var o=document.createElement("div");o.classList.add("signature-container");var c=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&c.setAttribute("name",e),c.classList.add("signature"),o.appendChild(c),this.signaturePad=new window.SignaturePad(c),this.signaturePad.onEnd=function(){t.signaturePad.isEmpty()?t.input.value="":t.input.value=t.signaturePad.toDataURL(),t.is_dirty=!0,t.refreshValue(),t.watch_listener(),t.jsoneditor.notifyWatchers(t.path),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange()};var d=document.createElement("div"),_=document.createElement("button");_.classList.add("tiny","button"),_.innerHTML="Clear signature",d.appendChild(_),o.appendChild(d),this.options.compact&&this.container.setAttribute("class","".concat(this.container.getAttribute("class")," compact")),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach(function(D){c.setAttribute("readOnly","readOnly"),D.disabled=!0})),_.addEventListener("click",function(D){D.preventDefault(),D.stopPropagation(),t.signaturePad.clear(),t.signaturePad.strokeEnd()}),this.control=this.theme.getFormControl(this.label,o,this.description),this.container.appendChild(this.control),this.refreshValue(),c.width=o.offsetWidth,this.options&&this.options.canvas_height?c.height=this.options.canvas_height:c.height="300"}else{var P=document.createElement("p");P.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(P)}}},{key:"setValue",value:function(t){if(typeof SignaturePad=="function"){var e=this.sanitize(t);return this.value===e?void 0:(this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&t!==""&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&kp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function co(u){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},co(u)}function jp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),co(h)==="symbol"?h:String(h)),i)}var h}function Yn(){return Yn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Qr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Yn.apply(this,arguments)}function gl(u,n){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},gl(u,n)}function Qr(u){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qr(u)}k(2564);var Ep=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qr(i);if(h){var o=Qr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=Yn(Qr(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.simplemde_instance&&this.simplemde_instance.value(c.value)}},{key:"build",value:function(){this.options.format="textarea",Yn(Qr(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.SimpleMDE?(t=this.expandCallbacks("simplemde",x({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",function(){e.value=e.simplemde_instance.value(),e.is_dirty=!0,e.onChange(!0)}),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Yn(Qr(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),Yn(Qr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Yn(Qr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Yn(Qr(s.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(t,e){function o(){t.display.wrapper.offsetHeight?(this.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(o,e.delay)}e.timeout=window.setTimeout(o,e.delay),e.hurry=function(){window.clearTimeout(e.timeout),e.timeout=window.setTimeout(o,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}},{key:"stopListening",value:function(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}])&&jp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function ho(u){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ho(u)}function Cp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ho(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ho(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ho(h)==="symbol"?h:String(h)),i)}var h}function wl(){return wl=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=po(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},wl.apply(this,arguments)}function _l(u,n){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},_l(u,n)}function po(u){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},po(u)}var jc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_l(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=po(i);if(h){var o=po(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ho(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),this.schema.enum===void 0){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var o=0;o<e;o++)this.enum_values.push(o+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var c=function(ct){ct.preventDefault(),ct.stopPropagation(),t.setValue(ct.currentTarget.value),t.onChange(!0)},d=this.enum_values.length-1;d>-1;d--){var _=this.formname+(d+1),P=this.theme.getFormInputField("radio");P.name="".concat(this.formname,"[starrating]"),P.value=this.enum_values[d],P.id=_,P.addEventListener("change",c,!1),this.radioGroup.push(P);var D=document.createElement("label");D.htmlFor=_,D.title=this.enum_values[d],this.options.displayValue&&D.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(P),this.ratingContainer.appendChild(D)}if(this.options.displayValue&&(this.displayRating=document.createElement("div"),this.displayRating.classList.add("starrating-display"),this.displayRating.innerText=this.enum_values[0],this.ratingContainer.appendChild(this.displayRating)),this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var J=0;J<this.radioGroup.length;J++)this.radioGroup[J].disabled=!0;this.ratingContainer.classList.add("readonly")}var nt=this.theme.getContainer();nt.appendChild(this.ratingContainer),this.input=nt,this.control=this.theme.getFormControl(this.label,nt,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}},{key:"destroy",value:function(){this.ratingContainer.parentNode&&this.ratingContainer.parentNode.parentNode&&this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),wl(po(s.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.type==="integer"?this.value===""?void 0:1*this.value:this.value}},{key:"setValue",value:function(t){for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value==="".concat(t)){this.radioGroup[e].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value),this.onChange(!0);break}}}])&&Cp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function fo(u){return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fo(u)}function Sp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(fo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(fo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),fo(h)==="symbol"?h:String(h)),i)}var h}function ha(){return ha=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Xn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ha.apply(this,arguments)}function xl(u,n){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},xl(u,n)}function Xn(u){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xn(u)}jc.rules={".starrating":"direction:rtl;display:inline-block;white-space:nowrap",".starrating > input":"display:none",".starrating > label:before":"content:'%5C2606';margin:1px;font-size:18px;font-style:normal;font-weight:400;line-height:1;font-family:'Arial';display:inline-block",".starrating > label":"color:%23888;cursor:pointer;margin:8px%200%202px%200",".starrating > label.starrating-display-enabled":"margin:1px%200%200%200",".starrating > input:checked ~ label":"color:%23ffca08",".starrating:not(.readonly) > input:hover ~ label":"color:%23ffca08",".starrating > input:checked ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating:not(.readonly) > input:hover ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating .starrating-display":"position:relative;direction:rtl;text-align:center;font-size:10px;line-height:0px"};var Pp=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xn(i);if(h){var o=Xn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(fo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){ha(Xn(s.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){ha(Xn(s.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){ha(Xn(s.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&Sp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(ys);function yo(u){return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yo(u)}function Tp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(yo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(yo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),yo(h)==="symbol"?h:String(h)),i)}var h}function gi(){return gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=hn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},gi.apply(this,arguments)}function kl(u,n){return kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},kl(u,n)}function hn(u){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hn(u)}var Ap=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=hn(i);if(h){var o=hn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(yo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,f=[{key:"register",value:function(){if(gi(hn(s.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(gi(hn(s.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,gi(hn(s.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){this.tableContainer=this.theme.getTableContainer(),this.table=this.theme.getTable(),this.tableContainer.appendChild(this.table),this.container.appendChild(this.tableContainer),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var t=this.getElementEditor(0,!0);if(this.item_default=t.getDefault(),this.width=t.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.tableContainer),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls),this.item_has_child_editors)for(var e=t.getChildEditors(),o=t.property_order||Object.keys(e),c=0;c<o.length;c++){var d=this.theme.getTableHeaderCell(e[o[c]].getTitle());e[o[c]].options.hidden&&(d.style.display="none"),this.header_row.appendChild(d)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=this.theme.getTableHeaderCell(" "),this.controls_header_cell.setAttribute("aria-hidden","true"),this.header_row.appendChild(this.controls_header_cell),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),gi(hn(s.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return x({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var o=x({},this.schema.items),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.row_holder.appendChild(this.theme.getTableRow()),_=d;this.item_has_child_editors||(_=this.theme.getTableCell(),d.appendChild(_));var P=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:_,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return P.preBuild(),e||(P.build(),P.postBuild(),P.controls_cell=d.appendChild(this.theme.getTableCell()),P.row=d,P.table_controls=this.theme.getButtonHolder(),P.controls_cell.appendChild(P.table_controls),P.table_controls.style.margin=0,P.table_controls.style.padding=0),P}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,gi(hn(s.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());return this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){var c=!1;e.forEach(function(P,D){t.rows[D]?t.rows[D].setValue(P):(t.addRow(P),c=!0)});for(var d=e.length;d<this.rows.length;d++){var _=this.rows[d].container;this.item_has_child_editors||this.rows[d].row.parentNode.removeChild(this.rows[d].row),this.rows[d].destroy(),_.parentNode&&_.parentNode.removeChild(_),this.rows[d]=null,c=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(c||o)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,o=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,c=[];this.rows.forEach(function(nt,ct){if(nt.delete_button){var dt=!e;t.setButtonState(nt.delete_button,dt),c.push(dt)}if(nt.copy_button){var kt=!o;t.setButtonState(nt.copy_button,kt),c.push(kt)}if(nt.moveup_button){var Ct=ct!==0;t.setButtonState(nt.moveup_button,Ct),c.push(Ct)}if(nt.movedown_button){var $t=ct!==t.rows.length-1;t.setButtonState(nt.movedown_button,$t),c.push($t)}});var d=c.some(function(nt){return nt});this.rows.forEach(function(nt){return t.setButtonState(nt.controls_cell,d)}),this.setButtonState(this.controls_header_cell,d),this.setButtonState(this.table,this.value.length);var _=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,_);var P=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,P);var D=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,D);var J=_||P||D;this.setButtonState(this.controls,J)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach(function(e,o){t.value[o]=e.getValue()}),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var o=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,o)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,o)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,o)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,o)),t!==void 0&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var o=this,c=this.getButton("","delete","button_delete_row_title_short");return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue(),D=o.getValue()[_];P.splice(_,1),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("deleteRow",D)}),e.appendChild(c),c}},{key:"_createCopyButton",value:function(t,e){var o=this,c=this.getButton("","copy","button_copy_row_title_short"),d=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(_){_.preventDefault(),_.stopPropagation();var P=1*_.currentTarget.getAttribute("data-i"),D=o.getValue(),J=D[P];d.items.type==="string"&&d.items.format==="uuid"?J=R():d.items.type==="object"&&d.items.properties&&D.forEach(function(nt,ct){if(P===ct)for(var dt=0,kt=Object.keys(nt);dt<kt.length;dt++){var Ct=kt[dt];d.items.properties&&d.items.properties[Ct]&&d.items.properties[Ct].format==="uuid"&&((J=Object.assign({},D[P]))[Ct]=R())}}),D.splice(P+1,0,J),o.setValue(D),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[P+1])}),e.appendChild(c),c}},{key:"_createMoveUpButton",value:function(t,e){var o=this,c=this.getButton("","moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(_-1,0,P.splice(_,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_-1])}),e.appendChild(c),c}},{key:"_createMoveDownButton",value:function(t,e){var o=this,c=this.getButton("","movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(_+1,0,P.splice(_,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_+1])}),e.appendChild(c),c}},{key:"addControls",value:function(){var t=this;this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.title_controls&&(this.title.insertBefore(this.toggle_button,this.title.childNodes[0]),this.toggle_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setButtonState(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand","button_expand"))}),this.options.collapsed&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton()}},{key:"_createToggleButton",value:function(){var t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var c=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",c)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue(),d=c.pop();t.setValue(c),t.onChange(!0),t.jsoneditor.trigger("deleteRow",d)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",c)}),this.controls.appendChild(e),e}}],f&&Tp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ut);function mo(u){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mo(u)}function Lp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(mo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(mo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),mo(h)==="symbol"?h:String(h)),i)}var h}function da(){return da=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Qn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},da.apply(this,arguments)}function Ol(u,n){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ol(u,n)}function Qn(u){return Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qn(u)}function bo(u){return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bo(u)}function Rp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(bo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(bo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),bo(h)==="symbol"?h:String(h)),i)}var h}function pa(){return pa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Kn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},pa.apply(this,arguments)}function jl(u,n){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},jl(u,n)}function Kn(u){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kn(u)}function vo(u){return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vo(u)}function Ip(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(vo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(vo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),vo(h)==="symbol"?h:String(h)),i)}var h}function wi(){return wi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=dn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},wi.apply(this,arguments)}function El(u,n){return El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},El(u,n)}function dn(u){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(u)}k(6977);var gs={ace:Et,array:Ut,arrayChoices:lr,arraySelect2:dr,arraySelectize:Ze,autocomplete:Dn,base64:Vi,button:us,checkbox:hs,choices:rt,datetime:vt,describedBy:nr,enum:$e,hidden:ds,info:qi,integer:ys,ip:ea,jodit:ms,multiple:to,multiselect:qt,null:la,number:fs,object:bi,radio:at,sceditor:ao,select:hi,select2:wp,selectize:xp,signature:Op,simplemde:Ep,starrating:jc,stepper:Pp,string:Q,table:Ap,upload:function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ol(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qn(i);if(h){var o=Qn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(mo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",x({},{title:"Browse",icon:"",auto_upload:!1,hide_input:!1,enable_drag_drop:!1,drop_zone_text:"Drag & Drop file here",drop_zone_top:!1,alt_drop_zone:"",mime_type:"",max_upload_size:0,upload_handler:function(c,d,_,P){window.alert('No upload_handler defined for "'.concat(c.path,'". You must create your own handler to enable upload to server'))}},this.defaults.options.upload||{},this.options.upload||{})),this.options.mime_type=this.options.mime_type?[].concat(this.options.mime_type):[],this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(typeof this.options.upload_handler!="function")throw new Error("Upload handler required for upload editor");if(this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.options.mime_type.length&&this.uploader.setAttribute("accept",this.options.mime_type),this.options.enable_drag_drop===!0&&this.options.hide_input===!0||(this.clickHandler=function(c){t.uploader.dispatchEvent(new window.MouseEvent("click",{view:window,bubbles:!0,cancelable:!1}))},this.browseButton=this.getButton(this.options.title,this.options.icon,this.options.title),this.browseButton.addEventListener("click",this.clickHandler),this.fileDisplay=this.theme.getFormInputField("input"),this.fileDisplay.setAttribute("readonly",!0),this.fileDisplay.value="No file selected.",this.fileDisplay.addEventListener("dblclick",this.clickHandler),this.fileUploadGroup=this.theme.getInputGroup(this.fileDisplay,[this.browseButton]),this.fileUploadGroup||(this.fileUploadGroup=document.createElement("div"),this.fileUploadGroup.appendChild(this.fileDisplay),this.fileUploadGroup.appendChild(this.browseButton))),this.options.enable_drag_drop===!0){if(this.options.alt_drop_zone!==""){if(this.altDropZone=document.querySelector(this.options.alt_drop_zone),!this.altDropZone)throw new Error('Error: alt_drop_zone selector "'.concat(this.options.alt_drop_zone,'" not found!'));this.dropZone=this.altDropZone}else this.dropZone=this.theme.getDropZone(this.options.drop_zone_text);this.dropZone&&(this.dropZone.classList.add("upload-dropzone"),this.dropZone.addEventListener("dblclick",this.clickHandler))}this.uploadHandler=function(c){c.preventDefault(),c.stopPropagation();var d=c.target.files||c.dataTransfer.files;if(d&&d.length)if(t.options.max_upload_size!==0&&d[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=d[0].name);var _=new window.FileReader;_.onload=function(P){t.preview_value=P.target.result,t.refreshPreview(d),t.onChange(!0),_=null},_.readAsDataURL(d[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(c){var d=c.dataTransfer.items||c.dataTransfer.files,_=d&&d.length&&(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)),P=c.currentTarget.classList&&c.currentTarget.classList.contains("upload-dropzone")&&_;switch((c.currentTarget===window?"w_":"e_")+c.type){case"w_drop":case"w_dragover":P||(c.dataTransfer.dropEffect="none");break;case"e_dragenter":P?(t.dropZone.classList.add("valid-dropzone"),c.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":P&&(c.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),P&&t.uploadHandler(c)}P||c.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(c){window.addEventListener(c,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(c){t.dropZone.addEventListener(c,t.dragHandler,!0)}))}this.preview=document.createElement("div"),this.control=this.input.controlgroup=this.theme.getFormControl(this.label,this.uploader||this.input,this.description,this.infoButton),this.uploader&&(this.uploader.controlgroup=this.control);var e=this.uploader||this.input,o=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&o.appendChild(this.dropZone),this.fileUploadGroup&&o.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&o.appendChild(this.dropZone),o.appendChild(this.preview),e.parentNode.insertBefore(o,e.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.afterInputReady()})}},{key:"afterInputReady",value:function(){var t=this;if(this.value){var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.onload=function(o){t.preview.appendChild(e)},e.onerror=function(o){console.error("upload error",o,o.currentTarget)},e.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(t){var e=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var o=t[0],c=this.preview_value.match(/^data:([^;,]+)[;,]/);if(o.mimeType=c?c[1]:"unknown",o.size>0){var d=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,d)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d])}else o.formattedSize="0 Bytes";var _=this.getButton("button_upload","upload","button_upload");_.addEventListener("click",function(P){P.preventDefault(),_.setAttribute("disabled","disabled"),e.theme.removeInputError(e.uploader),e.theme.getProgressBar&&(e.progressBar=e.theme.getProgressBar(),e.preview.appendChild(e.progressBar)),e.options.upload_handler(e.path,o,{success:function(D){e.setValue(D),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),_.removeAttribute("disabled")},failure:function(D){e.theme.addInputError(e.uploader,D),e.progressBar&&e.preview.removeChild(e.progressBar),_.removeAttribute("disabled")},updateProgress:function(D){e.progressBar&&(D?e.theme.updateProgressBar(e.progressBar,D):e.theme.updateProgressBarUnknown(e.progressBar))}})}),this.preview.appendChild(this.theme.getUploadPreview(o,_,this.preview_value)),this.options.auto_upload&&(_.dispatchEvent(new window.MouseEvent("click")),_.parentNode.removeChild(_))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),da(Qn(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),da(Qn(s.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var t=this;this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(e){window.removeEventListener(e,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(e){t.dropZone.removeEventListener(e,t.dragHandler,!0)}),this.dropZone.removeEventListener("dblclick",this.clickHandler),this.dropZone&&this.dropZone.parentNode&&this.dropZone.parentNode.removeChild(this.dropZone)),this.uploader&&this.uploader.parentNode&&(this.uploader.removeEventListener("change",this.uploadHandler),this.uploader.parentNode.removeChild(this.uploader)),this.browseButton&&this.browseButton.parentNode&&(this.browseButton.removeEventListener("click",this.clickHandler),this.browseButton.parentNode.removeChild(this.browseButton)),this.fileDisplay&&this.fileDisplay.parentNode&&(this.fileDisplay.removeEventListener("dblclick",this.clickHandler),this.fileDisplay.parentNode.removeChild(this.fileDisplay)),this.fileUploadGroup&&this.fileUploadGroup.parentNode&&this.fileUploadGroup.parentNode.removeChild(this.fileUploadGroup),this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.header&&this.header.parentNode&&this.header.parentNode.removeChild(this.header),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),da(Qn(s.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce(function(o,c){return o||new RegExp(c.replace(/\*/g,".*"),"gi").test(t)},!1)}}])&&Lp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F),uuid:function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Kn(i);if(h){var o=Kn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(bo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"preBuild",value:function(){pa(Kn(s.prototype),"preBuild",this).call(this),this.schema.default=this.uuid=this.getUuid(),this.schema.options||(this.schema.options={}),this.schema.options.cleave||(this.schema.options.cleave={delimiters:["-"],blocks:[8,4,4,4,12]})}},{key:"build",value:function(){pa(Kn(s.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,e,o){this.testUuid(t)||(t=this.uuid),this.uuid=t,pa(Kn(s.prototype),"setValue",this).call(this,t,e,o)}},{key:"getUuid",value:function(){return R()}},{key:"testUuid",value:function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}}])&&Rp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),colorpicker:function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&El(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=dn(i);if(h){var o=dn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(vo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,o){var c=wi(dn(s.prototype),"setValue",this).call(this,t,e,o);return this.picker_instance&&this.picker_instance.domElement&&c&&c.changed&&this.picker_instance.setColor(c.value,!0),c}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){wi(dn(s.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(wi(dn(s.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!0}}},{key:"enable",value:function(){if(wi(dn(s.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),wi(dn(s.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(t){var e=this;if(t){if(window.Picker&&!this.picker_instance){var o=this.expandCallbacks("colorpicker",x({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),c=function(d){var _=e.picker_instance.settings.editorFormat,P=e.picker_instance.settings.alpha;e.setValue(_==="hex"?P?d.hex:d.hex.slice(0,7):d["".concat(_+(P?"a":""),"String")])};o.popup||typeof o.onChange=="function"?o.popup&&typeof o.onDone!="function"&&(o.onDone=c):o.onChange=c,this.picker_instance=new window.Picker(o),o.popup||(this.input.style.display="none",this.theme.afterInputReady(this.picker_instance.domElement))}}else this.picker_instance&&(this.picker_instance.destroy(),this.picker_instance=null,this.input.style.display="")}}])&&Ip(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q)};function Ec(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}var Cc={},Cl="en",Bp=Cl;Cc.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_const:"Value must be the constant value",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must be at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_contains:"No items match contains",error_minContains:"Contains match count {{0}} is less than minimum contains count of {{1}}",error_maxContains:"Contains match count {{0}} exceeds maximum contains count of {{1}}",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the pattern {{0}}",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_property_names_exceeds_maxlength:"Property name {{0}} exceeds maxLength",error_property_names_enum_mismatch:"Property name {{0}} does not match any enum values",error_property_names_const_mismatch:"Property name {{0}} does not match the const value",error_property_names_pattern_mismatch:"Property name {{0}} does not match pattern",error_property_names_false:"Property name {{0}} fails when propertyName is false",error_property_names_maxlength:"Property name {{0}} cannot match invalid maxLength",error_property_names_enum:"Property name {{0}} cannot match invalid enum",error_property_names_pattern:"Property name {{0}} cannot match invalid pattern",error_property_names_unsupported:"Unsupported propertyName {{0}}",error_dependency:"Must have property {{0}}",error_date:"Date must be in the format {{0}}",error_time:"Time must be in the format {{0}}",error_datetime_local:"Datetime must be in the format {{0}}",error_invalid_epoch:"Date must be greater than 1 January 1970",error_ipv4:"Value must be a valid IPv4 address in the form of 4 numbers between 0 and 255, separated by dots",error_ipv6:"Value must be a valid IPv6 address",error_hostname:"The hostname has the wrong format",upload_max_size:"Filesize too large. Max size is ",upload_wrong_file_format:"Wrong file format. Allowed format(s): ",button_save:"Save",button_copy:"Copy",button_cancel:"Cancel",button_add:"Add",button_delete_all:"All",button_delete_all_title:"Delete All",button_delete_last:"Last {{0}}",button_delete_last_title:"Delete Last {{0}}",button_add_row_title:"Add {{0}}",button_move_down_title:"Move down",button_move_up_title:"Move up",button_properties:"Properties",button_object_properties:"Object Properties",button_copy_row_title:"Copy {{0}}",button_delete_row_title:"Delete {{0}}",button_delete_row_title_short:"Delete",button_copy_row_title_short:"Copy",button_collapse:"Collapse",button_expand:"Expand",button_edit_json:"Edit JSON",button_upload:"Upload",flatpickr_toggle_button:"Toggle",flatpickr_clear_button:"Clear",choices_placeholder_text:"Start typing to add value",default_array_item_title:"item",button_delete_node_warning:"Are you sure you want to remove this item?"},Object.entries(gs).forEach(function(u){var n=function(h,a){return function(s){if(Array.isArray(s))return s}(h)||function(s,t){var e=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(e!=null){var o,c,d,_,P=[],D=!0,J=!1;try{if(d=(e=e.call(s)).next,t===0){if(Object(e)!==e)return;D=!1}else for(;!(D=(o=d.call(e)).done)&&(P.push(o.value),P.length!==t);D=!0);}catch(nt){J=!0,c=nt}finally{try{if(!D&&e.return!=null&&(_=e.return(),Object(_)!==_))return}finally{if(J)throw c}}return P}}(h,a)||function(s,t){if(s){if(typeof s=="string")return Ec(s,t);var e=Object.prototype.toString.call(s).slice(8,-1);return e==="Object"&&s.constructor&&(e=s.constructor.name),e==="Map"||e==="Set"?Array.from(s):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ec(s,t):void 0}}(h,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
67
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(
|
|
68
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Tc(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function ur(u){return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ur(u)}function Dp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ur(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ur(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ur(h)==="symbol"?h:String(h)),i)}var h}k(8733);var Np=function(){function u(a){(function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")})(this,u),this.options=a||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(s){ur(s.type)==="object"&&(s.type=this._expandSubSchema(s.type))},disallow:function(s){ur(s.disallow)==="object"&&(s.disallow=this._expandSubSchema(s.disallow))},anyOf:function(s){var t=this;Object.entries(s.anyOf).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];s.anyOf[c]=t.expandSchema(d)})},dependencies:function(s){var t=this;Object.entries(s.dependencies).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];ur(d)!=="object"||Array.isArray(d)||(s.dependencies[c]=t.expandSchema(d))})},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,t){var e=this,o=x({},t);return Object.entries(s.allOf).forEach(function(c){var d=ki(c,2),_=d[0],P=d[1];s.allOf[_]=e.expandRefs(P,!0),o=e.extendSchemas(o,e.expandSchema(P))}),delete o.allOf,o},extends:function(s,t){var e,o=this;return delete(e=Array.isArray(s.extends)?s.extends.reduce(function(c,d,_){return o.extendSchemas(c,o.expandSchema(d))},t):this.extendSchemas(t,this.expandSchema(s.extends))).extends,e},oneOf:function(s,t){var e=this,o=x({},t);return delete o.oneOf,s.oneOf.reduce(function(c,d,_){return c.oneOf[_]=e.extendSchemas(e.expandSchema(d),o),c},t),t}}}var n,f,i,h;return n=u,f=[{key:"load",value:(h=Pc(xi().mark(function a(s,t,e){return xi().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.schema=s,o.next=3,this._asyncloadExternalRefs(s,t,this._getFileBase(e),!0);case 3:return o.abrupt("return",this.expandRefs(s));case 4:case"end":return o.stop()}},a,this)})),function(a,s,t){return h.apply(this,arguments)})},{key:"expandRefs",value:function(a,s){var t=this,e=x({},a);if(!e.$ref)return e;var o=e.$ref.split("#");if(o.length===2&&!this.refs_with_info[e.$ref]){var c=this.expandRecursivePointer(this.schema,o[1]),d=this.extendSchemas(e,this.expandSchema(c));return delete d.$ref,d}var _=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[e.$ref];delete e.$ref;var P=_.$ref.startsWith("#")?_.fetchUrl:"",D=this._getRef(P,_);if(this.refs[D]){if(s&&S(this.refs[D],"allOf")){var J=this.refs[D].allOf;Object.keys(J).forEach(function(nt){J[nt]=t.expandRefs(J[nt],!0)})}}else console.warn("reference:'".concat(D,"' not found!"));return o.length>2?this.extendSchemas(e,this.expandSchema(this.expandRecursivePointer(this.refs[D],o[2]))):this.extendSchemas(e,this.expandSchema(this.refs[D]))}},{key:"expandRecursivePointer",value:function(a,s){var t=a;return s.split("/").slice(1).forEach(function(e){t[e]&&(t=t[e])}),t.$refs&&t.$refs.startsWith("#")?this.expandRecursivePointer(a,t.$refs):t}},{key:"expandSchema",value:function(a){var s=this;Object.entries(this._subSchema1).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];a[c]&&d.call(s,a)});var t=x({},a);return Object.entries(this._subSchema2).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];a[c]&&(t=d.call(s,a,t))}),this.expandRefs(t)}},{key:"_getRef",value:function(a,s){var t=a+s;return this.refs[t]?t:a+decodeURIComponent(s.$ref)}},{key:"_expandSubSchema",value:function(a){var s=this;return Array.isArray(a)?a.map(function(t){return ur(t)==="object"?s.expandSchema(t):t}):this.expandSchema(a)}},{key:"_manageRecursivePointer",value:function(a,s){Object.keys(a).forEach(function(t){a[t].$ref&&a[t].$ref.indexOf("#")===0&&(a[t].$ref=s+a[t].$ref)})}},{key:"_getExternalRefs",value:function(a,s){var t=this,e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];e||this._manageRecursivePointer(a,s);var o={},c=function(J){return Object.keys(J).forEach(function(nt){o[nt]=!0})};if(a.$ref&&ur(a.$ref)!=="object"&&(a.$ref.indexOf("#")!==0||!e)){var d=a.$ref,_="";d.indexOf("#")>0&&(d=d.substr(0,d.indexOf("#"))),d!==a.$ref&&(_=a.$ref.substr(a.$ref.indexOf("#")));var P=this.refs_prefix+this.refs_counter++,D=P+_;a.$ref.substr(0,1)==="#"||this.refs[a.$ref]||(o[d]=!0),this.refs_with_info[P]={fetchUrl:s,$ref:d},a.$ref=D}return Object.values(a).forEach(function(J){J&&ur(J)==="object"&&(Array.isArray(J)?Object.values(J).forEach(function(nt){nt&&ur(nt)==="object"&&c(t._getExternalRefs(nt,s,e))}):J.$ref&&typeof J.$ref=="string"&&J.$ref.startsWith("#")||c(t._getExternalRefs(J,s,e)))}),a.id&&typeof a.id=="string"&&a.id.substr(0,4)==="urn:"?this.refs[a.id]=a:a.$id&&typeof a.$id=="string"&&a.$id.substr(0,4)==="urn:"&&(this.refs[a.$id]=a),o}},{key:"_getFileBase",value:function(a){if(!a)return"/";var s=this.options.ajaxBase;return s===void 0?this._getFileBaseFromFileLocation(a):s}},{key:"_getFileBaseFromFileLocation",value:function(a){var s=a.split("/");return s.pop(),"".concat(s.join("/"),"/")}},{key:"_joinUrl",value:function(a,s){var t=a;return a.substr(0,7)!=="http://"&&a.substr(0,8)!=="https://"&&a.substr(0,5)!=="blob:"&&a.substr(0,5)!=="data:"&&a.substr(0,1)!=="#"&&a.substr(0,1)!=="/"&&(t=s+a),t.indexOf("#")>0&&(t=t.substr(0,t.indexOf("#"))),t}},{key:"_isUniformResourceName",value:function(a){return a.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(i=Pc(xi().mark(function a(s,t,e){var o,c,d,_,P,D,J=this,nt=arguments;return xi().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:o=nt.length>3&&nt[3]!==void 0&&nt[3],c=this._getExternalRefs(s,t,o),d=0,_=xi().mark(function dt(){var kt,Ct,$t,ne,Re,Gt,gt,Zt,Ge,W,G;return xi().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if((kt=D[P])!==void 0){Z.next=3;break}return Z.abrupt("return","continue");case 3:if(!J.refs[kt]){Z.next=5;break}return Z.abrupt("return","continue");case 5:if(!J._isUniformResourceName(kt)){Z.next=40;break}if(J.refs[kt]="loading",d++,Ct=J.options.urn_resolver,$t=kt,typeof Ct=="function"){Z.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat($t,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat($t));case 13:return $t.indexOf("#")>0&&($t=$t.substr(0,$t.indexOf("#"))),Z.prev=14,Z.next=17,Ct($t);case 17:ne=Z.sent,Z.prev=18,Re=JSON.parse(ne),Z.next=26;break;case 22:throw Z.prev=22,Z.t0=Z.catch(18),console.log(Z.t0),new Error("Failed to parse external ref ".concat($t));case 26:if(!(typeof Re!="boolean"&&ur(Re)!=="object"||Re===null||Array.isArray(Re))){Z.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat($t));case 28:return J.refs[kt]=Re,Z.next=31,J._asyncloadExternalRefs(Re,kt,e);case 31:Z.next=37;break;case 33:throw Z.prev=33,Z.t1=Z.catch(14),console.log(Z.t1),new Error("Failed to parse external ref ".concat($t));case 37:if(typeof ne!="boolean"){Z.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat($t));case 39:return Z.abrupt("return","continue");case 40:if(J.options.ajax){Z.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(kt));case 42:if(d++,Gt=J._joinUrl(kt,e),J.options.ajax_cache_responses&&(Zt=J.cacheGet(Gt))&&(gt=Zt),gt){Z.next=61;break}return Z.next=48,new Promise(function(pt){var et=new XMLHttpRequest;J.options.ajaxCredentials&&(et.withCredentials=J.options.ajaxCredentials),et.overrideMimeType("application/json"),et.open("GET",Gt,!0),et.onload=function(){pt(et)},et.onerror=function(Lt){pt(void 0)},et.send()});case 48:if((Ge=Z.sent)!==void 0){Z.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(kt));case 51:Z.prev=51,gt=JSON.parse(Ge.responseText),J.onSchemaLoaded({schema:gt,schemaUrl:Gt}),J.options.ajax_cache_responses&&J.cacheSet(Gt,gt),Z.next=61;break;case 57:throw Z.prev=57,Z.t2=Z.catch(51),console.log(Z.t2),new Error("Failed to parse external ref ".concat(Gt));case 61:if(!(typeof gt!="boolean"&&ur(gt)!=="object"||gt===null||Array.isArray(gt))){Z.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Gt));case 63:return J.refs[kt]=gt,W=J._getFileBaseFromFileLocation(Gt),Gt!==kt&&(G=Gt.split("/"),Gt=(kt.substr(0,1)==="/"?"/":"")+G.pop()),Z.next=68,J._asyncloadExternalRefs(gt,Gt,W);case 68:case"end":return Z.stop()}},dt,null,[[14,33],[18,22],[51,57]])}),P=0,D=Object.keys(c);case 5:if(!(P<D.length)){ct.next=13;break}return ct.delegateYield(_(),"t0",7);case 7:if(ct.t0!=="continue"){ct.next=10;break}return ct.abrupt("continue",10);case 10:P++,ct.next=5;break;case 13:if(d){ct.next=15;break}return ct.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return ct.stop()}},a,this)})),function(a,s,t){return i.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(a){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(a,s){var t=this;a=x({},a),s=x({},s);var e={},o=function(c){typeof c=="string"&&(c=[c]),typeof s.type=="string"&&(s.type=[s.type]),s.type&&s.type.length?e.type=c.filter(function(d){return s.type.includes(d)}):e.type=c,e.type.length===1&&typeof e.type[0]=="string"?e.type=e.type[0]:e.type.length===0&&delete e.type};return Object.entries(a).forEach(function(c){var d=ki(c,2),_=d[0],P=d[1];s[_]!==void 0?function(D,J){(function(nt,ct){return(nt==="required"||nt==="defaultProperties")&&ur(ct)==="object"&&Array.isArray(ct)})(D,J)?e[D]=J.concat(s[D]).reduce(function(nt,ct){return nt.includes(ct)||nt.push(ct),nt},[]):D!=="type"||typeof J!="string"&&!Array.isArray(J)?ur(J)!=="object"||Array.isArray(J)||J===null?e[D]=J:e[D]=t.extendSchemas(J,s[D]):o(J)}(_,P):e[_]=P}),Object.entries(s).forEach(function(c){var d=ki(c,2),_=d[0],P=d[1];a[_]===void 0&&(e[_]=P)}),e}},{key:"getCacheKey",value:function(a){return["je-cache",a].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(a,s){try{window.localStorage.setItem(this.getCacheKey(a),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:s}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(a){try{var s=window.localStorage.getItem(this.getCacheKey(a));if(s){var t=JSON.parse(s);if(t.cacheBuster&&t.schema&&t.cacheBuster===this.getCacheBuster())return t.schema;this.cacheDelete(a)}}catch(e){console.error(e)}}},{key:"cacheDelete",value:function(a){window.localStorage.removeItem(this.getCacheKey(a))}}],f&&Dp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}(),$p=(k(3210),{default:function(){return{compile:function(u){var n=u.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),f=n&&n.length;if(!f)return function(){return u};for(var i=[],h=function(s){var t,e,o=n[s].replace(/[{}]+/g,"").trim().split("."),c=o.length;c>1?t=function(d){for(e=d,s=0;s<c&&(e=e[o[s]]);s++);return e}:(o=o[0],t=function(d){return d[o]}),i.push({s:n[s],r:t})},a=0;a<f;a++)h(a);return function(s){var t,e="".concat(u);for(a=0;a<f;a++)t=i[a],e=e.replace(t.s,t.r(s));return e}}}},ejs:function(){return!!window.EJS&&{compile:function(u){var n=new window.EJS({text:u});return function(f){return n.render(f)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(u){var n=window.Hogan.compile(u);return function(f){return n.render(f)}}}},lodash:function(){return!!window._&&{compile:function(u){return function(n){return window._.template(u)(n)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(u){return function(n){return window.Mark.up(u,n)}}}},mustache:function(){return!!window.Mustache&&{compile:function(u){return function(n){return window.Mustache.render(u,n)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(u){return function(n){return window._.template(u)(n)}}}}});function fa(u){return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fa(u)}function Sl(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function Mp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(fa(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(fa(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),fa(h)==="symbol"?h:String(h)),i)}var h}var Hp={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},Cn=function(){function u(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hp;(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,u),this.mapping=h,this.icon_prefix=i}var n,f;return n=u,(f=[{key:"getIconClass",value:function(i){return this.mapping[i]?this.icon_prefix+this.mapping[i]:this.icon_prefix+i}},{key:"getIcon",value:function(i){var h,a=this.getIconClass(i);if(!a)return null;var s,t=document.createElement("i");return(h=t.classList).add.apply(h,function(e){if(Array.isArray(e))return Sl(e)}(s=a.split(" "))||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(s)||function(e,o){if(e){if(typeof e=="string")return Sl(e,o);var c=Object.prototype.toString.call(e).slice(8,-1);return c==="Object"&&e.constructor&&(c=e.constructor.name),c==="Map"||c==="Set"?Array.from(e):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?Sl(e,o):void 0}}(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
69
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),t}}])&&Mp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function Pl(u){return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pl(u)}function Tl(u,n){return Tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Tl(u,n)}function ws(u){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ws(u)}var Fp="glyphicon glyphicon-",Vp={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},zp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Tl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=ws(f);if(i){var e=ws(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Pl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Fp,Vp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Al(u){return Al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Al(u)}function Ll(u,n){return Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ll(u,n)}function _s(u){return _s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_s(u)}var Up="icon-",qp={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},Gp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Ll(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=_s(f);if(i){var e=_s(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Al(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Up,qp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Rl(u){return Rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rl(u)}function Il(u,n){return Il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Il(u,n)}function xs(u){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xs(u)}var Wp="fa fa-",Zp={collapse:"caret-square-o-down",expand:"caret-square-o-right",delete:"times",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"files-o",clear:"times-circle-o",time:"clock-o",calendar:"calendar",edit_properties:"list"},Jp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Il(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=xs(f);if(i){var e=xs(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Rl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Wp,Zp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Bl(u){return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bl(u)}function Dl(u,n){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Dl(u,n)}function ks(u){return ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ks(u)}var Yp="fas fa-",Xp={collapse:"caret-down",expand:"caret-right",delete:"trash",edit:"pen",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"times-circle",time:"clock",calendar:"calendar",edit_properties:"list"},Qp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Dl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=ks(f);if(i){var e=ks(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Bl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Yp,Xp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Nl(u){return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nl(u)}function $l(u,n){return $l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},$l(u,n)}function Os(u){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Os(u)}var Kp="ui-icon ui-icon-",tf={collapse:"triangle-1-s",expand:"triangle-1-e",delete:"trash",edit:"pencil",add:"plusthick",subtract:"minusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",moveright:"arrowthick-1-e",movedown:"arrowthick-1-s",moveleft:"arrowthick-1-w",copy:"copy",clear:"circle-close",time:"time",calendar:"calendar",edit_properties:"note"},ef=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&$l(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Os(f);if(i){var e=Os(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Nl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Kp,tf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Ml(u){return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ml(u)}function Hl(u,n){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Hl(u,n)}function js(u){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},js(u)}var rf="oi oi-",nf={collapse:"collapse-down",expand:"expand-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"file",moveup:"arrow-thick-top",moveright:"arrow-thick-right",movedown:"arrow-thick-bottom",moveleft:"arrow-thick-left",copy:"clipboard",clear:"circle-x",time:"clock",calendar:"calendar",edit_properties:"list"},of=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Hl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=js(f);if(i){var e=js(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Ml(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,rf,nf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Fl(u){return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fl(u)}function Vl(u,n){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Vl(u,n)}function Es(u){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Es(u)}var af="icon icon-",sf={collapse:"arrow-down",expand:"arrow-right",delete:"delete",edit:"edit",add:"plus",subtract:"minus",cancel:"cross",save:"check",moveup:"upward",moveright:"forward",movedown:"downward",moveleft:"back",copy:"copy",clear:"close",time:"time",calendar:"bookmark",edit_properties:"menu"},lf=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Vl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Es(f);if(i){var e=Es(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Fl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,af,sf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function zl(u){return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zl(u)}function Ul(u,n){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ul(u,n)}function Cs(u){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cs(u)}var uf="bi bi-",cf={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"dash",cancel:"x-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"clipboard",clear:"x-circle",time:"clock",calendar:"calendar",edit_properties:"list-ul"},hf={bootstrap:function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Ul(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Cs(f);if(i){var e=Cs(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(zl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,uf,cf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn),bootstrap3:zp,fontawesome3:Gp,fontawesome4:Jp,fontawesome5:Qp,jqueryui:ef,openiconic:of,spectre:lf};function ya(u){return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ya(u)}function df(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ya(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ya(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ya(h)==="symbol"?h:String(h)),i)}var h}var Ac=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(function(u){return u in document.documentElement}),Sn=function(){function u(i){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,u),this.jsoneditor=i,Object.keys(h).forEach(function(a){i.options[a]!==void 0&&(h[a]=i.options[a])}),this.options=h}var n,f;return n=u,f=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getFloatRightLinkHolder",value:function(){var i=document.createElement("div");return i.classList.add("je-float-right-linkholder"),i}},{key:"getModal",value:function(){var i=document.createElement("div");return i.style.display="none",i.classList.add("je-modal"),i}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var i=document.createElement("div");return i.classList.add("row"),i}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(i,h){}},{key:"getLink",value:function(i){var h=document.createElement("a");return h.setAttribute("href","#"),h.appendChild(document.createTextNode(i)),h}},{key:"disableHeader",value:function(i){i.style.color="#ccc"}},{key:"disableLabel",value:function(i){i.style.color="#ccc"}},{key:"enableHeader",value:function(i){i.style.color=""}},{key:"enableLabel",value:function(i){i.style.color=""}},{key:"getInfoButton",value:function(i){var h=document.createElement("span");h.innerText="ⓘ",h.classList.add("je-infobutton-icon");var a=document.createElement("span");return a.classList.add("je-infobutton-tooltip"),a.innerText=i,h.onmouseover=function(){a.style.visibility="visible"},h.onmouseleave=function(){a.style.visibility="hidden"},h.appendChild(a),h}},{key:"getFormInputLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(i)),h&&a.classList.add("required"),a}},{key:"getHeader",value:function(i,h){var a=document.createElement("h3");return typeof i=="string"?a.textContent=i:a.appendChild(i),a.classList.add("je-header"),a}},{key:"getCheckbox",value:function(){var i=this.getFormInputField("checkbox");return i.classList.add("je-checkbox"),i}},{key:"getCheckboxLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getMultiCheckboxHolder",value:function(i,h,a,s){var t=document.createElement("div");return t.classList.add("control-group"),h&&(h.style.display="block",t.appendChild(h),s&&h.appendChild(s)),Object.values(i).forEach(function(e){e.style.display="inline-block",e.style.marginRight="20px",t.appendChild(e)}),a&&t.appendChild(a),t}},{key:"getFormCheckboxControl",value:function(i,h,a){var s=document.createElement("div");return s.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&s.classList.add("je-checkbox-control--compact"),s}},{key:"getFormRadio",value:function(i){var h=this.getFormInputField("radio");return Object.keys(i).forEach(function(a){return h.setAttribute(a,i[a])}),h.classList.add("je-radio"),h}},{key:"getFormRadioLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getFormRadioControl",value:function(i,h,a){var s=document.createElement("div");return s.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&s.classList.add("je-radio-control--compact"),s}},{key:"getSelectInput",value:function(i,h){var a=document.createElement("select");return i&&this.setSelectOptions(a,i),a}},{key:"getSwitcher",value:function(i){var h=this.getSelectInput(i,!1);return h.classList.add("je-switcher"),h}},{key:"getSwitcherOptions",value:function(i){return i.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(i,h,a){this.setSelectOptions(i,h,a)}},{key:"setSelectOptions",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];i.innerHTML="";for(var s=0;s<h.length;s++){var t=document.createElement("option");t.setAttribute("value",h[s]),t.textContent=a[s]||h[s],i.appendChild(t)}}},{key:"getTextareaInput",value:function(){var i=document.createElement("textarea");return i.classList.add("je-textarea"),i}},{key:"getRangeInput",value:function(i,h,a){var s=this.getFormInputField("range");return s.setAttribute("min",i),s.setAttribute("max",h),s.setAttribute("step",a),s}},{key:"getStepperButtons",value:function(i){var h=document.createElement("div"),a=document.createElement("button");a.setAttribute("type","button"),a.classList.add("stepper-down");var s=document.createElement("button");s.setAttribute("type","button"),s.classList.add("stepper-up"),i.getAttribute("readonly")&&(a.setAttribute("disabled",!0),s.setAttribute("disabled",!0)),a.textContent="-",s.textContent="+";var t=function(c,d){c.value=Number(d||c.value),c.setAttribute("initialized","1")},e=i.getAttribute("min"),o=i.getAttribute("max");return a.addEventListener("click",function(){i.getAttribute("initialized")?e?Number(i.value)>Number(e)&&i.stepDown():i.stepDown():t(i,e),j(i,"change")}),s.addEventListener("click",function(){i.getAttribute("initialized")?o?Number(i.value)<Number(o)&&i.stepUp():i.stepUp():t(i,e),j(i,"change")}),h.appendChild(a),h.appendChild(s),h}},{key:"getRangeOutput",value:function(i,h){var a=document.createElement("output"),s=function(t){a.value=t.currentTarget.value};return i.addEventListener("change",s,!1),i.addEventListener("input",s,!1),a}},{key:"getRangeControl",value:function(i,h){var a=document.createElement("div");return a.classList.add("je-range-control"),h&&a.appendChild(h),a.appendChild(i),a}},{key:"getFormInputField",value:function(i){var h=document.createElement("input");return h.setAttribute("type",i),h}},{key:"afterInputReady",value:function(i){}},{key:"getFormControl",value:function(i,h,a,s,t){var e=document.createElement("div");return e.classList.add("form-control"),i&&(e.appendChild(i),t&&i.setAttribute("for",t)),h.type!=="checkbox"&&h.type!=="radio"||!i?(s&&i&&i.appendChild(s),e.appendChild(h)):(h.style.width="auto",i.insertBefore(h,i.firstChild),s&&i.appendChild(s)),a&&e.appendChild(a),e}},{key:"getIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel"),i}},{key:"getTopIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel--top"),i}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(i){var h=document.createElement("p");return window.DOMPurify?h.innerHTML=window.DOMPurify.sanitize(i):h.textContent=this.cleanText(i),h}},{key:"getCheckboxDescription",value:function(i){return this.getDescription(i)}},{key:"getFormInputDescription",value:function(i){return this.getDescription(i)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(i){return this.getButtonHolder()}},{key:"getButton",value:function(i,h,a){var s=document.createElement("button");return s.type="button",this.setButtonText(s,i,h,a),s}},{key:"getFormButton",value:function(i,h,a){return this.getButton(i,h,a)}},{key:"setButtonText",value:function(i,h,a,s){for(;i.firstChild;)i.removeChild(i.firstChild);if(a&&(i.appendChild(a),h=" ".concat(h)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!a){var t=document.createElement("span");t.appendChild(document.createTextNode(h)),i.appendChild(t)}s&&i.setAttribute("title",s)}},{key:"getTableContainer",value:function(){return document.createElement("div")}},{key:"getTable",value:function(){return document.createElement("table")}},{key:"getTableRow",value:function(){return document.createElement("tr")}},{key:"getTableHead",value:function(){return document.createElement("thead")}},{key:"getTableBody",value:function(){return document.createElement("tbody")}},{key:"getTableHeaderCell",value:function(i){var h=document.createElement("th");return h.textContent=i,h}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(i){var h=document.createElement("p");return h.style=h.style||{},h.style.color="red",h.appendChild(document.createTextNode(i)),h}},{key:"addInputError",value:function(i,h){}},{key:"removeInputError",value:function(i){}},{key:"addTableRowError",value:function(i){}},{key:"removeTableRowError",value:function(i){}},{key:"getTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(h,"'></div><div class='je-tabholder--clear'></div>"),a}},{key:"getTopTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(h,"'></div>"),a}},{key:"applyStyles",value:function(i,h){Object.keys(h).forEach(function(a){return i.style[a]=h[a]})}},{key:"closest",value:function(i,h){for(;i&&i!==document;){if(!i[Ac])return!1;if(i[Ac](h))return i;i=i.parentNode}return!1}},{key:"insertBasicTopTab",value:function(i,h){h.firstChild.insertBefore(i,h.firstChild.firstChild)}},{key:"getTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab"),a}},{key:"getTopTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab--top"),a}},{key:"getTabContentHolder",value:function(i){return i.children[1]}},{key:"getTopTabContentHolder",value:function(i){return i.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(i){this.applyStyles(i.tab,{opacity:1,background:"white"}),i.rowPane!==void 0?i.rowPane.style.display="":i.container.style.display=""}},{key:"markTabInactive",value:function(i){this.applyStyles(i.tab,{opacity:.5,background:""}),i.rowPane!==void 0?i.rowPane.style.display="none":i.container.style.display="none"}},{key:"addTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"addTopTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"getBlockLink",value:function(){var i=document.createElement("a");return i.classList.add("je-block-link"),i}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(i,h,a){i.appendChild(h),a.classList.add("je-media"),i.appendChild(a)}},{key:"createImageLink",value:function(i,h,a){i.appendChild(h),h.appendChild(a)}},{key:"getFirstTab",value:function(i){return i.firstChild.firstChild}},{key:"getInputGroup",value:function(i,h){}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"getDropZone",value:function(i){var h=document.createElement("div");return h.setAttribute("data-text",i),h.classList.add("je-dropzone"),h}},{key:"getUploadPreview",value:function(i,h,a){var s=document.createElement("div");if(s.classList.add("je-upload-preview"),i.mimeType.substr(0,5)==="image"){var t=document.createElement("img");t.src=a,s.appendChild(t)}var e=document.createElement("div");e.innerHTML+="<strong>Name:</strong> ".concat(i.name,"<br><strong>Type:</strong> ").concat(i.type,"<br><strong>Size:</strong> ").concat(i.formattedSize),s.appendChild(e),s.appendChild(h);var o=document.createElement("div");return o.style.clear="left",s.appendChild(o),s}},{key:"getProgressBar",value:function(){var i=document.createElement("progress");return i.setAttribute("max",100),i.setAttribute("value",0),i}},{key:"updateProgressBar",value:function(i,h){i&&i.setAttribute("value",h)}},{key:"updateProgressBarUnknown",value:function(i){i&&i.removeAttribute("value")}}],f&&df(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function go(u){return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},go(u)}function pf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(go(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(go(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),go(h)==="symbol"?h:String(h)),i)}var h}function Oi(){return Oi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=pn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Oi.apply(this,arguments)}function ql(u,n){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ql(u,n)}function pn(u){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(u)}var Lc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ql(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=pn(i);if(h){var o=pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(go(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getFormInputLabel",value:function(t,e){var o=Oi(pn(s.prototype),"getFormInputLabel",this).call(this,t,e);return o.classList.add("je-form-input-label"),o}},{key:"getFormInputDescription",value:function(t){var e=Oi(pn(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=Oi(pn(s.prototype),"getIndentedPanel",this).call(this);return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var t=Oi(pn(s.prototype),"getChildEditorHolder",this).call(this);return t.classList.add("je-child-editor-holder"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}},{key:"getTable",value:function(){var t=Oi(pn(s.prototype),"getTable",this).call(this);return t.classList.add("je-table"),t}},{key:"addInputError",value:function(t,e){var o=this.closest(t,".form-control")||t.controlgroup;t.errmsg?t.errmsg.style.display="block":(t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",o.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&pf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function wo(u){return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wo(u)}function ff(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(wo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(wo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),wo(h)==="symbol"?h:String(h)),i)}var h}function ji(){return ji=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=fn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ji.apply(this,arguments)}function Gl(u,n){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Gl(u,n)}function fn(u){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fn(u)}Lc.rules={".je-form-input-label":"display:block;margin-bottom:3px;font-weight:bold",".je-form-input-description":"display:inline-block;margin:0;font-size:0.8em;font-style:italic",".je-indented-panel":"padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",".je-child-editor-holder":"margin-bottom:8px",".je-header-button-holder":"display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",".je-table":"margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Rc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=fn(i);if(h){var o=fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(wo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getSelectInput",value:function(t,e){var o=ji(fn(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("col-md-offset-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup&&(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),t}},{key:"getRangeInput",value:function(t,e,o){return ji(fn(s.prototype),"getRangeInput",this).call(this,t,e,o)}},{key:"getFormInputField",value:function(t){var e=ji(fn(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&e.classList.add("form-control"),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return!t||e.type!=="checkbox"&&e.type!=="radio"?(d.classList.add("form-group"),t&&(t.classList.add("control-label"),d.appendChild(t),c&&t.appendChild(c)),d.appendChild(e)):(d.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),d.appendChild(t)),o&&d.appendChild(o),d}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var o=document.createElement("span");return o.style["font-family"]="sans-serif",o.style.visibility="hidden",o.style["background-color"]="rgba(50, 50, 50, .75)",o.style.margin="0 .25rem",o.style.color="#FAFAFA",o.style.padding=".5rem 1rem",o.style["border-radius"]=".25rem",o.style.width="25rem",o.style.position="absolute",o.innerText=t,e.onmouseover=function(){o.style.visibility="visible"},e.onmouseleave=function(){o.style.visibility="hidden"},e.appendChild(o),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,e,o){var c=ji(fn(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-default"),c}},{key:"getTableContainer",value:function(){var t=ji(fn(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}},{key:"addInputError",value:function(t,e){t.controlgroup?(t.controlgroup.classList.add("has-error"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("help-block","errormsg"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controlgroup||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(e,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav nav-tabs' id='".concat(e,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),c.setAttribute("aria-controls",e),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),c.setAttribute("aria-controls",e),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var c=document.createElement("div");c.classList.add("input-group-btn"),o.appendChild(c);for(var d=0;d<e.length;d++)c.appendChild(e[d]);return o}}}])&&ff(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function _o(u){return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_o(u)}function yf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(_o(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(_o(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),_o(h)==="symbol"?h:String(h)),i)}var h}function Ei(){return Ei=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=yn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ei.apply(this,arguments)}function Wl(u,n){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wl(u,n)}function yn(u){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yn(u)}Rc.rules={},k(3843);var mf={disable_theme_rules:!1,input_size:"normal",custom_forms:!1,object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Ic=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=yn(i);if(h){var o=yn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(_o(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,mf)}return n=s,(f=[{key:"getSelectInput",value:function(t,e){var o=Ei(yn(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg")):(o.classList.remove("form-control"),o.classList.add("custom-select"),this.options.input_size==="small"&&o.classList.add("custom-select-sm"),this.options.input_size==="large"&&o.classList.add("custom-select-lg")),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var c=Ei(yn(s.prototype),"getRangeInput",this).call(this,t,e,o);return this.options.custom_forms===!0&&(c.classList.remove("form-control"),c.classList.add("custom-range")),c}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("div"),c=document.createElement("div"),d=document.createElement("button");d.setAttribute("type","button");var _=document.createElement("button");_.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),o.appendChild(d),c.appendChild(_),e.classList.add("input-group"),o.classList.add("input-group-prepend"),c.classList.add("input-group-append"),d.classList.add("btn"),d.classList.add("btn-secondary"),d.classList.add("stepper-down"),_.classList.add("btn"),_.classList.add("btn-secondary"),_.classList.add("stepper-up"),t.getAttribute("readonly")&&(d.setAttribute("disabled",!0),_.setAttribute("disabled",!0)),d.textContent="-",_.textContent="+";var P=function(nt,ct){nt.value=Number(ct||nt.value),nt.setAttribute("initialized","1")},D=t.getAttribute("min"),J=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),d.addEventListener("click",function(){t.getAttribute("initialized")?D?Number(t.value)>Number(D)&&t.stepDown():t.stepDown():P(t,D),j(t,"change")}),_.addEventListener("click",function(){t.getAttribute("initialized")?J?Number(t.value)<Number(J)&&t.stepUp():t.stepUp():P(t,D),j(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ei(yn(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&t!=="file"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),t==="file"&&e.classList.add("form-control-file"),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(d.appendChild(t),c&&d.appendChild(c)),d.appendChild(e);else{var _=document.createElement("div");this.options.custom_forms===!1?(_.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(_.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?_.classList.add("custom-checkbox"):_.classList.add("custom-radio"));var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),_.appendChild(e),_.appendChild(t),c&&_.appendChild(c),d.appendChild(_)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),c&&e.appendChild(c));var _=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;_.appendChild(D)}),d.appendChild(_),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return this.options.custom_forms===!1?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return this.options.custom_forms===!1?o.classList.add("form-check-label"):o.classList.add("custom-control-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var c=document.createElement("div");return this.options.custom_forms===!1?c.classList.add("form-check"):c.classList.add("custom-control","custom-radio"),c.appendChild(e),c.appendChild(t),o&&(this.options.custom_forms===!1?c.classList.add("form-check-inline"):c.classList.add("custom-control-inline")),c}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","mb-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-right"),e}},{key:"getButton",value:function(t,e,o){var c=Ei(yn(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var t=Ei(yn(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var c=document.createElement("div");c.classList.add("input-group-append"),o.appendChild(c);for(var d=0;d<e.length;d++)e[d].classList.remove("mr-2","btn-secondary"),e[d].classList.add("btn-outline-secondary"),c.appendChild(e[d]);return o}}}])&&yf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function xo(u){return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xo(u)}function bf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(xo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xo(h)==="symbol"?h:String(h)),i)}var h}function Ci(){return Ci=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=mn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ci.apply(this,arguments)}function Zl(u,n){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Zl(u,n)}function mn(u){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mn(u)}Ic.rules={".jsoneditor-twbs4-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var vf={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Bc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=mn(i);if(h){var o=mn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(xo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,vf)}return n=s,(f=[{key:"getSelectInput",value:function(t,e){var o=Ci(mn(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o.classList.add("form-select"),this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg"),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.classList.add("form-label"),o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var c=Ci(mn(s.prototype),"getRangeInput",this).call(this,t,e,o);return c.classList.remove("form-control"),c.classList.add("form-range"),c}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var c=document.createElement("button");c.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),e.classList.add("input-group"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),c.classList.add("btn"),c.classList.add("btn-secondary"),c.classList.add("stepper-up"),t.getAttribute("readonly")&&(o.setAttribute("disabled",!0),c.setAttribute("disabled",!0)),o.textContent="-",c.textContent="+";var d=function(D,J){D.value=Number(J||D.value),D.setAttribute("initialized","1")},_=t.getAttribute("min"),P=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),o.addEventListener("click",function(){t.getAttribute("initialized")?_?Number(t.value)>Number(_)&&t.stepDown():t.stepDown():d(t,_),j(t,"change")}),c.addEventListener("click",function(){t.getAttribute("initialized")?P?Number(t.value)<Number(P)&&t.stepUp():t.stepUp():d(t,_),j(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ci(mn(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(t.classList.add("form-label"),d.appendChild(t),c&&d.appendChild(c)),d.appendChild(e);else{var _=document.createElement("div");_.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),_.appendChild(e),_.appendChild(t),c&&_.appendChild(c),d.appendChild(_)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),c&&e.appendChild(c));var _=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;_.appendChild(D)}),d.appendChild(_),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return o.classList.add("form-check-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var c=document.createElement("div");return c.classList.add("form-check"),c.appendChild(e),c.appendChild(t),o&&c.classList.add("form-check-inline"),c}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","my-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),e.classList.add("d-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-end"),e}},{key:"getButton",value:function(t,e,o){var c=Ci(mn(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var t=Ci(mn(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var c=0;c<e.length;c++)e[c].classList.remove("me-2","btn-secondary"),e[c].classList.add("btn-outline-secondary"),o.appendChild(e[c]);return o}}}])&&bf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function ko(u){return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ko(u)}function gf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ko(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ko(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ko(h)==="symbol"?h:String(h)),i)}var h}function Oo(){return Oo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Pn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Oo.apply(this,arguments)}function Jl(u,n){return Jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jl(u,n)}function Pn(u){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pn(u)}Bc.rules={".form-group":"margin-bottom:1rem",".form-text":"display:block",".jsoneditor-twbs5-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Dc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pn(i);if(h){var o=Pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ko(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getTable",value:function(){var t=Oo(Pn(s.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=Oo(Pn(s.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=Oo(Pn(s.prototype),"getTableCell",this).call(this);return t.classList.add("ui-widget-content"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}},{key:"getFormInputDescription",value:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}},{key:"getFormControl",value:function(t,e,o,c){var d=Oo(Pn(s.prototype),"getFormControl",this).call(this,t,e,o,c);return e.type==="checkbox"?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var o=document.createElement("label");return o.style.fontWeight="bold",o.style.display="block",o.textContent=t,e&&o.classList.add("required"),o}},{key:"getButton",value:function(t,e,o){var c=document.createElement("button");c.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(c.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(e)):e?(c.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(e)):c.classList.add("ui-button-text-only");var d=document.createElement("span");return d.classList.add("ui-button-text"),d.textContent=t||o||".",c.appendChild(d),c.setAttribute("title",o),c}},{key:"setButtonText",value:function(t,e,o,c){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),o&&!e?(t.classList.add("ui-button-icon-only"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):o?(t.classList.add("ui-button-text-icon-primary"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):t.classList.add("ui-button-text-only");var d=document.createElement("span");d.classList.add("ui-button-text"),d.textContent=e||c||".",t.appendChild(d),t.setAttribute("title",c)}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("ui-widget-content","ui-corner-all"),t.style.padding="1em 1.4em",t.style.marginBottom="20px",t}},{key:"afterInputReady",value:function(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"addInputError",value:function(t,e){t.controls?(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.classList.add("ui-state-error"),t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}},{key:"markTabActive",value:function(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}}])&&gf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function jo(u){return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jo(u)}function wf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(jo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jo(h)==="symbol"?h:String(h)),i)}var h}function Yl(u,n){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yl(u,n)}function Ss(u){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ss(u)}Dc.rules={'div[data-schemaid="root"]:after':'position:relative;color:red;margin:10px 0;font-weight:600;display:block;width:100%;text-align:center;content:"This is an old JSON-Editor 1.x Theme and might not display elements correctly when used with the 2.x version"'};var Nc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ss(i);if(h){var o=Ss(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(jo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var o=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),o.nodeName&&o.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&wf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function Eo(u){return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Eo(u)}function _f(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Eo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Eo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Eo(h)==="symbol"?h:String(h)),i)}var h}function vr(){return vr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=tr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},vr.apply(this,arguments)}function Xl(u,n){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Xl(u,n)}function tr(u){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tr(u)}Nc.rules={".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var xf={disable_theme_rules:!1,label_bold:!0,align_bottom:!1,object_indent:!1,object_border:!1,table_border:!1,table_zebrastyle:!1,input_size:"normal"},$c=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=tr(i);if(h){var o=tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Eo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,xf)}return n=s,(f=[{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-".concat(e)),o&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=vr(tr(s.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=vr(tr(s.prototype),"getFormButtonHolder",this).call(this);return e.classList.remove("btn-group"),e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"?e.classList.add("text-right"):e.classList.add("text-left"),e}},{key:"getFormButton",value:function(t,e,o){var c=vr(tr(s.prototype),"getFormButton",this).call(this,t,e,o);return c.classList.add("btn","btn-primary","mx-2","my-1"),this.options.input_size!=="small"&&c.classList.remove("btn-sm"),this.options.input_size==="large"&&c.classList.add("btn-lg"),c}},{key:"getButton",value:function(t,e,o){var c=vr(tr(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),c}},{key:"getHeader",value:function(t,e){var o=document.createElement("h4");return typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getFormInputDescription",value:function(t){var e=vr(tr(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-desc","hide-sm"),e}},{key:"getFormInputLabel",value:function(t,e){var o=vr(tr(s.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold&&o.classList.add("je-label"),o}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(t,e){var o=vr(tr(s.prototype),"getCheckboxLabel",this).call(this,t,e),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-checkbox","pr-0"),o.insertBefore(c,o.firstChild),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){return vr(tr(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c)}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=vr(tr(s.prototype),"getFormRadioLabel",this).call(this,t,e),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-radio"),o.insertBefore(c,o.firstChild),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getFormInputField",value:function(t){var e=vr(tr(s.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("form-input"),e}},{key:"getRangeInput",value:function(t,e,o){var c=this.getFormInputField("range");return c.classList.add("slider"),c.classList.remove("form-input"),c.setAttribute("oninput",'this.setAttribute("value", this.value)'),c.setAttribute("min",t),c.setAttribute("max",e),c.setAttribute("step",o),c}},{key:"getRangeControl",value:function(t,e){var o=vr(tr(s.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center"),o}},{key:"getSelectInput",value:function(t,e){var o=vr(tr(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-select"),o}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-input"),t}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio"?(t&&(t.classList.add("form-label"),d.appendChild(t),c&&t.appendChild(c)),d.appendChild(e)):(d.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),d.appendChild(t)),this.options.input_size==="small"?e.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&e.classList.add("input-lg","select-lg"),e.type!=="checkbox"&&d.appendChild(e),o&&d.appendChild(o),d}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var c=0;c<e.length;c++)e[c].classList.add("input-group-btn"),e[c].classList.remove("btn-sm","mr-2","my-1"),o.appendChild(e[c]);return o}}},{key:"getInfoButton",value:function(t){var e=document.createElement("div");e.classList.add("popover","popover-left","float-right");var o=document.createElement("button");o.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),o.setAttribute("tabindex","-1"),e.appendChild(o);var c=document.createTextNode("I");o.appendChild(c);var d=document.createElement("div");d.classList.add("popover-container"),e.appendChild(d);var _=document.createElement("div");_.classList.add("card"),d.appendChild(_);var P=document.createElement("div");return P.classList.add("card-body"),P.innerHTML=t,_.appendChild(P),e}},{key:"getTable",value:function(){var t=vr(tr(s.prototype),"getTable",this).call(this);return t.classList.add("table","table-scroll"),this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getProgressBar",value:function(){var t=vr(tr(s.prototype),"getProgressBar",this).call(this);return t.classList.add("progress"),t}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("columns"),o.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(e,'"></div>'),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(e,'"></div>'),o}},{key:"getTab",value:function(t,e){var o=document.createElement("a");return o.classList.add("btn","btn-secondary","btn-block"),o.setAttribute("href","#".concat(e)),o.appendChild(t),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.id=e,o.classList.add("tab-item");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),o.appendChild(c),o}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if(t.localName==="select"){if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach(function(c){c.classList.remove("form-select")}))}else if(t.classList.contains("select2-hidden-accessible")){var o=t.nextSibling;o&&o.querySelector(".select2-selection--single")&&o.classList.add("form-select")}}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("form-input-hint"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.classList.remove("d-hide"),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&_f(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function Co(u){return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Co(u)}function kf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Co(h)==="symbol"?h:String(h)),i)}var h}function gr(){return gr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=er(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},gr.apply(this,arguments)}function Ql(u,n){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ql(u,n)}function er(u){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},er(u)}$c.rules={"*":"--primary-color:%235755d9;--gray-color:%23bcc3ce;--light-color:%23fff",".slider:focus":"box-shadow:none","h4 > label + .btn-group":"margin-left:1rem",".text-right > button":"margin-right:0%20!important",".text-left > button":"margin-left:0%20!important",".property-selector":"font-size:0.7rem;font-weight:normal;max-height:260px%20!important;width:395px%20!important",".property-selector .form-checkbox":"margin:0",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"border-collapse:collapse",".table td":"padding:0.4rem%200.4rem",".mr-5":"margin-right:1rem%20!important","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23eee",".je-table-border td":"border:0.05rem%20solid%20%23dadee4%20!important",".btn-info":"font-size:0.5rem;font-weight:bold;height:0.8rem;padding:0.15rem%200;line-height:0.8;margin:0.3rem%200%200.3rem%200.1rem",".je-label + select":"min-width:5rem",".je-label":"font-weight:600",".btn-action.btn-info":"width:0.8rem",".je-border":"border:0.05rem%20solid%20%23dadee4",".je-panel":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit",".je-align-bottom":"margin-top:auto",".je-desc":"font-size:smaller;margin:0.2rem%200",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem;border:3px%20solid%20white;box-shadow:0px%200px%208px%20rgba(0%2C%200%2C%200%2C%200.3);box-sizing:border-box",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red",".columns .container.je-noindent":"padding-left:0;padding-right:0",".selectize-control.multi .item":"background:var(--primary-color)%20!important",".select2-container--default .select2-selection--single .select2-selection__arrow":"display:none",".select2-container--default .select2-selection--single":"border:none",".select2-container .select2-selection--single .select2-selection__rendered":"padding:0",".select2-container .select2-search--inline .select2-search__field":"margin-top:0",".select2-container--default.select2-container--focus .select2-selection--multiple":"border:0.05rem%20solid%20var(--gray-color)",".select2-container--default .select2-selection--multiple .select2-selection__choice":"margin:0.4rem%200.2rem%200.2rem%200;padding:2px%205px;background-color:var(--primary-color);color:var(--light-color)",".select2-container--default .select2-search--inline .select2-search__field":"line-height:normal",".choices":"margin-bottom:auto",".choices__list--multiple .choices__item":"border:none;background-color:var(--primary-color);color:var(--light-color)",".choices[data-type*='select-multiple'] .choices__button":"border-left:0.05rem%20solid%20%232826a6",".choices__inner":"font-size:inherit;min-height:20px;padding:4px%207.5px%204px%203.75px",".choices[data-type*='select-one'] .choices__inner":"padding-bottom:4px",".choices__list--dropdown .choices__item":"font-size:inherit"};var Of={disable_theme_rules:!1,label_bold:!1,object_panel_default:!0,object_indent:!0,object_border:!1,table_border:!1,table_hdiv:!1,table_zebrastyle:!1,input_size:"small",enable_compact:!1},Mc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ql(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=er(i);if(h){var o=er(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,Of)}return n=s,(f=[{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,o){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),o&&(t.style.marginLeft="".concat(100/12*o,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,e){var o=gr(er(s.prototype),"getSelectInput",this).call(this,t);return e?o.classList.add("form-multiselect","block","py-0","h-auto","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"):o.classList.add("form-select","block","py-0","h-6","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&o.classList.add("compact"),o}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=gr(er(s.prototype),"getTextareaInput",this).call(this);return t.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t.style.height=0,t}},{key:"getRangeInput",value:function(t,e,o){var c=this.getFormInputField("range");return c.classList.add("slider"),this.options.enable_compact&&c.classList.add("compact"),c.setAttribute("oninput",'this.setAttribute("value", this.value)'),c.setAttribute("min",t),c.setAttribute("max",e),c.setAttribute("step",o),c}},{key:"getRangeControl",value:function(t,e){var o=gr(er(s.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center","text-black"),o}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,e){var o=gr(er(s.prototype),"getCheckboxLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center"),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=gr(er(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c);return d.classList.add("inline-flex","flex-col"),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=gr(er(s.prototype),"getFormRadioLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center","mr-2"),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,e,o,c,d){var _=gr(er(s.prototype),"getRadioHolder",this).call(this,e,o,c,d);return t.options.layout==="h"?_.classList.add("inline-flex","flex-row"):_.classList.add("inline-flex","flex-col"),_}},{key:"getFormInputLabel",value:function(t,e){var o=gr(er(s.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold?o.classList.add("font-bold"):o.classList.add("required"),o}},{key:"getFormInputField",value:function(t){var e=gr(er(s.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("block","mt-1","text-xs"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return d.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),e.type==="checkbox"&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,c)),e.type==="radio"&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,c)),d.appendChild(t),!["checkbox","radio"].includes(e.type)&&c&&d.appendChild(c)),["checkbox","radio"].includes(e.type)||(this.options.input_size==="small"?e.classList.add("text-xs"):this.options.input_size==="normal"?e.classList.add("text-base"):this.options.input_size==="large"&&e.classList.add("text-xl"),d.appendChild(e)),o&&d.appendChild(o),d}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,e,o){var c=gr(er(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("inline-block","align-middle","text-center","text-sm","bg-blue-700","text-white","py-1","pr-1","m-2","shadow","select-none","whitespace-no-wrap","rounded"),c}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var o=document.createElement("span");return o.innerHTML=t,e.appendChild(o),e}},{key:"getTable",value:function(){var t=gr(er(s.prototype),"getTable",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}},{key:"getTableRow",value:function(){var t=gr(er(s.prototype),"getTableRow",this).call(this);return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}},{key:"getTableHeaderCell",value:function(t){var e=gr(er(s.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("text-xs","border","p-0","m-0"),e}},{key:"getTableCell",value:function(){var t=gr(er(s.prototype),"getTableCell",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("border-0","p-0","m-0"),t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.controlgroup.classList.add("text-red-600"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("block","mt-1","text-xs","text-red"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='w-2/12' id='".concat(o,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(o,"'></div>"),e.classList.add("flex"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(e,"'></ul><div class='p-6 block' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex-col","text-center","text-white","bg-blue-500","shadow-md","border","p-2","mb-2","mr-2","hover:bg-blue-400","rounded");var c=document.createElement("a");return c.classList.add("nav-link","text-center"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex","border-l","border-t","border-r");var c=document.createElement("a");return c.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("block"),t.tab.firstChild.classList.contains("border-b")===!0?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),t.container.classList.contains("hidden")===!0&&t.container.classList.remove("hidden"),t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.contains("border-b-0")===!0?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),t.container.classList.contains("block")===!0&&(t.container.classList.remove("block"),t.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),e.removeAttribute("aria-valuenow"),e.classList.add("w-full"),e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("relative","items-stretch","w-full"),o.appendChild(t);var c=document.createElement("div");c.classList.add("-mr-1"),o.appendChild(c);for(var d=0;d<e.length;d++)c.appendChild(e[d]);return o}}}])&&kf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);Mc.rules={".slider":"-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",".slider:focus":"box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",".slider.tooltip:not([data-tooltip])::after":"content:attr(value)",".slider::-webkit-slider-thumb":"-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",".slider:active::-webkit-slider-thumb":"transform:scale(1.25);outline:none",".slider::-webkit-slider-runnable-track":"background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25","a.tooltips":"position:relative;display:inline","a.tooltips span":"position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px","a.tooltips span:after":"content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent","a:hover.tooltips span":"visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",".json-editor-btntype-properties + div":"font-size:0.8rem;font-weight:normal",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"width:100%25;border-collapse:collapse",".table td":"padding:0rem%200rem","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23e6f4fe","div[data-schemaid='root']":"position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10","select[multiple]":"height:auto","select[multiple].from-select":"height:auto",".je-table-zebra:nth-child(even)":"background-color:%23f2f2f2",".je-table-border":"border:0.5px%20solid%20black",".je-table-hdiv":"border-bottom:1px%20solid%20black",".je-border":"border:0.05rem%20solid%20%233182ce",".je-panel":"width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit;font-weight:bold",".je-desc":"font-size:smaller;margin:0.2rem%200",".container-xl.je-noindent":"padding-left:0;padding-right:0",".json-editor-btntype-add":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deletelast":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deleteall":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-save":"float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-back":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-delete":"color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btntype-move":"color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btn-collapse":"padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var jf={html:Lc,bootstrap3:Rc,bootstrap4:Ic,bootstrap5:Bc,jqueryui:Dc,barebones:Nc,spectre:$c,tailwind:Mc};const Ef={".je-float-right-linkholder":"float:right;margin-left:10px",".je-modal":"background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",".je-infobutton-icon":"font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",".je-infobutton-tooltip":"font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",".je-not-loaded":"pointer-events:none",".je-header":"display:inline-block",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-checkbox":"display:inline-block;width:auto",".je-checkbox-control--compact":"display:inline-block;margin-right:1rem",".je-radio":"display:inline-block;width:auto",".je-radio-control--compact":"display:inline-block;margin-right:1rem",".je-switcher":"background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",".je-textarea":"width:100%25;height:300px;box-sizing:border-box",".je-range-control":"text-align:center",".je-indented-panel":"padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",".je-indented-panel--top":"padding-left:10px;margin-left:10px",".je-tabholder":"float:left;width:130px",".je-tabholder .content":"margin-left:120px",".je-tabholder--top":"margin-left:10px",".je-tabholder--clear":"clear:both",".je-tab":"border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",".je-tab--top":"float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",".je-block-link":"display:block",".je-media":"width:100%25"};function So(u){return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},So(u)}function Kl(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function tu(){tu=function(){return u};var u={},n=Object.prototype,f=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},h=typeof Symbol=="function"?Symbol:{},a=h.iterator||"@@iterator",s=h.asyncIterator||"@@asyncIterator",t=h.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof _?G:_,Lt=Object.create(et.prototype),re=new gt(pt||[]);return i(Lt,"_invoke",{value:$t(W,Z,re)}),Lt}function c(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}u.wrap=o;var d={};function _(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ct=nt&&nt(nt(Zt([])));ct&&ct!==n&&f.call(ct,a)&&(J=ct);var dt=D.prototype=_.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,re,Pe){var Te=c(W[et],W,Lt);if(Te.type!=="throw"){var Br=Te.arg,Kr=Br.value;return Kr&&So(Kr)=="object"&&f.call(Kr,"__await")?G.resolve(Kr.__await).then(function(xr){Z("next",xr,re,Pe)},function(xr){Z("throw",xr,re,Pe)}):G.resolve(Kr).then(function(xr){Br.value=xr,re(Br)},function(xr){return Z("throw",xr,re,Pe)})}Pe(Te.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function re(){return new G(function(Pe,Te){Z(et,Lt,Pe,Te)})}return pt=pt?pt.then(re,re):re()}})}function $t(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var re=Z.delegate;if(re){var Pe=ne(re,Z);if(Pe){if(Pe===d)continue;return Pe}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var Te=c(W,G,Z);if(Te.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Te.arg===d)continue;return{value:Te.arg,done:Z.done}}Te.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Te.arg)}}}function ne(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,ne(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=c(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Re(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Gt(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Re,this),this.reset(!0)}function Zt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(f.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:Ge}}function Ge(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),u.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},u.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},u.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,s,function(){return this}),u.AsyncIterator=Ct,u.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return u.isGeneratorFunction(G)?Lt:Lt.next().then(function(re){return re.done?re.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),u.keys=function(W){var G=Object(W),Z=[];for(var pt in G)Z.push(pt);return Z.reverse(),function et(){for(;Z.length;){var Lt=Z.pop();if(Lt in G)return et.value=Lt,et.done=!1,et}return et.done=!0,et}},u.values=Zt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Gt),!W)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(Te,Br){return Lt.type="throw",Lt.arg=W,G.next=Te,Br&&(G.method="next",G.arg=void 0),!!Br}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var re=f.call(et,"catchLoc"),Pe=f.call(et,"finallyLoc");if(re&&Pe){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(re){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!Pe)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&f.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Gt(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Gt(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Zt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},u}function Hc(u,n,f,i,h,a,s){try{var t=u[a](s),e=t.value}catch(o){return void f(o)}t.done?n(e):Promise.resolve(e).then(i,h)}function Cf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(So(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(So(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),So(h)==="symbol"?h:String(h)),i)}var h}var Tn=function(){function u(a){var s=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(function(D,J){if(!(D instanceof J))throw new TypeError("Cannot call a class as a function")}(this,u),!(a instanceof Element))throw new Error("element should be an instance of Element");this.element=a,this.options=x({},u.defaults.options,t),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||u.defaults.translate,this.translateProperty=this.options.translateProperty||u.defaults.translateProperty,this.uuid=0,this.__data={};var e=this.options.theme||u.defaults.theme,o=u.defaults.themes[e];if(!o)throw new Error("Unknown theme ".concat(e));this.element.setAttribute("data-theme",e),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new o(this);var c=x(Ef,this.getEditorsRules()),d=function(D,J,nt){return nt?s.addNewStyleRulesToShadowRoot(D,J,nt):s.addNewStyleRules(D,J)};if(!this.theme.options.disable_theme_rules){var _=E(this.element);d("default",c,_),o.rules!==void 0&&d(e,o.rules,_)}var P=u.defaults.iconlibs[this.options.iconlib||u.defaults.iconlib];P&&(this.iconlib=new P),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}var n,f,i,h;return n=u,f=[{key:"load",value:(i=tu().mark(function a(){var s,t,e,o,c,d,_=this;return tu().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(t=new Np(this.options)).onSchemaLoaded=function(D){_.trigger("schemaLoaded",D)},t.onAllSchemasLoaded=function(){_.trigger("allSchemasLoaded")},this.expandSchema=function(D){return t.expandSchema(D)},this.expandRefs=function(D,J){return t.expandRefs(D,J)},e=document.location.toString(),P.next=9,t.load(this.schema,s,e);case 9:o=P.sent,c=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Ki(this,null,c,u.defaults),d=this.getEditorClass(o),this.root=this.createEditor(d,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),S(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame(function(){_.ready&&(_.validation_results=_.validator.validate(_.root.getValue()),_.root.showValidationErrors(_.validation_results),_.trigger("ready"),_.trigger("change"))});case 24:case"end":return P.stop()}},a,this)}),h=function(){var a=this,s=arguments;return new Promise(function(t,e){var o=i.apply(a,s);function c(_){Hc(o,t,e,c,d,"next",_)}function d(_){Hc(o,t,e,c,d,"throw",_)}c(void 0)})},function(){return h.apply(this,arguments)})},{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}},{key:"setValue",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(a),this}},{key:"validate",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return arguments.length===1?this.validator.validate(a):this.validation_results}},{key:"destroy",value:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.element.removeAttribute("data-theme"),this.destroyed=!0)}},{key:"on",value:function(a,s){return this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[],this.callbacks[a].push(s),this}},{key:"off",value:function(a,s){if(a&&s){this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[];for(var t=[],e=0;e<this.callbacks[a].length;e++)this.callbacks[a][e]!==s&&t.push(this.callbacks[a][e]);this.callbacks[a]=t}else a?(this.callbacks=this.callbacks||{},this.callbacks[a]=[]):this.callbacks={};return this}},{key:"trigger",value:function(a,s){if(this.callbacks&&this.callbacks[a]&&this.callbacks[a].length)for(var t=0;t<this.callbacks[a].length;t++)this.callbacks[a][t].apply(this,[s]);return this}},{key:"setOption",value:function(a,s){if(a!=="show_errors")throw new Error("Option ".concat(a," must be set during instantiation and cannot be changed later"));return this.options.show_errors=s,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(u.defaults.editors).reduce(function(a,s){return s.rules?x(a,s.rules):a},{})}},{key:"getEditorClass",value:function(a){var s,t=this;if(a=this.expandSchema(a),u.defaults.resolvers.find(function(e){return(s=e(a,t))&&u.defaults.editors[s]}),!s)throw new Error("Unknown editor for schema ".concat(JSON.stringify(a)));if(!u.defaults.editors[s])throw new Error("Unknown editor ".concat(s));return u.defaults.editors[s]}},{key:"createEditor",value:function(a,s){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new a(s=x({},a.options||{},s),u.defaults,t)}},{key:"onChange",value:function(){var a=this;if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame(function(){a.firing_change=!1,a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),a.options.show_errors!=="never"?a.root.showValidationErrors(a.validation_results):a.root.showValidationErrors([]),a.trigger("change"))}),this}},{key:"compileTemplate",value:function(a){var s,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.defaults.template;if(typeof t=="string"){if(!u.defaults.templates[t])throw new Error("Unknown template engine ".concat(t));if(!(s=u.defaults.templates[t]()))throw new Error("Template engine ".concat(t," missing required library."))}else s=t;if(!s)throw new Error("No template engine set");if(!s.compile)throw new Error("Invalid template engine set");return s.compile(a)}},{key:"_data",value:function(a,s,t){if(arguments.length!==3)return a.hasAttribute("data-jsoneditor-".concat(s))?this.__data[a.getAttribute("data-jsoneditor-".concat(s))]:null;var e;a.hasAttribute("data-jsoneditor-".concat(s))?e=a.getAttribute("data-jsoneditor-".concat(s)):(e=this.uuid++,a.setAttribute("data-jsoneditor-".concat(s),e)),this.__data[e]=t}},{key:"registerEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=a,this}},{key:"unregisterEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=null,this}},{key:"getEditor",value:function(a){if(this.editors)return this.editors[a]}},{key:"watch",value:function(a,s){return this.watchlist=this.watchlist||{},this.watchlist[a]=this.watchlist[a]||[],this.watchlist[a].push(s),this}},{key:"unwatch",value:function(a,s){if(!this.watchlist||!this.watchlist[a])return this;if(!s)return this.watchlist[a]=null,this;for(var t=[],e=0;e<this.watchlist[a].length;e++)this.watchlist[a][e]!==s&&t.push(this.watchlist[a][e]);return this.watchlist[a]=t.length?t:null,this}},{key:"notifyWatchers",value:function(a){if(!this.watchlist||!this.watchlist[a])return this;for(var s=0;s<this.watchlist[a].length;s++)this.watchlist[a][s]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(a){this.copyClipboard=a}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(a,s){var t=document.querySelector("#theme-".concat(a));t||((t=document.createElement("style")).setAttribute("id","theme-".concat(a)),t.appendChild(document.createTextNode("")),document.head.appendChild(t));for(var e=t.sheet?t.sheet:t.styleSheet,o=this.element.nodeName.toLowerCase();e.cssRules.length>0;)e.deleteRule(0);Object.keys(s).forEach(function(c){var d=a==="default"?c:"".concat(o,'[data-theme="').concat(a,'"] ').concat(c);e.insertRule?e.insertRule(d+" {"+decodeURIComponent(s[c])+"}",0):e.addRule&&e.addRule(d,decodeURIComponent(s[c]),0)})}},{key:"addNewStyleRulesToShadowRoot",value:function(a,s,t){var e=this.element.nodeName.toLowerCase(),o="";Object.keys(s).forEach(function(_){var P=a==="default"?_:"".concat(e,'[data-theme="').concat(a,'"] ').concat(_);o+=P+" {"+decodeURIComponent(s[_])+`}
|
|
70
|
-
`});var
|
|
71
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),[d])}}],f&&
|
|
70
|
+
*/function*Ba(m,s){if(m!==void 0){let p=0;for(const b of m)yield s(b,p++)}}var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qd(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var uu={exports:{}};/*! For license information please see jsoneditor.js.LICENSE.txt */(function(m,s){(function(p,b){m.exports=b()})(self,()=>(()=>{var p={9662:(y,j,r)=>{var v=r(614),g=r(6330),w=TypeError;y.exports=function(k){if(v(k))return k;throw w(g(k)+" is not a function")}},9483:(y,j,r)=>{var v=r(4411),g=r(6330),w=TypeError;y.exports=function(k){if(v(k))return k;throw w(g(k)+" is not a constructor")}},6077:(y,j,r)=>{var v=r(614),g=String,w=TypeError;y.exports=function(k){if(typeof k=="object"||v(k))return k;throw w("Can't set "+g(k)+" as a prototype")}},1223:(y,j,r)=>{var v=r(5112),g=r(30),w=r(3070).f,k=v("unscopables"),O=Array.prototype;O[k]==null&&w(O,k,{configurable:!0,value:g(null)}),y.exports=function(C){O[k][C]=!0}},1530:(y,j,r)=>{var v=r(8710).charAt;y.exports=function(g,w,k){return w+(k?v(g,w).length:1)}},5787:(y,j,r)=>{var v=r(7976),g=TypeError;y.exports=function(w,k){if(v(k,w))return w;throw g("Incorrect invocation")}},9670:(y,j,r)=>{var v=r(111),g=String,w=TypeError;y.exports=function(k){if(v(k))return k;throw w(g(k)+" is not an object")}},8533:(y,j,r)=>{var v=r(2092).forEach,g=r(9341)("forEach");y.exports=g?[].forEach:function(w){return v(this,w,arguments.length>1?arguments[1]:void 0)}},8457:(y,j,r)=>{var v=r(9974),g=r(6916),w=r(7908),k=r(3411),O=r(7659),C=r(4411),S=r(6244),T=r(6135),A=r(4121),R=r(1246),I=Array;y.exports=function($){var M=w($),B=C(this),q=arguments.length,F=q>1?arguments[1]:void 0,N=F!==void 0;N&&(F=v(F,q>2?arguments[2]:void 0));var U,H,X,Y,K,tt,it=R(M),st=0;if(!it||this===I&&O(it))for(U=S(M),H=B?new this(U):I(U);U>st;st++)tt=N?F(M[st],st):M[st],T(H,st,tt);else for(K=(Y=A(M,it)).next,H=B?new this:[];!(X=g(K,Y)).done;st++)tt=N?k(Y,F,[X.value,st],!0):X.value,T(H,st,tt);return H.length=st,H}},1318:(y,j,r)=>{var v=r(5656),g=r(1400),w=r(6244),k=function(O){return function(C,S,T){var A,R=v(C),I=w(R),$=g(T,I);if(O&&S!=S){for(;I>$;)if((A=R[$++])!=A)return!0}else for(;I>$;$++)if((O||$ in R)&&R[$]===S)return O||$||0;return!O&&-1}};y.exports={includes:k(!0),indexOf:k(!1)}},2092:(y,j,r)=>{var v=r(9974),g=r(1702),w=r(8361),k=r(7908),O=r(6244),C=r(5417),S=g([].push),T=function(A){var R=A==1,I=A==2,$=A==3,M=A==4,B=A==6,q=A==7,F=A==5||B;return function(N,U,H,X){for(var Y,K,tt=k(N),it=w(tt),st=v(U,H),yt=O(it),ct=0,Et=X||C,At=R?Et(N,yt):I||q?Et(N,0):void 0;yt>ct;ct++)if((F||ct in it)&&(K=st(Y=it[ct],ct,tt),A))if(R)At[ct]=K;else if(K)switch(A){case 3:return!0;case 5:return Y;case 6:return ct;case 2:S(At,Y)}else switch(A){case 4:return!1;case 7:S(At,Y)}return B?-1:$||M?M:At}};y.exports={forEach:T(0),map:T(1),filter:T(2),some:T(3),every:T(4),find:T(5),findIndex:T(6),filterReject:T(7)}},1194:(y,j,r)=>{var v=r(7293),g=r(5112),w=r(7392),k=g("species");y.exports=function(O){return w>=51||!v(function(){var C=[];return(C.constructor={})[k]=function(){return{foo:1}},C[O](Boolean).foo!==1})}},9341:(y,j,r)=>{var v=r(7293);y.exports=function(g,w){var k=[][g];return!!k&&v(function(){k.call(null,w||function(){return 1},1)})}},3671:(y,j,r)=>{var v=r(9662),g=r(7908),w=r(8361),k=r(6244),O=TypeError,C=function(S){return function(T,A,R,I){v(A);var $=g(T),M=w($),B=k($),q=S?B-1:0,F=S?-1:1;if(R<2)for(;;){if(q in M){I=M[q],q+=F;break}if(q+=F,S?q<0:B<=q)throw O("Reduce of empty array with no initial value")}for(;S?q>=0:B>q;q+=F)q in M&&(I=A(I,M[q],q,$));return I}};y.exports={left:C(!1),right:C(!0)}},3658:(y,j,r)=>{var v=r(9781),g=r(3157),w=TypeError,k=Object.getOwnPropertyDescriptor,O=v&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(C){return C instanceof TypeError}}();y.exports=O?function(C,S){if(g(C)&&!k(C,"length").writable)throw w("Cannot set read only .length");return C.length=S}:function(C,S){return C.length=S}},1589:(y,j,r)=>{var v=r(1400),g=r(6244),w=r(6135),k=Array,O=Math.max;y.exports=function(C,S,T){for(var A=g(C),R=v(S,A),I=v(T===void 0?A:T,A),$=k(O(I-R,0)),M=0;R<I;R++,M++)w($,M,C[R]);return $.length=M,$}},206:(y,j,r)=>{var v=r(1702);y.exports=v([].slice)},4362:(y,j,r)=>{var v=r(1589),g=Math.floor,w=function(C,S){var T=C.length,A=g(T/2);return T<8?k(C,S):O(C,w(v(C,0,A),S),w(v(C,A),S),S)},k=function(C,S){for(var T,A,R=C.length,I=1;I<R;){for(A=I,T=C[I];A&&S(C[A-1],T)>0;)C[A]=C[--A];A!==I++&&(C[A]=T)}return C},O=function(C,S,T,A){for(var R=S.length,I=T.length,$=0,M=0;$<R||M<I;)C[$+M]=$<R&&M<I?A(S[$],T[M])<=0?S[$++]:T[M++]:$<R?S[$++]:T[M++];return C};y.exports=w},7475:(y,j,r)=>{var v=r(3157),g=r(4411),w=r(111),k=r(5112)("species"),O=Array;y.exports=function(C){var S;return v(C)&&(S=C.constructor,(g(S)&&(S===O||v(S.prototype))||w(S)&&(S=S[k])===null)&&(S=void 0)),S===void 0?O:S}},5417:(y,j,r)=>{var v=r(7475);y.exports=function(g,w){return new(v(g))(w===0?0:w)}},3411:(y,j,r)=>{var v=r(9670),g=r(9212);y.exports=function(w,k,O,C){try{return C?k(v(O)[0],O[1]):k(O)}catch(S){g(w,"throw",S)}}},7072:(y,j,r)=>{var v=r(5112)("iterator"),g=!1;try{var w=0,k={next:function(){return{done:!!w++}},return:function(){g=!0}};k[v]=function(){return this},Array.from(k,function(){throw 2})}catch{}y.exports=function(O,C){if(!C&&!g)return!1;var S=!1;try{var T={};T[v]=function(){return{next:function(){return{done:S=!0}}}},O(T)}catch{}return S}},4326:(y,j,r)=>{var v=r(1702),g=v({}.toString),w=v("".slice);y.exports=function(k){return w(g(k),8,-1)}},648:(y,j,r)=>{var v=r(1694),g=r(614),w=r(4326),k=r(5112)("toStringTag"),O=Object,C=w(function(){return arguments}())=="Arguments";y.exports=v?w:function(S){var T,A,R;return S===void 0?"Undefined":S===null?"Null":typeof(A=function(I,$){try{return I[$]}catch{}}(T=O(S),k))=="string"?A:C?w(T):(R=w(T))=="Object"&&g(T.callee)?"Arguments":R}},9920:(y,j,r)=>{var v=r(2597),g=r(3887),w=r(1236),k=r(3070);y.exports=function(O,C,S){for(var T=g(C),A=k.f,R=w.f,I=0;I<T.length;I++){var $=T[I];v(O,$)||S&&v(S,$)||A(O,$,R(C,$))}}},4964:(y,j,r)=>{var v=r(5112)("match");y.exports=function(g){var w=/./;try{"/./"[g](w)}catch{try{return w[v]=!1,"/./"[g](w)}catch{}}return!1}},8544:(y,j,r)=>{var v=r(7293);y.exports=!v(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})},6178:y=>{y.exports=function(j,r){return{value:j,done:r}}},8880:(y,j,r)=>{var v=r(9781),g=r(3070),w=r(9114);y.exports=v?function(k,O,C){return g.f(k,O,w(1,C))}:function(k,O,C){return k[O]=C,k}},9114:y=>{y.exports=function(j,r){return{enumerable:!(1&j),configurable:!(2&j),writable:!(4&j),value:r}}},6135:(y,j,r)=>{var v=r(4948),g=r(3070),w=r(9114);y.exports=function(k,O,C){var S=v(O);S in k?g.f(k,S,w(0,C)):k[S]=C}},5573:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(6650).start,k=RangeError,O=isFinite,C=Math.abs,S=Date.prototype,T=S.toISOString,A=v(S.getTime),R=v(S.getUTCDate),I=v(S.getUTCFullYear),$=v(S.getUTCHours),M=v(S.getUTCMilliseconds),B=v(S.getUTCMinutes),q=v(S.getUTCMonth),F=v(S.getUTCSeconds);y.exports=g(function(){return T.call(new Date(-50000000000001))!="0385-07-25T07:06:39.999Z"})||!g(function(){T.call(new Date(NaN))})?function(){if(!O(A(this)))throw k("Invalid time value");var N=this,U=I(N),H=M(N),X=U<0?"-":U>9999?"+":"";return X+w(C(U),X?6:4,0)+"-"+w(q(N)+1,2,0)+"-"+w(R(N),2,0)+"T"+w($(N),2,0)+":"+w(B(N),2,0)+":"+w(F(N),2,0)+"."+w(H,3,0)+"Z"}:T},8709:(y,j,r)=>{var v=r(9670),g=r(2140),w=TypeError;y.exports=function(k){if(v(this),k==="string"||k==="default")k="string";else if(k!=="number")throw w("Incorrect hint");return g(this,k)}},7045:(y,j,r)=>{var v=r(6339),g=r(3070);y.exports=function(w,k,O){return O.get&&v(O.get,k,{getter:!0}),O.set&&v(O.set,k,{setter:!0}),g.f(w,k,O)}},8052:(y,j,r)=>{var v=r(614),g=r(3070),w=r(6339),k=r(3072);y.exports=function(O,C,S,T){T||(T={});var A=T.enumerable,R=T.name!==void 0?T.name:C;if(v(S)&&w(S,R,T),T.global)A?O[C]=S:k(C,S);else{try{T.unsafe?O[C]&&(A=!0):delete O[C]}catch{}A?O[C]=S:g.f(O,C,{value:S,enumerable:!1,configurable:!T.nonConfigurable,writable:!T.nonWritable})}return O}},3072:(y,j,r)=>{var v=r(7854),g=Object.defineProperty;y.exports=function(w,k){try{g(v,w,{value:k,configurable:!0,writable:!0})}catch{v[w]=k}return k}},5117:(y,j,r)=>{var v=r(6330),g=TypeError;y.exports=function(w,k){if(!delete w[k])throw g("Cannot delete property "+v(k)+" of "+v(w))}},9781:(y,j,r)=>{var v=r(7293);y.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},4154:y=>{var j=typeof document=="object"&&document.all,r=j===void 0&&j!==void 0;y.exports={all:j,IS_HTMLDDA:r}},317:(y,j,r)=>{var v=r(7854),g=r(111),w=v.document,k=g(w)&&g(w.createElement);y.exports=function(O){return k?w.createElement(O):{}}},7207:y=>{var j=TypeError;y.exports=function(r){if(r>9007199254740991)throw j("Maximum allowed index exceeded");return r}},8324:y=>{y.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(y,j,r)=>{var v=r(317)("span").classList,g=v&&v.constructor&&v.constructor.prototype;y.exports=g===Object.prototype?void 0:g},8886:(y,j,r)=>{var v=r(8113).match(/firefox\/(\d+)/i);y.exports=!!v&&+v[1]},7871:(y,j,r)=>{var v=r(3823),g=r(5268);y.exports=!v&&!g&&typeof window=="object"&&typeof document=="object"},9363:y=>{y.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},3823:y=>{y.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},256:(y,j,r)=>{var v=r(8113);y.exports=/MSIE|Trident/.test(v)},1528:(y,j,r)=>{var v=r(8113);y.exports=/ipad|iphone|ipod/i.test(v)&&typeof Pebble<"u"},8334:(y,j,r)=>{var v=r(8113);y.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(v)},5268:(y,j,r)=>{var v=r(4326);y.exports=typeof process<"u"&&v(process)=="process"},1036:(y,j,r)=>{var v=r(8113);y.exports=/web0s(?!.*chrome)/i.test(v)},8113:y=>{y.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7392:(y,j,r)=>{var v,g,w=r(7854),k=r(8113),O=w.process,C=w.Deno,S=O&&O.versions||C&&C.version,T=S&&S.v8;T&&(g=(v=T.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!g&&k&&(!(v=k.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=k.match(/Chrome\/(\d+)/))&&(g=+v[1]),y.exports=g},8008:(y,j,r)=>{var v=r(8113).match(/AppleWebKit\/(\d+)\./);y.exports=!!v&&+v[1]},748:y=>{y.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(y,j,r)=>{var v=r(7854),g=r(1236).f,w=r(8880),k=r(8052),O=r(3072),C=r(9920),S=r(4705);y.exports=function(T,A){var R,I,$,M,B,q=T.target,F=T.global,N=T.stat;if(R=F?v:N?v[q]||O(q,{}):(v[q]||{}).prototype)for(I in A){if(M=A[I],$=T.dontCallGetSet?(B=g(R,I))&&B.value:R[I],!S(F?I:q+(N?".":"#")+I,T.forced)&&$!==void 0){if(typeof M==typeof $)continue;C(M,$)}(T.sham||$&&$.sham)&&w(M,"sham",!0),k(R,I,M,T)}}},7293:y=>{y.exports=function(j){try{return!!j()}catch{return!0}}},7007:(y,j,r)=>{r(4916);var v=r(1470),g=r(8052),w=r(2261),k=r(7293),O=r(5112),C=r(8880),S=O("species"),T=RegExp.prototype;y.exports=function(A,R,I,$){var M=O(A),B=!k(function(){var U={};return U[M]=function(){return 7},""[A](U)!=7}),q=B&&!k(function(){var U=!1,H=/a/;return A==="split"&&((H={}).constructor={},H.constructor[S]=function(){return H},H.flags="",H[M]=/./[M]),H.exec=function(){return U=!0,null},H[M](""),!U});if(!B||!q||I){var F=v(/./[M]),N=R(M,""[A],function(U,H,X,Y,K){var tt=v(U),it=H.exec;return it===w||it===T.exec?B&&!K?{done:!0,value:F(H,X,Y)}:{done:!0,value:tt(X,H,Y)}:{done:!1}});g(String.prototype,A,N[0]),g(T,M,N[1])}$&&C(T[M],"sham",!0)}},2104:(y,j,r)=>{var v=r(4374),g=Function.prototype,w=g.apply,k=g.call;y.exports=typeof Reflect=="object"&&Reflect.apply||(v?k.bind(w):function(){return k.apply(w,arguments)})},9974:(y,j,r)=>{var v=r(1470),g=r(9662),w=r(4374),k=v(v.bind);y.exports=function(O,C){return g(O),C===void 0?O:w?k(O,C):function(){return O.apply(C,arguments)}}},4374:(y,j,r)=>{var v=r(7293);y.exports=!v(function(){var g=(function(){}).bind();return typeof g!="function"||g.hasOwnProperty("prototype")})},7065:(y,j,r)=>{var v=r(1702),g=r(9662),w=r(111),k=r(2597),O=r(206),C=r(4374),S=Function,T=v([].concat),A=v([].join),R={},I=function($,M,B){if(!k(R,M)){for(var q=[],F=0;F<M;F++)q[F]="a["+F+"]";R[M]=S("C,a","return new C("+A(q,",")+")")}return R[M]($,B)};y.exports=C?S.bind:function($){var M=g(this),B=M.prototype,q=O(arguments,1),F=function(){var N=T(q,O(arguments));return this instanceof F?I(M,N.length,N):M.apply($,N)};return w(B)&&(F.prototype=B),F}},6916:(y,j,r)=>{var v=r(4374),g=Function.prototype.call;y.exports=v?g.bind(g):function(){return g.apply(g,arguments)}},6530:(y,j,r)=>{var v=r(9781),g=r(2597),w=Function.prototype,k=v&&Object.getOwnPropertyDescriptor,O=g(w,"name"),C=O&&(function(){}).name==="something",S=O&&(!v||v&&k(w,"name").configurable);y.exports={EXISTS:O,PROPER:C,CONFIGURABLE:S}},5668:(y,j,r)=>{var v=r(1702),g=r(9662);y.exports=function(w,k,O){try{return v(g(Object.getOwnPropertyDescriptor(w,k)[O]))}catch{}}},1470:(y,j,r)=>{var v=r(4326),g=r(1702);y.exports=function(w){if(v(w)==="Function")return g(w)}},1702:(y,j,r)=>{var v=r(4374),g=Function.prototype,w=g.call,k=v&&g.bind.bind(w,w);y.exports=v?k:function(O){return function(){return w.apply(O,arguments)}}},5005:(y,j,r)=>{var v=r(7854),g=r(614),w=function(k){return g(k)?k:void 0};y.exports=function(k,O){return arguments.length<2?w(v[k]):v[k]&&v[k][O]}},1246:(y,j,r)=>{var v=r(648),g=r(8173),w=r(8554),k=r(7497),O=r(5112)("iterator");y.exports=function(C){if(!w(C))return g(C,O)||g(C,"@@iterator")||k[v(C)]}},4121:(y,j,r)=>{var v=r(6916),g=r(9662),w=r(9670),k=r(6330),O=r(1246),C=TypeError;y.exports=function(S,T){var A=arguments.length<2?O(S):T;if(g(A))return w(v(A,S));throw C(k(S)+" is not iterable")}},8044:(y,j,r)=>{var v=r(1702),g=r(3157),w=r(614),k=r(4326),O=r(1340),C=v([].push);y.exports=function(S){if(w(S))return S;if(g(S)){for(var T=S.length,A=[],R=0;R<T;R++){var I=S[R];typeof I=="string"?C(A,I):typeof I!="number"&&k(I)!="Number"&&k(I)!="String"||C(A,O(I))}var $=A.length,M=!0;return function(B,q){if(M)return M=!1,q;if(g(this))return q;for(var F=0;F<$;F++)if(A[F]===B)return q}}}},8173:(y,j,r)=>{var v=r(9662),g=r(8554);y.exports=function(w,k){var O=w[k];return g(O)?void 0:v(O)}},647:(y,j,r)=>{var v=r(1702),g=r(7908),w=Math.floor,k=v("".charAt),O=v("".replace),C=v("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;y.exports=function(A,R,I,$,M,B){var q=I+A.length,F=$.length,N=T;return M!==void 0&&(M=g(M),N=S),O(B,N,function(U,H){var X;switch(k(H,0)){case"$":return"$";case"&":return A;case"`":return C(R,0,I);case"'":return C(R,q);case"<":X=M[C(H,1,-1)];break;default:var Y=+H;if(Y===0)return U;if(Y>F){var K=w(Y/10);return K===0?U:K<=F?$[K-1]===void 0?k(H,1):$[K-1]+k(H,1):U}X=$[Y-1]}return X===void 0?"":X})}},7854:(y,j,r)=>{var v=function(g){return g&&g.Math==Math&&g};y.exports=v(typeof globalThis=="object"&&globalThis)||v(typeof window=="object"&&window)||v(typeof self=="object"&&self)||v(typeof r.g=="object"&&r.g)||function(){return this}()||Function("return this")()},2597:(y,j,r)=>{var v=r(1702),g=r(7908),w=v({}.hasOwnProperty);y.exports=Object.hasOwn||function(k,O){return w(g(k),O)}},3501:y=>{y.exports={}},842:y=>{y.exports=function(j,r){try{arguments.length==1?console.error(j):console.error(j,r)}catch{}}},490:(y,j,r)=>{var v=r(5005);y.exports=v("document","documentElement")},4664:(y,j,r)=>{var v=r(9781),g=r(7293),w=r(317);y.exports=!v&&!g(function(){return Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a!=7})},8361:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(4326),k=Object,O=v("".split);y.exports=g(function(){return!k("z").propertyIsEnumerable(0)})?function(C){return w(C)=="String"?O(C,""):k(C)}:k},9587:(y,j,r)=>{var v=r(614),g=r(111),w=r(7674);y.exports=function(k,O,C){var S,T;return w&&v(S=O.constructor)&&S!==C&&g(T=S.prototype)&&T!==C.prototype&&w(k,T),k}},2788:(y,j,r)=>{var v=r(1702),g=r(614),w=r(5465),k=v(Function.toString);g(w.inspectSource)||(w.inspectSource=function(O){return k(O)}),y.exports=w.inspectSource},9909:(y,j,r)=>{var v,g,w,k=r(4811),O=r(7854),C=r(111),S=r(8880),T=r(2597),A=r(5465),R=r(6200),I=r(3501),$="Object already initialized",M=O.TypeError,B=O.WeakMap;if(k||A.state){var q=A.state||(A.state=new B);q.get=q.get,q.has=q.has,q.set=q.set,v=function(N,U){if(q.has(N))throw M($);return U.facade=N,q.set(N,U),U},g=function(N){return q.get(N)||{}},w=function(N){return q.has(N)}}else{var F=R("state");I[F]=!0,v=function(N,U){if(T(N,F))throw M($);return U.facade=N,S(N,F,U),U},g=function(N){return T(N,F)?N[F]:{}},w=function(N){return T(N,F)}}y.exports={set:v,get:g,has:w,enforce:function(N){return w(N)?g(N):v(N,{})},getterFor:function(N){return function(U){var H;if(!C(U)||(H=g(U)).type!==N)throw M("Incompatible receiver, "+N+" required");return H}}}},7659:(y,j,r)=>{var v=r(5112),g=r(7497),w=v("iterator"),k=Array.prototype;y.exports=function(O){return O!==void 0&&(g.Array===O||k[w]===O)}},3157:(y,j,r)=>{var v=r(4326);y.exports=Array.isArray||function(g){return v(g)=="Array"}},614:(y,j,r)=>{var v=r(4154),g=v.all;y.exports=v.IS_HTMLDDA?function(w){return typeof w=="function"||w===g}:function(w){return typeof w=="function"}},4411:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(614),k=r(648),O=r(5005),C=r(2788),S=function(){},T=[],A=O("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=v(R.exec),$=!R.exec(S),M=function(q){if(!w(q))return!1;try{return A(S,T,q),!0}catch{return!1}},B=function(q){if(!w(q))return!1;switch(k(q)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $||!!I(R,C(q))}catch{return!0}};B.sham=!0,y.exports=!A||g(function(){var q;return M(M.call)||!M(Object)||!M(function(){q=!0})||q})?B:M},5032:(y,j,r)=>{var v=r(2597);y.exports=function(g){return g!==void 0&&(v(g,"value")||v(g,"writable"))}},4705:(y,j,r)=>{var v=r(7293),g=r(614),w=/#|\.prototype\./,k=function(A,R){var I=C[O(A)];return I==T||I!=S&&(g(R)?v(R):!!R)},O=k.normalize=function(A){return String(A).replace(w,".").toLowerCase()},C=k.data={},S=k.NATIVE="N",T=k.POLYFILL="P";y.exports=k},8554:y=>{y.exports=function(j){return j==null}},111:(y,j,r)=>{var v=r(614),g=r(4154),w=g.all;y.exports=g.IS_HTMLDDA?function(k){return typeof k=="object"?k!==null:v(k)||k===w}:function(k){return typeof k=="object"?k!==null:v(k)}},1913:y=>{y.exports=!1},7850:(y,j,r)=>{var v=r(111),g=r(4326),w=r(5112)("match");y.exports=function(k){var O;return v(k)&&((O=k[w])!==void 0?!!O:g(k)=="RegExp")}},2190:(y,j,r)=>{var v=r(5005),g=r(614),w=r(7976),k=r(3307),O=Object;y.exports=k?function(C){return typeof C=="symbol"}:function(C){var S=v("Symbol");return g(S)&&w(S.prototype,O(C))}},408:(y,j,r)=>{var v=r(9974),g=r(6916),w=r(9670),k=r(6330),O=r(7659),C=r(6244),S=r(7976),T=r(4121),A=r(1246),R=r(9212),I=TypeError,$=function(B,q){this.stopped=B,this.result=q},M=$.prototype;y.exports=function(B,q,F){var N,U,H,X,Y,K,tt,it=F&&F.that,st=!(!F||!F.AS_ENTRIES),yt=!(!F||!F.IS_RECORD),ct=!(!F||!F.IS_ITERATOR),Et=!(!F||!F.INTERRUPTED),At=v(q,it),Vt=function(wt){return N&&R(N,"normal",wt),new $(!0,wt)},lt=function(wt){return st?(w(wt),Et?At(wt[0],wt[1],Vt):At(wt[0],wt[1])):Et?At(wt,Vt):At(wt)};if(yt)N=B.iterator;else if(ct)N=B;else{if(!(U=A(B)))throw I(k(B)+" is not iterable");if(O(U)){for(H=0,X=C(B);X>H;H++)if((Y=lt(B[H]))&&S(M,Y))return Y;return new $(!1)}N=T(B,U)}for(K=yt?B.next:N.next;!(tt=g(K,N)).done;){try{Y=lt(tt.value)}catch(wt){R(N,"throw",wt)}if(typeof Y=="object"&&Y&&S(M,Y))return Y}return new $(!1)}},9212:(y,j,r)=>{var v=r(6916),g=r(9670),w=r(8173);y.exports=function(k,O,C){var S,T;g(k);try{if(!(S=w(k,"return"))){if(O==="throw")throw C;return C}S=v(S,k)}catch(A){T=!0,S=A}if(O==="throw")throw C;if(T)throw S;return g(S),C}},3061:(y,j,r)=>{var v=r(3383).IteratorPrototype,g=r(30),w=r(9114),k=r(8003),O=r(7497),C=function(){return this};y.exports=function(S,T,A,R){var I=T+" Iterator";return S.prototype=g(v,{next:w(+!R,A)}),k(S,I,!1,!0),O[I]=C,S}},1656:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(1913),k=r(6530),O=r(614),C=r(3061),S=r(9518),T=r(7674),A=r(8003),R=r(8880),I=r(8052),$=r(5112),M=r(7497),B=r(3383),q=k.PROPER,F=k.CONFIGURABLE,N=B.IteratorPrototype,U=B.BUGGY_SAFARI_ITERATORS,H=$("iterator"),X="keys",Y="values",K="entries",tt=function(){return this};y.exports=function(it,st,yt,ct,Et,At,Vt){C(yt,st,ct);var lt,wt,_t,Ut=function(xt){if(xt===Et&&Bt)return Bt;if(!U&&xt in St)return St[xt];switch(xt){case X:case Y:case K:return function(){return new yt(this,xt)}}return function(){return new yt(this)}},Kt=st+" Iterator",fe=!1,St=it.prototype,jt=St[H]||St["@@iterator"]||Et&&St[Et],Bt=!U&&jt||Ut(Et),qt=st=="Array"&&St.entries||jt;if(qt&&(lt=S(qt.call(new it)))!==Object.prototype&<.next&&(w||S(lt)===N||(T?T(lt,N):O(lt[H])||I(lt,H,tt)),A(lt,Kt,!0,!0),w&&(M[Kt]=tt)),q&&Et==Y&&jt&&jt.name!==Y&&(!w&&F?R(St,"name",Y):(fe=!0,Bt=function(){return g(jt,this)})),Et)if(wt={values:Ut(Y),keys:At?Bt:Ut(X),entries:Ut(K)},Vt)for(_t in wt)(U||fe||!(_t in St))&&I(St,_t,wt[_t]);else v({target:st,proto:!0,forced:U||fe},wt);return w&&!Vt||St[H]===Bt||I(St,H,Bt,{name:Et}),M[st]=Bt,wt}},3383:(y,j,r)=>{var v,g,w,k=r(7293),O=r(614),C=r(111),S=r(30),T=r(9518),A=r(8052),R=r(5112),I=r(1913),$=R("iterator"),M=!1;[].keys&&("next"in(w=[].keys())?(g=T(T(w)))!==Object.prototype&&(v=g):M=!0),!C(v)||k(function(){var B={};return v[$].call(B)!==B})?v={}:I&&(v=S(v)),O(v[$])||A(v,$,function(){return this}),y.exports={IteratorPrototype:v,BUGGY_SAFARI_ITERATORS:M}},7497:y=>{y.exports={}},6244:(y,j,r)=>{var v=r(7466);y.exports=function(g){return v(g.length)}},6339:(y,j,r)=>{var v=r(1702),g=r(7293),w=r(614),k=r(2597),O=r(9781),C=r(6530).CONFIGURABLE,S=r(2788),T=r(9909),A=T.enforce,R=T.get,I=String,$=Object.defineProperty,M=v("".slice),B=v("".replace),q=v([].join),F=O&&!g(function(){return $(function(){},"length",{value:8}).length!==8}),N=String(String).split("String"),U=y.exports=function(H,X,Y){M(I(X),0,7)==="Symbol("&&(X="["+B(I(X),/^Symbol\(([^)]*)\)/,"$1")+"]"),Y&&Y.getter&&(X="get "+X),Y&&Y.setter&&(X="set "+X),(!k(H,"name")||C&&H.name!==X)&&(O?$(H,"name",{value:X,configurable:!0}):H.name=X),F&&Y&&k(Y,"arity")&&H.length!==Y.arity&&$(H,"length",{value:Y.arity});try{Y&&k(Y,"constructor")&&Y.constructor?O&&$(H,"prototype",{writable:!1}):H.prototype&&(H.prototype=void 0)}catch{}var K=A(H);return k(K,"source")||(K.source=q(N,typeof X=="string"?X:"")),H};Function.prototype.toString=U(function(){return w(this)&&R(this).source||S(this)},"toString")},4758:y=>{var j=Math.ceil,r=Math.floor;y.exports=Math.trunc||function(v){var g=+v;return(g>0?r:j)(g)}},5948:(y,j,r)=>{var v,g,w,k,O,C=r(7854),S=r(9974),T=r(1236).f,A=r(261).set,R=r(8572),I=r(8334),$=r(1528),M=r(1036),B=r(5268),q=C.MutationObserver||C.WebKitMutationObserver,F=C.document,N=C.process,U=C.Promise,H=T(C,"queueMicrotask"),X=H&&H.value;if(!X){var Y=new R,K=function(){var tt,it;for(B&&(tt=N.domain)&&tt.exit();it=Y.get();)try{it()}catch(st){throw Y.head&&v(),st}tt&&tt.enter()};I||B||M||!q||!F?!$&&U&&U.resolve?((k=U.resolve(void 0)).constructor=U,O=S(k.then,k),v=function(){O(K)}):B?v=function(){N.nextTick(K)}:(A=S(A,C),v=function(){A(K)}):(g=!0,w=F.createTextNode(""),new q(K).observe(w,{characterData:!0}),v=function(){w.data=g=!g}),X=function(tt){Y.head||v(),Y.add(tt)}}y.exports=X},8523:(y,j,r)=>{var v=r(9662),g=TypeError,w=function(k){var O,C;this.promise=new k(function(S,T){if(O!==void 0||C!==void 0)throw g("Bad Promise constructor");O=S,C=T}),this.resolve=v(O),this.reject=v(C)};y.exports.f=function(k){return new w(k)}},3929:(y,j,r)=>{var v=r(7850),g=TypeError;y.exports=function(w){if(v(w))throw g("The method doesn't accept regular expressions");return w}},2814:(y,j,r)=>{var v=r(7854),g=r(7293),w=r(1702),k=r(1340),O=r(3111).trim,C=r(1361),S=w("".charAt),T=v.parseFloat,A=v.Symbol,R=A&&A.iterator,I=1/T(C+"-0")!=-1/0||R&&!g(function(){T(Object(R))});y.exports=I?function($){var M=O(k($)),B=T(M);return B===0&&S(M,0)=="-"?-0:B}:T},3009:(y,j,r)=>{var v=r(7854),g=r(7293),w=r(1702),k=r(1340),O=r(3111).trim,C=r(1361),S=v.parseInt,T=v.Symbol,A=T&&T.iterator,R=/^[+-]?0x/i,I=w(R.exec),$=S(C+"08")!==8||S(C+"0x16")!==22||A&&!g(function(){S(Object(A))});y.exports=$?function(M,B){var q=O(k(M));return S(q,B>>>0||(I(R,q)?16:10))}:S},1574:(y,j,r)=>{var v=r(9781),g=r(1702),w=r(6916),k=r(7293),O=r(1956),C=r(5181),S=r(5296),T=r(7908),A=r(8361),R=Object.assign,I=Object.defineProperty,$=g([].concat);y.exports=!R||k(function(){if(v&&R({b:1},R(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},B={},q=Symbol(),F="abcdefghijklmnopqrst";return M[q]=7,F.split("").forEach(function(N){B[N]=N}),R({},M)[q]!=7||O(R({},B)).join("")!=F})?function(M,B){for(var q=T(M),F=arguments.length,N=1,U=C.f,H=S.f;F>N;)for(var X,Y=A(arguments[N++]),K=U?$(O(Y),U(Y)):O(Y),tt=K.length,it=0;tt>it;)X=K[it++],v&&!w(H,Y,X)||(q[X]=Y[X]);return q}:R},30:(y,j,r)=>{var v,g=r(9670),w=r(6048),k=r(748),O=r(3501),C=r(490),S=r(317),T=r(6200),A="prototype",R="script",I=T("IE_PROTO"),$=function(){},M=function(F){return"<"+R+">"+F+"</"+R+">"},B=function(F){F.write(M("")),F.close();var N=F.parentWindow.Object;return F=null,N},q=function(){try{v=new ActiveXObject("htmlfile")}catch{}var F,N,U;q=typeof document<"u"?document.domain&&v?B(v):(N=S("iframe"),U="java"+R+":",N.style.display="none",C.appendChild(N),N.src=String(U),(F=N.contentWindow.document).open(),F.write(M("document.F=Object")),F.close(),F.F):B(v);for(var H=k.length;H--;)delete q[A][k[H]];return q()};O[I]=!0,y.exports=Object.create||function(F,N){var U;return F!==null?($[A]=g(F),U=new $,$[A]=null,U[I]=F):U=q(),N===void 0?U:w.f(U,N)}},6048:(y,j,r)=>{var v=r(9781),g=r(3353),w=r(3070),k=r(9670),O=r(5656),C=r(1956);j.f=v&&!g?Object.defineProperties:function(S,T){k(S);for(var A,R=O(T),I=C(T),$=I.length,M=0;$>M;)w.f(S,A=I[M++],R[A]);return S}},3070:(y,j,r)=>{var v=r(9781),g=r(4664),w=r(3353),k=r(9670),O=r(4948),C=TypeError,S=Object.defineProperty,T=Object.getOwnPropertyDescriptor,A="enumerable",R="configurable",I="writable";j.f=v?w?function($,M,B){if(k($),M=O(M),k(B),typeof $=="function"&&M==="prototype"&&"value"in B&&I in B&&!B[I]){var q=T($,M);q&&q[I]&&($[M]=B.value,B={configurable:R in B?B[R]:q[R],enumerable:A in B?B[A]:q[A],writable:!1})}return S($,M,B)}:S:function($,M,B){if(k($),M=O(M),k(B),g)try{return S($,M,B)}catch{}if("get"in B||"set"in B)throw C("Accessors not supported");return"value"in B&&($[M]=B.value),$}},1236:(y,j,r)=>{var v=r(9781),g=r(6916),w=r(5296),k=r(9114),O=r(5656),C=r(4948),S=r(2597),T=r(4664),A=Object.getOwnPropertyDescriptor;j.f=v?A:function(R,I){if(R=O(R),I=C(I),T)try{return A(R,I)}catch{}if(S(R,I))return k(!g(w.f,R,I),R[I])}},1156:(y,j,r)=>{var v=r(4326),g=r(5656),w=r(8006).f,k=r(1589),O=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];y.exports.f=function(C){return O&&v(C)=="Window"?function(S){try{return w(S)}catch{return k(O)}}(C):w(g(C))}},8006:(y,j,r)=>{var v=r(6324),g=r(748).concat("length","prototype");j.f=Object.getOwnPropertyNames||function(w){return v(w,g)}},5181:(y,j)=>{j.f=Object.getOwnPropertySymbols},9518:(y,j,r)=>{var v=r(2597),g=r(614),w=r(7908),k=r(6200),O=r(8544),C=k("IE_PROTO"),S=Object,T=S.prototype;y.exports=O?S.getPrototypeOf:function(A){var R=w(A);if(v(R,C))return R[C];var I=R.constructor;return g(I)&&R instanceof I?I.prototype:R instanceof S?T:null}},7976:(y,j,r)=>{var v=r(1702);y.exports=v({}.isPrototypeOf)},6324:(y,j,r)=>{var v=r(1702),g=r(2597),w=r(5656),k=r(1318).indexOf,O=r(3501),C=v([].push);y.exports=function(S,T){var A,R=w(S),I=0,$=[];for(A in R)!g(O,A)&&g(R,A)&&C($,A);for(;T.length>I;)g(R,A=T[I++])&&(~k($,A)||C($,A));return $}},1956:(y,j,r)=>{var v=r(6324),g=r(748);y.exports=Object.keys||function(w){return v(w,g)}},5296:(y,j)=>{var r={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,g=v&&!r.call({1:2},1);j.f=g?function(w){var k=v(this,w);return!!k&&k.enumerable}:r},7674:(y,j,r)=>{var v=r(5668),g=r(9670),w=r(6077);y.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var k,O=!1,C={};try{(k=v(Object.prototype,"__proto__","set"))(C,[]),O=C instanceof Array}catch{}return function(S,T){return g(S),w(T),O?k(S,T):S.__proto__=T,S}}():void 0)},4699:(y,j,r)=>{var v=r(9781),g=r(1702),w=r(1956),k=r(5656),O=g(r(5296).f),C=g([].push),S=function(T){return function(A){for(var R,I=k(A),$=w(I),M=$.length,B=0,q=[];M>B;)R=$[B++],v&&!O(I,R)||C(q,T?[R,I[R]]:I[R]);return q}};y.exports={entries:S(!0),values:S(!1)}},288:(y,j,r)=>{var v=r(1694),g=r(648);y.exports=v?{}.toString:function(){return"[object "+g(this)+"]"}},2140:(y,j,r)=>{var v=r(6916),g=r(614),w=r(111),k=TypeError;y.exports=function(O,C){var S,T;if(C==="string"&&g(S=O.toString)&&!w(T=v(S,O))||g(S=O.valueOf)&&!w(T=v(S,O))||C!=="string"&&g(S=O.toString)&&!w(T=v(S,O)))return T;throw k("Can't convert object to primitive value")}},3887:(y,j,r)=>{var v=r(5005),g=r(1702),w=r(8006),k=r(5181),O=r(9670),C=g([].concat);y.exports=v("Reflect","ownKeys")||function(S){var T=w.f(O(S)),A=k.f;return A?C(T,A(S)):T}},857:(y,j,r)=>{var v=r(7854);y.exports=v},2534:y=>{y.exports=function(j){try{return{error:!1,value:j()}}catch(r){return{error:!0,value:r}}}},3702:(y,j,r)=>{var v=r(7854),g=r(2492),w=r(614),k=r(4705),O=r(2788),C=r(5112),S=r(7871),T=r(3823),A=r(1913),R=r(7392),I=g&&g.prototype,$=C("species"),M=!1,B=w(v.PromiseRejectionEvent),q=k("Promise",function(){var F=O(g),N=F!==String(g);if(!N&&R===66||A&&(!I.catch||!I.finally))return!0;if(!R||R<51||!/native code/.test(F)){var U=new g(function(X){X(1)}),H=function(X){X(function(){},function(){})};if((U.constructor={})[$]=H,!(M=U.then(function(){})instanceof H))return!0}return!N&&(S||T)&&!B});y.exports={CONSTRUCTOR:q,REJECTION_EVENT:B,SUBCLASSING:M}},2492:(y,j,r)=>{var v=r(7854);y.exports=v.Promise},9478:(y,j,r)=>{var v=r(9670),g=r(111),w=r(8523);y.exports=function(k,O){if(v(k),g(O)&&O.constructor===k)return O;var C=w.f(k);return(0,C.resolve)(O),C.promise}},612:(y,j,r)=>{var v=r(2492),g=r(7072),w=r(3702).CONSTRUCTOR;y.exports=w||!g(function(k){v.all(k).then(void 0,function(){})})},2626:(y,j,r)=>{var v=r(3070).f;y.exports=function(g,w,k){k in g||v(g,k,{configurable:!0,get:function(){return w[k]},set:function(O){w[k]=O}})}},8572:y=>{var j=function(){this.head=null,this.tail=null};j.prototype={add:function(r){var v={item:r,next:null},g=this.tail;g?g.next=v:this.head=v,this.tail=v},get:function(){var r=this.head;if(r)return(this.head=r.next)===null&&(this.tail=null),r.item}},y.exports=j},7651:(y,j,r)=>{var v=r(6916),g=r(9670),w=r(614),k=r(4326),O=r(2261),C=TypeError;y.exports=function(S,T){var A=S.exec;if(w(A)){var R=v(A,S,T);return R!==null&&g(R),R}if(k(S)==="RegExp")return v(O,S,T);throw C("RegExp#exec called on incompatible receiver")}},2261:(y,j,r)=>{var v,g,w=r(6916),k=r(1702),O=r(1340),C=r(7066),S=r(2999),T=r(2309),A=r(30),R=r(9909).get,I=r(9441),$=r(7168),M=T("native-string-replace",String.prototype.replace),B=RegExp.prototype.exec,q=B,F=k("".charAt),N=k("".indexOf),U=k("".replace),H=k("".slice),X=(g=/b*/g,w(B,v=/a/,"a"),w(B,g,"a"),v.lastIndex!==0||g.lastIndex!==0),Y=S.BROKEN_CARET,K=/()??/.exec("")[1]!==void 0;(X||K||Y||I||$)&&(q=function(tt){var it,st,yt,ct,Et,At,Vt,lt=this,wt=R(lt),_t=O(tt),Ut=wt.raw;if(Ut)return Ut.lastIndex=lt.lastIndex,it=w(q,Ut,_t),lt.lastIndex=Ut.lastIndex,it;var Kt=wt.groups,fe=Y&<.sticky,St=w(C,lt),jt=lt.source,Bt=0,qt=_t;if(fe&&(St=U(St,"y",""),N(St,"g")===-1&&(St+="g"),qt=H(_t,lt.lastIndex),lt.lastIndex>0&&(!lt.multiline||lt.multiline&&F(_t,lt.lastIndex-1)!==`
|
|
71
|
+
`)&&(jt="(?: "+jt+")",qt=" "+qt,Bt++),st=new RegExp("^(?:"+jt+")",St)),K&&(st=new RegExp("^"+jt+"$(?!\\s)",St)),X&&(yt=lt.lastIndex),ct=w(B,fe?st:lt,qt),fe?ct?(ct.input=H(ct.input,Bt),ct[0]=H(ct[0],Bt),ct.index=lt.lastIndex,lt.lastIndex+=ct[0].length):lt.lastIndex=0:X&&ct&&(lt.lastIndex=lt.global?ct.index+ct[0].length:yt),K&&ct&&ct.length>1&&w(M,ct[0],st,function(){for(Et=1;Et<arguments.length-2;Et++)arguments[Et]===void 0&&(ct[Et]=void 0)}),ct&&Kt)for(ct.groups=At=A(null),Et=0;Et<Kt.length;Et++)At[(Vt=Kt[Et])[0]]=ct[Vt[1]];return ct}),y.exports=q},7066:(y,j,r)=>{var v=r(9670);y.exports=function(){var g=v(this),w="";return g.hasIndices&&(w+="d"),g.global&&(w+="g"),g.ignoreCase&&(w+="i"),g.multiline&&(w+="m"),g.dotAll&&(w+="s"),g.unicode&&(w+="u"),g.unicodeSets&&(w+="v"),g.sticky&&(w+="y"),w}},4706:(y,j,r)=>{var v=r(6916),g=r(2597),w=r(7976),k=r(7066),O=RegExp.prototype;y.exports=function(C){var S=C.flags;return S!==void 0||"flags"in O||g(C,"flags")||!w(O,C)?S:v(k,C)}},2999:(y,j,r)=>{var v=r(7293),g=r(7854).RegExp,w=v(function(){var C=g("a","y");return C.lastIndex=2,C.exec("abcd")!=null}),k=w||v(function(){return!g("a","y").sticky}),O=w||v(function(){var C=g("^r","gy");return C.lastIndex=2,C.exec("str")!=null});y.exports={BROKEN_CARET:O,MISSED_STICKY:k,UNSUPPORTED_Y:w}},9441:(y,j,r)=>{var v=r(7293),g=r(7854).RegExp;y.exports=v(function(){var w=g(".","s");return!(w.dotAll&&w.exec(`
|
|
72
|
+
`)&&w.flags==="s")})},7168:(y,j,r)=>{var v=r(7293),g=r(7854).RegExp;y.exports=v(function(){var w=g("(?<a>b)","g");return w.exec("b").groups.a!=="b"||"b".replace(w,"$<a>c")!=="bc"})},4488:(y,j,r)=>{var v=r(8554),g=TypeError;y.exports=function(w){if(v(w))throw g("Can't call method on "+w);return w}},7152:(y,j,r)=>{var v,g=r(7854),w=r(2104),k=r(614),O=r(9363),C=r(8113),S=r(206),T=r(8053),A=g.Function,R=/MSIE .\./.test(C)||O&&((v=g.Bun.version.split(".")).length<3||v[0]==0&&(v[1]<3||v[1]==3&&v[2]==0));y.exports=function(I,$){var M=$?2:1;return R?function(B,q){var F=T(arguments.length,1)>M,N=k(B)?B:A(B),U=F?S(arguments,M):[],H=F?function(){w(N,this,U)}:N;return $?I(H,q):I(H)}:I}},6340:(y,j,r)=>{var v=r(5005),g=r(7045),w=r(5112),k=r(9781),O=w("species");y.exports=function(C){var S=v(C);k&&S&&!S[O]&&g(S,O,{configurable:!0,get:function(){return this}})}},8003:(y,j,r)=>{var v=r(3070).f,g=r(2597),w=r(5112)("toStringTag");y.exports=function(k,O,C){k&&!C&&(k=k.prototype),k&&!g(k,w)&&v(k,w,{configurable:!0,value:O})}},6200:(y,j,r)=>{var v=r(2309),g=r(9711),w=v("keys");y.exports=function(k){return w[k]||(w[k]=g(k))}},5465:(y,j,r)=>{var v=r(7854),g=r(3072),w="__core-js_shared__",k=v[w]||g(w,{});y.exports=k},2309:(y,j,r)=>{var v=r(1913),g=r(5465);(y.exports=function(w,k){return g[w]||(g[w]=k!==void 0?k:{})})("versions",[]).push({version:"3.29.0",mode:v?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(y,j,r)=>{var v=r(9670),g=r(9483),w=r(8554),k=r(5112)("species");y.exports=function(O,C){var S,T=v(O).constructor;return T===void 0||w(S=v(T)[k])?C:g(S)}},8710:(y,j,r)=>{var v=r(1702),g=r(9303),w=r(1340),k=r(4488),O=v("".charAt),C=v("".charCodeAt),S=v("".slice),T=function(A){return function(R,I){var $,M,B=w(k(R)),q=g(I),F=B.length;return q<0||q>=F?A?"":void 0:($=C(B,q))<55296||$>56319||q+1===F||(M=C(B,q+1))<56320||M>57343?A?O(B,q):$:A?S(B,q,q+2):M-56320+($-55296<<10)+65536}};y.exports={codeAt:T(!1),charAt:T(!0)}},6650:(y,j,r)=>{var v=r(1702),g=r(7466),w=r(1340),k=r(8415),O=r(4488),C=v(k),S=v("".slice),T=Math.ceil,A=function(R){return function(I,$,M){var B,q,F=w(O(I)),N=g($),U=F.length,H=M===void 0?" ":w(M);return N<=U||H==""?F:((q=C(H,T((B=N-U)/H.length))).length>B&&(q=S(q,0,B)),R?F+q:q+F)}};y.exports={start:A(!1),end:A(!0)}},8415:(y,j,r)=>{var v=r(9303),g=r(1340),w=r(4488),k=RangeError;y.exports=function(O){var C=g(w(this)),S="",T=v(O);if(T<0||T==1/0)throw k("Wrong number of repetitions");for(;T>0;(T>>>=1)&&(C+=C))1&T&&(S+=C);return S}},6091:(y,j,r)=>{var v=r(6530).PROPER,g=r(7293),w=r(1361);y.exports=function(k){return g(function(){return!!w[k]()||"
"[k]()!=="
"||v&&w[k].name!==k})}},3111:(y,j,r)=>{var v=r(1702),g=r(4488),w=r(1340),k=r(1361),O=v("".replace),C=RegExp("^["+k+"]+"),S=RegExp("(^|[^"+k+"])["+k+"]+$"),T=function(A){return function(R){var I=w(g(R));return 1&A&&(I=O(I,C,"")),2&A&&(I=O(I,S,"$1")),I}};y.exports={start:T(1),end:T(2),trim:T(3)}},6293:(y,j,r)=>{var v=r(7392),g=r(7293);y.exports=!!Object.getOwnPropertySymbols&&!g(function(){var w=Symbol();return!String(w)||!(Object(w)instanceof Symbol)||!Symbol.sham&&v&&v<41})},6532:(y,j,r)=>{var v=r(6916),g=r(5005),w=r(5112),k=r(8052);y.exports=function(){var O=g("Symbol"),C=O&&O.prototype,S=C&&C.valueOf,T=w("toPrimitive");C&&!C[T]&&k(C,T,function(A){return v(S,this)},{arity:1})}},2015:(y,j,r)=>{var v=r(6293);y.exports=v&&!!Symbol.for&&!!Symbol.keyFor},261:(y,j,r)=>{var v,g,w,k,O=r(7854),C=r(2104),S=r(9974),T=r(614),A=r(2597),R=r(7293),I=r(490),$=r(206),M=r(317),B=r(8053),q=r(8334),F=r(5268),N=O.setImmediate,U=O.clearImmediate,H=O.process,X=O.Dispatch,Y=O.Function,K=O.MessageChannel,tt=O.String,it=0,st={},yt="onreadystatechange";R(function(){v=O.location});var ct=function(lt){if(A(st,lt)){var wt=st[lt];delete st[lt],wt()}},Et=function(lt){return function(){ct(lt)}},At=function(lt){ct(lt.data)},Vt=function(lt){O.postMessage(tt(lt),v.protocol+"//"+v.host)};N&&U||(N=function(lt){B(arguments.length,1);var wt=T(lt)?lt:Y(lt),_t=$(arguments,1);return st[++it]=function(){C(wt,void 0,_t)},g(it),it},U=function(lt){delete st[lt]},F?g=function(lt){H.nextTick(Et(lt))}:X&&X.now?g=function(lt){X.now(Et(lt))}:K&&!q?(k=(w=new K).port2,w.port1.onmessage=At,g=S(k.postMessage,k)):O.addEventListener&&T(O.postMessage)&&!O.importScripts&&v&&v.protocol!=="file:"&&!R(Vt)?(g=Vt,O.addEventListener("message",At,!1)):g=yt in M("script")?function(lt){I.appendChild(M("script"))[yt]=function(){I.removeChild(this),ct(lt)}}:function(lt){setTimeout(Et(lt),0)}),y.exports={set:N,clear:U}},863:(y,j,r)=>{var v=r(1702);y.exports=v(1 .valueOf)},1400:(y,j,r)=>{var v=r(9303),g=Math.max,w=Math.min;y.exports=function(k,O){var C=v(k);return C<0?g(C+O,0):w(C,O)}},5656:(y,j,r)=>{var v=r(8361),g=r(4488);y.exports=function(w){return v(g(w))}},9303:(y,j,r)=>{var v=r(4758);y.exports=function(g){var w=+g;return w!=w||w===0?0:v(w)}},7466:(y,j,r)=>{var v=r(9303),g=Math.min;y.exports=function(w){return w>0?g(v(w),9007199254740991):0}},7908:(y,j,r)=>{var v=r(4488),g=Object;y.exports=function(w){return g(v(w))}},7593:(y,j,r)=>{var v=r(6916),g=r(111),w=r(2190),k=r(8173),O=r(2140),C=r(5112),S=TypeError,T=C("toPrimitive");y.exports=function(A,R){if(!g(A)||w(A))return A;var I,$=k(A,T);if($){if(R===void 0&&(R="default"),I=v($,A,R),!g(I)||w(I))return I;throw S("Can't convert object to primitive value")}return R===void 0&&(R="number"),O(A,R)}},4948:(y,j,r)=>{var v=r(7593),g=r(2190);y.exports=function(w){var k=v(w,"string");return g(k)?k:k+""}},1694:(y,j,r)=>{var v={};v[r(5112)("toStringTag")]="z",y.exports=String(v)==="[object z]"},1340:(y,j,r)=>{var v=r(648),g=String;y.exports=function(w){if(v(w)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return g(w)}},6330:y=>{var j=String;y.exports=function(r){try{return j(r)}catch{return"Object"}}},9711:(y,j,r)=>{var v=r(1702),g=0,w=Math.random(),k=v(1 .toString);y.exports=function(O){return"Symbol("+(O===void 0?"":O)+")_"+k(++g+w,36)}},3307:(y,j,r)=>{var v=r(6293);y.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},3353:(y,j,r)=>{var v=r(9781),g=r(7293);y.exports=v&&g(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},8053:y=>{var j=TypeError;y.exports=function(r,v){if(r<v)throw j("Not enough arguments");return r}},4811:(y,j,r)=>{var v=r(7854),g=r(614),w=v.WeakMap;y.exports=g(w)&&/native code/.test(String(w))},6800:(y,j,r)=>{var v=r(857),g=r(2597),w=r(6061),k=r(3070).f;y.exports=function(O){var C=v.Symbol||(v.Symbol={});g(C,O)||k(C,O,{value:w.f(O)})}},6061:(y,j,r)=>{var v=r(5112);j.f=v},5112:(y,j,r)=>{var v=r(7854),g=r(2309),w=r(2597),k=r(9711),O=r(6293),C=r(3307),S=v.Symbol,T=g("wks"),A=C?S.for||S:S&&S.withoutSetter||k;y.exports=function(R){return w(T,R)||(T[R]=O&&w(S,R)?S[R]:A("Symbol."+R)),T[R]}},1361:y=>{y.exports=`
|
|
73
|
+
\v\f\r \u2028\u2029\uFEFF`},2222:(y,j,r)=>{var v=r(2109),g=r(7293),w=r(3157),k=r(111),O=r(7908),C=r(6244),S=r(7207),T=r(6135),A=r(5417),R=r(1194),I=r(5112),$=r(7392),M=I("isConcatSpreadable"),B=$>=51||!g(function(){var F=[];return F[M]=!1,F.concat()[0]!==F}),q=function(F){if(!k(F))return!1;var N=F[M];return N!==void 0?!!N:w(F)};v({target:"Array",proto:!0,arity:1,forced:!B||!R("concat")},{concat:function(F){var N,U,H,X,Y,K=O(this),tt=A(K,0),it=0;for(N=-1,H=arguments.length;N<H;N++)if(q(Y=N===-1?K:arguments[N]))for(X=C(Y),S(it+X),U=0;U<X;U++,it++)U in Y&&T(tt,it,Y[U]);else S(it+1),T(tt,it++,Y);return tt.length=it,tt}})},6541:(y,j,r)=>{var v=r(2109),g=r(2092).every;v({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},7327:(y,j,r)=>{var v=r(2109),g=r(2092).filter;v({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},9826:(y,j,r)=>{var v=r(2109),g=r(2092).find,w=r(1223),k="find",O=!0;k in[]&&Array(1)[k](function(){O=!1}),v({target:"Array",proto:!0,forced:O},{find:function(C){return g(this,C,arguments.length>1?arguments[1]:void 0)}}),w(k)},9554:(y,j,r)=>{var v=r(2109),g=r(8533);v({target:"Array",proto:!0,forced:[].forEach!=g},{forEach:g})},1038:(y,j,r)=>{var v=r(2109),g=r(8457);v({target:"Array",stat:!0,forced:!r(7072)(function(w){Array.from(w)})},{from:g})},6699:(y,j,r)=>{var v=r(2109),g=r(1318).includes,w=r(7293),k=r(1223);v({target:"Array",proto:!0,forced:w(function(){return!Array(1).includes()})},{includes:function(O){return g(this,O,arguments.length>1?arguments[1]:void 0)}}),k("includes")},2772:(y,j,r)=>{var v=r(2109),g=r(1470),w=r(1318).indexOf,k=r(9341),O=g([].indexOf),C=!!O&&1/O([1],1,-0)<0;v({target:"Array",proto:!0,forced:C||!k("indexOf")},{indexOf:function(S){var T=arguments.length>1?arguments[1]:void 0;return C?O(this,S,T)||0:w(this,S,T)}})},9753:(y,j,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(y,j,r)=>{var v=r(5656),g=r(1223),w=r(7497),k=r(9909),O=r(3070).f,C=r(1656),S=r(6178),T=r(1913),A=r(9781),R="Array Iterator",I=k.set,$=k.getterFor(R);y.exports=C(Array,"Array",function(B,q){I(this,{type:R,target:v(B),index:0,kind:q})},function(){var B=$(this),q=B.target,F=B.kind,N=B.index++;return!q||N>=q.length?(B.target=void 0,S(void 0,!0)):S(F=="keys"?N:F=="values"?q[N]:[N,q[N]],!1)},"values");var M=w.Arguments=w.Array;if(g("keys"),g("values"),g("entries"),!T&&A&&M.name!=="values")try{O(M,"name",{value:"values"})}catch{}},9600:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(8361),k=r(5656),O=r(9341),C=g([].join);v({target:"Array",proto:!0,forced:w!=Object||!O("join",",")},{join:function(S){return C(k(this),S===void 0?",":S)}})},1249:(y,j,r)=>{var v=r(2109),g=r(2092).map;v({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},5827:(y,j,r)=>{var v=r(2109),g=r(3671).left,w=r(9341),k=r(7392);v({target:"Array",proto:!0,forced:!r(5268)&&k>79&&k<83||!w("reduce")},{reduce:function(O){var C=arguments.length;return g(this,O,C,C>1?arguments[1]:void 0)}})},5069:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(3157),k=g([].reverse),O=[1,2];v({target:"Array",proto:!0,forced:String(O)===String(O.reverse())},{reverse:function(){return w(this)&&(this.length=this.length),k(this)}})},7042:(y,j,r)=>{var v=r(2109),g=r(3157),w=r(4411),k=r(111),O=r(1400),C=r(6244),S=r(5656),T=r(6135),A=r(5112),R=r(1194),I=r(206),$=R("slice"),M=A("species"),B=Array,q=Math.max;v({target:"Array",proto:!0,forced:!$},{slice:function(F,N){var U,H,X,Y=S(this),K=C(Y),tt=O(F,K),it=O(N===void 0?K:N,K);if(g(Y)&&(U=Y.constructor,(w(U)&&(U===B||g(U.prototype))||k(U)&&(U=U[M])===null)&&(U=void 0),U===B||U===void 0))return I(Y,tt,it);for(H=new(U===void 0?B:U)(q(it-tt,0)),X=0;tt<it;tt++,X++)tt in Y&&T(H,X,Y[tt]);return H.length=X,H}})},5212:(y,j,r)=>{var v=r(2109),g=r(2092).some;v({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},2707:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(9662),k=r(7908),O=r(6244),C=r(5117),S=r(1340),T=r(7293),A=r(4362),R=r(9341),I=r(8886),$=r(256),M=r(7392),B=r(8008),q=[],F=g(q.sort),N=g(q.push),U=T(function(){q.sort(void 0)}),H=T(function(){q.sort(null)}),X=R("sort"),Y=!T(function(){if(M)return M<70;if(!(I&&I>3)){if($)return!0;if(B)return B<603;var K,tt,it,st,yt="";for(K=65;K<76;K++){switch(tt=String.fromCharCode(K),K){case 66:case 69:case 70:case 72:it=3;break;case 68:case 71:it=4;break;default:it=2}for(st=0;st<47;st++)q.push({k:tt+st,v:it})}for(q.sort(function(ct,Et){return Et.v-ct.v}),st=0;st<q.length;st++)tt=q[st].k.charAt(0),yt.charAt(yt.length-1)!==tt&&(yt+=tt);return yt!=="DGBEFHACIJK"}});v({target:"Array",proto:!0,forced:U||!H||!X||!Y},{sort:function(K){K!==void 0&&w(K);var tt=k(this);if(Y)return K===void 0?F(tt):F(tt,K);var it,st,yt=[],ct=O(tt);for(st=0;st<ct;st++)st in tt&&N(yt,tt[st]);for(A(yt,function(Et){return function(At,Vt){return Vt===void 0?-1:At===void 0?1:Et!==void 0?+Et(At,Vt)||0:S(At)>S(Vt)?1:-1}}(K)),it=O(yt),st=0;st<it;)tt[st]=yt[st++];for(;st<ct;)C(tt,st++);return tt}})},561:(y,j,r)=>{var v=r(2109),g=r(7908),w=r(1400),k=r(9303),O=r(6244),C=r(3658),S=r(7207),T=r(5417),A=r(6135),R=r(5117),I=r(1194)("splice"),$=Math.max,M=Math.min;v({target:"Array",proto:!0,forced:!I},{splice:function(B,q){var F,N,U,H,X,Y,K=g(this),tt=O(K),it=w(B,tt),st=arguments.length;for(st===0?F=N=0:st===1?(F=0,N=tt-it):(F=st-2,N=M($(k(q),0),tt-it)),S(tt+F-N),U=T(K,N),H=0;H<N;H++)(X=it+H)in K&&A(U,H,K[X]);if(U.length=N,F<N){for(H=it;H<tt-N;H++)Y=H+F,(X=H+N)in K?K[Y]=K[X]:R(K,Y);for(H=tt;H>tt-N+F;H--)R(K,H-1)}else if(F>N)for(H=tt-N;H>it;H--)Y=H+F-1,(X=H+N-1)in K?K[Y]=K[X]:R(K,Y);for(H=0;H<F;H++)K[H+it]=arguments[H+2];return C(K,tt-N+F),U}})},3843:(y,j,r)=>{var v=r(2109),g=r(1702),w=Date,k=g(w.prototype.getTime);v({target:"Date",stat:!0},{now:function(){return k(new w)}})},8733:(y,j,r)=>{var v=r(2109),g=r(5573);v({target:"Date",proto:!0,forced:Date.prototype.toISOString!==g},{toISOString:g})},6078:(y,j,r)=>{var v=r(2597),g=r(8052),w=r(8709),k=r(5112)("toPrimitive"),O=Date.prototype;v(O,k)||g(O,k,w)},3710:(y,j,r)=>{var v=r(1702),g=r(8052),w=Date.prototype,k="Invalid Date",O="toString",C=v(w[O]),S=v(w.getTime);String(new Date(NaN))!=k&&g(w,O,function(){var T=S(this);return T==T?C(this):k})},4812:(y,j,r)=>{var v=r(2109),g=r(7065);v({target:"Function",proto:!0,forced:Function.bind!==g},{bind:g})},8309:(y,j,r)=>{var v=r(9781),g=r(6530).EXISTS,w=r(1702),k=r(7045),O=Function.prototype,C=w(O.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=w(S.exec);v&&!g&&k(O,"name",{configurable:!0,get:function(){try{return T(S,C(this))[1]}catch{return""}}})},8862:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(2104),k=r(6916),O=r(1702),C=r(7293),S=r(614),T=r(2190),A=r(206),R=r(8044),I=r(6293),$=String,M=g("JSON","stringify"),B=O(/./.exec),q=O("".charAt),F=O("".charCodeAt),N=O("".replace),U=O(1 .toString),H=/[\uD800-\uDFFF]/g,X=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,K=!I||C(function(){var yt=g("Symbol")();return M([yt])!="[null]"||M({a:yt})!="{}"||M(Object(yt))!="{}"}),tt=C(function(){return M("\uDF06\uD834")!=='"\\udf06\\ud834"'||M("\uDEAD")!=='"\\udead"'}),it=function(yt,ct){var Et=A(arguments),At=R(ct);if(S(At)||yt!==void 0&&!T(yt))return Et[1]=function(Vt,lt){if(S(At)&&(lt=k(At,this,$(Vt),lt)),!T(lt))return lt},w(M,null,Et)},st=function(yt,ct,Et){var At=q(Et,ct-1),Vt=q(Et,ct+1);return B(X,yt)&&!B(Y,Vt)||B(Y,yt)&&!B(X,At)?"\\u"+U(F(yt,0),16):yt};M&&v({target:"JSON",stat:!0,arity:3,forced:K||tt},{stringify:function(yt,ct,Et){var At=A(arguments),Vt=w(K?it:M,null,At);return tt&&typeof Vt=="string"?N(Vt,H,st):Vt}})},3706:(y,j,r)=>{var v=r(7854);r(8003)(v.JSON,"JSON",!0)},2703:(y,j,r)=>{r(8003)(Math,"Math",!0)},9653:(y,j,r)=>{var v=r(2109),g=r(1913),w=r(9781),k=r(7854),O=r(857),C=r(1702),S=r(4705),T=r(2597),A=r(9587),R=r(7976),I=r(2190),$=r(7593),M=r(7293),B=r(8006).f,q=r(1236).f,F=r(3070).f,N=r(863),U=r(3111).trim,H="Number",X=k[H],Y=O[H],K=X.prototype,tt=k.TypeError,it=C("".slice),st=C("".charCodeAt),yt=function(wt){var _t=$(wt,"number");return typeof _t=="bigint"?_t:ct(_t)},ct=function(wt){var _t,Ut,Kt,fe,St,jt,Bt,qt,xt=$(wt,"number");if(I(xt))throw tt("Cannot convert a Symbol value to a number");if(typeof xt=="string"&&xt.length>2){if(xt=U(xt),(_t=st(xt,0))===43||_t===45){if((Ut=st(xt,2))===88||Ut===120)return NaN}else if(_t===48){switch(st(xt,1)){case 66:case 98:Kt=2,fe=49;break;case 79:case 111:Kt=8,fe=55;break;default:return+xt}for(jt=(St=it(xt,2)).length,Bt=0;Bt<jt;Bt++)if((qt=st(St,Bt))<48||qt>fe)return NaN;return parseInt(St,Kt)}}return+xt},Et=S(H,!X(" 0o1")||!X("0b1")||X("+0x1")),At=function(wt){return R(K,wt)&&M(function(){N(wt)})},Vt=function(wt){var _t=arguments.length<1?0:X(yt(wt));return At(this)?A(Object(_t),this,Vt):_t};Vt.prototype=K,Et&&!g&&(K.constructor=Vt),v({global:!0,constructor:!0,wrap:!0,forced:Et},{Number:Vt});var lt=function(wt,_t){for(var Ut,Kt=w?B(_t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),fe=0;Kt.length>fe;fe++)T(_t,Ut=Kt[fe])&&!T(wt,Ut)&&F(wt,Ut,q(_t,Ut))};g&&Y&<(O[H],Y),(Et||g)&<(O[H],X)},6977:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(9303),k=r(863),O=r(8415),C=r(7293),S=RangeError,T=String,A=Math.floor,R=g(O),I=g("".slice),$=g(1 .toFixed),M=function(N,U,H){return U===0?H:U%2==1?M(N,U-1,H*N):M(N*N,U/2,H)},B=function(N,U,H){for(var X=-1,Y=H;++X<6;)Y+=U*N[X],N[X]=Y%1e7,Y=A(Y/1e7)},q=function(N,U){for(var H=6,X=0;--H>=0;)X+=N[H],N[H]=A(X/U),X=X%U*1e7},F=function(N){for(var U=6,H="";--U>=0;)if(H!==""||U===0||N[U]!==0){var X=T(N[U]);H=H===""?X:H+R("0",7-X.length)+X}return H};v({target:"Number",proto:!0,forced:C(function(){return $(8e-5,3)!=="0.000"||$(.9,0)!=="1"||$(1.255,2)!=="1.25"||$(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!C(function(){$({})})},{toFixed:function(N){var U,H,X,Y,K=k(this),tt=w(N),it=[0,0,0,0,0,0],st="",yt="0";if(tt<0||tt>20)throw S("Incorrect fraction digits");if(K!=K)return"NaN";if(K<=-1e21||K>=1e21)return T(K);if(K<0&&(st="-",K=-K),K>1e-21)if(H=(U=function(ct){for(var Et=0,At=ct;At>=4096;)Et+=12,At/=4096;for(;At>=2;)Et+=1,At/=2;return Et}(K*M(2,69,1))-69)<0?K*M(2,-U,1):K/M(2,U,1),H*=4503599627370496,(U=52-U)>0){for(B(it,0,H),X=tt;X>=7;)B(it,1e7,0),X-=7;for(B(it,M(10,X,1),0),X=U-1;X>=23;)q(it,8388608),X-=23;q(it,1<<X),B(it,1,1),q(it,2),yt=F(it)}else B(it,0,H),B(it,1<<-U,0),yt=F(it)+R("0",tt);return tt>0?st+((Y=yt.length)<=tt?"0."+R("0",tt-Y)+yt:I(yt,0,Y-tt)+"."+I(yt,Y-tt)):st+yt}})},9601:(y,j,r)=>{var v=r(2109),g=r(1574);v({target:"Object",stat:!0,arity:2,forced:Object.assign!==g},{assign:g})},8011:(y,j,r)=>{r(2109)({target:"Object",stat:!0,sham:!r(9781)},{create:r(30)})},3321:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(6048).f;v({target:"Object",stat:!0,forced:Object.defineProperties!==w,sham:!g},{defineProperties:w})},9070:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(3070).f;v({target:"Object",stat:!0,forced:Object.defineProperty!==w,sham:!g},{defineProperty:w})},9720:(y,j,r)=>{var v=r(2109),g=r(4699).entries;v({target:"Object",stat:!0},{entries:function(w){return g(w)}})},5003:(y,j,r)=>{var v=r(2109),g=r(7293),w=r(5656),k=r(1236).f,O=r(9781);v({target:"Object",stat:!0,forced:!O||g(function(){k(1)}),sham:!O},{getOwnPropertyDescriptor:function(C,S){return k(w(C),S)}})},9337:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(3887),k=r(5656),O=r(1236),C=r(6135);v({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(S){for(var T,A,R=k(S),I=O.f,$=w(R),M={},B=0;$.length>B;)(A=I(R,T=$[B++]))!==void 0&&C(M,T,A);return M}})},9660:(y,j,r)=>{var v=r(2109),g=r(6293),w=r(7293),k=r(5181),O=r(7908);v({target:"Object",stat:!0,forced:!g||w(function(){k.f(1)})},{getOwnPropertySymbols:function(C){var S=k.f;return S?S(O(C)):[]}})},489:(y,j,r)=>{var v=r(2109),g=r(7293),w=r(7908),k=r(9518),O=r(8544);v({target:"Object",stat:!0,forced:g(function(){k(1)}),sham:!O},{getPrototypeOf:function(C){return k(w(C))}})},7941:(y,j,r)=>{var v=r(2109),g=r(7908),w=r(1956);v({target:"Object",stat:!0,forced:r(7293)(function(){w(1)})},{keys:function(k){return w(g(k))}})},8304:(y,j,r)=>{r(2109)({target:"Object",stat:!0},{setPrototypeOf:r(7674)})},1539:(y,j,r)=>{var v=r(1694),g=r(8052),w=r(288);v||g(Object.prototype,"toString",w,{unsafe:!0})},6833:(y,j,r)=>{var v=r(2109),g=r(4699).values;v({target:"Object",stat:!0},{values:function(w){return g(w)}})},4678:(y,j,r)=>{var v=r(2109),g=r(2814);v({global:!0,forced:parseFloat!=g},{parseFloat:g})},1058:(y,j,r)=>{var v=r(2109),g=r(3009);v({global:!0,forced:parseInt!=g},{parseInt:g})},821:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(9662),k=r(8523),O=r(2534),C=r(408);v({target:"Promise",stat:!0,forced:r(612)},{all:function(S){var T=this,A=k.f(T),R=A.resolve,I=A.reject,$=O(function(){var M=w(T.resolve),B=[],q=0,F=1;C(S,function(N){var U=q++,H=!1;F++,g(M,T,N).then(function(X){H||(H=!0,B[U]=X,--F||R(B))},I)}),--F||R(B)});return $.error&&I($.value),A.promise}})},4164:(y,j,r)=>{var v=r(2109),g=r(1913),w=r(3702).CONSTRUCTOR,k=r(2492),O=r(5005),C=r(614),S=r(8052),T=k&&k.prototype;if(v({target:"Promise",proto:!0,forced:w,real:!0},{catch:function(R){return this.then(void 0,R)}}),!g&&C(k)){var A=O("Promise").prototype.catch;T.catch!==A&&S(T,"catch",A,{unsafe:!0})}},3401:(y,j,r)=>{var v,g,w,k=r(2109),O=r(1913),C=r(5268),S=r(7854),T=r(6916),A=r(8052),R=r(7674),I=r(8003),$=r(6340),M=r(9662),B=r(614),q=r(111),F=r(5787),N=r(6707),U=r(261).set,H=r(5948),X=r(842),Y=r(2534),K=r(8572),tt=r(9909),it=r(2492),st=r(3702),yt=r(8523),ct="Promise",Et=st.CONSTRUCTOR,At=st.REJECTION_EVENT,Vt=st.SUBCLASSING,lt=tt.getterFor(ct),wt=tt.set,_t=it&&it.prototype,Ut=it,Kt=_t,fe=S.TypeError,St=S.document,jt=S.process,Bt=yt.f,qt=Bt,xt=!!(St&&St.createEvent&&S.dispatchEvent),lr="unhandledrejection",de=function(ot){var bt;return!(!q(ot)||!B(bt=ot.then))&&bt},Ne=function(ot,bt){var Ht,Mt,Qt,Ze=bt.value,Ke=bt.state==1,xr=Ke?ot.ok:ot.fail,Qe=ot.resolve,fr=ot.reject,Se=ot.domain;try{xr?(Ke||(bt.rejection===2&&Le(bt),bt.rejection=1),xr===!0?Ht=Ze:(Se&&Se.enter(),Ht=xr(Ze),Se&&(Se.exit(),Qt=!0)),Ht===ot.promise?fr(fe("Promise-chain cycle")):(Mt=de(Ht))?T(Mt,Ht,Qe,fr):Qe(Ht)):fr(Ze)}catch(Dn){Se&&!Qt&&Se.exit(),fr(Dn)}},ge=function(ot,bt){ot.notified||(ot.notified=!0,H(function(){for(var Ht,Mt=ot.reactions;Ht=Mt.get();)Ne(Ht,ot);ot.notified=!1,bt&&!ot.rejection&&Ae(ot)}))},cr=function(ot,bt,Ht){var Mt,Qt;xt?((Mt=St.createEvent("Event")).promise=bt,Mt.reason=Ht,Mt.initEvent(ot,!1,!0),S.dispatchEvent(Mt)):Mt={promise:bt,reason:Ht},!At&&(Qt=S["on"+ot])?Qt(Mt):ot===lr&&X("Unhandled promise rejection",Ht)},Ae=function(ot){T(U,S,function(){var bt,Ht=ot.facade,Mt=ot.value;if(dr(ot)&&(bt=Y(function(){C?jt.emit("unhandledRejection",Mt,Ht):cr(lr,Ht,Mt)}),ot.rejection=C||dr(ot)?2:1,bt.error))throw bt.value})},dr=function(ot){return ot.rejection!==1&&!ot.parent},Le=function(ot){T(U,S,function(){var bt=ot.facade;C?jt.emit("rejectionHandled",bt):cr("rejectionhandled",bt,ot.value)})},We=function(ot,bt,Ht){return function(Mt){ot(bt,Mt,Ht)}},Ce=function(ot,bt,Ht){ot.done||(ot.done=!0,Ht&&(ot=Ht),ot.value=bt,ot.state=2,ge(ot,!0))},pr=function(ot,bt,Ht){if(!ot.done){ot.done=!0,Ht&&(ot=Ht);try{if(ot.facade===bt)throw fe("Promise can't be resolved itself");var Mt=de(bt);Mt?H(function(){var Qt={done:!1};try{T(Mt,bt,We(pr,Qt,ot),We(Ce,Qt,ot))}catch(Ze){Ce(Qt,Ze,ot)}}):(ot.value=bt,ot.state=1,ge(ot,!1))}catch(Qt){Ce({done:!1},Qt,ot)}}};if(Et&&(Kt=(Ut=function(ot){F(this,Kt),M(ot),T(v,this);var bt=lt(this);try{ot(We(pr,bt),We(Ce,bt))}catch(Ht){Ce(bt,Ht)}}).prototype,(v=function(ot){wt(this,{type:ct,done:!1,notified:!1,parent:!1,reactions:new K,rejection:!1,state:0,value:void 0})}).prototype=A(Kt,"then",function(ot,bt){var Ht=lt(this),Mt=Bt(N(this,Ut));return Ht.parent=!0,Mt.ok=!B(ot)||ot,Mt.fail=B(bt)&&bt,Mt.domain=C?jt.domain:void 0,Ht.state==0?Ht.reactions.add(Mt):H(function(){Ne(Mt,Ht)}),Mt.promise}),g=function(){var ot=new v,bt=lt(ot);this.promise=ot,this.resolve=We(pr,bt),this.reject=We(Ce,bt)},yt.f=Bt=function(ot){return ot===Ut||ot===void 0?new g(ot):qt(ot)},!O&&B(it)&&_t!==Object.prototype)){w=_t.then,Vt||A(_t,"then",function(ot,bt){var Ht=this;return new Ut(function(Mt,Qt){T(w,Ht,Mt,Qt)}).then(ot,bt)},{unsafe:!0});try{delete _t.constructor}catch{}R&&R(_t,Kt)}k({global:!0,constructor:!0,wrap:!0,forced:Et},{Promise:Ut}),I(Ut,ct,!1,!0),$(ct)},8674:(y,j,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(9662),k=r(8523),O=r(2534),C=r(408);v({target:"Promise",stat:!0,forced:r(612)},{race:function(S){var T=this,A=k.f(T),R=A.reject,I=O(function(){var $=w(T.resolve);C(S,function(M){g($,T,M).then(A.resolve,R)})});return I.error&&R(I.value),A.promise}})},683:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(8523);v({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(k){var O=w.f(this);return g(O.reject,void 0,k),O.promise}})},6294:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(1913),k=r(2492),O=r(3702).CONSTRUCTOR,C=r(9478),S=g("Promise"),T=w&&!O;v({target:"Promise",stat:!0,forced:w||O},{resolve:function(A){return C(T&&this===S?k:this,A)}})},2419:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(2104),k=r(7065),O=r(9483),C=r(9670),S=r(111),T=r(30),A=r(7293),R=g("Reflect","construct"),I=Object.prototype,$=[].push,M=A(function(){function F(){}return!(R(function(){},[],F)instanceof F)}),B=!A(function(){R(function(){})}),q=M||B;v({target:"Reflect",stat:!0,forced:q,sham:q},{construct:function(F,N){O(F),C(N);var U=arguments.length<3?F:O(arguments[2]);if(B&&!M)return R(F,N,U);if(F==U){switch(N.length){case 0:return new F;case 1:return new F(N[0]);case 2:return new F(N[0],N[1]);case 3:return new F(N[0],N[1],N[2]);case 4:return new F(N[0],N[1],N[2],N[3])}var H=[null];return w($,H,N),new(w(k,F,H))}var X=U.prototype,Y=T(S(X)?X:I),K=w(F,Y,N);return S(K)?K:Y}})},4819:(y,j,r)=>{var v=r(2109),g=r(6916),w=r(111),k=r(9670),O=r(5032),C=r(1236),S=r(9518);v({target:"Reflect",stat:!0},{get:function T(A,R){var I,$,M=arguments.length<3?A:arguments[2];return k(A)===M?A[R]:(I=C.f(A,R))?O(I)?I.value:I.get===void 0?void 0:g(I.get,M):w($=S(A))?T($,R,M):void 0}})},4603:(y,j,r)=>{var v=r(9781),g=r(7854),w=r(1702),k=r(4705),O=r(9587),C=r(8880),S=r(8006).f,T=r(7976),A=r(7850),R=r(1340),I=r(4706),$=r(2999),M=r(2626),B=r(8052),q=r(7293),F=r(2597),N=r(9909).enforce,U=r(6340),H=r(5112),X=r(9441),Y=r(7168),K=H("match"),tt=g.RegExp,it=tt.prototype,st=g.SyntaxError,yt=w(it.exec),ct=w("".charAt),Et=w("".replace),At=w("".indexOf),Vt=w("".slice),lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,wt=/a/g,_t=/a/g,Ut=new tt(wt)!==wt,Kt=$.MISSED_STICKY,fe=$.UNSUPPORTED_Y;if(k("RegExp",v&&(!Ut||Kt||X||Y||q(function(){return _t[K]=!1,tt(wt)!=wt||tt(_t)==_t||tt(wt,"i")!="/a/i"})))){for(var St=function(qt,xt){var lr,de,Ne,ge,cr,Ae,dr=T(it,this),Le=A(qt),We=xt===void 0,Ce=[],pr=qt;if(!dr&&Le&&We&&qt.constructor===St)return qt;if((Le||T(it,qt))&&(qt=qt.source,We&&(xt=I(pr))),qt=qt===void 0?"":R(qt),xt=xt===void 0?"":R(xt),pr=qt,X&&"dotAll"in wt&&(de=!!xt&&At(xt,"s")>-1)&&(xt=Et(xt,/s/g,"")),lr=xt,Kt&&"sticky"in wt&&(Ne=!!xt&&At(xt,"y")>-1)&&fe&&(xt=Et(xt,/y/g,"")),Y&&(ge=function(ot){for(var bt,Ht=ot.length,Mt=0,Qt="",Ze=[],Ke={},xr=!1,Qe=!1,fr=0,Se="";Mt<=Ht;Mt++){if((bt=ct(ot,Mt))==="\\")bt+=ct(ot,++Mt);else if(bt==="]")xr=!1;else if(!xr)switch(!0){case bt==="[":xr=!0;break;case bt==="(":yt(lt,Vt(ot,Mt+1))&&(Mt+=2,Qe=!0),Qt+=bt,fr++;continue;case(bt===">"&&Qe):if(Se===""||F(Ke,Se))throw new st("Invalid capture group name");Ke[Se]=!0,Ze[Ze.length]=[Se,fr],Qe=!1,Se="";continue}Qe?Se+=bt:Qt+=bt}return[Qt,Ze]}(qt),qt=ge[0],Ce=ge[1]),cr=O(tt(qt,xt),dr?this:it,St),(de||Ne||Ce.length)&&(Ae=N(cr),de&&(Ae.dotAll=!0,Ae.raw=St(function(ot){for(var bt,Ht=ot.length,Mt=0,Qt="",Ze=!1;Mt<=Ht;Mt++)(bt=ct(ot,Mt))!=="\\"?Ze||bt!=="."?(bt==="["?Ze=!0:bt==="]"&&(Ze=!1),Qt+=bt):Qt+="[\\s\\S]":Qt+=bt+ct(ot,++Mt);return Qt}(qt),lr)),Ne&&(Ae.sticky=!0),Ce.length&&(Ae.groups=Ce)),qt!==pr)try{C(cr,"source",pr===""?"(?:)":pr)}catch{}return cr},jt=S(tt),Bt=0;jt.length>Bt;)M(St,tt,jt[Bt++]);it.constructor=St,St.prototype=it,B(g,"RegExp",St,{constructor:!0})}U("RegExp")},4916:(y,j,r)=>{var v=r(2109),g=r(2261);v({target:"RegExp",proto:!0,forced:/./.exec!==g},{exec:g})},9714:(y,j,r)=>{var v=r(6530).PROPER,g=r(8052),w=r(9670),k=r(1340),O=r(7293),C=r(4706),S="toString",T=RegExp.prototype[S],A=O(function(){return T.call({source:"a",flags:"b"})!="/a/b"}),R=v&&T.name!=S;(A||R)&&g(RegExp.prototype,S,function(){var I=w(this);return"/"+k(I.source)+"/"+k(C(I))},{unsafe:!0})},2023:(y,j,r)=>{var v=r(2109),g=r(1702),w=r(3929),k=r(4488),O=r(1340),C=r(4964),S=g("".indexOf);v({target:"String",proto:!0,forced:!C("includes")},{includes:function(T){return!!~S(O(k(this)),O(w(T)),arguments.length>1?arguments[1]:void 0)}})},8783:(y,j,r)=>{var v=r(8710).charAt,g=r(1340),w=r(9909),k=r(1656),O=r(6178),C="String Iterator",S=w.set,T=w.getterFor(C);k(String,"String",function(A){S(this,{type:C,string:g(A),index:0})},function(){var A,R=T(this),I=R.string,$=R.index;return $>=I.length?O(void 0,!0):(A=v(I,$),R.index+=A.length,O(A,!1))})},4723:(y,j,r)=>{var v=r(6916),g=r(7007),w=r(9670),k=r(8554),O=r(7466),C=r(1340),S=r(4488),T=r(8173),A=r(1530),R=r(7651);g("match",function(I,$,M){return[function(B){var q=S(this),F=k(B)?void 0:T(B,I);return F?v(F,B,q):new RegExp(B)[I](C(q))},function(B){var q=w(this),F=C(B),N=M($,q,F);if(N.done)return N.value;if(!q.global)return R(q,F);var U=q.unicode;q.lastIndex=0;for(var H,X=[],Y=0;(H=R(q,F))!==null;){var K=C(H[0]);X[Y]=K,K===""&&(q.lastIndex=A(F,O(q.lastIndex),U)),Y++}return Y===0?null:X}]})},5306:(y,j,r)=>{var v=r(2104),g=r(6916),w=r(1702),k=r(7007),O=r(7293),C=r(9670),S=r(614),T=r(8554),A=r(9303),R=r(7466),I=r(1340),$=r(4488),M=r(1530),B=r(8173),q=r(647),F=r(7651),N=r(5112)("replace"),U=Math.max,H=Math.min,X=w([].concat),Y=w([].push),K=w("".indexOf),tt=w("".slice),it="a".replace(/./,"$0")==="$0",st=!!/./[N]&&/./[N]("a","$0")==="";k("replace",function(yt,ct,Et){var At=st?"$":"$0";return[function(Vt,lt){var wt=$(this),_t=T(Vt)?void 0:B(Vt,N);return _t?g(_t,Vt,wt,lt):g(ct,I(wt),Vt,lt)},function(Vt,lt){var wt=C(this),_t=I(Vt);if(typeof lt=="string"&&K(lt,At)===-1&&K(lt,"$<")===-1){var Ut=Et(ct,wt,_t,lt);if(Ut.done)return Ut.value}var Kt=S(lt);Kt||(lt=I(lt));var fe=wt.global;if(fe){var St=wt.unicode;wt.lastIndex=0}for(var jt=[];;){var Bt=F(wt,_t);if(Bt===null||(Y(jt,Bt),!fe))break;I(Bt[0])===""&&(wt.lastIndex=M(_t,R(wt.lastIndex),St))}for(var qt,xt="",lr=0,de=0;de<jt.length;de++){for(var Ne=I((Bt=jt[de])[0]),ge=U(H(A(Bt.index),_t.length),0),cr=[],Ae=1;Ae<Bt.length;Ae++)Y(cr,(qt=Bt[Ae])===void 0?qt:String(qt));var dr=Bt.groups;if(Kt){var Le=X([Ne],cr,ge,_t);dr!==void 0&&Y(Le,dr);var We=I(v(lt,void 0,Le))}else We=q(Ne,_t,ge,cr,dr,lt);ge>=lr&&(xt+=tt(_t,lr,ge)+We,lr=ge+Ne.length)}return xt+tt(_t,lr)}]},!!O(function(){var yt=/./;return yt.exec=function(){var ct=[];return ct.groups={a:"7"},ct},"".replace(yt,"$<a>")!=="7"})||!it||st)},6755:(y,j,r)=>{var v,g=r(2109),w=r(1470),k=r(1236).f,O=r(7466),C=r(1340),S=r(3929),T=r(4488),A=r(4964),R=r(1913),I=w("".startsWith),$=w("".slice),M=Math.min,B=A("startsWith");g({target:"String",proto:!0,forced:!(!R&&!B&&(v=k(String.prototype,"startsWith"),v&&!v.writable)||B)},{startsWith:function(q){var F=C(T(this));S(q);var N=O(M(arguments.length>1?arguments[1]:void 0,F.length)),U=C(q);return I?I(F,U,N):$(F,N,N+U.length)===U}})},3210:(y,j,r)=>{var v=r(2109),g=r(3111).trim;v({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return g(this)}})},2443:(y,j,r)=>{r(6800)("asyncIterator")},4032:(y,j,r)=>{var v=r(2109),g=r(7854),w=r(6916),k=r(1702),O=r(1913),C=r(9781),S=r(6293),T=r(7293),A=r(2597),R=r(7976),I=r(9670),$=r(5656),M=r(4948),B=r(1340),q=r(9114),F=r(30),N=r(1956),U=r(8006),H=r(1156),X=r(5181),Y=r(1236),K=r(3070),tt=r(6048),it=r(5296),st=r(8052),yt=r(7045),ct=r(2309),Et=r(6200),At=r(3501),Vt=r(9711),lt=r(5112),wt=r(6061),_t=r(6800),Ut=r(6532),Kt=r(8003),fe=r(9909),St=r(2092).forEach,jt=Et("hidden"),Bt="Symbol",qt="prototype",xt=fe.set,lr=fe.getterFor(Bt),de=Object[qt],Ne=g.Symbol,ge=Ne&&Ne[qt],cr=g.TypeError,Ae=g.QObject,dr=Y.f,Le=K.f,We=H.f,Ce=it.f,pr=k([].push),ot=ct("symbols"),bt=ct("op-symbols"),Ht=ct("wks"),Mt=!Ae||!Ae[qt]||!Ae[qt].findChild,Qt=C&&T(function(){return F(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(Nt,te,Xt){var ce=dr(de,te);ce&&delete de[te],Le(Nt,te,Xt),ce&&Nt!==de&&Le(de,te,ce)}:Le,Ze=function(Nt,te){var Xt=ot[Nt]=F(ge);return xt(Xt,{type:Bt,tag:Nt,description:te}),C||(Xt.description=te),Xt},Ke=function(Nt,te,Xt){Nt===de&&Ke(bt,te,Xt),I(Nt);var ce=M(te);return I(Xt),A(ot,ce)?(Xt.enumerable?(A(Nt,jt)&&Nt[jt][ce]&&(Nt[jt][ce]=!1),Xt=F(Xt,{enumerable:q(0,!1)})):(A(Nt,jt)||Le(Nt,jt,q(1,{})),Nt[jt][ce]=!0),Qt(Nt,ce,Xt)):Le(Nt,ce,Xt)},xr=function(Nt,te){I(Nt);var Xt=$(te),ce=N(Xt).concat(Dn(Xt));return St(ce,function(ze){C&&!w(Qe,Xt,ze)||Ke(Nt,ze,Xt[ze])}),Nt},Qe=function(Nt){var te=M(Nt),Xt=w(Ce,this,te);return!(this===de&&A(ot,te)&&!A(bt,te))&&(!(Xt||!A(this,te)||!A(ot,te)||A(this,jt)&&this[jt][te])||Xt)},fr=function(Nt,te){var Xt=$(Nt),ce=M(te);if(Xt!==de||!A(ot,ce)||A(bt,ce)){var ze=dr(Xt,ce);return!ze||!A(ot,ce)||A(Xt,jt)&&Xt[jt][ce]||(ze.enumerable=!0),ze}},Se=function(Nt){var te=We($(Nt)),Xt=[];return St(te,function(ce){A(ot,ce)||A(At,ce)||pr(Xt,ce)}),Xt},Dn=function(Nt){var te=Nt===de,Xt=We(te?bt:$(Nt)),ce=[];return St(Xt,function(ze){!A(ot,ze)||te&&!A(de,ze)||pr(ce,ot[ze])}),ce};S||(st(ge=(Ne=function(){if(R(ge,this))throw cr("Symbol is not a constructor");var Nt=arguments.length&&arguments[0]!==void 0?B(arguments[0]):void 0,te=Vt(Nt),Xt=function(ce){this===de&&w(Xt,bt,ce),A(this,jt)&&A(this[jt],te)&&(this[jt][te]=!1),Qt(this,te,q(1,ce))};return C&&Mt&&Qt(de,te,{configurable:!0,set:Xt}),Ze(te,Nt)})[qt],"toString",function(){return lr(this).tag}),st(Ne,"withoutSetter",function(Nt){return Ze(Vt(Nt),Nt)}),it.f=Qe,K.f=Ke,tt.f=xr,Y.f=fr,U.f=H.f=Se,X.f=Dn,wt.f=function(Nt){return Ze(lt(Nt),Nt)},C&&(yt(ge,"description",{configurable:!0,get:function(){return lr(this).description}}),O||st(de,"propertyIsEnumerable",Qe,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:Ne}),St(N(Ht),function(Nt){_t(Nt)}),v({target:Bt,stat:!0,forced:!S},{useSetter:function(){Mt=!0},useSimple:function(){Mt=!1}}),v({target:"Object",stat:!0,forced:!S,sham:!C},{create:function(Nt,te){return te===void 0?F(Nt):xr(F(Nt),te)},defineProperty:Ke,defineProperties:xr,getOwnPropertyDescriptor:fr}),v({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:Se}),Ut(),Kt(Ne,Bt),At[jt]=!0},1817:(y,j,r)=>{var v=r(2109),g=r(9781),w=r(7854),k=r(1702),O=r(2597),C=r(614),S=r(7976),T=r(1340),A=r(7045),R=r(9920),I=w.Symbol,$=I&&I.prototype;if(g&&C(I)&&(!("description"in $)||I().description!==void 0)){var M={},B=function(){var Y=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),K=S($,this)?new I(Y):Y===void 0?I():I(Y);return Y===""&&(M[K]=!0),K};R(B,I),B.prototype=$,$.constructor=B;var q=String(I("test"))=="Symbol(test)",F=k($.valueOf),N=k($.toString),U=/^Symbol\((.*)\)[^)]+$/,H=k("".replace),X=k("".slice);A($,"description",{configurable:!0,get:function(){var Y=F(this);if(O(M,Y))return"";var K=N(Y),tt=q?X(K,7,-1):H(K,U,"$1");return tt===""?void 0:tt}}),v({global:!0,constructor:!0,forced:!0},{Symbol:B})}},763:(y,j,r)=>{var v=r(2109),g=r(5005),w=r(2597),k=r(1340),O=r(2309),C=r(2015),S=O("string-to-symbol-registry"),T=O("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!C},{for:function(A){var R=k(A);if(w(S,R))return S[R];var I=g("Symbol")(R);return S[R]=I,T[I]=R,I}})},2165:(y,j,r)=>{r(6800)("iterator")},2526:(y,j,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(y,j,r)=>{var v=r(2109),g=r(2597),w=r(2190),k=r(6330),O=r(2309),C=r(2015),S=O("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!C},{keyFor:function(T){if(!w(T))throw TypeError(k(T)+" is not a symbol");if(g(S,T))return S[T]}})},6649:(y,j,r)=>{var v=r(6800),g=r(6532);v("toPrimitive"),g()},3680:(y,j,r)=>{var v=r(5005),g=r(6800),w=r(8003);g("toStringTag"),w(v("Symbol"),"Symbol")},4747:(y,j,r)=>{var v=r(7854),g=r(8324),w=r(8509),k=r(8533),O=r(8880),C=function(T){if(T&&T.forEach!==k)try{O(T,"forEach",k)}catch{T.forEach=k}};for(var S in g)g[S]&&C(v[S]&&v[S].prototype);C(w)},3948:(y,j,r)=>{var v=r(7854),g=r(8324),w=r(8509),k=r(6992),O=r(8880),C=r(5112),S=C("iterator"),T=C("toStringTag"),A=k.values,R=function($,M){if($){if($[S]!==A)try{O($,S,A)}catch{$[S]=A}if($[T]||O($,T,M),g[M]){for(var B in k)if($[B]!==k[B])try{O($,B,k[B])}catch{$[B]=k[B]}}}};for(var I in g)R(v[I]&&v[I].prototype,I);R(w,"DOMTokenList")},6815:(y,j,r)=>{var v=r(2109),g=r(7854),w=r(7152)(g.setInterval,!0);v({global:!0,bind:!0,forced:g.setInterval!==w},{setInterval:w})},8417:(y,j,r)=>{var v=r(2109),g=r(7854),w=r(7152)(g.setTimeout,!0);v({global:!0,bind:!0,forced:g.setTimeout!==w},{setTimeout:w})},2564:(y,j,r)=>{r(6815),r(8417)}},b={};function _(y){var j=b[y];if(j!==void 0)return j.exports;var r=b[y]={exports:{}};return p[y](r,r.exports,_),r.exports}_.d=(y,j)=>{for(var r in j)_.o(j,r)&&!_.o(y,r)&&Object.defineProperty(y,r,{enumerable:!0,get:j[r]})},_.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),_.o=(y,j)=>Object.prototype.hasOwnProperty.call(y,j),_.r=y=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})};var E={};return(()=>{_.r(E),_.d(E,{JSONEditor:()=>Tn}),_(3710),_(1539),_(9714),_(5827),_(6833),_(9826),_(9554),_(4747),_(7941),_(2222),_(9601),_(6649),_(6078),_(2526),_(1817),_(9653),_(9070),_(8674),_(2165),_(6992),_(8783),_(3948),_(2443),_(3680),_(3706),_(2703),_(8011),_(489),_(8309),_(8304),_(5069),_(7042),_(9753),_(1038),_(4916),_(9720),_(5306),_(4603),_(6699);var y=["actionscript","batchfile","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","groovy","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","prql","r","ruby","rust","sass","scala","scss","sh","smarty","sql","sqlserver","stylus","svg","typescript","twig","vbscript","xml","yaml","zig"],j=[function(c){return c.type==="string"&&c.format==="color"&&"colorpicker"},function(c){return c.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(c.format)&&"ip"},function(c){return c.type==="string"&&y.includes(c.format)&&"ace"},function(c){return c.type==="string"&&["xhtml","bbcode"].includes(c.format)&&"sceditor"},function(c){return c.type==="string"&&c.format==="markdown"&&"simplemde"},function(c){return c.type==="string"&&c.format==="jodit"&&"jodit"},function(c){return c.type==="string"&&c.format==="autocomplete"&&"autocomplete"},function(c){return c.type==="string"&&c.format==="uuid"&&"uuid"},function(c){return c.format==="info"&&"info"},function(c){return c.format==="button"&&"button"},function(c){if((c.type==="integer"||c.type==="number")&&c.format==="stepper")return"stepper"},function(c){if(c.links){for(var n=0;n<c.links.length;n++)if(c.links[n].rel&&c.links[n].rel.toLowerCase()==="describedby")return"describedBy"}},function(c){return["string","integer"].includes(c.type)&&["starrating","rating"].includes(c.format)&&"starrating"},function(c){return["string","integer"].includes(c.type)&&["date","time","datetime-local"].includes(c.format)&&"datetime"},function(c){return(c.oneOf||c.anyOf)&&"multiple"},function(c){return c.if&&"multiple"},function(c,n){if(c.items&&(c.items=n.expandSchema(c.items)),c.type==="array"&&c.items&&!Array.isArray(c.items)&&["string","number","integer"].includes(c.items.type)){if(c.format==="choices")return"arrayChoices";if(c.uniqueItems){if(c.format==="selectize")return"arraySelectize";if(c.format==="select2")return"arraySelect2";if(c.items.enum)return"multiselect"}}},function(c){if(c.enum){if(c.type==="array"||c.type==="object")return"enum";if(c.type==="number"||c.type==="integer"||c.type==="string")return c.format==="radio"?"radio":c.format==="select2"?"select2":c.format==="selectize"?"selectize":c.format==="choices"?"choices":"select"}},function(c){if(c.enumSource)return c.format==="radio"?"radio":c.format==="select2"?"select2":c.format==="selectize"?"selectize":c.format==="choices"?"choices":"select"},function(c){return c.type==="array"&&c.format==="table"&&"table"},function(c){return c.type==="string"&&c.format==="url"&&window.FileReader&&c.options&&c.options.upload===Object(c.options.upload)&&"upload"},function(c){return c.type==="string"&&c.media&&c.media.binaryEncoding==="base64"&&"base64"},function(c){return c.type==="any"&&"multiple"},function(c){if(c.type==="boolean")return c.format==="checkbox"||c.options&&c.options.checkbox?"checkbox":c.format==="select2"?"select2":c.format==="selectize"?"selectize":c.format==="choices"?"choices":"select"},function(c){return c.type==="string"&&c.format==="signature"&&"signature"},function(c){return typeof c.type=="string"&&["string","number","integer","boolean","null","array","object"].includes(c.type)&&c.type},function(c){return!c.type&&c.properties&&"object"},function(c){return typeof c.type!="string"&&"multiple"},function(c){return typeof c.type=="string"&&"string"}];function r(c,n,f){return(n=function(i){var h=function(a,l){if(v(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(v(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i);return v(h)==="symbol"?h:String(h)}(n))in c?Object.defineProperty(c,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[n]=f,c}function v(c){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},v(c)}function g(c){return!(c===null||v(c)!=="object"||c.nodeType||c===c.window||c.constructor&&!S(c.constructor.prototype,"isPrototypeOf"))}function w(c){return g(c)?k({},c):Array.isArray(c)?c.map(w):c}function k(c){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];return f.forEach(function(h){h&&Object.keys(h).forEach(function(a){h[a]&&g(h[a])?(S(c,a)||(c[a]={}),k(c[a],h[a])):Array.isArray(h[a])?c[a]=w(h[a]):c[a]=h[a]})}),c}function O(c,n){var f=document.createEvent("HTMLEvents");f.initEvent(n,!0,!0),c.dispatchEvent(f)}function C(c){return c&&(c.toString()==="[object ShadowRoot]"?c:C(c.parentNode))}function S(c,n){return c&&Object.prototype.hasOwnProperty.call(c,n)}_(4812),_(2419),_(4819),_(5003),_(4723),_(2023),_(9600),_(6755),_(5212),_(2772),_(1249),_(4678),_(1058);var T=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,A=/^\s*(-|\+)?(\d+)\s*$/;function R(){var c=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(c+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var f=(c+16*Math.random())%16|0;return c=Math.floor(c/16),(n==="x"?f:3&f|8).toString(16)})}function I(c){return c&&v(c)==="object"&&!Array.isArray(c)}function $(c){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];if(!f.length)return c;var h=f.shift();if(I(c)&&I(h))for(var a in h)I(h[a])?(c[a]||Object.assign(c,r({},a,{})),$(c[a],h[a])):Object.assign(c,r({},a,h[a]));return $.apply(void 0,[c].concat(f))}function M(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function B(c){return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},B(c)}function q(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(B(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(B(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),B(h)==="symbol"?h:String(h)),i)}var h}var F=function(){function c(i,h){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,c),this.defaults=h,this.jsoneditor=i.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=i.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=k({},this.options||{},this.schema.options||{},i.schema.options||{},i),this.formname=this.jsoneditor.options.form_name_root||"root",i.path||this.schema.id||(this.schema.id=this.formname),this.path=i.path||this.formname,this.formname=i.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=i.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,i.container&&this.setContainer(i.container),this.registerDependencies()}var n,f;return n=c,f=[{key:"onChildEditorChange",value:function(i){this.onChange(!0)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}},{key:"onChange",value:function(i){this.notify(),this.watch_listener&&this.watch_listener(),i&&this.change()}},{key:"register",value:function(){this.jsoneditor.registerEditor(this),this.onChange()}},{key:"unregister",value:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}},{key:"getNumColumns",value:function(){return 12}},{key:"isActive",value:function(){return this.active}},{key:"activate",value:function(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}},{key:"registerDependencies",value:function(){var i=this;this.dependenciesFulfilled=!0;var h=this.options.dependencies;h&&Object.keys(h).forEach(function(a){var l;a.startsWith(i.jsoneditor.root.path)?l=a:((l=i.path.split("."))[l.length-1]=a,l=l.join(".")),i.jsoneditor.watch(l,function(){i.evaluateDependencies()})})}},{key:"evaluateDependencies",value:function(){var i=this,h=this.container||this.control;if(h&&this.jsoneditor!==null){var a=this.options.dependencies;if(a){var l=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(a).forEach(function(e){var o;e.startsWith(i.jsoneditor.root.path)?o=e:((o=i.path.split("."))[o.length-1]=e,o=o.join("."));var u=a[e];i.checkDependency(o,u)}),this.dependenciesFulfilled!==l&&this.notify();var t=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(t="none"),h.tagName==="TD"?Object.keys(h.childNodes).forEach(function(e){return h.childNodes[e].style.display=t}):h.style.display=t}}}},{key:"checkDependency",value:function(i,h){var a=this;if(this.path!==i&&this.jsoneditor!==null){var l=this.jsoneditor.getEditor(i),t=l?l.getValue():void 0;l&&l.dependenciesFulfilled?Array.isArray(h)?this.dependenciesFulfilled=h.some(function(e){if(JSON.stringify(t)===JSON.stringify(e))return!0}):B(h)==="object"?B(t)!=="object"?this.dependenciesFulfilled=h===t:Object.keys(h).some(function(e){return!!S(h,e)&&(S(t,e)&&h[e]===t[e]?void 0:(a.dependenciesFulfilled=!1,!0))}):typeof h=="string"||typeof h=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&t===h:typeof h=="boolean"&&(this.dependenciesFulfilled=h?this.dependenciesFulfilled&&(t||t.length>0):this.dependenciesFulfilled&&(!t||t.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(i){this.container=i,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(i){var h=this;this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",function(){h.isActive()?h.deactivate():h.activate()});var a=this.jsoneditor.options.show_opt_in,l=this.parent.options.show_opt_in!==void 0,t=l&&this.parent.options.show_opt_in===!0,e=l&&this.parent.options.show_opt_in===!1;(t||!e&&a||!l&&a)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}},{key:"setupWatchListeners",value:function(){var i=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){i.refreshWatchedFieldValues()&&i.onWatchedFieldChange()},S(this.schema,"watch")){var h,a,l,t,e,o=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(function(u){if(h=i.schema.watch[u],Array.isArray(h)){if(h.length<2)return;a=[h[0]].concat(h[1].split("."))}else a=h.split("."),i.theme.closest(i.container,'[data-schemaid="'.concat(a[0],'"]'))||a.unshift("#");if((l=a.shift())==="#"&&(l=i.jsoneditor.schema.id||i.jsoneditor.root.formname),!(t=i.theme.closest(i.container,'[data-schemaid="'.concat(l,'"]'))))throw new Error("Could not find ancestor node with id ".concat(l));e="".concat(t.getAttribute("data-schemapath"),".").concat(a.join(".")),o.startsWith(e)&&(i.watchLoop=!0),i.jsoneditor.watch(e,i.watch_listener),i.watched[u]=e})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}},{key:"addLinks",value:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.description!==void 0?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var i=0;i<this.schema.links.length;i++)this.addLink(this.getLink(this.schema.links[i]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(i,h,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],t="json-editor-btn-".concat(h);h=this.iconlib?this.iconlib.getIcon(h):null,i=this.translate(i,l),a=this.translate(a,l),!h&&a&&(i=a,a=null);var e=this.theme.getButton(i,h,a);return e.classList.add(t),e}},{key:"setButtonText",value:function(i,h,a,l){var t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return a=this.iconlib?this.iconlib.getIcon(a):null,h=this.translate(h,t),l=this.translate(l,t),!a&&l&&(h=l,l=null),this.theme.setButtonText(i,h,a,l)}},{key:"addLink",value:function(i){this.link_holder&&this.link_holder.appendChild(i)}},{key:"getLink",value:function(i){var h,a,l=(i.mediaType||"application/javascript").split("/")[0],t=this.jsoneditor.compileTemplate(i.href,this.template_engine),e=this.jsoneditor.compileTemplate(i.rel?i.rel:i.href,this.template_engine),o=null;if(i.download&&(o=i.download),o&&o!==!0&&(o=this.jsoneditor.compileTemplate(o,this.template_engine)),l==="image"){h=this.theme.getBlockLinkHolder(),(a=document.createElement("a")).setAttribute("target","_blank");var u=document.createElement("img");this.theme.createImageLink(h,a,u),this.link_watchers.push(function(x){var P=t(x),D=e(x);a.setAttribute("href",P),a.setAttribute("title",D||P),u.setAttribute("src",P)})}else if(["audio","video"].includes(l)){h=this.theme.getBlockLinkHolder(),(a=this.theme.getBlockLink()).setAttribute("target","_blank");var d=document.createElement(l);d.setAttribute("controls","controls"),this.theme.createMediaLink(h,a,d),this.link_watchers.push(function(x){var P=t(x),D=e(x);a.setAttribute("href",P),a.textContent=D||P,d.setAttribute("src",P)})}else a=h=this.theme.getBlockLink(),h.setAttribute("target","_blank"),h.textContent=i.rel,h.style.display="none",this.link_watchers.push(function(x){var P=t(x),D=e(x);P&&(h.style.display=""),h.setAttribute("href",P),h.textContent=D||P});return o&&a&&(o===!0?a.setAttribute("download",""):this.link_watchers.push(function(x){a.setAttribute("download",o(x))})),i.class&&a.classList.add(i.class),h}},{key:"refreshWatchedFieldValues",value:function(){var i=this;if(this.watched_values){var h={},a=!1;return this.watched&&Object.keys(this.watched).forEach(function(l){var t=i.jsoneditor.getEditor(i.watched[l]),e=t?t.getValue():null;i.watched_values[l]!==e&&(a=!0),h[l]=e}),h.self=this.getValue(),this.watched_values.self!==h.self&&(a=!0),this.watched_values=h,a}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var i=this.getHeaderText();if(this.header.children.length){for(var h=0;h<this.header.childNodes.length;h++)if(this.header.childNodes[h].nodeType===3){this.header.childNodes[h].nodeValue=this.cleanText(i);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(i):this.header.textContent=this.cleanText(i)}}},{key:"getHeaderText",value:function(i){return this.header_text?this.header_text:i?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"onWatchedFieldChange",value:function(){var i,h=this;if(this.header_template){i=k(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()}),Object.keys(this.editors).length&&(i.properties={},Object.keys(this.editors).forEach(function(t){var e=h.editors[t];if(e.schema&&e.schema.enum&&e.schema.options&&e.schema.options.enum_titles){var o=e.schema.enum.indexOf(e.value),u=e.options.enum_titles[o];i.properties[t]={enumTitle:u}}}));var a=this.header_template(i);a!==this.header_text&&(this.header_text=a,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){i=this.getWatchedFieldValues();for(var l=0;l<this.link_watchers.length;l++)this.link_watchers[l](i)}}},{key:"setValue",value:function(i){this.value=i}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.value}},{key:"refreshValue",value:function(){}},{key:"getChildEditors",value:function(){return!1}},{key:"destroy",value:function(){var i=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach(function(h){return i.jsoneditor.unwatch(h,i.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}},{key:"isDefaultRequired",value:function(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}},{key:"getDefault",value:function(){if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var i=this.schema.type||this.schema.oneOf;if(i&&Array.isArray(i)&&(i=i[0]),i&&B(i)==="object"&&(i=i.type),i&&Array.isArray(i)&&(i=i[0]),typeof i=="string"){if(i==="number")return this.isDefaultRequired()?0:void 0;if(i==="boolean")return!this.isDefaultRequired()&&void 0;if(i==="integer")return this.isDefaultRequired()?0:void 0;if(i==="string")return this.isDefaultRequired()?"":void 0;if(i==="null")return null;if(i==="object")return{};if(i==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"isEnabled",value:function(){return!this.disabled}},{key:"isRequired",value:function(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}},{key:"getDisplayText",value:function(i){var h=[],a={};i.forEach(function(t){t.title&&(a[t.title]=a[t.title]||0,a[t.title]++),t.description&&(a[t.description]=a[t.description]||0,a[t.description]++),t.format&&(a[t.format]=a[t.format]||0,a[t.format]++),t.type&&(a[t.type]=a[t.type]||0,a[t.type]++)}),i.forEach(function(t){var e;e=typeof t=="string"?t:t.title&&a[t.title]<=1?t.title:t.format&&a[t.format]<=1?t.format:t.type&&a[t.type]<=1?t.type:t.description&&a[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",h.push(e)});var l={};return h.forEach(function(t,e){l[t]=l[t]||0,l[t]++,a[t]>1&&(h[e]="".concat(t," ").concat(l[t]))}),h}},{key:"getValidId",value:function(i){return(i=i===void 0?"":i.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(i){var h=this;if(this.schema.options&&this.schema.options.inputAttributes){var a=this.schema.options.inputAttributes,l=["name","type"].concat(i);Object.keys(a).forEach(function(t){l.includes(t.toLowerCase())||h.input.setAttribute(t,a[t])})}}},{key:"setContainerAttributes",value:function(){var i=this;if(this.schema.options&&this.schema.options.containerAttributes){var h=this.schema.options.containerAttributes,a=["data-schemapath","data-schematype","data-schemaid"];Object.keys(h).forEach(function(l){a.includes(l.toLowerCase())||i.container.setAttribute(l,h[l])})}}},{key:"expandCallbacks",value:function(i,h){var a=this,l=this.defaults.callbacks[i];return Object.entries(h).forEach(function(t){var e,o,u=(o=2,function(P){if(Array.isArray(P))return P}(e=t)||function(P,D){var J=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(J!=null){var nt,ut,dt,kt,Ct=[],$t=!0,ne=!1;try{if(dt=(J=J.call(P)).next,D===0){if(Object(J)!==J)return;$t=!1}else for(;!($t=(nt=dt.call(J)).done)&&(Ct.push(nt.value),Ct.length!==D);$t=!0);}catch(Re){ne=!0,ut=Re}finally{try{if(!$t&&J.return!=null&&(kt=J.return(),Object(kt)!==kt))return}finally{if(ne)throw ut}}return Ct}}(e,o)||function(P,D){if(P){if(typeof P=="string")return M(P,D);var J=Object.prototype.toString.call(P).slice(8,-1);return J==="Object"&&P.constructor&&(J=P.constructor.name),J==="Map"||J==="Set"?Array.from(P):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?M(P,D):void 0}}(e,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
74
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),d=u[0],x=u[1];x===Object(x)?h[d]=a.expandCallbacks(i,x):typeof x=="string"&&B(l)==="object"&&typeof l[x]=="function"&&(h[d]=l[x].bind(null,a))}),h}},{key:"showValidationErrors",value:function(i){}}],f&&q(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function N(c){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},N(c)}function U(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(N(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(N(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),N(h)==="symbol"?h:String(h)),i)}var h}function H(){return H=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Y(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},H.apply(this,arguments)}function X(c,n){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},X(c,n)}function Y(c){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Y(c)}var K=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Y(i);if(h){var o=Y(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(N(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){H(Y(l.prototype),"register",this).call(this),this.input&&(this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname),this.input.setAttribute("aria-label",this.formname))}},{key:"unregister",value:function(){H(Y(l.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(this.shouldBeUnset()||t!=null?N(t)==="object"?t=JSON.stringify(t):this.shouldBeUnset()||typeof t=="string"||(t="".concat(t)):t="",t!==this.serialized)){var u=this.sanitize(t);if(this.input.value!==u){if(this.setValueToInputField(u),this.format==="range"){var d=this.control.querySelector("output");d&&(d.value=u)}var x=o||this.getValue()!==t;return this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(x),{changed:x,value:u}}}}},{key:"setValueToInputField",value:function(t){this.input.value=t===void 0?"":t}},{key:"getNumColumns",value:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t=this.input_type==="textarea"?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(e,t))}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if(this.format==="textarea")this.input_type="textarea",this.input=this.theme.getTextareaInput();else if(this.format==="range"){this.input_type="range";var e=this.schema.minimum||0,o=this.schema.maximum||Math.max(100,e+1),u=1;this.schema.multipleOf&&(e%this.schema.multipleOf&&(e=Math.ceil(e/this.schema.multipleOf)*this.schema.multipleOf),o%this.schema.multipleOf&&(o=Math.floor(o/this.schema.multipleOf)*this.schema.multipleOf),u=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,o,u)}else this.input_type="text",["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","reset","search","submit","tel","text","time","url","week"].includes(this.format)&&(this.input_type=this.format),this.input=this.theme.getFormInputField(this.input_type);else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);this.schema.maxLength!==void 0&&this.input.setAttribute("maxlength",this.schema.maxLength),this.schema.pattern!==void 0?this.input.setAttribute("pattern",this.schema.pattern):this.schema.minLength!==void 0&&this.input.setAttribute("pattern",".{".concat(this.schema.minLength,",}")),this.options.compact?this.container.classList.add("compact"):this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"]),this.input.addEventListener("change",function(P){if(P.preventDefault(),P.stopPropagation(),t.schema.template)P.currentTarget.value=t.value;else{var D=P.currentTarget.value,J=t.sanitize(D);D!==J&&(P.currentTarget.value=J),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(P){if(P){var D,J=P.offsetHeight;if(P.offsetHeight<P.scrollHeight)for(D=0;P.offsetHeight<P.scrollHeight+3&&!(D>100);)D++,J++,P.style.height="".concat(J,"px");else{for(D=0;P.offsetHeight>=P.scrollHeight+3&&!(D>100);)D++,J--,P.style.height="".concat(J,"px");P.style.height="".concat(J+1,"px")}}},this.input.addEventListener("keyup",function(P){t.adjust_height(P.currentTarget)}),this.input.addEventListener("change",function(P){t.adjust_height(P.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var d=this.input;if(this.format==="range"&&(d=this.theme.getRangeControl(this.input,this.theme.getRangeOutput(this.input,this.schema.default||Math.max(this.schema.minimum||0,0)))),this.control=this.theme.getFormControl(this.label,d,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input),t.format==="range"&&(t.control.querySelector("output").value=t.input.value)}),this.schema.template){var x=this.expandCallbacks("template",{template:this.schema.template});typeof x.template=="function"?this.template=x.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(t){var e=this.expandCallbacks("cleave",k({},this.defaults.options.cleave||{},this.options.cleave||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",k({},this.defaults.options.imask||{},this.options.imask||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach(function(o){if(t[o]===Object(t[o]))t[o]=e.ajustIMaskOptions(t[o]);else if(o==="mask")if(t[o].substr(0,6)==="regex:"){var u=t[o].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(u!==null)try{t[o]=new RegExp(u[1],u[2])}catch{}}else t[o]=e.getGlobalPropertyFromString(t[o])}),t}},{key:"getGlobalPropertyFromString",value:function(t){if(t.includes(".")){var e=t.split("."),o=e[0],u=e[1];if(window[o]!==void 0&&window[o][u]!==void 0)return window[o][u]}else if(window[t]!==void 0)return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:H(Y(l.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,H(Y(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,H(Y(l.prototype),"disable",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}},{key:"refreshValue",value:function(){this.input&&(this.value=this.input.value,typeof this.value=="string"||this.shouldBeUnset()||(this.value=""),this.serialized=this.value)}},{key:"destroy",value:function(){this.cleave_instance&&this.cleave_instance.destroy(),this.imask_instance&&this.imask_instance.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),H(Y(l.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),H(Y(l.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.jsoneditor.options.show_errors!=="always"){if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return}this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(u,d){return d.path===e.path&&u.push(d.message),u},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&U(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function tt(c){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tt(c)}function it(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(tt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(tt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),tt(h)==="symbol"?h:String(h)),i)}var h}function st(){return st=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ct(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},st.apply(this,arguments)}function yt(c,n){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},yt(c,n)}function ct(c){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ct(c)}var Et=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yt(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ct(i);if(h){var o=ct(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(tt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=st(ct(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(u.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",st(ct(l.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;if(window.ace){var o=this.input_type;o!=="cpp"&&o!=="c++"&&o!=="c"||(o="c_cpp"),t=this.expandCallbacks("ace",k({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(o)})),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor_instance=window.ace.edit(this.ace_container,t),this.ace_editor_instance.setValue(this.getValue()),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize(),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.ace_editor_instance.setReadOnly(!0),this.ace_editor_instance.on("change",function(){e.input.value=e.ace_editor_instance.getValue(),e.refreshValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)}else st(ct(l.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!1),st(ct(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),st(ct(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),st(ct(l.prototype),"destroy",this).call(this)}}])&&it(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function At(c){return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},At(c)}function Vt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(At(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(At(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),At(h)==="symbol"?h:String(h)),i)}var h}function lt(){return lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=_t(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},lt.apply(this,arguments)}function wt(c,n){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},wt(c,n)}function _t(c){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_t(c)}_(7327);var Ut=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wt(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_t(i);if(h){var o=_t(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(At(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,f=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"getDefault",value:function(){return this.schema.default||[]}},{key:"register",value:function(){lt(_t(l.prototype),"register",this).call(this),this.rows&&this.rows.forEach(function(t){return t.register()})}},{key:"unregister",value:function(){lt(_t(l.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){var t=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,t.width+2),4):t.width}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach(function(e){e.enable(),t.setAvailability(e,!1)}),lt(_t(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach(function(o){o.disable(t),e.setAvailability(o,!0)}),lt(_t(l.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(t,e){t.add_row_button&&(t.add_row_button.disabled=e),t.remove_all_rows_button&&(t.remove_all_rows_button.disabled=e),t.delete_last_row_button&&(t.delete_last_row_button.disabled=e),t.copy_button&&(t.copy_button.disabled=e),t.delete_button&&(t.delete_button.disabled=e),t.moveup_button&&(t.moveup_button.disabled=e),t.movedown_button&&(t.movedown_button.disabled=e)}},{key:"preBuild",value:function(){lt(_t(l.prototype),"preBuild",this).call(this),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_delete_all_rows_buttons=this.hide_delete_buttons||this.options.disable_array_delete_all_rows||this.jsoneditor.options.disable_array_delete_all_rows,this.hide_delete_last_row_buttons=this.hide_delete_buttons||this.options.disable_array_delete_last_row||this.jsoneditor.options.disable_array_delete_last_row,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add,this.show_copy_button=this.options.enable_array_copy||this.jsoneditor.options.enable_array_copy,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top}},{key:"build",value:function(){this.options.compact?(this.title=this.theme.getHeader("",this.getPathDepth()),this.container.appendChild(this.title),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.schema.format==="tabs-top"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTopTabContentHolder(this.tabs_holder),this.active_tab=null):this.schema.format==="tabs"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls))),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),this.refreshTabs(!0),lt(_t(l.prototype),"onChildEditorChange",this).call(this,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(t.title)||this.translate("default_array_item_title")}else this.item_title=this.translate("default_array_item_title");return this.cleanText(this.item_title)}},{key:"getItemSchema",value:function(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?k({},this.schema.additionalItems):void 0:k({},this.schema.items[t]):this.schema.items?k({},this.schema.items):{}}},{key:"getItemInfo",value:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var o=JSON.stringify(e);return this.item_info[o]!==void 0||(e=this.jsoneditor.expandRefs(e),this.item_info[o]={title:this.translateProperty(e.title)||this.translate("default_array_item_title"),default:e.default,width:12,child_editors:e.properties||e.items}),this.item_info[o]}},{key:"getElementEditor",value:function(t){var e=this.getItemInfo(t),o=this.getItemSchema(t);(o=this.jsoneditor.expandRefs(o)).title="".concat(e.title," ").concat(t+1);var u,d=this.jsoneditor.getEditorClass(o);this.tabs_holder?(u=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):u=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(u);var x=this.jsoneditor.createEditor(d,{jsoneditor:this.jsoneditor,schema:o,container:u,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return x.preBuild(),x.build(),x.postBuild(),x.title_controls||(x.array_controls=this.theme.getButtonHolder(),u.appendChild(x.array_controls)),x}},{key:"checkParent",value:function(t){return t&&t.parentNode}},{key:"destroy",value:function(){this.empty(!0),this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.controls)&&this.controls.parentNode.removeChild(this.controls),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,lt(_t(l.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;this.rows&&(this.rows.forEach(function(o,u){t&&(e.checkParent(o.tab)&&o.tab.parentNode.removeChild(o.tab),e.destroyRow(o,!0),e.row_cache[u]=null),e.rows[u]=null}),this.rows=[],t&&(this.row_cache=[]))}},{key:"destroyRow",value:function(t,e){var o=t.container;e?(t.destroy(),o.parentNode&&o.parentNode.removeChild(o),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),o.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach(function(o){o.tab&&(t?o.tab_text.textContent=o.getHeaderText():o.tab===e.active_tab?e.theme.markTabActive(o):e.theme.markTabInactive(o))})}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach(function(P,D){if(t.rows[D])t.rows[D].setValue(P,o);else if(t.row_cache[D])t.rows[D]=t.row_cache[D],t.rows[D].setValue(P,o),t.rows[D].container.style.display="",t.rows[D].tab&&(t.rows[D].tab.style.display=""),t.rows[D].register(),t.jsoneditor.trigger("addRow",t.rows[D]);else{var J=t.addRow(P,o);t.jsoneditor.trigger("addRow",J)}});for(var u=e.length;u<this.rows.length;u++)this.destroyRow(this.rows[u]),this.rows[u]=null;this.rows=this.rows.slice(0,e.length);var d=this.rows.find(function(P){return P.tab===t.active_tab}),x=d!==void 0?d.tab:null;!x&&this.rows.length&&(x=this.rows[0].tab),this.active_tab=x,this.refreshValue(o),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}}},{key:"setButtonState",value:function(t,e){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:t.style.display=e?"":"none";break;case 2:t.disabled=!e}}},{key:"setupButtons",value:function(t){var e=[];if(this.value.length)if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);var o=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,o),e.push(o)}else{var u=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,u),e.push(u);var d=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,d),e.push(d)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var x=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,x),e.push(x),e.some(function(P){return P})}},{key:"refreshValue",value:function(t){var e=this,o=this.value?this.value.length:0;if(this.value=this.rows.map(function(d){return d.getValue()}),o!==this.value.length||t){var u=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach(function(d,x){if(d.movedown_button){var P=x!==e.rows.length-1;e.setButtonState(d.movedown_button,P)}d.delete_button&&e.setButtonState(d.delete_button,!u),e.value[x]=d.getValue()}),!this.collapsed&&this.setupButtons(u)?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t,e){var o=this,u=this.rows.length;this.rows[u]=this.getElementEditor(u),this.row_cache[u]=this.rows[u],this.tabs_holder&&(this.rows[u].tab_text=document.createElement("span"),this.rows[u].tab_text.textContent=this.rows[u].getHeaderText(),this.schema.format==="tabs-top"?(this.rows[u].tab=this.theme.getTopTab(this.rows[u].tab_text,this.getValidId(this.rows[u].path)),this.theme.addTopTab(this.tabs_holder,this.rows[u].tab)):(this.rows[u].tab=this.theme.getTab(this.rows[u].tab_text,this.getValidId(this.rows[u].path)),this.theme.addTab(this.tabs_holder,this.rows[u].tab)),this.rows[u].tab.addEventListener("click",function(x){o.active_tab=o.rows[u].tab,o.refreshTabs(),x.preventDefault(),x.stopPropagation()}));var d=this.rows[u].title_controls||this.rows[u].array_controls;return this.hide_delete_buttons||(this.rows[u].delete_button=this._createDeleteButton(u,d)),this.show_copy_button&&(this.rows[u].copy_button=this._createCopyButton(u,d)),u&&!this.hide_move_buttons&&(this.rows[u].moveup_button=this._createMoveUpButton(u,d)),this.hide_move_buttons||(this.rows[u].movedown_button=this._createMoveDownButton(u,d)),t!==void 0&&this.rows[u].setValue(t,e),this.refreshTabs(),this.rows[u]}},{key:"_createDeleteButton",value:function(t,e){var o=this,u=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return u.classList.add("delete","json-editor-btntype-delete"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue().filter(function(nt,ut){return ut!==x}),D=null,J=o.rows[x].getValue();o.setValue(P),o.rows[x]?D=o.rows[x].tab:o.rows[x-1]&&(D=o.rows[x-1].tab),D&&(o.active_tab=D,o.refreshTabs()),o.onChange(!0),o.jsoneditor.trigger("deleteRow",J)}),e&&e.appendChild(u),u}},{key:"_createCopyButton",value:function(t,e){var o=this,u=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),d=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",t),u.addEventListener("click",function(x){var P=o.getValue();x.preventDefault(),x.stopPropagation();var D=1*x.currentTarget.getAttribute("data-i");P.forEach(function(J,nt){if(nt===D){if(d.items.type==="string"&&d.items.format==="uuid")J=R();else if(d.items.type==="object"&&d.items.properties)for(var ut=0,dt=Object.keys(J);ut<dt.length;ut++){var kt=dt[ut];d.items.properties&&d.items.properties[kt]&&d.items.properties[kt].format==="uuid"&&(J[kt]=R())}P.push(J)}}),o.setValue(P),o.refreshValue(!0),o.onChange(!0)}),e.appendChild(u),u}},{key:"_createMoveUpButton",value:function(t,e){var o=this,u=this.getButton("",this.schema.format==="tabs-top"?"moveleft":"moveup","button_move_up_title");return u.classList.add("moveup","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i");if(!(x<=0)){var P=o.getValue(),D=P[x-1];P[x-1]=P[x],P[x]=D,o.setValue(P),o.active_tab=o.rows[x-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x-1])}}),e&&e.appendChild(u),u}},{key:"_createMoveDownButton",value:function(t,e){var o=this,u=this.getButton("",this.schema.format==="tabs-top"?"moveright":"movedown","button_move_down_title");return u.classList.add("movedown","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();if(!(x>=P.length-1)){var D=P[x+1];P[x+1]=P[x],P[x]=D,o.setValue(P),o.active_tab=o.rows[x+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x+1])}}),e&&e.appendChild(u),u}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&O(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton(),this.tabs&&(this.add_row_button.classList.add("je-array-control-btn"),this.delete_last_row_button.classList.add("je-array-control-btn"),this.remove_all_rows_button.classList.add("je-array-control-btn"))}},{key:"_createToggleButton",value:function(){var t=this,e=this.getButton("","collapse","button_collapse");e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var o=this.row_holder.style.display,u=this.controls.style.display;return e.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),t.panel&&t.setButtonState(t.panel,t.collapsed),t.tabs_holder&&t.setButtonState(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=o,t.controls.style.display=u,t.setButtonText(d.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(d.currentTarget,"","expand","button_expand"))}),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var u,d=t.rows.length;t.row_cache[d]?(u=t.rows[d]=t.row_cache[d],t.rows[d].setValue(t.rows[d].getDefault(),!0),t.rows[d].container.style.display="",t.rows[d].tab&&(t.rows[d].tab.style.display=""),t.rows[d].register()):u=t.addRow(),t.active_tab=t.rows[d].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",u)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var u=t.getValue(),d=null,x=u.pop();t.setValue(u),t.rows[t.rows.length-1]&&(d=t.rows[t.rows.length-1].tab),d&&(t.active_tab=d,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",x)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var u=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",u)}),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,o=[],u=[];t.forEach(function(d){d.path===e.path?o.push(d):u.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.rows.forEach(function(d){return d.showValidationErrors(u)})}}],f&&Vt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Kt(c){return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Kt(c)}function fe(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Kt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Kt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Kt(h)==="symbol"?h:String(h)),i)}var h}function St(){return St=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Bt(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},St.apply(this,arguments)}function jt(c,n){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},jt(c,n)}function Bt(c){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bt(c)}Ut.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var qt=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jt(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Bt(i);if(h){var o=Bt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Kt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){St(Bt(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){St(Bt(l.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach(function(o){return e=Math.max(e,"".concat(t.select_values[o]).length+4)}),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;St(Bt(l.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var e=this.jsoneditor.expandRefs(this.schema.items||{}),o=e.enum||[],u=e.options&&e.options.enum||[],d=e.options&&e.options.enum_titles||[];for(t=0;t<o.length;t++)if(this.sanitize(o[t])===o[t]){var x=u[t]||{};"title"in x||(x.title="".concat(d[t]||o[t])),this.option_keys.push("".concat(o[t])),this.option_enum.push(x),this.select_values["".concat(o[t])]=o[t]}}},{key:"build",value:function(){var t,e=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),!this.schema.format&&this.option_keys.length<8||this.schema.format==="checkbox"){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){var o=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=o,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var u=this.theme.getCheckboxLabel(this.option_enum[t].title);if(u.htmlFor=o,this.option_enum[t].infoText){var d=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));u.appendChild(d)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(u,this.inputs[this.option_keys[t]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description,this.infoButton),this.inputs.controlgroup=this.inputs.controls=this.control}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys,!0),this.theme.setSelectOptions(this.input,this.option_keys,this.option_enum.map(function(x){return x.title})),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton)}(this.schema.readOnly||this.schema.readonly)&&this.disable(!0),this.container.appendChild(this.control),this.multiselectChangeHandler=function(x){var P=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&P.push(e.select_values[e.option_keys[t]]);e.updateValue(P),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(function(){e.afterInputReady()})}},{key:"postBuild",value:function(){St(Bt(l.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(t,e){var o=this;t=t||[],Array.isArray(t)||(t=[t]),t=t.map(function(u){return"".concat(u)}),Object.keys(this.select_options).forEach(function(u){o.select_options[u][o.input_type==="select"?"selected":"checked"]=t.includes(u)}),this.updateValue(t),this.onChange(!0)}},{key:"removeValue",value:function(t){t=[].concat(t),this.setValue(this.getValue().filter(function(e){return!t.includes(e)}))}},{key:"addValue",value:function(t){this.setValue(this.getValue().concat(t))}},{key:"updateValue",value:function(t){for(var e=!1,o=[],u=0;u<t.length;u++)if(this.select_options["".concat(t[u])]){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}else e=!0;return this.value=o,e}},{key:"sanitize",value:function(t){return this.schema.items.type==="boolean"?!!t:this.schema.items.type==="number"?1*t||0:this.schema.items.type==="integer"?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach(function(e){return t.inputs[e].disabled=!1}),St(Bt(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach(function(o){return e.inputs[o].disabled=!0}),St(Bt(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){St(Bt(l.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(t){var e=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),o=t.reduce(function(u,d){return d.path.match(e)&&u.push(d.message),u},[]);o.length?this.theme.addInputError(this.input||this.inputs,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&fe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function xt(c){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xt(c)}function lr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(xt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xt(h)==="symbol"?h:String(h)),i)}var h}function de(){return de=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ge(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},de.apply(this,arguments)}function Ne(c,n){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ne(c,n)}function ge(c){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ge(c)}var cr=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ne(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ge(i);if(h){var o=ge(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(xt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){this.choices_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):de(ge(l.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",k({},{removeItems:!0,removeItemButton:!0},this.defaults.options.choices||{},this.options.choices||{},{addItems:!0,editItems:!1,duplicateItemsAllowed:!1}));this.newEnumAllowed=!1,this.choices_instance=new window.Choices(this.input,e),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var u=t.choices_instance.getValue(!0);t.updateValue(u),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}de(ge(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],u=0;u<t.length;u++)if(!(!this.select_values["".concat(t[u])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[u])))){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),de(ge(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),de(ge(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),de(ge(l.prototype),"destroy",this).call(this)}}])&&lr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(qt);function Ae(c){return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ae(c)}function dr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Ae(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ae(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ae(h)==="symbol"?h:String(h)),i)}var h}function Le(){return Le=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Ce(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Le.apply(this,arguments)}function We(c,n){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},We(c,n)}function Ce(c){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ce(c)}var pr=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&We(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ce(i);if(h){var o=Ce(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Ae(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){this.select2_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Le(Ce(l.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(t=this.expandCallbacks("select2",k({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(o),e.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Le(Ce(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],u=0;u<t.length;u++)if(!(!this.select_values["".concat(t[u])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[u])))){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!1,!1)).trigger("change"),!0}},{key:"enable",value:function(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Le(Ce(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Le(Ce(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Le(Ce(l.prototype),"destroy",this).call(this)}}])&&dr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(qt);function ot(c){return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ot(c)}function bt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ot(h)==="symbol"?h:String(h)),i)}var h}function Ht(){return Ht=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Qt(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Ht.apply(this,arguments)}function Mt(c,n){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Mt(c,n)}function Qt(c){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qt(c)}var Ze=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qt(i);if(h){var o=Qt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){this.selectize_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):Ht(Qt(l.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance&&(t=this.expandCallbacks("selectize",k({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=t.create=!!t.create&&this.schema.items&&this.schema.items.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var u=e.selectize_instance.getValue();e.updateValue(u),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)),Ht(Qt(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],u=0;u<t.length;u++)if(!(!this.select_values["".concat(t[u])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[u])))){var d=this.sanitize(this.select_values[t[u]]);o.push(d),d!==t[u]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Ht(Qt(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Ht(Qt(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Ht(Qt(l.prototype),"destroy",this).call(this)}}])&&bt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(qt);function Ke(c){return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ke(c)}function xr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Ke(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ke(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ke(h)==="symbol"?h:String(h)),i)}var h}function Qe(){return Qe=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Se(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Qe.apply(this,arguments)}function fr(c,n){return fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},fr(c,n)}function Se(c){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Se(c)}var Dn=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fr(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Se(i);if(h){var o=Se(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Ke(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"postBuild",value:function(){window.Autocomplete&&(this.autocomplete_wrapper=document.createElement("div"),this.input.parentNode.insertBefore(this.autocomplete_wrapper,this.input.nextSibling),this.autocomplete_wrapper.appendChild(this.input),this.autocomplete_dropdown=document.createElement("ul"),this.input.parentNode.insertBefore(this.autocomplete_dropdown,this.input.nextSibling)),Qe(Se(l.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",k({},{search:function(o){return console.log('No "search" callback defined for autocomplete in property "'.concat(o.key,'"')),[]},onSubmit:function(){e.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add("".concat(t.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),Qe(Se(l.prototype),"afterInputReady",this).call(this)}},{key:"destroy",value:function(){this.autocomplete_instance&&(this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.autocomplete_dropdown&&this.autocomplete_dropdown.parentNode&&this.autocomplete_dropdown.parentNode.removeChild(this.autocomplete_dropdown),this.autocomplete_wrapper&&this.autocomplete_wrapper.parentNode&&this.autocomplete_wrapper.parentNode.removeChild(this.autocomplete_wrapper),this.autocomplete_instance=null),Qe(Se(l.prototype),"destroy",this).call(this)}}])&&xr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function Nt(c){return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nt(c)}function te(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Nt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nt(h)==="symbol"?h:String(h)),i)}var h}function Xt(){return Xt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ze(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Xt.apply(this,arguments)}function ce(c,n){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ce(c,n)}function ze(c){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ze(c)}_(561);var Vi=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ce(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ze(i);if(h){var o=ze(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Nt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",function(o){if(e.count===e.current_item_index)e.value[e.count][e.key]=o.target.result;else{var u={};for(var d in e.parent.schema.properties)u[d]="";u[e.key]=o.target.result,e.value.splice(e.count,0,u)}e.count+=1,e.count===e.total+e.current_item_index&&e.arrayEditor.setValue(e.value)})}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw new Error("FileReader required for base64 editor");this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.schema.options&&this.schema.options.multiple&&this.schema.options.multiple===!0&&this.parent&&this.parent.schema.type==="object"&&this.parent.parent&&this.parent.parent.schema.type==="array"&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",function(o){if(o.preventDefault(),o.stopPropagation(),o.currentTarget.files&&o.currentTarget.files.length)if(o.currentTarget.files.length>1&&t.schema.options&&t.schema.options.multiple&&t.schema.options.multiple===!0&&t.parent&&t.parent.schema.type==="object"&&t.parent.parent&&t.parent.parent.schema.type==="array"){t.arrayEditor=t.jsoneditor.getEditor(t.parent.parent.path),t.value=t.arrayEditor.getValue(),t.total=o.currentTarget.files.length,t.current_item_index=parseInt(t.parent.key),t.count=t.current_item_index;for(var u=0;u<t.total;u++){var d=new FileReader;t.setFileReaderListener(d),d.readAsDataURL(o.currentTarget.files[u])}}else{var x=new FileReader;x.onload=function(P){t.value=P.target.result,t.refreshPreview(),t.onChange(!0),x=null},x.readAsDataURL(o.currentTarget.files[0])}})}this.preview=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview,this.infoButton),this.container.appendChild(this.control);var e=this.getButton("button_upload","upload","button_upload");e.addEventListener("click",function(){t.uploader.click()}),this.control.appendChild(e)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),t.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Xt(ze(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Xt(ze(l.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,this.input.value=this.value,this.refreshPreview(),this.onChange())}},{key:"destroy",value:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),Xt(ze(l.prototype),"destroy",this).call(this)}}])&&te(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Nn(c){return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nn(c)}function us(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Nn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nn(h)==="symbol"?h:String(h)),i)}var h}function ui(){return ui=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Wr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},ui.apply(this,arguments)}function on(c,n){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},on(c,n)}function Wr(c){return Wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wr(c)}var hs=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&on(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Wr(i);if(h){var o=Wr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Nn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t,e){var o;return function(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}(this,l),(o=a.call(this,t,e)).active=!1,o.parent&&o.parent.schema&&(Array.isArray(o.parent.schema.required)?o.parent.schema.required.includes(o.key)||o.parent.schema.required.push(o.key):o.parent.schema.required=[o.key]),o}return n=l,(f=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.expandCallbacks("button",k({},{icon:"",validated:!1,align:"left",action:function(u,d){window.alert('No button action defined for "'.concat(u.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),o=this.translateProperty(e.text||this.schema.title)||this.key;this.input=this.getButton(o,e.icon,o),typeof e.action!="function"?window.alert('No button action defined for "'.concat(this.path,'"')):this.input.addEventListener("click",e.action,!1),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["readonly"]),this.control=this.theme.getFormButtonHolder(e.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){t.jsoneditor.validate(t.jsoneditor.getValue()).length>0?t.disable():t.enable()},e.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,ui(Wr(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,ui(Wr(l.prototype),"disable",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"activate",value:function(){this.active=!1,this.enable()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.disable())}},{key:"destroy",value:function(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,ui(Wr(l.prototype),"destroy",this).call(this)}}])&&us(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function $n(c){return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$n(c)}function ds(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if($n(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if($n(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),$n(h)==="symbol"?h:String(h)),i)}var h}function kn(){return kn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Mr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},kn.apply(this,arguments)}function zi(c,n){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zi(c,n)}function Mr(c){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mr(c)}var ps=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Mr(i);if(h){var o=Mr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&($n(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){t=!!t;var o=this.getValue()!==t;this.value=t,this.input.checked=this.value,this.onChange(o)}},{key:"register",value:function(){kn(Mr(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){kn(Mr(l.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))}},{key:"build",value:function(){var t=this;this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.onChange(!0)}),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,kn(Mr(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,kn(Mr(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),kn(Mr(l.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(u,d){return d.path===e.path&&u.push(d.message),u},[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&ds(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Mn(c){return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mn(c)}function ea(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Mn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Mn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Mn(h)==="symbol"?h:String(h)),i)}var h}function Cr(){return Cr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Sr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Cr.apply(this,arguments)}function an(c,n){return an=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},an(c,n)}function Sr(c){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sr(c)}_(2707);var hi=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&an(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Sr(i);if(h){var o=Sr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Mn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){var o=this.typecast(t),u=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;(this.enum_options.length>0&&!this.enum_values.includes(o)||e&&!this.isRequired()&&!u)&&(o=this.enum_values[0]),this.value!==o&&(e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.value=o,this.onChange(),this.change())}},{key:"register",value:function(){Cr(Sr(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Cr(Sr(l.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))}},{key:"typecast",value:function(t){return this.schema.type==="boolean"?t==="undefined"||t===void 0?void 0:!!t:this.schema.type==="number"?1*t||0:this.schema.type==="integer"?Math.floor(1*t||0):this.schema.enum&&t===void 0?void 0:"".concat(t)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var t,e,o=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema.enum){var u=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach(function(d,x){o.enum_options[x]="".concat(d),o.enum_display[x]="".concat(o.translateProperty(u[x])||d),o.enum_values[x]=o.typecast(d)})}else if(this.schema.type==="boolean")this.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],this.enum_options=["1",""],this.enum_values=[!0,!1],this.isRequired()||(this.enum_display.unshift(" "),this.enum_options.unshift("undefined"),this.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw new Error("'select' editor requires the enum property to be set.");if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(t=0;t<this.schema.enumSource.length;t++)typeof this.schema.enumSource[t]=="string"?this.enumSource[t]={source:this.schema.enumSource[t]}:Array.isArray(this.schema.enumSource[t])?this.enumSource[t]=this.schema.enumSource[t]:this.enumSource[t]=k({},this.schema.enumSource[t]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(t=0;t<this.enumSource.length;t++)this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].value})).template=="function"?this.enumSource[t].value=e.template:this.enumSource[t].value=this.jsoneditor.compileTemplate(this.enumSource[t].value,this.template_engine)),this.enumSource[t].title&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].title})).template=="function"?this.enumSource[t].title=e.template:this.enumSource[t].title=this.jsoneditor.compileTemplate(this.enumSource[t].title,this.template_engine)),this.enumSource[t].filter&&this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].filter})).template=="function"?this.enumSource[t].filter=e.template:this.enumSource[t].filter=this.jsoneditor.compileTemplate(this.enumSource[t].filter,this.template_engine))}}},{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getSelectInput(this.enum_options,!1),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),this.container.appendChild(this.control),this.value=this.enum_values[0],window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var t,e=this.typecast(this.input.value);(t=this.enum_values.includes(e)?this.enum_values[this.enum_values.indexOf(e)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=t,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var t,e,o=[],u=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var d=0;d<this.enumSource.length;d++)if(Array.isArray(this.enumSource[d]))o=o.concat(this.enumSource[d]),u=u.concat(this.enumSource[d]);else{var x=[];if(x=Array.isArray(this.enumSource[d].source)?this.enumSource[d].source:t[this.enumSource[d].source]){if(this.enumSource[d].slice&&(x=Array.prototype.slice.apply(x,this.enumSource[d].slice)),this.enumSource[d].filter){var P=[];for(e=0;e<x.length;e++)this.enumSource[d].filter({i:e,item:x[e],watched:t})&&P.push(x[e]);x=P}var D=[],J=[];for(e=0;e<x.length;e++){var nt=x[e];this.enumSource[d].value?J[e]=this.typecast(this.enumSource[d].value({i:e,item:nt})):J[e]=x[e],this.enumSource[d].title?D[e]=this.enumSource[d].title({i:e,item:nt}):D[e]=J[e]}this.enumSource[d].sort&&(function(dt,kt,Ct){dt.map(function($t,ne){return{v:$t,t:kt[ne]}}).sort(function($t,ne){return $t.v<ne.v?-Ct:$t.v===ne.v?0:Ct}).forEach(function($t,ne){dt[ne]=$t.v,kt[ne]=$t.t})}).bind(null,J,D,this.enumSource[d].sort==="desc"?1:-1)(),o=o.concat(J),u=u.concat(D)}}var ut=this.value;this.theme.setSelectOptions(this.input,o,u),this.enum_options=o,this.enum_display=u,this.enum_values=o,o.includes(ut)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=ut,this.value=ut):(this.input.value=o[0],this.value=this.typecast(o[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}Cr(Sr(l.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Cr(Sr(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Cr(Sr(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Cr(Sr(l.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(u,d){return d.path===e.path&&u.push(d.message),u},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&ea(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Hn(c){return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(c)}function ml(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Hn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Hn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Hn(h)==="symbol"?h:String(h)),i)}var h}function Hr(){return Hr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=z(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Hr.apply(this,arguments)}function L(c,n){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},L(c,n)}function z(c){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(c)}var rt=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=z(i);if(h){var o=z(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Hn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){if(this.choices_instance){var o=this.typecast(t||"");if(this.enum_values.includes(o)||(o=this.enum_values[0]),this.value===o)return;e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.choices_instance.setChoiceByValue(this.input.value),this.value=o,this.onChange()}else Hr(z(l.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",k({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Hr(z(l.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Hr(z(l.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var e=this.enum_options.map(function(o,u){return{value:o,label:t.enum_display[u]}});this.choices_instance.setChoices(e,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Hr(z(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Hr(z(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Hr(z(l.prototype),"destroy",this).call(this)}}])&&ml(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function Q(c){return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Q(c)}function mt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Q(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Q(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Q(h)==="symbol"?h:String(h)),i)}var h}function Dt(){return Dt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=ft(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Dt.apply(this,arguments)}function Jt(c,n){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jt(c,n)}function ft(c){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ft(c)}rt.rules={".choices > *":"box-sizing:border-box"};var vt=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ft(i);if(h){var o=ft(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Q(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){if(Dt(ft(l.prototype),"build",this).call(this),this.input&&(this.schema.max&&typeof this.schema.max=="string"&&this.input.setAttribute("max",this.schema.max),this.schema.min&&typeof this.schema.max=="string"&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&Q(this.options.flatpickr)==="object")){this.options.flatpickr.enableTime=this.schema.format!=="date",this.options.flatpickr.noCalendar=this.schema.format==="time",this.schema.type==="integer"&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var t=this.input;if(this.options.flatpickr.wrap===!0){var e=[];if(this.options.flatpickr.showToggleButton!==!1){var o=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");o.setAttribute("data-toggle",""),e.push(o)}if(this.options.flatpickr.showClearButton!==!1){var u=this.getButton("","clear","flatpickr_clear_button");u.setAttribute("data-clear",""),e.push(u)}var d=this.input.parentNode,x=this.input.nextSibling,P=this.theme.getInputGroup(this.input,e);P!==void 0?(this.options.flatpickr.inline=!1,d.insertBefore(P,x),t=P):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),this.options.flatpickr.inline===!0&&this.options.flatpickr.inlineHideInput===!0&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if(this.schema.type==="string")return this.value;if(this.value!==""&&this.value!==void 0){var t=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,e,o){if(this.schema.type==="string")Dt(ft(l.prototype),"setValue",this).call(this,t,e,o),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var u=new Date(1e3*t),d=u.getFullYear(),x=this.zeroPad(u.getMonth()+1),P=this.zeroPad(u.getDate()),D=this.zeroPad(u.getHours()),J=this.zeroPad(u.getMinutes()),nt=this.zeroPad(u.getSeconds()),ut=[d,x,P].join("-"),dt=[D,J,nt].join(":"),kt="".concat(ut,"T").concat(dt);this.schema.format==="date"?kt=ut:this.schema.format==="time"&&(kt=dt),this.input.value=kt,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(kt)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Dt(ft(l.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&mt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function Wt(c){return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wt(c)}function oe(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Wt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wt(h)==="symbol"?h:String(h)),i)}var h}function Tt(){return Tt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Be(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Tt.apply(this,arguments)}function ue(c,n){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ue(c,n)}function Be(c){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Be(c)}var ir=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Be(i);if(h){var o=Be(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Wt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Tt(Be(l.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Tt(Be(l.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}},{key:"enable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Tt(Be(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Tt(Be(l.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var t=this,e=this.getWatchedFieldValues();if(e){var o=document.location.origin+document.location.pathname+this.template(e);this.editors[this.refs[o]]||this.buildChildEditor(o),this.currentEditor=this.refs[o],this.register(),this.editors.forEach(function(u,d){u&&(t.currentEditor===d?u.container.style.display="":u.container.style.display="none")}),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(t){this.refs[t]=this.editors.length;var e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);var o=k({},this.schema,this.jsoneditor.refs[t]),u=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:o,container:e,path:this.path,parent:this,required:!0});this.editors.push(d),d.preBuild(),d.build(),d.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if(this.schema.links[t].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=k({},this.schema)}},{key:"build",value:function(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}},{key:"onWatchedFieldChange",value:function(){this.switchEditor()}},{key:"onChildEditorChange",value:function(t){this.editors[this.currentEditor]&&this.refreshValue(),Tt(Be(l.prototype),"onChildEditorChange",this).call(this,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Tt(Be(l.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach(function(e){e&&e.showValidationErrors(t)})}}])&&oe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function It(c){return It=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},It(c)}function ee(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function zt(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(It(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(It(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),It(h)==="symbol"?h:String(h)),i)}var h}function me(){return me=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Oe(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},me.apply(this,arguments)}function Ue(c,n){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ue(c,n)}function Oe(c){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Oe(c)}var $e=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Oe(i);if(h){var o=Oe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(It(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(o){t.selected=t.select_options.indexOf(o.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)}),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach(function(o,u){if(e===JSON.stringify(o))return t.selected=u,!1}),this.selected<0?this.setValue(this.enum[0]):(this.switcher.value=this.select_options[this.selected],this.display_area.innerHTML=this.html_values[this.selected])}},{key:"enable",value:function(){this.always_disabled||(this.switcher.disabled=!1,me(Oe(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,me(Oe(l.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,o,u=this;if(t===null)return"<em>null</em>";if(It(t)==="object"){var d="";return e=t,o=function(x,P){var D=u.getHTML(P);Array.isArray(t)||(D="<div><em>".concat(x,"</em>: ").concat(D,"</div>")),d+="<li>".concat(D,"</li>")},Array.isArray(e)||typeof e.length=="number"&&e.length>0&&e.length-1 in e?Array.from(e).forEach(function(x,P){return o(P,x)}):Object.entries(e).forEach(function(x){var P,D,J=(D=2,function(dt){if(Array.isArray(dt))return dt}(P=x)||function(dt,kt){var Ct=dt==null?null:typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(Ct!=null){var $t,ne,Re,Gt,gt=[],Zt=!0,Ge=!1;try{if(Re=(Ct=Ct.call(dt)).next,kt===0){if(Object(Ct)!==Ct)return;Zt=!1}else for(;!(Zt=($t=Re.call(Ct)).done)&&(gt.push($t.value),gt.length!==kt);Zt=!0);}catch(W){Ge=!0,ne=W}finally{try{if(!Zt&&Ct.return!=null&&(Gt=Ct.return(),Object(Gt)!==Gt))return}finally{if(Ge)throw ne}}return gt}}(P,D)||function(dt,kt){if(dt){if(typeof dt=="string")return ee(dt,kt);var Ct=Object.prototype.toString.call(dt).slice(8,-1);return Ct==="Object"&&dt.constructor&&(Ct=dt.constructor.name),Ct==="Map"||Ct==="Set"?Array.from(dt):Ct==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ct)?ee(dt,kt):void 0}}(P,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
75
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),nt=J[0],ut=J[1];return o(nt,ut)}),d=Array.isArray(t)?"<ol>".concat(d,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(d,"</ul>")}return typeof t=="boolean"?t?"true":"false":typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):t}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),me(Oe(l.prototype),"destroy",this).call(this)}}])&&zt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function _e(c){return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_e(c)}function mr(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(_e(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(_e(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),_e(h)==="symbol"?h:String(h)),i)}var h}function Me(){return Me=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Pr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Me.apply(this,arguments)}function Fr(c,n){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Fr(c,n)}function Pr(c){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pr(c)}var fs=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fr(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pr(i);if(h){var o=Pr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(_e(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){Me(Pr(l.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Me(Pr(l.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(t==null?t="":_e(t)==="object"?t=JSON.stringify(t):typeof t!="string"&&(t="".concat(t)),t!==this.serialized)){var u=this.sanitize(t);if(this.input.value!==u){this.input.value=u;var d=o||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(d)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Me(Pr(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Me(Pr(l.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Me(Pr(l.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),Me(Pr(l.prototype),"onWatchedFieldChange",this).call(this)}},{key:"build",value:function(){if(this.format=this.schema.format,!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.input_type="hidden",this.input=this.theme.getFormInputField(this.input_type),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.container.appendChild(this.input),this.schema.template){var t=this.expandCallbacks("template",{template:this.schema.template});typeof t.template=="function"?this.template=t.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&mr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Zr(c){return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zr(c)}function yl(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Zr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Zr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Zr(h)==="symbol"?h:String(h)),i)}var h}function Ui(c,n){return Ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ui(c,n)}function Vr(c){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vr(c)}var qi=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Vr(i);if(h){var o=Vr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Zr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){this.options.compact=!1,this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}}])&&yl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hs);function jn(c){return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jn(c)}function ms(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(jn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jn(h)==="symbol"?h:String(h)),i)}var h}function Gi(){return Gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Fn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Gi.apply(this,arguments)}function Wi(c,n){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wi(c,n)}function Fn(c){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fn(c)}var ys=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wi(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Fn(i);if(h){var o=Fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(jn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){if(Gi(Fn(l.prototype),"build",this).call(this),this.schema.minimum!==void 0){var t=this.schema.minimum;this.schema.exclusiveMinimum!==void 0&&(t+=1),this.input.setAttribute("min",t)}if(this.schema.maximum!==void 0){var e=this.schema.maximum;this.schema.exclusiveMaximum!==void 0&&(e-=1),this.input.setAttribute("max",e)}if(this.schema.step!==void 0){var o=this.schema.step||1;this.input.setAttribute("step",o)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(T),o=parseFloat(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&ms(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function zr(c){return zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(c)}function di(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(zr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(zr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),zr(h)==="symbol"?h:String(h)),i)}var h}function Jr(c,n){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jr(c,n)}function Zi(c){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zi(c)}var bs=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Zi(i);if(h){var o=Zi(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(zr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(A),o=parseInt(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&di(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(ys);function Vn(c){return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vn(c)}function Ji(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Vn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Vn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Vn(h)==="symbol"?h:String(h)),i)}var h}function sn(){return sn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Yr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},sn.apply(this,arguments)}function zn(c,n){return zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zn(c,n)}function Yr(c){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yr(c)}var ra=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zn(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Yr(i);if(h){var o=Yr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Vn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"preBuild",value:function(){if(sn(Yr(l.prototype),"preBuild",this).call(this),this.schema.options||(this.schema.options={}),!this.schema.options.cleave)switch(this.format){case"ipv6":this.schema.options.cleave={delimiters:[":"],blocks:[4,4,4,4,4,4,4,4],uppercase:!0};break;case"ipv4":this.schema.options.cleave={delimiters:["."],blocks:[3,3,3,3],numericOnly:!0}}this.options=k(this.options,this.schema.options||{})}}])&&Ji(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function Un(c){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Un(c)}function bl(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Un(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Un(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Un(h)==="symbol"?h:String(h)),i)}var h}function Xr(){return Xr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Tr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Xr.apply(this,arguments)}function Yi(c,n){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yi(c,n)}function Tr(c){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tr(c)}var vs=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yi(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Tr(i);if(h){var o=Tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Un(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=Xr(Tr(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(u.value)}},{key:"build",value:function(){this.options.format="textarea",Xr(Tr(l.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.Jodit?(t=this.expandCallbacks("jodit",k({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",function(){e.value=e.jodit_instance.getEditorValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)):Xr(Tr(l.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),Xr(Tr(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Xr(Tr(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Xr(Tr(l.prototype),"destroy",this).call(this)}}])&&bl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K),gs=(_(6541),_(9337),_(3321),function(c){var n=c.split(".");if(n.length!==4)throw new Error("error_ipv4");n.forEach(function(f){if(isNaN(+f)||+f<0||+f>255)throw new Error("error_ipv4")})}),na=function(c){if(!c.match("^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$"))throw new Error("error_ipv6")},ia=function(c){if(!c.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function oa(c,n,f,i){try{switch(c.format){case"ipv4":gs(n);break;case"ipv6":na(n);break;case"hostname":ia(n)}return[]}catch(h){return[{path:f,property:"format",message:i(h.message)}]}}function Xi(c,n){var f=Object.keys(c);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(c);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(c,h).enumerable})),f.push.apply(f,i)}return f}function aa(c,n,f){return(n=Ki(n))in c?Object.defineProperty(c,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[n]=f,c}function pi(c,n){return function(f){if(Array.isArray(f))return f}(c)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,l,t,e,o=[],u=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;u=!1}else for(;!(u=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);u=!0);}catch(x){d=!0,l=x}finally{try{if(!u&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw l}}return o}}(c,n)||fi(c,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
76
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yr(c){return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yr(c)}function xe(c){return function(n){if(Array.isArray(n))return mi(n)}(c)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(c)||fi(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
77
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fi(c,n){if(c){if(typeof c=="string")return mi(c,n);var f=Object.prototype.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?mi(c,n):void 0}}function mi(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function sa(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,Ki(i.key),i)}}function Ki(c){var n=function(f,i){if(yr(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(yr(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(c);return yr(n)==="symbol"?n:String(n)}var Qi=function(){function c(i,h,a,l){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,c),this.jsoneditor=i,this.schema=h||this.jsoneditor.schema,this.options=a||{},this.translate=this.jsoneditor.translate||l.translate,this.translateProperty=this.jsoneditor.translateProperty||l.translateProperty,this.defaults=l,this._validateSubSchema={dependentRequired:function(t,e,o){var u=[];if(t.dependentRequired!==void 0){var d=[];Object.keys(t.dependentRequired).forEach(function(x){if(e[x]!==void 0){var P=t.dependentRequired[x];d=P.filter(function(D){return!S(e,D)})}}),d.length>0&&u.push({message:"Must have the required properties: "+d.join(", "),path:o})}return u},dependentSchemas:function(t,e,o){var u=this,d=[];return Object.keys(t.dependentSchemas).forEach(function(x){if(e[x]!==void 0){var P=t.dependentSchemas[x],D=u._validateSchema(P,e,o);d=[].concat(xe(d),xe(D))}}),d},contains:function(t,e,o){var u=this,d=[],x=0;e.forEach(function(D){u._validateSchema(t.contains,D,o).length===0&&x++});var P=x===0;return t.minContains!==void 0?x<t.minContains&&d.push({message:this.translate("error_minContains",[x,t.minContains],t),path:o}):P&&d.push({message:this.translate("error_contains",null,t),path:o}),t.maxContains!==void 0&&x>t.maxContains&&d.push({message:this.translate("error_maxContains",[x,t.maxContains],t),path:o}),d},if:function(t,e,o){if(t.then===void 0&&t.else===void 0)return[];var u=this._validateSchema(t.if,e,o),d=[],x=[];return t.then!==void 0&&(d=this._validateSchema(t.then,e,o)),t.else!==void 0&&(x=this._validateSchema(t.else,e,o)),t.if===!0?d:t.if===!1?x:u.length===0?d:u.length>0?x:[]},const:function(t,e,o){return JSON.stringify(t.const)!==JSON.stringify(e)||Array.isArray(e)||yr(e)==="object"?[{path:o,property:"const",message:this.translate("error_const",null,t)}]:[]},enum:function(t,e,o){var u=JSON.stringify(e);return t.enum.some(function(d){return u===JSON.stringify(d)})?[]:[{path:o,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,o){var u=this;return t.extends.reduce(function(d,x){return d.push.apply(d,xe(u._validateSchema(x,e,o))),d},[])},allOf:function(t,e,o){var u=this;return t.allOf.reduce(function(d,x){return d.push.apply(d,xe(u._validateSchema(x,e,o))),d},[])},anyOf:function(t,e,o){var u=this;return t.anyOf.some(function(d){return!u._validateSchema(d,e,o).length})?[]:[{path:o,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,o){var u=this,d=0,x=[];t.oneOf.forEach(function(D,J){var nt=u._validateSchema(D,e,o);nt.length||d++,nt.forEach(function(ut){ut.path="".concat(o,".oneOf[").concat(J,"]").concat(ut.path.substr(o.length))}),x.push.apply(x,xe(nt))});var P=[];return d!==1&&(P.push({path:o,property:"oneOf",message:this.translate("error_oneOf",[d],t)}),P.push.apply(P,x)),P},not:function(t,e,o){return this._validateSchema(t.not,e,o).length?[]:[{path:o,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,o){var u=this;if(Array.isArray(t.type)){if(!t.type.some(function(d){return u._checkType(d,e)}))return[{path:o,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&t.type==="integer"){if(!this._checkType("string","".concat(e)))return[{path:o,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:o,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,o){var u=this;if(Array.isArray(t.disallow)){if(t.disallow.some(function(d){return u._checkType(d,e)}))return[{path:o,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:o,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},divisibleBy:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},maximum:function(t,e,o){var u=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?u=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(u=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),u?[]:[{path:o,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,o){var u=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?u=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(u=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),u?[]:[{path:o,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum],t)}]}},this._validateStringSubSchema={maxLength:function(t,e,o){var u=[];return"".concat(e).length>t.maxLength&&u.push({path:o,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),u},minLength:function(t,e,o){return"".concat(e).length<t.minLength?[{path:o,property:"minLength",message:this.translate(t.minLength===1?"error_notempty":"error_minLength",[t.minLength],t)}]:[]},pattern:function(t,e,o){return new RegExp(t.pattern).test(e)?[]:[{path:o,property:"pattern",message:t.options&&t.options.patternmessage?t.options.patternmessage:this.translate("error_pattern",[t.pattern],t)}]}},this._validateArraySubSchema={items:function(t,e,o){var u=this,d=[];if(Array.isArray(t.items))for(var x=0;x<e.length;x++)if(t.items[x])d.push.apply(d,xe(this._validateSchema(t.items[x],e[x],"".concat(o,".").concat(x))));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){d.push({path:o,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}d.push.apply(d,xe(this._validateSchema(t.additionalItems,e[x],"".concat(o,".").concat(x))))}else e.forEach(function(P,D){d.push.apply(d,xe(u._validateSchema(t.items,P,"".concat(o,".").concat(D))))});return d},maxItems:function(t,e,o){return e.length>t.maxItems?[{path:o,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,o){return e.length<t.minItems?[{path:o,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,o){for(var u={},d=0;d<e.length;d++){var x=JSON.stringify(e[d]);if(u[x])return[{path:o,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];u[x]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(t,e,o){return Object.keys(e).length>t.maxProperties?[{path:o,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties],t)}]:[]},minProperties:function(t,e,o){return Object.keys(e).length<t.minProperties?[{path:o,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties],t)}]:[]},required:function(t,e,o){var u=this,d=[];return Array.isArray(t.required)&&t.required.forEach(function(x){if(e[x]===void 0){var P=u.jsoneditor.getEditor("".concat(o,".").concat(x));P&&P.dependenciesFulfilled===!1||P&&["button","info"].includes(P.schema.format||P.schema.type)||d.push({path:o,property:"required",message:u.translate("error_required",[t&&t.properties&&t.properties[x]&&t.properties[x].title?t.properties[x].title:x],t)})}}),d},properties:function(t,e,o,u){var d=this,x=[];return Object.entries(t.properties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1];u[J]=!0,x.push.apply(x,xe(d._validateSchema(nt,e[J],"".concat(o,".").concat(J))))}),x},patternProperties:function(t,e,o,u){var d=this,x=[];return Object.entries(t.patternProperties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1],ut=new RegExp(J);Object.entries(e).forEach(function(dt){var kt=pi(dt,2),Ct=kt[0],$t=kt[1];ut.test(Ct)&&(u[Ct]=!0,x.push.apply(x,xe(d._validateSchema(nt,$t,"".concat(o,".").concat(Ct)))))})}),x}},this._validateObjectSubSchema2={propertyNames:function(t,e,o,u){for(var d=this,x=[],P=Object.keys(e),D=null,J=function(){var dt="";return D=P[nt],typeof t.propertyNames=="boolean"?t.propertyNames===!0?"continue":(x.push({path:o,property:"propertyNames",message:d.translate("error_property_names_false",[D],t)}),"break"):Object.entries(t.propertyNames).every(function(kt){var Ct=pi(kt,2),$t=Ct[0],ne=Ct[1],Re=!1;switch($t){case"maxLength":if(typeof ne!="number"){dt="error_property_names_maxlength";break}if(D.length>ne){dt="error_property_names_exceeds_maxlength";break}return!0;case"const":if(ne!==D){dt="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(ne)){dt="error_property_names_enum";break}if(ne.forEach(function(Gt){Gt===D&&(Re=!0)}),!Re){dt="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof ne!="string"){dt="error_property_names_pattern";break}if(!new RegExp(ne).test(D)){dt="error_property_names_pattern_mismatch";break}return!0;default:return x.push({path:o,property:"propertyNames",message:d.translate("error_property_names_unsupported",[$t],t)}),!1}return x.push({path:o,property:"propertyNames",message:d.translate(dt,[D],t)}),!1})?void 0:"break"},nt=0;nt<P.length;nt++){var ut=J();if(ut!=="continue"&&ut==="break")break}return x},additionalProperties:function(t,e,o,u){for(var d=[],x=Object.keys(e),P=0;P<x.length;P++){var D=x[P];if(!u[D]){if(!t.additionalProperties){d.push({path:o,property:"additionalProperties",message:this.translate("error_additional_properties",[D],t)});break}if(t.additionalProperties===!0)break;d.push.apply(d,xe(this._validateSchema(t.additionalProperties,e[D],"".concat(o,".").concat(D))))}}return d},dependencies:function(t,e,o){var u=this,d=[];return Object.entries(t.dependencies).forEach(function(x){var P=pi(x,2),D=P[0],J=P[1];e[D]!==void 0&&(Array.isArray(J)?J.forEach(function(nt){e[nt]===void 0&&d.push({path:o,property:"dependencies",message:u.translate("error_dependency",[nt],t)})}):d.push.apply(d,xe(u._validateSchema(J,e,o))))}),d}}}var n,f;return n=c,f=[{key:"fitTest",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,l={match:0,extra:0};if(yr(i)==="object"&&i!==null){var t=this._getSchema(h);if(t.anyOf){var e,o=function(nt){for(var ut=1;ut<arguments.length;ut++){var dt=arguments[ut]!=null?arguments[ut]:{};ut%2?Xi(Object(dt),!0).forEach(function(kt){aa(nt,kt,dt[kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(dt)):Xi(Object(dt)).forEach(function(kt){Object.defineProperty(nt,kt,Object.getOwnPropertyDescriptor(dt,kt))})}return nt}({},l),u=function(nt,ut){var dt=typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(!dt){if(Array.isArray(nt)||(dt=fi(nt))){dt&&(nt=dt);var kt=0,Ct=function(){};return{s:Ct,n:function(){return kt>=nt.length?{done:!0}:{done:!1,value:nt[kt++]}},e:function(Gt){throw Gt},f:Ct}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
78
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $t,ne=!0,Re=!1;return{s:function(){dt=dt.call(nt)},n:function(){var Gt=dt.next();return ne=Gt.done,Gt},e:function(Gt){Re=!0,$t=Gt},f:function(){try{ne||dt.return==null||dt.return()}finally{if(Re)throw $t}}}}(t.anyOf);try{for(u.s();!(e=u.n()).done;){var d=e.value,x=this.fitTest(i,d,a);(x.match>o.match||x.match===o.match&&x.extra<o.extra)&&(o=x)}}catch(nt){u.e(nt)}finally{u.f()}return o}var P=this._getSchema(h).properties;for(var D in P)if(S(P,D)){if(yr(i[D])==="object"&&yr(P[D])==="object"&&yr(P[D].properties)==="object"){var J=this.fitTest(i[D],P[D],a/100);l.match+=J.match,l.extra+=J.extra}i[D]!==void 0&&(l.match+=a)}else l.extra+=a}return l}},{key:"_getSchema",value:function(i){return i===void 0?k({},this.jsoneditor.expandRefs(this.schema)):i}},{key:"validate",value:function(i){return this._validateSchema(this.schema,i)}},{key:"_validateSchema",value:function(i,h,a){var l=this,t=[];return a=a||this.jsoneditor.root.formname,i=k({},this.jsoneditor.expandRefs(i)),h===void 0?this._validateV3Required(i,h,a):(Object.keys(i).forEach(function(e){l._validateSubSchema[e]&&t.push.apply(t,xe(l._validateSubSchema[e].call(l,i,h,a)))}),t.push.apply(t,xe(this._validateByValueType(i,h,a))),i.links&&i.links.forEach(function(e,o){e.rel&&e.rel.toLowerCase()==="describedby"&&(i=l._expandSchemaLink(i,o),t.push.apply(t,xe(l._validateSchema(i,h,a,l.translate))))}),["date","time","datetime-local"].includes(i.format)&&t.push.apply(t,xe(this._validateDateTimeSubSchema(i,h,a))),["uuid"].includes(i.format)&&t.push.apply(t,xe(this._validateUUIDSchema(i,h,a))),t.push.apply(t,xe(this._validateCustomValidator(i,h,a))),this._removeDuplicateErrors(t))}},{key:"_expandSchemaLink",value:function(i,h){var a=i.links[h].href,l=this.jsoneditor.root.getValue(),t=this.jsoneditor.compileTemplate(a,this.jsoneditor.template),e=document.location.origin+document.location.pathname+t(l);return i.links=i.links.slice(0,h).concat(i.links.slice(h+1)),k({},i,this.jsoneditor.refs[e])}},{key:"_validateV3Required",value:function(i,h,a){return(i.required!==void 0&&i.required===!0||i.required===void 0&&this.jsoneditor.options.required_by_default===!0)&&i.type!=="info"?[{path:a,property:"required",message:this.translate("error_notset",null,i)}]:[]}},{key:"_validateByValueType",value:function(i,h,a){var l=this,t=[];if(h===null)return t;if(typeof h=="number")Object.keys(i).forEach(function(o){l._validateNumberSubSchema[o]&&t.push.apply(t,xe(l._validateNumberSubSchema[o].call(l,i,h,a)))});else if(typeof h=="string")Object.keys(i).forEach(function(o){l._validateStringSubSchema[o]&&t.push.apply(t,xe(l._validateStringSubSchema[o].call(l,i,h,a)))});else if(Array.isArray(h))Object.keys(i).forEach(function(o){l._validateArraySubSchema[o]&&t.push.apply(t,xe(l._validateArraySubSchema[o].call(l,i,h,a)))});else if(yr(h)==="object"){var e={};Object.keys(i).forEach(function(o){l._validateObjectSubSchema[o]&&t.push.apply(t,xe(l._validateObjectSubSchema[o].call(l,i,h,a,e)))}),i.additionalProperties!==void 0||!this.jsoneditor.options.no_additional_properties||i.oneOf||i.anyOf||i.allOf||(i.additionalProperties=!1),Object.keys(i).forEach(function(o){l._validateObjectSubSchema2[o]!==void 0&&t.push.apply(t,xe(l._validateObjectSubSchema2[o].call(l,i,h,a,e)))})}return t}},{key:"_validateUUIDSchema",value:function(i,h,a){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(h)?[]:[{path:a,property:"format",message:this.translate("error_pattern",["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"],i)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(i,h,a){var l=i.multipleOf||i.divisibleBy,t=h/l===Math.floor(h/l);return window.math?t=window.math.mod(window.math.bignumber(h),window.math.bignumber(l)).equals(0):window.Decimal&&(t=new window.Decimal(h).mod(new window.Decimal(l)).equals(0)),t?[]:[{path:a,property:i.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[l],i)}]}},{key:"_validateDateTimeSubSchema",value:function(i,h,a){var l=this,t=this.jsoneditor.getEditor(a),e=t&&t.flatpickr?t.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[i.format];if(i.type==="integer")return function(o,u,d){return 1*u<1?[{path:d,property:"format",message:l.translate("error_invalid_epoch",null,o)}]:u!==Math.abs(parseInt(u))?[{path:d,property:"format",message:l.translate("error_".concat(o.format.replace(/-/g,"_")),[e],o)}]:[]}(i,h,a);if(t&&t.flatpickr){if(t)return function(o,u,d,x){if(u!==""){var P;if(x.flatpickr.config.mode!=="single"){var D=x.flatpickr.config.mode==="range"?x.flatpickr.l10n.rangeSeparator:", ";P=x.flatpickr.selectedDates.map(function(nt){return x.flatpickr.formatDate(nt,x.flatpickr.config.dateFormat)}).join(D)}try{if(P){if(P!==u)throw new Error("".concat(x.flatpickr.config.mode," mismatch"))}else if(x.flatpickr.formatDate(x.flatpickr.parseDate(u,x.flatpickr.config.dateFormat),x.flatpickr.config.dateFormat)!==u)throw new Error("mismatch")}catch{var J=x.flatpickr.config.errorDateFormat!==void 0?x.flatpickr.config.errorDateFormat:x.flatpickr.config.dateFormat;return[{path:d,property:"format",message:l.translate("error_".concat(x.format.replace(/-/g,"_")),[J],o)}]}}return[]}(i,h,a,t)}else if(!{date:/^(\d{4}\D\d{2}\D\d{2})?$/,time:/^(\d{2}:\d{2}(?::\d{2})?)?$/,"datetime-local":/^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)?$/}[i.format].test(h))return[{path:a,property:"format",message:this.translate("error_".concat(i.format.replace(/-/g,"_")),[e],i)}];return[]}},{key:"_validateCustomValidator",value:function(i,h,a){var l=this,t=[];t.push.apply(t,xe(oa.call(this,i,h,a,this.translate)));var e=function(o){t.push.apply(t,xe(o.call(l,i,h,a)))};return this.defaults.custom_validators.forEach(e),this.options.custom_validators&&this.options.custom_validators.forEach(e),t}},{key:"_removeDuplicateErrors",value:function(i){return i.reduce(function(h,a){var l=!0;return h||(h=[]),h.forEach(function(t){t.message===a.message&&t.path===a.path&&t.property===a.property&&(t.errorcount++,l=!1)}),l&&(a.errorcount=1,h.push(a)),h},[])}},{key:"_checkType",value:function(i,h){var a={string:function(l){return typeof l=="string"},number:function(l){return typeof l=="number"},integer:function(l){return typeof l=="number"&&l===Math.floor(l)},boolean:function(l){return typeof l=="boolean"},array:function(l){return Array.isArray(l)},object:function(l){return l!==null&&!Array.isArray(l)&&yr(l)==="object"},null:function(l){return l===null}};return typeof i=="string"?!a[i]||a[i](h):!this._validateSchema(i,h).length}}],f&&sa(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function qe(c){return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qe(c)}function Ur(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(qe(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(qe(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),qe(h)==="symbol"?h:String(h)),i)}var h}function ln(){return ln=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=br(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},ln.apply(this,arguments)}function la(c,n){return la=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},la(c,n)}function br(c){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},br(c)}var to=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&la(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=br(i);if(h){var o=br(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(qe(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}ln(br(l.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(ln(br(l.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}},{key:"enable",value:function(){if(!this.always_disabled){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,ln(br(l.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable(t);this.switcher.disabled=!0,ln(br(l.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(t){var e=this;this.lastType=this.type,this.editors[t]||this.buildChildEditor(t);var o=this.getValue();this.type=t,this.register(),this.editors.forEach(function(u,d){var x,P;u&&(e.type===d?(e.keep_only_existing_values&&(x=u.getValue(),P=o,Object.keys(P).forEach(function(D){D in x&&(x[D]=P[D])}),o=x),(e.keep_values||e.if)&&u.setValue(o,!0),u.container.style.display=""):u.container.style.display="none")}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,o=this,u=this.types[t],d=this.theme.getChildEditorHolder();this.editor_holder.appendChild(d),typeof u=="string"?(e=k({},this.schema)).type=u:(e=k({},this.schema,u),e=this.jsoneditor.expandRefs(e),u&&u.required&&Array.isArray(u.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(e.required=this.schema.required.concat(u.required)));var x=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(x,{jsoneditor:this.jsoneditor,schema:e,container:d,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&(this.editors[t].header.style.display="none"),this.editors[t].option=this.switcher_options[t],d.addEventListener("change_header_text",function(){o.refreshHeaderText()}),t!==this.type&&(d.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,this.jsoneditor.options.keep_oneof_values!==void 0&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),this.options.keep_oneof_values!==void 0&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,this.jsoneditor.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),this.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.options.keep_only_existing_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,delete this.schema.oneOf;else if(this.schema.anyOf)this.anyOf=!0,this.types=this.schema.anyOf,delete this.schema.anyOf;else if(this.schema.if)this.if=!0,this.ifSchema=JSON.parse(JSON.stringify(this.schema.if)),this.thenSchema={title:"then"},this.elseSchema={title:"else"},this.types=[],this.schema.then&&$(this.thenSchema,this.schema,this.schema.then),this.schema.else&&$(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach(function(o){delete o.if,delete o.then,delete o.else}),delete this.schema.if;else{if(this.schema.type&&this.schema.type!=="any")Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var t=this.schema.disallow;qe(t)==="object"&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach(function(o){t.includes(o)||e.push(o)}),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.switcher=this.theme.getSwitcher(this.display_text),this.if||(this.container.appendChild(this.header),e.appendChild(this.switcher)),this.switcher.addEventListener("change",function(u){u.preventDefault(),u.stopPropagation(),t.switchEditor(t.display_text.indexOf(u.currentTarget.value)),t.onChange(!0)}),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder);var o={};this.jsoneditor.options.custom_validators&&(o.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach(function(u,d){var x;t.editors[d]=!1,typeof u=="string"?(x=k({},t.schema)).type=u:(x=k({},t.schema,u),u.required&&Array.isArray(u.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(x.required=t.schema.required.concat(u.required))),t.validators[d]=new Qi(t.jsoneditor,x,o,t.defaults)}),this.jsoneditor.on("change",function(){t.switchIf()}),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),ln(br(l.prototype),"onChildEditorChange",this).call(this)}},{key:"refreshHeaderText",value:function(){var t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach(function(e,o){e.textContent=t[o]})}},{key:"refreshValue",value:function(){this.editors[this.type]&&(this.value=this.editors[this.type].getValue())}},{key:"switchIf",value:function(){if(this.ifSchema&&this.value){var t=this.getIfType(this.value);this.lastType!==t&&(this.switchEditor(t),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(t){return this.jsoneditor.validator._validateSchema(this.ifSchema,t).length===0?0:1}},{key:"setValue",value:function(t,e){var o=this,u=this.type,d={match:0,extra:0,i:this.type},x={match:0,i:null};this.validators.forEach(function(J,nt){var ut=null;o.anyOf!==void 0&&o.anyOf&&(ut=J.fitTest(t),(d.match<ut.match||d.match===ut.match&&d.extra>ut.extra)&&((d=ut).i=nt)),J.validate(t).length||x.i!==null?d=x:(x.i=nt,ut!==null&&(x.match=ut.match))});var P=x.i;this.anyOf!==void 0&&this.anyOf&&x.match<d.match&&(P=d.i),this.if&&(P=this.getIfType(t)),P===null&&(P=this.type),this.type=P,this.switcher.value=this.display_text[P];var D=this.type!==u;D&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),t!==void 0&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(D)}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ln(br(l.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.oneOf||this.anyOf){var o=this.oneOf?"oneOf":"anyOf";this.editors.forEach(function(u,d){if(u){var x="".concat(e.path,".").concat(o,"[").concat(d,"]");u.showValidationErrors(t.reduce(function(P,D){if(D.path.startsWith(x)||D.path===x.substr(0,D.path.length)){var J=k({},D);D.path.startsWith(x)&&(J.path=e.path+J.path.substr(x.length)),P.push(J)}return P},[]))}})}else this.editors.forEach(function(u){u&&u.showValidationErrors(t)})}},{key:"addLinks",value:function(){}}])&&Ur(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function On(c){return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},On(c)}function eo(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(On(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(On(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),On(h)==="symbol"?h:String(h)),i)}var h}function qn(c,n){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},qn(c,n)}function Gn(c){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gn(c)}var ca=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Gn(i);if(h){var o=Gn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(On(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&eo(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function ro(c,n){var f=Object.keys(c);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(c);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(c,h).enumerable})),f.push.apply(f,i)}return f}function cn(c){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?ro(Object(f),!0).forEach(function(i){yi(c,i,f[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(f)):ro(Object(f)).forEach(function(i){Object.defineProperty(c,i,Object.getOwnPropertyDescriptor(f,i))})}return c}function yi(c,n,f){return(n=io(n))in c?Object.defineProperty(c,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[n]=f,c}function En(c,n){return function(f){if(Array.isArray(f))return f}(c)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,l,t,e,o=[],u=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;u=!1}else for(;!(u=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);u=!0);}catch(x){d=!0,l=x}finally{try{if(!u&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw l}}return o}}(c,n)||function(f,i){if(f){if(typeof f=="string")return no(f,i);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?no(f,i):void 0}}(c,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
79
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function no(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function Br(c){return Br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Br(c)}function ua(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,io(i.key),i)}}function io(c){var n=function(f,i){if(Br(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(Br(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(c);return Br(n)==="symbol"?n:String(n)}function Ar(){return Ar=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=vr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Ar.apply(this,arguments)}function oo(c,n){return oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},oo(c,n)}function vr(c){return vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vr(c)}var bi=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oo(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=vr(i);if(h){var o=vr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Br(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t,e,o){var u;return function(d,x){if(!(d instanceof x))throw new TypeError("Cannot call a class as a function")}(this,l),(u=a.call(this,t,e)).currentDepth=o,u}return n=l,(f=[{key:"getDefault",value:function(){return k({},this.schema.default||{})}},{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Ar(vr(l.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.register()})}},{key:"unregister",value:function(){Ar(vr(l.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.maxwidth),3)}},{key:"enable",value:function(){this.always_disabled||(this.editjson_control&&(this.editjson_control.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),Ar(vr(l.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){t.isActive()&&t.enable(),t.optInCheckbox.disabled=!1}))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),Ar(vr(l.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(e){e.isActive()&&e.disable(t),e.optInCheckbox.disabled=!0})}},{key:"layoutEditors",value:function(){var t,e,o=this;if(this.row_container){var u;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(Gt,gt){var Zt=o.editors[Gt].schema.propertyOrder,Ge=o.editors[gt].schema.propertyOrder;return typeof Zt!="number"&&(Zt=1e3),typeof Ge!="number"&&(Ge=1e3),Zt-Ge});var d,x=this.format==="categories",P=[],D=null,J=null;if(this.format==="grid-strict"){var nt=0;if(d=[],this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Zt=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),Ge=gt.options.hidden?0:gt.options.grid_offset||0,W=!gt.options.hidden&&(gt.options.grid_break||!1),G={key:Gt,width:Zt,offset:Ge,height:gt.options.hidden?0:gt.container.offsetHeight};d.push(G),P[nt]=d,W&&(nt++,d=[])}}),this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),u=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),u.appendChild(d),e=0;e<P[t].length;e++)D=P[t][e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t][e].width,P[t][e].offset),d.appendChild(J.container)}else if(this.format==="grid"){for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){for(var Zt=!1,Ge=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),W=gt.options.hidden?0:gt.container.offsetHeight,G=0;G<P.length;G++)P[G].width+Ge<=12&&(!W||.5*P[G].minh<W&&2*P[G].maxh>W)&&(Zt=G);Zt===!1&&(P.push({width:0,minh:999999,maxh:0,editors:[]}),Zt=P.length-1),P[Zt].editors.push({key:Gt,width:Ge,height:W}),P[Zt].width+=Ge,P[Zt].minh=Math.min(P[Zt].minh,W),P[Zt].maxh=Math.max(P[Zt].maxh,W)}}),t=0;t<P.length;t++)if(P[t].width<12){var ut=!1,dt=0;for(e=0;e<P[t].editors.length;e++)(ut===!1||P[t].editors[e].width>P[t].editors[ut].width)&&(ut=e),P[t].editors[e].width*=12/P[t].width,P[t].editors[e].width=Math.floor(P[t].editors[e].width),dt+=P[t].editors[e].width;dt<12&&(P[t].editors[ut].width+=12-dt),P[t].width=12}if(this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),u=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),u.appendChild(d),e=0;e<P[t].editors.length;e++)D=P[t].editors[e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t].editors[e].width),d.appendChild(J.container)}else{if(u=document.createElement("div"),x){var kt=document.createElement("div"),Ct=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),$t=this.theme.getTopTabContentHolder(Ct);for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Zt=o.theme.getTabContent(),Ge=gt.schema&&(gt.schema.type==="object"||gt.schema.type==="array");Zt.isObjOrArray=Ge;var W=o.theme.getGridRow();gt.tab||(o.basicPane===void 0?o.addRow(gt,Ct,Zt):o.addRow(gt,Ct,o.basicPane)),Zt.id=o.getValidId(gt.tab_text.textContent),Ge?(Zt.appendChild(W),$t.appendChild(Zt),o.theme.addTopTab(Ct,gt.tab)):(kt.appendChild(W),$t.childElementCount>0?$t.firstChild.isObjOrArray&&(Zt.appendChild(kt),$t.insertBefore(Zt,$t.firstChild),o.theme.insertBasicTopTab(gt.tab,Ct),gt.basicPane=Zt):(Zt.appendChild(kt),$t.appendChild(Zt),o.theme.addTopTab(Ct,gt.tab),gt.basicPane=Zt)),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),W.appendChild(gt.container),gt.rowPane=Zt}});this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var ne=this.tabs_holder.parentNode;ne.removeChild(ne.firstChild),ne.appendChild(Ct),this.tabPanesContainer=$t,this.tabs_holder=Ct;var Re=this.theme.getFirstTab(this.tabs_holder);return void(Re&&O(Re,"click"))}this.property_order.forEach(function(Gt){var gt=o.editors[Gt];gt.property_removed||(d=o.theme.getGridRow(),u.appendChild(d),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),d.appendChild(gt.container))})}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(u)}}},{key:"getPropertySchema",value:function(t){var e=this,o=this.schema.properties[t]||{};o=k({},o);var u=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(function(d){new RegExp(d).test(t)&&(o.allOf=o.allOf||[],o.allOf.push(e.schema.patternProperties[d]),u=!0)}),!u&&this.schema.additionalProperties&&Br(this.schema.additionalProperties)==="object"&&(o=k({},this.schema.additionalProperties)),o}},{key:"preBuild",value:function(){var t=this;if(Ar(vr(l.prototype),"preBuild",this).call(this),this.editors={},this.cached_editors={},this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)Object.entries(this.schema.properties).forEach(function(e){var o=En(e,2),u=o[0],d=o[1],x=t.jsoneditor.getEditorClass(d);t.editors[u]=t.jsoneditor.createEditor(x,{jsoneditor:t.jsoneditor,schema:d,path:"".concat(t.path,".").concat(u),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[u].preBuild();var P=t.editors[u].options.hidden?0:t.editors[u].options.grid_columns||t.editors[u].getNumColumns();t.minwidth+=P,t.maxwidth+=P}),this.no_link_holder=!0;else{if(this.options.table)throw new Error("Not supported yet");this.schema.defaultProperties||(this.jsoneditor.options.display_required_only||this.options.display_required_only?this.schema.defaultProperties=Object.keys(this.schema.properties).filter(function(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})}):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach(function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(e,o){var u=t.editors[e].schema.propertyOrder,d=t.editors[o].schema.propertyOrder;return typeof u!="number"&&(u=1e3),typeof d!="number"&&(d=1e3),u-d})}},{key:"addTab",value:function(t){var e=this,o=this.rows[t].schema&&(this.rows[t].schema.type==="object"||this.rows[t].schema.type==="array");this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=o?this.rows[t].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",function(u){e.active_tab=e.rows[t].tab,e.refreshTabs(),u.preventDefault(),u.stopPropagation()}))}},{key:"addRow",value:function(t,e,o){var u=this.rows.length,d=t.schema.type==="object"||t.schema.type==="array";this.rows[u]=t,this.rows[u].rowPane=o,d?(this.addTab(u),this.theme.addTopTab(e,this.rows[u].tab)):this.basicTab===void 0?(this.addTab(u),this.basicTab=u,this.basicPane=o,this.theme.addTopTab(e,this.rows[u].tab)):(this.rows[u].tab=this.rows[this.basicTab].tab,this.rows[u].tab_text=this.rows[this.basicTab].tab_text,this.rows[u].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,o=this.basicTab!==void 0,u=!1;this.rows.forEach(function(d){d.tab&&d.rowPane&&d.rowPane.parentNode&&(o&&d.tab===e.rows[e.basicTab].tab&&u||(t?d.tab_text.textContent=d.getHeaderText():(o&&d.tab===e.rows[e.basicTab].tab&&(u=!0),d.tab===e.active_tab?e.theme.markTabActive(d):e.theme.markTabInactive(d))))})}},{key:"build",value:function(){var t=this,e=this.format==="categories";if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach(function(u){var d=En(u,2),x=d[0],P=d[1],D=t.theme.getTableCell();t.editor_holder.appendChild(D),P.setContainer(D),P.build(),P.postBuild(),P.setOptInCheckbox(P.header),P.setValue(P.getDefault(),!0),t.editors[x].options.hidden&&(D.style.display="none"),t.editors[x].options.input_width&&(D.style.width=t.editors[x].options.input_width)});else{if(this.options.table)throw new Error("Not supported yet");this.header="",this.options.compact||(this.header=document.createElement("label"),this.header.textContent=this.getTitle()),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.title.classList.add("je-object__title"),this.controls=this.theme.getButtonHolder(),this.controls.classList.add("je-object__controls"),this.container.appendChild(this.title),this.container.appendChild(this.controls),this.container.classList.add("je-object__container"),this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.classList.add("je-edit-json--textarea"),this.editjson_save=this.getButton("button_save","save","button_save"),this.editjson_save.classList.add("json-editor-btntype-save"),this.editjson_save.addEventListener("click",function(u){u.preventDefault(),u.stopPropagation(),t.saveJSON()}),this.editjson_copy=this.getButton("button_copy","copy","button_copy"),this.editjson_copy.classList.add("json-editor-btntype-copy"),this.editjson_copy.addEventListener("click",function(u){u.preventDefault(),u.stopPropagation(),t.copyJSON()}),this.editjson_cancel=this.getButton("button_cancel","cancel","button_cancel"),this.editjson_cancel.classList.add("json-editor-btntype-cancel"),this.editjson_cancel.addEventListener("click",function(u){u.preventDefault(),u.stopPropagation(),t.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_copy),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.classList.add("property-selector"),this.addproperty_add=this.getButton("button_add","add","button_add"),this.addproperty_add.classList.add("json-editor-btntype-add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.classList.add("property-selector-input"),this.addproperty_add.addEventListener("click",function(u){if(u.preventDefault(),u.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable(),t.onChange(!0)}}),this.addproperty_input.addEventListener("input",function(u){u.target.previousSibling.childNodes.forEach(function(d){var x=d.innerText,P=u.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(x=x.toLowerCase(),P=P.toLowerCase()),x.includes(P)?d.style.display="":d.style.display="none"})}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var o=document.createElement("div");o.style.clear="both",this.addproperty_holder.appendChild(o),this.onOutsideModalClickListener=this.onOutsideModalClick.bind(this),document.addEventListener("click",this.onOutsideModalClickListener,!0),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),e?(this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTopTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.tabs_holder)):(this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.row_container)),Object.values(this.editors).forEach(function(u){var d=t.theme.getTabContent(),x=t.theme.getGridColumn(),P=!(!u.schema||u.schema.type!=="object"&&u.schema.type!=="array");if(d.isObjOrArray=P,e){if(P){var D=t.theme.getGridContainer();D.appendChild(x),d.appendChild(D),t.tabPanesContainer.appendChild(d),t.row_container=D}else t.row_container_basic===void 0&&(t.row_container_basic=t.theme.getGridContainer(),d.appendChild(t.row_container_basic),t.tabPanesContainer.childElementCount===0?t.tabPanesContainer.appendChild(d):t.tabPanesContainer.insertBefore(d,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(x);t.addRow(u,t.tabs_holder,d),d.id=t.getValidId(u.schema.title)}else t.row_container.appendChild(x);u.setContainer(x),u.build(),u.postBuild(),u.setOptInCheckbox(u.header)}),this.rows[0]&&O(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse","button_collapse"),this.collapse_control.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(this.collapse_control,this.title.childNodes[0]),this.collapse_control.addEventListener("click",function(u){u.preventDefault(),u.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.collapse_control,"","collapse","button_collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand","button_expand"))}),this.options.collapsed&&O(this.collapse_control,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.collapse_control.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.collapse_control.style.display="none"),this.editjson_control=this.getButton("JSON","edit","button_edit_json"),this.editjson_control.classList.add("json-editor-btntype-editjson"),this.editjson_control.addEventListener("click",function(u){u.preventDefault(),u.stopPropagation(),t.toggleEditJSON()}),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&this.schema.options.disable_edit_json!==void 0?this.schema.options.disable_edit_json&&(this.editjson_control.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_control.style.display="none"),this.addproperty_button=this.getButton("properties","edit_properties","button_object_properties"),this.addproperty_button.classList.add("json-editor-btntype-properties"),this.addproperty_button.addEventListener("click",function(u){u.preventDefault(),u.stopPropagation(),t.toggleAddProperty()}),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties()}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach(function(u){t.editor_holder.appendChild(t.editors[u].container)})):(this.layoutEditors(),this.layoutEditors())}},{key:"deactivateNonRequiredProperties",value:function(){var t=this,e=this.jsoneditor.options.show_opt_in,o=this.options.show_opt_in!==void 0,u=o&&this.options.show_opt_in===!0,d=o&&this.options.show_opt_in===!1;(u||!d&&e||!o&&e)&&Object.entries(this.editors).forEach(function(x){var P=En(x,2),D=P[0],J=P[1];t.isRequiredObject(J)||t.editors[D].deactivate()})}},{key:"showEditJSON",value:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left="".concat(this.editjson_control.offsetLeft,"px"),this.editjson_holder.style.top="".concat(this.editjson_control.offsetTop+this.editjson_control.offsetHeight,"px"),this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_control.disabled=!1,this.editing_json=!0)}},{key:"hideEditJSON",value:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}},{key:"copyJSON",value:function(){if(this.editjson_holder){var t=document.createElement("textarea");t.value=this.editjson_textarea.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON(),this.onChange(!0)}catch(e){throw window.alert("invalid JSON"),e}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(t,e,o){var u;this.schema.properties[t]&&(u=this.schema.properties[t].propertyOrder),typeof u!="number"&&(u=1e3),e.propertyOrder=u;for(var d=0;d<o.childNodes.length;d++){var x=o.childNodes[d];if(e.propertyOrder<x.propertyOrder){this.addproperty_list.insertBefore(e,x),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,o=this,u=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var d=this.theme.getCheckboxLabel(e),x=this.theme.getFormControl(d,u);return x.style.paddingBottom=x.style.marginBottom=x.style.paddingTop=x.style.marginTop=0,x.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,x,this.addproperty_list),u.checked=t in this.editors,u.addEventListener("change",function(){u.checked?o.addObjectProperty(t):o.removeObjectProperty(t),o.onChange(!0)}),this.addproperty_checkboxes[t]=u,u}},{key:"showAddProperty",value:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left="".concat(this.addproperty_button.offsetLeft,"px"),this.addproperty_holder.style.top="".concat(this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight,"px"),this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())}},{key:"hideAddProperty",value:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)}},{key:"toggleAddProperty",value:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()}},{key:"removeObjectProperty",value:function(t){this.editors[t]&&(this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors())}},{key:"getSchemaOnMaxDepth",value:function(t){return Object.keys(t).reduce(function(e,o){switch(o){case"$ref":return e;case"properties":case"items":return cn(cn({},e),{},yi({},o,{}));case"additionalProperties":case"propertyNames":return cn(cn({},e),{},yi({},o,!0));default:return cn(cn({},e),{},yi({},o,t[o]))}},{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find(function(P){return new RegExp(P).test(t)})))return;var o=this.getPropertySchema(t);typeof o.propertyOrder!="number"&&(o.propertyOrder=Object.keys(this.editors).length+1e3);var u=this.jsoneditor.getEditorClass(o),d=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:d&&this.currentDepth>=d?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var x=this.theme.getChildEditorHolder();this.editor_holder.appendChild(x),this.editors[t].setContainer(x),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(u.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){var e=t.path||t.composedPath&&t.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(e[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),Ar(vr(l.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:Br(this.schema.additionalProperties)==="object"&&this.schema.additionalProperties!==null||(typeof this.options.no_additional_properties=="boolean"?!this.options.no_additional_properties:typeof this.jsoneditor.options.no_additional_properties!="boolean"||!this.jsoneditor.options.no_additional_properties)}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach(function(t){return t.destroy()}),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,document.removeEventListener("click",this.onOutsideModalClickListener,!0),Ar(vr(l.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=Ar(vr(l.prototype),"getValue",this).call(this);return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach(function(e){var o;((o=t[e])===void 0||o===""||o===Object(o)&&Object.keys(o).length===0&&o.constructor===Object)&&delete t[e]}),t}}},{key:"refreshValue",value:function(){var t=this;this.value={},this.editors&&(Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&(t.editors[e].refreshValue(),t.value[e]=t.editors[e].getValue())}),Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&t.activateDependentRequired(t.editors[e].key)}),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(t){var e=this;this.getDependentRequired(t).forEach(function(o){var u;Object.entries(e.cached_editors).forEach(function(d){var x=En(d,2),P=(x[0],x[1]);P.key===o&&(u=P)}),u&&!u.isActive()&&u.activate()})}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&S(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,o=0,u=!1;Object.keys(this.editors).forEach(function(d){return o++}),e=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&o>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach(function(d){t.addPropertyCheckbox(d),t.isRequiredObject(t.cached_editors[d])&&d in t.editors&&(t.addproperty_checkboxes[d].disabled=!0),t.schema.minProperties!==void 0&&o<=t.schema.minProperties?(t.addproperty_checkboxes[d].disabled=t.addproperty_checkboxes[d].checked,t.addproperty_checkboxes[d].checked||(u=!0)):d in t.editors?u=!0:e||S(t.schema.properties,d)?(t.addproperty_checkboxes[d].disabled=!1,u=!0):t.addproperty_checkboxes[d].disabled=!0}),this.canHaveAdditionalProperties()&&(u=!0),Object.keys(this.schema.properties).forEach(function(d){t.cached_editors[d]||(u=!0,t.addPropertyCheckbox(d))}),u?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!e:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(t){if(t)return typeof t.schema.required=="boolean"?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(t.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(t,e){var o=this;(Br(t=t||{})!=="object"||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach(function(u){var d=En(u,2),x=d[0],P=d[1];t[x]!==void 0?(o.addObjectProperty(x),P.setValue(t[x],e),P.activate()):e||o.isRequiredObject(P)?P.setValue(P.getDefault(),e):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?P.deactivate():o.removeObjectProperty(x)}),Object.entries(t).forEach(function(u){var d=En(u,2),x=d[0],P=d[1];o.cached_editors[x]||(o.addObjectProperty(x),o.editors[x]&&o.editors[x].setValue(P,e,!!o.editors[x].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,o=[],u=[];t.forEach(function(d){d.path===e.path?o.push(d):u.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){d.errorcount&&d.errorcount>1&&(d.message+=" (".concat(d.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.options.table_row&&(o.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach(function(d){d.showValidationErrors(u)})}}])&&ua(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F);function Wn(c){return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wn(c)}function vl(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Wn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wn(h)==="symbol"?h:String(h)),i)}var h}function Zn(){return Zn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=V(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Zn.apply(this,arguments)}function ha(c,n){return ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ha(c,n)}function V(c){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},V(c)}bi.rules={".je-object__title":"display:inline-block",".je-object__controls":"margin:0%200%200%2010px",".je-object__container":"position:relative",".je-object__property-checkbox":"margin:0;height:auto",".property-selector":"width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",".property-selector-input":"width:220px;margin-bottom:0;display:inline-block",".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-edit-json--textarea":"height:170px;width:300px;display:block"};var at=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ha(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=V(i);if(h){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Wn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"preBuild",value:function(){Zn(V(l.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var t=this;this.label="",this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.radioContainer=document.createElement("div"),this.radioGroup=[];for(var e=function(J){t.setValue(J.currentTarget.value),t.onChange(!0)},o=0;o<this.enum_values.length;o++){var u={id:"".concat(this.formname,"[").concat(o,"]"),value:this.enum_values[o]};this.jsoneditor.options.use_name_attributes&&(u.name=this.formname),this.input=this.theme.getFormRadio(u),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var d=this.theme.getFormRadioLabel(this.enum_display[o]);d.htmlFor=this.input.id;var x=this.theme.getFormRadioControl(d,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(x)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var P=0;P<this.radioGroup.length;P++)this.radioGroup[P].disabled=!0;this.radioContainer.classList.add("readonly")}var D=this.theme.getContainer();D.appendChild(this.radioContainer),D.dataset.containerFor="radio",this.input=D,this.control=this.theme.getFormControl(this.label,D,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),Zn(V(l.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.radioContainer.classList.add("readonly"),Zn(V(l.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.radioContainer.parentNode&&this.radioContainer.parentNode.parentNode&&this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Zn(V(l.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(t){typeof t!="string"&&(t=String(t));for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0,this.value=t,this.onChange();break}}}])&&vl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function Ot(c){return Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ot(c)}function ve(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ot(h)==="symbol"?h:String(h)),i)}var h}function we(){return we=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=He(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},we.apply(this,arguments)}function le(c,n){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},le(c,n)}function He(c){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},He(c)}var ao=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=He(i);if(h){var o=He(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=we(He(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.sceditor_instance&&this.sceditor_instance.val(u.value)}},{key:"build",value:function(){this.options.format="textarea",we(He(l.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t=this;if(window.sceditor){var e=this.expandCallbacks("sceditor",k({},{format:this.input_type,emoticonsEnabled:!1,width:"100%",height:300,readOnly:this.schema.readOnly||this.schema.readonly||this.schema.template},this.defaults.options.sceditor||{},this.options.sceditor||{},{element:this.input})),o=window.sceditor.instance(this.input);o===void 0&&window.sceditor.create(this.input,e),this.sceditor_instance=o||window.sceditor.instance(this.input),this.sceditor_instance.blur(function(){t.value=t.sceditor_instance.val(),t.sceditor_instance.updateOriginal(),t.is_dirty=!0,t.onChange(!0)}),this.theme.afterInputReady(this.input)}else we(He(l.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.sceditor_instance&&this.sceditor_instance.readOnly(!1),we(He(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),we(He(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),we(He(l.prototype),"destroy",this).call(this)}}])&&ve(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function so(c){return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(c)}function Fp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(so(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(so(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),so(h)==="symbol"?h:String(h)),i)}var h}function vi(){return vi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=un(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},vi.apply(this,arguments)}function gl(c,n){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},gl(c,n)}function un(c){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},un(c)}var Vp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=un(i);if(h){var o=un(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(so(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){if(this.select2_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.select2v4?this.select2_instance.val(o).trigger("change"):this.select2_instance.select2("val",o),this.onChange(!0)}else vi(un(l.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var e=this.expandCallbacks("select2",k({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=e.tags=!!e.tags&&this.schema.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(o),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}vi(un(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e,o=this.typecast(t),u=!1;return this.enum_values.includes(o)||o===""||(this.enum_options.push("".concat(o)),this.enum_display.push("".concat(o)),this.enum_values.push(o),this.schema.enum.push(o),(e=this.input.querySelector('option[value="'.concat(o,'"]')))?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(o,o,!1,!1)).trigger("change"),u=!0),u}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),vi(un(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),vi(un(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),vi(un(l.prototype),"destroy",this).call(this)}}])&&Fp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function lo(c){return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lo(c)}function zp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(lo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(lo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),lo(h)==="symbol"?h:String(h)),i)}var h}function Jn(){return Jn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Kr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Jn.apply(this,arguments)}function wl(c,n){return wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},wl(c,n)}function Kr(c){return Kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kr(c)}var Up=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Kr(i);if(h){var o=Kr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(lo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e){if(this.selectize_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.selectize_instance.clear(!0),this.selectize_instance.setValue(o),this.onChange(!0)}else Jn(Kr(l.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var e=this.expandCallbacks("selectize",k({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=e.create=!!e.create&&this.schema.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){t.updateValue(o),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Jn(Kr(l.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),o=!1;return this.enum_values.includes(e)||e===""||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),o=!0),o}},{key:"onWatchedFieldChange",value:function(){var t=this;Jn(Kr(l.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach(function(e,o){t.selectize_instance.addOption({value:e,text:t.enum_display[o]})}),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Jn(Kr(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Jn(Kr(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Jn(Kr(l.prototype),"destroy",this).call(this)}}])&&zp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(hi);function co(c){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},co(c)}function qp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),co(h)==="symbol"?h:String(h)),i)}var h}function _l(c,n){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},_l(c,n)}function ws(c){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ws(c)}var Gp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_l(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ws(i);if(h){var o=ws(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)));var e=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var o=document.createElement("div");o.classList.add("signature-container");var u=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&u.setAttribute("name",e),u.classList.add("signature"),o.appendChild(u),this.signaturePad=new window.SignaturePad(u),this.signaturePad.onEnd=function(){t.signaturePad.isEmpty()?t.input.value="":t.input.value=t.signaturePad.toDataURL(),t.is_dirty=!0,t.refreshValue(),t.watch_listener(),t.jsoneditor.notifyWatchers(t.path),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange()};var d=document.createElement("div"),x=document.createElement("button");x.classList.add("tiny","button"),x.innerHTML="Clear signature",d.appendChild(x),o.appendChild(d),this.options.compact&&this.container.setAttribute("class","".concat(this.container.getAttribute("class")," compact")),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach(function(D){u.setAttribute("readOnly","readOnly"),D.disabled=!0})),x.addEventListener("click",function(D){D.preventDefault(),D.stopPropagation(),t.signaturePad.clear(),t.signaturePad.strokeEnd()}),this.control=this.theme.getFormControl(this.label,o,this.description),this.container.appendChild(this.control),this.refreshValue(),u.width=o.offsetWidth,this.options&&this.options.canvas_height?u.height=this.options.canvas_height:u.height="300"}else{var P=document.createElement("p");P.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(P)}}},{key:"setValue",value:function(t){if(typeof SignaturePad=="function"){var e=this.sanitize(t);return this.value===e?void 0:(this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&t!==""&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&qp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function uo(c){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uo(c)}function Wp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(uo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(uo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),uo(h)==="symbol"?h:String(h)),i)}var h}function Yn(){return Yn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Qr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Yn.apply(this,arguments)}function xl(c,n){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},xl(c,n)}function Qr(c){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qr(c)}_(2564);var Zp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qr(i);if(h){var o=Qr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(uo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"setValue",value:function(t,e,o){var u=Yn(Qr(l.prototype),"setValue",this).call(this,t,e,o);u!==void 0&&u.changed&&this.simplemde_instance&&this.simplemde_instance.value(u.value)}},{key:"build",value:function(){this.options.format="textarea",Yn(Qr(l.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.SimpleMDE?(t=this.expandCallbacks("simplemde",k({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",function(){e.value=e.simplemde_instance.value(),e.is_dirty=!0,e.onChange(!0)}),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Yn(Qr(l.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),Yn(Qr(l.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Yn(Qr(l.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Yn(Qr(l.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(t,e){function o(){t.display.wrapper.offsetHeight?(this.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(o,e.delay)}e.timeout=window.setTimeout(o,e.delay),e.hurry=function(){window.clearTimeout(e.timeout),e.timeout=window.setTimeout(o,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}},{key:"stopListening",value:function(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}])&&Wp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function ho(c){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ho(c)}function Jp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ho(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ho(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ho(h)==="symbol"?h:String(h)),i)}var h}function kl(){return kl=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=po(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},kl.apply(this,arguments)}function jl(c,n){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},jl(c,n)}function po(c){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},po(c)}var Su=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=po(i);if(h){var o=po(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(ho(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),this.schema.enum===void 0){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var o=0;o<e;o++)this.enum_values.push(o+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var u=function(ut){ut.preventDefault(),ut.stopPropagation(),t.setValue(ut.currentTarget.value),t.onChange(!0)},d=this.enum_values.length-1;d>-1;d--){var x=this.formname+(d+1),P=this.theme.getFormInputField("radio");P.name="".concat(this.formname,"[starrating]"),P.value=this.enum_values[d],P.id=x,P.addEventListener("change",u,!1),this.radioGroup.push(P);var D=document.createElement("label");D.htmlFor=x,D.title=this.enum_values[d],this.options.displayValue&&D.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(P),this.ratingContainer.appendChild(D)}if(this.options.displayValue&&(this.displayRating=document.createElement("div"),this.displayRating.classList.add("starrating-display"),this.displayRating.innerText=this.enum_values[0],this.ratingContainer.appendChild(this.displayRating)),this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var J=0;J<this.radioGroup.length;J++)this.radioGroup[J].disabled=!0;this.ratingContainer.classList.add("readonly")}var nt=this.theme.getContainer();nt.appendChild(this.ratingContainer),this.input=nt,this.control=this.theme.getFormControl(this.label,nt,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}},{key:"destroy",value:function(){this.ratingContainer.parentNode&&this.ratingContainer.parentNode.parentNode&&this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),kl(po(l.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.type==="integer"?this.value===""?void 0:1*this.value:this.value}},{key:"setValue",value:function(t){for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value==="".concat(t)){this.radioGroup[e].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value),this.onChange(!0);break}}}])&&Jp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K);function fo(c){return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fo(c)}function Yp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(fo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(fo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),fo(h)==="symbol"?h:String(h)),i)}var h}function da(){return da=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Xn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},da.apply(this,arguments)}function Ol(c,n){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ol(c,n)}function Xn(c){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xn(c)}Su.rules={".starrating":"direction:rtl;display:inline-block;white-space:nowrap",".starrating > input":"display:none",".starrating > label:before":"content:'%5C2606';margin:1px;font-size:18px;font-style:normal;font-weight:400;line-height:1;font-family:'Arial';display:inline-block",".starrating > label":"color:%23888;cursor:pointer;margin:8px%200%202px%200",".starrating > label.starrating-display-enabled":"margin:1px%200%200%200",".starrating > input:checked ~ label":"color:%23ffca08",".starrating:not(.readonly) > input:hover ~ label":"color:%23ffca08",".starrating > input:checked ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating:not(.readonly) > input:hover ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating .starrating-display":"position:relative;direction:rtl;text-align:center;font-size:10px;line-height:0px"};var Xp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ol(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xn(i);if(h){var o=Xn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(fo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"build",value:function(){da(Xn(l.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){da(Xn(l.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){da(Xn(l.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&Yp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(bs);function mo(c){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mo(c)}function Kp(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(mo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(mo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),mo(h)==="symbol"?h:String(h)),i)}var h}function gi(){return gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=hn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},gi.apply(this,arguments)}function El(c,n){return El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},El(c,n)}function hn(c){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hn(c)}var Qp=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&El(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=hn(i);if(h){var o=hn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(mo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,f=[{key:"register",value:function(){if(gi(hn(l.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(gi(hn(l.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,gi(hn(l.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){this.tableContainer=this.theme.getTableContainer(),this.table=this.theme.getTable(),this.tableContainer.appendChild(this.table),this.container.appendChild(this.tableContainer),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var t=this.getElementEditor(0,!0);if(this.item_default=t.getDefault(),this.width=t.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.tableContainer),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls),this.item_has_child_editors)for(var e=t.getChildEditors(),o=t.property_order||Object.keys(e),u=0;u<o.length;u++){var d=this.theme.getTableHeaderCell(e[o[u]].getTitle());e[o[u]].options.hidden&&(d.style.display="none"),this.header_row.appendChild(d)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=this.theme.getTableHeaderCell(" "),this.controls_header_cell.setAttribute("aria-hidden","true"),this.header_row.appendChild(this.controls_header_cell),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),gi(hn(l.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return k({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var o=k({},this.schema.items),u=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.row_holder.appendChild(this.theme.getTableRow()),x=d;this.item_has_child_editors||(x=this.theme.getTableCell(),d.appendChild(x));var P=this.jsoneditor.createEditor(u,{jsoneditor:this.jsoneditor,schema:o,container:x,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return P.preBuild(),e||(P.build(),P.postBuild(),P.controls_cell=d.appendChild(this.theme.getTableCell()),P.row=d,P.table_controls=this.theme.getButtonHolder(),P.controls_cell.appendChild(P.table_controls),P.table_controls.style.margin=0,P.table_controls.style.padding=0),P}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,gi(hn(l.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());return this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){var u=!1;e.forEach(function(P,D){t.rows[D]?t.rows[D].setValue(P):(t.addRow(P),u=!0)});for(var d=e.length;d<this.rows.length;d++){var x=this.rows[d].container;this.item_has_child_editors||this.rows[d].row.parentNode.removeChild(this.rows[d].row),this.rows[d].destroy(),x.parentNode&&x.parentNode.removeChild(x),this.rows[d]=null,u=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(u||o)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,o=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,u=[];this.rows.forEach(function(nt,ut){if(nt.delete_button){var dt=!e;t.setButtonState(nt.delete_button,dt),u.push(dt)}if(nt.copy_button){var kt=!o;t.setButtonState(nt.copy_button,kt),u.push(kt)}if(nt.moveup_button){var Ct=ut!==0;t.setButtonState(nt.moveup_button,Ct),u.push(Ct)}if(nt.movedown_button){var $t=ut!==t.rows.length-1;t.setButtonState(nt.movedown_button,$t),u.push($t)}});var d=u.some(function(nt){return nt});this.rows.forEach(function(nt){return t.setButtonState(nt.controls_cell,d)}),this.setButtonState(this.controls_header_cell,d),this.setButtonState(this.table,this.value.length);var x=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,x);var P=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,P);var D=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,D);var J=x||P||D;this.setButtonState(this.controls,J)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach(function(e,o){t.value[o]=e.getValue()}),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var o=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,o)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,o)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,o)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,o)),t!==void 0&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var o=this,u=this.getButton("","delete","button_delete_row_title_short");return u.classList.add("delete","json-editor-btntype-delete"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue(),D=o.getValue()[x];P.splice(x,1),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("deleteRow",D)}),e.appendChild(u),u}},{key:"_createCopyButton",value:function(t,e){var o=this,u=this.getButton("","copy","button_copy_row_title_short"),d=this.schema;return u.classList.add("copy","json-editor-btntype-copy"),u.setAttribute("data-i",t),u.addEventListener("click",function(x){x.preventDefault(),x.stopPropagation();var P=1*x.currentTarget.getAttribute("data-i"),D=o.getValue(),J=D[P];d.items.type==="string"&&d.items.format==="uuid"?J=R():d.items.type==="object"&&d.items.properties&&D.forEach(function(nt,ut){if(P===ut)for(var dt=0,kt=Object.keys(nt);dt<kt.length;dt++){var Ct=kt[dt];d.items.properties&&d.items.properties[Ct]&&d.items.properties[Ct].format==="uuid"&&((J=Object.assign({},D[P]))[Ct]=R())}}),D.splice(P+1,0,J),o.setValue(D),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[P+1])}),e.appendChild(u),u}},{key:"_createMoveUpButton",value:function(t,e){var o=this,u=this.getButton("","moveup","button_move_up_title");return u.classList.add("moveup","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(x-1,0,P.splice(x,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x-1])}),e.appendChild(u),u}},{key:"_createMoveDownButton",value:function(t,e){var o=this,u=this.getButton("","movedown","button_move_down_title");return u.classList.add("movedown","json-editor-btntype-move"),u.setAttribute("data-i",t),u.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var x=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(x+1,0,P.splice(x,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[x+1])}),e.appendChild(u),u}},{key:"addControls",value:function(){var t=this;this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.title_controls&&(this.title.insertBefore(this.toggle_button,this.title.childNodes[0]),this.toggle_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setButtonState(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand","button_expand"))}),this.options.collapsed&&O(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton()}},{key:"_createToggleButton",value:function(){var t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var u=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",u)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var u=t.getValue(),d=u.pop();t.setValue(u),t.onChange(!0),t.jsoneditor.trigger("deleteRow",d)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var u=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",u)}),this.controls.appendChild(e),e}}],f&&Kp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Ut);function yo(c){return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yo(c)}function tf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(yo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(yo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),yo(h)==="symbol"?h:String(h)),i)}var h}function pa(){return pa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Kn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},pa.apply(this,arguments)}function Cl(c,n){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Cl(c,n)}function Kn(c){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kn(c)}function bo(c){return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bo(c)}function ef(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(bo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(bo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),bo(h)==="symbol"?h:String(h)),i)}var h}function fa(){return fa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Qn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},fa.apply(this,arguments)}function Sl(c,n){return Sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Sl(c,n)}function Qn(c){return Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qn(c)}function vo(c){return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vo(c)}function rf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(vo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(vo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),vo(h)==="symbol"?h:String(h)),i)}var h}function wi(){return wi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=dn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},wi.apply(this,arguments)}function Pl(c,n){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Pl(c,n)}function dn(c){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(c)}_(6977);var _s={ace:Et,array:Ut,arrayChoices:cr,arraySelect2:pr,arraySelectize:Ze,autocomplete:Dn,base64:Vi,button:hs,checkbox:ps,choices:rt,datetime:vt,describedBy:ir,enum:$e,hidden:fs,info:qi,integer:bs,ip:ra,jodit:vs,multiple:to,multiselect:qt,null:ca,number:ys,object:bi,radio:at,sceditor:ao,select:hi,select2:Vp,selectize:Up,signature:Gp,simplemde:Zp,starrating:Su,stepper:Xp,string:K,table:Qp,upload:function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Kn(i);if(h){var o=Kn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(yo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",k({},{title:"Browse",icon:"",auto_upload:!1,hide_input:!1,enable_drag_drop:!1,drop_zone_text:"Drag & Drop file here",drop_zone_top:!1,alt_drop_zone:"",mime_type:"",max_upload_size:0,upload_handler:function(u,d,x,P){window.alert('No upload_handler defined for "'.concat(u.path,'". You must create your own handler to enable upload to server'))}},this.defaults.options.upload||{},this.options.upload||{})),this.options.mime_type=this.options.mime_type?[].concat(this.options.mime_type):[],this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(typeof this.options.upload_handler!="function")throw new Error("Upload handler required for upload editor");if(this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.options.mime_type.length&&this.uploader.setAttribute("accept",this.options.mime_type),this.options.enable_drag_drop===!0&&this.options.hide_input===!0||(this.clickHandler=function(u){t.uploader.dispatchEvent(new window.MouseEvent("click",{view:window,bubbles:!0,cancelable:!1}))},this.browseButton=this.getButton(this.options.title,this.options.icon,this.options.title),this.browseButton.addEventListener("click",this.clickHandler),this.fileDisplay=this.theme.getFormInputField("input"),this.fileDisplay.setAttribute("readonly",!0),this.fileDisplay.value="No file selected.",this.fileDisplay.addEventListener("dblclick",this.clickHandler),this.fileUploadGroup=this.theme.getInputGroup(this.fileDisplay,[this.browseButton]),this.fileUploadGroup||(this.fileUploadGroup=document.createElement("div"),this.fileUploadGroup.appendChild(this.fileDisplay),this.fileUploadGroup.appendChild(this.browseButton))),this.options.enable_drag_drop===!0){if(this.options.alt_drop_zone!==""){if(this.altDropZone=document.querySelector(this.options.alt_drop_zone),!this.altDropZone)throw new Error('Error: alt_drop_zone selector "'.concat(this.options.alt_drop_zone,'" not found!'));this.dropZone=this.altDropZone}else this.dropZone=this.theme.getDropZone(this.options.drop_zone_text);this.dropZone&&(this.dropZone.classList.add("upload-dropzone"),this.dropZone.addEventListener("dblclick",this.clickHandler))}this.uploadHandler=function(u){u.preventDefault(),u.stopPropagation();var d=u.target.files||u.dataTransfer.files;if(d&&d.length)if(t.options.max_upload_size!==0&&d[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=d[0].name);var x=new window.FileReader;x.onload=function(P){t.preview_value=P.target.result,t.refreshPreview(d),t.onChange(!0),x=null},x.readAsDataURL(d[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(u){var d=u.dataTransfer.items||u.dataTransfer.files,x=d&&d.length&&(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)),P=u.currentTarget.classList&&u.currentTarget.classList.contains("upload-dropzone")&&x;switch((u.currentTarget===window?"w_":"e_")+u.type){case"w_drop":case"w_dragover":P||(u.dataTransfer.dropEffect="none");break;case"e_dragenter":P?(t.dropZone.classList.add("valid-dropzone"),u.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":P&&(u.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),P&&t.uploadHandler(u)}P||u.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(u){window.addEventListener(u,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(u){t.dropZone.addEventListener(u,t.dragHandler,!0)}))}this.preview=document.createElement("div"),this.control=this.input.controlgroup=this.theme.getFormControl(this.label,this.uploader||this.input,this.description,this.infoButton),this.uploader&&(this.uploader.controlgroup=this.control);var e=this.uploader||this.input,o=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&o.appendChild(this.dropZone),this.fileUploadGroup&&o.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&o.appendChild(this.dropZone),o.appendChild(this.preview),e.parentNode.insertBefore(o,e.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.afterInputReady()})}},{key:"afterInputReady",value:function(){var t=this;if(this.value){var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.onload=function(o){t.preview.appendChild(e)},e.onerror=function(o){console.error("upload error",o,o.currentTarget)},e.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(t){var e=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var o=t[0],u=this.preview_value.match(/^data:([^;,]+)[;,]/);if(o.mimeType=u?u[1]:"unknown",o.size>0){var d=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,d)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d])}else o.formattedSize="0 Bytes";var x=this.getButton("button_upload","upload","button_upload");x.addEventListener("click",function(P){P.preventDefault(),x.setAttribute("disabled","disabled"),e.theme.removeInputError(e.uploader),e.theme.getProgressBar&&(e.progressBar=e.theme.getProgressBar(),e.preview.appendChild(e.progressBar)),e.options.upload_handler(e.path,o,{success:function(D){e.setValue(D),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),x.removeAttribute("disabled")},failure:function(D){e.theme.addInputError(e.uploader,D),e.progressBar&&e.preview.removeChild(e.progressBar),x.removeAttribute("disabled")},updateProgress:function(D){e.progressBar&&(D?e.theme.updateProgressBar(e.progressBar,D):e.theme.updateProgressBarUnknown(e.progressBar))}})}),this.preview.appendChild(this.theme.getUploadPreview(o,x,this.preview_value)),this.options.auto_upload&&(x.dispatchEvent(new window.MouseEvent("click")),x.parentNode.removeChild(x))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),pa(Kn(l.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),pa(Kn(l.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var t=this;this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(e){window.removeEventListener(e,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(e){t.dropZone.removeEventListener(e,t.dragHandler,!0)}),this.dropZone.removeEventListener("dblclick",this.clickHandler),this.dropZone&&this.dropZone.parentNode&&this.dropZone.parentNode.removeChild(this.dropZone)),this.uploader&&this.uploader.parentNode&&(this.uploader.removeEventListener("change",this.uploadHandler),this.uploader.parentNode.removeChild(this.uploader)),this.browseButton&&this.browseButton.parentNode&&(this.browseButton.removeEventListener("click",this.clickHandler),this.browseButton.parentNode.removeChild(this.browseButton)),this.fileDisplay&&this.fileDisplay.parentNode&&(this.fileDisplay.removeEventListener("dblclick",this.clickHandler),this.fileDisplay.parentNode.removeChild(this.fileDisplay)),this.fileUploadGroup&&this.fileUploadGroup.parentNode&&this.fileUploadGroup.parentNode.removeChild(this.fileUploadGroup),this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.header&&this.header.parentNode&&this.header.parentNode.removeChild(this.header),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),pa(Kn(l.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce(function(o,u){return o||new RegExp(u.replace(/\*/g,".*"),"gi").test(t)},!1)}}])&&tf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(F),uuid:function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qn(i);if(h){var o=Qn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(bo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"preBuild",value:function(){fa(Qn(l.prototype),"preBuild",this).call(this),this.schema.default=this.uuid=this.getUuid(),this.schema.options||(this.schema.options={}),this.schema.options.cleave||(this.schema.options.cleave={delimiters:["-"],blocks:[8,4,4,4,12]})}},{key:"build",value:function(){fa(Qn(l.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,e,o){this.testUuid(t)||(t=this.uuid),this.uuid=t,fa(Qn(l.prototype),"setValue",this).call(this,t,e,o)}},{key:"getUuid",value:function(){return R()}},{key:"testUuid",value:function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}}])&&ef(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K),colorpicker:function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=dn(i);if(h){var o=dn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(vo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,o){var u=wi(dn(l.prototype),"setValue",this).call(this,t,e,o);return this.picker_instance&&this.picker_instance.domElement&&u&&u.changed&&this.picker_instance.setColor(u.value,!0),u}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){wi(dn(l.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(wi(dn(l.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!0}}},{key:"enable",value:function(){if(wi(dn(l.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),wi(dn(l.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(t){var e=this;if(t){if(window.Picker&&!this.picker_instance){var o=this.expandCallbacks("colorpicker",k({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),u=function(d){var x=e.picker_instance.settings.editorFormat,P=e.picker_instance.settings.alpha;e.setValue(x==="hex"?P?d.hex:d.hex.slice(0,7):d["".concat(x+(P?"a":""),"String")])};o.popup||typeof o.onChange=="function"?o.popup&&typeof o.onDone!="function"&&(o.onDone=u):o.onChange=u,this.picker_instance=new window.Picker(o),o.popup||(this.input.style.display="none",this.theme.afterInputReady(this.picker_instance.domElement))}}else this.picker_instance&&(this.picker_instance.destroy(),this.picker_instance=null,this.input.style.display="")}}])&&rf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(K)};function Pu(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}var Tu={},Tl="en",nf=Tl;Tu.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_const:"Value must be the constant value",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must be at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_contains:"No items match contains",error_minContains:"Contains match count {{0}} is less than minimum contains count of {{1}}",error_maxContains:"Contains match count {{0}} exceeds maximum contains count of {{1}}",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the pattern {{0}}",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_property_names_exceeds_maxlength:"Property name {{0}} exceeds maxLength",error_property_names_enum_mismatch:"Property name {{0}} does not match any enum values",error_property_names_const_mismatch:"Property name {{0}} does not match the const value",error_property_names_pattern_mismatch:"Property name {{0}} does not match pattern",error_property_names_false:"Property name {{0}} fails when propertyName is false",error_property_names_maxlength:"Property name {{0}} cannot match invalid maxLength",error_property_names_enum:"Property name {{0}} cannot match invalid enum",error_property_names_pattern:"Property name {{0}} cannot match invalid pattern",error_property_names_unsupported:"Unsupported propertyName {{0}}",error_dependency:"Must have property {{0}}",error_date:"Date must be in the format {{0}}",error_time:"Time must be in the format {{0}}",error_datetime_local:"Datetime must be in the format {{0}}",error_invalid_epoch:"Date must be greater than 1 January 1970",error_ipv4:"Value must be a valid IPv4 address in the form of 4 numbers between 0 and 255, separated by dots",error_ipv6:"Value must be a valid IPv6 address",error_hostname:"The hostname has the wrong format",upload_max_size:"Filesize too large. Max size is ",upload_wrong_file_format:"Wrong file format. Allowed format(s): ",button_save:"Save",button_copy:"Copy",button_cancel:"Cancel",button_add:"Add",button_delete_all:"All",button_delete_all_title:"Delete All",button_delete_last:"Last {{0}}",button_delete_last_title:"Delete Last {{0}}",button_add_row_title:"Add {{0}}",button_move_down_title:"Move down",button_move_up_title:"Move up",button_properties:"Properties",button_object_properties:"Object Properties",button_copy_row_title:"Copy {{0}}",button_delete_row_title:"Delete {{0}}",button_delete_row_title_short:"Delete",button_copy_row_title_short:"Copy",button_collapse:"Collapse",button_expand:"Expand",button_edit_json:"Edit JSON",button_upload:"Upload",flatpickr_toggle_button:"Toggle",flatpickr_clear_button:"Clear",choices_placeholder_text:"Start typing to add value",default_array_item_title:"item",button_delete_node_warning:"Are you sure you want to remove this item?"},Object.entries(_s).forEach(function(c){var n=function(h,a){return function(l){if(Array.isArray(l))return l}(h)||function(l,t){var e=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(e!=null){var o,u,d,x,P=[],D=!0,J=!1;try{if(d=(e=e.call(l)).next,t===0){if(Object(e)!==e)return;D=!1}else for(;!(D=(o=d.call(e)).done)&&(P.push(o.value),P.length!==t);D=!0);}catch(nt){J=!0,u=nt}finally{try{if(!D&&e.return!=null&&(x=e.return(),Object(x)!==x))return}finally{if(J)throw u}}return P}}(h,a)||function(l,t){if(l){if(typeof l=="string")return Pu(l,t);var e=Object.prototype.toString.call(l).slice(8,-1);return e==="Object"&&l.constructor&&(e=l.constructor.name),e==="Map"||e==="Set"?Array.from(l):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Pu(l,t):void 0}}(h,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(c,2),f=n[0],i=n[1];_s[f].options=i.options||{}});var _i={options:{upload:function(c,n,f){console.log("Upload handler required for upload editor")},use_name_attributes:!0,prompt_before_delete:!0,use_default_values:!0,max_depth:0,button_state_mode:1,case_sensitive_property_search:!0},theme:"html",template:"default",themes:{},callbacks:{},templates:{},iconlibs:{},editors:_s,languages:Tu,resolvers:j,custom_validators:[],default_language:Tl,language:nf,translate:function(c,n,f){var i={};f&&f.options&&f.options.error_messages&&f.options.error_messages[_i.language]&&(i=f.options.error_messages[_i.language]);var h=_i.languages[_i.language];if(!h)throw new Error("Unknown language ".concat(_i.language));var a=i[c]||h[c]||_i.languages[Tl][c]||c;if(n)for(var l=0;l<n.length;l++)a=a.replace(new RegExp("\\{\\{".concat(l,"}}"),"g"),n[l]);return a},translateProperty:function(c,n){return c}};function xi(){xi=function(){return c};var c={},n=Object.prototype,f=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},h=typeof Symbol=="function"?Symbol:{},a=h.iterator||"@@iterator",l=h.asyncIterator||"@@asyncIterator",t=h.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof x?G:x,Lt=Object.create(et.prototype),re=new gt(pt||[]);return i(Lt,"_invoke",{value:$t(W,Z,re)}),Lt}function u(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}c.wrap=o;var d={};function x(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ut=nt&&nt(nt(Zt([])));ut&&ut!==n&&f.call(ut,a)&&(J=ut);var dt=D.prototype=x.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,re,Pe){var Te=u(W[et],W,Lt);if(Te.type!=="throw"){var Dr=Te.arg,tn=Dr.value;return tn&&ur(tn)=="object"&&f.call(tn,"__await")?G.resolve(tn.__await).then(function(kr){Z("next",kr,re,Pe)},function(kr){Z("throw",kr,re,Pe)}):G.resolve(tn).then(function(kr){Dr.value=kr,re(Dr)},function(kr){return Z("throw",kr,re,Pe)})}Pe(Te.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function re(){return new G(function(Pe,Te){Z(et,Lt,Pe,Te)})}return pt=pt?pt.then(re,re):re()}})}function $t(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var re=Z.delegate;if(re){var Pe=ne(re,Z);if(Pe){if(Pe===d)continue;return Pe}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var Te=u(W,G,Z);if(Te.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Te.arg===d)continue;return{value:Te.arg,done:Z.done}}Te.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Te.arg)}}}function ne(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,ne(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=u(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Re(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Gt(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Re,this),this.reset(!0)}function Zt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(f.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:Ge}}function Ge(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),c.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},c.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},c.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,l,function(){return this}),c.AsyncIterator=Ct,c.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return c.isGeneratorFunction(G)?Lt:Lt.next().then(function(re){return re.done?re.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),c.keys=function(W){var G=Object(W),Z=[];for(var pt in G)Z.push(pt);return Z.reverse(),function et(){for(;Z.length;){var Lt=Z.pop();if(Lt in G)return et.value=Lt,et.done=!1,et}return et.done=!0,et}},c.values=Zt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Gt),!W)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(Te,Dr){return Lt.type="throw",Lt.arg=W,G.next=Te,Dr&&(G.method="next",G.arg=void 0),!!Dr}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var re=f.call(et,"catchLoc"),Pe=f.call(et,"finallyLoc");if(re&&Pe){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(re){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!Pe)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&f.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Gt(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Gt(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Zt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},c}function Au(c,n,f,i,h,a,l){try{var t=c[a](l),e=t.value}catch(o){return void f(o)}t.done?n(e):Promise.resolve(e).then(i,h)}function Lu(c){return function(){var n=this,f=arguments;return new Promise(function(i,h){var a=c.apply(n,f);function l(e){Au(a,i,h,l,t,"next",e)}function t(e){Au(a,i,h,l,t,"throw",e)}l(void 0)})}}function ki(c,n){return function(f){if(Array.isArray(f))return f}(c)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,l,t,e,o=[],u=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;u=!1}else for(;!(u=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);u=!0);}catch(x){d=!0,l=x}finally{try{if(!u&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw l}}return o}}(c,n)||function(f,i){if(f){if(typeof f=="string")return Ru(f,i);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?Ru(f,i):void 0}}(c,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ru(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function ur(c){return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ur(c)}function of(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ur(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ur(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ur(h)==="symbol"?h:String(h)),i)}var h}_(8733);var af=function(){function c(a){(function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")})(this,c),this.options=a||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(l){ur(l.type)==="object"&&(l.type=this._expandSubSchema(l.type))},disallow:function(l){ur(l.disallow)==="object"&&(l.disallow=this._expandSubSchema(l.disallow))},anyOf:function(l){var t=this;Object.entries(l.anyOf).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];l.anyOf[u]=t.expandSchema(d)})},dependencies:function(l){var t=this;Object.entries(l.dependencies).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];ur(d)!=="object"||Array.isArray(d)||(l.dependencies[u]=t.expandSchema(d))})},not:function(l){l.not=this.expandSchema(l.not)}},this._subSchema2={allOf:function(l,t){var e=this,o=k({},t);return Object.entries(l.allOf).forEach(function(u){var d=ki(u,2),x=d[0],P=d[1];l.allOf[x]=e.expandRefs(P,!0),o=e.extendSchemas(o,e.expandSchema(P))}),delete o.allOf,o},extends:function(l,t){var e,o=this;return delete(e=Array.isArray(l.extends)?l.extends.reduce(function(u,d,x){return o.extendSchemas(u,o.expandSchema(d))},t):this.extendSchemas(t,this.expandSchema(l.extends))).extends,e},oneOf:function(l,t){var e=this,o=k({},t);return delete o.oneOf,l.oneOf.reduce(function(u,d,x){return u.oneOf[x]=e.extendSchemas(e.expandSchema(d),o),u},t),t}}}var n,f,i,h;return n=c,f=[{key:"load",value:(h=Lu(xi().mark(function a(l,t,e){return xi().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.schema=l,o.next=3,this._asyncloadExternalRefs(l,t,this._getFileBase(e),!0);case 3:return o.abrupt("return",this.expandRefs(l));case 4:case"end":return o.stop()}},a,this)})),function(a,l,t){return h.apply(this,arguments)})},{key:"expandRefs",value:function(a,l){var t=this,e=k({},a);if(!e.$ref)return e;var o=e.$ref.split("#");if(o.length===2&&!this.refs_with_info[e.$ref]){var u=this.expandRecursivePointer(this.schema,o[1]),d=this.extendSchemas(e,this.expandSchema(u));return delete d.$ref,d}var x=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[e.$ref];delete e.$ref;var P=x.$ref.startsWith("#")?x.fetchUrl:"",D=this._getRef(P,x);if(this.refs[D]){if(l&&S(this.refs[D],"allOf")){var J=this.refs[D].allOf;Object.keys(J).forEach(function(nt){J[nt]=t.expandRefs(J[nt],!0)})}}else console.warn("reference:'".concat(D,"' not found!"));return o.length>2?this.extendSchemas(e,this.expandSchema(this.expandRecursivePointer(this.refs[D],o[2]))):this.extendSchemas(e,this.expandSchema(this.refs[D]))}},{key:"expandRecursivePointer",value:function(a,l){var t=a;return l.split("/").slice(1).forEach(function(e){t[e]&&(t=t[e])}),t.$refs&&t.$refs.startsWith("#")?this.expandRecursivePointer(a,t.$refs):t}},{key:"expandSchema",value:function(a){var l=this;Object.entries(this._subSchema1).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];a[u]&&d.call(l,a)});var t=k({},a);return Object.entries(this._subSchema2).forEach(function(e){var o=ki(e,2),u=o[0],d=o[1];a[u]&&(t=d.call(l,a,t))}),this.expandRefs(t)}},{key:"_getRef",value:function(a,l){var t=a+l;return this.refs[t]?t:a+decodeURIComponent(l.$ref)}},{key:"_expandSubSchema",value:function(a){var l=this;return Array.isArray(a)?a.map(function(t){return ur(t)==="object"?l.expandSchema(t):t}):this.expandSchema(a)}},{key:"_manageRecursivePointer",value:function(a,l){Object.keys(a).forEach(function(t){a[t].$ref&&a[t].$ref.indexOf("#")===0&&(a[t].$ref=l+a[t].$ref)})}},{key:"_getExternalRefs",value:function(a,l){var t=this,e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];e||this._manageRecursivePointer(a,l);var o={},u=function(J){return Object.keys(J).forEach(function(nt){o[nt]=!0})};if(a.$ref&&ur(a.$ref)!=="object"&&(a.$ref.indexOf("#")!==0||!e)){var d=a.$ref,x="";d.indexOf("#")>0&&(d=d.substr(0,d.indexOf("#"))),d!==a.$ref&&(x=a.$ref.substr(a.$ref.indexOf("#")));var P=this.refs_prefix+this.refs_counter++,D=P+x;a.$ref.substr(0,1)==="#"||this.refs[a.$ref]||(o[d]=!0),this.refs_with_info[P]={fetchUrl:l,$ref:d},a.$ref=D}return Object.values(a).forEach(function(J){J&&ur(J)==="object"&&(Array.isArray(J)?Object.values(J).forEach(function(nt){nt&&ur(nt)==="object"&&u(t._getExternalRefs(nt,l,e))}):J.$ref&&typeof J.$ref=="string"&&J.$ref.startsWith("#")||u(t._getExternalRefs(J,l,e)))}),a.id&&typeof a.id=="string"&&a.id.substr(0,4)==="urn:"?this.refs[a.id]=a:a.$id&&typeof a.$id=="string"&&a.$id.substr(0,4)==="urn:"&&(this.refs[a.$id]=a),o}},{key:"_getFileBase",value:function(a){if(!a)return"/";var l=this.options.ajaxBase;return l===void 0?this._getFileBaseFromFileLocation(a):l}},{key:"_getFileBaseFromFileLocation",value:function(a){var l=a.split("/");return l.pop(),"".concat(l.join("/"),"/")}},{key:"_joinUrl",value:function(a,l){var t=a;return a.substr(0,7)!=="http://"&&a.substr(0,8)!=="https://"&&a.substr(0,5)!=="blob:"&&a.substr(0,5)!=="data:"&&a.substr(0,1)!=="#"&&a.substr(0,1)!=="/"&&(t=l+a),t.indexOf("#")>0&&(t=t.substr(0,t.indexOf("#"))),t}},{key:"_isUniformResourceName",value:function(a){return a.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(i=Lu(xi().mark(function a(l,t,e){var o,u,d,x,P,D,J=this,nt=arguments;return xi().wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:o=nt.length>3&&nt[3]!==void 0&&nt[3],u=this._getExternalRefs(l,t,o),d=0,x=xi().mark(function dt(){var kt,Ct,$t,ne,Re,Gt,gt,Zt,Ge,W,G;return xi().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if((kt=D[P])!==void 0){Z.next=3;break}return Z.abrupt("return","continue");case 3:if(!J.refs[kt]){Z.next=5;break}return Z.abrupt("return","continue");case 5:if(!J._isUniformResourceName(kt)){Z.next=40;break}if(J.refs[kt]="loading",d++,Ct=J.options.urn_resolver,$t=kt,typeof Ct=="function"){Z.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat($t,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat($t));case 13:return $t.indexOf("#")>0&&($t=$t.substr(0,$t.indexOf("#"))),Z.prev=14,Z.next=17,Ct($t);case 17:ne=Z.sent,Z.prev=18,Re=JSON.parse(ne),Z.next=26;break;case 22:throw Z.prev=22,Z.t0=Z.catch(18),console.log(Z.t0),new Error("Failed to parse external ref ".concat($t));case 26:if(!(typeof Re!="boolean"&&ur(Re)!=="object"||Re===null||Array.isArray(Re))){Z.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat($t));case 28:return J.refs[kt]=Re,Z.next=31,J._asyncloadExternalRefs(Re,kt,e);case 31:Z.next=37;break;case 33:throw Z.prev=33,Z.t1=Z.catch(14),console.log(Z.t1),new Error("Failed to parse external ref ".concat($t));case 37:if(typeof ne!="boolean"){Z.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat($t));case 39:return Z.abrupt("return","continue");case 40:if(J.options.ajax){Z.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(kt));case 42:if(d++,Gt=J._joinUrl(kt,e),J.options.ajax_cache_responses&&(Zt=J.cacheGet(Gt))&&(gt=Zt),gt){Z.next=61;break}return Z.next=48,new Promise(function(pt){var et=new XMLHttpRequest;J.options.ajaxCredentials&&(et.withCredentials=J.options.ajaxCredentials),et.overrideMimeType("application/json"),et.open("GET",Gt,!0),et.onload=function(){pt(et)},et.onerror=function(Lt){pt(void 0)},et.send()});case 48:if((Ge=Z.sent)!==void 0){Z.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(kt));case 51:Z.prev=51,gt=JSON.parse(Ge.responseText),J.onSchemaLoaded({schema:gt,schemaUrl:Gt}),J.options.ajax_cache_responses&&J.cacheSet(Gt,gt),Z.next=61;break;case 57:throw Z.prev=57,Z.t2=Z.catch(51),console.log(Z.t2),new Error("Failed to parse external ref ".concat(Gt));case 61:if(!(typeof gt!="boolean"&&ur(gt)!=="object"||gt===null||Array.isArray(gt))){Z.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Gt));case 63:return J.refs[kt]=gt,W=J._getFileBaseFromFileLocation(Gt),Gt!==kt&&(G=Gt.split("/"),Gt=(kt.substr(0,1)==="/"?"/":"")+G.pop()),Z.next=68,J._asyncloadExternalRefs(gt,Gt,W);case 68:case"end":return Z.stop()}},dt,null,[[14,33],[18,22],[51,57]])}),P=0,D=Object.keys(u);case 5:if(!(P<D.length)){ut.next=13;break}return ut.delegateYield(x(),"t0",7);case 7:if(ut.t0!=="continue"){ut.next=10;break}return ut.abrupt("continue",10);case 10:P++,ut.next=5;break;case 13:if(d){ut.next=15;break}return ut.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return ut.stop()}},a,this)})),function(a,l,t){return i.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(a){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(a,l){var t=this;a=k({},a),l=k({},l);var e={},o=function(u){typeof u=="string"&&(u=[u]),typeof l.type=="string"&&(l.type=[l.type]),l.type&&l.type.length?e.type=u.filter(function(d){return l.type.includes(d)}):e.type=u,e.type.length===1&&typeof e.type[0]=="string"?e.type=e.type[0]:e.type.length===0&&delete e.type};return Object.entries(a).forEach(function(u){var d=ki(u,2),x=d[0],P=d[1];l[x]!==void 0?function(D,J){(function(nt,ut){return(nt==="required"||nt==="defaultProperties")&&ur(ut)==="object"&&Array.isArray(ut)})(D,J)?e[D]=J.concat(l[D]).reduce(function(nt,ut){return nt.includes(ut)||nt.push(ut),nt},[]):D!=="type"||typeof J!="string"&&!Array.isArray(J)?ur(J)!=="object"||Array.isArray(J)||J===null?e[D]=J:e[D]=t.extendSchemas(J,l[D]):o(J)}(x,P):e[x]=P}),Object.entries(l).forEach(function(u){var d=ki(u,2),x=d[0],P=d[1];a[x]===void 0&&(e[x]=P)}),e}},{key:"getCacheKey",value:function(a){return["je-cache",a].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(a,l){try{window.localStorage.setItem(this.getCacheKey(a),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:l}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(a){try{var l=window.localStorage.getItem(this.getCacheKey(a));if(l){var t=JSON.parse(l);if(t.cacheBuster&&t.schema&&t.cacheBuster===this.getCacheBuster())return t.schema;this.cacheDelete(a)}}catch(e){console.error(e)}}},{key:"cacheDelete",value:function(a){window.localStorage.removeItem(this.getCacheKey(a))}}],f&&of(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}(),sf=(_(3210),{default:function(){return{compile:function(c){var n=c.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),f=n&&n.length;if(!f)return function(){return c};for(var i=[],h=function(l){var t,e,o=n[l].replace(/[{}]+/g,"").trim().split("."),u=o.length;u>1?t=function(d){for(e=d,l=0;l<u&&(e=e[o[l]]);l++);return e}:(o=o[0],t=function(d){return d[o]}),i.push({s:n[l],r:t})},a=0;a<f;a++)h(a);return function(l){var t,e="".concat(c);for(a=0;a<f;a++)t=i[a],e=e.replace(t.s,t.r(l));return e}}}},ejs:function(){return!!window.EJS&&{compile:function(c){var n=new window.EJS({text:c});return function(f){return n.render(f)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(c){var n=window.Hogan.compile(c);return function(f){return n.render(f)}}}},lodash:function(){return!!window._&&{compile:function(c){return function(n){return window._.template(c)(n)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(c){return function(n){return window.Mark.up(c,n)}}}},mustache:function(){return!!window.Mustache&&{compile:function(c){return function(n){return window.Mustache.render(c,n)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(c){return function(n){return window._.template(c)(n)}}}}});function ma(c){return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ma(c)}function Al(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function lf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ma(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ma(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ma(h)==="symbol"?h:String(h)),i)}var h}var cf={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},Cn=function(){function c(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cf;(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,c),this.mapping=h,this.icon_prefix=i}var n,f;return n=c,(f=[{key:"getIconClass",value:function(i){return this.mapping[i]?this.icon_prefix+this.mapping[i]:this.icon_prefix+i}},{key:"getIcon",value:function(i){var h,a=this.getIconClass(i);if(!a)return null;var l,t=document.createElement("i");return(h=t.classList).add.apply(h,function(e){if(Array.isArray(e))return Al(e)}(l=a.split(" "))||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(l)||function(e,o){if(e){if(typeof e=="string")return Al(e,o);var u=Object.prototype.toString.call(e).slice(8,-1);return u==="Object"&&e.constructor&&(u=e.constructor.name),u==="Map"||u==="Set"?Array.from(e):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?Al(e,o):void 0}}(l)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
82
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),t}}])&&lf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function Ll(c){return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ll(c)}function Rl(c,n){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Rl(c,n)}function xs(c){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xs(c)}var uf="glyphicon glyphicon-",hf={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},df=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Rl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=xs(f);if(i){var e=xs(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Ll(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,uf,hf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Il(c){return Il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Il(c)}function Bl(c,n){return Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Bl(c,n)}function ks(c){return ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ks(c)}var pf="icon-",ff={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},mf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Bl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=ks(f);if(i){var e=ks(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Il(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,pf,ff)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Dl(c){return Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dl(c)}function Nl(c,n){return Nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Nl(c,n)}function js(c){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},js(c)}var yf="fa fa-",bf={collapse:"caret-square-o-down",expand:"caret-square-o-right",delete:"times",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"files-o",clear:"times-circle-o",time:"clock-o",calendar:"calendar",edit_properties:"list"},vf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Nl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=js(f);if(i){var e=js(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Dl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,yf,bf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function $l(c){return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$l(c)}function Ml(c,n){return Ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ml(c,n)}function Os(c){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Os(c)}var gf="fas fa-",wf={collapse:"caret-down",expand:"caret-right",delete:"trash",edit:"pen",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"times-circle",time:"clock",calendar:"calendar",edit_properties:"list"},_f=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Ml(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Os(f);if(i){var e=Os(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&($l(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,gf,wf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Hl(c){return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hl(c)}function Fl(c,n){return Fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Fl(c,n)}function Es(c){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Es(c)}var xf="ui-icon ui-icon-",kf={collapse:"triangle-1-s",expand:"triangle-1-e",delete:"trash",edit:"pencil",add:"plusthick",subtract:"minusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",moveright:"arrowthick-1-e",movedown:"arrowthick-1-s",moveleft:"arrowthick-1-w",copy:"copy",clear:"circle-close",time:"time",calendar:"calendar",edit_properties:"note"},jf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Fl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Es(f);if(i){var e=Es(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Hl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,xf,kf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Vl(c){return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vl(c)}function zl(c,n){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zl(c,n)}function Cs(c){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cs(c)}var Of="oi oi-",Ef={collapse:"collapse-down",expand:"expand-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"file",moveup:"arrow-thick-top",moveright:"arrow-thick-right",movedown:"arrow-thick-bottom",moveleft:"arrow-thick-left",copy:"clipboard",clear:"circle-x",time:"clock",calendar:"calendar",edit_properties:"list"},Cf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&zl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Cs(f);if(i){var e=Cs(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Vl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Of,Ef)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Ul(c){return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ul(c)}function ql(c,n){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ql(c,n)}function Ss(c){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ss(c)}var Sf="icon icon-",Pf={collapse:"arrow-down",expand:"arrow-right",delete:"delete",edit:"edit",add:"plus",subtract:"minus",cancel:"cross",save:"check",moveup:"upward",moveright:"forward",movedown:"downward",moveleft:"back",copy:"copy",clear:"close",time:"time",calendar:"bookmark",edit_properties:"menu"},Tf=function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&ql(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Ss(f);if(i){var e=Ss(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Ul(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Sf,Pf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Gl(c){return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gl(c)}function Wl(c,n){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wl(c,n)}function Ps(c){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ps(c)}var Af="bi bi-",Lf={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"dash",cancel:"x-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"clipboard",clear:"x-circle",time:"clock",calendar:"calendar",edit_properties:"list-ul"},Rf={bootstrap:function(c){(function(l,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(t&&t.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),t&&Wl(l,t)})(a,c);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var l,t=Ps(f);if(i){var e=Ps(this).constructor;l=Reflect.construct(t,arguments,e)}else l=t.apply(this,arguments);return function(o,u){if(u&&(Gl(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,l)});function a(){return function(l,t){if(!(l instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Af,Lf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn),bootstrap3:df,fontawesome3:mf,fontawesome4:vf,fontawesome5:_f,jqueryui:jf,openiconic:Cf,spectre:Tf};function ya(c){return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ya(c)}function If(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ya(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ya(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ya(h)==="symbol"?h:String(h)),i)}var h}var Iu=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(function(c){return c in document.documentElement}),Sn=function(){function c(i){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,c),this.jsoneditor=i,Object.keys(h).forEach(function(a){i.options[a]!==void 0&&(h[a]=i.options[a])}),this.options=h}var n,f;return n=c,f=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getFloatRightLinkHolder",value:function(){var i=document.createElement("div");return i.classList.add("je-float-right-linkholder"),i}},{key:"getModal",value:function(){var i=document.createElement("div");return i.style.display="none",i.classList.add("je-modal"),i}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var i=document.createElement("div");return i.classList.add("row"),i}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(i,h){}},{key:"getLink",value:function(i){var h=document.createElement("a");return h.setAttribute("href","#"),h.appendChild(document.createTextNode(i)),h}},{key:"disableHeader",value:function(i){i.style.color="#ccc"}},{key:"disableLabel",value:function(i){i.style.color="#ccc"}},{key:"enableHeader",value:function(i){i.style.color=""}},{key:"enableLabel",value:function(i){i.style.color=""}},{key:"getInfoButton",value:function(i){var h=document.createElement("span");h.innerText="ⓘ",h.classList.add("je-infobutton-icon");var a=document.createElement("span");return a.classList.add("je-infobutton-tooltip"),a.innerText=i,h.onmouseover=function(){a.style.visibility="visible"},h.onmouseleave=function(){a.style.visibility="hidden"},h.appendChild(a),h}},{key:"getFormInputLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(i)),h&&a.classList.add("required"),a}},{key:"getHeader",value:function(i,h){var a=document.createElement("h3");return typeof i=="string"?a.textContent=i:a.appendChild(i),a.classList.add("je-header"),a}},{key:"getCheckbox",value:function(){var i=this.getFormInputField("checkbox");return i.classList.add("je-checkbox"),i}},{key:"getCheckboxLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getMultiCheckboxHolder",value:function(i,h,a,l){var t=document.createElement("div");return t.classList.add("control-group"),h&&(h.style.display="block",t.appendChild(h),l&&h.appendChild(l)),Object.values(i).forEach(function(e){e.style.display="inline-block",e.style.marginRight="20px",t.appendChild(e)}),a&&t.appendChild(a),t}},{key:"getFormCheckboxControl",value:function(i,h,a){var l=document.createElement("div");return l.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&l.classList.add("je-checkbox-control--compact"),l}},{key:"getFormRadio",value:function(i){var h=this.getFormInputField("radio");return Object.keys(i).forEach(function(a){return h.setAttribute(a,i[a])}),h.classList.add("je-radio"),h}},{key:"getFormRadioLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getFormRadioControl",value:function(i,h,a){var l=document.createElement("div");return l.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&l.classList.add("je-radio-control--compact"),l}},{key:"getSelectInput",value:function(i,h){var a=document.createElement("select");return i&&this.setSelectOptions(a,i),a}},{key:"getSwitcher",value:function(i){var h=this.getSelectInput(i,!1);return h.classList.add("je-switcher"),h}},{key:"getSwitcherOptions",value:function(i){return i.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(i,h,a){this.setSelectOptions(i,h,a)}},{key:"setSelectOptions",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];i.innerHTML="";for(var l=0;l<h.length;l++){var t=document.createElement("option");t.setAttribute("value",h[l]),t.textContent=a[l]||h[l],i.appendChild(t)}}},{key:"getTextareaInput",value:function(){var i=document.createElement("textarea");return i.classList.add("je-textarea"),i}},{key:"getRangeInput",value:function(i,h,a){var l=this.getFormInputField("range");return l.setAttribute("min",i),l.setAttribute("max",h),l.setAttribute("step",a),l}},{key:"getStepperButtons",value:function(i){var h=document.createElement("div"),a=document.createElement("button");a.setAttribute("type","button"),a.classList.add("stepper-down");var l=document.createElement("button");l.setAttribute("type","button"),l.classList.add("stepper-up"),i.getAttribute("readonly")&&(a.setAttribute("disabled",!0),l.setAttribute("disabled",!0)),a.textContent="-",l.textContent="+";var t=function(u,d){u.value=Number(d||u.value),u.setAttribute("initialized","1")},e=i.getAttribute("min"),o=i.getAttribute("max");return a.addEventListener("click",function(){i.getAttribute("initialized")?e?Number(i.value)>Number(e)&&i.stepDown():i.stepDown():t(i,e),O(i,"change")}),l.addEventListener("click",function(){i.getAttribute("initialized")?o?Number(i.value)<Number(o)&&i.stepUp():i.stepUp():t(i,e),O(i,"change")}),h.appendChild(a),h.appendChild(l),h}},{key:"getRangeOutput",value:function(i,h){var a=document.createElement("output"),l=function(t){a.value=t.currentTarget.value};return i.addEventListener("change",l,!1),i.addEventListener("input",l,!1),a}},{key:"getRangeControl",value:function(i,h){var a=document.createElement("div");return a.classList.add("je-range-control"),h&&a.appendChild(h),a.appendChild(i),a}},{key:"getFormInputField",value:function(i){var h=document.createElement("input");return h.setAttribute("type",i),h}},{key:"afterInputReady",value:function(i){}},{key:"getFormControl",value:function(i,h,a,l,t){var e=document.createElement("div");return e.classList.add("form-control"),i&&(e.appendChild(i),t&&i.setAttribute("for",t)),h.type!=="checkbox"&&h.type!=="radio"||!i?(l&&i&&i.appendChild(l),e.appendChild(h)):(h.style.width="auto",i.insertBefore(h,i.firstChild),l&&i.appendChild(l)),a&&e.appendChild(a),e}},{key:"getIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel"),i}},{key:"getTopIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel--top"),i}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(i){var h=document.createElement("p");return window.DOMPurify?h.innerHTML=window.DOMPurify.sanitize(i):h.textContent=this.cleanText(i),h}},{key:"getCheckboxDescription",value:function(i){return this.getDescription(i)}},{key:"getFormInputDescription",value:function(i){return this.getDescription(i)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(i){return this.getButtonHolder()}},{key:"getButton",value:function(i,h,a){var l=document.createElement("button");return l.type="button",this.setButtonText(l,i,h,a),l}},{key:"getFormButton",value:function(i,h,a){return this.getButton(i,h,a)}},{key:"setButtonText",value:function(i,h,a,l){for(;i.firstChild;)i.removeChild(i.firstChild);if(a&&(i.appendChild(a),h=" ".concat(h)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!a){var t=document.createElement("span");t.appendChild(document.createTextNode(h)),i.appendChild(t)}l&&i.setAttribute("title",l)}},{key:"getTableContainer",value:function(){return document.createElement("div")}},{key:"getTable",value:function(){return document.createElement("table")}},{key:"getTableRow",value:function(){return document.createElement("tr")}},{key:"getTableHead",value:function(){return document.createElement("thead")}},{key:"getTableBody",value:function(){return document.createElement("tbody")}},{key:"getTableHeaderCell",value:function(i){var h=document.createElement("th");return h.textContent=i,h}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(i){var h=document.createElement("p");return h.style=h.style||{},h.style.color="red",h.appendChild(document.createTextNode(i)),h}},{key:"addInputError",value:function(i,h){}},{key:"removeInputError",value:function(i){}},{key:"addTableRowError",value:function(i){}},{key:"removeTableRowError",value:function(i){}},{key:"getTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(h,"'></div><div class='je-tabholder--clear'></div>"),a}},{key:"getTopTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(h,"'></div>"),a}},{key:"applyStyles",value:function(i,h){Object.keys(h).forEach(function(a){return i.style[a]=h[a]})}},{key:"closest",value:function(i,h){for(;i&&i!==document;){if(!i[Iu])return!1;if(i[Iu](h))return i;i=i.parentNode}return!1}},{key:"insertBasicTopTab",value:function(i,h){h.firstChild.insertBefore(i,h.firstChild.firstChild)}},{key:"getTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab"),a}},{key:"getTopTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab--top"),a}},{key:"getTabContentHolder",value:function(i){return i.children[1]}},{key:"getTopTabContentHolder",value:function(i){return i.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(i){this.applyStyles(i.tab,{opacity:1,background:"white"}),i.rowPane!==void 0?i.rowPane.style.display="":i.container.style.display=""}},{key:"markTabInactive",value:function(i){this.applyStyles(i.tab,{opacity:.5,background:""}),i.rowPane!==void 0?i.rowPane.style.display="none":i.container.style.display="none"}},{key:"addTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"addTopTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"getBlockLink",value:function(){var i=document.createElement("a");return i.classList.add("je-block-link"),i}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(i,h,a){i.appendChild(h),a.classList.add("je-media"),i.appendChild(a)}},{key:"createImageLink",value:function(i,h,a){i.appendChild(h),h.appendChild(a)}},{key:"getFirstTab",value:function(i){return i.firstChild.firstChild}},{key:"getInputGroup",value:function(i,h){}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"getDropZone",value:function(i){var h=document.createElement("div");return h.setAttribute("data-text",i),h.classList.add("je-dropzone"),h}},{key:"getUploadPreview",value:function(i,h,a){var l=document.createElement("div");if(l.classList.add("je-upload-preview"),i.mimeType.substr(0,5)==="image"){var t=document.createElement("img");t.src=a,l.appendChild(t)}var e=document.createElement("div");e.innerHTML+="<strong>Name:</strong> ".concat(i.name,"<br><strong>Type:</strong> ").concat(i.type,"<br><strong>Size:</strong> ").concat(i.formattedSize),l.appendChild(e),l.appendChild(h);var o=document.createElement("div");return o.style.clear="left",l.appendChild(o),l}},{key:"getProgressBar",value:function(){var i=document.createElement("progress");return i.setAttribute("max",100),i.setAttribute("value",0),i}},{key:"updateProgressBar",value:function(i,h){i&&i.setAttribute("value",h)}},{key:"updateProgressBarUnknown",value:function(i){i&&i.removeAttribute("value")}}],f&&If(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();function go(c){return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},go(c)}function Bf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(go(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(go(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),go(h)==="symbol"?h:String(h)),i)}var h}function ji(){return ji=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=pn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},ji.apply(this,arguments)}function Zl(c,n){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Zl(c,n)}function pn(c){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(c)}var Bu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=pn(i);if(h){var o=pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(go(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getFormInputLabel",value:function(t,e){var o=ji(pn(l.prototype),"getFormInputLabel",this).call(this,t,e);return o.classList.add("je-form-input-label"),o}},{key:"getFormInputDescription",value:function(t){var e=ji(pn(l.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=ji(pn(l.prototype),"getIndentedPanel",this).call(this);return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var t=ji(pn(l.prototype),"getChildEditorHolder",this).call(this);return t.classList.add("je-child-editor-holder"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}},{key:"getTable",value:function(){var t=ji(pn(l.prototype),"getTable",this).call(this);return t.classList.add("je-table"),t}},{key:"addInputError",value:function(t,e){var o=this.closest(t,".form-control")||t.controlgroup;t.errmsg?t.errmsg.style.display="block":(t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",o.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&Bf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function wo(c){return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wo(c)}function Df(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(wo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(wo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),wo(h)==="symbol"?h:String(h)),i)}var h}function Oi(){return Oi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=fn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Oi.apply(this,arguments)}function Jl(c,n){return Jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jl(c,n)}function fn(c){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fn(c)}Bu.rules={".je-form-input-label":"display:block;margin-bottom:3px;font-weight:bold",".je-form-input-description":"display:inline-block;margin:0;font-size:0.8em;font-style:italic",".je-indented-panel":"padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",".je-child-editor-holder":"margin-bottom:8px",".je-header-button-holder":"display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",".je-table":"margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Du=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=fn(i);if(h){var o=fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(wo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getSelectInput",value:function(t,e){var o=Oi(fn(l.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("col-md-offset-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup&&(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),t}},{key:"getRangeInput",value:function(t,e,o){return Oi(fn(l.prototype),"getRangeInput",this).call(this,t,e,o)}},{key:"getFormInputField",value:function(t){var e=Oi(fn(l.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&e.classList.add("form-control"),e}},{key:"getFormControl",value:function(t,e,o,u){var d=document.createElement("div");return!t||e.type!=="checkbox"&&e.type!=="radio"?(d.classList.add("form-group"),t&&(t.classList.add("control-label"),d.appendChild(t),u&&t.appendChild(u)),d.appendChild(e)):(d.classList.add(e.type),u&&t.appendChild(u),t.insertBefore(e,t.firstChild),d.appendChild(t)),o&&d.appendChild(o),d}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var o=document.createElement("span");return o.style["font-family"]="sans-serif",o.style.visibility="hidden",o.style["background-color"]="rgba(50, 50, 50, .75)",o.style.margin="0 .25rem",o.style.color="#FAFAFA",o.style.padding=".5rem 1rem",o.style["border-radius"]=".25rem",o.style.width="25rem",o.style.position="absolute",o.innerText=t,e.onmouseover=function(){o.style.visibility="visible"},e.onmouseleave=function(){o.style.visibility="hidden"},e.appendChild(o),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,e,o){var u=Oi(fn(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-default"),u}},{key:"getTableContainer",value:function(){var t=Oi(fn(l.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}},{key:"addInputError",value:function(t,e){t.controlgroup?(t.controlgroup.classList.add("has-error"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("help-block","errormsg"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controlgroup||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(e,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav nav-tabs' id='".concat(e,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var u=document.createElement("a");return u.setAttribute("href","#".concat(e)),u.appendChild(t),u.setAttribute("aria-controls",e),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),o.appendChild(u),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var u=document.createElement("a");return u.setAttribute("href","#".concat(e)),u.appendChild(t),u.setAttribute("aria-controls",e),u.setAttribute("role","tab"),u.setAttribute("data-toggle","tab"),o.appendChild(u),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var u=document.createElement("div");u.classList.add("input-group-btn"),o.appendChild(u);for(var d=0;d<e.length;d++)u.appendChild(e[d]);return o}}}])&&Df(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function _o(c){return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_o(c)}function Nf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(_o(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(_o(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),_o(h)==="symbol"?h:String(h)),i)}var h}function Ei(){return Ei=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=mn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Ei.apply(this,arguments)}function Yl(c,n){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yl(c,n)}function mn(c){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mn(c)}Du.rules={},_(3843);var $f={disable_theme_rules:!1,input_size:"normal",custom_forms:!1,object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Nu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=mn(i);if(h){var o=mn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(_o(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,$f)}return n=l,(f=[{key:"getSelectInput",value:function(t,e){var o=Ei(mn(l.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg")):(o.classList.remove("form-control"),o.classList.add("custom-select"),this.options.input_size==="small"&&o.classList.add("custom-select-sm"),this.options.input_size==="large"&&o.classList.add("custom-select-lg")),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var u=Ei(mn(l.prototype),"getRangeInput",this).call(this,t,e,o);return this.options.custom_forms===!0&&(u.classList.remove("form-control"),u.classList.add("custom-range")),u}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("div"),u=document.createElement("div"),d=document.createElement("button");d.setAttribute("type","button");var x=document.createElement("button");x.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(u),o.appendChild(d),u.appendChild(x),e.classList.add("input-group"),o.classList.add("input-group-prepend"),u.classList.add("input-group-append"),d.classList.add("btn"),d.classList.add("btn-secondary"),d.classList.add("stepper-down"),x.classList.add("btn"),x.classList.add("btn-secondary"),x.classList.add("stepper-up"),t.getAttribute("readonly")&&(d.setAttribute("disabled",!0),x.setAttribute("disabled",!0)),d.textContent="-",x.textContent="+";var P=function(nt,ut){nt.value=Number(ut||nt.value),nt.setAttribute("initialized","1")},D=t.getAttribute("min"),J=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),d.addEventListener("click",function(){t.getAttribute("initialized")?D?Number(t.value)>Number(D)&&t.stepDown():t.stepDown():P(t,D),O(t,"change")}),x.addEventListener("click",function(){t.getAttribute("initialized")?J?Number(t.value)<Number(J)&&t.stepUp():t.stepUp():P(t,D),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ei(mn(l.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&t!=="file"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),t==="file"&&e.classList.add("form-control-file"),e}},{key:"getFormControl",value:function(t,e,o,u){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(d.appendChild(t),u&&d.appendChild(u)),d.appendChild(e);else{var x=document.createElement("div");this.options.custom_forms===!1?(x.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(x.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?x.classList.add("custom-checkbox"):x.classList.add("custom-radio"));var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),x.appendChild(e),x.appendChild(t),u&&x.appendChild(u),d.appendChild(x)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,u){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),u&&e.appendChild(u));var x=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;x.appendChild(D)}),d.appendChild(x),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return this.options.custom_forms===!1?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return this.options.custom_forms===!1?o.classList.add("form-check-label"):o.classList.add("custom-control-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var u=document.createElement("div");return this.options.custom_forms===!1?u.classList.add("form-check"):u.classList.add("custom-control","custom-radio"),u.appendChild(e),u.appendChild(t),o&&(this.options.custom_forms===!1?u.classList.add("form-check-inline"):u.classList.add("custom-control-inline")),u}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","mb-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-right"),e}},{key:"getButton",value:function(t,e,o){var u=Ei(mn(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var t=Ei(mn(l.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var u=document.createElement("div");u.classList.add("input-group-append"),o.appendChild(u);for(var d=0;d<e.length;d++)e[d].classList.remove("mr-2","btn-secondary"),e[d].classList.add("btn-outline-secondary"),u.appendChild(e[d]);return o}}}])&&Nf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function xo(c){return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xo(c)}function Mf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(xo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xo(h)==="symbol"?h:String(h)),i)}var h}function Ci(){return Ci=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=yn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},Ci.apply(this,arguments)}function Xl(c,n){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Xl(c,n)}function yn(c){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yn(c)}Nu.rules={".jsoneditor-twbs4-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Hf={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},$u=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=yn(i);if(h){var o=yn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(xo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,Hf)}return n=l,(f=[{key:"getSelectInput",value:function(t,e){var o=Ci(yn(l.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o.classList.add("form-select"),this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg"),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.classList.add("form-label"),o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var u=Ci(yn(l.prototype),"getRangeInput",this).call(this,t,e,o);return u.classList.remove("form-control"),u.classList.add("form-range"),u}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var u=document.createElement("button");u.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(u),e.classList.add("input-group"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),u.classList.add("btn"),u.classList.add("btn-secondary"),u.classList.add("stepper-up"),t.getAttribute("readonly")&&(o.setAttribute("disabled",!0),u.setAttribute("disabled",!0)),o.textContent="-",u.textContent="+";var d=function(D,J){D.value=Number(J||D.value),D.setAttribute("initialized","1")},x=t.getAttribute("min"),P=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),o.addEventListener("click",function(){t.getAttribute("initialized")?x?Number(t.value)>Number(x)&&t.stepDown():t.stepDown():d(t,x),O(t,"change")}),u.addEventListener("click",function(){t.getAttribute("initialized")?P?Number(t.value)<Number(P)&&t.stepUp():t.stepUp():d(t,x),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ci(yn(l.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),e}},{key:"getFormControl",value:function(t,e,o,u){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(t.classList.add("form-label"),d.appendChild(t),u&&d.appendChild(u)),d.appendChild(e);else{var x=document.createElement("div");x.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),x.appendChild(e),x.appendChild(t),u&&x.appendChild(u),d.appendChild(x)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,u){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),u&&e.appendChild(u));var x=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;x.appendChild(D)}),d.appendChild(x),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return o.classList.add("form-check-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var u=document.createElement("div");return u.classList.add("form-check"),u.appendChild(e),u.appendChild(t),o&&u.classList.add("form-check-inline"),u}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","my-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),e.classList.add("d-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-end"),e}},{key:"getButton",value:function(t,e,o){var u=Ci(yn(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-secondary","btn-sm"),u}},{key:"getTableContainer",value:function(){var t=Ci(yn(l.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var u=document.createElement("a");return u.classList.add("nav-link"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var u=0;u<e.length;u++)e[u].classList.remove("me-2","btn-secondary"),e[u].classList.add("btn-outline-secondary"),o.appendChild(e[u]);return o}}}])&&Mf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function ko(c){return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ko(c)}function Ff(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(ko(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ko(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ko(h)==="symbol"?h:String(h)),i)}var h}function jo(){return jo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=Pn(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},jo.apply(this,arguments)}function Kl(c,n){return Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Kl(c,n)}function Pn(c){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pn(c)}$u.rules={".form-group":"margin-bottom:1rem",".form-text":"display:block",".jsoneditor-twbs5-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Mu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kl(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pn(i);if(h){var o=Pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(ko(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"getTable",value:function(){var t=jo(Pn(l.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=jo(Pn(l.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=jo(Pn(l.prototype),"getTableCell",this).call(this);return t.classList.add("ui-widget-content"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}},{key:"getFormInputDescription",value:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}},{key:"getFormControl",value:function(t,e,o,u){var d=jo(Pn(l.prototype),"getFormControl",this).call(this,t,e,o,u);return e.type==="checkbox"?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var o=document.createElement("label");return o.style.fontWeight="bold",o.style.display="block",o.textContent=t,e&&o.classList.add("required"),o}},{key:"getButton",value:function(t,e,o){var u=document.createElement("button");u.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(u.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(e)):e?(u.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),u.appendChild(e)):u.classList.add("ui-button-text-only");var d=document.createElement("span");return d.classList.add("ui-button-text"),d.textContent=t||o||".",u.appendChild(d),u.setAttribute("title",o),u}},{key:"setButtonText",value:function(t,e,o,u){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),o&&!e?(t.classList.add("ui-button-icon-only"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):o?(t.classList.add("ui-button-text-icon-primary"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):t.classList.add("ui-button-text-only");var d=document.createElement("span");d.classList.add("ui-button-text"),d.textContent=e||u||".",t.appendChild(d),t.setAttribute("title",u)}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("ui-widget-content","ui-corner-all"),t.style.padding="1em 1.4em",t.style.marginBottom="20px",t}},{key:"afterInputReady",value:function(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"addInputError",value:function(t,e){t.controls?(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.classList.add("ui-state-error"),t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}},{key:"markTabActive",value:function(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}}])&&Ff(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function Oo(c){return Oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Oo(c)}function Vf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Oo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Oo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Oo(h)==="symbol"?h:String(h)),i)}var h}function Ql(c,n){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ql(c,n)}function Ts(c){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ts(c)}Mu.rules={'div[data-schemaid="root"]:after':'position:relative;color:red;margin:10px 0;font-weight:600;display:block;width:100%;text-align:center;content:"This is an old JSON-Editor 1.x Theme and might not display elements correctly when used with the 2.x version"'};var Hu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ql(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ts(i);if(h){var o=Ts(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Oo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return n=l,(f=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var o=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),o.nodeName&&o.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&Vf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function Eo(c){return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Eo(c)}function zf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Eo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Eo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Eo(h)==="symbol"?h:String(h)),i)}var h}function gr(){return gr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=tr(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},gr.apply(this,arguments)}function tc(c,n){return tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},tc(c,n)}function tr(c){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tr(c)}Hu.rules={".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Uf={disable_theme_rules:!1,label_bold:!0,align_bottom:!1,object_indent:!1,object_border:!1,table_border:!1,table_zebrastyle:!1,input_size:"normal"},Fu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tc(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=tr(i);if(h){var o=tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Eo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,Uf)}return n=l,(f=[{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-".concat(e)),o&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=gr(tr(l.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=gr(tr(l.prototype),"getFormButtonHolder",this).call(this);return e.classList.remove("btn-group"),e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"?e.classList.add("text-right"):e.classList.add("text-left"),e}},{key:"getFormButton",value:function(t,e,o){var u=gr(tr(l.prototype),"getFormButton",this).call(this,t,e,o);return u.classList.add("btn","btn-primary","mx-2","my-1"),this.options.input_size!=="small"&&u.classList.remove("btn-sm"),this.options.input_size==="large"&&u.classList.add("btn-lg"),u}},{key:"getButton",value:function(t,e,o){var u=gr(tr(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),u}},{key:"getHeader",value:function(t,e){var o=document.createElement("h4");return typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getFormInputDescription",value:function(t){var e=gr(tr(l.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-desc","hide-sm"),e}},{key:"getFormInputLabel",value:function(t,e){var o=gr(tr(l.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold&&o.classList.add("je-label"),o}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(t,e){var o=gr(tr(l.prototype),"getCheckboxLabel",this).call(this,t,e),u=document.createElement("i");return u.classList.add("form-icon"),o.classList.add("form-checkbox","pr-0"),o.insertBefore(u,o.firstChild),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,u){return gr(tr(l.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,u)}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=gr(tr(l.prototype),"getFormRadioLabel",this).call(this,t,e),u=document.createElement("i");return u.classList.add("form-icon"),o.classList.add("form-radio"),o.insertBefore(u,o.firstChild),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getFormInputField",value:function(t){var e=gr(tr(l.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("form-input"),e}},{key:"getRangeInput",value:function(t,e,o){var u=this.getFormInputField("range");return u.classList.add("slider"),u.classList.remove("form-input"),u.setAttribute("oninput",'this.setAttribute("value", this.value)'),u.setAttribute("min",t),u.setAttribute("max",e),u.setAttribute("step",o),u}},{key:"getRangeControl",value:function(t,e){var o=gr(tr(l.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center"),o}},{key:"getSelectInput",value:function(t,e){var o=gr(tr(l.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-select"),o}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-input"),t}},{key:"getFormControl",value:function(t,e,o,u){var d=document.createElement("div");return d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio"?(t&&(t.classList.add("form-label"),d.appendChild(t),u&&t.appendChild(u)),d.appendChild(e)):(d.classList.add(e.type),u&&t.appendChild(u),t.insertBefore(e,t.firstChild),d.appendChild(t)),this.options.input_size==="small"?e.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&e.classList.add("input-lg","select-lg"),e.type!=="checkbox"&&d.appendChild(e),o&&d.appendChild(o),d}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var u=0;u<e.length;u++)e[u].classList.add("input-group-btn"),e[u].classList.remove("btn-sm","mr-2","my-1"),o.appendChild(e[u]);return o}}},{key:"getInfoButton",value:function(t){var e=document.createElement("div");e.classList.add("popover","popover-left","float-right");var o=document.createElement("button");o.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),o.setAttribute("tabindex","-1"),e.appendChild(o);var u=document.createTextNode("I");o.appendChild(u);var d=document.createElement("div");d.classList.add("popover-container"),e.appendChild(d);var x=document.createElement("div");x.classList.add("card"),d.appendChild(x);var P=document.createElement("div");return P.classList.add("card-body"),P.innerHTML=t,x.appendChild(P),e}},{key:"getTable",value:function(){var t=gr(tr(l.prototype),"getTable",this).call(this);return t.classList.add("table","table-scroll"),this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getProgressBar",value:function(){var t=gr(tr(l.prototype),"getProgressBar",this).call(this);return t.classList.add("progress"),t}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("columns"),o.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(e,'"></div>'),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(e,'"></div>'),o}},{key:"getTab",value:function(t,e){var o=document.createElement("a");return o.classList.add("btn","btn-secondary","btn-block"),o.setAttribute("href","#".concat(e)),o.appendChild(t),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.id=e,o.classList.add("tab-item");var u=document.createElement("a");return u.setAttribute("href","#".concat(e)),u.appendChild(t),o.appendChild(u),o}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if(t.localName==="select"){if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach(function(u){u.classList.remove("form-select")}))}else if(t.classList.contains("select2-hidden-accessible")){var o=t.nextSibling;o&&o.querySelector(".select2-selection--single")&&o.classList.add("form-select")}}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("form-input-hint"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.classList.remove("d-hide"),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&zf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);function Co(c){return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Co(c)}function qf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(Co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Co(h)==="symbol"?h:String(h)),i)}var h}function wr(){return wr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,n,f){var i=function(a,l){for(;!Object.prototype.hasOwnProperty.call(a,l)&&(a=er(a))!==null;);return a}(c,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?c:f):h.value}},wr.apply(this,arguments)}function ec(c,n){return ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ec(c,n)}function er(c){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},er(c)}Fu.rules={"*":"--primary-color:%235755d9;--gray-color:%23bcc3ce;--light-color:%23fff",".slider:focus":"box-shadow:none","h4 > label + .btn-group":"margin-left:1rem",".text-right > button":"margin-right:0%20!important",".text-left > button":"margin-left:0%20!important",".property-selector":"font-size:0.7rem;font-weight:normal;max-height:260px%20!important;width:395px%20!important",".property-selector .form-checkbox":"margin:0",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"border-collapse:collapse",".table td":"padding:0.4rem%200.4rem",".mr-5":"margin-right:1rem%20!important","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23eee",".je-table-border td":"border:0.05rem%20solid%20%23dadee4%20!important",".btn-info":"font-size:0.5rem;font-weight:bold;height:0.8rem;padding:0.15rem%200;line-height:0.8;margin:0.3rem%200%200.3rem%200.1rem",".je-label + select":"min-width:5rem",".je-label":"font-weight:600",".btn-action.btn-info":"width:0.8rem",".je-border":"border:0.05rem%20solid%20%23dadee4",".je-panel":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit",".je-align-bottom":"margin-top:auto",".je-desc":"font-size:smaller;margin:0.2rem%200",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem;border:3px%20solid%20white;box-shadow:0px%200px%208px%20rgba(0%2C%200%2C%200%2C%200.3);box-sizing:border-box",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red",".columns .container.je-noindent":"padding-left:0;padding-right:0",".selectize-control.multi .item":"background:var(--primary-color)%20!important",".select2-container--default .select2-selection--single .select2-selection__arrow":"display:none",".select2-container--default .select2-selection--single":"border:none",".select2-container .select2-selection--single .select2-selection__rendered":"padding:0",".select2-container .select2-search--inline .select2-search__field":"margin-top:0",".select2-container--default.select2-container--focus .select2-selection--multiple":"border:0.05rem%20solid%20var(--gray-color)",".select2-container--default .select2-selection--multiple .select2-selection__choice":"margin:0.4rem%200.2rem%200.2rem%200;padding:2px%205px;background-color:var(--primary-color);color:var(--light-color)",".select2-container--default .select2-search--inline .select2-search__field":"line-height:normal",".choices":"margin-bottom:auto",".choices__list--multiple .choices__item":"border:none;background-color:var(--primary-color);color:var(--light-color)",".choices[data-type*='select-multiple'] .choices__button":"border-left:0.05rem%20solid%20%232826a6",".choices__inner":"font-size:inherit;min-height:20px;padding:4px%207.5px%204px%203.75px",".choices[data-type*='select-one'] .choices__inner":"padding-bottom:4px",".choices__list--dropdown .choices__item":"font-size:inherit"};var Gf={disable_theme_rules:!1,label_bold:!1,object_panel_default:!0,object_indent:!0,object_border:!1,table_border:!1,table_hdiv:!1,table_zebrastyle:!1,input_size:"small",enable_compact:!1},Vu=function(c){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ec(t,e)})(l,c);var n,f,i,h,a=(i=l,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=er(i);if(h){var o=er(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(u,d){if(d&&(Co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}(u)}(this,t)});function l(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t,Gf)}return n=l,(f=[{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,o){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),o&&(t.style.marginLeft="".concat(100/12*o,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,e){var o=wr(er(l.prototype),"getSelectInput",this).call(this,t);return e?o.classList.add("form-multiselect","block","py-0","h-auto","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"):o.classList.add("form-select","block","py-0","h-6","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&o.classList.add("compact"),o}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=wr(er(l.prototype),"getTextareaInput",this).call(this);return t.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t.style.height=0,t}},{key:"getRangeInput",value:function(t,e,o){var u=this.getFormInputField("range");return u.classList.add("slider"),this.options.enable_compact&&u.classList.add("compact"),u.setAttribute("oninput",'this.setAttribute("value", this.value)'),u.setAttribute("min",t),u.setAttribute("max",e),u.setAttribute("step",o),u}},{key:"getRangeControl",value:function(t,e){var o=wr(er(l.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center","text-black"),o}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,e){var o=wr(er(l.prototype),"getCheckboxLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center"),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,u){var d=wr(er(l.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,u);return d.classList.add("inline-flex","flex-col"),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=wr(er(l.prototype),"getFormRadioLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center","mr-2"),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,e,o,u,d){var x=wr(er(l.prototype),"getRadioHolder",this).call(this,e,o,u,d);return t.options.layout==="h"?x.classList.add("inline-flex","flex-row"):x.classList.add("inline-flex","flex-col"),x}},{key:"getFormInputLabel",value:function(t,e){var o=wr(er(l.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold?o.classList.add("font-bold"):o.classList.add("required"),o}},{key:"getFormInputField",value:function(t){var e=wr(er(l.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("block","mt-1","text-xs"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getFormControl",value:function(t,e,o,u){var d=document.createElement("div");return d.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),e.type==="checkbox"&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,u)),e.type==="radio"&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,u)),d.appendChild(t),!["checkbox","radio"].includes(e.type)&&u&&d.appendChild(u)),["checkbox","radio"].includes(e.type)||(this.options.input_size==="small"?e.classList.add("text-xs"):this.options.input_size==="normal"?e.classList.add("text-base"):this.options.input_size==="large"&&e.classList.add("text-xl"),d.appendChild(e)),o&&d.appendChild(o),d}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,e,o){var u=wr(er(l.prototype),"getButton",this).call(this,t,e,o);return u.classList.add("inline-block","align-middle","text-center","text-sm","bg-blue-700","text-white","py-1","pr-1","m-2","shadow","select-none","whitespace-no-wrap","rounded"),u}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var o=document.createElement("span");return o.innerHTML=t,e.appendChild(o),e}},{key:"getTable",value:function(){var t=wr(er(l.prototype),"getTable",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}},{key:"getTableRow",value:function(){var t=wr(er(l.prototype),"getTableRow",this).call(this);return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}},{key:"getTableHeaderCell",value:function(t){var e=wr(er(l.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("text-xs","border","p-0","m-0"),e}},{key:"getTableCell",value:function(){var t=wr(er(l.prototype),"getTableCell",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("border-0","p-0","m-0"),t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.controlgroup.classList.add("text-red-600"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("block","mt-1","text-xs","text-red"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='w-2/12' id='".concat(o,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(o,"'></div>"),e.classList.add("flex"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(e,"'></ul><div class='p-6 block' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex-col","text-center","text-white","bg-blue-500","shadow-md","border","p-2","mb-2","mr-2","hover:bg-blue-400","rounded");var u=document.createElement("a");return u.classList.add("nav-link","text-center"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex","border-l","border-t","border-r");var u=document.createElement("a");return u.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),u.setAttribute("href","#".concat(e)),u.setAttribute("data-toggle","tab"),u.appendChild(t),o.appendChild(u),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("block"),t.tab.firstChild.classList.contains("border-b")===!0?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),t.container.classList.contains("hidden")===!0&&t.container.classList.remove("hidden"),t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.contains("border-b-0")===!0?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),t.container.classList.contains("block")===!0&&(t.container.classList.remove("block"),t.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,u="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=u,o.innerHTML=u}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),e.removeAttribute("aria-valuenow"),e.classList.add("w-full"),e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("relative","items-stretch","w-full"),o.appendChild(t);var u=document.createElement("div");u.classList.add("-mr-1"),o.appendChild(u);for(var d=0;d<e.length;d++)u.appendChild(e[d]);return o}}}])&&qf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),l}(Sn);Vu.rules={".slider":"-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",".slider:focus":"box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",".slider.tooltip:not([data-tooltip])::after":"content:attr(value)",".slider::-webkit-slider-thumb":"-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",".slider:active::-webkit-slider-thumb":"transform:scale(1.25);outline:none",".slider::-webkit-slider-runnable-track":"background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25","a.tooltips":"position:relative;display:inline","a.tooltips span":"position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px","a.tooltips span:after":"content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent","a:hover.tooltips span":"visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",".json-editor-btntype-properties + div":"font-size:0.8rem;font-weight:normal",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"width:100%25;border-collapse:collapse",".table td":"padding:0rem%200rem","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23e6f4fe","div[data-schemaid='root']":"position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10","select[multiple]":"height:auto","select[multiple].from-select":"height:auto",".je-table-zebra:nth-child(even)":"background-color:%23f2f2f2",".je-table-border":"border:0.5px%20solid%20black",".je-table-hdiv":"border-bottom:1px%20solid%20black",".je-border":"border:0.05rem%20solid%20%233182ce",".je-panel":"width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit;font-weight:bold",".je-desc":"font-size:smaller;margin:0.2rem%200",".container-xl.je-noindent":"padding-left:0;padding-right:0",".json-editor-btntype-add":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deletelast":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deleteall":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-save":"float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-back":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-delete":"color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btntype-move":"color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btn-collapse":"padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Wf={html:Bu,bootstrap3:Du,bootstrap4:Nu,bootstrap5:$u,jqueryui:Mu,barebones:Hu,spectre:Fu,tailwind:Vu};const Zf={".je-float-right-linkholder":"float:right;margin-left:10px",".je-modal":"background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",".je-infobutton-icon":"font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",".je-infobutton-tooltip":"font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",".je-not-loaded":"pointer-events:none",".je-header":"display:inline-block",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-checkbox":"display:inline-block;width:auto",".je-checkbox-control--compact":"display:inline-block;margin-right:1rem",".je-radio":"display:inline-block;width:auto",".je-radio-control--compact":"display:inline-block;margin-right:1rem",".je-switcher":"background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",".je-textarea":"width:100%25;height:300px;box-sizing:border-box",".je-range-control":"text-align:center",".je-indented-panel":"padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",".je-indented-panel--top":"padding-left:10px;margin-left:10px",".je-tabholder":"float:left;width:130px",".je-tabholder .content":"margin-left:120px",".je-tabholder--top":"margin-left:10px",".je-tabholder--clear":"clear:both",".je-tab":"border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",".je-tab--top":"float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",".je-block-link":"display:block",".je-media":"width:100%25"};function So(c){return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},So(c)}function rc(c,n){(n==null||n>c.length)&&(n=c.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=c[f];return i}function nc(){nc=function(){return c};var c={},n=Object.prototype,f=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},h=typeof Symbol=="function"?Symbol:{},a=h.iterator||"@@iterator",l=h.asyncIterator||"@@asyncIterator",t=h.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof x?G:x,Lt=Object.create(et.prototype),re=new gt(pt||[]);return i(Lt,"_invoke",{value:$t(W,Z,re)}),Lt}function u(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}c.wrap=o;var d={};function x(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ut=nt&&nt(nt(Zt([])));ut&&ut!==n&&f.call(ut,a)&&(J=ut);var dt=D.prototype=x.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,re,Pe){var Te=u(W[et],W,Lt);if(Te.type!=="throw"){var Dr=Te.arg,tn=Dr.value;return tn&&So(tn)=="object"&&f.call(tn,"__await")?G.resolve(tn.__await).then(function(kr){Z("next",kr,re,Pe)},function(kr){Z("throw",kr,re,Pe)}):G.resolve(tn).then(function(kr){Dr.value=kr,re(Dr)},function(kr){return Z("throw",kr,re,Pe)})}Pe(Te.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function re(){return new G(function(Pe,Te){Z(et,Lt,Pe,Te)})}return pt=pt?pt.then(re,re):re()}})}function $t(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var re=Z.delegate;if(re){var Pe=ne(re,Z);if(Pe){if(Pe===d)continue;return Pe}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var Te=u(W,G,Z);if(Te.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Te.arg===d)continue;return{value:Te.arg,done:Z.done}}Te.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Te.arg)}}}function ne(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,ne(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=u(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Re(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Gt(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Re,this),this.reset(!0)}function Zt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(f.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:Ge}}function Ge(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),c.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},c.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},c.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,l,function(){return this}),c.AsyncIterator=Ct,c.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return c.isGeneratorFunction(G)?Lt:Lt.next().then(function(re){return re.done?re.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),c.keys=function(W){var G=Object(W),Z=[];for(var pt in G)Z.push(pt);return Z.reverse(),function et(){for(;Z.length;){var Lt=Z.pop();if(Lt in G)return et.value=Lt,et.done=!1,et}return et.done=!0,et}},c.values=Zt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Gt),!W)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(Te,Dr){return Lt.type="throw",Lt.arg=W,G.next=Te,Dr&&(G.method="next",G.arg=void 0),!!Dr}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var re=f.call(et,"catchLoc"),Pe=f.call(et,"finallyLoc");if(re&&Pe){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(re){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!Pe)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&f.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Gt(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Gt(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Zt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},c}function zu(c,n,f,i,h,a,l){try{var t=c[a](l),e=t.value}catch(o){return void f(o)}t.done?n(e):Promise.resolve(e).then(i,h)}function Jf(c,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,(h=function(a,l){if(So(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(So(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),So(h)==="symbol"?h:String(h)),i)}var h}var Tn=function(){function c(a){var l=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(function(D,J){if(!(D instanceof J))throw new TypeError("Cannot call a class as a function")}(this,c),!(a instanceof Element))throw new Error("element should be an instance of Element");this.element=a,this.options=k({},c.defaults.options,t),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||c.defaults.translate,this.translateProperty=this.options.translateProperty||c.defaults.translateProperty,this.uuid=0,this.__data={};var e=this.options.theme||c.defaults.theme,o=c.defaults.themes[e];if(!o)throw new Error("Unknown theme ".concat(e));this.element.setAttribute("data-theme",e),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new o(this);var u=k(Zf,this.getEditorsRules()),d=function(D,J,nt){return nt?l.addNewStyleRulesToShadowRoot(D,J,nt):l.addNewStyleRules(D,J)};if(!this.theme.options.disable_theme_rules){var x=C(this.element);d("default",u,x),o.rules!==void 0&&d(e,o.rules,x)}var P=c.defaults.iconlibs[this.options.iconlib||c.defaults.iconlib];P&&(this.iconlib=new P),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}var n,f,i,h;return n=c,f=[{key:"load",value:(i=nc().mark(function a(){var l,t,e,o,u,d,x=this;return nc().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return l=document.location.origin+document.location.pathname.toString(),(t=new af(this.options)).onSchemaLoaded=function(D){x.trigger("schemaLoaded",D)},t.onAllSchemasLoaded=function(){x.trigger("allSchemasLoaded")},this.expandSchema=function(D){return t.expandSchema(D)},this.expandRefs=function(D,J){return t.expandRefs(D,J)},e=document.location.toString(),P.next=9,t.load(this.schema,l,e);case 9:o=P.sent,u=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Qi(this,null,u,c.defaults),d=this.getEditorClass(o),this.root=this.createEditor(d,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),S(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame(function(){x.ready&&(x.validation_results=x.validator.validate(x.root.getValue()),x.root.showValidationErrors(x.validation_results),x.trigger("ready"),x.trigger("change"))});case 24:case"end":return P.stop()}},a,this)}),h=function(){var a=this,l=arguments;return new Promise(function(t,e){var o=i.apply(a,l);function u(x){zu(o,t,e,u,d,"next",x)}function d(x){zu(o,t,e,u,d,"throw",x)}u(void 0)})},function(){return h.apply(this,arguments)})},{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}},{key:"setValue",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(a),this}},{key:"validate",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return arguments.length===1?this.validator.validate(a):this.validation_results}},{key:"destroy",value:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.element.removeAttribute("data-theme"),this.destroyed=!0)}},{key:"on",value:function(a,l){return this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[],this.callbacks[a].push(l),this}},{key:"off",value:function(a,l){if(a&&l){this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[];for(var t=[],e=0;e<this.callbacks[a].length;e++)this.callbacks[a][e]!==l&&t.push(this.callbacks[a][e]);this.callbacks[a]=t}else a?(this.callbacks=this.callbacks||{},this.callbacks[a]=[]):this.callbacks={};return this}},{key:"trigger",value:function(a,l){if(this.callbacks&&this.callbacks[a]&&this.callbacks[a].length)for(var t=0;t<this.callbacks[a].length;t++)this.callbacks[a][t].apply(this,[l]);return this}},{key:"setOption",value:function(a,l){if(a!=="show_errors")throw new Error("Option ".concat(a," must be set during instantiation and cannot be changed later"));return this.options.show_errors=l,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(c.defaults.editors).reduce(function(a,l){return l.rules?k(a,l.rules):a},{})}},{key:"getEditorClass",value:function(a){var l,t=this;if(a=this.expandSchema(a),c.defaults.resolvers.find(function(e){return(l=e(a,t))&&c.defaults.editors[l]}),!l)throw new Error("Unknown editor for schema ".concat(JSON.stringify(a)));if(!c.defaults.editors[l])throw new Error("Unknown editor ".concat(l));return c.defaults.editors[l]}},{key:"createEditor",value:function(a,l){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new a(l=k({},a.options||{},l),c.defaults,t)}},{key:"onChange",value:function(){var a=this;if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame(function(){a.firing_change=!1,a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),a.options.show_errors!=="never"?a.root.showValidationErrors(a.validation_results):a.root.showValidationErrors([]),a.trigger("change"))}),this}},{key:"compileTemplate",value:function(a){var l,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c.defaults.template;if(typeof t=="string"){if(!c.defaults.templates[t])throw new Error("Unknown template engine ".concat(t));if(!(l=c.defaults.templates[t]()))throw new Error("Template engine ".concat(t," missing required library."))}else l=t;if(!l)throw new Error("No template engine set");if(!l.compile)throw new Error("Invalid template engine set");return l.compile(a)}},{key:"_data",value:function(a,l,t){if(arguments.length!==3)return a.hasAttribute("data-jsoneditor-".concat(l))?this.__data[a.getAttribute("data-jsoneditor-".concat(l))]:null;var e;a.hasAttribute("data-jsoneditor-".concat(l))?e=a.getAttribute("data-jsoneditor-".concat(l)):(e=this.uuid++,a.setAttribute("data-jsoneditor-".concat(l),e)),this.__data[e]=t}},{key:"registerEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=a,this}},{key:"unregisterEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=null,this}},{key:"getEditor",value:function(a){if(this.editors)return this.editors[a]}},{key:"watch",value:function(a,l){return this.watchlist=this.watchlist||{},this.watchlist[a]=this.watchlist[a]||[],this.watchlist[a].push(l),this}},{key:"unwatch",value:function(a,l){if(!this.watchlist||!this.watchlist[a])return this;if(!l)return this.watchlist[a]=null,this;for(var t=[],e=0;e<this.watchlist[a].length;e++)this.watchlist[a][e]!==l&&t.push(this.watchlist[a][e]);return this.watchlist[a]=t.length?t:null,this}},{key:"notifyWatchers",value:function(a){if(!this.watchlist||!this.watchlist[a])return this;for(var l=0;l<this.watchlist[a].length;l++)this.watchlist[a][l]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(a){this.copyClipboard=a}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(a,l){var t=document.querySelector("#theme-".concat(a));t||((t=document.createElement("style")).setAttribute("id","theme-".concat(a)),t.appendChild(document.createTextNode("")),document.head.appendChild(t));for(var e=t.sheet?t.sheet:t.styleSheet,o=this.element.nodeName.toLowerCase();e.cssRules.length>0;)e.deleteRule(0);Object.keys(l).forEach(function(u){var d=a==="default"?u:"".concat(o,'[data-theme="').concat(a,'"] ').concat(u);e.insertRule?e.insertRule(d+" {"+decodeURIComponent(l[u])+"}",0):e.addRule&&e.addRule(d,decodeURIComponent(l[u]),0)})}},{key:"addNewStyleRulesToShadowRoot",value:function(a,l,t){var e=this.element.nodeName.toLowerCase(),o="";Object.keys(l).forEach(function(x){var P=a==="default"?x:"".concat(e,'[data-theme="').concat(a,'"] ').concat(x);o+=P+" {"+decodeURIComponent(l[x])+`}
|
|
83
|
+
`});var u,d=new CSSStyleSheet;d.replaceSync(o),t.adoptedStyleSheets=[].concat(function(x){if(Array.isArray(x))return rc(x)}(u=t.adoptedStyleSheets)||function(x){if(typeof Symbol<"u"&&x[Symbol.iterator]!=null||x["@@iterator"]!=null)return Array.from(x)}(u)||function(x,P){if(x){if(typeof x=="string")return rc(x,P);var D=Object.prototype.toString.call(x).slice(8,-1);return D==="Object"&&x.constructor&&(D=x.constructor.name),D==="Map"||D==="Set"?Array.from(x):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?rc(x,P):void 0}}(u)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
84
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),[d])}}],f&&Jf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),c}();Tn.defaults=_i,Tn.AbstractEditor=F,Tn.AbstractTheme=Sn,Tn.AbstractIconLib=Cn,Object.assign(Tn.defaults.themes,Wf),Object.assign(Tn.defaults.editors,_s),Object.assign(Tn.defaults.templates,sf),Object.assign(Tn.defaults.iconlibs,Rf)})(),E})())})(uu);var Na=uu.exports;const tp=`
|
|
72
85
|
* {
|
|
73
86
|
font-family: Roboto, sans-serif;
|
|
74
87
|
}
|
|
75
|
-
`,
|
|
88
|
+
`,hl=`
|
|
76
89
|
input[type=checkbox] {
|
|
77
90
|
appearance: none;
|
|
78
91
|
-webkit-appearance: none;
|
|
@@ -95,7 +108,7 @@ input[type=checkbox]:checked:after {
|
|
|
95
108
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
96
109
|
|
|
97
110
|
}
|
|
98
|
-
`,
|
|
111
|
+
`,hu=`
|
|
99
112
|
input[type=radio] {
|
|
100
113
|
appearance: none;
|
|
101
114
|
-webkit-appearance: none;
|
|
@@ -123,7 +136,7 @@ input[type=radio]:checked:after {
|
|
|
123
136
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
124
137
|
|
|
125
138
|
}
|
|
126
|
-
`,
|
|
139
|
+
`,du=`
|
|
127
140
|
input[type="range"] {
|
|
128
141
|
-webkit-appearance: none;
|
|
129
142
|
width: 90%;
|
|
@@ -200,37 +213,13 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
200
213
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
201
214
|
border: 0;
|
|
202
215
|
}
|
|
203
|
-
`,
|
|
204
|
-
${
|
|
205
|
-
${
|
|
206
|
-
${
|
|
216
|
+
`,ep=`
|
|
217
|
+
${hl}
|
|
218
|
+
${hu}
|
|
219
|
+
${du}
|
|
207
220
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
margin-top: 0;
|
|
211
|
-
}
|
|
212
|
-
li {
|
|
213
|
-
list-style: none;
|
|
214
|
-
}
|
|
215
|
-
li span {
|
|
216
|
-
overflow: hidden;
|
|
217
|
-
text-overflow: ellipsis;
|
|
218
|
-
white-space: nowrap;
|
|
219
|
-
}
|
|
220
|
-
li label {
|
|
221
|
-
display: flex;
|
|
222
|
-
align-items: center;
|
|
223
|
-
}
|
|
224
|
-
li,
|
|
225
|
-
label,
|
|
226
|
-
details,
|
|
227
|
-
input[type="checkbox"],
|
|
228
|
-
input[type="radio"] {
|
|
229
|
-
cursor: pointer;
|
|
230
|
-
}
|
|
231
|
-
input[type="checkbox"],
|
|
232
|
-
input[type="radio"] {
|
|
233
|
-
margin: 0;
|
|
221
|
+
[data-schemaid=root] > .je-header {
|
|
222
|
+
display: none;
|
|
234
223
|
}
|
|
235
224
|
input[type="text"], select {
|
|
236
225
|
box-sizing: border-box !important;
|
|
@@ -240,79 +229,17 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
240
229
|
border-radius: 4px !important;
|
|
241
230
|
border: 1px solid #0004 !important;
|
|
242
231
|
}
|
|
243
|
-
form[data-theme="html"] .je-indented-panel {
|
|
244
|
-
border: 0px !important;
|
|
245
|
-
padding: 12px !important;
|
|
246
|
-
margin: 0px !important;
|
|
247
|
-
}
|
|
248
|
-
section:not(section:last-of-type) {
|
|
249
|
-
margin-bottom: 1rem;
|
|
250
|
-
}
|
|
251
|
-
ul li {
|
|
252
|
-
padding: 5px 10px;
|
|
253
|
-
}
|
|
254
|
-
li.highlighted {
|
|
255
|
-
background: #00417011;
|
|
256
|
-
}
|
|
257
|
-
section {
|
|
258
|
-
position: relative;
|
|
259
|
-
}
|
|
260
|
-
.je-indented-panel {
|
|
261
|
-
border: 0 !important;
|
|
262
|
-
padding: 12px !important;
|
|
263
|
-
margin: 0px !important;
|
|
264
|
-
}
|
|
265
|
-
label {
|
|
266
|
-
font-weight: 500 !important;
|
|
267
|
-
margin-bottom: 0px !important;
|
|
268
|
-
}
|
|
269
|
-
p {
|
|
270
|
-
margin: 0.5rem 0;
|
|
271
|
-
}
|
|
272
|
-
label.je-form-input-label {
|
|
273
|
-
display: flex;
|
|
274
|
-
font-weight: 500;
|
|
275
|
-
font-size: small;
|
|
276
|
-
align-items: center;
|
|
277
|
-
align-items: center;
|
|
278
|
-
border-bottom: 1px solid #0002;
|
|
279
|
-
padding: 0.5rem 0;
|
|
280
|
-
}
|
|
281
232
|
.je-range-control {
|
|
282
233
|
padding: 0.5rem 0;
|
|
283
234
|
}
|
|
284
235
|
.errmsg {
|
|
285
236
|
font-size: x-small;
|
|
286
237
|
}
|
|
287
|
-
.je-header, .je-object__controls {
|
|
288
|
-
display: none !important;
|
|
289
|
-
}
|
|
290
|
-
button.json-editor-btn-collapse {
|
|
291
|
-
box-shadow: none;
|
|
292
|
-
display: inline;
|
|
293
|
-
background: none;
|
|
294
|
-
width: 24px;
|
|
295
|
-
height: 24px;
|
|
296
|
-
font-size: unset;
|
|
297
|
-
padding: 0;
|
|
298
|
-
margin: 0;
|
|
299
|
-
transform: rotate(270deg);
|
|
300
|
-
border: 0;
|
|
301
|
-
}
|
|
302
|
-
button.json-editor-btn-collapse span {
|
|
303
|
-
text-indent: -999999px;
|
|
304
|
-
display: flex;
|
|
305
|
-
}
|
|
306
|
-
button.json-editor-btn-collapse span:before {
|
|
307
|
-
position: absolute;
|
|
308
|
-
text-indent: 0;
|
|
309
|
-
line-height: initial;
|
|
310
|
-
}
|
|
311
238
|
tc-range-slider{
|
|
312
239
|
display: block;
|
|
313
240
|
margin: 0.5rem 0;
|
|
314
241
|
}
|
|
315
|
-
`;function hc(y){return!(y===null||typeof y!="object"||y.nodeType||y===y.window||y.constructor&&!Jo(y.constructor.prototype,"isPrototypeOf"))}function dc(y){return hc(y)?Na({},y):Array.isArray(y)?y.map(dc):y}function Na(y,...l){return l.forEach(p=>{p&&Object.keys(p).forEach(v=>{p[v]&&hc(p[v])?(Jo(y,v)||(y[v]={}),Na(y[v],p[v])):Array.isArray(p[v])?y[v]=dc(p[v]):y[v]=p[v]})}),y}function Jo(y,l){return y&&Object.prototype.hasOwnProperty.call(y,l)}class Zd{constructor(l,p){this.defaults=p,this.jsoneditor=l.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=l.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=Na({},this.options||{},this.schema.options||{},l.schema.options||{},l),this.formname=this.jsoneditor.options.form_name_root||"root",!l.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=l.path||this.formname,this.formname=l.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=l.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,l.container&&this.setContainer(l.container),this.registerDependencies()}onChildEditorChange(l){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(l){this.notify(),this.watch_listener&&this.watch_listener(),l&&this.change()}register(){this.jsoneditor.registerEditor(this),this.onChange()}unregister(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}getNumColumns(){return 12}isActive(){return this.active}activate(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}deactivate(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}registerDependencies(){this.dependenciesFulfilled=!0;const l=this.options.dependencies;l&&Object.keys(l).forEach(p=>{let v;p.startsWith(this.jsoneditor.root.path)?v=p:(v=this.path.split("."),v[v.length-1]=p,v=v.join(".")),this.jsoneditor.watch(v,()=>{this.evaluateDependencies()})})}evaluateDependencies(){const l=this.container||this.control;if(!l||this.jsoneditor===null)return;const p=this.options.dependencies;if(!p)return;const v=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(p).forEach(C=>{let m;C.startsWith(this.jsoneditor.root.path)?m=C:(m=this.path.split("."),m[m.length-1]=C,m=m.join("."));const r=p[C];this.checkDependency(m,r)}),this.dependenciesFulfilled!==v&&this.notify();let k=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(k="none"),l.tagName==="TD"?Object.keys(l.childNodes).forEach(C=>l.childNodes[C].style.display=k):l.style.display=k}checkDependency(l,p){if(this.path===l||this.jsoneditor===null)return;const v=this.jsoneditor.getEditor(l),k=v?v.getValue():void 0;!v||!v.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(p)?this.dependenciesFulfilled=p.some(C=>{if(JSON.stringify(k)===JSON.stringify(C))return!0}):typeof p=="object"?typeof k!="object"?this.dependenciesFulfilled=p===k:Object.keys(p).some(C=>{if(!Jo(p,C))return!1;if(!Jo(k,C)||p[C]!==k[C])return this.dependenciesFulfilled=!1,!0}):typeof p=="string"||typeof p=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&k===p:typeof p=="boolean"&&(p?this.dependenciesFulfilled=this.dependenciesFulfilled&&(k||k.length>0):this.dependenciesFulfilled=this.dependenciesFulfilled&&(!k||k.length===0))}setContainer(l){this.container=l,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}setOptInCheckbox(l){this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",()=>{this.isActive()?this.deactivate():this.activate()});const p=this.jsoneditor.options.show_opt_in,v=typeof this.parent.options.show_opt_in<"u",k=v&&this.parent.options.show_opt_in===!0,C=v&&this.parent.options.show_opt_in===!1;(k||!C&&p||!v&&p)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}preBuild(){}build(){}postBuild(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}setupWatchListeners(){if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=()=>{this.refreshWatchedFieldValues()&&this.onWatchedFieldChange()},Jo(this.schema,"watch")){let l,p,v,k,C;const m=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(O=>{if(l=this.schema.watch[O],Array.isArray(l)){if(l.length<2)return;p=[l[0]].concat(l[1].split("."))}else p=l.split("."),this.theme.closest(this.container,`[data-schemaid="${p[0]}"]`)||p.unshift("#");if(v=p.shift(),v==="#"&&(v=this.jsoneditor.schema.id||this.jsoneditor.root.formname),k=this.theme.closest(this.container,`[data-schemaid="${v}"]`),!k)throw new Error(`Could not find ancestor node with id ${v}`);C=`${k.getAttribute("data-schemapath")}.${p.join(".")}`,m.startsWith(C)&&(this.watchLoop=!0),this.jsoneditor.watch(C,this.watch_listener),this.watched[O]=C})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}addLinks(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),typeof this.description<"u"?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(let l=0;l<this.schema.links.length;l++)this.addLink(this.getLink(this.schema.links[l]))}onMove(){}getButton(l,p,v,k=[]){const C=`json-editor-btn-${p}`;this.iconlib?p=this.iconlib.getIcon(p):p=null,l=this.translate(l,k),v=this.translate(v,k),!p&&v&&(l=v,v=null);const m=this.theme.getButton(l,p,v);return m.classList.add(C),m}setButtonText(l,p,v,k,C=[]){return this.iconlib?v=this.iconlib.getIcon(v):v=null,p=this.translate(p,C),k=this.translate(k,C),!v&&k&&(p=k,k=null),this.theme.setButtonText(l,p,v,k)}addLink(l){this.link_holder&&this.link_holder.appendChild(l)}getLink(l){let p,v;const C=(l.mediaType||"application/javascript").split("/")[0],m=this.jsoneditor.compileTemplate(l.href,this.template_engine),O=this.jsoneditor.compileTemplate(l.rel?l.rel:l.href,this.template_engine);let r=null;if(l.download&&(r=l.download),r&&r!==!0&&(r=this.jsoneditor.compileTemplate(r,this.template_engine)),C==="image"){p=this.theme.getBlockLinkHolder(),v=document.createElement("a"),v.setAttribute("target","_blank");const b=document.createElement("img");this.theme.createImageLink(p,v,b),this.link_watchers.push(g=>{const w=m(g),x=O(g);v.setAttribute("href",w),v.setAttribute("title",x||w),b.setAttribute("src",w)})}else if(["audio","video"].includes(C)){p=this.theme.getBlockLinkHolder(),v=this.theme.getBlockLink(),v.setAttribute("target","_blank");const b=document.createElement(C);b.setAttribute("controls","controls"),this.theme.createMediaLink(p,v,b),this.link_watchers.push(g=>{const w=m(g),x=O(g);v.setAttribute("href",w),v.textContent=x||w,b.setAttribute("src",w)})}else v=p=this.theme.getBlockLink(),p.setAttribute("target","_blank"),p.textContent=l.rel,p.style.display="none",this.link_watchers.push(b=>{const g=m(b),w=O(b);g&&(p.style.display=""),p.setAttribute("href",g),p.textContent=w||g});return r&&v&&(r===!0?v.setAttribute("download",""):this.link_watchers.push(b=>{v.setAttribute("download",r(b))})),l.class&&v.classList.add(l.class),p}refreshWatchedFieldValues(){if(!this.watched_values)return;const l={};let p=!1;return this.watched&&Object.keys(this.watched).forEach(v=>{const k=this.jsoneditor.getEditor(this.watched[v]),C=k?k.getValue():null;this.watched_values[v]!==C&&(p=!0),l[v]=C}),l.self=this.getValue(),this.watched_values.self!==l.self&&(p=!0),this.watched_values=l,p}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const l=this.getHeaderText();if(this.header.children.length){for(let p=0;p<this.header.childNodes.length;p++)if(this.header.childNodes[p].nodeType===3){this.header.childNodes[p].nodeValue=this.cleanText(l);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(l):this.header.textContent=this.cleanText(l)}}getHeaderText(l){return this.header_text?this.header_text:l?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(l){const p=document.createElement("div");return p.innerHTML=l,p.textContent||p.innerText}onWatchedFieldChange(){let l;if(this.header_template){l=Na(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:this.key*1,i1:this.key*1+1,title:this.getTitle()});const p=this.header_template(l);p!==this.header_text&&(this.header_text=p,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){l=this.getWatchedFieldValues();for(let p=0;p<this.link_watchers.length;p++)this.link_watchers[p](l)}}setValue(l){this.value=l}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(l=>this.jsoneditor.unwatch(l,this.watch_listener)),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}isDefaultRequired(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}getDefault(){if(typeof this.schema.default<"u")return this.schema.default;if(typeof this.schema.enum<"u")return this.schema.enum[0];let l=this.schema.type||this.schema.oneOf;if(l&&Array.isArray(l)&&(l=l[0]),l&&typeof l=="object"&&(l=l.type),l&&Array.isArray(l)&&(l=l[0]),typeof l=="string"){if(l==="number")return this.isDefaultRequired()?0:void 0;if(l==="boolean")return this.isDefaultRequired()?!1:void 0;if(l==="integer")return this.isDefaultRequired()?0:void 0;if(l==="string")return this.isDefaultRequired()?"":void 0;if(l==="null")return null;if(l==="object")return{};if(l==="array")return[]}}getTitle(){return this.translateProperty(this.schema.title||this.key)}enable(){this.disabled=!1}disable(){this.disabled=!0}isEnabled(){return!this.disabled}isRequired(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}getDisplayText(l){const p=[],v={};l.forEach(C=>{C.title&&(v[C.title]=v[C.title]||0,v[C.title]++),C.description&&(v[C.description]=v[C.description]||0,v[C.description]++),C.format&&(v[C.format]=v[C.format]||0,v[C.format]++),C.type&&(v[C.type]=v[C.type]||0,v[C.type]++)}),l.forEach(C=>{let m;typeof C=="string"?m=C:C.title&&v[C.title]<=1?m=C.title:C.format&&v[C.format]<=1?m=C.format:C.type&&v[C.type]<=1?m=C.type:C.description&&v[C.description]<=1?m=C.description:C.title?m=C.title:C.format?m=C.format:C.type?m=C.type:C.description?m=C.description:JSON.stringify(C).length<500?m=JSON.stringify(C):m="type",p.push(m)});const k={};return p.forEach((C,m)=>{k[C]=k[C]||0,k[C]++,v[C]>1&&(p[m]=`${C} ${k[C]}`)}),p}getValidId(l){return l=l===void 0?"":l.toString(),l.replace(/\s+/g,"-")}setInputAttributes(l){if(this.schema.options&&this.schema.options.inputAttributes){const p=this.schema.options.inputAttributes,v=["name","type"].concat(l);Object.keys(p).forEach(k=>{v.includes(k.toLowerCase())||this.input.setAttribute(k,p[k])})}}setContainerAttributes(){if(this.schema.options&&this.schema.options.containerAttributes){const l=this.schema.options.containerAttributes,p=["data-schemapath","data-schematype","data-schemaid"];Object.keys(l).forEach(v=>{p.includes(v.toLowerCase())||this.container.setAttribute(v,l[v])})}}expandCallbacks(l,p){const v=this.defaults.callbacks[l];return Object.entries(p).forEach(([k,C])=>{C===Object(C)?p[k]=this.expandCallbacks(l,C):typeof C=="string"&&typeof v=="object"&&typeof v[C]=="function"&&(p[k]=v[C].bind(null,this))}),p}showValidationErrors(l){}}(()=>{var y=C=>C==null?!1:typeof C=="boolean"?C:C.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var l="min-label",p="max-label",v="#1E293B",k=()=>{let C=null,m=null,O=null,r,b=!1,g=v,w="",x,j=null,E=null,S=null,T=[],A=()=>{var U;let H=(U=C==null?void 0:C.shadowRoot)==null?void 0:U.querySelector(".range-slider-box");j=document.createElement("div"),j.classList.add("labels-row"),H.prepend(j)},R=U=>{let H=document.createElement("label");return H.className=U,H.setAttribute("for","range-slider"),H},I=()=>{E=R(l),E.textContent=N(O==null?void 0:O.getTextMin(),w),S=R(p),S.textContent=N(O==null?void 0:O.getTextMax(),w),m==null||m.before(E),m==null||m.after(S);let U=O==null?void 0:O.getValues();if(U)for(let H=0;H<U.length;H++){let X=R(`value${H+1}-label generated-label`);X.textContent=N(U[H],w),T.push(X),j==null||j.append(X)}},$=()=>{for(let U of T)!U||U.remove();E==null||E.remove(),S==null||S.remove(),j==null||j.remove(),T=[]},M=U=>{b=U,b?(A(),I()):$()},B=U=>{g=U;for(let H of T)!H||(H.style.color=g??v);E&&(E.style.color=g??v),S&&(S.style.color=g??v)},q=U=>{w=U,r&&r()},F=()=>{!O||!j||j.classList.toggle("is-reversed",O.isRightToLeft()||O.isBottomToTop())},N=(U,H)=>{let X=`${(U??"").toString()}${H}`;return x&&typeof x=="function"?x(U):X};return{get name(){return"Generated Labels"},init:(U,H,X,Y)=>{var Q,tt,it;C=U,O=Y,m=(Q=U.shadowRoot)==null?void 0:Q.getElementById("range-slider"),r=H,g=(tt=C.getAttribute("generate-labels-text-color"))!=null?tt:v,w=(it=C.getAttribute("generate-labels-units"))!=null?it:"",M(y(C.getAttribute("generate-labels"))),F(),B(g)},update:U=>{if(!(!b||!U.values)){F();for(let H=0;H<U.values.length;H++){let X=U.values[H],Y=T[H];if(X===void 0&&Y){Y.remove(),T[H]=void 0;continue}if(X!==void 0&&!Y){let Q=R(`value${H+1}-label generated-label`);if(Q.textContent=N(X,w),T[H]=Q,U.values.length<=0)j==null||j.append(Q);else if(H===0)j==null||j.append(Q);else{let tt=T[H-1];tt==null||tt.after(Q)}continue}!Y||(Y.textContent=N(X,w))}E&&(E.textContent=N(U.textMin,w)),S&&(S.textContent=N(U.textMax,w)),B(g)}},onAttrChange:(U,H)=>{U==="generate-labels"&&M(y(H)),U==="generate-labels-text-color"&&B(H),U==="generate-labels-units"&&q(H)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return b??!1},set:U=>{M(y(U))}}},{name:"textColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"generateLabelsTextColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"units",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsUnits",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsFormat",attributes:{get(){return x},set:U=>{x=U,r&&r()}}}],css:`
|
|
242
|
+
`;function pu(m){return!(m===null||typeof m!="object"||m.nodeType||m===m.window||m.constructor&&!Jo(m.constructor.prototype,"isPrototypeOf"))}function fu(m){return pu(m)?$a({},m):Array.isArray(m)?m.map(fu):m}function $a(m,...s){return s.forEach(p=>{p&&Object.keys(p).forEach(b=>{p[b]&&pu(p[b])?(Jo(m,b)||(m[b]={}),$a(m[b],p[b])):Array.isArray(p[b])?m[b]=fu(p[b]):m[b]=p[b]})}),m}function Jo(m,s){return m&&Object.prototype.hasOwnProperty.call(m,s)}class rp{constructor(s,p){this.defaults=p,this.jsoneditor=s.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=s.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=$a({},this.options||{},this.schema.options||{},s.schema.options||{},s),this.formname=this.jsoneditor.options.form_name_root||"root",!s.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=s.path||this.formname,this.formname=s.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=s.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,s.container&&this.setContainer(s.container),this.registerDependencies()}onChildEditorChange(s){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(s){this.notify(),this.watch_listener&&this.watch_listener(),s&&this.change()}register(){this.jsoneditor.registerEditor(this),this.onChange()}unregister(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}getNumColumns(){return 12}isActive(){return this.active}activate(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}deactivate(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}registerDependencies(){this.dependenciesFulfilled=!0;const s=this.options.dependencies;s&&Object.keys(s).forEach(p=>{let b;p.startsWith(this.jsoneditor.root.path)?b=p:(b=this.path.split("."),b[b.length-1]=p,b=b.join(".")),this.jsoneditor.watch(b,()=>{this.evaluateDependencies()})})}evaluateDependencies(){const s=this.container||this.control;if(!s||this.jsoneditor===null)return;const p=this.options.dependencies;if(!p)return;const b=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(p).forEach(E=>{let y;E.startsWith(this.jsoneditor.root.path)?y=E:(y=this.path.split("."),y[y.length-1]=E,y=y.join("."));const r=p[E];this.checkDependency(y,r)}),this.dependenciesFulfilled!==b&&this.notify();let _=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(_="none"),s.tagName==="TD"?Object.keys(s.childNodes).forEach(E=>s.childNodes[E].style.display=_):s.style.display=_}checkDependency(s,p){if(this.path===s||this.jsoneditor===null)return;const b=this.jsoneditor.getEditor(s),_=b?b.getValue():void 0;!b||!b.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(p)?this.dependenciesFulfilled=p.some(E=>{if(JSON.stringify(_)===JSON.stringify(E))return!0}):typeof p=="object"?typeof _!="object"?this.dependenciesFulfilled=p===_:Object.keys(p).some(E=>{if(!Jo(p,E))return!1;if(!Jo(_,E)||p[E]!==_[E])return this.dependenciesFulfilled=!1,!0}):typeof p=="string"||typeof p=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&_===p:typeof p=="boolean"&&(p?this.dependenciesFulfilled=this.dependenciesFulfilled&&(_||_.length>0):this.dependenciesFulfilled=this.dependenciesFulfilled&&(!_||_.length===0))}setContainer(s){this.container=s,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}setOptInCheckbox(s){this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",()=>{this.isActive()?this.deactivate():this.activate()});const p=this.jsoneditor.options.show_opt_in,b=typeof this.parent.options.show_opt_in<"u",_=b&&this.parent.options.show_opt_in===!0,E=b&&this.parent.options.show_opt_in===!1;(_||!E&&p||!b&&p)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}preBuild(){}build(){}postBuild(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}setupWatchListeners(){if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=()=>{this.refreshWatchedFieldValues()&&this.onWatchedFieldChange()},Jo(this.schema,"watch")){let s,p,b,_,E;const y=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(j=>{if(s=this.schema.watch[j],Array.isArray(s)){if(s.length<2)return;p=[s[0]].concat(s[1].split("."))}else p=s.split("."),this.theme.closest(this.container,`[data-schemaid="${p[0]}"]`)||p.unshift("#");if(b=p.shift(),b==="#"&&(b=this.jsoneditor.schema.id||this.jsoneditor.root.formname),_=this.theme.closest(this.container,`[data-schemaid="${b}"]`),!_)throw new Error(`Could not find ancestor node with id ${b}`);E=`${_.getAttribute("data-schemapath")}.${p.join(".")}`,y.startsWith(E)&&(this.watchLoop=!0),this.jsoneditor.watch(E,this.watch_listener),this.watched[j]=E})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}addLinks(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),typeof this.description<"u"?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(let s=0;s<this.schema.links.length;s++)this.addLink(this.getLink(this.schema.links[s]))}onMove(){}getButton(s,p,b,_=[]){const E=`json-editor-btn-${p}`;this.iconlib?p=this.iconlib.getIcon(p):p=null,s=this.translate(s,_),b=this.translate(b,_),!p&&b&&(s=b,b=null);const y=this.theme.getButton(s,p,b);return y.classList.add(E),y}setButtonText(s,p,b,_,E=[]){return this.iconlib?b=this.iconlib.getIcon(b):b=null,p=this.translate(p,E),_=this.translate(_,E),!b&&_&&(p=_,_=null),this.theme.setButtonText(s,p,b,_)}addLink(s){this.link_holder&&this.link_holder.appendChild(s)}getLink(s){let p,b;const E=(s.mediaType||"application/javascript").split("/")[0],y=this.jsoneditor.compileTemplate(s.href,this.template_engine),j=this.jsoneditor.compileTemplate(s.rel?s.rel:s.href,this.template_engine);let r=null;if(s.download&&(r=s.download),r&&r!==!0&&(r=this.jsoneditor.compileTemplate(r,this.template_engine)),E==="image"){p=this.theme.getBlockLinkHolder(),b=document.createElement("a"),b.setAttribute("target","_blank");const v=document.createElement("img");this.theme.createImageLink(p,b,v),this.link_watchers.push(g=>{const w=y(g),k=j(g);b.setAttribute("href",w),b.setAttribute("title",k||w),v.setAttribute("src",w)})}else if(["audio","video"].includes(E)){p=this.theme.getBlockLinkHolder(),b=this.theme.getBlockLink(),b.setAttribute("target","_blank");const v=document.createElement(E);v.setAttribute("controls","controls"),this.theme.createMediaLink(p,b,v),this.link_watchers.push(g=>{const w=y(g),k=j(g);b.setAttribute("href",w),b.textContent=k||w,v.setAttribute("src",w)})}else b=p=this.theme.getBlockLink(),p.setAttribute("target","_blank"),p.textContent=s.rel,p.style.display="none",this.link_watchers.push(v=>{const g=y(v),w=j(v);g&&(p.style.display=""),p.setAttribute("href",g),p.textContent=w||g});return r&&b&&(r===!0?b.setAttribute("download",""):this.link_watchers.push(v=>{b.setAttribute("download",r(v))})),s.class&&b.classList.add(s.class),p}refreshWatchedFieldValues(){if(!this.watched_values)return;const s={};let p=!1;return this.watched&&Object.keys(this.watched).forEach(b=>{const _=this.jsoneditor.getEditor(this.watched[b]),E=_?_.getValue():null;this.watched_values[b]!==E&&(p=!0),s[b]=E}),s.self=this.getValue(),this.watched_values.self!==s.self&&(p=!0),this.watched_values=s,p}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const s=this.getHeaderText();if(this.header.children.length){for(let p=0;p<this.header.childNodes.length;p++)if(this.header.childNodes[p].nodeType===3){this.header.childNodes[p].nodeValue=this.cleanText(s);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(s):this.header.textContent=this.cleanText(s)}}getHeaderText(s){return this.header_text?this.header_text:s?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(s){const p=document.createElement("div");return p.innerHTML=s,p.textContent||p.innerText}onWatchedFieldChange(){let s;if(this.header_template){s=$a(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:this.key*1,i1:this.key*1+1,title:this.getTitle()}),Object.keys(this.editors).length&&(s.properties={},Object.keys(this.editors).forEach(b=>{const _=this.editors[b];if(_.schema&&_.schema.enum&&_.schema.options&&_.schema.options.enum_titles){const E=_.schema.enum.indexOf(_.value),y=_.options.enum_titles[E];s.properties[b]={enumTitle:y}}}));const p=this.header_template(s);p!==this.header_text&&(this.header_text=p,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){s=this.getWatchedFieldValues();for(let p=0;p<this.link_watchers.length;p++)this.link_watchers[p](s)}}setValue(s){this.value=s}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(s=>this.jsoneditor.unwatch(s,this.watch_listener)),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}isDefaultRequired(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}getDefault(){if(typeof this.schema.default<"u")return this.schema.default;if(typeof this.schema.enum<"u")return this.schema.enum[0];let s=this.schema.type||this.schema.oneOf;if(s&&Array.isArray(s)&&(s=s[0]),s&&typeof s=="object"&&(s=s.type),s&&Array.isArray(s)&&(s=s[0]),typeof s=="string"){if(s==="number")return this.isDefaultRequired()?0:void 0;if(s==="boolean")return this.isDefaultRequired()?!1:void 0;if(s==="integer")return this.isDefaultRequired()?0:void 0;if(s==="string")return this.isDefaultRequired()?"":void 0;if(s==="null")return null;if(s==="object")return{};if(s==="array")return[]}}getTitle(){return this.translateProperty(this.schema.title||this.key)}enable(){this.disabled=!1}disable(){this.disabled=!0}isEnabled(){return!this.disabled}isRequired(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}getDisplayText(s){const p=[],b={};s.forEach(E=>{E.title&&(b[E.title]=b[E.title]||0,b[E.title]++),E.description&&(b[E.description]=b[E.description]||0,b[E.description]++),E.format&&(b[E.format]=b[E.format]||0,b[E.format]++),E.type&&(b[E.type]=b[E.type]||0,b[E.type]++)}),s.forEach(E=>{let y;typeof E=="string"?y=E:E.title&&b[E.title]<=1?y=E.title:E.format&&b[E.format]<=1?y=E.format:E.type&&b[E.type]<=1?y=E.type:E.description&&b[E.description]<=1?y=E.description:E.title?y=E.title:E.format?y=E.format:E.type?y=E.type:E.description?y=E.description:JSON.stringify(E).length<500?y=JSON.stringify(E):y="type",p.push(y)});const _={};return p.forEach((E,y)=>{_[E]=_[E]||0,_[E]++,b[E]>1&&(p[y]=`${E} ${_[E]}`)}),p}getValidId(s){return s=s===void 0?"":s.toString(),s.replace(/\s+/g,"-")}setInputAttributes(s){if(this.schema.options&&this.schema.options.inputAttributes){const p=this.schema.options.inputAttributes,b=["name","type"].concat(s);Object.keys(p).forEach(_=>{b.includes(_.toLowerCase())||this.input.setAttribute(_,p[_])})}}setContainerAttributes(){if(this.schema.options&&this.schema.options.containerAttributes){const s=this.schema.options.containerAttributes,p=["data-schemapath","data-schematype","data-schemaid"];Object.keys(s).forEach(b=>{p.includes(b.toLowerCase())||this.container.setAttribute(b,s[b])})}}expandCallbacks(s,p){const b=this.defaults.callbacks[s];return Object.entries(p).forEach(([_,E])=>{E===Object(E)?p[_]=this.expandCallbacks(s,E):typeof E=="string"&&typeof b=="object"&&typeof b[E]=="function"&&(p[_]=b[E].bind(null,this))}),p}showValidationErrors(s){}}(()=>{var m=E=>E==null?!1:typeof E=="boolean"?E:E.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var s="min-label",p="max-label",b="#1E293B",_=()=>{let E=null,y=null,j=null,r,v=!1,g=b,w="",k,O=null,C=null,S=null,T=[],A=()=>{var U;let H=(U=E==null?void 0:E.shadowRoot)==null?void 0:U.querySelector(".range-slider-box");O=document.createElement("div"),O.classList.add("labels-row"),H.prepend(O)},R=U=>{let H=document.createElement("label");return H.className=U,H.setAttribute("for","range-slider"),H},I=()=>{C=R(s),C.textContent=N(j==null?void 0:j.getTextMin(),w),S=R(p),S.textContent=N(j==null?void 0:j.getTextMax(),w),y==null||y.before(C),y==null||y.after(S);let U=j==null?void 0:j.getValues();if(U)for(let H=0;H<U.length;H++){let X=R(`value${H+1}-label generated-label`);X.textContent=N(U[H],w),T.push(X),O==null||O.append(X)}},$=()=>{for(let U of T)!U||U.remove();C==null||C.remove(),S==null||S.remove(),O==null||O.remove(),T=[]},M=U=>{v=U,v?(A(),I()):$()},B=U=>{g=U;for(let H of T)!H||(H.style.color=g??b);C&&(C.style.color=g??b),S&&(S.style.color=g??b)},q=U=>{w=U,r&&r()},F=()=>{!j||!O||O.classList.toggle("is-reversed",j.isRightToLeft()||j.isBottomToTop())},N=(U,H)=>{let X=`${(U??"").toString()}${H}`;return k&&typeof k=="function"?k(U):X};return{get name(){return"Generated Labels"},init:(U,H,X,Y)=>{var K,tt,it;E=U,j=Y,y=(K=U.shadowRoot)==null?void 0:K.getElementById("range-slider"),r=H,g=(tt=E.getAttribute("generate-labels-text-color"))!=null?tt:b,w=(it=E.getAttribute("generate-labels-units"))!=null?it:"",M(m(E.getAttribute("generate-labels"))),F(),B(g)},update:U=>{if(!(!v||!U.values)){F();for(let H=0;H<U.values.length;H++){let X=U.values[H],Y=T[H];if(X===void 0&&Y){Y.remove(),T[H]=void 0;continue}if(X!==void 0&&!Y){let K=R(`value${H+1}-label generated-label`);if(K.textContent=N(X,w),T[H]=K,U.values.length<=0)O==null||O.append(K);else if(H===0)O==null||O.append(K);else{let tt=T[H-1];tt==null||tt.after(K)}continue}!Y||(Y.textContent=N(X,w))}C&&(C.textContent=N(U.textMin,w)),S&&(S.textContent=N(U.textMax,w)),B(g)}},onAttrChange:(U,H)=>{U==="generate-labels"&&M(m(H)),U==="generate-labels-text-color"&&B(H),U==="generate-labels-units"&&q(H)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return v??!1},set:U=>{M(m(U))}}},{name:"textColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"generateLabelsTextColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"units",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsUnits",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsFormat",attributes:{get(){return k},set:U=>{k=U,r&&r()}}}],css:`
|
|
316
243
|
.labels-row{
|
|
317
244
|
text-align: center;
|
|
318
245
|
display: flex;
|
|
@@ -354,24 +281,27 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
354
281
|
margin: 0 0.5rem;
|
|
355
282
|
white-space: nowrap;
|
|
356
283
|
}
|
|
357
|
-
`,destroy:$}};window.tcRangeSliderPlugins.push(k)})(),(()=>{var y=Object.defineProperty,l=Math.pow,p=(L,z,rt)=>z in L?y(L,z,{enumerable:!0,configurable:!0,writable:!0,value:rt}):L[z]=rt,v=(L,z,rt)=>(p(L,typeof z!="symbol"?z+"":z,rt),rt),k=(L,z)=>` ${z&&z.length>0?z.map(rt=>`<link rel="stylesheet" href="${rt}" />`).join(""):""} <style> ${L} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,C=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",m="pointers-overlap",O="pointers-min-distance",r="pointers-max-distance",b="range-dragging",g="data",w="min",x="max",j="step",E="round",S="type",T="theme",A="rtl",R="btt",I="disabled",$="keyboard-disabled",M="mousewheel-disabled",B="slider-width",q="slider-height",F="slider-radius",N="slider-bg",U="slider-bg-hover",H="slider-bg-fill",X="pointer-width",Y="pointer-height",Q="pointer-radius",tt="pointer-bg",it="pointer-bg-hover",st="pointer-bg-focus",mt="pointer-shadow",ut="pointer-shadow-hover",Et="pointer-shadow-focus",At="pointer-border",Vt="pointer-border-hover",lt="pointer-border-focus",wt="animate-onclick",_t="css-links",Ut="vertical",Qt="horizontal",fe=(L,z,rt,K,yt)=>{let Dt=z-L;return Dt===0?rt:(K-rt)*(yt-L)/Dt+rt},St=L=>!isNaN(parseFloat(L))&&isFinite(L),Ot=(L,z)=>St(L)?Number(L):z,Bt=(L,z)=>z===0?0:Math.round(L/z)*z,qt=(L,z=1/0)=>{if(z===1/0)return L;let rt=l(10,z);return Math.round(L*rt)/rt},xt=L=>L==null?!1:typeof L=="boolean"?L:L.trim().toLowerCase()==="true",sr=(L,z)=>{L.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:z}}))},de=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:z}}))},Ne=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:z}}))},_e=(L,z)=>{L.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:z}}))},lr=(L,z)=>{if(!z||z.length<=0)return;let rt=z.map(yt=>St(yt)?Ot(yt,yt):yt),K={values:rt||[]};K.value=rt[0],K.value0=rt[0],K.value1=rt[0];for(let yt=1;yt<rt.length;yt++)K[`value${yt+1}`]=rt[yt];L.dispatchEvent(new CustomEvent("change",{detail:K}))},Ae=(L,z,rt)=>{let K=0,yt,Dt,Jt,ft,vt=!1,Wt=(zt,ye,Ue,Ee,$e,ke)=>{let fr=K;Ue!==void 0&&zt>Ue&&(zt=Ue),ye!==void 0&&zt<ye&&(zt=ye),K=zt;let Me=K;return(Ee===Ut&&ke||Ee===Qt&&$e)&&(Me=100-Me),Ee===Ut?z.style.top=`${Me}%`:z.style.left=`${Me}%`,fr!==K},oe=zt=>zt===z||z.contains(zt),Tt=(zt,ye,Ue,Ee)=>{yt=zt,Dt=ye,Jt=Ue,ft=Ee},ue=zt=>{vt=zt,z.classList.toggle("disabled",vt),vt?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},Be=(zt,ye)=>{ye==null?z.removeAttribute(zt):z.setAttribute(zt,ye)},nr=zt=>z.getAttribute(zt),It=zt=>{if(!vt){switch(zt.key){case"ArrowLeft":{zt.preventDefault(),typeof yt=="function"&&yt(rt);break}case"ArrowRight":{zt.preventDefault(),typeof Dt=="function"&&Dt(rt);break}case"ArrowUp":{zt.preventDefault(),typeof Jt=="function"&&Jt(rt);break}case"ArrowDown":{zt.preventDefault(),typeof ft=="function"&&ft(rt);break}}_e(L,zt)}},ee=()=>{vt||sr(L,z)};return z.className=`pointer pointer-${rt}`,z.addEventListener("keydown",It),z.addEventListener("click",ee),{$pointer:z,get percent(){return K},get disabled(){return vt},set disabled(zt){ue(zt)},updatePosition:Wt,isClicked:oe,setCallbacks:Tt,setAttr:Be,getAttr:nr,destroy:()=>{z.removeEventListener("keydown",It),z.removeEventListener("click",ee),z.remove()}}},hr=L=>{if(L==null)return;if(Array.isArray(L))return L;if(L.trim()==="")return;let z=L.split(","),rt=[],K=!0;for(let yt=0;yt<z.length;yt++){let Dt=z[yt].trim();Dt!==""&&(rt.push(Dt),St(Dt)||(K=!1))}return K?rt.map(yt=>Number(yt)):rt},Le=(L,z)=>z?z.findIndex(rt=>rt===L||rt.toString().trim()===L.toString().trim()):-1,We=L=>({updatePosition:(z,rt,K,yt)=>{if(rt.length<=0)return;let Dt=rt.length===1,Jt=rt[0],ft=rt[rt.length-1];z===Ut?(L.style.removeProperty("width"),L.style.removeProperty("right"),L.style.removeProperty("left"),Dt?L.style.height=`${Jt}%`:L.style.height=`${Math.abs(Jt-ft)}%`,yt?(L.style.bottom="0%",Dt?L.style.top="auto":L.style.top=`${Math.min(100-ft,100-Jt)}%`):(L.style.bottom="auto",Dt?L.style.top="0%":L.style.top=`${Math.min(Jt,ft)}%`)):(L.style.removeProperty("height"),L.style.removeProperty("top"),L.style.removeProperty("bottom"),Dt?L.style.width=`${Jt}%`:L.style.width=`${Math.abs(Jt-ft)}%`,K?(L.style.right="0%",Dt?L.style.left="auto":L.style.left=`${Math.min(100-ft,100-Jt)}%`):(L.style.right="auto",Dt?L.style.left="0%":L.style.left=`${Math.min(Jt,ft)}%`))}}),Ce="--animate-onclick",dr="--width",ot="--height",bt="--panel-bg-border-radius",Ht="--panel-bg",Mt="--panel-bg-hover",Kt="--panel-bg-fill",Ze="--pointer-width",Qe="--pointer-height",_r="--pointer-border-radius",Ke="--pointer-bg",pr="--pointer-bg-hover",Se="--pointer-bg-focus",Dn="--pointer-shadow",Nt="--pointer-shadow-hover",te="--pointer-shadow-focus",Xt="--pointer-border",le="--pointer-border-hover",ze="--pointer-border-focus",Vi=(L,z,rt)=>{let K=new Map;for(let yt of L.attributes){let Dt=yt.nodeName.trim().toLowerCase();if(!z.test(Dt))continue;let Jt=Dt.replace(/\D/g,"").trim(),ft=Jt===""||Jt==="0"||Jt==="1"?0:Ot(Jt,0)-1,vt=rt&&typeof rt=="function"?rt(yt.value):yt.value;K.set(ft,vt)}return K},Nn=L=>{if(!L)return null;let z=L.getAttribute(_t);if(!z)return null;let rt=z.split(";"),K=[];for(let yt of rt)yt.trim()!==""&&K.push(yt.trim());return K},ls=[[dr,B,"sliderWidth",null],[ot,q,"sliderHeight",null],[bt,F,"sliderRadius",null],[Ht,N,"sliderBg",null],[Mt,U,"sliderBgHover",null],[Kt,H,"sliderBgFill",null],[Ze,X,"pointer#Width",/^pointer([0-9]*)-width$/],[Qe,Y,"pointer#Height",/^pointer([0-9]*)-height$/],[_r,Q,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Ke,tt,"pointer#Bg",/^pointer([0-9]*)-bg$/],[pr,it,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Se,st,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Dn,mt,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Nt,ut,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[te,Et,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Xt,At,"pointer#Border",/^pointer([0-9]*)-border$/],[le,Vt,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[ze,lt,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],ci=(L,z,rt)=>{let K=null,yt=[],Dt=new Map,Jt=(It,ee=z)=>{let zt=[...ee.classList];for(let ye of zt)ye.startsWith(It)&&z.classList.remove(ye)},ft=()=>{Jt("shape");let It=z.querySelectorAll(".pointer");for(let ee of It)Jt("shape",ee)},vt=It=>{K=It,Jt("theme-"),typeof It=="string"&&z.classList.add(`theme-${It}`)},Wt=()=>{if(ft(),!(yt.length<=0)){z.classList.add("shape",`shape-${yt[0]}`);for(let It=1;It<yt.length;It++){let ee=yt[It];if(!ee)continue;let zt=z.querySelector(`.pointer-${It}`);!zt||zt.classList.add("shape",`shape-${ee}`)}}},oe=(It,ee)=>{yt[It]=ee,Wt()},Tt=()=>{ft();let It=Vi(L,/^pointer([0-9]*)-shape$/);if(!(It.size<=0)){for(let ee of It){let zt=ee[0];yt[zt]=ee[1]}Wt()}},ue=(It,ee)=>`${It}-${ee}`,Be=(It,ee,zt)=>{let ye=rt[zt];if(!ye)return;let Ue=zt===0?z:ye.$pointer;if(ee==null){Dt.has(ue(It,zt))&&Dt.delete(ue(It,zt)),Ue.style.removeProperty(It);return}Dt.set(ue(It,zt),ee),Ue.style.setProperty(It,ee)},nr=(It,ee)=>Dt.get(ue(It,ee));return(()=>{for(let It of ls){let[ee,zt,ye,Ue]=It;if(Ue){let $e=Vi(L,Ue);for(let ke of $e){let fr=ke[0],Me=ke[1];Be(ee,Me,fr)}}else{let $e=L.getAttribute(zt);Be(ee,$e,0)}let Ee=[];if(ye.indexOf("#")===-1)Ee.push([ye,0]);else{Ee.push([ye.replace("#",""),0]),Ee.push([ye.replace("#","0"),0]),Ee.push([ye.replace("#","1"),0]);for(let $e=1;$e<rt.length;$e++)Ee.push([ye.replace("#",($e+1).toString()),$e])}for(let $e of Ee)try{let ke=$e[0],fr=$e[1];Object.prototype.hasOwnProperty.call(L,ke)||Object.defineProperty(L,ke,{get(){return nr(ee,fr)},set:Me=>{Be(ee,Me,fr)}})}catch(ke){console.error(ke)}}vt(L.getAttribute(T)),Tt()})(),{setStyle:Be,getStyle:nr,get theme(){return K},set theme(It){vt(It)},get pointerShapes(){return yt},setPointerShape:oe}},on="animate-on-click",Gr="range-dragging",us=(L,z,rt,K)=>{let yt=[],Dt=oe=>{for(let Tt of yt)Tt.update&&typeof Tt.update=="function"&&Tt.update(oe)},Jt=()=>{for(let oe of yt)oe.destroy&&typeof oe.destroy=="function"&&oe.destroy()},ft=(oe,Tt)=>{for(let ue of yt)ue.onAttrChange&&typeof ue.onAttrChange=="function"&&ue.onAttrChange(oe,Tt)},vt=oe=>{if(oe.gettersAndSetters){for(let Tt of oe.gettersAndSetters)if(!(!Tt.name||!Tt.attributes))try{Object.prototype.hasOwnProperty.call(L,Tt.name)||Object.defineProperty(L,Tt.name,Tt.attributes)}catch(ue){console.error("defineSettersGetters error:",ue)}}},Wt=oe=>{var Tt;if(!oe.css)return;let ue=(Tt=L.shadowRoot)==null?void 0:Tt.querySelector("style");!ue||(ue.innerHTML+=oe.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let oe of window.tcRangeSliderPlugins){let Tt=oe();yt.push(Tt),Tt.init&&typeof Tt.init=="function"&&(Tt.init(L,z,rt,K),vt(Tt),Wt(Tt))}},update:Dt,onAttrChange:ft,destroy:Jt}},$n=10,cs=20,kn=(L,z)=>{let rt=new Map,K=/^value([0-9]*)$/;for(let ft of L.attributes){let vt=ft.nodeName.trim().toLowerCase();if(!K.test(vt))continue;let Wt=vt.replace("value","").trim(),oe=Wt===""||Wt==="0"||Wt==="1"?0:Ot(Wt,0)-1,Tt=St(ft.value)?Ot(ft.value,0):ft.value;rt.set(oe,Tt)}let yt=Math.max(...Array.from(rt.keys())),Dt=[];Dt.push([Ae(L,z,0),rt.get(0)]);let Jt=z;for(let ft=1;ft<=yt;ft++){let vt=z.cloneNode(!0);Jt.after(vt),Jt=vt,Dt.push([Ae(L,vt,ft),rt.get(ft)])}return Dt},zi=(L,z,rt,K,yt,Dt,Jt)=>{try{Object.defineProperty(L,K,{configurable:!0,get(){if(!z)return;let ft=z.pointers[rt];if(!ft)return;let vt=z.getTextValue(ft.percent);return St(vt)?Ot(vt,vt):vt},set:ft=>{z.pointers[rt]?z==null||z.setValue(ft,rt):z==null||z.addPointer(ft)}}),Object.defineProperty(L,yt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.pointers[rt])==null?void 0:ft.getAttr("aria-label"))!=null?vt:void 0},set:ft=>{!z||z.setAriaLabel(rt,ft)}}),Object.defineProperty(L,Dt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.styles)==null?void 0:ft.pointerShapes[rt])!=null?vt:null},set:ft=>{!z||!z.styles||z.styles.setPointerShape(rt,ft)}}),Object.defineProperty(L,Jt,{configurable:!0,get(){var ft;return(ft=z==null?void 0:z.pointers[rt].disabled)!=null?ft:!1},set:ft=>{if(!z)return;let vt=z==null?void 0:z.pointers[rt];!vt||(vt.disabled=ft)}})}catch(ft){console.error(ft)}},Mr=(L,z)=>{let rt=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let K=2;K<$n;K++)rt.push([`value${K}`,`ariaLabel${K}`,`pointer${K}Shape`,`pointer${K}Disabled`,K-1]);for(let K of rt)zi(L,z,K[4],K[0],K[1],K[2],K[3])},hs=(L,z,rt)=>{var K;let yt=(K=rt.shadowRoot)==null?void 0:K.querySelector(".container");if(yt)for(let Dt of L)z?yt.prepend(Dt.$pointer):yt.append(Dt.$pointer)},Mn=(L,z)=>{if(!(!z||L.length<=1)){for(let rt of L)rt.$pointer.style.zIndex=cs.toString();z.$pointer.style.zIndex=(cs*2).toString()}},ta=0,Er=100,an=2,Cr="0.3s",hi=(L,z,rt)=>{let K=rt.map(V=>V[0]),yt=null,Dt=null,Jt=null,ft=null,vt=ta,Wt=Er,oe,Tt,ue=Qt,Be=an,nr=!1,It=!1,ee=!1,zt=0,ye=1/0,Ue=!1,Ee,$e,ke=!1,fr=!1,Me=!1,Fr=Cr,Sr=[],ds=V=>{ke||(V.preventDefault&&V.preventDefault(),Vr(V),window.addEventListener("mousemove",Vr),window.addEventListener("mouseup",Wr),de(L,V))},Wr=V=>{ke||(Ee=void 0,$e=void 0,window.removeEventListener("mousemove",Vr),window.removeEventListener("mouseup",Wr),Fr&&z.classList.add(on),Ne(L,V))},pl=(V,at)=>{if(K.length<=0)return;if(K.length===1)return K[0].isClicked(V)&&Fr&&z.classList.remove(on),K[0];let jt=fs(V);if(Ue){let se=at,He=Ji(se);He!==void 0&&(se=Bt(se,He)),jt?(Ee=se,$e=0,Fr&&z.classList.remove(on)):Ee!==void 0&&($e=se-Ee,Ee=se)}if(!Fn(V)&&!jt){for(let se of K)if(!(!se.isClicked(V)||se.disabled))return Fr&&z.classList.remove(on),se;for(let se of K)if(yt===se)return se}let ve=1/0,xe=null;for(let se of K){if(se.disabled)continue;let He=Math.abs(at-se.percent);He<ve&&(ve=He,xe=se)}return xe},Ui=()=>K.findIndex(V=>yt===V&&!V.disabled),Vr=V=>{let at;if(ue===Ut){let{height:ve,top:xe}=z.getBoundingClientRect(),se=V.type.indexOf("mouse")!==-1?V.clientY:V.touches[0].clientY;at=Math.min(Math.max(0,se-xe),ve)*100/ve}else{let{width:ve,left:xe}=z.getBoundingClientRect(),se=V.type.indexOf("mouse")!==-1?V.clientX:V.touches[0].clientX;at=Math.min(Math.max(0,se-xe),ve)*100/ve}if((nr||It)&&(at=100-at),yt=pl(V.target,at),yt&&Mn(K,yt),Ue&&K.length>1&&$e!==void 0){let ve=K[0],xe=K[K.length-1],se=ve.percent+$e<0,He=xe.percent+$e>100;if(se||He)return;for(let ao=0;ao<K.length;ao++)qe(ao,K[ao].percent+$e);return}let jt=Ui();jt!==-1&&(qe(jt,at),yt==null||yt.$pointer.focus())},qi=V=>{if(ke||document.activeElement!==L||yt!=null&&yt.disabled)return;V.stopPropagation(),V.preventDefault();let at=V.deltaY<0,jt=nr||It,ve=at?!jt:jt,xe=Ui();xe!==-1&&(ve?zr(xe,K[xe].percent):di(xe,K[xe].percent))},On=V=>{ke||fr||(ue===Ut?It?qe(V,100):qe(V,0):nr?di(V,K[V].percent):zr(V,K[V].percent))},ps=V=>{ke||fr||(ue===Ut?It?qe(V,0):qe(V,100):nr?zr(V,K[V].percent):di(V,K[V].percent))},Gi=V=>{ke||fr||(ue===Ut?It?di(V,K[V].percent):zr(V,K[V].percent):nr?qe(V,100):qe(V,0))},Wi=V=>{ke||fr||(ue===Ut?It?zr(V,K[V].percent):di(V,K[V].percent):nr?qe(V,0):qe(V,100))},Fn=V=>V.classList.contains("panel"),fs=V=>V.classList.contains("panel-fill"),zr=(V,at)=>{if(at===void 0)return;let jt=Ji(at);jt==null&&(jt=1),at-=jt,at<0&&(at=0),qe(V,at)},di=(V,at)=>{if(at===void 0)return;let jt=Ji(at);jt==null&&(jt=1),at+=jt,at>100&&(at=100),qe(V,at)},Zr=()=>{!ft||ft.update({percents:Yr(),values:Yi(),$pointers:Pr(),min:ms(),max:bs(),data:ra(),step:ea(),round:ia(),type:na(),textMin:zn(),textMax:Jr(),rightToLeft:yr(),bottomToTop:Oe(),pointersOverlap:Qi(),pointersMinDistance:Xi(),pointersMaxDistance:oa(),rangeDragging:Ki(),disabled:fi(),keyboardDisabled:yi(),mousewheelDisabled:aa()})},Zi=()=>{Zr()},ys=V=>{if(!(ee||K.length<=1||Wt===vt))if(V===0){let at=ye*100/(Wt-vt);return Math.max(0,K[V+1].percent-at)}else{let at=zt*100/(Wt-vt);return Math.min(K[V-1].percent+at,100)}},Vn=V=>{if(!(ee||K.length<=1||Wt===vt))if(V===K.length-1){let at=ye*100/(Wt-vt);return Math.min(K[V-1].percent+at,100)}else{let at=zt*100/(Wt-vt);return Math.max(0,K[V+1].percent-at)}},Ji=V=>{let at;if(typeof oe=="function"){let jt=fe(0,100,vt,Wt,V);at=oe(jt,V)}else at=oe;if(St(at)){let jt=Wt-vt;return at=jt===0?0:at*100/jt,at}},sn=V=>{if(V===void 0)return;let at=fe(0,100,vt,Wt,V);return Tt!==void 0?Tt[Math.round(at)]:qt(at,Be)},zn=()=>Tt!==void 0?Tt[vt]:vt,Jr=()=>Tt!==void 0?Tt[Wt]:Wt,ea=()=>oe,Un=V=>{var at;return V<=0||ee?zn():(at=sn(K[V-1].percent))!=null?at:""},fl=V=>{var at;return K.length<=1||V>=K.length-1||ee?Jr():(at=sn(K[V+1].percent))!=null?at:""},Yr=()=>K.map(V=>V.percent),Yi=()=>K.map(V=>sn(V.percent)),Pr=()=>K.map(V=>V.$pointer),ms=()=>vt,bs=()=>Wt,ra=()=>Tt,na=()=>ue,ia=()=>Be,Xi=()=>zt,oa=()=>ye,pi=V=>Sr[V],yr=()=>nr,Oe=()=>It,fi=()=>ke,yi=()=>fr,aa=()=>Me,Qi=()=>ee,Ki=()=>Ue,qe=(V,at)=>{if(at===void 0)return;let jt=Ji(at);jt!==void 0&&(at=Bt(at,jt));let ve=K[V];if(!ve)return;let xe=ve.updatePosition(at,ys(V),Vn(V),ue,nr,It);Dt==null||Dt.updatePosition(ue,K.map(se=>se.percent),nr,It),Zr();for(let se of K){let He=sn(se.percent);He!==void 0&&(se.setAttr("aria-valuenow",He.toString()),se.setAttr("aria-valuetext",He.toString()))}sa(),xe&&lr(L,K.map(se=>sn(se.percent)))},Ur=()=>{for(let V=0;V<K.length;V++)qe(V,K[V].percent)},ln=(V,at)=>{vt=Tt!==void 0?0:Ot(V,ta),Wt=Tt!==void 0?Tt.length-1:Ot(at,Er),mr(vt),to(Wt)},sa=()=>{var V,at;for(let jt=0;jt<K.length;jt++){let ve=K[jt];ve.setAttr("aria-valuemin",((V=Un(jt))!=null?V:"").toString()),ve.setAttr("aria-valuemax",((at=fl(jt))!=null?at:"").toString())}},mr=V=>{vt=Ot(V,ta),vt>Wt&&(Wt=vt+Er),Ur()},to=V=>{Wt=Ot(V,Er),Wt<vt&&(Wt=vt+Er),Ur()},jn=V=>{ee=!0;for(let at=0;at<V.length;at++)eo(V[at],at);ee=!1;for(let at=0;at<V.length;at++)eo(V[at],at)},eo=(V,at)=>{let jt;Tt!==void 0?(jt=V==null?0:Le(V,Tt),jt===-1&&(jt=0)):(jt=Ot(V,vt),jt<vt&&(jt=vt),jt>Wt&&(jt=Wt));let ve=fe(vt,Wt,0,100,jt);qe(at,ve)},qn=V=>{if(V==null){oe=void 0;return}if(typeof V=="function"){oe=V,Ur();return}if(St(V)){oe=Ot(V,1);let at=Math.abs(Wt-vt);oe>at&&(oe=void 0),Ur();return}oe=void 0},Gn=V=>{ee=V,Ur()},la=V=>{(!St(V)||V<0)&&(V=0),zt=V},ro=V=>{(!St(V)||V<0)&&(V=1/0),ye=V},un=V=>{ke=V,z.classList.toggle("disabled",ke),ke?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},mi=V=>{fr=V},En=V=>{Me=V,Me?document.removeEventListener("wheel",qi):document.addEventListener("wheel",qi,{passive:!1})},no=V=>{if(V==null){Tt=void 0;return}if(Tt=hr(V),Tt===void 0||Tt.length<=0){Tt=void 0;return}mr(0),to(Tt.length-1),oe===void 0&&qn(1)},Ir=V=>{var at;typeof V=="string"?ue=V.trim().toLowerCase()===Ut?Ut:Qt:ue=Qt;let jt=(at=L.shadowRoot)==null?void 0:at.querySelector(".range-slider-box");if(!jt)return;jt.className=`range-slider-box type-${ue}`,Ur();let ve=ue===Ut?"vertical":"horizontal";for(let xe of K)xe.setAttr("aria-orientation",ve)},ua=V=>{nr=V,K.length>1&&hs(K,nr,L),Ur(),Zr()},io=V=>{It=V,K.length>1&&hs(K,It,L),Ur(),Zr()},Tr=V=>{Be=Ot(V,an),Be<0&&(Be=an),Zr()},oo=V=>{V==null||V.toString().trim().toLowerCase()==="false"?(Fr=void 0,z.style.removeProperty(Ce),z.classList.remove(on)):(Fr=V.toString(),z.style.setProperty(Ce,Fr),z.classList.add(on))},br=(V,at)=>{let jt=K[V];!jt||(jt.setAttr("aria-label",at),Sr[V]=at)},bi=V=>{if(Ee=void 0,K.length<=1){Ue=!1,z.classList.remove(Gr);return}Ue=V,z.classList.toggle(Gr,Ue)},Wn=()=>{un(xt(L.getAttribute(I))),fr=xt(L.getAttribute($)),Me=xt(L.getAttribute(M));let V=Vi(L,/^pointer([0-9]*)-disabled$/,at=>xt(at));for(let at of V){let jt=at[0];!K[jt]||(K[jt].disabled=at[1])}},yl=()=>{let V=Vi(L,/^aria-label([0-9]*)$/);for(let at of V){let jt=at[0];br(jt,at[1])}},Zn=V=>{let at=K.length,jt=K[at-1].$pointer,ve=jt.cloneNode(!0);jt.after(ve);let xe=Ae(L,ve,at);return xe.setCallbacks(On,ps,Gi,Wi),K.push(xe),eo(V,at),Ur(),Zr(),at},ca=()=>{let V=K.length,at=K[V-1];return at?(at.destroy(),K.pop(),K.length<=1&&bi(!1),Ur(),Zr(),V-1):-1};return(()=>{var V,at;for(let ve of K)ve.setCallbacks(On,ps,Gi,Wi);let jt=(V=L.shadowRoot)==null?void 0:V.querySelector(".panel-fill");jt&&(Dt=We(jt)),Ir(L.getAttribute(S)),ua(xt(L.getAttribute(A))),io(xt(L.getAttribute(R))),ln(L.getAttribute(w),L.getAttribute(x)),qn(L.getAttribute(j)),no(L.getAttribute(g)),jn(rt.map(ve=>ve[1])),Gn(xt(L.getAttribute(m))),la(Ot(L.getAttribute(O),0)),ro(Ot(L.getAttribute(r),1/0)),bi(xt(L.getAttribute(b))),Tr(Ot(L.getAttribute(E),an)),Wn(),yl(),Jt=ci(L,z,K),oo((at=L.getAttribute(wt))!=null?at:Cr),z.addEventListener("mousedown",ds),z.addEventListener("mouseup",Wr),z.addEventListener("touchmove",Vr),z.addEventListener("touchstart",Vr),Me||document.addEventListener("wheel",qi,{passive:!1}),ft=us(L,Zi,{setValues:jn,setMin:mr,setMax:to,setStep:qn,setPointersOverlap:Gn,setPointersMinDistance:la,setPointersMaxDistance:ro,setDisabled:un,setType:Ir,setRightToLeft:ua,setBottomToTop:io,setRound:Tr,setKeyboardDisabled:mi,setMousewheelDisabled:En,setRangeDragging:bi,setData:no},{getPercents:Yr,getValues:Yi,getPointerElements:Pr,getMin:ms,getMax:bs,getStep:ea,getData:ra,getType:na,getRound:ia,getTextMin:zn,getTextMax:Jr,isRightToLeft:yr,isBottomToTop:Oe,isDisabled:fi,isKeyboardDisabled:yi,isMousewheelDisabled:aa,isPointersOverlap:Qi,isRangeDraggingEnabled:Ki,getPointersMinDistance:Xi,getPointersMaxDistance:oa}),ft.init()})(),{get pointers(){return K},get styles(){return Jt},get pluginsManager(){return ft},get min(){return zn()},get max(){return Jr()},get step(){return ea()},get pointersOverlap(){return Qi()},set pointersOverlap(V){Gn(V)},get pointersMinDistance(){return Xi()},set pointersMinDistance(V){la(V)},get pointersMaxDistance(){return oa()},set pointersMaxDistance(V){ro(V)},get disabled(){return fi()},set disabled(V){un(V)},get data(){return ra()},get type(){return na()},set type(V){Ir(V)},get rightToLeft(){return yr()},set rightToLeft(V){ua(V)},get bottomToTop(){return Oe()},set bottomToTop(V){io(V)},get round(){return ia()},set round(V){Tr(V)},get animateOnClick(){return Fr},set animateOnClick(V){oo(V)},get keyboardDisabled(){return yi()},set keyboardDisabled(V){mi(V)},get mousewheelDisabled(){return aa()},set mousewheelDisabled(V){En(V)},get rangeDragging(){return Ki()},set rangeDragging(V){bi(V)},setMin:mr,setMax:to,setValue:eo,setStep:qn,setData:no,getTextValue:sn,setAriaLabel:br,getAriaLabel:pi,addPointer:Zn,removePointer:ca,destroy:()=>{z.removeEventListener("mousedown",ds),z.removeEventListener("mouseup",Wr),z.removeEventListener("touchmove",Vr),z.removeEventListener("touchstart",Vr),document.removeEventListener("wheel",qi);for(let V of K)V.destroy();ft==null||ft.destroy()}}},Hn=(L,z,rt)=>{let K=ls.find(([ft,vt,Wt,oe])=>vt.replace("#","")===z.replace(/\d+/g,""));if(K&&L.styles){let[ft,vt,Wt,oe]=K,Tt=z.replace(/\D/g,"").trim(),ue=Tt===""||Tt==="0"||Tt==="1"?0:Ot(Tt,0)-1;L.styles.setStyle(ft,rt,ue);return}switch(L&&L.pluginsManager&&L.pluginsManager.onAttrChange(z,rt),z){case w:{L.setMin(rt);break}case x:{L.setMax(rt);break}case j:{L.setStep(rt);break}case m:{L.pointersOverlap=xt(rt);break}case O:{L.pointersMinDistance=Ot(rt,0);break}case b:{L.rangeDragging=xt(rt);break}case r:{L.pointersMaxDistance=Ot(rt,1/0);break}case I:{L.disabled=xt(rt);break}case $:{L.keyboardDisabled=xt(rt);break}case M:{L.mousewheelDisabled=xt(rt);break}case g:{L.setData(rt);break}case S:{L.type=rt;break}case A:{L.rightToLeft=xt(rt);break}case R:{L.bottomToTop=xt(rt);break}case E:{L.round=Ot(rt,an);break}case T:{L.styles&&(L.styles.theme=rt);break}case wt:{L.animateOnClick=rt;break}}let yt=null;if(/^value([0-9]*)$/.test(z)&&(yt="value"),/^pointer([0-9]*)-disabled$/.test(z)&&(yt="pointer-disabled"),/^aria-label([0-9]*)$/.test(z)&&(yt="aria-label"),/^pointer([0-9]*)-shape$/.test(z)&&(yt="pointer-shape"),!yt)return;let Dt=z.replace(/\D/g,"").trim(),Jt=Dt===""||Dt==="0"||Dt==="1"?0:Ot(Dt,0)-1;switch(yt){case"value":{L.setValue(rt,Jt);break}case"pointer-disabled":{let ft=L==null?void 0:L.pointers[Jt];if(!ft)return;ft.disabled=xt(rt);break}case"aria-label":{L.setAriaLabel(Jt,rt);break}case"pointer-shape":{L.styles&&L.styles.setPointerShape(Jt,rt);break}}},dl=class extends HTMLElement{constructor(){super(),v(this,"slider"),v(this,"_externalCSSList",[]),v(this,"_observer",null),this.attachShadow({mode:"open"})}set step(L){this.slider&&this.slider.setStep(L)}get step(){var L;return(L=this.slider)==null?void 0:L.step}set disabled(L){this.slider&&(this.slider.disabled=L)}get disabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.disabled)!=null?z:!1}set data(L){var z;(z=this.slider)==null||z.setData(L)}get data(){var L;return(L=this.slider)==null?void 0:L.data}set min(L){var z;(z=this.slider)==null||z.setMin(L)}get min(){var L;return(L=this.slider)==null?void 0:L.min}set max(L){var z;(z=this.slider)==null||z.setMax(L)}get max(){var L;return(L=this.slider)==null?void 0:L.max}set round(L){!this.slider||(this.slider.round=L)}get round(){var L,z;return(z=(L=this.slider)==null?void 0:L.round)!=null?z:an}set type(L){!this.slider||(this.slider.type=L??Qt)}get type(){var L;return((L=this.slider)==null?void 0:L.type)||Qt}set pointersOverlap(L){!this.slider||(this.slider.pointersOverlap=L)}get pointersOverlap(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersOverlap)!=null?z:!1}set pointersMinDistance(L){!this.slider||(this.slider.pointersMinDistance=L)}get pointersMinDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMinDistance)!=null?z:0}set pointersMaxDistance(L){!this.slider||(this.slider.pointersMaxDistance=L)}get pointersMaxDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMaxDistance)!=null?z:1/0}set theme(L){!this.slider||!this.slider.styles||(this.slider.styles.theme=L)}get theme(){var L,z,rt;return(rt=(z=(L=this.slider)==null?void 0:L.styles)==null?void 0:z.theme)!=null?rt:null}set rtl(L){!this.slider||(this.slider.rightToLeft=L)}get rtl(){var L,z;return(z=(L=this.slider)==null?void 0:L.rightToLeft)!=null?z:!1}set btt(L){!this.slider||(this.slider.bottomToTop=L)}get btt(){var L,z;return(z=(L=this.slider)==null?void 0:L.bottomToTop)!=null?z:!1}set keyboardDisabled(L){!this.slider||(this.slider.keyboardDisabled=L)}get keyboardDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.keyboardDisabled)!=null?z:!1}set mousewheelDisabled(L){!this.slider||(this.slider.mousewheelDisabled=L)}get mousewheelDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.mousewheelDisabled)!=null?z:!1}set animateOnClick(L){!this.slider||(this.slider.animateOnClick=L)}get animateOnClick(){var L;return(L=this.slider)==null?void 0:L.animateOnClick}get rangeDragging(){var L,z;return(z=(L=this.slider)==null?void 0:L.rangeDragging)!=null?z:!1}set rangeDragging(L){this.slider&&(this.slider.rangeDragging=xt(L))}get externalCSSList(){return this._externalCSSList}addPointer(L){var z,rt;if(!this.slider)return;let K=(rt=(z=this.slider)==null?void 0:z.addPointer(L))!=null?rt:0;zi(this,this.slider,K,`value${K+1}`,`ariaLabel${K+1}`,`pointerShape${K+1}`,`pointer${K+1}Disabled`)}removePointer(){var L;!this.slider||(L=this.slider)==null||L.removePointer()}addCSS(L){if(!this.shadowRoot)return;let z=document.createElement("style");z.textContent=L,this.shadowRoot.appendChild(z)}connectedCallback(){var L,z;if(!this.shadowRoot)return;this._externalCSSList=Nn(this),this.shadowRoot.innerHTML=k(C,this._externalCSSList);let rt=(L=this.shadowRoot)==null?void 0:L.querySelector(".pointer");if(!rt)return;let K=(z=this.shadowRoot)==null?void 0:z.getElementById("range-slider");if(!K)return;let yt=kn(this,rt);this.slider=hi(this,K,yt),Mr(this,this.slider),this._observer=new MutationObserver(Dt=>{Dt.forEach(Jt=>{var ft;if(!this.slider||Jt.type!=="attributes")return;let vt=Jt.attributeName;!vt||Hn(this.slider,vt,(ft=this.getAttribute(vt))!=null?ft:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Hr=dl;window.tcRangeSlider=Hr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Hr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Hr{})})();function Jd(y,l){Object.keys(l).forEach(p=>{y.setAttribute(p,l[p])})}class Yd extends Zd{register(){super.register()}unregister(){super.unregister()}build(){const l=this.schema.properties,p=this.options,v=this.schema.description,k=this.theme,C=this.defaults.startVals[this.key];p.compact||(this.header=this.label=k.getFormInputLabel(this.getTitle(),this.isRequired())),v&&(this.description=k.getFormInputDescription(this.translateProperty(v))),p.infoText&&(this.infoButton=k.getInfoButton(this.translateProperty(p.infoText)));const m=document.createElement("tc-range-slider"),O=Object.keys(l).find(g=>g.includes("min")),r=Object.keys(l).find(g=>g.includes("max")),b={min:l[O].minimum,max:l[r].maximum,value1:(C==null?void 0:C[O])||l[O].default,value2:(C==null?void 0:C[r])||l[r].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};Jd(m,b),this.input=m,this.input.id=this.formname,this.control=k.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",g=>{g.preventDefault(),g.stopPropagation(),this.value={[O]:g.detail.value1,[r]:g.detail.value2},this.onChange(!0)}),this.container.appendChild(this.control)}destroy(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),super.destroy()}}const Xd=[{type:"object",format:"minmax",func:Yd}],Qd=y=>{Xd.map(({type:l,format:p,func:v})=>{Da.JSONEditor.defaults.startVals=y,Da.JSONEditor.defaults.editors[p]=v,Da.JSONEditor.defaults.resolvers.unshift(k=>{if(k.type===l&&k.format===p)return p})})};class pc extends kr{constructor(){super();ce(this,$a);ce(this,Ma);ce(this,$i,{});ce(this,ui,null);this.schema,this.startVals,this.options={},this.unstyled=!1}getSchema(){return this.schema}setSchema(p){this.schema=p}getDefaultValues(){return this.startVals}setDefaultValues(p){this.startVals=p}getValues(){return ge(this,$i)}firstUpdated(){if(!ge(this,ui)){Qd(this.startVals||{});const p=this.renderRoot.querySelector("form");Si(this,ui,new Da.JSONEditor(p,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),Dr(this,Ma,Vc).call(this)}}render(){return ae`
|
|
284
|
+
`,destroy:$}};window.tcRangeSliderPlugins.push(_)})(),(()=>{var m=Object.defineProperty,s=Math.pow,p=(L,z,rt)=>z in L?m(L,z,{enumerable:!0,configurable:!0,writable:!0,value:rt}):L[z]=rt,b=(L,z,rt)=>(p(L,typeof z!="symbol"?z+"":z,rt),rt),_=(L,z)=>` ${z&&z.length>0?z.map(rt=>`<link rel="stylesheet" href="${rt}" />`).join(""):""} <style> ${L} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,E=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",y="pointers-overlap",j="pointers-min-distance",r="pointers-max-distance",v="range-dragging",g="data",w="min",k="max",O="step",C="round",S="type",T="theme",A="rtl",R="btt",I="disabled",$="keyboard-disabled",M="mousewheel-disabled",B="slider-width",q="slider-height",F="slider-radius",N="slider-bg",U="slider-bg-hover",H="slider-bg-fill",X="pointer-width",Y="pointer-height",K="pointer-radius",tt="pointer-bg",it="pointer-bg-hover",st="pointer-bg-focus",yt="pointer-shadow",ct="pointer-shadow-hover",Et="pointer-shadow-focus",At="pointer-border",Vt="pointer-border-hover",lt="pointer-border-focus",wt="animate-onclick",_t="css-links",Ut="vertical",Kt="horizontal",fe=(L,z,rt,Q,mt)=>{let Dt=z-L;return Dt===0?rt:(Q-rt)*(mt-L)/Dt+rt},St=L=>!isNaN(parseFloat(L))&&isFinite(L),jt=(L,z)=>St(L)?Number(L):z,Bt=(L,z)=>z===0?0:Math.round(L/z)*z,qt=(L,z=1/0)=>{if(z===1/0)return L;let rt=s(10,z);return Math.round(L*rt)/rt},xt=L=>L==null?!1:typeof L=="boolean"?L:L.trim().toLowerCase()==="true",lr=(L,z)=>{L.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:z}}))},de=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:z}}))},Ne=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:z}}))},ge=(L,z)=>{L.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:z}}))},cr=(L,z)=>{if(!z||z.length<=0)return;let rt=z.map(mt=>St(mt)?jt(mt,mt):mt),Q={values:rt||[]};Q.value=rt[0],Q.value0=rt[0],Q.value1=rt[0];for(let mt=1;mt<rt.length;mt++)Q[`value${mt+1}`]=rt[mt];L.dispatchEvent(new CustomEvent("change",{detail:Q}))},Ae=(L,z,rt)=>{let Q=0,mt,Dt,Jt,ft,vt=!1,Wt=(zt,me,Ue,Oe,$e,_e)=>{let mr=Q;Ue!==void 0&&zt>Ue&&(zt=Ue),me!==void 0&&zt<me&&(zt=me),Q=zt;let Me=Q;return(Oe===Ut&&_e||Oe===Kt&&$e)&&(Me=100-Me),Oe===Ut?z.style.top=`${Me}%`:z.style.left=`${Me}%`,mr!==Q},oe=zt=>zt===z||z.contains(zt),Tt=(zt,me,Ue,Oe)=>{mt=zt,Dt=me,Jt=Ue,ft=Oe},ue=zt=>{vt=zt,z.classList.toggle("disabled",vt),vt?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},Be=(zt,me)=>{me==null?z.removeAttribute(zt):z.setAttribute(zt,me)},ir=zt=>z.getAttribute(zt),It=zt=>{if(!vt){switch(zt.key){case"ArrowLeft":{zt.preventDefault(),typeof mt=="function"&&mt(rt);break}case"ArrowRight":{zt.preventDefault(),typeof Dt=="function"&&Dt(rt);break}case"ArrowUp":{zt.preventDefault(),typeof Jt=="function"&&Jt(rt);break}case"ArrowDown":{zt.preventDefault(),typeof ft=="function"&&ft(rt);break}}ge(L,zt)}},ee=()=>{vt||lr(L,z)};return z.className=`pointer pointer-${rt}`,z.addEventListener("keydown",It),z.addEventListener("click",ee),{$pointer:z,get percent(){return Q},get disabled(){return vt},set disabled(zt){ue(zt)},updatePosition:Wt,isClicked:oe,setCallbacks:Tt,setAttr:Be,getAttr:ir,destroy:()=>{z.removeEventListener("keydown",It),z.removeEventListener("click",ee),z.remove()}}},dr=L=>{if(L==null)return;if(Array.isArray(L))return L;if(L.trim()==="")return;let z=L.split(","),rt=[],Q=!0;for(let mt=0;mt<z.length;mt++){let Dt=z[mt].trim();Dt!==""&&(rt.push(Dt),St(Dt)||(Q=!1))}return Q?rt.map(mt=>Number(mt)):rt},Le=(L,z)=>z?z.findIndex(rt=>rt===L||rt.toString().trim()===L.toString().trim()):-1,We=L=>({updatePosition:(z,rt,Q,mt)=>{if(rt.length<=0)return;let Dt=rt.length===1,Jt=rt[0],ft=rt[rt.length-1];z===Ut?(L.style.removeProperty("width"),L.style.removeProperty("right"),L.style.removeProperty("left"),Dt?L.style.height=`${Jt}%`:L.style.height=`${Math.abs(Jt-ft)}%`,mt?(L.style.bottom="0%",Dt?L.style.top="auto":L.style.top=`${Math.min(100-ft,100-Jt)}%`):(L.style.bottom="auto",Dt?L.style.top="0%":L.style.top=`${Math.min(Jt,ft)}%`)):(L.style.removeProperty("height"),L.style.removeProperty("top"),L.style.removeProperty("bottom"),Dt?L.style.width=`${Jt}%`:L.style.width=`${Math.abs(Jt-ft)}%`,Q?(L.style.right="0%",Dt?L.style.left="auto":L.style.left=`${Math.min(100-ft,100-Jt)}%`):(L.style.right="auto",Dt?L.style.left="0%":L.style.left=`${Math.min(Jt,ft)}%`))}}),Ce="--animate-onclick",pr="--width",ot="--height",bt="--panel-bg-border-radius",Ht="--panel-bg",Mt="--panel-bg-hover",Qt="--panel-bg-fill",Ze="--pointer-width",Ke="--pointer-height",xr="--pointer-border-radius",Qe="--pointer-bg",fr="--pointer-bg-hover",Se="--pointer-bg-focus",Dn="--pointer-shadow",Nt="--pointer-shadow-hover",te="--pointer-shadow-focus",Xt="--pointer-border",ce="--pointer-border-hover",ze="--pointer-border-focus",Vi=(L,z,rt)=>{let Q=new Map;for(let mt of L.attributes){let Dt=mt.nodeName.trim().toLowerCase();if(!z.test(Dt))continue;let Jt=Dt.replace(/\D/g,"").trim(),ft=Jt===""||Jt==="0"||Jt==="1"?0:jt(Jt,0)-1,vt=rt&&typeof rt=="function"?rt(mt.value):mt.value;Q.set(ft,vt)}return Q},Nn=L=>{if(!L)return null;let z=L.getAttribute(_t);if(!z)return null;let rt=z.split(";"),Q=[];for(let mt of rt)mt.trim()!==""&&Q.push(mt.trim());return Q},us=[[pr,B,"sliderWidth",null],[ot,q,"sliderHeight",null],[bt,F,"sliderRadius",null],[Ht,N,"sliderBg",null],[Mt,U,"sliderBgHover",null],[Qt,H,"sliderBgFill",null],[Ze,X,"pointer#Width",/^pointer([0-9]*)-width$/],[Ke,Y,"pointer#Height",/^pointer([0-9]*)-height$/],[xr,K,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Qe,tt,"pointer#Bg",/^pointer([0-9]*)-bg$/],[fr,it,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Se,st,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Dn,yt,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Nt,ct,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[te,Et,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Xt,At,"pointer#Border",/^pointer([0-9]*)-border$/],[ce,Vt,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[ze,lt,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],ui=(L,z,rt)=>{let Q=null,mt=[],Dt=new Map,Jt=(It,ee=z)=>{let zt=[...ee.classList];for(let me of zt)me.startsWith(It)&&z.classList.remove(me)},ft=()=>{Jt("shape");let It=z.querySelectorAll(".pointer");for(let ee of It)Jt("shape",ee)},vt=It=>{Q=It,Jt("theme-"),typeof It=="string"&&z.classList.add(`theme-${It}`)},Wt=()=>{if(ft(),!(mt.length<=0)){z.classList.add("shape",`shape-${mt[0]}`);for(let It=1;It<mt.length;It++){let ee=mt[It];if(!ee)continue;let zt=z.querySelector(`.pointer-${It}`);!zt||zt.classList.add("shape",`shape-${ee}`)}}},oe=(It,ee)=>{mt[It]=ee,Wt()},Tt=()=>{ft();let It=Vi(L,/^pointer([0-9]*)-shape$/);if(!(It.size<=0)){for(let ee of It){let zt=ee[0];mt[zt]=ee[1]}Wt()}},ue=(It,ee)=>`${It}-${ee}`,Be=(It,ee,zt)=>{let me=rt[zt];if(!me)return;let Ue=zt===0?z:me.$pointer;if(ee==null){Dt.has(ue(It,zt))&&Dt.delete(ue(It,zt)),Ue.style.removeProperty(It);return}Dt.set(ue(It,zt),ee),Ue.style.setProperty(It,ee)},ir=(It,ee)=>Dt.get(ue(It,ee));return(()=>{for(let It of us){let[ee,zt,me,Ue]=It;if(Ue){let $e=Vi(L,Ue);for(let _e of $e){let mr=_e[0],Me=_e[1];Be(ee,Me,mr)}}else{let $e=L.getAttribute(zt);Be(ee,$e,0)}let Oe=[];if(me.indexOf("#")===-1)Oe.push([me,0]);else{Oe.push([me.replace("#",""),0]),Oe.push([me.replace("#","0"),0]),Oe.push([me.replace("#","1"),0]);for(let $e=1;$e<rt.length;$e++)Oe.push([me.replace("#",($e+1).toString()),$e])}for(let $e of Oe)try{let _e=$e[0],mr=$e[1];Object.prototype.hasOwnProperty.call(L,_e)||Object.defineProperty(L,_e,{get(){return ir(ee,mr)},set:Me=>{Be(ee,Me,mr)}})}catch(_e){console.error(_e)}}vt(L.getAttribute(T)),Tt()})(),{setStyle:Be,getStyle:ir,get theme(){return Q},set theme(It){vt(It)},get pointerShapes(){return mt},setPointerShape:oe}},on="animate-on-click",Wr="range-dragging",hs=(L,z,rt,Q)=>{let mt=[],Dt=oe=>{for(let Tt of mt)Tt.update&&typeof Tt.update=="function"&&Tt.update(oe)},Jt=()=>{for(let oe of mt)oe.destroy&&typeof oe.destroy=="function"&&oe.destroy()},ft=(oe,Tt)=>{for(let ue of mt)ue.onAttrChange&&typeof ue.onAttrChange=="function"&&ue.onAttrChange(oe,Tt)},vt=oe=>{if(oe.gettersAndSetters){for(let Tt of oe.gettersAndSetters)if(!(!Tt.name||!Tt.attributes))try{Object.prototype.hasOwnProperty.call(L,Tt.name)||Object.defineProperty(L,Tt.name,Tt.attributes)}catch(ue){console.error("defineSettersGetters error:",ue)}}},Wt=oe=>{var Tt;if(!oe.css)return;let ue=(Tt=L.shadowRoot)==null?void 0:Tt.querySelector("style");!ue||(ue.innerHTML+=oe.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let oe of window.tcRangeSliderPlugins){let Tt=oe();mt.push(Tt),Tt.init&&typeof Tt.init=="function"&&(Tt.init(L,z,rt,Q),vt(Tt),Wt(Tt))}},update:Dt,onAttrChange:ft,destroy:Jt}},$n=10,ds=20,kn=(L,z)=>{let rt=new Map,Q=/^value([0-9]*)$/;for(let ft of L.attributes){let vt=ft.nodeName.trim().toLowerCase();if(!Q.test(vt))continue;let Wt=vt.replace("value","").trim(),oe=Wt===""||Wt==="0"||Wt==="1"?0:jt(Wt,0)-1,Tt=St(ft.value)?jt(ft.value,0):ft.value;rt.set(oe,Tt)}let mt=Math.max(...Array.from(rt.keys())),Dt=[];Dt.push([Ae(L,z,0),rt.get(0)]);let Jt=z;for(let ft=1;ft<=mt;ft++){let vt=z.cloneNode(!0);Jt.after(vt),Jt=vt,Dt.push([Ae(L,vt,ft),rt.get(ft)])}return Dt},zi=(L,z,rt,Q,mt,Dt,Jt)=>{try{Object.defineProperty(L,Q,{configurable:!0,get(){if(!z)return;let ft=z.pointers[rt];if(!ft)return;let vt=z.getTextValue(ft.percent);return St(vt)?jt(vt,vt):vt},set:ft=>{z.pointers[rt]?z==null||z.setValue(ft,rt):z==null||z.addPointer(ft)}}),Object.defineProperty(L,mt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.pointers[rt])==null?void 0:ft.getAttr("aria-label"))!=null?vt:void 0},set:ft=>{!z||z.setAriaLabel(rt,ft)}}),Object.defineProperty(L,Dt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.styles)==null?void 0:ft.pointerShapes[rt])!=null?vt:null},set:ft=>{!z||!z.styles||z.styles.setPointerShape(rt,ft)}}),Object.defineProperty(L,Jt,{configurable:!0,get(){var ft;return(ft=z==null?void 0:z.pointers[rt].disabled)!=null?ft:!1},set:ft=>{if(!z)return;let vt=z==null?void 0:z.pointers[rt];!vt||(vt.disabled=ft)}})}catch(ft){console.error(ft)}},Mr=(L,z)=>{let rt=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let Q=2;Q<$n;Q++)rt.push([`value${Q}`,`ariaLabel${Q}`,`pointer${Q}Shape`,`pointer${Q}Disabled`,Q-1]);for(let Q of rt)zi(L,z,Q[4],Q[0],Q[1],Q[2],Q[3])},ps=(L,z,rt)=>{var Q;let mt=(Q=rt.shadowRoot)==null?void 0:Q.querySelector(".container");if(mt)for(let Dt of L)z?mt.prepend(Dt.$pointer):mt.append(Dt.$pointer)},Mn=(L,z)=>{if(!(!z||L.length<=1)){for(let rt of L)rt.$pointer.style.zIndex=ds.toString();z.$pointer.style.zIndex=(ds*2).toString()}},ea=0,Cr=100,an=2,Sr="0.3s",hi=(L,z,rt)=>{let Q=rt.map(V=>V[0]),mt=null,Dt=null,Jt=null,ft=null,vt=ea,Wt=Cr,oe,Tt,ue=Kt,Be=an,ir=!1,It=!1,ee=!1,zt=0,me=1/0,Ue=!1,Oe,$e,_e=!1,mr=!1,Me=!1,Fr=Sr,Pr=[],fs=V=>{_e||(V.preventDefault&&V.preventDefault(),Vr(V),window.addEventListener("mousemove",Vr),window.addEventListener("mouseup",Zr),de(L,V))},Zr=V=>{_e||(Oe=void 0,$e=void 0,window.removeEventListener("mousemove",Vr),window.removeEventListener("mouseup",Zr),Fr&&z.classList.add(on),Ne(L,V))},yl=(V,at)=>{if(Q.length<=0)return;if(Q.length===1)return Q[0].isClicked(V)&&Fr&&z.classList.remove(on),Q[0];let Ot=ys(V);if(Ue){let le=at,He=Ji(le);He!==void 0&&(le=Bt(le,He)),Ot?(Oe=le,$e=0,Fr&&z.classList.remove(on)):Oe!==void 0&&($e=le-Oe,Oe=le)}if(!Fn(V)&&!Ot){for(let le of Q)if(!(!le.isClicked(V)||le.disabled))return Fr&&z.classList.remove(on),le;for(let le of Q)if(mt===le)return le}let ve=1/0,we=null;for(let le of Q){if(le.disabled)continue;let He=Math.abs(at-le.percent);He<ve&&(ve=He,we=le)}return we},Ui=()=>Q.findIndex(V=>mt===V&&!V.disabled),Vr=V=>{let at;if(ue===Ut){let{height:ve,top:we}=z.getBoundingClientRect(),le=V.type.indexOf("mouse")!==-1?V.clientY:V.touches[0].clientY;at=Math.min(Math.max(0,le-we),ve)*100/ve}else{let{width:ve,left:we}=z.getBoundingClientRect(),le=V.type.indexOf("mouse")!==-1?V.clientX:V.touches[0].clientX;at=Math.min(Math.max(0,le-we),ve)*100/ve}if((ir||It)&&(at=100-at),mt=yl(V.target,at),mt&&Mn(Q,mt),Ue&&Q.length>1&&$e!==void 0){let ve=Q[0],we=Q[Q.length-1],le=ve.percent+$e<0,He=we.percent+$e>100;if(le||He)return;for(let ao=0;ao<Q.length;ao++)qe(ao,Q[ao].percent+$e);return}let Ot=Ui();Ot!==-1&&(qe(Ot,at),mt==null||mt.$pointer.focus())},qi=V=>{if(_e||document.activeElement!==L||mt!=null&&mt.disabled)return;V.stopPropagation(),V.preventDefault();let at=V.deltaY<0,Ot=ir||It,ve=at?!Ot:Ot,we=Ui();we!==-1&&(ve?zr(we,Q[we].percent):di(we,Q[we].percent))},jn=V=>{_e||mr||(ue===Ut?It?qe(V,100):qe(V,0):ir?di(V,Q[V].percent):zr(V,Q[V].percent))},ms=V=>{_e||mr||(ue===Ut?It?qe(V,0):qe(V,100):ir?zr(V,Q[V].percent):di(V,Q[V].percent))},Gi=V=>{_e||mr||(ue===Ut?It?di(V,Q[V].percent):zr(V,Q[V].percent):ir?qe(V,100):qe(V,0))},Wi=V=>{_e||mr||(ue===Ut?It?zr(V,Q[V].percent):di(V,Q[V].percent):ir?qe(V,0):qe(V,100))},Fn=V=>V.classList.contains("panel"),ys=V=>V.classList.contains("panel-fill"),zr=(V,at)=>{if(at===void 0)return;let Ot=Ji(at);Ot==null&&(Ot=1),at-=Ot,at<0&&(at=0),qe(V,at)},di=(V,at)=>{if(at===void 0)return;let Ot=Ji(at);Ot==null&&(Ot=1),at+=Ot,at>100&&(at=100),qe(V,at)},Jr=()=>{!ft||ft.update({percents:Xr(),values:Yi(),$pointers:Tr(),min:vs(),max:gs(),data:na(),step:ra(),round:oa(),type:ia(),textMin:zn(),textMax:Yr(),rightToLeft:yr(),bottomToTop:xe(),pointersOverlap:Ki(),pointersMinDistance:Xi(),pointersMaxDistance:aa(),rangeDragging:Qi(),disabled:fi(),keyboardDisabled:mi(),mousewheelDisabled:sa()})},Zi=()=>{Jr()},bs=V=>{if(!(ee||Q.length<=1||Wt===vt))if(V===0){let at=me*100/(Wt-vt);return Math.max(0,Q[V+1].percent-at)}else{let at=zt*100/(Wt-vt);return Math.min(Q[V-1].percent+at,100)}},Vn=V=>{if(!(ee||Q.length<=1||Wt===vt))if(V===Q.length-1){let at=me*100/(Wt-vt);return Math.min(Q[V-1].percent+at,100)}else{let at=zt*100/(Wt-vt);return Math.max(0,Q[V+1].percent-at)}},Ji=V=>{let at;if(typeof oe=="function"){let Ot=fe(0,100,vt,Wt,V);at=oe(Ot,V)}else at=oe;if(St(at)){let Ot=Wt-vt;return at=Ot===0?0:at*100/Ot,at}},sn=V=>{if(V===void 0)return;let at=fe(0,100,vt,Wt,V);return Tt!==void 0?Tt[Math.round(at)]:qt(at,Be)},zn=()=>Tt!==void 0?Tt[vt]:vt,Yr=()=>Tt!==void 0?Tt[Wt]:Wt,ra=()=>oe,Un=V=>{var at;return V<=0||ee?zn():(at=sn(Q[V-1].percent))!=null?at:""},bl=V=>{var at;return Q.length<=1||V>=Q.length-1||ee?Yr():(at=sn(Q[V+1].percent))!=null?at:""},Xr=()=>Q.map(V=>V.percent),Yi=()=>Q.map(V=>sn(V.percent)),Tr=()=>Q.map(V=>V.$pointer),vs=()=>vt,gs=()=>Wt,na=()=>Tt,ia=()=>ue,oa=()=>Be,Xi=()=>zt,aa=()=>me,pi=V=>Pr[V],yr=()=>ir,xe=()=>It,fi=()=>_e,mi=()=>mr,sa=()=>Me,Ki=()=>ee,Qi=()=>Ue,qe=(V,at)=>{if(at===void 0)return;let Ot=Ji(at);Ot!==void 0&&(at=Bt(at,Ot));let ve=Q[V];if(!ve)return;let we=ve.updatePosition(at,bs(V),Vn(V),ue,ir,It);Dt==null||Dt.updatePosition(ue,Q.map(le=>le.percent),ir,It),Jr();for(let le of Q){let He=sn(le.percent);He!==void 0&&(le.setAttr("aria-valuenow",He.toString()),le.setAttr("aria-valuetext",He.toString()))}la(),we&&cr(L,Q.map(le=>sn(le.percent)))},Ur=()=>{for(let V=0;V<Q.length;V++)qe(V,Q[V].percent)},ln=(V,at)=>{vt=Tt!==void 0?0:jt(V,ea),Wt=Tt!==void 0?Tt.length-1:jt(at,Cr),br(vt),to(Wt)},la=()=>{var V,at;for(let Ot=0;Ot<Q.length;Ot++){let ve=Q[Ot];ve.setAttr("aria-valuemin",((V=Un(Ot))!=null?V:"").toString()),ve.setAttr("aria-valuemax",((at=bl(Ot))!=null?at:"").toString())}},br=V=>{vt=jt(V,ea),vt>Wt&&(Wt=vt+Cr),Ur()},to=V=>{Wt=jt(V,Cr),Wt<vt&&(Wt=vt+Cr),Ur()},On=V=>{ee=!0;for(let at=0;at<V.length;at++)eo(V[at],at);ee=!1;for(let at=0;at<V.length;at++)eo(V[at],at)},eo=(V,at)=>{let Ot;Tt!==void 0?(Ot=V==null?0:Le(V,Tt),Ot===-1&&(Ot=0)):(Ot=jt(V,vt),Ot<vt&&(Ot=vt),Ot>Wt&&(Ot=Wt));let ve=fe(vt,Wt,0,100,Ot);qe(at,ve)},qn=V=>{if(V==null){oe=void 0;return}if(typeof V=="function"){oe=V,Ur();return}if(St(V)){oe=jt(V,1);let at=Math.abs(Wt-vt);oe>at&&(oe=void 0),Ur();return}oe=void 0},Gn=V=>{ee=V,Ur()},ca=V=>{(!St(V)||V<0)&&(V=0),zt=V},ro=V=>{(!St(V)||V<0)&&(V=1/0),me=V},cn=V=>{_e=V,z.classList.toggle("disabled",_e),_e?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},yi=V=>{mr=V},En=V=>{Me=V,Me?document.removeEventListener("wheel",qi):document.addEventListener("wheel",qi,{passive:!1})},no=V=>{if(V==null){Tt=void 0;return}if(Tt=dr(V),Tt===void 0||Tt.length<=0){Tt=void 0;return}br(0),to(Tt.length-1),oe===void 0&&qn(1)},Br=V=>{var at;typeof V=="string"?ue=V.trim().toLowerCase()===Ut?Ut:Kt:ue=Kt;let Ot=(at=L.shadowRoot)==null?void 0:at.querySelector(".range-slider-box");if(!Ot)return;Ot.className=`range-slider-box type-${ue}`,Ur();let ve=ue===Ut?"vertical":"horizontal";for(let we of Q)we.setAttr("aria-orientation",ve)},ua=V=>{ir=V,Q.length>1&&ps(Q,ir,L),Ur(),Jr()},io=V=>{It=V,Q.length>1&&ps(Q,It,L),Ur(),Jr()},Ar=V=>{Be=jt(V,an),Be<0&&(Be=an),Jr()},oo=V=>{V==null||V.toString().trim().toLowerCase()==="false"?(Fr=void 0,z.style.removeProperty(Ce),z.classList.remove(on)):(Fr=V.toString(),z.style.setProperty(Ce,Fr),z.classList.add(on))},vr=(V,at)=>{let Ot=Q[V];!Ot||(Ot.setAttr("aria-label",at),Pr[V]=at)},bi=V=>{if(Oe=void 0,Q.length<=1){Ue=!1,z.classList.remove(Wr);return}Ue=V,z.classList.toggle(Wr,Ue)},Wn=()=>{cn(xt(L.getAttribute(I))),mr=xt(L.getAttribute($)),Me=xt(L.getAttribute(M));let V=Vi(L,/^pointer([0-9]*)-disabled$/,at=>xt(at));for(let at of V){let Ot=at[0];!Q[Ot]||(Q[Ot].disabled=at[1])}},vl=()=>{let V=Vi(L,/^aria-label([0-9]*)$/);for(let at of V){let Ot=at[0];vr(Ot,at[1])}},Zn=V=>{let at=Q.length,Ot=Q[at-1].$pointer,ve=Ot.cloneNode(!0);Ot.after(ve);let we=Ae(L,ve,at);return we.setCallbacks(jn,ms,Gi,Wi),Q.push(we),eo(V,at),Ur(),Jr(),at},ha=()=>{let V=Q.length,at=Q[V-1];return at?(at.destroy(),Q.pop(),Q.length<=1&&bi(!1),Ur(),Jr(),V-1):-1};return(()=>{var V,at;for(let ve of Q)ve.setCallbacks(jn,ms,Gi,Wi);let Ot=(V=L.shadowRoot)==null?void 0:V.querySelector(".panel-fill");Ot&&(Dt=We(Ot)),Br(L.getAttribute(S)),ua(xt(L.getAttribute(A))),io(xt(L.getAttribute(R))),ln(L.getAttribute(w),L.getAttribute(k)),qn(L.getAttribute(O)),no(L.getAttribute(g)),On(rt.map(ve=>ve[1])),Gn(xt(L.getAttribute(y))),ca(jt(L.getAttribute(j),0)),ro(jt(L.getAttribute(r),1/0)),bi(xt(L.getAttribute(v))),Ar(jt(L.getAttribute(C),an)),Wn(),vl(),Jt=ui(L,z,Q),oo((at=L.getAttribute(wt))!=null?at:Sr),z.addEventListener("mousedown",fs),z.addEventListener("mouseup",Zr),z.addEventListener("touchmove",Vr),z.addEventListener("touchstart",Vr),Me||document.addEventListener("wheel",qi,{passive:!1}),ft=hs(L,Zi,{setValues:On,setMin:br,setMax:to,setStep:qn,setPointersOverlap:Gn,setPointersMinDistance:ca,setPointersMaxDistance:ro,setDisabled:cn,setType:Br,setRightToLeft:ua,setBottomToTop:io,setRound:Ar,setKeyboardDisabled:yi,setMousewheelDisabled:En,setRangeDragging:bi,setData:no},{getPercents:Xr,getValues:Yi,getPointerElements:Tr,getMin:vs,getMax:gs,getStep:ra,getData:na,getType:ia,getRound:oa,getTextMin:zn,getTextMax:Yr,isRightToLeft:yr,isBottomToTop:xe,isDisabled:fi,isKeyboardDisabled:mi,isMousewheelDisabled:sa,isPointersOverlap:Ki,isRangeDraggingEnabled:Qi,getPointersMinDistance:Xi,getPointersMaxDistance:aa}),ft.init()})(),{get pointers(){return Q},get styles(){return Jt},get pluginsManager(){return ft},get min(){return zn()},get max(){return Yr()},get step(){return ra()},get pointersOverlap(){return Ki()},set pointersOverlap(V){Gn(V)},get pointersMinDistance(){return Xi()},set pointersMinDistance(V){ca(V)},get pointersMaxDistance(){return aa()},set pointersMaxDistance(V){ro(V)},get disabled(){return fi()},set disabled(V){cn(V)},get data(){return na()},get type(){return ia()},set type(V){Br(V)},get rightToLeft(){return yr()},set rightToLeft(V){ua(V)},get bottomToTop(){return xe()},set bottomToTop(V){io(V)},get round(){return oa()},set round(V){Ar(V)},get animateOnClick(){return Fr},set animateOnClick(V){oo(V)},get keyboardDisabled(){return mi()},set keyboardDisabled(V){yi(V)},get mousewheelDisabled(){return sa()},set mousewheelDisabled(V){En(V)},get rangeDragging(){return Qi()},set rangeDragging(V){bi(V)},setMin:br,setMax:to,setValue:eo,setStep:qn,setData:no,getTextValue:sn,setAriaLabel:vr,getAriaLabel:pi,addPointer:Zn,removePointer:ha,destroy:()=>{z.removeEventListener("mousedown",fs),z.removeEventListener("mouseup",Zr),z.removeEventListener("touchmove",Vr),z.removeEventListener("touchstart",Vr),document.removeEventListener("wheel",qi);for(let V of Q)V.destroy();ft==null||ft.destroy()}}},Hn=(L,z,rt)=>{let Q=us.find(([ft,vt,Wt,oe])=>vt.replace("#","")===z.replace(/\d+/g,""));if(Q&&L.styles){let[ft,vt,Wt,oe]=Q,Tt=z.replace(/\D/g,"").trim(),ue=Tt===""||Tt==="0"||Tt==="1"?0:jt(Tt,0)-1;L.styles.setStyle(ft,rt,ue);return}switch(L&&L.pluginsManager&&L.pluginsManager.onAttrChange(z,rt),z){case w:{L.setMin(rt);break}case k:{L.setMax(rt);break}case O:{L.setStep(rt);break}case y:{L.pointersOverlap=xt(rt);break}case j:{L.pointersMinDistance=jt(rt,0);break}case v:{L.rangeDragging=xt(rt);break}case r:{L.pointersMaxDistance=jt(rt,1/0);break}case I:{L.disabled=xt(rt);break}case $:{L.keyboardDisabled=xt(rt);break}case M:{L.mousewheelDisabled=xt(rt);break}case g:{L.setData(rt);break}case S:{L.type=rt;break}case A:{L.rightToLeft=xt(rt);break}case R:{L.bottomToTop=xt(rt);break}case C:{L.round=jt(rt,an);break}case T:{L.styles&&(L.styles.theme=rt);break}case wt:{L.animateOnClick=rt;break}}let mt=null;if(/^value([0-9]*)$/.test(z)&&(mt="value"),/^pointer([0-9]*)-disabled$/.test(z)&&(mt="pointer-disabled"),/^aria-label([0-9]*)$/.test(z)&&(mt="aria-label"),/^pointer([0-9]*)-shape$/.test(z)&&(mt="pointer-shape"),!mt)return;let Dt=z.replace(/\D/g,"").trim(),Jt=Dt===""||Dt==="0"||Dt==="1"?0:jt(Dt,0)-1;switch(mt){case"value":{L.setValue(rt,Jt);break}case"pointer-disabled":{let ft=L==null?void 0:L.pointers[Jt];if(!ft)return;ft.disabled=xt(rt);break}case"aria-label":{L.setAriaLabel(Jt,rt);break}case"pointer-shape":{L.styles&&L.styles.setPointerShape(Jt,rt);break}}},ml=class extends HTMLElement{constructor(){super(),b(this,"slider"),b(this,"_externalCSSList",[]),b(this,"_observer",null),this.attachShadow({mode:"open"})}set step(L){this.slider&&this.slider.setStep(L)}get step(){var L;return(L=this.slider)==null?void 0:L.step}set disabled(L){this.slider&&(this.slider.disabled=L)}get disabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.disabled)!=null?z:!1}set data(L){var z;(z=this.slider)==null||z.setData(L)}get data(){var L;return(L=this.slider)==null?void 0:L.data}set min(L){var z;(z=this.slider)==null||z.setMin(L)}get min(){var L;return(L=this.slider)==null?void 0:L.min}set max(L){var z;(z=this.slider)==null||z.setMax(L)}get max(){var L;return(L=this.slider)==null?void 0:L.max}set round(L){!this.slider||(this.slider.round=L)}get round(){var L,z;return(z=(L=this.slider)==null?void 0:L.round)!=null?z:an}set type(L){!this.slider||(this.slider.type=L??Kt)}get type(){var L;return((L=this.slider)==null?void 0:L.type)||Kt}set pointersOverlap(L){!this.slider||(this.slider.pointersOverlap=L)}get pointersOverlap(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersOverlap)!=null?z:!1}set pointersMinDistance(L){!this.slider||(this.slider.pointersMinDistance=L)}get pointersMinDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMinDistance)!=null?z:0}set pointersMaxDistance(L){!this.slider||(this.slider.pointersMaxDistance=L)}get pointersMaxDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMaxDistance)!=null?z:1/0}set theme(L){!this.slider||!this.slider.styles||(this.slider.styles.theme=L)}get theme(){var L,z,rt;return(rt=(z=(L=this.slider)==null?void 0:L.styles)==null?void 0:z.theme)!=null?rt:null}set rtl(L){!this.slider||(this.slider.rightToLeft=L)}get rtl(){var L,z;return(z=(L=this.slider)==null?void 0:L.rightToLeft)!=null?z:!1}set btt(L){!this.slider||(this.slider.bottomToTop=L)}get btt(){var L,z;return(z=(L=this.slider)==null?void 0:L.bottomToTop)!=null?z:!1}set keyboardDisabled(L){!this.slider||(this.slider.keyboardDisabled=L)}get keyboardDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.keyboardDisabled)!=null?z:!1}set mousewheelDisabled(L){!this.slider||(this.slider.mousewheelDisabled=L)}get mousewheelDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.mousewheelDisabled)!=null?z:!1}set animateOnClick(L){!this.slider||(this.slider.animateOnClick=L)}get animateOnClick(){var L;return(L=this.slider)==null?void 0:L.animateOnClick}get rangeDragging(){var L,z;return(z=(L=this.slider)==null?void 0:L.rangeDragging)!=null?z:!1}set rangeDragging(L){this.slider&&(this.slider.rangeDragging=xt(L))}get externalCSSList(){return this._externalCSSList}addPointer(L){var z,rt;if(!this.slider)return;let Q=(rt=(z=this.slider)==null?void 0:z.addPointer(L))!=null?rt:0;zi(this,this.slider,Q,`value${Q+1}`,`ariaLabel${Q+1}`,`pointerShape${Q+1}`,`pointer${Q+1}Disabled`)}removePointer(){var L;!this.slider||(L=this.slider)==null||L.removePointer()}addCSS(L){if(!this.shadowRoot)return;let z=document.createElement("style");z.textContent=L,this.shadowRoot.appendChild(z)}connectedCallback(){var L,z;if(!this.shadowRoot)return;this._externalCSSList=Nn(this),this.shadowRoot.innerHTML=_(E,this._externalCSSList);let rt=(L=this.shadowRoot)==null?void 0:L.querySelector(".pointer");if(!rt)return;let Q=(z=this.shadowRoot)==null?void 0:z.getElementById("range-slider");if(!Q)return;let mt=kn(this,rt);this.slider=hi(this,Q,mt),Mr(this,this.slider),this._observer=new MutationObserver(Dt=>{Dt.forEach(Jt=>{var ft;if(!this.slider||Jt.type!=="attributes")return;let vt=Jt.attributeName;!vt||Hn(this.slider,vt,(ft=this.getAttribute(vt))!=null?ft:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Hr=ml;window.tcRangeSlider=Hr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Hr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Hr{})})();function np(m,s){Object.keys(s).forEach(p=>{m.setAttribute(p,s[p])})}class ip extends rp{register(){super.register()}unregister(){super.unregister()}build(){const s=this.schema.properties,p=this.options,b=this.schema.description,_=this.theme,E=this.defaults.startVals[this.key];p.compact||(this.header=this.label=_.getFormInputLabel(this.getTitle(),this.isRequired())),b&&(this.description=_.getFormInputDescription(this.translateProperty(b))),p.infoText&&(this.infoButton=_.getInfoButton(this.translateProperty(p.infoText)));const y=document.createElement("tc-range-slider"),j=Object.keys(s).find(g=>g.includes("min")),r=Object.keys(s).find(g=>g.includes("max")),v={min:s[j].minimum,max:s[r].maximum,value1:(E==null?void 0:E[j])||s[j].default,value2:(E==null?void 0:E[r])||s[r].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};np(y,v),this.input=y,this.input.id=this.formname,this.control=_.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",g=>{g.preventDefault(),g.stopPropagation(),this.value={[j]:g.detail.value1,[r]:g.detail.value2},this.onChange(!0)}),this.container.appendChild(this.control)}destroy(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),super.destroy()}}const op=[{type:"object",format:"minmax",func:ip}],ap=m=>{op.map(({type:s,format:p,func:b})=>{Na.JSONEditor.defaults.startVals=m,Na.JSONEditor.defaults.editors[p]=b,Na.JSONEditor.defaults.resolvers.unshift(_=>{if(_.type===s&&_.format===p)return p})})};class mu extends jr{constructor(){super();se(this,Ma);se(this,Ha);se(this,$i,{});se(this,ci,null);this.schema,this.startVals,this.options={show_opt_in:!1,disable_collapse:!0,disable_edit_json:!0,disable_properties:!0,disable_array_delete_all_rows:!0,disable_array_delete_last_row:!0,array_controls_top:!0},this.unstyled=!1}getSchema(){return this.schema}setSchema(p){this.schema=p}getDefaultValues(){return this.startVals}setDefaultValues(p){this.startVals=p}getValues(){return Ee(this,$i)}firstUpdated(){if(!Ee(this,ci)){ap(this.startVals||{});const p=this.renderRoot.querySelector("form");Si(this,ci,new Na.JSONEditor(p,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),rr(this,Ha,qu).call(this)}}render(){return ae`
|
|
358
285
|
<style>
|
|
359
|
-
${
|
|
360
|
-
${!this.unstyled&&
|
|
286
|
+
${tp}
|
|
287
|
+
${!this.unstyled&&ep}
|
|
361
288
|
</style>
|
|
362
289
|
<form></form>
|
|
363
|
-
`}}$i=new WeakMap,
|
|
290
|
+
`}}$i=new WeakMap,ci=new WeakMap,Ma=new WeakSet,Uu=function(){this.dispatchEvent(new CustomEvent("change",{detail:Ee(this,$i),bubbles:!0,composed:!0})),this.requestUpdate()},Ha=new WeakSet,qu=function(){["ready","change"].map(b=>{Ee(this,ci).on(b,()=>{Si(this,$i,Ee(this,ci).getValue()),rr(this,Ma,Uu).call(this)})})},Xe(mu,"properties",{schema:{attribute:!1,type:Object},startVals:{attribute:!1,type:Object},options:{attribute:!1,type:Object},unstyled:{type:Boolean}}),customElements.define("eox-jsonform",mu);const sp=(m,s,p)=>{let b=s;return p.layer.getSource().getTileUrlFunction()&&(b||(b=p.layer.getSource().getTileUrlFunction()),p.layer.getSource().setTileUrlFunction((..._)=>pd(b(..._),m)),p.layer.getSource().setKey(new Date)),b};class yu extends jr{constructor(){super();se(this,Fa);se(this,Yo,{});se(this,Xo,null);se(this,Ko,void 0);se(this,Va,"");se(this,za,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){Si(this,Xo,Gd(this.layer,this.layerConfig));const p={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return ae`
|
|
364
291
|
<style>
|
|
365
|
-
${
|
|
366
|
-
${!this.unstyled&&
|
|
292
|
+
${Ee(this,Va)}
|
|
293
|
+
${!this.unstyled&&Ee(this,za)}
|
|
367
294
|
</style>
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
295
|
+
${qr(this.layerConfig,()=>ae`
|
|
296
|
+
<!-- Render a JSON form for layer configuration -->
|
|
297
|
+
<eox-jsonform
|
|
298
|
+
.schema=${this.layerConfig.schema}
|
|
299
|
+
.startVals=${Ee(this,Xo)}
|
|
300
|
+
.options=${p}
|
|
301
|
+
@change=${rr(this,Fa,Gu)}
|
|
302
|
+
></eox-jsonform>
|
|
303
|
+
`)}
|
|
304
|
+
`}}Yo=new WeakMap,Xo=new WeakMap,Ko=new WeakMap,Fa=new WeakSet,Gu=function(p){Si(this,Yo,p.detail),Si(this,Ko,sp(Ee(this,Yo),Ee(this,Ko),this)),this.requestUpdate()},Va=new WeakMap,za=new WeakMap,Xe(yu,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",yu);class bu extends jr{constructor(){super();se(this,Qo,p=>this.selectedTab===p&&"highlighted");se(this,Ua,`
|
|
375
305
|
.tabbed figure {
|
|
376
306
|
margin: 0;
|
|
377
307
|
}
|
|
@@ -391,7 +321,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
391
321
|
.tabbed label.highlighted {
|
|
392
322
|
background: lightgrey;
|
|
393
323
|
}
|
|
394
|
-
`);
|
|
324
|
+
`);se(this,qa,`
|
|
395
325
|
.tabbed {
|
|
396
326
|
font-size: small;
|
|
397
327
|
}
|
|
@@ -412,42 +342,49 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
412
342
|
background: #00417011;
|
|
413
343
|
border-top: 1px solid #0041701a;
|
|
414
344
|
}
|
|
415
|
-
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!
|
|
345
|
+
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const p=this.tabs,b=this.actions,_=b.length+p.length>1;return ae`
|
|
416
346
|
<style>
|
|
417
|
-
${
|
|
418
|
-
${!this.unstyled&&
|
|
347
|
+
${Ee(this,Ua)}
|
|
348
|
+
${!this.unstyled&&Ee(this,qa)}
|
|
419
349
|
</style>
|
|
420
350
|
<div class="tabbed">
|
|
421
|
-
|
|
351
|
+
<!-- Navigation for tabs and actions -->
|
|
352
|
+
${qr(_,()=>ae`
|
|
422
353
|
<nav>
|
|
423
354
|
<div>
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
355
|
+
<!-- Labels for tabs -->
|
|
356
|
+
${Ba(p,(E,y)=>ae`
|
|
357
|
+
<label
|
|
358
|
+
class=${Ee(this,Qo).call(this,y)}
|
|
359
|
+
@click=${()=>this.selectedTab=y}
|
|
360
|
+
>
|
|
361
|
+
<!-- Customizable icon for each tab -->
|
|
362
|
+
<slot name=${`${E}-icon`}>${E}</slot>
|
|
363
|
+
</label>
|
|
364
|
+
`)}
|
|
432
365
|
</div>
|
|
433
366
|
<div>
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
<
|
|
437
|
-
|
|
438
|
-
|
|
367
|
+
<!-- Icons for actions -->
|
|
368
|
+
${Ba(b,E=>ae`
|
|
369
|
+
<span>
|
|
370
|
+
<!-- Customizable icon for each action -->
|
|
371
|
+
<slot name=${`${E}-icon`}>${E}</slot>
|
|
372
|
+
</span>
|
|
373
|
+
`)}
|
|
439
374
|
</div>
|
|
440
375
|
</nav>
|
|
441
376
|
`)}
|
|
442
377
|
<figure>
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
378
|
+
<!-- Content for each tab -->
|
|
379
|
+
${Ba(p,(E,y)=>ae`
|
|
380
|
+
<div class="tab ${Ee(this,Qo).call(this,y)}">
|
|
381
|
+
<!-- Content slot for each tab -->
|
|
382
|
+
<slot name=${`${E}-content`}>${E}</slot>
|
|
446
383
|
</div>
|
|
447
384
|
`)}
|
|
448
385
|
</figure>
|
|
449
386
|
</div>
|
|
450
|
-
`}}
|
|
387
|
+
`}}Qo=new WeakMap,Ua=new WeakMap,qa=new WeakMap,Xe(bu,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",bu);const lp=`
|
|
451
388
|
button {
|
|
452
389
|
/* TODO: why does this only work here and not from :root? */
|
|
453
390
|
--primary-color: #004170;
|
|
@@ -536,22 +473,11 @@ button.small {
|
|
|
536
473
|
padding: 12.4px;
|
|
537
474
|
font-size: .75rem;
|
|
538
475
|
}
|
|
539
|
-
`;class
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
${this.unstyled?"x":we}
|
|
545
|
-
</button>
|
|
546
|
-
`);Je(this,"_sortButton",ae`
|
|
547
|
-
<button class="sort-icon icon drag-handle">
|
|
548
|
-
${this.unstyled?"sort":we}
|
|
549
|
-
</button>
|
|
550
|
-
`);ce(this,qa,"");ce(this,Ga,`
|
|
551
|
-
${Kd}
|
|
552
|
-
${uc}
|
|
553
|
-
${ll}
|
|
554
|
-
${cc}
|
|
476
|
+
`;class vu extends jr{constructor(){super();Xe(this,"_removeButton",Yd(this));Xe(this,"_sortButton",Xd(this.unstyled));Xe(this,"_button",p=>Jd(p,this.unstyled));se(this,Ga,"");se(this,Wa,`
|
|
477
|
+
${lp}
|
|
478
|
+
${hu}
|
|
479
|
+
${hl}
|
|
480
|
+
${du}
|
|
555
481
|
button.icon.drag-handle {
|
|
556
482
|
cursor: n-resize;
|
|
557
483
|
}
|
|
@@ -641,56 +567,49 @@ button.small {
|
|
|
641
567
|
[slot=opacity-content] {
|
|
642
568
|
padding: 12px 6px;
|
|
643
569
|
}
|
|
644
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!
|
|
570
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var r;const p=Wd(this.tools,this.layer),b=Zd(this.tools,this.layer),_=this[`_${p==null?void 0:p[0]}Button`],E=((r=this.tools)==null?void 0:r.length)===1?`${this.tools[0]}-icon`:"",y=p==null?void 0:p.length,j=b==null?void 0:b.length;return ae`
|
|
645
571
|
<style>
|
|
646
|
-
${
|
|
647
|
-
${!this.unstyled&&
|
|
572
|
+
${Ee(this,Ga)}
|
|
573
|
+
${!this.unstyled&&Ee(this,Wa)}
|
|
648
574
|
</style>
|
|
649
|
-
${
|
|
650
|
-
${
|
|
575
|
+
${qr(y+j>0,()=>ae`
|
|
576
|
+
${qr(y===1&&j===0,()=>ae`
|
|
651
577
|
<div class="single-action-container">
|
|
652
|
-
<div class="single-action">
|
|
653
|
-
${this[`_${this._parseActions(this.tools)[0]}Button`]}
|
|
654
|
-
</div>
|
|
578
|
+
<div class="single-action">${_}</div>
|
|
655
579
|
</div>
|
|
656
|
-
`,()=>{var
|
|
580
|
+
`,()=>{var v;return ae`
|
|
657
581
|
<details
|
|
658
582
|
class="tools"
|
|
659
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
583
|
+
open=${this.layer.get("layerControlToolsExpand")||je}
|
|
660
584
|
>
|
|
661
585
|
<summary>
|
|
662
|
-
<button
|
|
663
|
-
class="icon ${this.tools.length===1?`${this.tools[0]}-icon`:""}"
|
|
664
|
-
>
|
|
665
|
-
Tools
|
|
666
|
-
</button>
|
|
586
|
+
<button class="icon ${E}">Tools</button>
|
|
667
587
|
</summary>
|
|
668
588
|
<eox-layercontrol-tabs
|
|
669
589
|
.noShadow=${!1}
|
|
670
|
-
.actions=${
|
|
671
|
-
.tabs=${
|
|
590
|
+
.actions=${p}
|
|
591
|
+
.tabs=${b}
|
|
672
592
|
.unstyled=${this.unstyled}
|
|
673
593
|
>
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
${this.unstyled?O:we}
|
|
677
|
-
</button>
|
|
678
|
-
`)}
|
|
594
|
+
<!-- Rendering tabs and content -->
|
|
595
|
+
${Ba(b,g=>this._button(g))}
|
|
679
596
|
|
|
680
597
|
<div slot="info-content">
|
|
681
|
-
${
|
|
598
|
+
${Kd(this.layer.get("description"))}
|
|
682
599
|
</div>
|
|
683
600
|
<div slot="opacity-content">
|
|
601
|
+
<!-- Input for opacity -->
|
|
684
602
|
<input
|
|
685
603
|
type="range"
|
|
686
604
|
min="0"
|
|
687
605
|
max="1"
|
|
688
606
|
step="0.01"
|
|
689
|
-
value=${
|
|
690
|
-
@input=${
|
|
607
|
+
value=${cu((v=this.layer)==null?void 0:v.getOpacity())}
|
|
608
|
+
@input=${g=>this.layer.setOpacity(parseFloat(g.target.value))}
|
|
691
609
|
/>
|
|
692
610
|
</div>
|
|
693
611
|
<div slot="config-content">
|
|
612
|
+
<!-- Layer configuration -->
|
|
694
613
|
<eox-layercontrol-layerconfig
|
|
695
614
|
slot="config-content"
|
|
696
615
|
.layer=${this.layer}
|
|
@@ -705,9 +624,9 @@ button.small {
|
|
|
705
624
|
</eox-layercontrol-tabs>
|
|
706
625
|
</details>
|
|
707
626
|
`})}
|
|
708
|
-
`
|
|
709
|
-
`}}
|
|
710
|
-
${
|
|
627
|
+
`)}
|
|
628
|
+
`}}Ga=new WeakMap,Wa=new WeakMap,Xe(vu,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",vu);const cp=m=>{const s=()=>{const p=Ud(m.layer,m.map,m.showLayerZoomState);let b=!1;!p&&m.currLayerVisibilityBasedOnZoom?(m.currLayerVisibilityBasedOnZoom=!1,b=!0):p&&!m.currLayerVisibilityBasedOnZoom&&(m.currLayerVisibilityBasedOnZoom=!0,b=!0),b&&(m.requestUpdate(),m.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};su(m.layer,m.showLayerZoomState)&&(s(),m.map.getView().on("change:resolution",()=>s()))},up=(m,s)=>{const p=s.layer;p.setVisible(m.target.checked),m.target.checked&&p.get("layerControlExclusive")&&s.parentNode.parentNode.querySelectorAll("li > eox-layercontrol-layer").forEach(_=>{var E;_.layer!==p&&((E=_.layer)!=null&&E.get("layerControlExclusive"))&&(_.layer.setVisible(!1),_.requestUpdate())}),s.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),s.requestUpdate()};class gu extends jr{constructor(){super();se(this,Mi);se(this,Za);Xe(this,"currLayerVisibilityBasedOnZoom",!0);se(this,Ja,"");se(this,Ya,`
|
|
629
|
+
${hl}
|
|
711
630
|
eox-layercontrol-layer {
|
|
712
631
|
width: 100%;
|
|
713
632
|
}
|
|
@@ -747,36 +666,37 @@ button.small {
|
|
|
747
666
|
[data-type=draw] .title::before {
|
|
748
667
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
|
|
749
668
|
}
|
|
750
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!
|
|
669
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){cp(this)}render(){var r;const p=this.layer.getVisible(),b=p?"visible":"",_=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",E=rr(this,Mi,As).call(this,"layerControlDisable")?"disabled":"",y=rr(this,Mi,As).call(this,"layerControlExclusive")?"radio":"checkbox",j=((r=this.tools)==null?void 0:r.length)>0;return ae`
|
|
751
670
|
<style>
|
|
752
|
-
${
|
|
753
|
-
${!this.unstyled&&
|
|
671
|
+
${Ee(this,Ja)}
|
|
672
|
+
${!this.unstyled&&Ee(this,Ya)}
|
|
754
673
|
</style>
|
|
755
|
-
${
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
${
|
|
759
|
-
|
|
760
|
-
<label
|
|
761
|
-
class="${this.layer.get("layerControlDisable")?"disabled":""}"
|
|
762
|
-
>
|
|
674
|
+
${qr(this.layer,()=>ae`
|
|
675
|
+
<!-- Render the layer -->
|
|
676
|
+
<div class="layer ${b} ${_}">
|
|
677
|
+
<label class="${E}">
|
|
678
|
+
<!-- Input element for layer visibility -->
|
|
763
679
|
<input
|
|
764
|
-
type=${
|
|
765
|
-
.checked=${
|
|
766
|
-
@click=${
|
|
680
|
+
type=${y}
|
|
681
|
+
.checked=${cu(p)}
|
|
682
|
+
@click=${rr(this,Za,Wu)}
|
|
767
683
|
/>
|
|
768
|
-
|
|
769
|
-
|
|
684
|
+
|
|
685
|
+
<!-- Layer title -->
|
|
686
|
+
<span class="title">${rr(this,Mi,As).call(this,this.titleProperty)}</span>
|
|
687
|
+
${qr(j,()=>ae`<span class="tools-placeholder"></span>`)}
|
|
770
688
|
</label>
|
|
771
689
|
</div>
|
|
690
|
+
|
|
691
|
+
<!-- Render layer tools -->
|
|
772
692
|
<eox-layercontrol-layer-tools
|
|
773
693
|
.noShadow=${!0}
|
|
774
694
|
.layer=${this.layer}
|
|
775
695
|
.tools=${this.tools}
|
|
776
696
|
.unstyled=${this.unstyled}
|
|
777
697
|
></eox-layercontrol-layer-tools>
|
|
778
|
-
`
|
|
779
|
-
`}}
|
|
698
|
+
`)}
|
|
699
|
+
`}}Mi=new WeakSet,As=function(p){var b;return(b=this.layer)==null?void 0:b.get(p)},Za=new WeakSet,Wu=function(p){up(p,this)},Ja=new WeakMap,Ya=new WeakMap,Xe(gu,"properties",{layer:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer",gu);class wu extends jr{constructor(){super();se(this,Xa,"");se(this,Ka,`
|
|
780
700
|
details summary {
|
|
781
701
|
cursor: pointer;
|
|
782
702
|
display: flex;
|
|
@@ -797,14 +717,16 @@ button.small {
|
|
|
797
717
|
details[open] > summary:before {
|
|
798
718
|
transform: rotate(90deg);
|
|
799
719
|
}
|
|
800
|
-
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!
|
|
720
|
+
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var b;const p=!!((b=this.group)!=null&&b.get("layerControlExpand"));return ae`
|
|
801
721
|
<style>
|
|
802
|
-
${
|
|
803
|
-
${!this.unstyled&&
|
|
722
|
+
${Ee(this,Xa)}
|
|
723
|
+
${!this.unstyled&&Ee(this,Ka)}
|
|
804
724
|
</style>
|
|
805
|
-
${
|
|
806
|
-
|
|
725
|
+
${qr(this.group,()=>ae`
|
|
726
|
+
<!-- Render the details element with the layer control -->
|
|
727
|
+
<details open=${p}>
|
|
807
728
|
<summary>
|
|
729
|
+
<!-- Render the layer control within the summary -->
|
|
808
730
|
<eox-layercontrol-layer
|
|
809
731
|
.noShadow=${!0}
|
|
810
732
|
.layer=${this.group}
|
|
@@ -816,6 +738,8 @@ button.small {
|
|
|
816
738
|
@changed=${()=>this.requestUpdate()}
|
|
817
739
|
></eox-layercontrol-layer>
|
|
818
740
|
</summary>
|
|
741
|
+
|
|
742
|
+
<!-- Render the list of layers within the details -->
|
|
819
743
|
<eox-layercontrol-layer-list
|
|
820
744
|
.noShadow=${!0}
|
|
821
745
|
.idProperty=${this.idProperty}
|
|
@@ -829,7 +753,7 @@ button.small {
|
|
|
829
753
|
></eox-layercontrol-layer-list>
|
|
830
754
|
</details>
|
|
831
755
|
`)}
|
|
832
|
-
`}}
|
|
756
|
+
`}}Xa=new WeakMap,Ka=new WeakMap,Xe(wu,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",wu);const hp=m=>{const{layers:s,idProperty:p,titleProperty:b,renderRoot:_}=m;if(s){const E=_.querySelector("ul");zd(s,p,b),Vd(E,s,p,m)}};var dp="Expected a function",_u=NaN,pp="[object Symbol]",fp=/^\s+|\s+$/g,mp=/^[-+]0x[0-9a-f]+$/i,yp=/^0b[01]+$/i,bp=/^0o[0-7]+$/i,vp=parseInt,gp=typeof Da=="object"&&Da&&Da.Object===Object&&Da,wp=typeof self=="object"&&self&&self.Object===Object&&self,_p=gp||wp||Function("return this")(),xp=Object.prototype,kp=xp.toString,jp=Math.max,Op=Math.min,dl=function(){return _p.Date.now()};function Ep(m,s,p){var b,_,E,y,j,r,v=0,g=!1,w=!1,k=!0;if(typeof m!="function")throw new TypeError(dp);s=xu(s)||0,pl(p)&&(g=!!p.leading,w="maxWait"in p,E=w?jp(xu(p.maxWait)||0,s):E,k="trailing"in p?!!p.trailing:k);function O(B){var q=b,F=_;return b=_=void 0,v=B,y=m.apply(F,q),y}function C(B){return v=B,j=setTimeout(A,s),g?O(B):y}function S(B){var q=B-r,F=B-v,N=s-q;return w?Op(N,E-F):N}function T(B){var q=B-r,F=B-v;return r===void 0||q>=s||q<0||w&&F>=E}function A(){var B=dl();if(T(B))return R(B);j=setTimeout(A,S(B))}function R(B){return j=void 0,k&&b?O(B):(b=_=void 0,y)}function I(){j!==void 0&&clearTimeout(j),v=0,b=r=_=j=void 0}function $(){return j===void 0?y:R(dl())}function M(){var B=dl(),q=T(B);if(b=arguments,_=this,r=B,q){if(j===void 0)return C(r);if(w)return j=setTimeout(A,s),O(r)}return j===void 0&&(j=setTimeout(A,s)),y}return M.cancel=I,M.flush=$,M}function pl(m){var s=typeof m;return!!m&&(s=="object"||s=="function")}function Cp(m){return!!m&&typeof m=="object"}function Sp(m){return typeof m=="symbol"||Cp(m)&&kp.call(m)==pp}function xu(m){if(typeof m=="number")return m;if(Sp(m))return _u;if(pl(m)){var s=typeof m.valueOf=="function"?m.valueOf():m;m=pl(s)?s+"":s}if(typeof m!="string")return m===0?m:+m;m=m.replace(fp,"");var p=yp.test(m);return p||bp.test(m)?vp(m.slice(2),p?2:8):mp.test(m)?_u:+m}var Pp=Ep;const Tp=Qd(Pp),Ap=m=>{const{layers:s}=m,p=Tp(()=>{m.requestUpdate(),m.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),b=()=>p();s&&(s.hasListener("change:length")&&(s==null||s.un("change:length",b)),s.on("change:length",b))};class ku extends jr{constructor(){super();se(this,Qa,"");se(this,ts,`
|
|
833
757
|
ul {
|
|
834
758
|
padding: 0;
|
|
835
759
|
margin: 0;
|
|
@@ -857,22 +781,22 @@ button.small {
|
|
|
857
781
|
}
|
|
858
782
|
li.sortable-ghost {
|
|
859
783
|
}
|
|
860
|
-
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!
|
|
784
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1}firstUpdated(){hp(this)}updated(){Ap(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var b,_;const p=(_=(b=this.layers)==null?void 0:b.getArray())==null?void 0:_.filter(E=>!E.get("layerControlHide")&&!E.get("layerControlOptional")).reverse();return ae`
|
|
861
785
|
<style>
|
|
862
|
-
${
|
|
863
|
-
${!this.unstyled&&
|
|
786
|
+
${Ee(this,Qa)}
|
|
787
|
+
${!this.unstyled&&Ee(this,ts)}
|
|
864
788
|
</style>
|
|
865
789
|
<ul>
|
|
866
|
-
${
|
|
867
|
-
${
|
|
790
|
+
${qr(this.layers,()=>ae`
|
|
791
|
+
${vh(p,E=>E,E=>ae`
|
|
868
792
|
<li
|
|
869
|
-
data-layer="${
|
|
870
|
-
data-type="${
|
|
793
|
+
data-layer="${E.get(this.idProperty)}"
|
|
794
|
+
data-type="${qd(E,this.map)}"
|
|
871
795
|
>
|
|
872
|
-
${
|
|
796
|
+
${E.getLayers?ae`
|
|
873
797
|
<eox-layercontrol-layer-group
|
|
874
798
|
.noShadow=${!0}
|
|
875
|
-
.group=${
|
|
799
|
+
.group=${E}
|
|
876
800
|
.idProperty=${this.idProperty}
|
|
877
801
|
.map=${this.map}
|
|
878
802
|
.titleProperty=${this.titleProperty}
|
|
@@ -885,7 +809,7 @@ button.small {
|
|
|
885
809
|
`:ae`
|
|
886
810
|
<eox-layercontrol-layer
|
|
887
811
|
.noShadow=${!0}
|
|
888
|
-
.layer=${
|
|
812
|
+
.layer=${E}
|
|
889
813
|
.map=${this.map}
|
|
890
814
|
.titleProperty=${this.titleProperty}
|
|
891
815
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
@@ -898,27 +822,24 @@ button.small {
|
|
|
898
822
|
`)}
|
|
899
823
|
`)}
|
|
900
824
|
</ul>
|
|
901
|
-
`}}
|
|
825
|
+
`}}Qa=new WeakMap,ts=new WeakMap,Xe(ku,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",ku);const Lp=m=>{const s=m.querySelector("select[name=optional]"),p=s?s.value:null,b=cl(m.layers.getArray(),"layerControlOptional",!0).find(_=>(_.get(m.idProperty)||_.ol_uid)===p);b==null||b.set("layerControlOptional",!1),b==null||b.setVisible(!0),m.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),m.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(_=>_.requestUpdate()),m.requestUpdate()};class ju extends jr{constructor(){super();se(this,es);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const p=cl(this.layers.getArray(),"layerControlOptional",!0);return ae`
|
|
826
|
+
<!-- Label for the dropdown -->
|
|
902
827
|
<label for="optional">Optional layers</label>
|
|
903
828
|
|
|
829
|
+
<!-- Dropdown select element -->
|
|
904
830
|
<select name="optional" data-cy="optionalLayers">
|
|
831
|
+
<!-- Default placeholder option -->
|
|
905
832
|
<option disabled selected value>
|
|
906
833
|
-- select an optional layer to add --
|
|
907
834
|
</option>
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
>
|
|
912
|
-
${l.get(this.titleProperty)||`layer ${l.get(this.idProperty)}`}
|
|
913
|
-
</option>
|
|
914
|
-
`)}
|
|
835
|
+
|
|
836
|
+
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
837
|
+
${p.map(b=>{const _=b.get(this.idProperty)||b.ol_uid,E=b.get(this.titleProperty),y=`layer ${b.get(this.idProperty)}`;return ae` <option value="${_}">${E||y}</option> `})}
|
|
915
838
|
</select>
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
>
|
|
919
|
-
|
|
920
|
-
</button>
|
|
921
|
-
`}}Je(xc,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",xc);class kc extends kr{constructor(){super();ce(this,ts);ce(this,es);ce(this,Ko);ce(this,rs);ce(this,ns);ce(this,Hi);Je(this,"urlInput",null);Je(this,"open",null);Je(this,"jsonInput",null);Je(this,"searchLoad",!1);Je(this,"wmsCapabilities",null);ce(this,is,"");ce(this,os,`
|
|
839
|
+
|
|
840
|
+
<!-- Button to handle adding layers -->
|
|
841
|
+
<button @click="${rr(this,es,Zu)}">add</button>
|
|
842
|
+
`}}es=new WeakSet,Zu=function(){Lp(this)},Xe(ju,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",ju);const Rp=(m,s)=>{s.jsonInput=m.target.value,s.requestUpdate()},Ou=m=>{const s=JSON.parse(`{"data":${Nc(m.jsonInput)}}`);Array.isArray(s.data)?s.data.forEach(p=>{m.eoxMap.addOrUpdateLayer(p)}):m.eoxMap.addOrUpdateLayer(s.data),m.jsonInput=null,m.requestUpdate()},Ip=(m,s)=>{s.urlInput=m.target.value,s.requestUpdate()};async function Bp(m){const s=m.urlInput;if(m.wmsCapabilities=null,m.searchLoad=!0,m.requestUpdate(),!s)return!1;if(Gs(s)==="XYZ")return{Name:s};try{const p=await ud(s);m.wmsCapabilities=p}catch{}finally{m.searchLoad=!1,m.requestUpdate()}return!1}const Dp=(m,s)=>{const{Name:p}=m,b=Gs(s.urlInput)||"XYZ",_={type:"Tile",properties:{id:p,title:p},source:{type:b,url:s.urlInput,params:{LAYERS:p}}};s.jsonInput=JSON.stringify(_)},Np=(m,s)=>{s.open=m||null,s.urlInput=null,s.jsonInput=null,s.wmsCapabilities=null,s.requestUpdate()};class Eu extends jr{constructor(){super();se(this,rs);se(this,ns);se(this,ta);se(this,is);se(this,os);se(this,Hi);Xe(this,"urlInput",null);Xe(this,"jsonInput",null);Xe(this,"open",null);Xe(this,"searchLoad",!1);Xe(this,"wmsCapabilities",null);se(this,as,"");se(this,ss,`
|
|
922
843
|
.eox-add {
|
|
923
844
|
background: #f0f2f5;
|
|
924
845
|
border-top: 1px solid #0041701a;
|
|
@@ -1051,24 +972,24 @@ button.small {
|
|
|
1051
972
|
font-weight: bold;
|
|
1052
973
|
display: inline-block;
|
|
1053
974
|
}
|
|
1054
|
-
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!
|
|
975
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const p=this.open?"open":"close",b=this.open==="url",_=this.open==="json",E=!hd(this.urlInput)||this.searchLoad?!0:je;return ae`
|
|
1055
976
|
<style>
|
|
1056
|
-
${
|
|
1057
|
-
${!this.unstyled&&
|
|
977
|
+
${Ee(this,as)}
|
|
978
|
+
${!this.unstyled&&Ee(this,ss)}
|
|
1058
979
|
</style>
|
|
1059
980
|
<div class="eox-add-layer-main">
|
|
1060
981
|
<div class="eox-add-layer-col">
|
|
1061
982
|
<!-- Tabbed interface for URL and JSON -->
|
|
1062
983
|
<ul class="eox-add-layer-tab ${p}">
|
|
1063
984
|
<li
|
|
1064
|
-
@click=${()=>
|
|
1065
|
-
class="${
|
|
985
|
+
@click=${()=>rr(this,Hi,Ls).call(this,"url")}
|
|
986
|
+
class="${b?"active":""}"
|
|
1066
987
|
>
|
|
1067
988
|
URL
|
|
1068
989
|
</li>
|
|
1069
990
|
<li
|
|
1070
|
-
@click=${()=>
|
|
1071
|
-
class="${
|
|
991
|
+
@click=${()=>rr(this,Hi,Ls).call(this,"json")}
|
|
992
|
+
class="${_?"active":""}"
|
|
1072
993
|
>
|
|
1073
994
|
JSON
|
|
1074
995
|
</li>
|
|
@@ -1077,67 +998,78 @@ button.small {
|
|
|
1077
998
|
<!-- Button to toggle tabs -->
|
|
1078
999
|
<button
|
|
1079
1000
|
class="add-icon icon"
|
|
1080
|
-
@click=${()=>
|
|
1001
|
+
@click=${()=>rr(this,Hi,Ls).call(this,this.open?null:"url")}
|
|
1081
1002
|
></button>
|
|
1082
1003
|
</div>
|
|
1083
1004
|
<div class="eox-add ${p}">
|
|
1084
|
-
${
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1005
|
+
${b?ae`
|
|
1006
|
+
<!-- Input field for URL -->
|
|
1007
|
+
<div class="eox-add-layer-col">
|
|
1008
|
+
<input
|
|
1009
|
+
type="text"
|
|
1010
|
+
class="add-url"
|
|
1011
|
+
placeholder="Add URL (WMS/XYZ)"
|
|
1012
|
+
.value="${this.urlInput}"
|
|
1013
|
+
@input=${rr(this,rs,Ju)}
|
|
1014
|
+
>
|
|
1015
|
+
</input>
|
|
1016
|
+
<!-- Search button for URL -->
|
|
1017
|
+
<button
|
|
1018
|
+
class="search-icon"
|
|
1019
|
+
disabled=${E}
|
|
1020
|
+
@click=${rr(this,ns,Yu)}
|
|
1021
|
+
>
|
|
1022
|
+
</button>
|
|
1023
|
+
</div>
|
|
1093
1024
|
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1025
|
+
<!-- Display layers for WMS capabilities -->
|
|
1026
|
+
${this.wmsCapabilities?ae`<ul class="search-lists">
|
|
1027
|
+
${this.wmsCapabilities.Capability.Layer.Layer.map(y=>{const j=y.Name;return ae`
|
|
1028
|
+
<li class="search-list">
|
|
1029
|
+
${j}
|
|
1030
|
+
<!-- Button to add layer -->
|
|
1031
|
+
<button
|
|
1032
|
+
class="add-layer-icon icon"
|
|
1033
|
+
@click=${()=>rr(this,ta,oc).call(this,y)}
|
|
1034
|
+
></button>
|
|
1035
|
+
</li>
|
|
1036
|
+
`})}
|
|
1037
|
+
</ul>`:je}
|
|
1107
1038
|
`:ae`
|
|
1108
1039
|
<!-- Textarea for JSON input -->
|
|
1109
1040
|
<textarea
|
|
1110
1041
|
class="add-layer-input"
|
|
1111
1042
|
placeholder="Please put a valid eox-map layer JSON."
|
|
1112
|
-
@input=${
|
|
1043
|
+
@input=${rr(this,os,Ku)}
|
|
1113
1044
|
.value=${this.jsonInput}
|
|
1114
1045
|
></textarea>
|
|
1115
1046
|
|
|
1116
1047
|
<!-- Button to add JSON layer -->
|
|
1117
1048
|
<button
|
|
1118
1049
|
class="add-layer-icon json-add-layer"
|
|
1119
|
-
disabled=${
|
|
1120
|
-
@click=${
|
|
1050
|
+
disabled=${dd(this.jsonInput)?je:!0}
|
|
1051
|
+
@click=${rr(this,is,Xu)}
|
|
1121
1052
|
></button>
|
|
1122
1053
|
`}
|
|
1123
1054
|
</div>
|
|
1124
1055
|
</div>
|
|
1125
|
-
`}}
|
|
1126
|
-
* {
|
|
1127
|
-
font-family: Roboto, sans-serif;
|
|
1128
|
-
}
|
|
1129
|
-
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride=""}updated(){const p=document.querySelector(this.for);p&&(p==null?void 0:p.map)!==this.map&&(this.map=p.map)}firstUpdated(){const p=document.querySelector(this.for);Si(this,Fi,p)}render(){var p,v;return ae`
|
|
1056
|
+
`}}rs=new WeakSet,Ju=function(p){Ip(p,this)},ns=new WeakSet,Yu=async function(){const p=await Bp(this);p&&rr(this,ta,oc).call(this,p)},ta=new WeakSet,oc=function(p){Dp(p,this),Ou(this)},is=new WeakSet,Xu=function(){Ou(this)},os=new WeakSet,Ku=function(p){Rp(p,this)},Hi=new WeakSet,Ls=function(p){Np(p,this)},as=new WeakMap,ss=new WeakMap,Xe(Eu,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",Eu);const $p=(m,s)=>{if(s.requestUpdate(),m.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const p=s.renderRoot.querySelector("eox-layercontrol-optional-list");p==null||p.requestUpdate()}},Mp=m=>{const s=m.for;return document.querySelector(s)},Hp=m=>{const s=document.querySelector(m.for);s&&s.map!==m.map&&(m.map=s.map)};class fl extends jr{constructor(){super();se(this,ls);se(this,Fi,void 0);se(this,cs,"* { font-family: Roboto, sans-serif; }");this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride=""}updated(){Hp(this)}firstUpdated(){Si(this,Fi,Mp(this))}render(){var _,E,y;const p=(_=this.map)==null?void 0:_.getLayers().getArray(),b=p&&((E=cl(p,"layerControlOptional",!0))==null?void 0:E.length)>0;return ae`
|
|
1130
1057
|
<style>
|
|
1131
|
-
${
|
|
1132
|
-
${!this.unstyled&&ge(this,ss)}
|
|
1058
|
+
${!this.unstyled&&Ee(this,cs)}
|
|
1133
1059
|
${this.styleOverride}
|
|
1134
1060
|
</style>
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1061
|
+
|
|
1062
|
+
<!-- Conditional rendering of add layers component -->
|
|
1063
|
+
${qr(this.addExternalLayers&&((y=Ee(this,Fi))==null?void 0:y.addOrUpdateLayer),()=>ae`
|
|
1064
|
+
<eox-layercontrol-add-layers
|
|
1065
|
+
.noShadow=${!0}
|
|
1066
|
+
.eoxMap=${Ee(this,Fi)}
|
|
1067
|
+
.unstyled=${this.unstyled}
|
|
1068
|
+
></eox-layercontrol-add-layers>
|
|
1069
|
+
`)}
|
|
1070
|
+
|
|
1071
|
+
<!-- Conditional rendering of layer list component -->
|
|
1072
|
+
${qr(this.map,()=>ae`
|
|
1141
1073
|
<eox-layercontrol-layer-list
|
|
1142
1074
|
.noShadow=${!0}
|
|
1143
1075
|
class="layers"
|
|
@@ -1148,10 +1080,12 @@ button.small {
|
|
|
1148
1080
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
1149
1081
|
.tools=${this.tools}
|
|
1150
1082
|
.unstyled=${this.unstyled}
|
|
1151
|
-
@changed=${
|
|
1083
|
+
@changed=${rr(this,ls,Qu)}
|
|
1152
1084
|
></eox-layercontrol-layer-list>
|
|
1153
1085
|
`)}
|
|
1154
|
-
|
|
1086
|
+
|
|
1087
|
+
<!-- Conditional rendering of optional list component -->
|
|
1088
|
+
${qr(b,()=>ae`
|
|
1155
1089
|
<eox-layercontrol-optional-list
|
|
1156
1090
|
.noShadow=${!0}
|
|
1157
1091
|
.idProperty=${this.idProperty}
|
|
@@ -1160,4 +1094,4 @@ button.small {
|
|
|
1160
1094
|
@changed=${()=>this.requestUpdate()}
|
|
1161
1095
|
></eox-layercontrol-optional-list>
|
|
1162
1096
|
`)}
|
|
1163
|
-
`}}Fi=new WeakMap,
|
|
1097
|
+
`}}Fi=new WeakMap,ls=new WeakSet,Qu=function(p){$p(p,this)},cs=new WeakMap,Xe(fl,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",fl),ke.EOxLayerControl=fl,Object.defineProperty(ke,Symbol.toStringTag,{value:"Module"})});
|