UNPKG

p3x-redis-ui-material

Version:

💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io

23 lines (20 loc) • 1.06 MB
/*! MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information about all licenses, please see 118.ffaffc91a0b76cc1098c.js.LICENSE.txt */ (self.webpackChunkp3x_redis_ui_material=self.webpackChunkp3x_redis_ui_material||[]).push([[118],{118:(e,t,i)=>{i(8353),i.g.JSONEditor=i(3010),ace.config.setModuleUrl("ace/theme/twilight",i(445))},8353:(e,t,i)=>{"use strict";i.r(t)},445:(e,t,i)=>{e=i.nmd(e),ace.define("ace/theme/twilight-css",["require","exports","module"],(function(e,t,i){i.exports=".ace-twilight .ace_gutter {\n background: #232323;\n color: #E2E2E2\n}\n\n.ace-twilight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-twilight {\n background-color: #141414;\n color: #F8F8F8\n}\n\n.ace-twilight .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_keyword,\n.ace-twilight .ace_meta {\n color: #CDA869\n}\n\n.ace-twilight .ace_constant,\n.ace-twilight .ace_constant.ace_character,\n.ace-twilight .ace_constant.ace_character.ace_escape,\n.ace-twilight .ace_constant.ace_other,\n.ace-twilight .ace_heading,\n.ace-twilight .ace_markup.ace_heading,\n.ace-twilight .ace_support.ace_constant {\n color: #CF6A4C\n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-twilight .ace_support {\n color: #9B859D\n}\n\n.ace-twilight .ace_fold {\n background-color: #AC885B;\n border-color: #F8F8F8\n}\n\n.ace-twilight .ace_support.ace_function {\n color: #DAD085\n}\n\n.ace-twilight .ace_list,\n.ace-twilight .ace_markup.ace_list,\n.ace-twilight .ace_storage {\n color: #F9EE98\n}\n\n.ace-twilight .ace_entity.ace_name.ace_function,\n.ace-twilight .ace_meta.ace_tag {\n color: #AC885B\n}\n\n.ace-twilight .ace_string {\n color: #8F9D6A\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-twilight .ace_comment {\n font-style: italic;\n color: #5F5A60\n}\n\n.ace-twilight .ace_variable {\n color: #7587A6\n}\n\n.ace-twilight .ace_xml-pe {\n color: #494949\n}\n\n.ace-twilight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-twilight .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"})),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],(function(e,t,i){t.isDark=!0,t.cssClass="ace-twilight",t.cssText=e("./twilight-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/twilight"],(function(t){e&&(e.exports=t)}))},3010:e=>{var t;self,t=function(){return function(){var e={6545:function(e,t,i){"use strict";i.d(t,{t:function(){return c}});var n=i(1925),o=i(6237),r=i(3057);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function a(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var c=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dom={};var n=this,o=this.dom;this.anchor=void 0,this.items=t,this.eventListeners={},this.selection=void 0,this.onClose=i?i.close:void 0,this.limitHeight=!!i&&i.limitHeight;var s=document.createElement("div");s.className="jsoneditor-contextmenu-root",o.root=s;var a=document.createElement("div");a.className="jsoneditor-contextmenu",o.menu=a,s.appendChild(a);var l=document.createElement("ul");l.className="jsoneditor-menu",a.appendChild(l),o.list=l,o.items=[];var c=document.createElement("button");c.type="button",o.focusButton=c;var h=document.createElement("li");h.style.overflow="hidden",h.style.height="0",h.appendChild(c),l.appendChild(h),function e(t,i,o){o.forEach((function(o){if("separator"===o.type){var s=document.createElement("div");s.className="jsoneditor-separator";var a=document.createElement("li");a.appendChild(s),t.appendChild(a)}else{var l={},c=document.createElement("li");t.appendChild(c);var h=document.createElement("button");if(h.type="button",h.className=o.className,l.button=h,o.title&&(h.title=o.title),o.click&&(h.onclick=function(e){e.preventDefault(),n.hide(),o.click()}),c.appendChild(h),o.submenu){var d=document.createElement("div");d.className="jsoneditor-icon",h.appendChild(d);var u,g=document.createElement("div");if(g.className="jsoneditor-text"+(o.click?"":" jsoneditor-right-margin"),g.appendChild(document.createTextNode(o.text)),h.appendChild(g),o.click){h.className+=" jsoneditor-default";var p=document.createElement("button");p.type="button",l.buttonExpand=p,p.className="jsoneditor-expand";var m=document.createElement("div");m.className="jsoneditor-expand",p.appendChild(m),c.appendChild(p),o.submenuTitle&&(p.title=o.submenuTitle),u=p}else{var f=document.createElement("div");f.className="jsoneditor-expand",h.appendChild(f),u=h}u.onclick=function(e){e.preventDefault(),n._onExpandItem(l),u.focus()};var C=[];l.subItems=C;var v=document.createElement("ul");l.ul=v,v.className="jsoneditor-menu",v.style.height="0",c.appendChild(v),e(v,C,o.submenu)}else{var y=document.createElement("div");y.className="jsoneditor-icon",h.appendChild(y);var I=document.createElement("div");I.className="jsoneditor-text",I.appendChild(document.createTextNode((0,r.Tl)(o.text))),h.appendChild(I)}i.push(l)}}))}(l,this.dom.items,t),this.maxHeight=0,t.forEach((function(e){var i=24*(t.length+(e.submenu?e.submenu.length:0));n.maxHeight=Math.max(n.maxHeight,i)}))}return t=e,(i=[{key:"_getVisibleButtons",value:function(){var e=[],t=this;return this.dom.items.forEach((function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i===t.expandedItem&&i.subItems.forEach((function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)}))})),e}},{key:"show",value:function(t,i,r){this.hide();var s=!0,a=t.parentNode,l=t.getBoundingClientRect(),c=a.getBoundingClientRect(),h=i.getBoundingClientRect(),d=this;this.dom.absoluteAnchor=(0,n.p)(t,i,(function(){d.hide()})),l.bottom+this.maxHeight<h.bottom||l.top-this.maxHeight>h.top&&(s=!1);var u=r?0:l.top-c.top;if(s){var g=t.offsetHeight;this.dom.menu.style.left="0",this.dom.menu.style.top=u+g+"px",this.dom.menu.style.bottom=""}else this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px";if(this.limitHeight){var p=s?h.bottom-l.bottom-10:l.top-h.top-10;this.dom.list.style.maxHeight=p+"px",this.dom.list.style.overflowY="auto"}this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,o.getSelection)(),this.anchor=t,setTimeout((function(){d.dom.focusButton.focus()}),0),e.visibleMenu&&e.visibleMenu.hide(),e.visibleMenu=this}},{key:"hide",value:function(){this.dom.absoluteAnchor&&(this.dom.absoluteAnchor.destroy(),delete this.dom.absoluteAnchor),this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose&&this.onClose()),e.visibleMenu===this&&(e.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(e){var t=this,i=e===this.expandedItem,n=this.expandedItem;if(n&&(n.ul.style.height="0",n.ul.style.padding="",setTimeout((function(){t.expandedItem!==n&&(n.ul.style.display="",(0,o.removeClassName)(n.ul.parentNode,"jsoneditor-selected"))}),300),this.expandedItem=void 0),!i){var r=e.ul;r.style.display="block",r.clientHeight,setTimeout((function(){if(t.expandedItem===e){for(var i=0,n=0;n<r.childNodes.length;n++)i+=r.childNodes[n].clientHeight;r.style.height=i+"px",r.style.padding="5px 10px"}}),0),(0,o.addClassName)(r.parentNode,"jsoneditor-selected"),this.expandedItem=e}}},{key:"_onKeyDown",value:function(e){var t,i,n,r,s=e.target,a=e.which,l=!1;27===a?(this.selection&&(0,o.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),l=!0):9===a?e.shiftKey?0===(i=(t=this._getVisibleButtons()).indexOf(s))&&(t[t.length-1].focus(),l=!0):(i=(t=this._getVisibleButtons()).indexOf(s))===t.length-1&&(t[0].focus(),l=!0):37===a?("jsoneditor-expand"===s.className&&(i=(t=this._getVisibleButtons()).indexOf(s),(n=t[i-1])&&n.focus()),l=!0):38===a?(i=(t=this._getVisibleButtons()).indexOf(s),(n=t[i-1])&&"jsoneditor-expand"===n.className&&(n=t[i-2]),n||(n=t[t.length-1]),n&&n.focus(),l=!0):39===a?(i=(t=this._getVisibleButtons()).indexOf(s),(r=t[i+1])&&"jsoneditor-expand"===r.className&&r.focus(),l=!0):40===a&&(i=(t=this._getVisibleButtons()).indexOf(s),(r=t[i+1])&&"jsoneditor-expand"===r.className&&(r=t[i+2]),r||(r=t[0]),r&&(r.focus(),l=!0),l=!0),l&&(e.stopPropagation(),e.preventDefault())}}])&&a(t.prototype,i),s&&a(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,s}();c.visibleMenu=void 0},2115:function(e,t,i){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}i.d(t,{N:function(){return s}});var s=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errorTableVisible=t.errorTableVisible,this.onToggleVisibility=t.onToggleVisibility,this.onFocusLine=t.onFocusLine||function(){},this.onChangeHeight=t.onChangeHeight,this.dom={};var i=document.createElement("div");i.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=i;var n=document.createElement("div");n.style.display="none",n.className="jsoneditor-additional-errors fadein",n.textContent="Scroll for more â–¿",this.dom.additionalErrorsIndication=n,i.appendChild(n);var o=document.createElement("span");o.className="jsoneditor-validation-error-icon",o.style.display="none",this.dom.validationErrorIcon=o;var r=document.createElement("span");r.className="jsoneditor-validation-error-count",r.style.display="none",this.dom.validationErrorCount=r,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"},(t=[{key:"getErrorTable",value:function(){return this.dom.validationErrorsContainer}},{key:"getErrorCounter",value:function(){return this.dom.validationErrorCount}},{key:"getWarningIcon",value:function(){return this.dom.validationErrorIcon}},{key:"getErrorIcon",value:function(){return this.dom.parseErrorIndication}},{key:"toggleTableVisibility",value:function(){this.errorTableVisible=!this.errorTableVisible,this.onToggleVisibility(this.errorTableVisible)}},{key:"setErrors",value:function(e,t){var i=this;if(this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.dom.additionalErrorsIndication.style.display="none"),this.errorTableVisible&&e.length>0){var n=document.createElement("div");n.className="jsoneditor-validation-errors";var o=document.createElement("table");o.className="jsoneditor-text-errors",n.appendChild(o);var r=document.createElement("tbody");o.appendChild(r),e.forEach((function(e){var n;if(isNaN(e.line)){if(e.dataPath){var o=t.find((function(t){return t.path===e.dataPath}));o&&(n=o.line+1)}}else n=e.line;var s=document.createElement("tr");s.className=isNaN(n)?"":"jump-to-line","error"===e.type?s.className+=" parse-error":s.className+=" validation-error";var a=document.createElement("td"),l=document.createElement("button");l.className="jsoneditor-schema-error",a.appendChild(l),s.appendChild(a);var c=document.createElement("td");if(c.style="white-space: nowrap;",c.textContent=isNaN(n)?"":"Ln "+n,s.appendChild(c),"string"==typeof e){var h=document.createElement("td");h.colSpan=2;var d=document.createElement("pre");d.appendChild(document.createTextNode(e)),h.appendChild(d),s.appendChild(h)}else{var u=document.createElement("td");u.appendChild(document.createTextNode(e.dataPath||"")),s.appendChild(u);var g=document.createElement("td"),p=document.createElement("pre");p.appendChild(document.createTextNode(e.message.replace(/<br>/gi,"\n"))),g.appendChild(p),s.appendChild(g)}s.onclick=function(){i.onFocusLine(n)},r.appendChild(s)})),this.dom.validationErrors=n,this.dom.validationErrorsContainer.appendChild(n),this.dom.additionalErrorsIndication.title=e.length+" errors total",this.dom.validationErrorsContainer.clientHeight<this.dom.validationErrorsContainer.scrollHeight?(this.dom.additionalErrorsIndication.style.display="block",this.dom.validationErrorsContainer.onscroll=function(){i.dom.additionalErrorsIndication.style.display=i.dom.validationErrorsContainer.clientHeight>0&&0===i.dom.validationErrorsContainer.scrollTop?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0;var s=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0);this.onChangeHeight(s)}else this.onChangeHeight(0);var a=e.filter((function(e){return"error"!==e.type})).length;if(a>0?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=a,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=a+" schema validation error(s) found",this.dom.validationErrorIcon.onclick=this.toggleTableVisibility.bind(this)):(this.dom.validationErrorCount.style.display="none",this.dom.validationErrorIcon.style.display="none"),e.some((function(e){return"error"===e.type}))){var l=e[0].line;this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(l)?"parse error - check that the json is valid":"parse error on line "+l,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)}else this.dom.parseErrorIndication.style.display="none"}}])&&o(e.prototype,t),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}()},2877:function(e,t,i){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r(n.key),n)}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}i.d(t,{$:function(){return s}});var s=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.target=t.target||null,!this.target)throw new Error('FocusTracker constructor called without a "target" to track.');this.onFocus="function"==typeof t.onFocus?t.onFocus:null,this.onBlur="function"==typeof t.onBlur?t.onBlur:null,this._onClick=this._onEvent.bind(this),this._onKeyUp=function(e){9!==e.which&&9!==e.keyCode||this._onEvent(e)}.bind(this),this._onBlur=this._onEvent.bind(this),this.focusFlag=!1,this.firstEventFlag=!0,(this.onFocus||this.onBlur)&&(document.addEventListener("click",this._onClick),document.addEventListener("keyup",this._onKeyUp),document.addEventListener("blur",this._onBlur))},(t=[{key:"destroy",value:function(){document.removeEventListener("click",this._onClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("blur",this._onBlur),this._onEvent({target:document.body})}},{key:"_onEvent",value:function(e){var t=e.target;t===this.target||this.target.contains(t)||this.target.contains(document.activeElement)?this.focusFlag||(this.onFocus&&this.onFocus({type:"focus",target:this.target}),this.focusFlag=!0):(this.focusFlag||this.firstEventFlag)&&(this.onBlur&&this.onBlur({type:"blur",target:this.target}),this.focusFlag=!1,this.firstEventFlag&&(this.firstEventFlag=!1))}}])&&o(e.prototype,t),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}()},1346:function(e,t,i){"use strict";var n=i(7413),o=i(1746),r=i(5633).treeModeMixins,s=i(1948).textModeMixins,a=i(7483).previewModeMixins,l=i(6237),c=l.clear,h=l.extend,d=l.getInnerText,u=l.getInternetExplorerVersion,g=l.parse,p=i(2870).tryRequireAjv,m=i(5609).showTransformModal,f=i(2915).showSortModal,C=p();function v(e,t,i){if(!(this instanceof v))throw new Error('JSONEditor constructor called without "new".');var n=u();if(-1!==n&&n<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,delete t.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,delete t.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,delete t.editable),t.onChangeJSON&&("text"===t.mode||"code"===t.mode||t.modes&&(-1!==t.modes.indexOf("text")||-1!==t.modes.indexOf("code")))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),t&&Object.keys(t).forEach((function(e){-1===v.VALID_OPTIONS.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')}))),arguments.length&&this._create(e,t,i)}"undefined"==typeof Promise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),v.modes={},v.prototype.DEBOUNCE_INTERVAL=150,v.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onExpand","onEditable","onError","onEvent","onModeChange","onNodeName","onValidate","onCreateMenu","onSelectionChange","onTextSelectionChange","onClassName","onFocus","onBlur","colorPicker","onColorPicker","timestampTag","timestampFormat","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","mainMenuBar","languages","language","enableSort","enableTransform","limitDragging","maxVisibleChilds","onValidationError","modalAnchor","popupAnchor","createQuery","executeQuery","queryDescription","allowSchemaSuggestions","showErrorTable"],v.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||this.options.modes&&this.options.modes[0]||"tree";this.setMode(n)},v.prototype.destroy=function(){},v.prototype.set=function(e){this.json=e},v.prototype.get=function(){return this.json},v.prototype.setText=function(e){this.json=g(e)},v.prototype.getText=function(){return JSON.stringify(this.json)},v.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},v.prototype.getName=function(){return this.options&&this.options.name},v.prototype.setMode=function(e){if(e!==this.options.mode||!this.create){var t=this.container,i=h({},this.options),n=i.mode;i.mode=e;var o=v.modes[e];if(!o)throw new Error('Unknown mode "'+i.mode+'"');var r="text"===o.data,s=this.getName(),a=this[r?"getText":"get"]();if(this.destroy(),c(this),h(this,o.mixin),this.create(t,i),this.setName(s),this[r?"setText":"set"](a),"function"==typeof o.load)try{o.load.call(this)}catch(e){console.error(e)}if("function"==typeof i.onModeChange&&e!==n)try{i.onModeChange(e,n)}catch(e){console.error(e)}}},v.prototype.getMode=function(){return this.options.mode},v.prototype._onError=function(e){this.options&&"function"==typeof this.options.onError?this.options.onError(e):window.alert(e.toString())},v.prototype.setSchema=function(e,t){if(e){var n;try{this.options.ajv?n=this.options.ajv:((n=C({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(i(5207)),n.addMetaSchema(i(6801)))}catch(e){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}if(n){if(t){for(var o in t)n.removeSchema(o),t[o]&&n.addSchema(t[o],o);this.options.schemaRefs=t}this.validateSchema=n.compile(e),this.options.schema=e,this.options.schemaRefs=t,this.validate()}this.refresh()}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate(),this.refresh();"function"==typeof this._onSchemaChange&&this._onSchemaChange(e,t)},v.prototype.validate=function(){},v.prototype.refresh=function(){},v.registerMode=function(e){var t,i;if(Array.isArray(e))for(t=0;t<e.length;t++)v.registerMode(e[t]);else{if(!("mode"in e))throw new Error('Property "mode" missing');if(!("mixin"in e))throw new Error('Property "mixin" missing');if(!("data"in e))throw new Error('Property "data" missing');var n=e.mode;if(n in v.modes)throw new Error('Mode "'+n+'" already registered');if("function"!=typeof e.mixin.create)throw new Error('Required function "create" missing on mixin');var o=["setMode","registerMode","modes"];for(t=0;t<o.length;t++)if((i=o[t])in e.mixin)throw new Error('Reserved property "'+i+'" not allowed in mixin');v.modes[n]=e}},v.registerMode(r),v.registerMode(s),v.registerMode(a),v.ace=n,v.Ajv=C,v.VanillaPicker=o,v.showTransformModal=m,v.showSortModal=f,v.getInnerText=d,v.default=v,e.exports=v},1389:function(e,t,i){"use strict";i.d(t,{n:function(){return l}});var n=i(6545),o=i(3057);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}var l=function(){return e=function e(t,i,r,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var a={code:{text:(0,o.Tl)("modeCodeText"),title:(0,o.Tl)("modeCodeTitle"),click:function(){s("code")}},form:{text:(0,o.Tl)("modeFormText"),title:(0,o.Tl)("modeFormTitle"),click:function(){s("form")}},text:{text:(0,o.Tl)("modeTextText"),title:(0,o.Tl)("modeTextTitle"),click:function(){s("text")}},tree:{text:(0,o.Tl)("modeTreeText"),title:(0,o.Tl)("modeTreeTitle"),click:function(){s("tree")}},view:{text:(0,o.Tl)("modeViewText"),title:(0,o.Tl)("modeViewTitle"),click:function(){s("view")}},preview:{text:(0,o.Tl)("modePreviewText"),title:(0,o.Tl)("modePreviewTitle"),click:function(){s("preview")}}},l=[],c=0;c<i.length;c++){var h=i[c],d=a[h];if(!d)throw new Error('Unknown mode "'+h+'"');d.className="jsoneditor-type-modes"+(r===h?" jsoneditor-selected":""),l.push(d)}var u=a[r];if(!u)throw new Error('Unknown mode "'+r+'"');var g=u.text,p=document.createElement("button");p.type="button",p.className="jsoneditor-modes jsoneditor-separator",p.textContent=g+" â–¾",p.title=(0,o.Tl)("modeEditorTitle"),p.onclick=function(){new n.t(l).show(p,t)};var m=document.createElement("div");m.className="jsoneditor-modes",m.style.position="relative",m.appendChild(p),t.appendChild(m),this.dom={container:t,box:p,frame:m}},(t=[{key:"focus",value:function(){this.dom.box.focus()}},{key:"destroy",value:function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null}}])&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}()},7413:function(e,t,i){var n;if(window.ace)n=window.ace;else try{n=i(6990),i(4221),i(6534),i(6489);var o=i(5477);n.config.setModuleUrl("ace/mode/json_worker",o)}catch(e){}e.exports=n},9762:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],(function(e,t,i){t.isDark=!1,t.cssClass="ace-jsoneditor",t.cssText='.ace-jsoneditor .ace_gutter {\nbackground: #ebebeb;\ncolor: #333\n}\n\n.ace-jsoneditor.ace_editor {\nline-height: 1.3;\nbackground-color: #fff;\n}\n.ace-jsoneditor .ace_print-margin {\nwidth: 1px;\nbackground: #e8e8e8\n}\n.ace-jsoneditor .ace_scroller {\nbackground-color: #FFFFFF\n}\n.ace-jsoneditor .ace_text-layer {\ncolor: gray\n}\n.ace-jsoneditor .ace_variable {\ncolor: #1a1a1a\n}\n.ace-jsoneditor .ace_cursor {\nborder-left: 2px solid #000000\n}\n.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {\nborder-left: 0px;\nborder-bottom: 1px solid #000000\n}\n.ace-jsoneditor .ace_marker-layer .ace_selection {\nbackground: lightgray\n}\n.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {\nbox-shadow: 0 0 3px 0px #FFFFFF;\nborder-radius: 2px\n}\n.ace-jsoneditor .ace_marker-layer .ace_step {\nbackground: rgb(255, 255, 0)\n}\n.ace-jsoneditor .ace_marker-layer .ace_bracket {\nmargin: -1px 0 0 -1px;\nborder: 1px solid #BFBFBF\n}\n.ace-jsoneditor .ace_marker-layer .ace_active-line {\nbackground: #FFFBD1\n}\n.ace-jsoneditor .ace_gutter-active-line {\nbackground-color : #dcdcdc\n}\n.ace-jsoneditor .ace_marker-layer .ace_selected-word {\nborder: 1px solid lightgray\n}\n.ace-jsoneditor .ace_invisible {\ncolor: #BFBFBF\n}\n.ace-jsoneditor .ace_keyword,\n.ace-jsoneditor .ace_meta,\n.ace-jsoneditor .ace_support.ace_constant.ace_property-value {\ncolor: #AF956F\n}\n.ace-jsoneditor .ace_keyword.ace_operator {\ncolor: #484848\n}\n.ace-jsoneditor .ace_keyword.ace_other.ace_unit {\ncolor: #96DC5F\n}\n.ace-jsoneditor .ace_constant.ace_language {\ncolor: darkorange\n}\n.ace-jsoneditor .ace_constant.ace_numeric {\ncolor: red\n}\n.ace-jsoneditor .ace_constant.ace_character.ace_entity {\ncolor: #BF78CC\n}\n.ace-jsoneditor .ace_invalid {\ncolor: #FFFFFF;\nbackground-color: #FF002A;\n}\n.ace-jsoneditor .ace_fold {\nbackground-color: #AF956F;\nborder-color: #000000\n}\n.ace-jsoneditor .ace_storage,\n.ace-jsoneditor .ace_support.ace_class,\n.ace-jsoneditor .ace_support.ace_function,\n.ace-jsoneditor .ace_support.ace_other,\n.ace-jsoneditor .ace_support.ace_type {\ncolor: #C52727\n}\n.ace-jsoneditor .ace_string {\ncolor: green\n}\n.ace-jsoneditor .ace_comment {\ncolor: #BCC8BA\n}\n.ace-jsoneditor .ace_entity.ace_name.ace_tag,\n.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {\ncolor: #606060\n}\n.ace-jsoneditor .ace_markup.ace_underline {\ntext-decoration: underline\n}\n.ace-jsoneditor .ace_indent-guide {\nbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y\n}',e("../lib/dom").importCssString(t.cssText,t.cssClass)}))},5736:function(e,t){var i,n,o=(i={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,i,n,o,r,s){var a=r.length-1;switch(o){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=r[a-1];case 13:this.$={};break;case 14:case 19:this.$=r[a-1];break;case 15:this.$=[r[a-2],r[a]];break;case 16:this.$={},this.$[r[a][0]]=r[a][1];break;case 17:this.$=r[a-2],r[a-2][r[a][0]]=r[a][1];break;case 18:this.$=[];break;case 20:this.$=[r[a]];break;case 21:this.$=r[a-2],r[a-2].push(r[a])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,i=[0],n=[null],o=[],r=this.table,s="",a=0,l=0,c=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;function d(){var e;return"number"!=typeof(e=t.lexer.lex()||1)&&(e=t.symbols_[e]||e),e}o.push(h),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var u,g,p,m,f,C,v,y,I,b,A={};;){if(p=i[i.length-1],this.defaultActions[p]?m=this.defaultActions[p]:(null==u&&(u=d()),m=r[p]&&r[p][u]),void 0===m||!m.length||!m[0]){if(!c){for(C in I=[],r[p])this.terminals_[C]&&C>2&&I.push("'"+this.terminals_[C]+"'");var w="";w=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+I.join(", ")+", got '"+this.terminals_[u]+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==u?"end of input":"'"+(this.terminals_[u]||u)+"'"),this.parseError(w,{text:this.lexer.match,token:this.terminals_[u]||u,line:this.lexer.yylineno,loc:h,expected:I})}if(3==c){if(1==u)throw new Error(w||"Parsing halted.");l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,u=d()}for(;!(2..toString()in r[p]);){if(0==p)throw new Error(w||"Parsing halted.");b=1,i.length=i.length-2*b,n.length=n.length-b,o.length=o.length-b,p=i[i.length-1]}g=u,u=2,m=r[p=i[i.length-1]]&&r[p][2],c=3}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+u);switch(m[0]){case 1:i.push(u),n.push(this.lexer.yytext),o.push(this.lexer.yylloc),i.push(m[1]),u=null,g?(u=g,g=null):(l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(v=this.productions_[m[1]][1],A.$=n[n.length-v],A._$={first_line:o[o.length-(v||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(v||1)].first_column,last_column:o[o.length-1].last_column},void 0!==(f=this.performAction.call(A,s,l,a,this.yy,m[1],n,o)))return f;v&&(i=i.slice(0,-1*v*2),n=n.slice(0,-1*v),o=o.slice(0,-1*v)),i.push(this.productions_[m[1]][0]),n.push(A.$),o.push(A._$),y=r[i[i.length-2]][i[i.length-1]],i.push(y);break;case 3:return!0}}return!0}},n=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,i,n,o;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length&&(!(i=this._input.match(this.rules[r[s]]))||t&&!(i[0].length>t[0].length)||(t=i,n=s,this.options.flex));s++);return t?((o=t[0].match(/\n.*/g))&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,r[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}(),i.lexer=n,i);t.parser=o,t.parse=o.parse.bind(o)},4772:function(e){"use strict";var t=function(){};t.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){this._events=this._events||{},e in this._events!=0&&this._events[e].splice(this._events[e].indexOf(t),1)},emit:function(e){if(this._events=this._events||{},e in this._events!=0)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},t.mixin=function(e){for(var i=["on","off","emit"],n=0;n<i.length;n++)"function"==typeof e?e.prototype[i[n]]=t.prototype[i[n]]:e[i[n]]=t.prototype[i[n]];return e};var i={escapeRegExp:function(e){var t=/[\\^$.*+?()[\]{}|]/g,i=new RegExp(t.source);return e&&i.test(e)?e.replace(t,"\\$&"):e},extend:function(e,t){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];o&&"[object Object]"===Object.prototype.toString.call(o)?(e[n]=e[n]||{},i.extend(e[n],o)):e[n]=o}return e},each:function(e,t,i){if("[object Object]"===Object.prototype.toString.call(e))for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(i,n,e[n],e);else for(var o=0,r=e.length;o<r;o++)t.call(i,o,e[o],e)},createElement:function(e,t){var i,n=document.createElement(e);if(t&&"[object Object]"===Object.prototype.toString.call(t))for(i in t)i in n?n[i]=t[i]:"html"===i?n.innerHTML=t[i]:n.setAttribute(i,t[i]);return n},hasClass:function(e,t){if(e)return e.classList?e.classList.contains(t):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){i.hasClass(e,t)||(e.classList?e.classList.add(t):e.className=e.className.trim()+" "+t)},removeClass:function(e,t){i.hasClass(e,t)&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(e,t){return e&&e!==document.body&&(t(e)?e:i.closest(e.parentNode,t))},isInt:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},debounce:function(e,t,i){var n;return function(){var o=this,r=arguments,s=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||e.apply(o,r)}),t),s&&e.apply(o,r)}},rect:function(e,t){var i=window,n=e.getBoundingClientRect(),o=t?i.pageXOffset:0,r=t?i.pageYOffset:0;return{bottom:n.bottom+r,height:n.height,left:n.left+o,right:n.right+o,top:n.top+r,width:n.width}},includes:function(e,t){return e.indexOf(t)>-1},startsWith:function(e,t){return e.substr(0,t.length)===t},truncate:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}};function n(e,t){return e.hasOwnProperty(t)&&(!0===e[t]||e[t].length)}function o(e,t,n){e.parentNode?e.parentNode.parentNode||t.appendChild(e.parentNode):t.appendChild(e),i.removeClass(e,"excluded"),n||(e.textContent=e.textContent)}var r=function(){if(this.items.length){var e=document.createDocumentFragment();if(this.config.pagination){var t=this.pages.slice(0,this.pageIndex);i.each(t,(function(t,n){i.each(n,(function(t,i){o(i,e,this.customOption)}),this)}),this)}else i.each(this.items,(function(t,i){o(i,e,this.customOption)}),this);e.childElementCount&&(i.removeClass(this.items[this.navIndex],"active"),this.navIndex=(e.querySelector(".selectr-option.selected")||e.querySelector(".selectr-option")).idx,i.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(e)}},s=function(e){var t=e.target;this.container.contains(t)||!this.opened&&!i.hasClass(this.container,"notice")||this.close()},a=function(e,t){t=t||e;var n={class:"selectr-option",role:"treeitem","aria-selected":!1};this.customOption?n.html=this.config.renderOption(t):n.textContent=e.textContent;var o=i.createElement("li",n);return o.idx=e.idx,this.items.push(o),e.defaultSelected&&this.defaultSelected.push(e.idx),e.disabled&&(o.disabled=!0,i.addClass(o,"disabled")),o},l=function(){this.requiresPagination=this.config.pagination&&this.config.pagination>0,n(this.config,"width")&&(i.isInt(this.config.width)?this.width=this.config.width+"px":"auto"===this.config.width?this.width="100%":i.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=i.createElement("div",{class:"selectr-container"}),this.config.customClass&&i.addClass(this.container,this.config.customClass),this.mobileDevice?i.addClass(this.container,"selectr-mobile"):i.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?i.addClass(this.el,"selectr-visible"):i.addClass(this.el,"selectr-hidden"),this.selected=i.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:0,"aria-expanded":!1}),this.label=i.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var e=i.createElement("div",{class:"selectr-options-container"});if(this.tree=i.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=i.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple?(i.addClass(this.label,"selectr-tags"),i.addClass(this.container,"multiple"),this.tags=[],this.selectedValues=this.config.defaultSelected?this.getSelectedProperties("value"):[],this.selectedIndexes=this.getSelectedProperties("idx")):(this.selectedValue=null,this.selectedIndex=-1),this.selected.appendChild(this.label),this.config.clearable&&(this.selectClear=i.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),i.addClass(this.container,"clearable")),this.config.taggable){var t=i.createElement("li",{class:"input-tag"});if(this.input=i.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),t.appendChild(this.input),this.label.appendChild(t),i.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators){this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators);for(var o=[],r=0;r<this.tagSeperators.length;r++)o.push(i.escapeRegExp(this.tagSeperators[r]));this.tagSeperatorsRegex=new RegExp(o.join("|"),"i")}else this.tagSeperatorsRegex=new RegExp(",","i")}this.config.searchable&&(this.input=i.createElement("input",{class:"selectr-input",tagIndex:-1,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search",placeholder:this.config.messages.searchPlaceholder}),this.inputClear=i.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=i.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),e.appendChild(this.inputContainer)),e.appendChild(this.notice),e.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var s,l=!1,c=0;if(this.el.children.length&&i.each(this.el.children,(function(e,t){"OPTGROUP"===t.nodeName?(l=i.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.label+"</li>"}),i.each(t.children,(function(e,t){t.idx=c,l.appendChild(a.call(this,t,l)),c++}),this)):(t.idx=c,a.call(this,t),c++)}),this),this.config.data&&Array.isArray(this.config.data)){this.data=[];var h,d=!1;l=!1,c=0,i.each(this.config.data,(function(e,t){n(t,"children")?(d=i.createElement("optgroup",{label:t.text}),l=i.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.text+"</li>"}),i.each(t.children,(function(e,t){(h=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=n(t,"disabled"),this.options.push(h),d.appendChild(h),h.idx=c,l.appendChild(a.call(this,h,t)),this.data[c]=t,c++}),this),this.el.appendChild(d)):((h=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=n(t,"disabled"),this.options.push(h),h.idx=c,a.call(this,h,t),this.data[c]=t,c++)}),this)}this.setSelected(!0),this.navIndex=0;for(var u=0;u<this.items.length;u++)if(s=this.items[u],!i.hasClass(s,"disabled")){i.addClass(s,"active"),this.navIndex=u;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(e),this.placeEl=i.createElement("div",{class:"selectr-placeholder"}),this.setPlaceholder(),this.selected.appendChild(this.placeEl),this.disabled&&this.disable(),this.el.parentNode.insertBefore(this.container,this.el),this.container.appendChild(this.el)},c=function(e){if(e=e||window.event,this.items.length&&this.opened&&i.includes([13,38,40],e.which)){if(e.preventDefault(),13===e.which)return!(this.noResults||this.config.taggable&&this.input.value.length>0)&&this.change(this.navIndex);var t,n=this.items[this.navIndex],o=this.navIndex;switch(e.which){case 38:t=0,this.navIndex>0&&this.navIndex--;break;case 40:t=1,this.navIndex<this.items.length-1&&this.navIndex++}for(this.navigating=!0;i.hasClass(this.items[this.navIndex],"disabled")||i.hasClass(this.items[this.navIndex],"excluded");){if(!(this.navIndex>0&&this.navIndex<this.items.length-1)){this.navIndex=o;break}if(t?this.navIndex++:this.navIndex--,this.searching){if(this.navIndex>this.tree.lastElementChild.idx){this.navIndex=this.tree.lastElementChild.idx;break}if(this.navIndex<this.tree.firstElementChild.idx){this.navIndex=this.tree.firstElementChild.idx;break}}}var r=i.rect(this.items[this.navIndex]);t?(0===this.navIndex?this.tree.scrollTop=0:r.top+r.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(r.top+r.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&u.call(this)):0===this.navIndex?this.tree.scrollTop=0:r.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(r.top-this.optsRect.top)),n&&i.removeClass(n,"active"),i.addClass(this.items[this.navIndex],"active")}else this.navigating=!1},h=function(e){var t,n=this,o=document.createDocumentFragment(),r=this.options[e.idx],s=this.data?this.data[e.idx]:r,a={class:"selectr-tag"};this.customSelected?a.html=this.config.renderSelection(s):a.textContent=r.textContent;var l=i.createElement("li",a),c=i.createElement("button",{class:"selectr-tag-remove",type:"button"});if(l.appendChild(c),l.idx=e.idx,l.tag=r.value,this.tags.push(l),this.config.sortSelected){var h=this.tags.slice();t=function(e,t){e.replace(/(\d+)|(\D+)/g,(function(e,i,n){t.push([i||1/0,n||""])}))},h.sort((function(e,i){var o,r,s=[],a=[];for(!0===n.config.sortSelected?(o=e.tag,r=i.tag):"text"===n.config.sortSelected&&(o=e.textContent,r=i.textContent),t(o,s),t(r,a);s.length&&a.length;){var l=s.shift(),c=a.shift(),h=l[0]-c[0]||l[1].localeCompare(c[1]);if(h)return h}return s.length-a.length})),i.each(h,(function(e,t){o.appendChild(t)})),this.label.innerHTML=""}else o.appendChild(l);this.config.taggable?this.label.insertBefore(o,this.input.parentNode):this.label.appendChild(o)},d=function(e){var t=!1;i.each(this.tags,(function(i,n){n.idx===e.idx&&(t=n)}),this),t&&(this.label.removeChild(t),this.tags.splice(this.tags.indexOf(t),1))},u=function(){var e=this.tree;if(e.scrollTop>=e.scrollHeight-e.offsetHeight&&this.pageIndex<this.pages.length){var t=document.createDocumentFragment();i.each(this.pages[this.pageIndex],(function(e,i){o(i,t,this.customOption)}),this),e.appendChild(t),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length})}},g=function(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&i.removeClass(this.inputContainer,"active"),i.hasClass(this.container,"notice")&&(i.removeClass(this.container,"notice"),i.addClass(this.container,"open"),this.input.focus()),i.each(this.items,(function(e,t){i.removeClass(t,"excluded"),this.customOption||(t.textContent=t.textContent)}),this))},p=function(e,t){if(!e)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if(this.el=e,"string"==typeof e&&(this.el=document.querySelector(e)),null===this.el)throw new Error("