null";if("object"===fn(t)){var n="";return function(t,e){Array.isArray(t)||"number"==typeof t.length&&t.length>0&&t.length-1 in t?Array.from(t).forEach((function(t,n){return e(n,t)})):Object.entries(t).forEach((function(t){var n=yn(t,2),r=n[0],i=n[1];return e(r,i)}))}(t,(function(r,i){var o=e.getHTML(i);Array.isArray(t)||(o="".concat(r,": ").concat(o,"
")),n+="".concat(o,"")})),n=Array.isArray(t)?"".concat(n,"
"):"")}return"boolean"==typeof t?t?"true":"false":"string"==typeof t?t.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),gn(xn(o.prototype),"destroy",this).call(this)}}])&&bn(e.prototype,n),r&&bn(e,r),o}(H);function On(t){return(On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function En(t,e){for(var n=0;na.extra)&&((i=a).i=r)),e.validate(t).length||null!==o.i?i=o:(o.i=r,null!==a&&(o.match=a.match))}));var a=o.i;void 0!==this.anyOf&&this.anyOf&&o.matcht.length)&&(e=t.length);for(var n=0,r=new Array(e);no)&&(r=s);!1===r&&(a.push({width:0,minh:999999,maxh:0,editors:[]}),r=a.length-1),a[r].editors.push({key:t,width:i,height:o}),a[r].width+=i,a[r].minh=Math.min(a[r].minh,o),a[r].maxh=Math.max(a[r].maxh,o)}})),t=0;ta[t].editors[u].width)&&(u=e),a[t].editors[e].width*=12/a[t].width,a[t].editors[e].width=Math.floor(a[t].editors[e].width),h+=a[t].editors[e].width;h<12&&(a[t].editors[u].width+=12-h),a[t].width=12}if(this.layout===JSON.stringify(a))return!1;for(this.layout=JSON.stringify(a),r=document.createElement("div"),t=0;t0?f.firstChild.isObjOrArray&&(r.appendChild(p),f.insertBefore(r,f.firstChild),n.theme.insertBasicTopTab(e.tab,d),e.basicPane=r):(r.appendChild(p),f.appendChild(r),n.theme.addTopTab(d,e.tab),e.basicPane=r)),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),o.appendChild(e.container),e.rowPane=r}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var m=this.tabs_holder.parentNode;m.removeChild(m.firstChild),m.appendChild(d),this.tabPanesContainer=f,this.tabs_holder=d;var v=this.theme.getFirstTab(this.tabs_holder);return void(v&&y(v,"click"))}this.property_order.forEach((function(t){var e=n.editors[t];e.property_removed||(i=n.theme.getGridRow(),r.appendChild(i),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),i.appendChild(e.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(r)}}},{key:"getPropertySchema",value:function(t){var e=this,n=this.schema.properties[t]||{};n=f({},n);var r=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(i){new RegExp(i).test(t)&&(n.allOf=n.allOf||[],n.allOf.push(e.schema.patternProperties[i]),r=!0)})),!r&&this.schema.additionalProperties&&"object"===Gr(this.schema.additionalProperties)&&(n=f({},this.schema.additionalProperties)),n}},{key:"preBuild",value:function(){var t=this;if(Jr(Yr(o.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 n=qr(e,2),r=n[0],i=n[1],o=t.jsoneditor.getEditorClass(i);t.editors[r]=t.jsoneditor.createEditor(o,{jsoneditor:t.jsoneditor,schema:i,path:"".concat(t.path,".").concat(r),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[r].preBuild();var a=t.editors[r].options.hidden?0:t.editors[r].options.grid_columns||t.editors[r].getNumColumns();t.minwidth+=a,t.maxwidth+=a})),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,n){var r=t.editors[e].schema.propertyOrder,i=t.editors[n].schema.propertyOrder;return"number"!=typeof r&&(r=1e3),"number"!=typeof i&&(i=1e3),r-i}))}},{key:"addTab",value:function(t){var e=this,n=this.rows[t].schema&&("object"===this.rows[t].schema.type||"array"===this.rows[t].schema.type);this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=n?this.rows[t].getHeaderText():void 0===this.schema.basicCategoryTitle?"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(n){e.active_tab=e.rows[t].tab,e.refreshTabs(),n.preventDefault(),n.stopPropagation()})))}},{key:"addRow",value:function(t,e,n){var r=this.rows.length,i="object"===t.schema.type||"array"===t.schema.type;this.rows[r]=t,this.rows[r].rowPane=n,i?(this.addTab(r),this.theme.addTopTab(e,this.rows[r].tab)):void 0===this.basicTab?(this.addTab(r),this.basicTab=r,this.basicPane=n,this.theme.addTopTab(e,this.rows[r].tab)):(this.rows[r].tab=this.rows[this.basicTab].tab,this.rows[r].tab_text=this.rows[this.basicTab].tab_text,this.rows[r].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,n=void 0!==this.basicTab,r=!1;this.rows.forEach((function(i){i.tab&&i.rowPane&&i.rowPane.parentNode&&(n&&i.tab===e.rows[e.basicTab].tab&&r||(t?i.tab_text.textContent=i.getHeaderText():(n&&i.tab===e.rows[e.basicTab].tab&&(r=!0),i.tab===e.active_tab?e.theme.markTabActive(i):e.theme.markTabInactive(i))))}))}},{key:"build",value:function(){var t=this,e="categories"===this.format;if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach((function(e){var n=qr(e,2),r=n[0],i=n[1],o=t.theme.getTableCell();t.editor_holder.appendChild(o),i.setContainer(o),i.build(),i.postBuild(),i.setOptInCheckbox(i.header),t.editors[r].options.hidden&&(o.style.display="none"),t.editors[r].options.input_width&&(o.style.width=t.editors[r].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(e){e.preventDefault(),e.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(e){e.preventDefault(),e.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(e){e.preventDefault(),e.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(e){if(e.preventDefault(),e.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(t){t.target.previousSibling.childNodes.forEach((function(e){e.innerText.includes(t.target.value)?e.style.display="":e.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 n=document.createElement("div");n.style.clear="both",this.addproperty_holder.appendChild(n),document.addEventListener("click",this.onOutsideModalClick.bind(this)),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(n){var r=t.theme.getTabContent(),i=t.theme.getGridColumn(),o=!(!n.schema||"object"!==n.schema.type&&"array"!==n.schema.type);if(r.isObjOrArray=o,e){if(o){var a=t.theme.getGridContainer();a.appendChild(i),r.appendChild(a),t.tabPanesContainer.appendChild(r),t.row_container=a}else void 0===t.row_container_basic&&(t.row_container_basic=t.theme.getGridContainer(),r.appendChild(t.row_container_basic),0===t.tabPanesContainer.childElementCount?t.tabPanesContainer.appendChild(r):t.tabPanesContainer.insertBefore(r,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(i);t.addRow(n,t.tabs_holder,r),r.id=t.getValidId(n.schema.title)}else t.row_container.appendChild(i);n.setContainer(i),n.build(),n.postBuild(),n.setOptInCheckbox(n.header)})),this.rows[0]&&y(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(e){e.preventDefault(),e.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&&y(this.collapse_control,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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(e){e.preventDefault(),e.stopPropagation(),t.toggleEditJSON()})),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&void 0!==this.schema.options.disable_edit_json?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(e){e.preventDefault(),e.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(e){t.editor_holder.appendChild(t.editors[e].container)}))):(this.layoutEditors(),this.layoutEditors())}},{key:"deactivateNonRequiredProperties",value:function(){var t=this,e=this.jsoneditor.options.show_opt_in,n=void 0!==this.options.show_opt_in,r=n&&!0===this.options.show_opt_in,i=n&&!1===this.options.show_opt_in;(r||!i&&e||!n&&e)&&Object.entries(this.editors).forEach((function(e){var n=qr(e,2),r=n[0],i=n[1];t.isRequiredObject(i)||t.editors[r].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(t){throw window.alert("invalid JSON"),t}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(t,e,n){var r;this.schema.properties[t]&&(r=this.schema.properties[t].propertyOrder),"number"!=typeof r&&(r=1e3),e.propertyOrder=r;for(var i=0;i=i?this.getSchemaOnMaxDepth(n):n,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var o=this.theme.getChildEditorHolder();this.editor_holder.appendChild(o),this.editors[t].setContainer(o),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(r.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(),Jr(Yr(o.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:!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.onOutsideModalClick),Jr(Yr(o.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=Jr(Yr(o.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 n;(void 0===(n=t[e])||""===n||n===Object(n)&&0===Object.keys(n).length&&n.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.value[e]=t.editors[e].getValue())})),this.adding_property&&this.refreshAddProperties())}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||!1!==this.options.disable_properties&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,n=0,r=!1;Object.keys(this.editors).forEach((function(t){return n++})),e=this.canHaveAdditionalProperties()&&!(void 0!==this.schema.maxProperties&&n>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(i){t.addPropertyCheckbox(i),t.isRequiredObject(t.cached_editors[i])&&i in t.editors&&(t.addproperty_checkboxes[i].disabled=!0),void 0!==t.schema.minProperties&&n<=t.schema.minProperties?(t.addproperty_checkboxes[i].disabled=t.addproperty_checkboxes[i].checked,t.addproperty_checkboxes[i].checked||(r=!0)):i in t.editors?r=!0:e||v(t.schema.properties,i)?(t.addproperty_checkboxes[i].disabled=!1,r=!0):t.addproperty_checkboxes[i].disabled=!0})),this.canHaveAdditionalProperties()&&(r=!0),Object.keys(this.schema.properties).forEach((function(e){t.cached_editors[e]||(r=!0,t.addPropertyCheckbox(e))})),r?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"boolean"==typeof t.schema.required?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 n=this;("object"!==Gr(t=t||{})||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach((function(r){var i=qr(r,2),o=i[0],a=i[1];void 0!==t[o]?(n.addObjectProperty(o),a.setValue(t[o],e),a.activate()):e||n.isRequiredObject(a)?a.setValue(a.getDefault(),e):n.jsoneditor.options.show_opt_in||n.options.show_opt_in?a.deactivate():n.removeObjectProperty(o)})),Object.entries(t).forEach((function(t){var r=qr(t,2),i=r[0],o=r[1];n.cached_editors[i]||(n.addObjectProperty(i),n.editors[i]&&n.editors[i].setValue(o,e,!!n.editors[i].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,n=[],r=[];t.forEach((function(t){t.path===e.path?n.push(t):r.push(t)})),this.error_holder&&(n.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",n.forEach((function(t){t.errorcount&&t.errorcount>1&&(t.message+=" (".concat(t.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(t.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(n.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(t){t.showValidationErrors(r)}))}}])&&$r(e.prototype,n),r&&$r(e,r),o}(H);function Kr(t){return(Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ti(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ei(t,e){for(var n=0;n-1;i--){var o=this.formname+(i+1),a=this.theme.getFormInputField("radio");a.name="".concat(this.formname,"[starrating]"),a.value=this.enum_values[i],a.id=o,a.addEventListener("change",r,!1),this.radioGroup.push(a);var s=document.createElement("label");s.htmlFor=o,s.title=this.enum_values[i],this.options.displayValue&&s.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(a),this.ratingContainer.appendChild(s)}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 l=0;l 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 mo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&ho(t,e)}(o,t);var e,n,r,i=po(o);function o(){return lo(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"build",value:function(){uo(yo(o.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(){uo(yo(o.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){uo(yo(o.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&co(e.prototype,n),r&&co(e,r),o}(ir);function vo(t){return(vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function go(t,e){for(var n=0;nthis.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;e=this.ensureArraySize(e);var r=JSON.stringify(e);if(r!==this.serialized){var i=!1;e.forEach((function(e,n){t.rows[n]?t.rows[n].setValue(e):(t.addRow(e),i=!0)}));for(var o=e.length;o=this.rows.length,n=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,r=[];this.rows.forEach((function(i,o){if(i.delete_button){var a=!e;t.setVisibility(i.delete_button,a),r.push(a)}if(i.copy_button){var s=!n;t.setVisibility(i.copy_button,s),r.push(s)}if(i.moveup_button){var l=0!==o;t.setVisibility(i.moveup_button,l),r.push(l)}if(i.movedown_button){var c=o!==t.rows.length-1;t.setVisibility(i.movedown_button,c),r.push(c)}}));var i=r.some((function(t){return t}));this.rows.forEach((function(e){return t.setVisibility(e.controls_cell,i)})),this.setVisibility(this.controls_header_cell,i),this.setVisibility(this.table,this.value.length);var o=!(n||this.hide_add_button);this.setVisibility(this.add_row_button,o);var a=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setVisibility(this.delete_last_row_button,a);var s=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setVisibility(this.remove_all_rows_button,s);var l=o||a||s;this.setVisibility(this.controls,l)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach((function(e,n){t.value[n]=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 n=this.rows[e].table_controls;this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,n)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,n)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,n)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,n)),void 0!==t&&this.rows[e].setValue(t)}},{key:"_createDeleteButton",value:function(t,e){var n=this,r=this.getButton("","delete","button_delete_row_title_short");return r.classList.add("delete","json-editor-btntype-delete"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!n.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e,1),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("deleteRow",n.rows[e])})),e.appendChild(r),r}},{key:"_createCopyButton",value:function(t,e){var n=this,r=this.getButton("","copy","button_copy_row_title_short");return r.classList.add("copy","json-editor-btntype-copy"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e+1,0,r[e]),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("copyRow",n.rows[e+1])})),e.appendChild(r),r}},{key:"_createMoveUpButton",value:function(t,e){var n=this,r=this.getButton("","moveup","button_move_up_title");return r.classList.add("moveup","json-editor-btntype-move"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e-1,0,r.splice(e,1)[0]),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e-1])})),e.appendChild(r),r}},{key:"_createMoveDownButton",value:function(t,e){var n=this,r=this.getButton("","movedown","button_move_down_title");return r.classList.add("movedown","json-editor-btntype-move"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e+1,0,r.splice(e,1)[0]),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e+1])})),e.appendChild(r),r}},{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.setVisibility(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&&y(this.toggle_button,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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(e){e.preventDefault(),e.stopPropagation();var n=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",n)})),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(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue(),r=n.pop();t.setValue(n),t.onChange(!0),t.jsoneditor.trigger("deleteRow",r)})),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(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows")})),this.controls.appendChild(e),e}}])&&go(e.prototype,n),r&&go(e,r),o}(dt);n(136);function Co(t){return(Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Eo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function So(t,e){for(var n=0;nt.options.max_upload_size)t.theme.addInputError(t.uploader,"Filesize too large. Max size is ".concat(t.options.max_upload_size));else if(0===t.options.mime_type.length||t.isValidMimeType(n[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=n[0].name);var r=new window.FileReader;r.onload=function(e){t.preview_value=e.target.result,t.refreshPreview(n),t.onChange(!0),r=null},r.readAsDataURL(n[0])}else t.theme.addInputError(t.uploader,"Wrong file format. Allowed format(s): ".concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(e){var n=e.dataTransfer.items||e.dataTransfer.files,r=n&&n.length&&(0===t.options.mime_type.length||t.isValidMimeType(n[0].type,t.options.mime_type)),i=e.currentTarget.classList&&e.currentTarget.classList.contains("upload-dropzone")&&r;switch((e.currentTarget===window?"w_":"e_")+e.type){case"w_drop":case"w_dragover":i||(e.dataTransfer.dropEffect="none");break;case"e_dragenter":i?(t.dropZone.classList.add("valid-dropzone"),e.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":i&&(e.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"),i&&t.uploadHandler(e)}i||e.preventDefault()},!0===this.options.enable_drag_drop&&(["dragover","drop"].forEach((function(e){window.addEventListener(e,t.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(e){t.dropZone.addEventListener(e,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,n=document.createElement("div");this.dropZone&&!this.altDropZone&&!0===this.options.drop_zone_top&&n.appendChild(this.dropZone),this.fileUploadGroup&&n.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&!0!==this.options.drop_zone_top&&n.appendChild(this.dropZone),n.appendChild(this.preview),e.parentNode.insertBefore(n,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(n){t.preview.appendChild(e)},e.onerror=function(t){console.error("upload error",t,t.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 n=t[0],r=this.preview_value.match(/^data:([^;,]+)[;,]/);if(n.mimeType=r?r[1]:"unknown",n.size>0){var i=Math.floor(Math.log(n.size)/Math.log(1024));n.formattedSize="".concat(parseFloat((n.size/Math.pow(1024,i)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i])}else n.formattedSize="0 Bytes";var o=this.getButton("button_upload","upload","button_upload");o.addEventListener("click",(function(t){t.preventDefault(),o.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,n,{success:function(t){e.setValue(t),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),o.removeAttribute("disabled")},failure:function(t){e.theme.addInputError(e.uploader,t),e.progressBar&&e.preview.removeChild(e.progressBar),o.removeAttribute("disabled")},updateProgress:function(t){e.progressBar&&(t?e.theme.updateProgressBar(e.progressBar,t):e.theme.updateProgressBarUnknown(e.progressBar))}})})),this.preview.appendChild(this.theme.getUploadPreview(n,o,this.preview_value)),this.options.auto_upload&&(o.dispatchEvent(new window.MouseEvent("click")),this.preview.removeChild(o))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Po(Ao(o.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Po(Ao(o.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;!0===this.options.enable_drag_drop&&(["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),Po(Ao(o.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce((function(e,n){return e||new RegExp(n.replace(/\*/g,".*"),"gi").test(t)}),!1)}}])&&So(e.prototype,n),r&&So(e,r),o}(H),uuid:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&Vo(t,e)}(o,t);var e,n,r,i=Do(o);function o(){return Bo(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"preBuild",value:function(){Fo(zo(o.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(){Fo(zo(o.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,n){this.testUuid(t)||(t=this.uuid),this.uuid=t,Fo(zo(o.prototype),"setValue",this).call(this,t,e,n)}},{key:"getUuid",value:function(){var t=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))}},{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)}}])&&No(e.prototype,n),r&&No(e,r),o}(Z),colorpicker:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&$o(t,e)}(o,t);var e,n,r,i=Jo(o);function o(){return qo(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,n){var r=Go(Zo(o.prototype),"setValue",this).call(this,t,e,n);return this.picker_instance&&this.picker_instance.domElement&&r&&r.changed&&this.picker_instance.setColor(r.value,!0),r}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){Go(Zo(o.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(Go(Zo(o.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;e1?n=function(e){for(i=e,t=0;tt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:na;ta(this,t),this.mapping=n,this.icon_prefix=e}var e,n,r;return e=t,(n=[{key:"getIconClass",value:function(t){return this.mapping[t]?this.icon_prefix+this.mapping[t]:null}},{key:"getIcon",value:function(t){var e,n=this.getIconClass(t);if(!n)return null;var r=document.createElement("i");return(e=r.classList).add.apply(e,Xo(n.split(" "))),r}}])&&ea(e.prototype,n),r&&ea(e,r),t}();function ia(t){return(ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function oa(t,e){return(oa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function aa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=la(t);if(e){var i=la(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sa(this,n)}}function sa(t,e){return!e||"object"!==ia(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function la(t){return(la=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ca={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"};function ua(t){return(ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ha(t,e){return(ha=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fa(t);if(e){var i=fa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return da(this,n)}}function da(t,e){return!e||"object"!==ua(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function fa(t){return(fa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ya={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"};function ma(t){return(ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function va(t,e){return(va=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ba(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=_a(t);if(e){var i=_a(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ga(this,n)}}function ga(t,e){return!e||"object"!==ma(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _a(t){return(_a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wa={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"};function ka(t){return(ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xa(t,e){return(xa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ja(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ca(t);if(e){var i=Ca(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Oa(this,n)}}function Oa(t,e){return!e||"object"!==ka(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ca(t){return(Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ea={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"};function Sa(t){return(Sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pa(t,e){return(Pa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ra(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ta(t);if(e){var i=Ta(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return La(this,n)}}function La(t,e){return!e||"object"!==Sa(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ta(t){return(Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Aa={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"};function Ia(t){return(Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ba(t,e){return(Ba=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Na(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Va(t);if(e){var i=Va(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fa(this,n)}}function Fa(t,e){return!e||"object"!==Ia(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Va(t){return(Va=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Da={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"};function Ha(t){return(Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function za(t,e){return(za=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ma(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ua(t);if(e){var i=Ua(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qa(this,n)}}function qa(t,e){return!e||"object"!==Ha(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ua(t){return(Ua=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ga={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"},$a={bootstrap3:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&oa(t,e)}(n,t);var e=aa(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"glyphicon glyphicon-",ca)}return n}(ra),fontawesome3:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&ha(t,e)}(n,t);var e=pa(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"icon-",ya)}return n}(ra),fontawesome4:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&va(t,e)}(n,t);var e=ba(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"fa fa-",wa)}return n}(ra),fontawesome5:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&xa(t,e)}(n,t);var e=ja(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"fas fa-",Ea)}return n}(ra),jqueryui:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&Pa(t,e)}(n,t);var e=Ra(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"ui-icon ui-icon-",Aa)}return n}(ra),openiconic:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&Ba(t,e)}(n,t);var e=Na(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"oi oi-",Da)}return n}(ra),spectre:function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&za(t,e)}(n,t);var e=Ma(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"icon icon-",Ga)}return n}(ra)};n(137);function Ja(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wa(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{disable_theme_rules:!1};Ja(this,t),this.jsoneditor=e,Object.keys(n).forEach((function(t){void 0!==e.options[t]&&(n[t]=e.options[t])})),this.options=n}var e,n,r;return e=t,(n=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getFloatRightLinkHolder",value:function(){var t=document.createElement("div");return t.classList.add("je-float-right-linkholder"),t}},{key:"getModal",value:function(){var t=document.createElement("div");return t.style.display="none",t.classList.add("je-modal"),t}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("row"),t}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(t,e){}},{key:"getLink",value:function(t){var e=document.createElement("a");return e.setAttribute("href","#"),e.appendChild(document.createTextNode(t)),e}},{key:"disableHeader",value:function(t){t.style.color="#ccc"}},{key:"disableLabel",value:function(t){t.style.color="#ccc"}},{key:"enableHeader",value:function(t){t.style.color=""}},{key:"enableLabel",value:function(t){t.style.color=""}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.innerText="ⓘ",e.classList.add("je-infobutton-icon");var n=document.createElement("span");return n.classList.add("je-infobutton-tooltip"),n.innerText=t,e.onmouseover=function(){n.style.visibility="visible"},e.onmouseleave=function(){n.style.visibility="hidden"},e.appendChild(n),e}},{key:"getFormInputLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(t)),e&&n.classList.add("required"),n}},{key:"getHeader",value:function(t,e){var n=document.createElement("h3");return"string"==typeof t?n.textContent=t:n.appendChild(t),n.classList.add("je-header"),n}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("je-checkbox"),t}},{key:"getCheckboxLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(" ".concat(t))),e&&n.classList.add("required"),n}},{key:"getMultiCheckboxHolder",value:function(t,e,n,r){var i=document.createElement("div");return i.classList.add("control-group"),e&&(e.style.display="block",i.appendChild(e),r&&e.appendChild(r)),Object.values(t).forEach((function(t){t.style.display="inline-block",t.style.marginRight="20px",i.appendChild(t)})),n&&i.appendChild(n),i}},{key:"getFormCheckboxControl",value:function(t,e,n){var r=document.createElement("div");return r.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&r.classList.add("je-checkbox-control--compact"),r}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");return Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])})),e.classList.add("je-radio"),e}},{key:"getFormRadioLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(" ".concat(t))),e&&n.classList.add("required"),n}},{key:"getFormRadioControl",value:function(t,e,n){var r=document.createElement("div");return r.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&r.classList.add("je-radio-control--compact"),r}},{key:"getSelectInput",value:function(t,e){var n=document.createElement("select");return t&&this.setSelectOptions(n,t),n}},{key:"getSwitcher",value:function(t){var e=this.getSelectInput(t,!1);return e.classList.add("je-switcher"),e}},{key:"getSwitcherOptions",value:function(t){return t.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(t,e,n){this.setSelectOptions(t,e,n)}},{key:"setSelectOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];t.innerHTML="";for(var r=0;rNumber(o)&&t.stepDown():t.stepDown():i(t,o),y(t,"change")})),r.addEventListener("click",(function(){t.getAttribute("initialized")?a?Number(t.value)"),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML=""),n}},{key:"applyStyles",value:function(t,e){Object.keys(e).forEach((function(n){return t.style[n]=e[n]}))}},{key:"closest",value:function(t,e){for(;t&&t!==document;){if(!t[Za])return!1;if(t[Za](e))return t;t=t.parentNode}return!1}},{key:"insertBasicTopTab",value:function(t,e){e.firstChild.insertBefore(t,e.firstChild.firstChild)}},{key:"getTab",value:function(t,e){var n=document.createElement("div");return n.appendChild(t),n.id=e,n.classList.add("je-tab"),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("div");return n.appendChild(t),n.id=e,n.classList.add("je-tab--top"),n}},{key:"getTabContentHolder",value:function(t){return t.children[1]}},{key:"getTopTabContentHolder",value:function(t){return t.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(t){this.applyStyles(t.tab,{opacity:1,background:"white"}),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){this.applyStyles(t.tab,{opacity:.5,background:""}),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"addTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"addTopTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("je-block-link"),t}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(t,e,n){t.appendChild(e),n.classList.add("je-media"),t.appendChild(n)}},{key:"createImageLink",value:function(t,e,n){t.appendChild(e),e.appendChild(n)}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild}},{key:"getInputGroup",value:function(t,e){}},{key:"cleanText",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}},{key:"getDropZone",value:function(t){var e=document.createElement("div");return e.setAttribute("data-text",t),e.classList.add("je-dropzone"),e}},{key:"getUploadPreview",value:function(t,e,n){var r=document.createElement("div");if(r.classList.add("je-upload-preview"),"image"===t.mimeType.substr(0,5)){var i=document.createElement("img");i.src=n,r.appendChild(i)}var o=document.createElement("div");o.innerHTML+="Name: ".concat(t.name,"
Type: ").concat(t.type,"
Size: ").concat(t.formattedSize),r.appendChild(o),r.appendChild(e);var a=document.createElement("div");return a.style.clear="left",r.appendChild(a),r}},{key:"getProgressBar",value:function(){var t=document.createElement("progress");return t.setAttribute("max",100),t.setAttribute("value",0),t}},{key:"updateProgressBar",value:function(t,e){t&&t.setAttribute("value",e)}},{key:"updateProgressBarUnknown",value:function(t){t&&t.removeAttribute("value")}}])&&Wa(e.prototype,n),r&&Wa(e,r),t}();function Ya(t){return(Ya="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ka(t,e){for(var n=0;n"),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML=""),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var r=document.createElement("a");return r.setAttribute("href","#".concat(e)),r.appendChild(t),r.setAttribute("aria-controls",e),r.setAttribute("role","tab"),r.setAttribute("data-toggle","tab"),n.appendChild(r),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var r=document.createElement("a");return r.setAttribute("href","#".concat(e)),r.appendChild(t),r.setAttribute("aria-controls",e),r.setAttribute("role","tab"),r.setAttribute("data-toggle","tab"),n.appendChild(r),n}},{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"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?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 n=t.firstChild,r="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=r,n.innerHTML=r}}},{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 n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);var r=document.createElement("div");r.classList.add("input-group-btn"),n.appendChild(r);for(var i=0;iNumber(s)&&t.stepDown():t.stepDown():a(t,s),y(t,"change")})),o.addEventListener("click",(function(){t.getAttribute("initialized")?l?Number(t.value)"),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=void 0===t?"":t,n=document.createElement("div");return n.classList.add("card"),n.innerHTML=""),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var r=document.createElement("a");return r.classList.add("nav-link"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var r=document.createElement("a");return r.classList.add("nav-link"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),n}},{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"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),void 0!==t.rowPane?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 n=t.firstChild,r="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=r,n.innerHTML=r}}},{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 n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);var r=document.createElement("div");r.classList.add("input-group-append"),n.appendChild(r);for(var i=0;i .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 Is=function(t){!function(t,e){if("function"!=typeof e&&null!==e)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}}),e&&Rs(t,e)}(o,t);var e,n,r,i=Ls(o);function o(){return Es(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"getTable",value:function(){var t=Ps(As(o.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=Ps(As(o.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=Ps(As(o.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,n,r){var i=Ps(As(o.prototype),"getFormControl",this).call(this,t,e,n,r);return"checkbox"===e.type?(i.style.lineHeight="25px",i.style.padding="3px 0"):i.style.padding="4px 0 8px 0",i}},{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 n=document.createElement("label");return n.style.fontWeight="bold",n.style.display="block",n.textContent=t,e&&n.classList.add("required"),n}},{key:"getButton",value:function(t,e,n){var r=document.createElement("button");r.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(r.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),r.appendChild(e)):e?(r.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),r.appendChild(e)):r.classList.add("ui-button-text-only");var i=document.createElement("span");return i.classList.add("ui-button-text"),i.textContent=t||n||".",r.appendChild(i),r.setAttribute("title",n),r}},{key:"setButtonText",value:function(t,e,n,r){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),n&&!e?(t.classList.add("ui-button-icon-only"),n.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(n)):n?(t.classList.add("ui-button-text-icon-primary"),n.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(n)):t.classList.add("ui-button-text-only");var i=document.createElement("span");i.classList.add("ui-button-text"),i.textContent=e||r||".",t.appendChild(i),t.setAttribute("title",r)}},{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"),void 0!==t.rowPane?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"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}}])&&Ss(e.prototype,n),r&&Ss(e,r),o}(Qa);Is.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"'};function Bs(t){return(Bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ns(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fs(t,e){for(var n=0;n'),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML=''),n}},{key:"getTab",value:function(t,e){var n=document.createElement("a");return n.classList.add("btn","btn-secondary","btn-block"),n.setAttribute("href","#".concat(e)),n.appendChild(t),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.id=e,n.classList.add("tab-item");var r=document.createElement("a");return r.setAttribute("href","#".concat(e)),r.appendChild(t),n.appendChild(r),n}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if("select"===t.localName)if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach((function(t){t.classList.remove("form-select")})))}else if(t.classList.contains("select2-hidden-accessible")){var n=t.nextSibling;n&&n.querySelector(".select2-selection--single")&&n.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"))}}])&&Us(e.prototype,n),r&&Us(e,r),o}(Qa);Ys.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"};function Xs(t){return(Xs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ks(t,e){for(var n=0;n0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),n&&(t.style.marginLeft="".concat(100/12*n,"%"))}},{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 n=tl(il(o.prototype),"getSelectInput",this).call(this,t);return e?n.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"):n.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&&n.classList.add("compact"),n}},{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=tl(il(o.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,n){var r=this.getFormInputField("range");return r.classList.add("slider"),this.options.enable_compact&&r.classList.add("compact"),r.setAttribute("oninput",'this.setAttribute("value", this.value)'),r.setAttribute("min",t),r.setAttribute("max",e),r.setAttribute("step",n),r}},{key:"getRangeControl",value:function(t,e){var n=tl(il(o.prototype),"getRangeControl",this).call(this,t,e);return n.classList.add("text-center","text-black"),n}},{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 n=tl(il(o.prototype),"getCheckboxLabel",this).call(this,t,e);return n.classList.add("inline-flex","items-center"),n}},{key:"getFormCheckboxControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,n,r){var i=tl(il(o.prototype),"getMultiCheckboxHolder",this).call(this,t,e,n,r);return i.classList.add("inline-flex","flex-col"),i}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(n,t[n]);return e}},{key:"getFormRadioLabel",value:function(t,e){var n=tl(il(o.prototype),"getFormRadioLabel",this).call(this,t,e);return n.classList.add("inline-flex","items-center","mr-2"),n}},{key:"getFormRadioControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,e,n,r,i){var a=tl(il(o.prototype),"getRadioHolder",this).call(this,e,n,r,i);return"h"===t.options.layout?a.classList.add("inline-flex","flex-row"):a.classList.add("inline-flex","flex-col"),a}},{key:"getFormInputLabel",value:function(t,e){var n=tl(il(o.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold?n.classList.add("font-bold"):n.classList.add("required"),n}},{key:"getFormInputField",value:function(t){var e=tl(il(o.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,n,r){var i=document.createElement("div");return i.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),"checkbox"===e.type&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,r)),"radio"===e.type&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,r)),i.appendChild(t),!["checkbox","radio"].includes(e.type)&&r&&i.appendChild(r)),["checkbox","radio"].includes(e.type)||("small"===this.options.input_size?e.classList.add("text-xs"):"normal"===this.options.input_size?e.classList.add("text-base"):"large"===this.options.input_size&&e.classList.add("text-xl"),i.appendChild(e)),n&&i.appendChild(n),i}},{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,n){var r=tl(il(o.prototype),"getButton",this).call(this,t,e,n);return r.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"),r}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var n=document.createElement("span");return n.innerHTML=t,e.appendChild(n),e}},{key:"getTable",value:function(){var t=tl(il(o.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=tl(il(o.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=tl(il(o.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=tl(il(o.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.classList.add("bg-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.classList.remove("bg-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),n=void 0===t?"":t;return e.innerHTML=""),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=void 0===t?"":t,n=document.createElement("div");return n.innerHTML=""),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.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 r=document.createElement("a");return r.classList.add("nav-link","text-center"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item","flex","border-l","border-t","border-r");var r=document.createElement("a");return r.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),n}},{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"),!0===t.tab.firstChild.classList.contains("border-b")?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),!0===t.container.classList.contains("hidden")?(t.container.classList.remove("hidden"),t.container.classList.add("block")):t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){!0===t.tab.firstChild.classList.contains("border-b-0")?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),!0===t.container.classList.contains("block")&&(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 n=t.firstChild,r="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=r,n.innerHTML=r}}},{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 n=document.createElement("div");n.classList.add("relative","items-stretch","w-full"),n.appendChild(t);var r=document.createElement("div");r.classList.add("-mr-1"),n.appendChild(r);for(var i=0;it.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};if(hl(this,t),!(e instanceof Element))throw new Error("element should be an instance of Element");this.element=e,this.options=f({},t.defaults.options,r),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||t.defaults.translate,this.translateProperty=this.options.translateProperty||t.defaults.translateProperty,this.uuid=0,this.__data={};var i=this.options.theme||t.defaults.theme,o=t.defaults.themes[i];if(!o)throw new Error("Unknown theme ".concat(i));this.element.setAttribute("data-theme",i),this.theme=new o(this);var a=f(ll,this.getEditorsRules()),s=function(t,e,r){return r?n.addNewStyleRulesToShadowRoot(t,e,r):n.addNewStyleRules(t,e)};if(!this.theme.options.disable_theme_rules){var l=m(this.element);s("default",a,l),void 0!==o.rules&&s(i,o.rules,l)}var c=t.defaults.iconlibs[this.options.iconlib||t.defaults.iconlib];c&&(this.iconlib=new c),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container);var u=document.location.origin+document.location.pathname.toString(),h=new B(this.options),p=document.location.toString();this.expandSchema=function(t,e){return h.expandSchema(t,e)},this.expandRefs=function(t,e){return h.expandRefs(t,e)},this.refs=h.refs,h.load(this.schema,(function(e){var r=n.options.custom_validators?{custom_validators:n.options.custom_validators}:{};n.validator=new R(n,null,r,t.defaults);var i=n.getEditorClass(e);n.root=n.createEditor(i,{jsoneditor:n,schema:e,required:!0,container:n.root_container}),n.root.preBuild(),n.root.build(),n.root.postBuild(),v(n.options,"startval")&&n.root.setValue(n.options.startval),n.validation_results=n.validator.validate(n.root.getValue()),n.root.showValidationErrors(n.validation_results),n.ready=!0,window.requestAnimationFrame((function(){n.ready&&(n.validation_results=n.validator.validate(n.root.getValue()),n.root.showValidationErrors(n.validation_results),n.trigger("ready"),n.trigger("change"))}))}),u,p)}var e,n,r;return e=t,(n=[{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Listen for 'ready' event before getting the value");return this.root.getValue()}},{key:"setValue",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Listen for 'ready' event before setting the value");return this.root.setValue(t),this}},{key:"validate",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Listen for 'ready' event before validating");return 1===arguments.length?this.validator.validate(t):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(t,e){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(e),this}},{key:"off",value:function(t,e){if(t&&e){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:1;return new e(n=f({},e.options||{},n),t.defaults,r)}},{key:"onChange",value:function(){var t=this;if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame((function(){t.firing_change=!1,t.ready&&(t.validation_results=t.validator.validate(t.root.getValue()),"never"!==t.options.show_errors?t.root.showValidationErrors(t.validation_results):t.root.showValidationErrors([]),t.trigger("change"))})),this}},{key:"compileTemplate",value:function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaults.template;if("string"==typeof r){if(!t.defaults.templates[r])throw new Error("Unknown template engine ".concat(r));if(!(n=t.defaults.templates[r]()))throw new Error("Template engine ".concat(r," missing required library."))}else n=r;if(!n)throw new Error("No template engine set");if(!n.compile)throw new Error("Invalid template engine set");return n.compile(e)}},{key:"_data",value:function(t,e,n){if(3!==arguments.length)return t.hasAttribute("data-jsoneditor-".concat(e))?this.__data[t.getAttribute("data-jsoneditor-".concat(e))]:null;var r;t.hasAttribute("data-jsoneditor-".concat(e))?r=t.getAttribute("data-jsoneditor-".concat(e)):(r=this.uuid++,t.setAttribute("data-jsoneditor-".concat(e),r)),this.__data[r]=n}},{key:"registerEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=t,this}},{key:"unregisterEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=null,this}},{key:"getEditor",value:function(t){if(this.editors)return this.editors[t]}},{key:"watch",value:function(t,e){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(e),this}},{key:"unwatch",value:function(t,e){if(!this.watchlist||!this.watchlist[t])return this;if(!e)return this.watchlist[t]=null,this;for(var n=[],r=0;r0;)r.deleteRule(0);Object.keys(e).forEach((function(n){var o="default"===t?n:"".concat(i,'[data-theme="').concat(t,'"] ').concat(n);r.insertRule?r.insertRule(o+" {"+decodeURIComponent(e[n])+"}",0):r.addRule&&r.addRule(o,decodeURIComponent(e[n]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,e,n){var r=this.element.nodeName.toLowerCase(),i="";Object.keys(e).forEach((function(n){var o="default"===t?n:"".concat(r,'[data-theme="').concat(t,'"] ').concat(n);i+=o+" {"+decodeURIComponent(e[n])+"}\n"}));var o=new CSSStyleSheet;o.replaceSync(i),n.adoptedStyleSheets=[].concat(cl(n.adoptedStyleSheets),[o])}}])&&pl(e.prototype,n),r&&pl(e,r),t}();dl.defaults=c,dl.AbstractEditor=H,dl.AbstractTheme=Qa,dl.AbstractIconLib=ra,Object.assign(dl.defaults.themes,sl),Object.assign(dl.defaults.editors,Qo),Object.assign(dl.defaults.templates,Yo),Object.assign(dl.defaults.iconlibs,$a)}])}));
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index c738a65dc70..8bd50dd8cd1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -157,12 +157,12 @@
resolved "https://registry.yarnpkg.com/@highlightjs/cdn-assets/-/cdn-assets-10.7.3.tgz#bccdef5cdfe4bf74ed9393cba528539f94753306"
integrity sha512-Bz1c7NOPQE1h/0S3lYaDyA5wTimP9b8ppeN3HBfv+SF0IEeLsu86xneMcBvCaXBMwcwLc6/xGpyPOmPhCM8hAg==
-"@json-editor/json-editor@^2.5.2":
- version "2.5.2"
- resolved "https://registry.yarnpkg.com/@json-editor/json-editor/-/json-editor-2.5.2.tgz#d6f348d7e2f5bf9ccf2e3b34f637143674265e7f"
- integrity sha512-OqrPtRw8FM2mSZbAFFvvxW6j8JvXCoQbhMgSiryhmcoByh3tQk+PuhK+2+bk9K/zn9PAt9KQsAiSc9sv6WIr/A==
+"@json-editor/json-editor@^2.6.1":
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/@json-editor/json-editor/-/json-editor-2.6.1.tgz#169e8b88305d71ccac391c3ae22d4145bc63c9f7"
+ integrity sha512-8jH0n+BLO/jqBCZ3XXaes3NYzvQ+6KfO1p79MsIsTClIi5AvSvEzg3EWk4lsMWrUAFRwcM/CaififsoYDXMdMw==
dependencies:
- core-js "^3.6.5"
+ core-js "^3.12.1"
"@mixer/parallel-prettier@^2.0.1":
version "2.0.1"
@@ -1137,10 +1137,10 @@ copy-descriptor@^0.1.0:
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
-core-js@^3.6.5:
- version "3.9.0"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.9.0.tgz#790b1bb11553a2272b36e2625c7179db345492f8"
- integrity sha512-PyFBJaLq93FlyYdsndE5VaueA9K5cNB7CGzeCj191YYLhkQM0gdZR2SKihM70oF0wdqKSKClv/tEBOpoRmdOVQ==
+core-js@^3.12.1:
+ version "3.19.3"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.19.3.tgz#6df8142a996337503019ff3235a7022d7cdf4559"
+ integrity sha512-LeLBMgEGSsG7giquSzvgBrTS7V5UL6ks3eQlUSbN8dJStlLFiRzUm5iqsRyzUB8carhfKjkJ2vzKqE6z1Vga9g==
core-util-is@~1.0.0:
version "1.0.2"