You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1340 lines
1020 KiB
JavaScript

import{_ as Pt,o as ze,c as ot,h as Oe,bA as Ht,e as Ot,f as ft,dG as Zt,$ as kt,a as ve,w as _e,i as nt,j as ke,k as Rt,b as gt,bu as it,cI as wt,F as $t,l as Lt,d as Gt,m as pt,dH as Dt,cN as Kt,cH as jt,dj as zt,dI as Xt,y as Jt,z as Yt,dJ as Ut,s as Qt,v as qt,x as en,N as tn,B as nn,bD as on,bE as rn}from"./index.3790e358.js";import{g as sn}from"./_commonjsHelpers.b273fa3f.js";import{_ as ct}from"./Input.aa2d04f5.js";import{a as an,b as ln,_ as cn}from"./DataTable.02edda7e.js";import{_ as hn}from"./Scrollbar.281825c6.js";import"./Suffix.40f5c87a.js";import"./Checkbox.0be9cd10.js";import"./FocusDetector.b4ab226b.js";import"./Select.0304b98d.js";import"./Forward.a833504f.js";var Ft={exports:{}};/*!
* jsoneditor.js
*
* @brief
* JSONEditor is a web-based tool to view, edit, format, and validate JSON.
* It has various modes such as a tree editor, a code editor, and a plain text
* editor.
*
* Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+
*
* @license
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*
* Copyright (c) 2011-2023 Jos de Jong, http://jsoneditoronline.org
*
* @author Jos de Jong, <wjosdejong@gmail.com>
* @version 9.10.2
* @date 2023-05-15
*/(function(Xe,Qe){(function(De,st){Xe.exports=st()})(self,function(){return st={897:function(le,g,Z){Z.d(g,{x:function(){return z}});var U=Z(2602),S=Z(9791),M=Z(7907);function K(P){return(K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(P)}function j(P,N){for(var A=0;A<N.length;A++){var m=N[A];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(P,function(T){return T=function(y,f){if(K(y)!=="object"||y===null)return y;var h=y[Symbol.toPrimitive];if(h===void 0)return(f==="string"?String:Number)(y);if(h=h.call(y,f||"default"),K(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}(T,"string"),K(T)==="symbol"?T:String(T)}(m.key),m)}}var z=function(){function P(m,f){if(!(this instanceof P))throw new TypeError("Cannot call a class as a function");this.dom={};var y=this,a=this.dom,f=(this.anchor=void 0,this.items=m,this.eventListeners={},this.selection=void 0,this.onClose=f?f.close:void 0,this.limitHeight=!!f&&f.limitHeight,document.createElement("div")),h=(f.className="jsoneditor-contextmenu-root",a.root=f,document.createElement("div")),f=(h.className="jsoneditor-contextmenu",a.menu=h,f.appendChild(h),document.createElement("ul")),h=(f.className="jsoneditor-menu",h.appendChild(f),a.list=f,a.items=[],document.createElement("button")),a=(h.type="button",a.focusButton=h,document.createElement("li"));a.style.overflow="hidden",a.style.height="0",a.appendChild(h),f.appendChild(a),function c(t,r,e){e.forEach(function(n){var s,o,i,l,d,C;n.type==="separator"?((d=document.createElement("div")).className="jsoneditor-separator",(o=document.createElement("li")).appendChild(d),t.appendChild(o)):(s={},d=document.createElement("li"),t.appendChild(d),(o=document.createElement("button")).type="button",o.className=n.className,s.button=o,n.title&&(o.title=n.title),n.click&&(o.onclick=function(p){p.preventDefault(),y.hide(),n.click()}),d.appendChild(o),n.submenu?((l=document.createElement("div")).className="jsoneditor-icon",o.appendChild(l),(l=document.createElement("div")).className="jsoneditor-text"+(n.click?"":" jsoneditor-right-margin"),l.appendChild(document.createTextNode(n.text)),o.appendChild(l),(i=n.click?(o.className+=" jsoneditor-default",(l=document.createElement("button")).type="button",(s.buttonExpand=l).className="jsoneditor-expand",(C=document.createElement("div")).className="jsoneditor-expand",l.appendChild(C),d.appendChild(l),n.submenuTitle&&(l.title=n.submenuTitle),l):((C=document.createElement("div")).className="jsoneditor-expand",o.appendChild(C),o)).onclick=function(p){p.preventDefault(),y._onExpandItem(s),i.focus()},s.subItems=l=[],C=document.createElement("ul"),(s.ul=C).className="jsoneditor-menu",C.style.height="0",d.appendChild(C),c(C,l,n.submenu)):((d=document.createElement("div")).className="jsoneditor-icon",o.appendChild(d),(C=document.createElement("div")).className="jsoneditor-text",C.appendChild(document.createTextNode((0,M.Iu)(n.text))),o.appendChild(C)),r.push(s))})}(f,this.dom.items,m),this.maxHeight=0,m.forEach(function(c){c=24*(m.length+(c.submenu?c.submenu.length:0)),y.maxHeight=Math.max(y.maxHeight,c)})}var N,A;return N=P,(A=[{key:"_getVisibleButtons",value:function(){var m=[],T=this;return this.dom.items.forEach(function(y){m.push(y.button),y.buttonExpand&&m.push(y.buttonExpand),y.subItems&&y===T.expandedItem&&y.subItems.forEach(function(f){m.push(f.button),f.buttonExpand&&m.push(f.buttonExpand)})}),m}},{key:"show",value:function(m,r,y){this.hide();var f=!0,a=m.parentNode,h=m.getBoundingClientRect(),a=a.getBoundingClientRect(),c=r.getBoundingClientRect(),t=this,r=(this.dom.absoluteAnchor=(0,U.w)(m,r,function(){t.hide()}),h.bottom+this.maxHeight<c.bottom||h.top-this.maxHeight>c.top&&(f=!1),y?0:h.top-a.top);f?(y=m.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=r+y+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px"),this.limitHeight&&(a=f?c.bottom-h.bottom-10:h.top-c.top-10,this.dom.list.style.maxHeight=a+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,S.getSelection)(),this.anchor=m,setTimeout(function(){t.dom.focusButton.focus()},0),P.visibleMenu&&P.visibleMenu.hide(),P.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(),P.visibleMenu===this&&(P.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(m){var T,y=this,f=m===this.expandedItem,h=this.expandedItem;h&&(h.ul.style.height="0",h.ul.style.padding="",setTimeout(function(){y.expandedItem!==h&&(h.ul.style.display="",S.removeClassName)(h.ul.parentNode,"jsoneditor-selected")},300),this.expandedItem=void 0),f||((T=m.ul).style.display="block",T.clientHeight,setTimeout(function(){if(y.expandedItem===m){for(var a=0,c=0;c<T.childNodes.length;c++)a+=T.childNodes[c].clientHeight;T.style.height=a+"px",T.style.padding="5px 10px"}},0),(0,S.addClassName)(T.parentNode,"jsoneditor-selected"),this.expandedItem=m)}},{key:"_onKeyDown",value:function(m){var T,y,f,h,a=m.target,c=m.which,t=!1;c===27?(this.selection&&(0,S.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),t=!0):c===9?m.shiftKey?(y=(T=this._getVisibleButtons()).indexOf(a))===0&&(T[T.length-1].focus(),t=!0):(y=(T=this._getVisibleButtons()).indexOf(a))===T.length-1&&(T[0].focus(),t=!0):c===37?(a.className==="jsoneditor-expand"&&(y=(T=this._getVisibleButtons()).indexOf(a),f=T[y-1])&&f.focus(),t=!0):c===38?(y=(T=this._getVisibleButtons()).indexOf(a),(f=(f=(f=T[y-1])&&f.className==="jsoneditor-expand"?T[y-2]:f)||T[T.length-1])&&f.focus(),t=!0):c===39?(y=(T=this._getVisibleButtons()).indexOf(a),(h=T[y+1])&&h.className==="jsoneditor-expand"&&h.focus(),t=!0):c===40&&(y=(T=this._getVisibleButtons()).indexOf(a),(h=(h=(h=T[y+1])&&h.className==="jsoneditor-expand"?T[y+2]:h)||T[0])&&(h.focus(),t=!0),t=!0),t&&(m.stopPropagation(),m.preventDefault())}}])&&j(N.prototype,A),Object.defineProperty(N,"prototype",{writable:!1}),P}();z.visibleMenu=void 0},6436:function(le,g,Z){function U(K){return(U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(K)}function S(K,j){for(var z=0;z<j.length;z++){var P=j[z];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(K,function(N){return N=function(A,m){if(U(A)!=="object"||A===null)return A;var T=A[Symbol.toPrimitive];if(T===void 0)return(m==="string"?String:Number)(A);if(T=T.call(A,m||"default"),U(T)!=="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}(N,"string"),U(N)==="symbol"?N:String(N)}(P.key),P)}}Z.d(g,{Q:function(){return M}});var M=function(){function K(N){if(!(this instanceof K))throw new TypeError("Cannot call a class as a function");this.errorTableVisible=N.errorTableVisible,this.onToggleVisibility=N.onToggleVisibility,this.onFocusLine=N.onFocusLine||function(){},this.onChangeHeight=N.onChangeHeight,this.dom={};var N=document.createElement("div"),A=(N.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=N,document.createElement("div")),N=(A.style.display="none",A.className="jsoneditor-additional-errors fadein",A.textContent="Scroll for more \u25BF",this.dom.additionalErrorsIndication=A,N.appendChild(A),document.createElement("span")),A=(N.className="jsoneditor-validation-error-icon",N.style.display="none",this.dom.validationErrorIcon=N,document.createElement("span"));A.className="jsoneditor-validation-error-count",A.style.display="none",this.dom.validationErrorCount=A,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}var j,z;return j=K,(z=[{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(P,N){var A,m,T=this,y=(this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.dom.additionalErrorsIndication.style.display="none"),this.errorTableVisible&&0<P.length?((y=document.createElement("div")).className="jsoneditor-validation-errors",(m=document.createElement("table")).className="jsoneditor-text-errors",y.appendChild(m),A=document.createElement("tbody"),m.appendChild(A),P.forEach(function(f){isNaN(f.line)?f.dataPath&&(a=N.find(function(r){return r.path===f.dataPath}))&&(h=a.line+1):h=f.line;var h,a=document.createElement("tr"),c=(a.className=isNaN(h)?"":"jump-to-line",f.type==="error"?a.className+=" parse-error":a.className+=" validation-error",document.createElement("td")),t=document.createElement("button"),t=(t.className="jsoneditor-schema-error",c.appendChild(t),a.appendChild(c),document.createElement("td"));t.style="white-space: nowrap;",t.textContent=isNaN(h)?"":"Ln "+h,a.appendChild(t),typeof f=="string"?((c=document.createElement("td")).colSpan=2,(t=document.createElement("pre")).appendChild(document.createTextNode(f)),c.appendChild(t),a.appendChild(c)):((t=document.createElement("td")).appendChild(document.createTextNode(f.dataPath||"")),a.appendChild(t),c=document.createElement("td"),(t=document.createElement("pre")).appendChild(document.createTextNode(f.message.replace(/<br>/gi,`
`))),c.appendChild(t),a.appendChild(c)),a.onclick=function(){T.onFocusLine(h)},A.appendChild(a)}),this.dom.validationErrors=y,this.dom.validationErrorsContainer.appendChild(y),this.dom.additionalErrorsIndication.title=P.length+" errors total",this.dom.validationErrorsContainer.clientHeight<this.dom.validationErrorsContainer.scrollHeight?(this.dom.additionalErrorsIndication.style.display="block",this.dom.validationErrorsContainer.onscroll=function(){T.dom.additionalErrorsIndication.style.display=0<T.dom.validationErrorsContainer.clientHeight&&T.dom.validationErrorsContainer.scrollTop===0?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0,m=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0),this.onChangeHeight(m)):this.onChangeHeight(0),P.filter(function(f){return f.type!=="error"}).length);0<y?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=y,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=y+" 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"),P.some(function(f){return f.type==="error"})?(m=P[0].line,this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(m)?"parse error - check that the json is valid":"parse error on line "+m,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)):this.dom.parseErrorIndication.style.display="none"}}])&&S(j.prototype,z),Object.defineProperty(j,"prototype",{writable:!1}),K}()},2474:function(le,g,Z){function U(K){return(U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(K)}function S(K,j){for(var z=0;z<j.length;z++){var P=j[z];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(K,function(N){return N=function(A,m){if(U(A)!=="object"||A===null)return A;var T=A[Symbol.toPrimitive];if(T===void 0)return(m==="string"?String:Number)(A);if(T=T.call(A,m||"default"),U(T)!=="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}(N,"string"),U(N)==="symbol"?N:String(N)}(P.key),P)}}Z.d(g,{R:function(){return M}});var M=function(){function K(P){if(!(this instanceof K))throw new TypeError("Cannot call a class as a function");if(this.target=P.target||null,!this.target)throw new Error('FocusTracker constructor called without a "target" to track.');this.onFocus=typeof P.onFocus=="function"?P.onFocus:null,this.onBlur=typeof P.onBlur=="function"?P.onBlur:null,this._onClick=this._onEvent.bind(this),this._onKeyUp=function(N){N.which!==9&&N.keyCode!==9||this._onEvent(N)}.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))}var j,z;return j=K,(z=[{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(P){P=P.target,P=P===this.target||!(!this.target.contains(P)&&!this.target.contains(document.activeElement)),P?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)}}])&&S(j.prototype,z),Object.defineProperty(j,"prototype",{writable:!1}),K}()},3161:function(le,g,Z){var U=Z(8170),S=Z(8037),M=Z(8038).treeModeMixins,K=Z(8458).textModeMixins,j=Z(341).previewModeMixins,T=Z(9791),z=T.clear,P=T.extend,N=T.getInnerText,A=T.getInternetExplorerVersion,m=T.parse,T=Z(2744).tryRequireAjv,y=Z(2558).showTransformModal,f=Z(6210).showSortModal,h=T();function a(c,t,r){if(!(this instanceof a))throw new Error('JSONEditor constructor called without "new".');var e=A();if(e!==-1&&e<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&&(t.mode==="text"||t.mode==="code"||t.modes&&(t.modes.indexOf("text")!==-1||t.modes.indexOf("code")!==-1))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),t)&&Object.keys(t).forEach(function(n){a.VALID_OPTIONS.indexOf(n)===-1&&console.warn('Unknown option "'+n+'". This option will be ignored')}),arguments.length&&this._create(c,t,r)}typeof Promise=="undefined"&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),a.modes={},a.prototype.DEBOUNCE_INTERVAL=150,a.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"],a.prototype._create=function(c,t,r){this.container=c,this.options=t||{},this.json=r||{},c=this.options.mode||this.options.modes&&this.options.modes[0]||"tree",this.setMode(c)},a.prototype.destroy=function(){},a.prototype.set=function(c){this.json=c},a.prototype.get=function(){return this.json},a.prototype.setText=function(c){this.json=m(c)},a.prototype.getText=function(){return JSON.stringify(this.json)},a.prototype.setName=function(c){this.options||(this.options={}),this.options.name=c},a.prototype.getName=function(){return this.options&&this.options.name},a.prototype.setMode=function(c){if(c!==this.options.mode||!this.create){var t=this.container,r=P({},this.options),e=r.mode,n=(r.mode=c,a.modes[c]);if(!n)throw new Error('Unknown mode "'+r.mode+'"');var s=n.data==="text",o=this.getName(),i=this[s?"getText":"get"]();if(this.destroy(),z(this),P(this,n.mixin),this.create(t,r),this.setName(o),this[s?"setText":"set"](i),typeof n.load=="function")try{n.load.call(this)}catch(l){console.error(l)}if(typeof r.onModeChange=="function"&&c!==e)try{r.onModeChange(c,e)}catch(l){console.error(l)}}},a.prototype.getMode=function(){return this.options.mode},a.prototype._onError=function(c){this.options&&typeof this.options.onError=="function"?this.options.onError(c):window.alert(c.toString())},a.prototype.setSchema=function(c,t){if(c){var r;try{this.options.ajv?r=this.options.ajv:((r=h({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(Z(7171)),r.addMetaSchema(Z(6273)))}catch{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(r){if(t){for(var e in t)r.removeSchema(e),t[e]&&r.addSchema(t[e],e);this.options.schemaRefs=t}this.validateSchema=r.compile(c),this.options.schema=c,this.options.schemaRefs=t,this.validate()}}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate();this.refresh(),typeof this._onSchemaChange=="function"&&this._onSchemaChange(c,t)},a.prototype.validate=function(){},a.prototype.refresh=function(){},(a.registerMode=function(c){var t;if(Array.isArray(c))for(n=0;n<c.length;n++)a.registerMode(c[n]);else{if(!("mode"in c))throw new Error('Property "mode" missing');if(!("mixin"in c))throw new Error('Property "mixin" missing');if(!("data"in c))throw new Error('Property "data" missing');var r=c.mode;if(r in a.modes)throw new Error('Mode "'+r+'" already registered');if(typeof c.mixin.create!="function")throw new Error('Required function "create" missing on mixin');for(var e=["setMode","registerMode","modes"],n=0;n<e.length;n++)if((t=e[n])in c.mixin)throw new Error('Reserved property "'+t+'" not allowed in mixin');a.modes[r]=c}})(M),a.registerMode(K),a.registerMode(j),a.ace=U,a.Ajv=h,a.VanillaPicker=S,a.showTransformModal=y,a.showSortModal=f,a.getInnerText=N,le.exports=a.default=a},6617:function(le,g,Z){Z.d(g,{x:function(){return j}});var U=Z(897),S=Z(7907);function M(z){return(M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P})(z)}function K(z,P){for(var N=0;N<P.length;N++){var A=P[N];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(z,function(m){return m=function(T,y){if(M(T)!=="object"||T===null)return T;var f=T[Symbol.toPrimitive];if(f===void 0)return(y==="string"?String:Number)(T);if(f=f.call(T,y||"default"),M(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}(m,"string"),M(m)==="symbol"?m:String(m)}(A.key),A)}}var j=function(){function z(A,m,T,y){if(!(this instanceof z))throw new TypeError("Cannot call a class as a function");for(var f={code:{text:(0,S.Iu)("modeCodeText"),title:(0,S.Iu)("modeCodeTitle"),click:function(){y("code")}},form:{text:(0,S.Iu)("modeFormText"),title:(0,S.Iu)("modeFormTitle"),click:function(){y("form")}},text:{text:(0,S.Iu)("modeTextText"),title:(0,S.Iu)("modeTextTitle"),click:function(){y("text")}},tree:{text:(0,S.Iu)("modeTreeText"),title:(0,S.Iu)("modeTreeTitle"),click:function(){y("tree")}},view:{text:(0,S.Iu)("modeViewText"),title:(0,S.Iu)("modeViewTitle"),click:function(){y("view")}},preview:{text:(0,S.Iu)("modePreviewText"),title:(0,S.Iu)("modePreviewTitle"),click:function(){y("preview")}}},h=[],a=0;a<m.length;a++){var c=m[a],t=f[c];if(!t)throw new Error('Unknown mode "'+c+'"');t.className="jsoneditor-type-modes"+(T===c?" jsoneditor-selected":""),h.push(t)}var e=f[T];if(!e)throw new Error('Unknown mode "'+T+'"');var e=e.text,r=document.createElement("button"),e=(r.type="button",r.className="jsoneditor-modes jsoneditor-separator",r.textContent=e+" \u25BE",r.title=(0,S.Iu)("modeEditorTitle"),r.onclick=function(){new U.x(h).show(r,A)},document.createElement("div"));e.className="jsoneditor-modes",e.style.position="relative",e.appendChild(r),A.appendChild(e),this.dom={container:A,box:r,frame:e}}var P,N;return P=z,(N=[{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}}])&&K(P.prototype,N),Object.defineProperty(P,"prototype",{writable:!1}),z}()},8170:function(le,g,Z){var U;if(window.ace)U=window.ace;else try{U=Z(6225),Z(4091),Z(3330),Z(4317);var S=Z(7923);U.config.setModuleUrl("ace/mode/json_worker",S)}catch{}le.exports=U},4864:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(le,g,Z){g.isDark=!1,g.cssClass="ace-jsoneditor",g.cssText=`.ace-jsoneditor .ace_gutter {
background: #ebebeb;
color: #333
}
.ace-jsoneditor.ace_editor {
line-height: 1.3;
background-color: #fff;
}
.ace-jsoneditor .ace_print-margin {
width: 1px;
background: #e8e8e8
}
.ace-jsoneditor .ace_scroller {
background-color: #FFFFFF
}
.ace-jsoneditor .ace_text-layer {
color: gray
}
.ace-jsoneditor .ace_variable {
color: #1a1a1a
}
.ace-jsoneditor .ace_cursor {
border-left: 2px solid #000000
}
.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #000000
}
.ace-jsoneditor .ace_marker-layer .ace_selection {
background: lightgray
}
.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px #FFFFFF;
border-radius: 2px
}
.ace-jsoneditor .ace_marker-layer .ace_step {
background: rgb(255, 255, 0)
}
.ace-jsoneditor .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid #BFBFBF
}
.ace-jsoneditor .ace_marker-layer .ace_active-line {
background: #FFFBD1
}
.ace-jsoneditor .ace_gutter-active-line {
background-color : #dcdcdc
}
.ace-jsoneditor .ace_marker-layer .ace_selected-word {
border: 1px solid lightgray
}
.ace-jsoneditor .ace_invisible {
color: #BFBFBF
}
.ace-jsoneditor .ace_keyword,
.ace-jsoneditor .ace_meta,
.ace-jsoneditor .ace_support.ace_constant.ace_property-value {
color: #AF956F
}
.ace-jsoneditor .ace_keyword.ace_operator {
color: #484848
}
.ace-jsoneditor .ace_keyword.ace_other.ace_unit {
color: #96DC5F
}
.ace-jsoneditor .ace_constant.ace_language {
color: darkorange
}
.ace-jsoneditor .ace_constant.ace_numeric {
color: red
}
.ace-jsoneditor .ace_constant.ace_character.ace_entity {
color: #BF78CC
}
.ace-jsoneditor .ace_invalid {
color: #FFFFFF;
background-color: #FF002A;
}
.ace-jsoneditor .ace_fold {
background-color: #AF956F;
border-color: #000000
}
.ace-jsoneditor .ace_storage,
.ace-jsoneditor .ace_support.ace_class,
.ace-jsoneditor .ace_support.ace_function,
.ace-jsoneditor .ace_support.ace_other,
.ace-jsoneditor .ace_support.ace_type {
color: #C52727
}
.ace-jsoneditor .ace_string {
color: green
}
.ace-jsoneditor .ace_comment {
color: #BCC8BA
}
.ace-jsoneditor .ace_entity.ace_name.ace_tag,
.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {
color: #606060
}
.ace-jsoneditor .ace_markup.ace_underline {
text-decoration: underline
}
.ace-jsoneditor .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y
}`,le("../lib/dom").importCssString(g.cssText,g.cssClass)})},6589:function(le,g){(Z={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(U,S,M,K,j,z,P){var N=z.length-1;switch(j){case 1:this.$=U.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(U);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=z[N-1];case 13:this.$={};break;case 14:this.$=z[N-1];break;case 15:this.$=[z[N-2],z[N]];break;case 16:this.$={},this.$[z[N][0]]=z[N][1];break;case 17:this.$=z[N-2],z[N-2][z[N][0]]=z[N][1];break;case 18:this.$=[];break;case 19:this.$=z[N-1];break;case 20:this.$=[z[N]];break;case 21:this.$=z[N-2],z[N-2].push(z[N])}},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(U,S){throw new Error(U)},parse:function(U){var S=this,M=[0],K=[null],j=[],z=this.table,P="",N=0,A=0,m=0,T=(this.lexer.setInput(U),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.lexer.yylloc===void 0&&(this.lexer.yylloc={}),this.lexer.yylloc);function y(){var l=S.lexer.lex()||1;return l=typeof l!="number"&&S.symbols_[l]||l}j.push(T),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);for(var f,h,a,c,t,r,e,n,s,o={};;){if(a=M[M.length-1],(c=this.defaultActions[a]||(f==null&&(f=y()),z[a]&&z[a][f]))===void 0||!c.length||!c[0]){if(!m){for(t in n=[],z[a])this.terminals_[t]&&2<t&&n.push("'"+this.terminals_[t]+"'");var i="",i=this.lexer.showPosition?"Parse error on line "+(N+1)+`:
`+this.lexer.showPosition()+`
Expecting `+n.join(", ")+", got '"+this.terminals_[f]+"'":"Parse error on line "+(N+1)+": Unexpected "+(f==1?"end of input":"'"+(this.terminals_[f]||f)+"'");this.parseError(i,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:T,expected:n})}if(m==3){if(f==1)throw new Error(i||"Parsing halted.");A=this.lexer.yyleng,P=this.lexer.yytext,N=this.lexer.yylineno,T=this.lexer.yylloc,f=y()}for(;!(2 .toString()in z[a]);){if(a==0)throw new Error(i||"Parsing halted.");s=1,M.length=M.length-2*s,K.length=K.length-s,j.length=j.length-s,a=M[M.length-1]}h=f,f=2,c=z[a=M[M.length-1]]&&z[a][2],m=3}if(c[0]instanceof Array&&1<c.length)throw new Error("Parse Error: multiple actions possible at state: "+a+", token: "+f);switch(c[0]){case 1:M.push(f),K.push(this.lexer.yytext),j.push(this.lexer.yylloc),M.push(c[1]),f=null,h?(f=h,h=null):(A=this.lexer.yyleng,P=this.lexer.yytext,N=this.lexer.yylineno,T=this.lexer.yylloc,0<m&&m--);break;case 2:if(r=this.productions_[c[1]][1],o.$=K[K.length-r],o._$={first_line:j[j.length-(r||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(r||1)].first_column,last_column:j[j.length-1].last_column},(e=this.performAction.call(o,P,A,N,this.yy,c[1],K,j))!==void 0)return e;r&&(M=M.slice(0,-1*r*2),K=K.slice(0,-1*r),j=j.slice(0,-1*r)),M.push(this.productions_[c[1]][0]),K.push(o.$),j.push(o._$),e=z[M[M.length-2]][M[M.length-1]],M.push(e);break;case 3:return!0}}return!0}}).lexer={EOF:1,parseError:function(U,S){if(!this.yy.parseError)throw new Error(U);this.yy.parseError(U,S)},setInput:function(U){return this._input=U,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 U=this._input[0];return this.yytext+=U,this.yyleng++,this.match+=U,this.matched+=U,U.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),U},unput:function(U){return this._input=U+this._input,this},more:function(){return this._more=!0,this},less:function(U){this._input=this.match.slice(U)+this._input},pastInput:function(){var U=this.matched.substr(0,this.matched.length-this.match.length);return(20<U.length?"...":"")+U.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var U=this.match;return U.length<20&&(U+=this._input.substr(0,20-U.length)),(U.substr(0,20)+(20<U.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var U=this.pastInput(),S=new Array(U.length+1).join("-");return U+this.upcomingInput()+`
`+S+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var U,S,M,K,j=this._currentRules(),z=0;z<j.length&&(!(S=this._input.match(this.rules[j[z]]))||U&&!(S[0].length>U[0].length)||(U=S,M=z,this.options.flex));z++);return U?((K=U[0].match(/\n.*/g))&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-1:this.yylloc.last_column+U[0].length},this.yytext+=U[0],this.match+=U[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(U[0].length),this.matched+=U[0],K=this.performAction.call(this,this.yy,this,j[M],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),K||void 0):this._input===""?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U!==void 0?U:this.lex()},begin:function(U){this.conditionStack.push(U)},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(U){this.begin(U)},options:{},performAction:function(U,S,M,K){switch(M){case 0:break;case 1:return 6;case 2:return S.yytext=S.yytext.substr(1,S.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}}};var Z;g.parser=Z,g.parse=Z.parse.bind(Z)},3879:function(le){function g(){}g.prototype={on:function(N,A){this._events=this._events||{},this._events[N]=this._events[N]||[],this._events[N].push(A)},off:function(N,A){this._events=this._events||{},N in this._events&&this._events[N].splice(this._events[N].indexOf(A),1)},emit:function(N){if(this._events=this._events||{},N in this._events)for(var A=0;A<this._events[N].length;A++)this._events[N][A].apply(this,Array.prototype.slice.call(arguments,1))}},g.mixin=function(N){for(var A=["on","off","emit"],m=0;m<A.length;m++)typeof N=="function"?N.prototype[A[m]]=g.prototype[A[m]]:N[A[m]]=g.prototype[A[m]];return N};var Z={escapeRegExp:function(N){var A=/[\\^$.*+?()[\]{}|]/g,m=new RegExp(A.source);return N&&m.test(N)?N.replace(A,"\\$&"):N},extend:function(N,A){for(var m in A){var T;A.hasOwnProperty(m)&&((T=A[m])&&Object.prototype.toString.call(T)==="[object Object]"?(N[m]=N[m]||{},Z.extend(N[m],T)):N[m]=T)}return N},each:function(N,A,m){if(Object.prototype.toString.call(N)==="[object Object]")for(var T in N)Object.prototype.hasOwnProperty.call(N,T)&&A.call(m,T,N[T],N);else for(var y=0,f=N.length;y<f;y++)A.call(m,y,N[y],N)},createElement:function(N,A){var m,T=document.createElement(N);if(A&&Object.prototype.toString.call(A)==="[object Object]")for(m in A)m in T?T[m]=A[m]:m==="html"?T.innerHTML=A[m]:T.setAttribute(m,A[m]);return T},hasClass:function(N,A){if(N)return N.classList?N.classList.contains(A):!!N.className&&!!N.className.match(new RegExp("(\\s|^)"+A+"(\\s|$)"))},addClass:function(N,A){Z.hasClass(N,A)||(N.classList?N.classList.add(A):N.className=N.className.trim()+" "+A)},removeClass:function(N,A){Z.hasClass(N,A)&&(N.classList?N.classList.remove(A):N.className=N.className.replace(new RegExp("(^|\\s)"+A.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(N,A){return N&&N!==document.body&&(A(N)?N:Z.closest(N.parentNode,A))},isInt:function(N){return typeof N=="number"&&isFinite(N)&&Math.floor(N)===N},debounce:function(N,A,m){var T;return function(){var y=this,f=arguments,h=m&&!T;clearTimeout(T),T=setTimeout(function(){T=null,m||N.apply(y,f)},A),h&&N.apply(y,f)}},rect:function(T,f){var m=window,T=T.getBoundingClientRect(),y=f?m.pageXOffset:0,f=f?m.pageYOffset:0;return{bottom:T.bottom+f,height:T.height,left:T.left+y,right:T.right+y,top:T.top+f,width:T.width}},includes:function(N,A){return-1<N.indexOf(A)},startsWith:function(N,A){return N.substr(0,A.length)===A},truncate:function(N){for(;N.firstChild;)N.removeChild(N.firstChild)}};function U(N,A){return N.hasOwnProperty(A)&&(N[A]===!0||N[A].length)}function S(N,A,m){N.parentNode?N.parentNode.parentNode||A.appendChild(N.parentNode):A.appendChild(N),Z.removeClass(N,"excluded"),m||(N.textContent=N.textContent)}function M(){var N,A;this.items.length&&(N=document.createDocumentFragment(),this.config.pagination?(A=this.pages.slice(0,this.pageIndex),Z.each(A,function(m,T){Z.each(T,function(y,f){S(f,N,this.customOption)},this)},this)):Z.each(this.items,function(m,T){S(T,N,this.customOption)},this),N.childElementCount&&(Z.removeClass(this.items[this.navIndex],"active"),this.navIndex=(N.querySelector(".selectr-option.selected")||N.querySelector(".selectr-option")).idx,Z.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(N))}function K(N,A){A=A||N;var m={class:"selectr-option",role:"treeitem","aria-selected":!1};return this.customOption?m.html=this.config.renderOption(A):m.textContent=N.textContent,(A=Z.createElement("li",m)).idx=N.idx,this.items.push(A),N.defaultSelected&&this.defaultSelected.push(N.idx),N.disabled&&(A.disabled=!0,Z.addClass(A,"disabled")),A}function j(){var N,A=this.tree,m=A.scrollTop;A.scrollHeight-A.offsetHeight<=m&&this.pageIndex<this.pages.length&&(N=document.createDocumentFragment(),Z.each(this.pages[this.pageIndex],function(T,y){S(y,N,this.customOption)},this),A.appendChild(N),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length}))}function z(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&Z.removeClass(this.inputContainer,"active"),Z.hasClass(this.container,"notice")&&(Z.removeClass(this.container,"notice"),Z.addClass(this.container,"open"),this.input.focus()),Z.each(this.items,function(N,A){Z.removeClass(A,"excluded"),this.customOption||(A.textContent=A.textContent)},this))}function P(N,A){if(!N)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if(typeof(this.el=N)=="string"&&(this.el=document.querySelector(N)),this.el===null)throw new Error("The element you passed to Selectr can not be found.");if(this.el.nodeName.toLowerCase()!=="select")throw new Error("The element you passed to Selectr is not a HTMLSelectElement.");this.render(A)}P.prototype.render=function(N){var A;this.rendered||((this.el.selectr=this).config=Z.extend({defaultSelected:!0,width:"auto",disabled:!1,disabledMobile:!1,searchable:!0,clearable:!1,sortSelected:!1,allowDeselect:!1,closeOnScroll:!1,nativeDropdown:!1,nativeKeyboard:!1,placeholder:"Select an option...",taggable:!1,tagPlaceholder:"Enter a tag...",messages:{noResults:"No results.",noOptions:"No options available.",maxSelections:"A maximum of {max} items can be selected.",tagDuplicate:"That tag is already in use.",searchPlaceholder:"Search options..."}},N),this.originalType=this.el.type,this.originalIndex=this.el.tabIndex,this.defaultSelected=[],this.originalOptionCount=this.el.options.length,(this.config.multiple||this.config.taggable)&&(this.el.multiple=!0),this.disabled=U(this.config,"disabled"),this.opened=!1,this.config.taggable&&(this.config.searchable=!1),this.navigating=!1,this.mobileDevice=!1,!this.config.disabledMobile&&/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent)&&(this.mobileDevice=!0),this.customOption=this.config.hasOwnProperty("renderOption")&&typeof this.config.renderOption=="function",this.customSelected=this.config.hasOwnProperty("renderSelection")&&typeof this.config.renderSelection=="function",this.supportsEventPassiveOption=this.detectEventPassiveOption(),g.mixin(this),function(){this.requiresPagination=this.config.pagination&&0<this.config.pagination,U(this.config,"width")&&(Z.isInt(this.config.width)?this.width=this.config.width+"px":this.config.width==="auto"?this.width="100%":Z.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=Z.createElement("div",{class:"selectr-container"}),this.config.customClass&&Z.addClass(this.container,this.config.customClass),this.mobileDevice?Z.addClass(this.container,"selectr-mobile"):Z.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?Z.addClass(this.el,"selectr-visible"):Z.addClass(this.el,"selectr-hidden"),this.selected=Z.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:0,"aria-expanded":!1}),this.label=Z.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var m=Z.createElement("div",{class:"selectr-options-container"});if(this.tree=Z.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=Z.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple?(Z.addClass(this.label,"selectr-tags"),Z.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=Z.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),Z.addClass(this.container,"clearable")),this.config.taggable){var T=Z.createElement("li",{class:"input-tag"});if(this.input=Z.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),Z.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators){this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators);for(var y=[],f=0;f<this.tagSeperators.length;f++)y.push(Z.escapeRegExp(this.tagSeperators[f]));this.tagSeperatorsRegex=new RegExp(y.join("|"),"i")}else this.tagSeperatorsRegex=new RegExp(",","i")}this.config.searchable&&(this.input=Z.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=Z.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=Z.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),m.appendChild(this.inputContainer)),m.appendChild(this.notice),m.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var h,a,c,t=!1,r=0;this.el.children.length&&Z.each(this.el.children,function(n,s){s.nodeName==="OPTGROUP"?(t=Z.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+s.label+"</li>"}),Z.each(s.children,function(o,i){i.idx=r,t.appendChild(K.call(this,i,t)),r++},this)):(s.idx=r,K.call(this,s),r++)},this),this.config.data&&Array.isArray(this.config.data)&&(h=!(this.data=[]),t=!1,r=0,Z.each(this.config.data,function(n,s){U(s,"children")?(h=Z.createElement("optgroup",{label:s.text}),t=Z.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+s.text+"</li>"}),Z.each(s.children,function(o,i){(a=new Option(i.text,i.value,!1,i.hasOwnProperty("selected")&&i.selected===!0)).disabled=U(i,"disabled"),this.options.push(a),h.appendChild(a),a.idx=r,t.appendChild(K.call(this,a,i)),this.data[r]=i,r++},this),this.el.appendChild(h)):((a=new Option(s.text,s.value,!1,s.hasOwnProperty("selected")&&s.selected===!0)).disabled=U(s,"disabled"),this.options.push(a),a.idx=r,K.call(this,a,s),this.data[r]=s,r++)},this)),this.setSelected(!0);for(var e=this.navIndex=0;e<this.items.length;e++)if(c=this.items[e],!Z.hasClass(c,"disabled")){Z.addClass(c,"active"),this.navIndex=e;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(m),this.placeEl=Z.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)}.call(this),this.bindEvents(),this.update(),this.optsRect=Z.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex),A=this,setTimeout(function(){A.emit("selectr.init")},20))},P.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},P.prototype.getSelectedProperties=function(N){var A=this.getSelected();return[].slice.call(A).map(function(m){return m[N]}).filter(function(m){return m!=null})},P.prototype.detectEventPassiveOption=function(){var N=!1;try{var A=Object.defineProperty({},"passive",{get:function(){N=!0}});window.addEventListener("test",null,A)}catch{}return N},P.prototype.bindEvents=function(){var N,A=this;this.events={},this.events.dismiss=function(m){m=m.target,this.container.contains(m)||!this.opened&&!Z.hasClass(this.container,"notice")||this.close()}.bind(this),this.events.navigate=function(m){if(m=m||window.event,this.items.length&&this.opened&&Z.includes([13,38,40],m.which)){if(m.preventDefault(),m.which===13)return!(this.noResults||this.config.taggable&&0<this.input.value.length)&&this.change(this.navIndex);var T,y=this.items[this.navIndex],f=this.navIndex;switch(m.which){case 38:(T=0)<this.navIndex&&this.navIndex--;break;case 40:this.navIndex<this.items.length-(T=1)&&this.navIndex++}for(this.navigating=!0;Z.hasClass(this.items[this.navIndex],"disabled")||Z.hasClass(this.items[this.navIndex],"excluded");){if(!(0<this.navIndex&&this.navIndex<this.items.length-1)){this.navIndex=f;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}}}m=Z.rect(this.items[this.navIndex]),T?(this.navIndex===0?this.tree.scrollTop=0:m.top+m.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(m.top+m.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&j.call(this)):this.navIndex===0?this.tree.scrollTop=0:m.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(m.top-this.optsRect.top)),y&&Z.removeClass(y,"active"),Z.addClass(this.items[this.navIndex],"active")}else this.navigating=!1}.bind(this),this.events.reset=this.reset.bind(this),(this.config.nativeDropdown||this.mobileDevice)&&(this.container.addEventListener("touchstart",function(m){m.changedTouches[0].target===A.el&&A.toggle()},!!this.supportsEventPassiveOption&&{passive:!0}),this.container.addEventListener("click",function(m){m.target===A.el&&A.toggle()}),this.el.addEventListener("change",function(m){m.__selfTriggered||(A.el.multiple?(m=A.getSelectedProperties("idx"),m=function(T,y){for(var f,h=[],a=T.slice(0),c=0;c<y.length;c++)-1<(f=a.indexOf(y[c]))?a.splice(f,1):h.push(y[c]);return[h,a]}(A.selectedIndexes,m),Z.each(m[0],function(T,y){A.select(y)},A),Z.each(m[1],function(T,y){A.deselect(y)},A)):-1<A.el.selectedIndex&&A.select(A.el.selectedIndex))})),this.config.nativeDropdown&&this.container.addEventListener("keydown",function(m){m.key==="Enter"&&A.selected===document.activeElement&&(A.toggle(),setTimeout(function(){A.el.focus()},200))}),this.selected.addEventListener("click",function(m){A.disabled||A.toggle(),m.preventDefault()}),this.config.nativeKeyboard&&(N="",this.selected.addEventListener("keydown",function(m){var T;A.disabled||A.selected!==document.activeElement||m.altKey||m.ctrlKey||m.metaKey||(m.key===" "||!A.opened&&-1<["Enter","ArrowUp","ArrowDown"].indexOf(m.key)?(A.toggle(),m.preventDefault(),m.stopPropagation()):m.key.length<=2&&String[String.fromCodePoint?"fromCodePoint":"fromCharCode"](m.key[String.codePointAt?"codePointAt":"charCodeAt"](0))===m.key&&(A.config.multiple?(A.open(),A.config.searchable&&(A.input.value=m.key,A.input.focus(),A.search(null,!0))):(N+=m.key,(T=A.search(N,!0))&&T.length&&(A.clear(),A.setValue(T[0].value)),setTimeout(function(){N=""},1e3)),m.preventDefault(),m.stopPropagation()))}),this.container.addEventListener("keyup",function(m){A.opened&&m.key==="Escape"&&(A.close(),m.stopPropagation(),A.selected.focus())})),this.label.addEventListener("click",function(m){Z.hasClass(m.target,"selectr-tag-remove")&&A.deselect(m.target.parentNode.idx)}),this.selectClear&&this.selectClear.addEventListener("click",this.clear.bind(this)),this.tree.addEventListener("mousedown",function(m){m.preventDefault()}),this.tree.addEventListener("click",function(m){var T=Z.closest(m.target,function(y){return y&&Z.hasClass(y,"selectr-option")});T&&!Z.hasClass(T,"disabled")&&(Z.hasClass(T,"selected")?(A.el.multiple||!A.el.multiple&&A.config.allowDeselect)&&A.deselect(T.idx):A.select(T.idx),A.opened&&!A.el.multiple)&&A.close(),m.preventDefault(),m.stopPropagation()}),this.tree.addEventListener("mouseover",function(m){!Z.hasClass(m.target,"selectr-option")||Z.hasClass(m.target,"disabled")||(Z.removeClass(A.items[A.navIndex],"active"),Z.addClass(m.target,"active"),A.navIndex=[].slice.call(A.items).indexOf(m.target))}),this.config.searchable&&(this.input.addEventListener("focus",function(m){A.searching=!0}),this.input.addEventListener("blur",function(m){A.searching=!1}),this.input.addEventListener("keyup",function(m){A.search(),A.config.taggable||(this.value.length?Z.addClass(this.parentNode,"active"):Z.removeClass(this.parentNode,"active"))}),this.inputClear.addEventListener("click",function(m){A.input.value=null,z.call(A),A.tree.childElementCount||M.call(A)})),this.config.taggable&&this.input.addEventListener("keyup",function(m){var T,y;A.search(),A.config.taggable&&this.value.length&&(T=this.value.trim()).length&&(m.which===13||A.tagSeperatorsRegex.test(T))&&(m=T.replace(A.tagSeperatorsRegex,""),(y=(m=(m=Z.escapeRegExp(m)).trim()).length?A.add({value:m,textContent:m,selected:!0},!0):y)?(A.close(),z.call(A)):(this.value="",A.setMessage(A.config.messages.tagDuplicate)))}),this.update=Z.debounce(function(){A.opened&&A.config.closeOnScroll&&A.close(),A.width&&(A.container.style.width=A.width),A.invert()},50),this.requiresPagination&&(this.paginateItems=Z.debounce(function(){j.call(this)},50),this.tree.addEventListener("scroll",this.paginateItems.bind(this))),document.addEventListener("click",this.events.dismiss),window.addEventListener("keydown",this.events.navigate),window.addEventListener("resize",this.update),window.addEventListener("scroll",this.update),this.on("selectr.destroy",function(){document.removeEventListener("click",this.events.dismiss),window.removeEventListener("keydown",this.events.navigate),window.removeEventListener("resize",this.update),window.removeEventListener("scroll",this.update)}),this.el.form&&(this.el.form.addEventListener("reset",this.events.reset),this.on("selectr.destroy",function(){this.el.form.removeEventListener("reset",this.events.reset)}))},P.prototype.setSelected=function(N){var A;this.config.data||this.el.multiple||!this.el.options.length||(this.el.selectedIndex!==0||this.el.options[0].defaultSelected||this.config.defaultSelected||(this.el.selectedIndex=-1),this.selectedIndex=this.el.selectedIndex,-1<this.selectedIndex&&this.select(this.selectedIndex)),this.config.multiple&&this.originalType==="select-one"&&!this.config.data&&this.el.options[0].selected&&!this.el.options[0].defaultSelected&&(this.el.options[0].selected=!1),Z.each(this.options,function(m,T){T.selected&&T.defaultSelected&&this.select(T.idx)},this),this.config.selectedValue&&this.setValue(this.config.selectedValue),this.config.data&&(!this.el.multiple&&this.config.defaultSelected&&this.el.selectedIndex<0&&0<this.config.data.length&&this.select(0),A=0,Z.each(this.config.data,function(m,T){U(T,"children")?Z.each(T.children,function(y,f){f.hasOwnProperty("selected")&&f.selected===!0&&this.select(A),A++},this):(T.hasOwnProperty("selected")&&T.selected===!0&&this.select(A),A++)},this))},P.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),this.originalType==="select-one"&&(this.el.multiple=!1),this.config.data&&(this.el.innerHTML=""),Z.removeClass(this.el,"selectr-hidden"),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1,delete this.el.selectr)},P.prototype.change=function(N){var A=this.items[N],m=this.options[N];m.disabled||(m.selected&&Z.hasClass(A,"selected")?this.deselect(N):this.select(N),this.opened&&!this.el.multiple&&this.close())},P.prototype.select=function(N){var A=this.items[N],m=[].slice.call(this.el.options),T=this.options[N];if(this.el.multiple){if(Z.includes(this.selectedIndexes,N))return!1;if(this.config.maxSelections&&this.tags.length===this.config.maxSelections)return this.setMessage(this.config.messages.maxSelections.replace("{max}",this.config.maxSelections),!0),!1;this.selectedValues.push(T.value),this.selectedIndexes.push(N),function(f){var h,a=this,c=document.createDocumentFragment(),t=this.options[f.idx],r=this.data?this.data[f.idx]:t,e={class:"selectr-tag"},r=(this.customSelected?e.html=this.config.renderSelection(r):e.textContent=t.textContent,Z.createElement("li",e)),e=Z.createElement("button",{class:"selectr-tag-remove",type:"button"});r.appendChild(e),r.idx=f.idx,r.tag=t.value,this.tags.push(r),this.config.sortSelected?(e=this.tags.slice(),h=function(n,s){n.replace(/(\d+)|(\D+)/g,function(o,i,l){s.push([i||1/0,l||""])})},e.sort(function(n,s){var o,i,l=[],d=[];for(a.config.sortSelected===!0?(o=n.tag,i=s.tag):a.config.sortSelected==="text"&&(o=n.textContent,i=s.textContent),h(o,l),h(i,d);l.length&&d.length;){var p=l.shift(),C=d.shift(),p=p[0]-C[0]||p[1].localeCompare(C[1]);if(p)return p}return l.length-d.length}),Z.each(e,function(n,s){c.appendChild(s)}),this.label.innerHTML=""):c.appendChild(r),this.config.taggable?this.label.insertBefore(c,this.input.parentNode):this.label.appendChild(c)}.call(this,A)}else{var y=this.data?this.data[N]:T;this.customSelected?this.label.innerHTML=this.config.renderSelection(y):this.label.textContent=T.textContent,this.selectedValue=T.value,this.selectedIndex=N,Z.each(this.options,function(f,h){var a=this.items[f];f!==N&&(a&&Z.removeClass(a,"selected"),h.selected=!1,h.removeAttribute("selected"))},this)}Z.includes(m,T)||this.el.add(T),A.setAttribute("aria-selected",!0),Z.addClass(A,"selected"),Z.addClass(this.container,"has-selected"),T.selected=!0,T.setAttribute("selected",""),this.emit("selectr.change",T),this.emit("selectr.select",T),"createEvent"in document?((y=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),y.__selfTriggered=!0,this.el.dispatchEvent(y)):this.el.fireEvent("onchange")},P.prototype.deselect=function(N,A){var m=this.items[N],T=this.options[N];if(this.el.multiple){var y=this.selectedIndexes.indexOf(N),y=(this.selectedIndexes.splice(y,1),this.selectedValues.indexOf(T.value));this.selectedValues.splice(y,1),function(f){var h=!1;Z.each(this.tags,function(a,c){c.idx===f.idx&&(h=c)},this),h&&(this.label.removeChild(h),this.tags.splice(this.tags.indexOf(h),1))}.call(this,m),this.tags.length||Z.removeClass(this.container,"has-selected")}else{if(!A&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.innerHTML="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,Z.removeClass(this.container,"has-selected")}this.items[N].setAttribute("aria-selected",!1),Z.removeClass(this.items[N],"selected"),T.selected=!1,T.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",T),"createEvent"in document?((y=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),y.__selfTriggered=!0,this.el.dispatchEvent(y)):this.el.fireEvent("onchange")},P.prototype.setValue=function(N){var A=Array.isArray(N);if(A||(N=N.toString().trim()),!this.el.multiple&&A)return!1;Z.each(this.options,function(m,T){(A&&-1<N.indexOf(T.value)||T.value===N)&&this.change(T.idx)},this)},P.prototype.getValue=function(N,A){var m,T;return this.el.multiple?N?this.selectedIndexes.length&&(T={values:[]},Z.each(this.selectedIndexes,function(y,f){f=this.options[f],T.values[y]={value:f.value,text:f.textContent}},this)):T=this.selectedValues.slice():T=N?{value:(m=this.options[this.selectedIndex]).value,text:m.textContent}:this.selectedValue,T=N&&A?JSON.stringify(T):T},P.prototype.add=function(N,A){if(N){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(N))Z.each(N,function(y,f){this.add(f,A)},this);else if(Object.prototype.toString.call(N)==="[object Object]"){if(A){var m=!1;if(Z.each(this.options,function(y,f){f.value.toLowerCase()===N.value.toLowerCase()&&(m=!0)}),m)return!1}var T=Z.createElement("option",N);return this.data.push(N),this.mobileDevice&&this.el.add(T),this.options.push(T),T.idx=0<this.options.length?this.options.length-1:0,K.call(this,T),N.selected&&this.select(T.idx),this.setPlaceholder(),T}return this.config.pagination&&this.paginate(),!0}},P.prototype.remove=function(N){var A,m=[];Array.isArray(N)?Z.each(N,function(T,y){Z.isInt(y)?m.push(this.getOptionByIndex(y)):typeof y=="string"&&m.push(this.getOptionByValue(y))},this):Z.isInt(N)?m.push(this.getOptionByIndex(N)):typeof N=="string"&&m.push(this.getOptionByValue(N)),m.length&&(Z.each(m,function(T,y){A=y.idx,this.el.remove(y),this.options.splice(A,1),y=this.items[A].parentNode,y&&y.removeChild(this.items[A]),this.items.splice(A,1),Z.each(this.options,function(f,h){h.idx=f,this.items[f].idx=f},this)},this),this.setPlaceholder(),this.config.pagination)&&this.paginate()},P.prototype.removeAll=function(){this.clear(!0),Z.each(this.el.options,function(N,A){this.el.remove(A)},this),Z.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},P.prototype.search=function(N,A){var m,T,y,f,h;if(!this.navigating)return m=!1,N||(N=this.input.value,m=!0,this.removeMessage(),Z.truncate(this.tree)),T=[],y=document.createDocumentFragment(),0<(N=N.trim().toLowerCase()).length?(f=A?Z.startsWith:Z.includes,Z.each(this.options,function(a,c){var t,r,e,n,s=this.items[c.idx];f(c.textContent.trim().toLowerCase(),N)&&!c.disabled?(T.push({text:c.textContent,value:c.value}),m&&(S(s,y,this.customOption),Z.removeClass(s,"excluded"),!this.customOption)&&(t=N,e=(c=c).textContent,t=new RegExp(t,"ig"),n=t.exec(e))&&(c.innerHTML="",(r=document.createElement("span")).classList.add("selectr-match"),r.textContent=n[0],c.appendChild(document.createTextNode(e.substring(0,n.index))),c.appendChild(r),c.appendChild(document.createTextNode(e.substring(t.lastIndex))))):m&&Z.addClass(s,"excluded")},this),m&&(y.childElementCount?(A=this.items[this.navIndex],h=y.querySelector(".selectr-option:not(.excluded)"),this.noResults=!1,Z.removeClass(A,"active"),this.navIndex=h.idx,Z.addClass(h,"active")):this.config.taggable||(this.noResults=!0,this.setMessage(this.config.messages.noResults)),this.tree.appendChild(y))):M.call(this),T},P.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},P.prototype.open=function(){var N=this;if(!this.options.length)return!1;this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(Z.addClass(this.container,"native-open"),this.config.data&&Z.each(this.options,function(A,m){this.el.add(m)},this)):(Z.addClass(this.container,"open"),M.call(this),this.invert(),this.tree.scrollTop=0,Z.removeClass(this.container,"notice"),this.selected.setAttribute("aria-expanded",!0),this.tree.setAttribute("aria-hidden",!1),this.tree.setAttribute("aria-expanded",!0),this.config.searchable&&!this.config.taggable&&setTimeout(function(){N.input.focus(),N.input.tabIndex=0},10))},P.prototype.close=function(){var N;this.opened&&this.emit("selectr.close"),this.opened=!1,this.navigating=!1,this.mobileDevice||this.config.nativeDropdown?Z.removeClass(this.container,"native-open"):(N=Z.hasClass(this.container,"notice"),this.config.searchable&&!N&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),N&&(Z.removeClass(this.container,"notice"),this.notice.textContent=""),Z.removeClass(this.container,"open"),Z.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),Z.truncate(this.tree),z.call(this))},P.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&Z.each(this.tags,function(N,A){A.lastElementChild.tabIndex=0}),Z.removeClass(this.container,"selectr-disabled")},P.prototype.disable=function(N){N||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&Z.each(this.tags,function(A,m){m.lastElementChild.tabIndex=-1}),this.disabled=!0,Z.addClass(this.container,"selectr-disabled")},P.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),Z.each(this.defaultSelected,function(N,A){this.select(A)},this),this.emit("selectr.reset"))},P.prototype.clear=function(N,A){var m;this.el.multiple?this.selectedIndexes.length&&(m=this.selectedIndexes.slice(),A?this.deselect(m.slice(-1)[0]):Z.each(m,function(T,y){this.deselect(y)},this)):-1<this.selectedIndex&&this.deselect(this.selectedIndex,N),this.emit("selectr.clear")},P.prototype.serialise=function(N){var A=[];return Z.each(this.options,function(m,T){var y={value:T.value,text:T.textContent};T.selected&&(y.selected=!0),T.disabled&&(y.disabled=!0),A[m]=y}),N?JSON.stringify(A):A},P.prototype.serialize=function(N){return this.serialise(N)},P.prototype.setPlaceholder=function(N){N=N||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(N=this.config.messages.noOptions),this.placeEl.innerHTML=N},P.prototype.paginate=function(){var N;if(this.items.length)return(N=this).pages=this.items.map(function(A,m){return m%N.config.pagination==0?N.items.slice(m,m+N.config.pagination):null}).filter(function(A){return A}),this.pages},P.prototype.setMessage=function(N,A){A&&this.close(),Z.addClass(this.container,"notice"),this.notice.textContent=N},P.prototype.removeMessage=function(){Z.removeClass(this.container,"notice"),this.notice.innerHTML=""},P.prototype.invert=function(){var N=Z.rect(this.selected),A=this.tree.parentNode.offsetHeight,m=window.innerHeight;N.top+N.height+A>m?(Z.addClass(this.container,"inverted"),this.isInverted=!0):(Z.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=Z.rect(this.tree)},P.prototype.getOptionByIndex=function(N){return this.options[N]},P.prototype.getOptionByValue=function(N){for(var A=!1,m=0,T=this.options.length;m<T;m++)if(this.options[m].value.trim()===N.toString().trim()){A=this.options[m];break}return A},le.exports=P},4188:function(le,g,Z){Z.d(g,{EX:function(){return S},WF:function(){return M},oW:function(){return K},qD:function(){return U}});var U=document.body,S=10485760,M=2e4,K=2147483648},2602:function(le,g,Z){Z.d(g,{w:function(){return S}});var U=Z(9791);function S(M,K,j){var z,P=3<arguments.length&&arguments[3]!==void 0&&arguments[3],N=typeof(m=M).getRootNode=="function"?m.getRootNode():window,A={},m=M.getBoundingClientRect(),T=K.getBoundingClientRect(),y=document.createElement("div");function f(){if(y&&y.parentNode){for(var a in y.parentNode.removeChild(y),A)c=a,Object.prototype.hasOwnProperty.call(A,c)&&((c=A[a])&&(0,U.removeEventListener)(N,a,c),delete A[a]);typeof j=="function"&&j(M)}var c}function h(a){(a=a.target)===y||(0,U.isChildOf)(a,y)||f()}return y.className="jsoneditor-anchor",y.style.position="absolute",y.style.left=m.left-T.left+"px",y.style.top=m.top-T.top+"px",y.style.width=m.width-2+"px",y.style.height=m.height-2+"px",y.style.boxSizing="border-box",K.appendChild(y),A.mousedown=(0,U.addEventListener)(N,"mousedown",h),A.mousewheel=(0,U.addEventListener)(N,"mousewheel",h),P&&(z=null,y.onmouseover=function(){clearTimeout(z),z=null},y.onmouseout=function(){z=z||setTimeout(f,200)}),y.destroy=f,y}},7923:function(le){le.exports="data:application/javascript;base64,Im5vIHVzZSBzdHJpY3QiOwohKGZ1bmN0aW9uKHdpbmRvdykgewppZiAodHlwZW9mIHdpbmRvdy53aW5kb3cgIT0gInVuZGVmaW5lZCIgJiYgd2luZG93LmRvY3VtZW50KQogICAgcmV0dXJuOwppZiAod2luZG93LnJlcXVpcmUgJiYgd2luZG93LmRlZmluZSkKICAgIHJldHVybjsKCmlmICghd2luZG93LmNvbnNvbGUpIHsKICAgIHdpbmRvdy5jb25zb2xlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG1zZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApOwogICAgICAgIHBvc3RNZXNzYWdlKHt0eXBlOiAibG9nIiwgZGF0YTogbXNnc30pOwogICAgfTsKICAgIHdpbmRvdy5jb25zb2xlLmVycm9yID0KICAgIHdpbmRvdy5jb25zb2xlLndhcm4gPSAKICAgIHdpbmRvdy5jb25zb2xlLmxvZyA9CiAgICB3aW5kb3cuY29uc29sZS50cmFjZSA9IHdpbmRvdy5jb25zb2xlOwp9CndpbmRvdy53aW5kb3cgPSB3aW5kb3c7CndpbmRvdy5hY2UgPSB3aW5kb3c7Cgp3aW5kb3cub25lcnJvciA9IGZ1bmN0aW9uKG1lc3NhZ2UsIGZpbGUsIGxpbmUsIGNvbCwgZXJyKSB7CiAgICBwb3N0TWVzc2FnZSh7dHlwZTogImVycm9yIiwgZGF0YTogewogICAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsCiAgICAgICAgZGF0YTogZXJyICYmIGVyci5kYXRhLAogICAgICAgIGZpbGU6IGZpbGUsCiAgICAgICAgbGluZTogbGluZSwgCiAgICAgICAgY29sOiBjb2wsCiAgICAgICAgc3RhY2s6IGVyciAmJiBlcnIuc3RhY2sKICAgIH19KTsKfTsKCndpbmRvdy5ub3JtYWxpemVNb2R1bGUgPSBmdW5jdGlvbihwYXJlbnRJZCwgbW9kdWxlTmFtZSkgewogICAgLy8gbm9ybWFsaXplIHBsdWdpbiByZXF1aXJlcwogICAgaWYgKG1vZHVsZU5hbWUuaW5kZXhPZigiISIpICE9PSAtMSkgewogICAgICAgIHZhciBjaHVua3MgPSBtb2R1bGVOYW1lLnNwbGl0KCIhIik7CiAgICAgICAgcmV0dXJuIHdpbmRvdy5ub3JtYWxpemVNb2R1bGUocGFyZW50SWQsIGNodW5rc1swXSkgKyAiISIgKyB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBjaHVua3NbMV0pOwogICAgfQogICAgLy8gbm9ybWFsaXplIHJlbGF0aXZlIHJlcXVpcmVzCiAgICBpZiAobW9kdWxlTmFtZS5jaGFyQXQoMCkgPT0gIi4iKSB7CiAgICAgICAgdmFyIGJhc2UgPSBwYXJlbnRJZC5zcGxpdCgiLyIpLnNsaWNlKDAsIC0xKS5qb2luKCIvIik7CiAgICAgICAgbW9kdWxlTmFtZSA9IChiYXNlID8gYmFzZSArICIvIiA6ICIiKSArIG1vZHVsZU5hbWU7CiAgICAgICAgCiAgICAgICAgd2hpbGUgKG1vZHVsZU5hbWUuaW5kZXhPZigiLiIpICE9PSAtMSAmJiBwcmV2aW91cyAhPSBtb2R1bGVOYW1lKSB7CiAgICAgICAgICAgIHZhciBwcmV2aW91cyA9IG1vZHVsZU5hbWU7CiAgICAgICAgICAgIG1vZHVsZU5hbWUgPSBtb2R1bGVOYW1lLnJlcGxhY2UoL15cLlwvLywgIiIpLnJlcGxhY2UoL1wvXC5cLy8sICIvIikucmVwbGFjZSgvW15cL10rXC9cLlwuXC8vLCAiIik7CiAgICAgICAgfQogICAgfQogICAgCiAgICByZXR1cm4gbW9kdWxlTmFtZTsKfTsKCndpbmRvdy5yZXF1aXJlID0gZnVuY3Rpb24gcmVxdWlyZShwYXJlbnRJZCwgaWQpIHsKICAgIGlmICghaWQpIHsKICAgICAgICBpZCA9IHBhcmVudElkOwogICAgICAgIHBhcmVudElkID0gbnVsbDsKICAgIH0KICAgIGlmICghaWQuY2hhckF0KQogICAgICAgIHRocm93IG5ldyBFcnJvcigid29ya2VyLmpzIHJlcXVpcmUoKSBhY2NlcHRzIG9ubHkgKHBhcmVudElkLCBpZCkgYXMgYXJndW1lbnRzIik7CgogICAgaWQgPSB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBpZCk7CgogICAgdmFyIG1vZHVsZSA9IHdpbmRvdy5yZXF1aXJlLm1vZHVsZXNbaWRdOwogICAgaWYgKG1vZHVsZSkgewogICAgICAgIGlmICghbW9kdWxlLmluaXRpYWxpemVkKSB7CiAgICAgICAgICAgIG1vZHVsZS5pbml0aWFsaXplZCA9IHRydWU7CiAgICAgICAgICAgIG1vZHVsZS5leHBvcnRzID0gbW9kdWxlLmZhY3RvcnkoKS5leHBvcnRzOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbW9kdWxlLmV4cG9ydHM7CiAgICB9CiAgIAogICAgaWYgKCF3aW5kb3cucmVxdWlyZS50bG5zKQogICAgICAgIHJldHVybiBjb25zb2xlLmxvZygidW5hYmxlIHRvIGxvYWQgIiArIGlkKTsKICAgIAogICAgdmFyIHBhdGggPSByZXNvbHZlTW9kdWxlSWQoaWQsIHdpbmRvdy5yZXF1aXJlLnRsbnMpOwogICAgaWYgKHBhdGguc2xpY2UoLTMpICE9ICIuanMiKSBwYXRoICs9ICIuanMiOwogICAgCiAgICB3aW5kb3cucmVxdWlyZS5pZCA9IGlkOwogICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7fTsgLy8gcHJldmVudCBpbmZpbml0ZSBsb29wIG9uIGJyb2tlbiBtb2R1bGVzCiAgICBpbXBvcnRTY3JpcHRzKHBhdGgpOwogICAgcmV0dXJuIHdpbmRvdy5yZXF1aXJlKHBhcmVudElkLCBpZCk7Cn07CmZ1bmN0aW9uIHJlc29sdmVNb2R1bGVJZChpZCwgcGF0aHMpIHsKICAgIHZhciB0ZXN0UGF0aCA9IGlkLCB0YWlsID0gIiI7CiAgICB3aGlsZSAodGVzdFBhdGgpIHsKICAgICAgICB2YXIgYWxpYXMgPSBwYXRoc1t0ZXN0UGF0aF07CiAgICAgICAgaWYgKHR5cGVvZiBhbGlhcyA9PSAic3RyaW5nIikgewogICAgICAgICAgICByZXR1cm4gYWxpYXMgKyB0YWlsOwogICAgICAgIH0gZWxzZSBpZiAoYWxpYXMpIHsKICAgICAgICAgICAgcmV0dXJuICBhbGlhcy5sb2NhdGlvbi5yZXBsYWNlKC9cLyokLywgIi8iKSArICh0YWlsIHx8IGFsaWFzLm1haW4gfHwgYWxpYXMubmFtZSk7CiAgICAgICAgfSBlbHNlIGlmIChhbGlhcyA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KICAgICAgICB2YXIgaSA9IHRlc3RQYXRoLmxhc3RJbmRleE9mKCIvIik7CiAgICAgICAgaWYgKGkgPT09IC0xKSBicmVhazsKICAgICAgICB0YWlsID0gdGVzdFBhdGguc3Vic3RyKGkpICsgdGFpbDsKICAgICAgICB0ZXN0UGF0aCA9IHRlc3RQYXRoLnNsaWNlKDAsIGkpOwogICAgfQogICAgcmV0dXJuIGlkOwp9CndpbmRvdy5yZXF1aXJlLm1vZHVsZXMgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9OwoKd2luZG93LmRlZmluZSA9IGZ1bmN0aW9uKGlkLCBkZXBzLCBmYWN0b3J5KSB7CiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAyKSB7CiAgICAgICAgZmFjdG9yeSA9IGRlcHM7CiAgICAgICAgaWYgKHR5cGVvZiBpZCAhPSAic3RyaW5nIikgewogICAgICAgICAgICBkZXBzID0gaWQ7CiAgICAgICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICAgICAgfQogICAgfSBlbHNlIGlmIChhcmd1bWVudHMubGVuZ3RoID09IDEpIHsKICAgICAgICBmYWN0b3J5ID0gaWQ7CiAgICAgICAgZGVwcyA9IFtdOwogICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICB9CiAgICAKICAgIGlmICh0eXBlb2YgZmFjdG9yeSAhPSAiZnVuY3Rpb24iKSB7CiAgICAgICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7CiAgICAgICAgICAgIGV4cG9ydHM6IGZhY3RvcnksCiAgICAgICAgICAgIGluaXRpYWxpemVkOiB0cnVlCiAgICAgICAgfTsKICAgICAgICByZXR1cm47CiAgICB9CgogICAgaWYgKCFkZXBzLmxlbmd0aCkKICAgICAgICAvLyBJZiB0aGVyZSBpcyBubyBkZXBlbmRlbmNpZXMsIHdlIGluamVjdCAicmVxdWlyZSIsICJleHBvcnRzIiBhbmQKICAgICAgICAvLyAibW9kdWxlIiBhcyBkZXBlbmRlbmNpZXMsIHRvIHByb3ZpZGUgQ29tbW9uSlMgY29tcGF0aWJpbGl0eS4KICAgICAgICBkZXBzID0gWyJyZXF1aXJlIiwgImV4cG9ydHMiLCAibW9kdWxlIl07CgogICAgdmFyIHJlcSA9IGZ1bmN0aW9uKGNoaWxkSWQpIHsKICAgICAgICByZXR1cm4gd2luZG93LnJlcXVpcmUoaWQsIGNoaWxkSWQpOwogICAgfTsKCiAgICB3aW5kb3cucmVxdWlyZS5tb2R1bGVzW2lkXSA9IHsKICAgICAgICBleHBvcnRzOiB7fSwKICAgICAgICBmYWN0b3J5OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdmFyIG1vZHVsZSA9IHRoaXM7CiAgICAgICAgICAgIHZhciByZXR1cm5FeHBvcnRzID0gZmFjdG9yeS5hcHBseSh0aGlzLCBkZXBzLnNsaWNlKDAsIGZhY3RvcnkubGVuZ3RoKS5tYXAoZnVuY3Rpb24oZGVwKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKGRlcCkgewogICAgICAgICAgICAgICAgICAgIC8vIEJlY2F1c2UgInJlcXVpcmUiLCAiZXhwb3J0cyIgYW5kICJtb2R1bGUiIGFyZW4ndCBhY3R1YWwKICAgICAgICAgICAgICAgICAgICAvLyBkZXBlbmRlbmNpZXMsIHdlIG11c3QgaGFuZGxlIHRoZW0gc2VwZXJhdGVseS4KICAgICAgICAgICAgICAgICAgICBjYXNlICJyZXF1aXJlIjogcmV0dXJuIHJlcTsKICAgICAgICAgICAgICAgICAgICBjYXNlICJleHBvcnRzIjogcmV0dXJuIG1vZHVsZS5leHBvcnRzOwogICAgICAgICAgICAgICAgICAgIGNhc2UgIm1vZHVsZSI6ICByZXR1cm4gbW9kdWxlOwogICAgICAgICAgICAgICAgICAgIC8vIEJ1dCBmb3IgYWxsIG90aGVyIGRlcGVuZGVuY2llcywgd2UgY2FuIGp1c3QgZ28gYWhlYWQgYW5kCiAgICAgICAgICAgICAgICAgICAgLy8gcmVxdWlyZSB0aGVtLgogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICAgICAgICByZXR1cm4gcmVxKGRlcCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgaWYgKHJldHVybkV4cG9ydHMpCiAgICAgICAgICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IHJldHVybkV4cG9ydHM7CiAgICAgICAgICAgIHJldHVybiBtb2R1bGU7CiAgICAgICAgfQogICAgfTsKfTsKd2luZG93LmRlZmluZS5hbWQgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9Owp3aW5kb3cuaW5pdEJhc2VVcmxzICA9IGZ1bmN0aW9uIGluaXRCYXNlVXJscyh0b3BMZXZlbE5hbWVzcGFjZXMpIHsKICAgIGZvciAodmFyIGkgaW4gdG9wTGV2ZWxOYW1lc3BhY2VzKQogICAgICAgIHRoaXMucmVxdWlyZS50bG5zW2ldID0gdG9wTGV2ZWxOYW1lc3BhY2VzW2ldOwp9OwoKd2luZG93LmluaXRTZW5kZXIgPSBmdW5jdGlvbiBpbml0U2VuZGVyKCkgewoKICAgIHZhciBFdmVudEVtaXR0ZXIgPSB3aW5kb3cucmVxdWlyZSgiYWNlL2xpYi9ldmVudF9lbWl0dGVyIikuRXZlbnRFbWl0dGVyOwogICAgdmFyIG9vcCA9IHdpbmRvdy5yZXF1aXJlKCJhY2UvbGliL29vcCIpOwogICAgCiAgICB2YXIgU2VuZGVyID0gZnVuY3Rpb24oKSB7fTsKICAgIAogICAgKGZ1bmN0aW9uKCkgewogICAgICAgIAogICAgICAgIG9vcC5pbXBsZW1lbnQodGhpcywgRXZlbnRFbWl0dGVyKTsKICAgICAgICAgICAgICAgIAogICAgICAgIHRoaXMuY2FsbGJhY2sgPSBmdW5jdGlvbihkYXRhLCBjYWxsYmFja0lkKSB7CiAgICAgICAgICAgIHBvc3RNZXNzYWdlKHsKICAgICAgICAgICAgICAgIHR5cGU6ICJjYWxsIiwKICAgICAgICAgICAgICAgIGlkOiBjYWxsYmFja0lkLAogICAgICAgICAgICAgICAgZGF0YTogZGF0YQogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgCiAgICAgICAgdGhpcy5lbWl0ID0gZnVuY3Rpb24obmFtZSwgZGF0YSkgewogICAgICAgICAgICBwb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICB0eXBlOiAiZXZlbnQiLAogICAgICAgICAgICAgICAgbmFtZTogbmFtZSwKICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICAKICAgIH0pLmNhbGwoU2VuZGVyLnByb3RvdHlwZSk7CiAgICAKICAgIHJldHVybiBuZXcgU2VuZGVyKCk7Cn07Cgp2YXIgbWFpbiA9IHdpbmRvdy5tYWluID0gbnVsbDsKdmFyIHNlbmRlciA9IHdpbmRvdy5zZW5kZXIgPSBudWxsOwoKd2luZG93Lm9ubWVzc2FnZSA9IGZ1bmN0aW9uKGUpIHsKICAgIHZhciBtc2cgPSBlLmRhdGE7CiAgICBpZiAobXNnLmV2ZW50ICYmIHNlbmRlcikgewogICAgICAgIHNlbmRlci5fc2lnbmFsKG1zZy5ldmVudCwgbXNnLmRhdGEpOwogICAgfQogICAgZWxzZSBpZiAobXNnLmNvbW1hbmQpIHsKICAgICAgICBpZiAobWFpblttc2cuY29tbWFuZF0pCiAgICAgICAgICAgIG1haW5bbXNnLmNvbW1hbmRdLmFwcGx5KG1haW4sIG1zZy5hcmdzKTsKICAgICAgICBlbHNlIGlmICh3aW5kb3dbbXNnLmNvbW1hbmRdKQogICAgICAgICAgICB3aW5kb3dbbXNnLmNvbW1hbmRdLmFwcGx5KHdpbmRvdywgbXNnLmFyZ3MpOwogICAgICAgIGVsc2UKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJVbmtub3duIGNvbW1hbmQ6IiArIG1zZy5jb21tYW5kKTsKICAgIH0KICAgIGVsc2UgaWYgKG1zZy5pbml0KSB7CiAgICAgICAgd2luZG93LmluaXRCYXNlVXJscyhtc2cudGxucyk7CiAgICAgICAgc2VuZGVyID0gd2luZG93LnNlbmRlciA9IHdpbmRvdy5pbml0U2VuZGVyKCk7CiAgICAgICAgdmFyIGNsYXp6ID0gdGhpcy5yZXF1aXJlKG1zZy5tb2R1bGUpW21zZy5jbGFzc25hbWVdOwogICAgICAgIG1haW4gPSB3aW5kb3cubWFpbiA9IG5ldyBjbGF6eihzZW5kZXIpOwogICAgfQp9Owp9KSh0aGlzKTsKCmFjZS5kZWZpbmUoImFjZS9saWIvb29wIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CmV4cG9ydHMuaW5oZXJpdHMgPSBmdW5jdGlvbiAoY3Rvciwgc3VwZXJDdG9yKSB7CiAgICBjdG9yLnN1cGVyXyA9IHN1cGVyQ3RvcjsKICAgIGN0b3IucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShzdXBlckN0b3IucHJvdG90eXBlLCB7CiAgICAgICAgY29uc3RydWN0b3I6IHsKICAgICAgICAgICAgdmFsdWU6IGN0b3IsCiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLAogICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSwKICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgfQogICAgfSk7Cn07CmV4cG9ydHMubWl4aW4gPSBmdW5jdGlvbiAob2JqLCBtaXhpbikgewogICAgZm9yICh2YXIga2V5IGluIG1peGluKSB7CiAgICAgICAgb2JqW2tleV0gPSBtaXhpbltrZXldOwogICAgfQogICAgcmV0dXJuIG9iajsKfTsKZXhwb3J0cy5pbXBsZW1lbnQgPSBmdW5jdGlvbiAocHJvdG8sIG1peGluKSB7CiAgICBleHBvcnRzLm1peGluKHByb3RvLCBtaXhpbik7Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9hcHBseV9kZWx0YSIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwpmdW5jdGlvbiB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsIGVycm9yVGV4dCkgewogICAgY29uc29sZS5sb2coIkludmFsaWQgRGVsdGE6IiwgZGVsdGEpOwogICAgdGhyb3cgIkludmFsaWQgRGVsdGE6ICIgKyBlcnJvclRleHQ7Cn0KZnVuY3Rpb24gcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBwb3NpdGlvbikgewogICAgcmV0dXJuIHBvc2l0aW9uLnJvdyA+PSAwICYmIHBvc2l0aW9uLnJvdyA8IGRvY0xpbmVzLmxlbmd0aCAmJgogICAgICAgIHBvc2l0aW9uLmNvbHVtbiA+PSAwICYmIHBvc2l0aW9uLmNvbHVtbiA8PSBkb2NMaW5lc1twb3NpdGlvbi5yb3ddLmxlbmd0aDsKfQpmdW5jdGlvbiB2YWxpZGF0ZURlbHRhKGRvY0xpbmVzLCBkZWx0YSkgewogICAgaWYgKGRlbHRhLmFjdGlvbiAhPSAiaW5zZXJ0IiAmJiBkZWx0YS5hY3Rpb24gIT0gInJlbW92ZSIpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuYWN0aW9uIG11c3QgYmUgJ2luc2VydCcgb3IgJ3JlbW92ZSciKTsKICAgIGlmICghKGRlbHRhLmxpbmVzIGluc3RhbmNlb2YgQXJyYXkpKQogICAgICAgIHRocm93RGVsdGFFcnJvcihkZWx0YSwgImRlbHRhLmxpbmVzIG11c3QgYmUgYW4gQXJyYXkiKTsKICAgIGlmICghZGVsdGEuc3RhcnQgfHwgIWRlbHRhLmVuZCkKICAgICAgICB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsICJkZWx0YS5zdGFydC9lbmQgbXVzdCBiZSBhbiBwcmVzZW50Iik7CiAgICB2YXIgc3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIGlmICghcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBkZWx0YS5zdGFydCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuc3RhcnQgbXVzdCBiZSBjb250YWluZWQgaW4gZG9jdW1lbnQiKTsKICAgIHZhciBlbmQgPSBkZWx0YS5lbmQ7CiAgICBpZiAoZGVsdGEuYWN0aW9uID09ICJyZW1vdmUiICYmICFwb3NpdGlvbkluRG9jdW1lbnQoZG9jTGluZXMsIGVuZCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuZW5kIG11c3QgY29udGFpbmVkIGluIGRvY3VtZW50IGZvciAncmVtb3ZlJyBhY3Rpb25zIik7CiAgICB2YXIgbnVtUmFuZ2VSb3dzID0gZW5kLnJvdyAtIHN0YXJ0LnJvdzsKICAgIHZhciBudW1SYW5nZUxhc3RMaW5lQ2hhcnMgPSAoZW5kLmNvbHVtbiAtIChudW1SYW5nZVJvd3MgPT0gMCA/IHN0YXJ0LmNvbHVtbiA6IDApKTsKICAgIGlmIChudW1SYW5nZVJvd3MgIT0gZGVsdGEubGluZXMubGVuZ3RoIC0gMSB8fCBkZWx0YS5saW5lc1tudW1SYW5nZVJvd3NdLmxlbmd0aCAhPSBudW1SYW5nZUxhc3RMaW5lQ2hhcnMpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEucmFuZ2UgbXVzdCBtYXRjaCBkZWx0YSBsaW5lcyIpOwp9CmV4cG9ydHMuYXBwbHlEZWx0YSA9IGZ1bmN0aW9uIChkb2NMaW5lcywgZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7CiAgICB2YXIgc3RhcnRDb2x1bW4gPSBkZWx0YS5zdGFydC5jb2x1bW47CiAgICB2YXIgbGluZSA9IGRvY0xpbmVzW3Jvd10gfHwgIiI7CiAgICBzd2l0Y2ggKGRlbHRhLmFjdGlvbikgewogICAgICAgIGNhc2UgImluc2VydCI6CiAgICAgICAgICAgIHZhciBsaW5lcyA9IGRlbHRhLmxpbmVzOwogICAgICAgICAgICBpZiAobGluZXMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3ddID0gbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZGVsdGEubGluZXNbMF0gKyBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IFtyb3csIDFdLmNvbmNhdChkZWx0YS5saW5lcyk7CiAgICAgICAgICAgICAgICBkb2NMaW5lcy5zcGxpY2UuYXBwbHkoZG9jTGluZXMsIGFyZ3MpOwogICAgICAgICAgICAgICAgZG9jTGluZXNbcm93XSA9IGxpbmUuc3Vic3RyaW5nKDAsIHN0YXJ0Q29sdW1uKSArIGRvY0xpbmVzW3Jvd107CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3cgKyBkZWx0YS5saW5lcy5sZW5ndGggLSAxXSArPSBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAicmVtb3ZlIjoKICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IGRlbHRhLmVuZC5jb2x1bW47CiAgICAgICAgICAgIHZhciBlbmRSb3cgPSBkZWx0YS5lbmQucm93OwogICAgICAgICAgICBpZiAocm93ID09PSBlbmRSb3cpIHsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBsaW5lLnN1YnN0cmluZyhlbmRDb2x1bW4pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZG9jTGluZXMuc3BsaWNlKHJvdywgZW5kUm93IC0gcm93ICsgMSwgbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbZW5kUm93XS5zdWJzdHJpbmcoZW5kQ29sdW1uKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICB9Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9saWIvZXZlbnRfZW1pdHRlciIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwp2YXIgRXZlbnRFbWl0dGVyID0ge307CnZhciBzdG9wUHJvcGFnYXRpb24gPSBmdW5jdGlvbiAoKSB7IHRoaXMucHJvcGFnYXRpb25TdG9wcGVkID0gdHJ1ZTsgfTsKdmFyIHByZXZlbnREZWZhdWx0ID0gZnVuY3Rpb24gKCkgeyB0aGlzLmRlZmF1bHRQcmV2ZW50ZWQgPSB0cnVlOyB9OwpFdmVudEVtaXR0ZXIuX2VtaXQgPQogICAgRXZlbnRFbWl0dGVyLl9kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50TmFtZSwgZSkgewogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwgKHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB7fSk7CiAgICAgICAgdGhpcy5fZGVmYXVsdEhhbmRsZXJzIHx8ICh0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB7fSk7CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXSB8fCBbXTsKICAgICAgICB2YXIgZGVmYXVsdEhhbmRsZXIgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycy5sZW5ndGggJiYgIWRlZmF1bHRIYW5kbGVyKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKHR5cGVvZiBlICE9ICJvYmplY3QiIHx8ICFlKQogICAgICAgICAgICBlID0ge307CiAgICAgICAgaWYgKCFlLnR5cGUpCiAgICAgICAgICAgIGUudHlwZSA9IGV2ZW50TmFtZTsKICAgICAgICBpZiAoIWUuc3RvcFByb3BhZ2F0aW9uKQogICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbiA9IHN0b3BQcm9wYWdhdGlvbjsKICAgICAgICBpZiAoIWUucHJldmVudERlZmF1bHQpCiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQgPSBwcmV2ZW50RGVmYXVsdDsKICAgICAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3RlbmVycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBsaXN0ZW5lcnNbaV0oZSwgdGhpcyk7CiAgICAgICAgICAgIGlmIChlLnByb3BhZ2F0aW9uU3RvcHBlZCkKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBpZiAoZGVmYXVsdEhhbmRsZXIgJiYgIWUuZGVmYXVsdFByZXZlbnRlZCkKICAgICAgICAgICAgcmV0dXJuIGRlZmF1bHRIYW5kbGVyKGUsIHRoaXMpOwogICAgfTsKRXZlbnRFbWl0dGVyLl9zaWduYWwgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBlKSB7CiAgICB2YXIgbGlzdGVuZXJzID0gKHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge30pW2V2ZW50TmFtZV07CiAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICByZXR1cm47CiAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdGVuZXJzLmxlbmd0aDsgaSsrKQogICAgICAgIGxpc3RlbmVyc1tpXShlLCB0aGlzKTsKfTsKRXZlbnRFbWl0dGVyLm9uY2UgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIF9zZWxmID0gdGhpczsKICAgIHRoaXMub24oZXZlbnROYW1lLCBmdW5jdGlvbiBuZXdDYWxsYmFjaygpIHsKICAgICAgICBfc2VsZi5vZmYoZXZlbnROYW1lLCBuZXdDYWxsYmFjayk7CiAgICAgICAgY2FsbGJhY2suYXBwbHkobnVsbCwgYXJndW1lbnRzKTsKICAgIH0pOwogICAgaWYgKCFjYWxsYmFjaykgewogICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSkgewogICAgICAgICAgICBjYWxsYmFjayA9IHJlc29sdmU7CiAgICAgICAgfSk7CiAgICB9Cn07CkV2ZW50RW1pdHRlci5zZXREZWZhdWx0SGFuZGxlciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICB2YXIgaGFuZGxlcnMgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnM7CiAgICBpZiAoIWhhbmRsZXJzKQogICAgICAgIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzID0geyBfZGlzYWJsZWRfOiB7fSB9OwogICAgaWYgKGhhbmRsZXJzW2V2ZW50TmFtZV0pIHsKICAgICAgICB2YXIgb2xkID0gaGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICAgICAgaWYgKCFkaXNhYmxlZCkKICAgICAgICAgICAgaGFuZGxlcnMuX2Rpc2FibGVkX1tldmVudE5hbWVdID0gZGlzYWJsZWQgPSBbXTsKICAgICAgICBkaXNhYmxlZC5wdXNoKG9sZCk7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQogICAgaGFuZGxlcnNbZXZlbnROYW1lXSA9IGNhbGxiYWNrOwp9OwpFdmVudEVtaXR0ZXIucmVtb3ZlRGVmYXVsdEhhbmRsZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzOwogICAgaWYgKCFoYW5kbGVycykKICAgICAgICByZXR1cm47CiAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICBpZiAoaGFuZGxlcnNbZXZlbnROYW1lXSA9PSBjYWxsYmFjaykgewogICAgICAgIGlmIChkaXNhYmxlZCkKICAgICAgICAgICAgdGhpcy5zZXREZWZhdWx0SGFuZGxlcihldmVudE5hbWUsIGRpc2FibGVkLnBvcCgpKTsKICAgIH0KICAgIGVsc2UgaWYgKGRpc2FibGVkKSB7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQp9OwpFdmVudEVtaXR0ZXIub24gPQogICAgRXZlbnRFbWl0dGVyLmFkZEV2ZW50TGlzdGVuZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaywgY2FwdHVyaW5nKSB7CiAgICAgICAgdGhpcy5fZXZlbnRSZWdpc3RyeSA9IHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge307CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdID0gW107CiAgICAgICAgaWYgKGxpc3RlbmVycy5pbmRleE9mKGNhbGxiYWNrKSA9PSAtMSkKICAgICAgICAgICAgbGlzdGVuZXJzW2NhcHR1cmluZyA/ICJ1bnNoaWZ0IiA6ICJwdXNoIl0oY2FsbGJhY2spOwogICAgICAgIHJldHVybiBjYWxsYmFjazsKICAgIH07CkV2ZW50RW1pdHRlci5vZmYgPQogICAgRXZlbnRFbWl0dGVyLnJlbW92ZUxpc3RlbmVyID0KICAgICAgICBFdmVudEVtaXR0ZXIucmVtb3ZlRXZlbnRMaXN0ZW5lciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5IHx8IHt9OwogICAgICAgICAgICB2YXIgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdOwogICAgICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdmFyIGluZGV4ID0gbGlzdGVuZXJzLmluZGV4T2YoY2FsbGJhY2spOwogICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xKQogICAgICAgICAgICAgICAgbGlzdGVuZXJzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgfTsKRXZlbnRFbWl0dGVyLnJlbW92ZUFsbExpc3RlbmVycyA9IGZ1bmN0aW9uIChldmVudE5hbWUpIHsKICAgIGlmICghZXZlbnROYW1lKQogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZXZlbnRSZWdpc3RyeSkKICAgICAgICB0aGlzLl9ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZGVmYXVsdEhhbmRsZXJzKQogICAgICAgIHRoaXMuX2RlZmF1bHRIYW5kbGVyc1tldmVudE5hbWVdID0gdW5kZWZpbmVkOwp9OwpleHBvcnRzLkV2ZW50RW1pdHRlciA9IEV2ZW50RW1pdHRlcjsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL3JhbmdlIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBjb21wYXJlUG9pbnRzID0gZnVuY3Rpb24gKHAxLCBwMikgewogICAgcmV0dXJuIHAxLnJvdyAtIHAyLnJvdyB8fCBwMS5jb2x1bW4gLSBwMi5jb2x1bW47Cn07CnZhciBSYW5nZSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgIGZ1bmN0aW9uIFJhbmdlKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBlbmRDb2x1bW4pIHsKICAgICAgICB0aGlzLnN0YXJ0ID0gewogICAgICAgICAgICByb3c6IHN0YXJ0Um93LAogICAgICAgICAgICBjb2x1bW46IHN0YXJ0Q29sdW1uCiAgICAgICAgfTsKICAgICAgICB0aGlzLmVuZCA9IHsKICAgICAgICAgICAgcm93OiBlbmRSb3csCiAgICAgICAgICAgIGNvbHVtbjogZW5kQ29sdW1uCiAgICAgICAgfTsKICAgIH0KICAgIFJhbmdlLnByb3RvdHlwZS5pc0VxdWFsID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuc3RhcnQucm93ID09PSByYW5nZS5zdGFydC5yb3cgJiYKICAgICAgICAgICAgdGhpcy5lbmQucm93ID09PSByYW5nZS5lbmQucm93ICYmCiAgICAgICAgICAgIHRoaXMuc3RhcnQuY29sdW1uID09PSByYW5nZS5zdGFydC5jb2x1bW4gJiYKICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uID09PSByYW5nZS5lbmQuY29sdW1uOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS50b1N0cmluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gKCJSYW5nZTogWyIgKyB0aGlzLnN0YXJ0LnJvdyArICIvIiArIHRoaXMuc3RhcnQuY29sdW1uICsKICAgICAgICAgICAgIl0gLT4gWyIgKyB0aGlzLmVuZC5yb3cgKyAiLyIgKyB0aGlzLmVuZC5jb2x1bW4gKyAiXSIpOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb250YWlucyA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDA7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmVSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAsIGVuZCA9IHJhbmdlLmVuZCwgc3RhcnQgPSByYW5nZS5zdGFydDsKICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoZW5kLnJvdywgZW5kLmNvbHVtbik7CiAgICAgICAgaWYgKGNtcCA9PSAxKSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoY21wID09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKSB7CiAgICAgICAgICAgIHJldHVybiAtMjsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDQyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmVQb2ludCA9IGZ1bmN0aW9uIChwKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShwLnJvdywgcC5jb2x1bW4pOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb250YWluc1JhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLnN0YXJ0KSA9PSAwICYmIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLmVuZCkgPT0gMDsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaW50ZXJzZWN0cyA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmVSYW5nZShyYW5nZSk7CiAgICAgICAgcmV0dXJuIChjbXAgPT0gLTEgfHwgY21wID09IDAgfHwgY21wID09IDEpOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5pc0VuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW47CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmlzU3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4gdGhpcy5zdGFydC5yb3cgPT0gcm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09IGNvbHVtbjsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuc2V0U3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93LnJvdzsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93OwogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLnNldEVuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0eXBlb2Ygcm93ID09ICJvYmplY3QiKSB7CiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdy5yb3c7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPSByb3c7CiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmluc2lkZSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNFbmQocm93LCBjb2x1bW4pIHx8IHRoaXMuaXNTdGFydChyb3csIGNvbHVtbikpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaW5zaWRlU3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzRW5kKHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5pbnNpZGVFbmQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzU3RhcnQocm93LCBjb2x1bW4pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmUgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAoIXRoaXMuaXNNdWx0aUxpbmUoKSkgewogICAgICAgICAgICBpZiAocm93ID09PSB0aGlzLnN0YXJ0LnJvdykgewogICAgICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8IHRoaXMuc3RhcnQuY29sdW1uID8gLTEgOiAoY29sdW1uID4gdGhpcy5lbmQuY29sdW1uID8gMSA6IDApOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmIChyb3cgPCB0aGlzLnN0YXJ0LnJvdykKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIGlmIChyb3cgPiB0aGlzLmVuZC5yb3cpCiAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIGlmICh0aGlzLnN0YXJ0LnJvdyA9PT0gcm93KQogICAgICAgICAgICByZXR1cm4gY29sdW1uID49IHRoaXMuc3RhcnQuY29sdW1uID8gMCA6IC0xOwogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT09IHJvdykKICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8PSB0aGlzLmVuZC5jb2x1bW4gPyAwIDogMTsKICAgICAgICByZXR1cm4gMDsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29tcGFyZVN0YXJ0ID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CiAgICAgICAgfQogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb21wYXJlRW5kID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PSByb3cgJiYgdGhpcy5lbmQuY29sdW1uID09IGNvbHVtbikgewogICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29tcGFyZUluc2lkZSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CiAgICAgICAgfQogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jbGlwUm93cyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPiBsYXN0Um93KQogICAgICAgICAgICB2YXIgZW5kID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdykKICAgICAgICAgICAgdmFyIGVuZCA9IHsgcm93OiBmaXJzdFJvdywgY29sdW1uOiAwIH07CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID4gbGFzdFJvdykKICAgICAgICAgICAgdmFyIHN0YXJ0ID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA8IGZpcnN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7IHJvdzogZmlyc3RSb3csIGNvbHVtbjogMCB9OwogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHN0YXJ0IHx8IHRoaXMuc3RhcnQsIGVuZCB8fCB0aGlzLmVuZCk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmV4dGVuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIGlmIChjbXAgPT0gMCkKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7IHJvdzogcm93LCBjb2x1bW46IGNvbHVtbiB9OwogICAgICAgIGVsc2UKICAgICAgICAgICAgdmFyIGVuZCA9IHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH07CiAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHMoc3RhcnQgfHwgdGhpcy5zdGFydCwgZW5kIHx8IHRoaXMuZW5kKTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaXNFbXB0eSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gKHRoaXMuc3RhcnQucm93ID09PSB0aGlzLmVuZC5yb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT09IHRoaXMuZW5kLmNvbHVtbik7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmlzTXVsdGlMaW5lID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiAodGhpcy5zdGFydC5yb3cgIT09IHRoaXMuZW5kLnJvdyk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNsb25lID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHRoaXMuc3RhcnQsIHRoaXMuZW5kKTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29sbGFwc2VSb3dzID0gZnVuY3Rpb24gKCkgewogICAgICAgIGlmICh0aGlzLmVuZC5jb2x1bW4gPT0gMCkKICAgICAgICAgICAgcmV0dXJuIG5ldyBSYW5nZSh0aGlzLnN0YXJ0LnJvdywgMCwgTWF0aC5tYXgodGhpcy5zdGFydC5yb3csIHRoaXMuZW5kLnJvdyAtIDEpLCAwKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2UodGhpcy5zdGFydC5yb3csIDAsIHRoaXMuZW5kLnJvdywgMCk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLnRvU2NyZWVuUmFuZ2UgPSBmdW5jdGlvbiAoc2Vzc2lvbikgewogICAgICAgIHZhciBzY3JlZW5Qb3NTdGFydCA9IHNlc3Npb24uZG9jdW1lbnRUb1NjcmVlblBvc2l0aW9uKHRoaXMuc3RhcnQpOwogICAgICAgIHZhciBzY3JlZW5Qb3NFbmQgPSBzZXNzaW9uLmRvY3VtZW50VG9TY3JlZW5Qb3NpdGlvbih0aGlzLmVuZCk7CiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzY3JlZW5Qb3NTdGFydC5yb3csIHNjcmVlblBvc1N0YXJ0LmNvbHVtbiwgc2NyZWVuUG9zRW5kLnJvdywgc2NyZWVuUG9zRW5kLmNvbHVtbik7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLm1vdmVCeSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHRoaXMuc3RhcnQucm93ICs9IHJvdzsKICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiArPSBjb2x1bW47CiAgICAgICAgdGhpcy5lbmQucm93ICs9IHJvdzsKICAgICAgICB0aGlzLmVuZC5jb2x1bW4gKz0gY29sdW1uOwogICAgfTsKICAgIHJldHVybiBSYW5nZTsKfSgpKTsKUmFuZ2UuZnJvbVBvaW50cyA9IGZ1bmN0aW9uIChzdGFydCwgZW5kKSB7CiAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uLCBlbmQucm93LCBlbmQuY29sdW1uKTsKfTsKUmFuZ2UuY29tcGFyZVBvaW50cyA9IGNvbXBhcmVQb2ludHM7ClJhbmdlLmNvbXBhcmVQb2ludHMgPSBmdW5jdGlvbiAocDEsIHAyKSB7CiAgICByZXR1cm4gcDEucm93IC0gcDIucm93IHx8IHAxLmNvbHVtbiAtIHAyLmNvbHVtbjsKfTsKZXhwb3J0cy5SYW5nZSA9IFJhbmdlOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvYW5jaG9yIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBvb3AgPSByZXF1aXJlKCIuL2xpYi9vb3AiKTsKdmFyIEV2ZW50RW1pdHRlciA9IHJlcXVpcmUoIi4vbGliL2V2ZW50X2VtaXR0ZXIiKS5FdmVudEVtaXR0ZXI7CnZhciBBbmNob3IgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7CiAgICBmdW5jdGlvbiBBbmNob3IoZG9jLCByb3csIGNvbHVtbikgewogICAgICAgIHRoaXMuJG9uQ2hhbmdlID0gdGhpcy5vbkNoYW5nZS5iaW5kKHRoaXMpOwogICAgICAgIHRoaXMuYXR0YWNoKGRvYyk7CiAgICAgICAgaWYgKHR5cGVvZiBjb2x1bW4gPT0gInVuZGVmaW5lZCIpCiAgICAgICAgICAgIHRoaXMuc2V0UG9zaXRpb24ocm93LnJvdywgcm93LmNvbHVtbik7CiAgICAgICAgZWxzZQogICAgICAgICAgICB0aGlzLnNldFBvc2l0aW9uKHJvdywgY29sdW1uKTsKICAgIH0KICAgIEFuY2hvci5wcm90b3R5cGUuZ2V0UG9zaXRpb24gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQodGhpcy5yb3csIHRoaXMuY29sdW1uKTsKICAgIH07CiAgICBBbmNob3IucHJvdG90eXBlLmdldERvY3VtZW50ID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLmRvY3VtZW50OwogICAgfTsKICAgIEFuY2hvci5wcm90b3R5cGUub25DaGFuZ2UgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICBpZiAoZGVsdGEuc3RhcnQucm93ID09IGRlbHRhLmVuZC5yb3cgJiYgZGVsdGEuc3RhcnQucm93ICE9IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKGRlbHRhLnN0YXJ0LnJvdyA+IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIHBvaW50ID0gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHsgcm93OiB0aGlzLnJvdywgY29sdW1uOiB0aGlzLmNvbHVtbiB9LCB0aGlzLiRpbnNlcnRSaWdodCk7CiAgICAgICAgdGhpcy5zZXRQb3NpdGlvbihwb2ludC5yb3csIHBvaW50LmNvbHVtbiwgdHJ1ZSk7CiAgICB9OwogICAgQW5jaG9yLnByb3RvdHlwZS5zZXRQb3NpdGlvbiA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbiwgbm9DbGlwKSB7CiAgICAgICAgdmFyIHBvczsKICAgICAgICBpZiAobm9DbGlwKSB7CiAgICAgICAgICAgIHBvcyA9IHsKICAgICAgICAgICAgICAgIHJvdzogcm93LAogICAgICAgICAgICAgICAgY29sdW1uOiBjb2x1bW4KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBvcyA9IHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5yb3cgPT0gcG9zLnJvdyAmJiB0aGlzLmNvbHVtbiA9PSBwb3MuY29sdW1uKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIG9sZCA9IHsKICAgICAgICAgICAgcm93OiB0aGlzLnJvdywKICAgICAgICAgICAgY29sdW1uOiB0aGlzLmNvbHVtbgogICAgICAgIH07CiAgICAgICAgdGhpcy5yb3cgPSBwb3Mucm93OwogICAgICAgIHRoaXMuY29sdW1uID0gcG9zLmNvbHVtbjsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZSIsIHsKICAgICAgICAgICAgb2xkOiBvbGQsCiAgICAgICAgICAgIHZhbHVlOiBwb3MKICAgICAgICB9KTsKICAgIH07CiAgICBBbmNob3IucHJvdG90eXBlLmRldGFjaCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9mZigiY2hhbmdlIiwgdGhpcy4kb25DaGFuZ2UpOwogICAgfTsKICAgIEFuY2hvci5wcm90b3R5cGUuYXR0YWNoID0gZnVuY3Rpb24gKGRvYykgewogICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2MgfHwgdGhpcy5kb2N1bWVudDsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9uKCJjaGFuZ2UiLCB0aGlzLiRvbkNoYW5nZSk7CiAgICB9OwogICAgQW5jaG9yLnByb3RvdHlwZS4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBwb3MgPSB7fTsKICAgICAgICBpZiAocm93ID49IHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgcG9zLnJvdyA9IE1hdGgubWF4KDAsIHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA8IDApIHsKICAgICAgICAgICAgcG9zLnJvdyA9IDA7CiAgICAgICAgICAgIHBvcy5jb2x1bW4gPSAwOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcG9zLnJvdyA9IHJvdzsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IE1hdGgubWluKHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGgsIE1hdGgubWF4KDAsIGNvbHVtbikpOwogICAgICAgIH0KICAgICAgICBpZiAoY29sdW1uIDwgMCkKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IDA7CiAgICAgICAgcmV0dXJuIHBvczsKICAgIH07CiAgICByZXR1cm4gQW5jaG9yOwp9KCkpOwpBbmNob3IucHJvdG90eXBlLiRpbnNlcnRSaWdodCA9IGZhbHNlOwpvb3AuaW1wbGVtZW50KEFuY2hvci5wcm90b3R5cGUsIEV2ZW50RW1pdHRlcik7CmZ1bmN0aW9uICRwb2ludHNJbk9yZGVyKHBvaW50MSwgcG9pbnQyLCBlcXVhbFBvaW50c0luT3JkZXIpIHsKICAgIHZhciBiQ29sSXNBZnRlciA9IGVxdWFsUG9pbnRzSW5PcmRlciA/IHBvaW50MS5jb2x1bW4gPD0gcG9pbnQyLmNvbHVtbiA6IHBvaW50MS5jb2x1bW4gPCBwb2ludDIuY29sdW1uOwogICAgcmV0dXJuIChwb2ludDEucm93IDwgcG9pbnQyLnJvdykgfHwgKHBvaW50MS5yb3cgPT0gcG9pbnQyLnJvdyAmJiBiQ29sSXNBZnRlcik7Cn0KZnVuY3Rpb24gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHBvaW50LCBtb3ZlSWZFcXVhbCkgewogICAgdmFyIGRlbHRhSXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICB2YXIgZGVsdGFSb3dTaGlmdCA9IChkZWx0YUlzSW5zZXJ0ID8gMSA6IC0xKSAqIChkZWx0YS5lbmQucm93IC0gZGVsdGEuc3RhcnQucm93KTsKICAgIHZhciBkZWx0YUNvbFNoaWZ0ID0gKGRlbHRhSXNJbnNlcnQgPyAxIDogLTEpICogKGRlbHRhLmVuZC5jb2x1bW4gLSBkZWx0YS5zdGFydC5jb2x1bW4pOwogICAgdmFyIGRlbHRhU3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIHZhciBkZWx0YUVuZCA9IGRlbHRhSXNJbnNlcnQgPyBkZWx0YVN0YXJ0IDogZGVsdGEuZW5kOyAvLyBDb2xsYXBzZSBpbnNlcnQgcmFuZ2UuCiAgICBpZiAoJHBvaW50c0luT3JkZXIocG9pbnQsIGRlbHRhU3RhcnQsIG1vdmVJZkVxdWFsKSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHJvdzogcG9pbnQucm93LAogICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbgogICAgICAgIH07CiAgICB9CiAgICBpZiAoJHBvaW50c0luT3JkZXIoZGVsdGFFbmQsIHBvaW50LCAhbW92ZUlmRXF1YWwpKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgcm93OiBwb2ludC5yb3cgKyBkZWx0YVJvd1NoaWZ0LAogICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbiArIChwb2ludC5yb3cgPT0gZGVsdGFFbmQucm93ID8gZGVsdGFDb2xTaGlmdCA6IDApCiAgICAgICAgfTsKICAgIH0KICAgIHJldHVybiB7CiAgICAgICAgcm93OiBkZWx0YVN0YXJ0LnJvdywKICAgICAgICBjb2x1bW46IGRlbHRhU3RhcnQuY29sdW1uCiAgICB9Owp9CmV4cG9ydHMuQW5jaG9yID0gQW5jaG9yOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvZG9jdW1lbnQiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpeyJ1c2Ugc3RyaWN0IjsKdmFyIG9vcCA9IHJlcXVpcmUoIi4vbGliL29vcCIpOwp2YXIgYXBwbHlEZWx0YSA9IHJlcXVpcmUoIi4vYXBwbHlfZGVsdGEiKS5hcHBseURlbHRhOwp2YXIgRXZlbnRFbWl0dGVyID0gcmVxdWlyZSgiLi9saWIvZXZlbnRfZW1pdHRlciIpLkV2ZW50RW1pdHRlcjsKdmFyIFJhbmdlID0gcmVxdWlyZSgiLi9yYW5nZSIpLlJhbmdlOwp2YXIgQW5jaG9yID0gcmVxdWlyZSgiLi9hbmNob3IiKS5BbmNob3I7CnZhciBEb2N1bWVudCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgIGZ1bmN0aW9uIERvY3VtZW50KHRleHRPckxpbmVzKSB7CiAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgICAgIGlmICh0ZXh0T3JMaW5lcy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHRleHRPckxpbmVzKSkgewogICAgICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiAwLCBjb2x1bW46IDAgfSwgdGV4dE9yTGluZXMpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0T3JMaW5lcyk7CiAgICAgICAgfQogICAgfQogICAgRG9jdW1lbnQucHJvdG90eXBlLnNldFZhbHVlID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICB2YXIgbGVuID0gdGhpcy5nZXRMZW5ndGgoKSAtIDE7CiAgICAgICAgdGhpcy5yZW1vdmUobmV3IFJhbmdlKDAsIDAsIGxlbiwgdGhpcy5nZXRMaW5lKGxlbikubGVuZ3RoKSk7CiAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0IHx8ICIiKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0VmFsdWUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0QWxsTGluZXMoKS5qb2luKHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuY3JlYXRlQW5jaG9yID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgcmV0dXJuIG5ldyBBbmNob3IodGhpcywgcm93LCBjb2x1bW4pOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kZGV0ZWN0TmV3TGluZSA9IGZ1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgdmFyIG1hdGNoID0gdGV4dC5tYXRjaCgvXi4qPyhcclxufFxyfFxuKS9tKTsKICAgICAgICB0aGlzLiRhdXRvTmV3TGluZSA9IG1hdGNoID8gbWF0Y2hbMV0gOiAiXG4iOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlTmV3TGluZU1vZGUiKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0TmV3TGluZUNoYXJhY3RlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuJG5ld0xpbmVNb2RlKSB7CiAgICAgICAgICAgIGNhc2UgIndpbmRvd3MiOgogICAgICAgICAgICAgICAgcmV0dXJuICJcclxuIjsKICAgICAgICAgICAgY2FzZSAidW5peCI6CiAgICAgICAgICAgICAgICByZXR1cm4gIlxuIjsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiRhdXRvTmV3TGluZSB8fCAiXG4iOwogICAgICAgIH0KICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuc2V0TmV3TGluZU1vZGUgPSBmdW5jdGlvbiAobmV3TGluZU1vZGUpIHsKICAgICAgICBpZiAodGhpcy4kbmV3TGluZU1vZGUgPT09IG5ld0xpbmVNb2RlKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdGhpcy4kbmV3TGluZU1vZGUgPSBuZXdMaW5lTW9kZTsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZU5ld0xpbmVNb2RlIik7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmdldE5ld0xpbmVNb2RlID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLiRuZXdMaW5lTW9kZTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaXNOZXdMaW5lID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICByZXR1cm4gKHRleHQgPT0gIlxyXG4iIHx8IHRleHQgPT0gIlxyIiB8fCB0ZXh0ID09ICJcbiIpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lID0gZnVuY3Rpb24gKHJvdykgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lc1tyb3ddIHx8ICIiOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lcyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lcy5zbGljZShmaXJzdFJvdywgbGFzdFJvdyArIDEpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRBbGxMaW5lcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lcygwLCB0aGlzLmdldExlbmd0aCgpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0TGVuZ3RoID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lcy5sZW5ndGg7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmdldFRleHRSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHJldHVybiB0aGlzLmdldExpbmVzRm9yUmFuZ2UocmFuZ2UpLmpvaW4odGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lc0ZvclJhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgdmFyIGxpbmVzOwogICAgICAgIGlmIChyYW5nZS5zdGFydC5yb3cgPT09IHJhbmdlLmVuZC5yb3cpIHsKICAgICAgICAgICAgbGluZXMgPSBbdGhpcy5nZXRMaW5lKHJhbmdlLnN0YXJ0LnJvdykuc3Vic3RyaW5nKHJhbmdlLnN0YXJ0LmNvbHVtbiwgcmFuZ2UuZW5kLmNvbHVtbildOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgbGluZXMgPSB0aGlzLmdldExpbmVzKHJhbmdlLnN0YXJ0LnJvdywgcmFuZ2UuZW5kLnJvdyk7CiAgICAgICAgICAgIGxpbmVzWzBdID0gKGxpbmVzWzBdIHx8ICIiKS5zdWJzdHJpbmcocmFuZ2Uuc3RhcnQuY29sdW1uKTsKICAgICAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSAxOwogICAgICAgICAgICBpZiAocmFuZ2UuZW5kLnJvdyAtIHJhbmdlLnN0YXJ0LnJvdyA9PSBsKQogICAgICAgICAgICAgICAgbGluZXNbbF0gPSBsaW5lc1tsXS5zdWJzdHJpbmcoMCwgcmFuZ2UuZW5kLmNvbHVtbik7CiAgICAgICAgfQogICAgICAgIHJldHVybiBsaW5lczsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0TGluZXMgPSBmdW5jdGlvbiAocm93LCBsaW5lcykgewogICAgICAgIGNvbnNvbGUud2FybigiVXNlIG9mIGRvY3VtZW50Lmluc2VydExpbmVzIGlzIGRlcHJlY2F0ZWQuIFVzZSB0aGUgaW5zZXJ0RnVsbExpbmVzIG1ldGhvZCBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydEZ1bGxMaW5lcyhyb3csIGxpbmVzKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlTGluZXMgPSBmdW5jdGlvbiAoZmlyc3RSb3csIGxhc3RSb3cpIHsKICAgICAgICBjb25zb2xlLndhcm4oIlVzZSBvZiBkb2N1bWVudC5yZW1vdmVMaW5lcyBpcyBkZXByZWNhdGVkLiBVc2UgdGhlIHJlbW92ZUZ1bGxMaW5lcyBtZXRob2QgaW5zdGVhZC4iKTsKICAgICAgICByZXR1cm4gdGhpcy5yZW1vdmVGdWxsTGluZXMoZmlyc3RSb3csIGxhc3RSb3cpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5pbnNlcnROZXdMaW5lID0gZnVuY3Rpb24gKHBvc2l0aW9uKSB7CiAgICAgICAgY29uc29sZS53YXJuKCJVc2Ugb2YgZG9jdW1lbnQuaW5zZXJ0TmV3TGluZSBpcyBkZXByZWNhdGVkLiBVc2UgaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIFsnJywgJyddKSBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydE1lcmdlZExpbmVzKHBvc2l0aW9uLCBbIiIsICIiXSk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmluc2VydCA9IGZ1bmN0aW9uIChwb3NpdGlvbiwgdGV4dCkgewogICAgICAgIGlmICh0aGlzLmdldExlbmd0aCgpIDw9IDEpCiAgICAgICAgICAgIHRoaXMuJGRldGVjdE5ld0xpbmUodGV4dCk7CiAgICAgICAgcmV0dXJuIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIHRoaXMuJHNwbGl0KHRleHQpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0SW5MaW5lID0gZnVuY3Rpb24gKHBvc2l0aW9uLCB0ZXh0KSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5wb3MocG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4gKyB0ZXh0Lmxlbmd0aCk7CiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAogICAgICAgICAgICBlbmQ6IGVuZCwKICAgICAgICAgICAgYWN0aW9uOiAiaW5zZXJ0IiwKICAgICAgICAgICAgbGluZXM6IFt0ZXh0XQogICAgICAgIH0sIHRydWUpOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmNsaXBwZWRQb3MgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICB2YXIgbGVuZ3RoID0gdGhpcy5nZXRMZW5ndGgoKTsKICAgICAgICBpZiAocm93ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgcm93ID0gbGVuZ3RoOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChyb3cgPCAwKSB7CiAgICAgICAgICAgIHJvdyA9IDA7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA+PSBsZW5ndGgpIHsKICAgICAgICAgICAgcm93ID0gbGVuZ3RoIC0gMTsKICAgICAgICAgICAgY29sdW1uID0gdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICB2YXIgbGluZSA9IHRoaXMuZ2V0TGluZShyb3cpOwogICAgICAgIGlmIChjb2x1bW4gPT0gdW5kZWZpbmVkKQogICAgICAgICAgICBjb2x1bW4gPSBsaW5lLmxlbmd0aDsKICAgICAgICBjb2x1bW4gPSBNYXRoLm1pbihNYXRoLm1heChjb2x1bW4sIDApLCBsaW5lLmxlbmd0aCk7CiAgICAgICAgcmV0dXJuIHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH07CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmNsb25lUG9zID0gZnVuY3Rpb24gKHBvcykgewogICAgICAgIHJldHVybiB7IHJvdzogcG9zLnJvdywgY29sdW1uOiBwb3MuY29sdW1uIH07CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnBvcyA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB7IHJvdzogcm93LCBjb2x1bW46IGNvbHVtbiB9OwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kY2xpcFBvc2l0aW9uID0gZnVuY3Rpb24gKHBvc2l0aW9uKSB7CiAgICAgICAgdmFyIGxlbmd0aCA9IHRoaXMuZ2V0TGVuZ3RoKCk7CiAgICAgICAgaWYgKHBvc2l0aW9uLnJvdyA+PSBsZW5ndGgpIHsKICAgICAgICAgICAgcG9zaXRpb24ucm93ID0gTWF0aC5tYXgoMCwgbGVuZ3RoIC0gMSk7CiAgICAgICAgICAgIHBvc2l0aW9uLmNvbHVtbiA9IHRoaXMuZ2V0TGluZShsZW5ndGggLSAxKS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBwb3NpdGlvbi5yb3cgPSBNYXRoLm1heCgwLCBwb3NpdGlvbi5yb3cpOwogICAgICAgICAgICBwb3NpdGlvbi5jb2x1bW4gPSBNYXRoLm1pbihNYXRoLm1heChwb3NpdGlvbi5jb2x1bW4sIDApLCB0aGlzLmdldExpbmUocG9zaXRpb24ucm93KS5sZW5ndGgpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcG9zaXRpb247CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmluc2VydEZ1bGxMaW5lcyA9IGZ1bmN0aW9uIChyb3csIGxpbmVzKSB7CiAgICAgICAgcm93ID0gTWF0aC5taW4oTWF0aC5tYXgocm93LCAwKSwgdGhpcy5nZXRMZW5ndGgoKSk7CiAgICAgICAgdmFyIGNvbHVtbiA9IDA7CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgbGluZXMgPSBsaW5lcy5jb25jYXQoWyIiXSk7CiAgICAgICAgICAgIGNvbHVtbiA9IDA7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBsaW5lcyA9IFsiIl0uY29uY2F0KGxpbmVzKTsKICAgICAgICAgICAgcm93LS07CiAgICAgICAgICAgIGNvbHVtbiA9IHRoaXMuJGxpbmVzW3Jvd10ubGVuZ3RoOwogICAgICAgIH0KICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH0sIGxpbmVzKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0TWVyZ2VkTGluZXMgPSBmdW5jdGlvbiAocG9zaXRpb24sIGxpbmVzKSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gewogICAgICAgICAgICByb3c6IHN0YXJ0LnJvdyArIGxpbmVzLmxlbmd0aCAtIDEsCiAgICAgICAgICAgIGNvbHVtbjogKGxpbmVzLmxlbmd0aCA9PSAxID8gc3RhcnQuY29sdW1uIDogMCkgKyBsaW5lc1tsaW5lcy5sZW5ndGggLSAxXS5sZW5ndGgKICAgICAgICB9OwogICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKICAgICAgICAgICAgZW5kOiBlbmQsCiAgICAgICAgICAgIGFjdGlvbjogImluc2VydCIsCiAgICAgICAgICAgIGxpbmVzOiBsaW5lcwogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyYW5nZS5zdGFydC5yb3csIHJhbmdlLnN0YXJ0LmNvbHVtbik7CiAgICAgICAgdmFyIGVuZCA9IHRoaXMuY2xpcHBlZFBvcyhyYW5nZS5lbmQucm93LCByYW5nZS5lbmQuY29sdW1uKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHsgc3RhcnQ6IHN0YXJ0LCBlbmQ6IGVuZCB9KQogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlSW5MaW5lID0gZnVuY3Rpb24gKHJvdywgc3RhcnRDb2x1bW4sIGVuZENvbHVtbikgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyb3csIHN0YXJ0Q29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJvdywgZW5kQ29sdW1uKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHsgc3RhcnQ6IHN0YXJ0LCBlbmQ6IGVuZCB9KQogICAgICAgIH0sIHRydWUpOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlRnVsbExpbmVzID0gZnVuY3Rpb24gKGZpcnN0Um93LCBsYXN0Um93KSB7CiAgICAgICAgZmlyc3RSb3cgPSBNYXRoLm1pbihNYXRoLm1heCgwLCBmaXJzdFJvdyksIHRoaXMuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICBsYXN0Um93ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgbGFzdFJvdyksIHRoaXMuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICB2YXIgZGVsZXRlRmlyc3ROZXdMaW5lID0gbGFzdFJvdyA9PSB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiBmaXJzdFJvdyA+IDA7CiAgICAgICAgdmFyIGRlbGV0ZUxhc3ROZXdMaW5lID0gbGFzdFJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkgLSAxOwogICAgICAgIHZhciBzdGFydFJvdyA9IChkZWxldGVGaXJzdE5ld0xpbmUgPyBmaXJzdFJvdyAtIDEgOiBmaXJzdFJvdyk7CiAgICAgICAgdmFyIHN0YXJ0Q29sID0gKGRlbGV0ZUZpcnN0TmV3TGluZSA/IHRoaXMuZ2V0TGluZShzdGFydFJvdykubGVuZ3RoIDogMCk7CiAgICAgICAgdmFyIGVuZFJvdyA9IChkZWxldGVMYXN0TmV3TGluZSA/IGxhc3RSb3cgKyAxIDogbGFzdFJvdyk7CiAgICAgICAgdmFyIGVuZENvbCA9IChkZWxldGVMYXN0TmV3TGluZSA/IDAgOiB0aGlzLmdldExpbmUoZW5kUm93KS5sZW5ndGgpOwogICAgICAgIHZhciByYW5nZSA9IG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2wsIGVuZFJvdywgZW5kQ29sKTsKICAgICAgICB2YXIgZGVsZXRlZExpbmVzID0gdGhpcy4kbGluZXMuc2xpY2UoZmlyc3RSb3csIGxhc3RSb3cgKyAxKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogcmFuZ2Uuc3RhcnQsCiAgICAgICAgICAgIGVuZDogcmFuZ2UuZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHJhbmdlKQogICAgICAgIH0pOwogICAgICAgIHJldHVybiBkZWxldGVkTGluZXM7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJlbW92ZU5ld0xpbmUgPSBmdW5jdGlvbiAocm93KSB7CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkgLSAxICYmIHJvdyA+PSAwKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93LCB0aGlzLmdldExpbmUocm93KS5sZW5ndGgpLAogICAgICAgICAgICAgICAgZW5kOiB0aGlzLnBvcyhyb3cgKyAxLCAwKSwKICAgICAgICAgICAgICAgIGFjdGlvbjogInJlbW92ZSIsCiAgICAgICAgICAgICAgICBsaW5lczogWyIiLCAiIl0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5yZXBsYWNlID0gZnVuY3Rpb24gKHJhbmdlLCB0ZXh0KSB7CiAgICAgICAgaWYgKCEocmFuZ2UgaW5zdGFuY2VvZiBSYW5nZSkpCiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhyYW5nZS5zdGFydCwgcmFuZ2UuZW5kKTsKICAgICAgICBpZiAodGV4dC5sZW5ndGggPT09IDAgJiYgcmFuZ2UuaXNFbXB0eSgpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2Uuc3RhcnQ7CiAgICAgICAgaWYgKHRleHQgPT0gdGhpcy5nZXRUZXh0UmFuZ2UocmFuZ2UpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2UuZW5kOwogICAgICAgIHRoaXMucmVtb3ZlKHJhbmdlKTsKICAgICAgICB2YXIgZW5kOwogICAgICAgIGlmICh0ZXh0KSB7CiAgICAgICAgICAgIGVuZCA9IHRoaXMuaW5zZXJ0KHJhbmdlLnN0YXJ0LCB0ZXh0KTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGVuZCA9IHJhbmdlLnN0YXJ0OwogICAgICAgIH0KICAgICAgICByZXR1cm4gZW5kOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5hcHBseURlbHRhcyA9IGZ1bmN0aW9uIChkZWx0YXMpIHsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRlbHRhcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICB0aGlzLmFwcGx5RGVsdGEoZGVsdGFzW2ldKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJldmVydERlbHRhcyA9IGZ1bmN0aW9uIChkZWx0YXMpIHsKICAgICAgICBmb3IgKHZhciBpID0gZGVsdGFzLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7CiAgICAgICAgICAgIHRoaXMucmV2ZXJ0RGVsdGEoZGVsdGFzW2ldKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmFwcGx5RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgICAgICB2YXIgaXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICAgICAgaWYgKGlzSW5zZXJ0ID8gZGVsdGEubGluZXMubGVuZ3RoIDw9IDEgJiYgIWRlbHRhLmxpbmVzWzBdCiAgICAgICAgICAgIDogIVJhbmdlLmNvbXBhcmVQb2ludHMoZGVsdGEuc3RhcnQsIGRlbHRhLmVuZCkpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZiAoaXNJbnNlcnQgJiYgZGVsdGEubGluZXMubGVuZ3RoID4gMjAwMDApIHsKICAgICAgICAgICAgdGhpcy4kc3BsaXRBbmRhcHBseUxhcmdlRGVsdGEoZGVsdGEsIDIwMDAwKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGFwcGx5RGVsdGEodGhpcy4kbGluZXMsIGRlbHRhLCBkb05vdFZhbGlkYXRlKTsKICAgICAgICAgICAgdGhpcy5fc2lnbmFsKCJjaGFuZ2UiLCBkZWx0YSk7CiAgICAgICAgfQogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kc2FmZUFwcGx5RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICB2YXIgZG9jTGVuZ3RoID0gdGhpcy4kbGluZXMubGVuZ3RoOwogICAgICAgIGlmIChkZWx0YS5hY3Rpb24gPT0gInJlbW92ZSIgJiYgZGVsdGEuc3RhcnQucm93IDwgZG9jTGVuZ3RoICYmIGRlbHRhLmVuZC5yb3cgPCBkb2NMZW5ndGgKICAgICAgICAgICAgfHwgZGVsdGEuYWN0aW9uID09ICJpbnNlcnQiICYmIGRlbHRhLnN0YXJ0LnJvdyA8PSBkb2NMZW5ndGgpIHsKICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLiRzcGxpdEFuZGFwcGx5TGFyZ2VEZWx0YSA9IGZ1bmN0aW9uIChkZWx0YSwgTUFYKSB7CiAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7CiAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSBNQVggKyAxOwogICAgICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7CiAgICAgICAgdmFyIGNvbHVtbiA9IGRlbHRhLnN0YXJ0LmNvbHVtbjsKICAgICAgICBmb3IgKHZhciBmcm9tID0gMCwgdG8gPSAwOyBmcm9tIDwgbDsgZnJvbSA9IHRvKSB7CiAgICAgICAgICAgIHRvICs9IE1BWCAtIDE7CiAgICAgICAgICAgIHZhciBjaHVuayA9IGxpbmVzLnNsaWNlKGZyb20sIHRvKTsKICAgICAgICAgICAgY2h1bmsucHVzaCgiIik7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93ICsgZnJvbSwgY29sdW1uKSwKICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgdG8sIGNvbHVtbiA9IDApLAogICAgICAgICAgICAgICAgYWN0aW9uOiBkZWx0YS5hY3Rpb24sCiAgICAgICAgICAgICAgICBsaW5lczogY2h1bmsKICAgICAgICAgICAgfSwgdHJ1ZSk7CiAgICAgICAgfQogICAgICAgIGRlbHRhLmxpbmVzID0gbGluZXMuc2xpY2UoZnJvbSk7CiAgICAgICAgZGVsdGEuc3RhcnQucm93ID0gcm93ICsgZnJvbTsKICAgICAgICBkZWx0YS5zdGFydC5jb2x1bW4gPSBjb2x1bW47CiAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhLCB0cnVlKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmV2ZXJ0RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICB0aGlzLiRzYWZlQXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiB0aGlzLmNsb25lUG9zKGRlbHRhLnN0YXJ0KSwKICAgICAgICAgICAgZW5kOiB0aGlzLmNsb25lUG9zKGRlbHRhLmVuZCksCiAgICAgICAgICAgIGFjdGlvbjogKGRlbHRhLmFjdGlvbiA9PSAiaW5zZXJ0IiA/ICJyZW1vdmUiIDogImluc2VydCIpLAogICAgICAgICAgICBsaW5lczogZGVsdGEubGluZXMuc2xpY2UoKQogICAgICAgIH0pOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5pbmRleFRvUG9zaXRpb24gPSBmdW5jdGlvbiAoaW5kZXgsIHN0YXJ0Um93KSB7CiAgICAgICAgdmFyIGxpbmVzID0gdGhpcy4kbGluZXMgfHwgdGhpcy5nZXRBbGxMaW5lcygpOwogICAgICAgIHZhciBuZXdsaW5lTGVuZ3RoID0gdGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkubGVuZ3RoOwogICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdyB8fCAwLCBsID0gbGluZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgICAgIGluZGV4IC09IGxpbmVzW2ldLmxlbmd0aCArIG5ld2xpbmVMZW5ndGg7CiAgICAgICAgICAgIGlmIChpbmRleCA8IDApCiAgICAgICAgICAgICAgICByZXR1cm4geyByb3c6IGksIGNvbHVtbjogaW5kZXggKyBsaW5lc1tpXS5sZW5ndGggKyBuZXdsaW5lTGVuZ3RoIH07CiAgICAgICAgfQogICAgICAgIHJldHVybiB7IHJvdzogbCAtIDEsIGNvbHVtbjogaW5kZXggKyBsaW5lc1tsIC0gMV0ubGVuZ3RoICsgbmV3bGluZUxlbmd0aCB9OwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5wb3NpdGlvblRvSW5kZXggPSBmdW5jdGlvbiAocG9zLCBzdGFydFJvdykgewogICAgICAgIHZhciBsaW5lcyA9IHRoaXMuJGxpbmVzIHx8IHRoaXMuZ2V0QWxsTGluZXMoKTsKICAgICAgICB2YXIgbmV3bGluZUxlbmd0aCA9IHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpLmxlbmd0aDsKICAgICAgICB2YXIgaW5kZXggPSAwOwogICAgICAgIHZhciByb3cgPSBNYXRoLm1pbihwb3Mucm93LCBsaW5lcy5sZW5ndGgpOwogICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdyB8fCAwOyBpIDwgcm93OyArK2kpCiAgICAgICAgICAgIGluZGV4ICs9IGxpbmVzW2ldLmxlbmd0aCArIG5ld2xpbmVMZW5ndGg7CiAgICAgICAgcmV0dXJuIGluZGV4ICsgcG9zLmNvbHVtbjsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuJHNwbGl0ID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICByZXR1cm4gdGV4dC5zcGxpdCgvXHJcbnxccnxcbi8pOwogICAgfTsKICAgIHJldHVybiBEb2N1bWVudDsKfSgpKTsKRG9jdW1lbnQucHJvdG90eXBlLiRhdXRvTmV3TGluZSA9ICIiOwpEb2N1bWVudC5wcm90b3R5cGUuJG5ld0xpbmVNb2RlID0gImF1dG8iOwpvb3AuaW1wbGVtZW50KERvY3VtZW50LnByb3RvdHlwZSwgRXZlbnRFbWl0dGVyKTsKZXhwb3J0cy5Eb2N1bWVudCA9IERvY3VtZW50OwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvbGliL2xhbmciLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpeyJ1c2Ugc3RyaWN0IjsKZXhwb3J0cy5sYXN0ID0gZnVuY3Rpb24gKGEpIHsKICAgIHJldHVybiBhW2EubGVuZ3RoIC0gMV07Cn07CmV4cG9ydHMuc3RyaW5nUmV2ZXJzZSA9IGZ1bmN0aW9uIChzdHJpbmcpIHsKICAgIHJldHVybiBzdHJpbmcuc3BsaXQoIiIpLnJldmVyc2UoKS5qb2luKCIiKTsKfTsKZXhwb3J0cy5zdHJpbmdSZXBlYXQgPSBmdW5jdGlvbiAoc3RyaW5nLCBjb3VudCkgewogICAgdmFyIHJlc3VsdCA9ICcnOwogICAgd2hpbGUgKGNvdW50ID4gMCkgewogICAgICAgIGlmIChjb3VudCAmIDEpCiAgICAgICAgICAgIHJlc3VsdCArPSBzdHJpbmc7CiAgICAgICAgaWYgKGNvdW50ID4+PSAxKQogICAgICAgICAgICBzdHJpbmcgKz0gc3RyaW5nOwogICAgfQogICAgcmV0dXJuIHJlc3VsdDsKfTsKdmFyIHRyaW1CZWdpblJlZ2V4cCA9IC9eXHNccyovOwp2YXIgdHJpbUVuZFJlZ2V4cCA9IC9cc1xzKiQvOwpleHBvcnRzLnN0cmluZ1RyaW1MZWZ0ID0gZnVuY3Rpb24gKHN0cmluZykgewogICAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKHRyaW1CZWdpblJlZ2V4cCwgJycpOwp9OwpleHBvcnRzLnN0cmluZ1RyaW1SaWdodCA9IGZ1bmN0aW9uIChzdHJpbmcpIHsKICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSh0cmltRW5kUmVnZXhwLCAnJyk7Cn07CmV4cG9ydHMuY29weU9iamVjdCA9IGZ1bmN0aW9uIChvYmopIHsKICAgIHZhciBjb3B5ID0ge307CiAgICBmb3IgKHZhciBrZXkgaW4gb2JqKSB7CiAgICAgICAgY29weVtrZXldID0gb2JqW2tleV07CiAgICB9CiAgICByZXR1cm4gY29weTsKfTsKZXhwb3J0cy5jb3B5QXJyYXkgPSBmdW5jdGlvbiAoYXJyYXkpIHsKICAgIHZhciBjb3B5ID0gW107CiAgICBmb3IgKHZhciBpID0gMCwgbCA9IGFycmF5Lmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgIGlmIChhcnJheVtpXSAmJiB0eXBlb2YgYXJyYXlbaV0gPT0gIm9iamVjdCIpCiAgICAgICAgICAgIGNvcHlbaV0gPSB0aGlzLmNvcHlPYmplY3QoYXJyYXlbaV0pOwogICAgICAgIGVsc2UKICAgICAgICAgICAgY29weVtpXSA9IGFycmF5W2ldOwogICAgfQogICAgcmV0dXJuIGNvcHk7Cn07CmV4cG9ydHMuZGVlcENvcHkgPSBmdW5jdGlvbiBkZWVwQ29weShvYmopIHsKICAgIGlmICh0eXBlb2Ygb2JqICE9PSAib2JqZWN0IiB8fCAhb2JqKQogICAgICAgIHJldHVybiBvYmo7CiAgICB2YXIgY29weTsKICAgIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHsKICAgICAgICBjb3B5ID0gW107CiAgICAgICAgZm9yICh2YXIga2V5ID0gMDsga2V5IDwgb2JqLmxlbmd0aDsga2V5KyspIHsKICAgICAgICAgICAgY29weVtrZXldID0gZGVlcENvcHkob2JqW2tleV0pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY29weTsKICAgIH0KICAgIGlmIChPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwob2JqKSAhPT0gIltvYmplY3QgT2JqZWN0XSIpCiAgICAgICAgcmV0dXJuIG9iajsKICAgIGNvcHkgPSB7fTsKICAgIGZvciAodmFyIGtleSBpbiBvYmopCiAgICAgICAgY29weVtrZXldID0gZGVlcENvcHkob2JqW2tleV0pOwogICAgcmV0dXJuIGNvcHk7Cn07CmV4cG9ydHMuYXJyYXlUb01hcCA9IGZ1bmN0aW9uIChhcnIpIHsKICAgIHZhciBtYXAgPSB7fTsKICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgbWFwW2FycltpXV0gPSAxOwogICAgfQogICAgcmV0dXJuIG1hcDsKfTsKZXhwb3J0cy5jcmVhdGVNYXAgPSBmdW5jdGlvbiAocHJvcHMpIHsKICAgIHZhciBtYXAgPSBPYmplY3QuY3JlYXRlKG51bGwpOwogICAgZm9yICh2YXIgaSBpbiBwcm9wcykgewogICAgICAgIG1hcFtpXSA9IHByb3BzW2ldOwogICAgfQogICAgcmV0dXJuIG1hcDsKfTsKZXhwb3J0cy5hcnJheVJlbW92ZSA9IGZ1bmN0aW9uIChhcnJheSwgdmFsdWUpIHsKICAgIGZvciAodmFyIGkgPSAwOyBpIDw9IGFycmF5Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgaWYgKHZhbHVlID09PSBhcnJheVtpXSkgewogICAgICAgICAgICBhcnJheS5zcGxpY2UoaSwgMSk7CiAgICAgICAgfQogICAgfQp9OwpleHBvcnRzLmVzY2FwZVJlZ0V4cCA9IGZ1bmN0aW9uIChzdHIpIHsKICAgIHJldHVybiBzdHIucmVwbGFjZSgvKFsuKis/XiR7fSgpfFtcXVwvXFxdKS9nLCAnXFwkMScpOwp9OwpleHBvcnRzLmVzY2FwZUhUTUwgPSBmdW5jdGlvbiAoc3RyKSB7CiAgICByZXR1cm4gKCIiICsgc3RyKS5yZXBsYWNlKC8mL2csICImIzM4OyIpLnJlcGxhY2UoLyIvZywgIiYjMzQ7IikucmVwbGFjZSgvJy9nLCAiJiMzOTsiKS5yZXBsYWNlKC88L2csICImIzYwOyIpOwp9OwpleHBvcnRzLmdldE1hdGNoT2Zmc2V0cyA9IGZ1bmN0aW9uIChzdHJpbmcsIHJlZ0V4cCkgewogICAgdmFyIG1hdGNoZXMgPSBbXTsKICAgIHN0cmluZy5yZXBsYWNlKHJlZ0V4cCwgZnVuY3Rpb24gKHN0cikgewogICAgICAgIG1hdGNoZXMucHVzaCh7CiAgICAgICAgICAgIG9mZnNldDogYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAyXSwKICAgICAgICAgICAgbGVuZ3RoOiBzdHIubGVuZ3RoCiAgICAgICAgfSk7CiAgICB9KTsKICAgIHJldHVybiBtYXRjaGVzOwp9OwpleHBvcnRzLmRlZmVycmVkQ2FsbCA9IGZ1bmN0aW9uIChmY24pIHsKICAgIHZhciB0aW1lciA9IG51bGw7CiAgICB2YXIgY2FsbGJhY2sgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgdGltZXIgPSBudWxsOwogICAgICAgIGZjbigpOwogICAgfTsKICAgIHZhciBkZWZlcnJlZCA9IGZ1bmN0aW9uICh0aW1lb3V0KSB7CiAgICAgICAgZGVmZXJyZWQuY2FuY2VsKCk7CiAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGNhbGxiYWNrLCB0aW1lb3V0IHx8IDApOwogICAgICAgIHJldHVybiBkZWZlcnJlZDsKICAgIH07CiAgICBkZWZlcnJlZC5zY2hlZHVsZSA9IGRlZmVycmVkOwogICAgZGVmZXJyZWQuY2FsbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmNhbmNlbCgpOwogICAgICAgIGZjbigpOwogICAgICAgIHJldHVybiBkZWZlcnJlZDsKICAgIH07CiAgICBkZWZlcnJlZC5jYW5jZWwgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVyKTsKICAgICAgICB0aW1lciA9IG51bGw7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKICAgIGRlZmVycmVkLmlzUGVuZGluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGltZXI7CiAgICB9OwogICAgcmV0dXJuIGRlZmVycmVkOwp9OwpleHBvcnRzLmRlbGF5ZWRDYWxsID0gZnVuY3Rpb24gKGZjbiwgZGVmYXVsdFRpbWVvdXQpIHsKICAgIHZhciB0aW1lciA9IG51bGw7CiAgICB2YXIgY2FsbGJhY2sgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgdGltZXIgPSBudWxsOwogICAgICAgIGZjbigpOwogICAgfTsKICAgIHZhciBfc2VsZiA9IGZ1bmN0aW9uICh0aW1lb3V0KSB7CiAgICAgICAgaWYgKHRpbWVyID09IG51bGwpCiAgICAgICAgICAgIHRpbWVyID0gc2V0VGltZW91dChjYWxsYmFjaywgdGltZW91dCB8fCBkZWZhdWx0VGltZW91dCk7CiAgICB9OwogICAgX3NlbGYuZGVsYXkgPSBmdW5jdGlvbiAodGltZW91dCkgewogICAgICAgIHRpbWVyICYmIGNsZWFyVGltZW91dCh0aW1lcik7CiAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGNhbGxiYWNrLCB0aW1lb3V0IHx8IGRlZmF1bHRUaW1lb3V0KTsKICAgIH07CiAgICBfc2VsZi5zY2hlZHVsZSA9IF9zZWxmOwogICAgX3NlbGYuY2FsbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmNhbmNlbCgpOwogICAgICAgIGZjbigpOwogICAgfTsKICAgIF9zZWxmLmNhbmNlbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aW1lciAmJiBjbGVhclRpbWVvdXQodGltZXIpOwogICAgICAgIHRpbWVyID0gbnVsbDsKICAgIH07CiAgICBfc2VsZi5pc1BlbmRpbmcgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRpbWVyOwogICAgfTsKICAgIHJldHVybiBfc2VsZjsKfTsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL3dvcmtlci9taXJyb3IiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKdmFyIERvY3VtZW50ID0gcmVxdWlyZSgiLi4vZG9jdW1lbnQiKS5Eb2N1bWVudDsKdmFyIGxhbmcgPSByZXF1aXJlKCIuLi9saWIvbGFuZyIpOwogICAgCnZhciBNaXJyb3IgPSBleHBvcnRzLk1pcnJvciA9IGZ1bmN0aW9uKHNlbmRlcikgewogICAgdGhpcy5zZW5kZXIgPSBzZW5kZXI7CiAgICB2YXIgZG9jID0gdGhpcy5kb2MgPSBuZXcgRG9jdW1lbnQoIiIpOwogICAgCiAgICB2YXIgZGVmZXJyZWRVcGRhdGUgPSB0aGlzLmRlZmVycmVkVXBkYXRlID0gbGFuZy5kZWxheWVkQ2FsbCh0aGlzLm9uVXBkYXRlLmJpbmQodGhpcykpOwogICAgCiAgICB2YXIgX3NlbGYgPSB0aGlzOwogICAgc2VuZGVyLm9uKCJjaGFuZ2UiLCBmdW5jdGlvbihlKSB7CiAgICAgICAgdmFyIGRhdGEgPSBlLmRhdGE7CiAgICAgICAgaWYgKGRhdGFbMF0uc3RhcnQpIHsKICAgICAgICAgICAgZG9jLmFwcGx5RGVsdGFzKGRhdGEpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkgKz0gMikgewogICAgICAgICAgICAgICAgdmFyIGQsIGVycjsgCiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShkYXRhW2krMV0pKSB7CiAgICAgICAgICAgICAgICAgICAgZCA9IHthY3Rpb246ICJpbnNlcnQiLCBzdGFydDogZGF0YVtpXSwgbGluZXM6IGRhdGFbaSsxXX07CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIGQgPSB7YWN0aW9uOiAicmVtb3ZlIiwgc3RhcnQ6IGRhdGFbaV0sIGVuZDogZGF0YVtpKzFdfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgaWYgKChkLmFjdGlvbiA9PSAiaW5zZXJ0IiA/IGQuc3RhcnQgOiBkLmVuZCkucm93ID49IGRvYy4kbGluZXMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgZXJyID0gbmV3IEVycm9yKCJJbnZhbGlkIGRlbHRhIik7CiAgICAgICAgICAgICAgICAgICAgZXJyLmRhdGEgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGg6IF9zZWxmLiRwYXRoLAogICAgICAgICAgICAgICAgICAgICAgICBsaW5lc0xlbmd0aDogZG9jLiRsaW5lcy5sZW5ndGgsCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0OiBkLnN0YXJ0LAogICAgICAgICAgICAgICAgICAgICAgICBlbmQ6IGQuZW5kCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnI7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZG9jLmFwcGx5RGVsdGEoZCwgdHJ1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKF9zZWxmLiR0aW1lb3V0KQogICAgICAgICAgICByZXR1cm4gZGVmZXJyZWRVcGRhdGUuc2NoZWR1bGUoX3NlbGYuJHRpbWVvdXQpOwogICAgICAgIF9zZWxmLm9uVXBkYXRlKCk7CiAgICB9KTsKfTsKCihmdW5jdGlvbigpIHsKICAgIAogICAgdGhpcy4kdGltZW91dCA9IDUwMDsKICAgIAogICAgdGhpcy5zZXRUaW1lb3V0ID0gZnVuY3Rpb24odGltZW91dCkgewogICAgICAgIHRoaXMuJHRpbWVvdXQgPSB0aW1lb3V0OwogICAgfTsKICAgIAogICAgdGhpcy5zZXRWYWx1ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgdGhpcy5kb2Muc2V0VmFsdWUodmFsdWUpOwogICAgICAgIHRoaXMuZGVmZXJyZWRVcGRhdGUuc2NoZWR1bGUodGhpcy4kdGltZW91dCk7CiAgICB9OwogICAgCiAgICB0aGlzLmdldFZhbHVlID0gZnVuY3Rpb24oY2FsbGJhY2tJZCkgewogICAgICAgIHRoaXMuc2VuZGVyLmNhbGxiYWNrKHRoaXMuZG9jLmdldFZhbHVlKCksIGNhbGxiYWNrSWQpOwogICAgfTsKICAgIAogICAgdGhpcy5vblVwZGF0ZSA9IGZ1bmN0aW9uKCkgewogICAgfTsKICAgIAogICAgdGhpcy5pc1BlbmRpbmcgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gdGhpcy5kZWZlcnJlZFVwZGF0ZS5pc1BlbmRpbmcoKTsKICAgIH07CiAgICAKfSkuY2FsbChNaXJyb3IucHJvdG90eXBlKTsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL21vZGUvanNvbi9qc29uX3BhcnNlIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCiAgICB2YXIgYXQsICAgICAvLyBUaGUgaW5kZXggb2YgdGhlIGN1cnJlbnQgY2hhcmFjdGVyCiAgICAgICAgY2gsICAgICAvLyBUaGUgY3VycmVudCBjaGFyYWN0ZXIKICAgICAgICBlc2NhcGVlID0gewogICAgICAgICAgICAnIic6ICAnIicsCiAgICAgICAgICAgICdcXCc6ICdcXCcsCiAgICAgICAgICAgICcvJzogICcvJywKICAgICAgICAgICAgYjogICAgJ1xiJywKICAgICAgICAgICAgZjogICAgJ1xmJywKICAgICAgICAgICAgbjogICAgJ1xuJywKICAgICAgICAgICAgcjogICAgJ1xyJywKICAgICAgICAgICAgdDogICAgJ1x0JwogICAgICAgIH0sCiAgICAgICAgdGV4dCwKCiAgICAgICAgZXJyb3IgPSBmdW5jdGlvbiAobSkgewoKICAgICAgICAgICAgdGhyb3cgewogICAgICAgICAgICAgICAgbmFtZTogICAgJ1N5bnRheEVycm9yJywKICAgICAgICAgICAgICAgIG1lc3NhZ2U6IG0sCiAgICAgICAgICAgICAgICBhdDogICAgICBhdCwKICAgICAgICAgICAgICAgIHRleHQ6ICAgIHRleHQKICAgICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBuZXh0ID0gZnVuY3Rpb24gKGMpIHsKCiAgICAgICAgICAgIGlmIChjICYmIGMgIT09IGNoKSB7CiAgICAgICAgICAgICAgICBlcnJvcigiRXhwZWN0ZWQgJyIgKyBjICsgIicgaW5zdGVhZCBvZiAnIiArIGNoICsgIiciKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY2ggPSB0ZXh0LmNoYXJBdChhdCk7CiAgICAgICAgICAgIGF0ICs9IDE7CiAgICAgICAgICAgIHJldHVybiBjaDsKICAgICAgICB9LAoKICAgICAgICBudW1iZXIgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB2YXIgbnVtYmVyLAogICAgICAgICAgICAgICAgc3RyaW5nID0gJyc7CgogICAgICAgICAgICBpZiAoY2ggPT09ICctJykgewogICAgICAgICAgICAgICAgc3RyaW5nID0gJy0nOwogICAgICAgICAgICAgICAgbmV4dCgnLScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHdoaWxlIChjaCA+PSAnMCcgJiYgY2ggPD0gJzknKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoID09PSAnLicpIHsKICAgICAgICAgICAgICAgIHN0cmluZyArPSAnLic7CiAgICAgICAgICAgICAgICB3aGlsZSAobmV4dCgpICYmIGNoID49ICcwJyAmJiBjaCA8PSAnOScpIHsKICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoID09PSAnZScgfHwgY2ggPT09ICdFJykgewogICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgbmV4dCgpOwogICAgICAgICAgICAgICAgaWYgKGNoID09PSAnLScgfHwgY2ggPT09ICcrJykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB3aGlsZSAoY2ggPj0gJzAnICYmIGNoIDw9ICc5JykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbnVtYmVyID0gK3N0cmluZzsKICAgICAgICAgICAgaWYgKGlzTmFOKG51bWJlcikpIHsKICAgICAgICAgICAgICAgIGVycm9yKCJCYWQgbnVtYmVyIik7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyOwogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgc3RyaW5nID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGhleCwKICAgICAgICAgICAgICAgIGksCiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnJywKICAgICAgICAgICAgICAgIHVmZmZmOwoKICAgICAgICAgICAgaWYgKGNoID09PSAnIicpIHsKICAgICAgICAgICAgICAgIHdoaWxlIChuZXh0KCkpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICciJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdHJpbmc7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ1xcJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ3UnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZmZmZiA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgNDsgaSArPSAxKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGV4ID0gcGFyc2VJbnQobmV4dCgpLCAxNik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0Zpbml0ZShoZXgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZmZmZiA9IHVmZmZmICogMTYgKyBoZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gU3RyaW5nLmZyb21DaGFyQ29kZSh1ZmZmZik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGVzY2FwZWVbY2hdID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGVzY2FwZWVbY2hdOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09ICJcbiIgfHwgY2ggPT0gIlxyIikgewogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJCYWQgc3RyaW5nIik7CiAgICAgICAgfSwKCiAgICAgICAgd2hpdGUgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB3aGlsZSAoY2ggJiYgY2ggPD0gJyAnKSB7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICB3b3JkID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgc3dpdGNoIChjaCkgewogICAgICAgICAgICBjYXNlICd0JzoKICAgICAgICAgICAgICAgIG5leHQoJ3QnKTsKICAgICAgICAgICAgICAgIG5leHQoJ3InKTsKICAgICAgICAgICAgICAgIG5leHQoJ3UnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2UnKTsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICBjYXNlICdmJzoKICAgICAgICAgICAgICAgIG5leHQoJ2YnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2EnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIG5leHQoJ3MnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2UnKTsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgY2FzZSAnbic6CiAgICAgICAgICAgICAgICBuZXh0KCduJyk7CiAgICAgICAgICAgICAgICBuZXh0KCd1Jyk7CiAgICAgICAgICAgICAgICBuZXh0KCdsJyk7CiAgICAgICAgICAgICAgICBuZXh0KCdsJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvcigiVW5leHBlY3RlZCAnIiArIGNoICsgIiciKTsKICAgICAgICB9LAoKICAgICAgICB2YWx1ZSwgIC8vIFBsYWNlIGhvbGRlciBmb3IgdGhlIHZhbHVlIGZ1bmN0aW9uLgoKICAgICAgICBhcnJheSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBhcnJheSA9IFtdOwoKICAgICAgICAgICAgaWYgKGNoID09PSAnWycpIHsKICAgICAgICAgICAgICAgIG5leHQoJ1snKTsKICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykgewogICAgICAgICAgICAgICAgICAgIG5leHQoJ10nKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXJyYXk7ICAgLy8gZW1wdHkgYXJyYXkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCkgewogICAgICAgICAgICAgICAgICAgIGFycmF5LnB1c2godmFsdWUoKSk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCddJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJheTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnLCcpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBhcnJheSIpOwogICAgICAgIH0sCgogICAgICAgIG9iamVjdCA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBrZXksCiAgICAgICAgICAgICAgICBvYmplY3QgPSB7fTsKCiAgICAgICAgICAgIGlmIChjaCA9PT0gJ3snKSB7CiAgICAgICAgICAgICAgICBuZXh0KCd7Jyk7CiAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgaWYgKGNoID09PSAnfScpIHsKICAgICAgICAgICAgICAgICAgICBuZXh0KCd9Jyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsgICAvLyBlbXB0eSBvYmplY3QKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCkgewogICAgICAgICAgICAgICAgICAgIGtleSA9IHN0cmluZygpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnOicpOwogICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IoJ0R1cGxpY2F0ZSBrZXkgIicgKyBrZXkgKyAnIicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBvYmplY3Rba2V5XSA9IHZhbHVlKCk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd9JykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCd9Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmplY3Q7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIG5leHQoJywnKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJCYWQgb2JqZWN0Iik7CiAgICAgICAgfTsKCiAgICB2YWx1ZSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgd2hpdGUoKTsKICAgICAgICBzd2l0Y2ggKGNoKSB7CiAgICAgICAgY2FzZSAneyc6CiAgICAgICAgICAgIHJldHVybiBvYmplY3QoKTsKICAgICAgICBjYXNlICdbJzoKICAgICAgICAgICAgcmV0dXJuIGFycmF5KCk7CiAgICAgICAgY2FzZSAnIic6CiAgICAgICAgICAgIHJldHVybiBzdHJpbmcoKTsKICAgICAgICBjYXNlICctJzoKICAgICAgICAgICAgcmV0dXJuIG51bWJlcigpOwogICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgIHJldHVybiBjaCA+PSAnMCcgJiYgY2ggPD0gJzknID8gbnVtYmVyKCkgOiB3b3JkKCk7CiAgICAgICAgfQogICAgfTsKCiAgICByZXR1cm4gZnVuY3Rpb24gKHNvdXJjZSwgcmV2aXZlcikgewogICAgICAgIHZhciByZXN1bHQ7CgogICAgICAgIHRleHQgPSBzb3VyY2U7CiAgICAgICAgYXQgPSAwOwogICAgICAgIGNoID0gJyAnOwogICAgICAgIHJlc3VsdCA9IHZhbHVlKCk7CiAgICAgICAgd2hpdGUoKTsKICAgICAgICBpZiAoY2gpIHsKICAgICAgICAgICAgZXJyb3IoIlN5bnRheCBlcnJvciIpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHR5cGVvZiByZXZpdmVyID09PSAnZnVuY3Rpb24nID8gZnVuY3Rpb24gd2Fsayhob2xkZXIsIGtleSkgewogICAgICAgICAgICB2YXIgaywgdiwgdmFsdWUgPSBob2xkZXJba2V5XTsKICAgICAgICAgICAgaWYgKHZhbHVlICYmIHR5cGVvZiB2YWx1ZSA9PT0gJ29iamVjdCcpIHsKICAgICAgICAgICAgICAgIGZvciAoayBpbiB2YWx1ZSkgewogICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbCh2YWx1ZSwgaykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdiA9IHdhbGsodmFsdWUsIGspOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodiAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZVtrXSA9IHY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdmFsdWVba107CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJldml2ZXIuY2FsbChob2xkZXIsIGtleSwgdmFsdWUpOwogICAgICAgIH0oeycnOiByZXN1bHR9LCAnJykgOiByZXN1bHQ7CiAgICB9Owp9KTsKCmFjZS5kZWZpbmUoImFjZS9tb2RlL2pzb25fd29ya2VyIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCnZhciBvb3AgPSByZXF1aXJlKCIuLi9saWIvb29wIik7CnZhciBNaXJyb3IgPSByZXF1aXJlKCIuLi93b3JrZXIvbWlycm9yIikuTWlycm9yOwp2YXIgcGFyc2UgPSByZXF1aXJlKCIuL2pzb24vanNvbl9wYXJzZSIpOwoKdmFyIEpzb25Xb3JrZXIgPSBleHBvcnRzLkpzb25Xb3JrZXIgPSBmdW5jdGlvbihzZW5kZXIpIHsKICAgIE1pcnJvci5jYWxsKHRoaXMsIHNlbmRlcik7CiAgICB0aGlzLnNldFRpbWVvdXQoMjAwKTsKfTsKCm9vcC5pbmhlcml0cyhKc29uV29ya2VyLCBNaXJyb3IpOwoKKGZ1bmN0aW9uKCkgewoKICAgIHRoaXMub25VcGRhdGUgPSBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdmFsdWUgPSB0aGlzLmRvYy5nZXRWYWx1ZSgpOwogICAgICAgIHZhciBlcnJvcnMgPSBbXTsKICAgICAgICB0cnkgewogICAgICAgICAgICBpZiAodmFsdWUpCiAgICAgICAgICAgICAgICBwYXJzZSh2YWx1ZSk7CiAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICB2YXIgcG9zID0gdGhpcy5kb2MuaW5kZXhUb1Bvc2l0aW9uKGUuYXQtMSk7CiAgICAgICAgICAgIGVycm9ycy5wdXNoKHsKICAgICAgICAgICAgICAgIHJvdzogcG9zLnJvdywKICAgICAgICAgICAgICAgIGNvbHVtbjogcG9zLmNvbHVtbiwKICAgICAgICAgICAgICAgIHRleHQ6IGUubWVzc2FnZSwKICAgICAgICAgICAgICAgIHR5cGU6ICJlcnJvciIKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIHRoaXMuc2VuZGVyLmVtaXQoImFubm90YXRlIiwgZXJyb3JzKTsKICAgIH07Cgp9KS5jYWxsKEpzb25Xb3JrZXIucHJvdG90eXBlKTsKCn0pOwo="},7907:function(le,g,Z){Z.d(g,{Iu:function(){return N},cC:function(){return P},m0:function(){return z}}),Z(4987);var U={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",cannotParseFieldError:"Cannot parse field into JSON",cannotParseValueError:"Cannot parse value into JSON",collapseAll:"Collapse all fields",compactTitle:"Compact JSON data, remove all whitespaces (Ctrl+Shift+I)",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",duplicateFieldError:"Duplicate field name",empty:"empty",expandAll:"Expand all fields",expandTitle:`Click to expand/collapse this field (Ctrl+E).
Ctrl+Click to expand/collapse including all childs.`,formatTitle:"Format JSON data, with proper indentation and line feeds (Ctrl+I)",insert:"Insert",insertTitle:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",insertSub:"Select the type of the field to be inserted",object:"Object",ok:"Ok",redo:"Redo (Ctrl+Shift+Z)",removeText:"Remove",removeTitle:"Remove selected fields (Ctrl+Del)",removeField:"Remove this field (Ctrl+Del)",repairTitle:"Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",searchTitle:"Search fields and values",searchNextResultTitle:"Next result (Enter)",searchPreviousResultTitle:"Previous result (Shift + Enter)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",extract:"Extract",extractTitle:"Extract this ${type}",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+Click or Ctrl+Enter to open url in new window",undo:"Undo last action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Field type "object". An object contains an unordered set of key/value pairs.',arrayType:'Field type "array". An array contains an ordered collection of values.',stringType:'Field type "string". Field type is not determined from the value, but always returned as string.',modeEditorTitle:"Switch Editor Mode",modeCodeText:"Code",modeCodeTitle:"Switch to code highlighter",modeFormText:"Form",modeFormTitle:"Switch to form editor",modeTextText:"Text",modeTextTitle:"Switch to plain text editor",modeTreeText:"Tree",modeTreeTitle:"Switch to tree editor",modeViewText:"View",modeViewTitle:"Switch to tree view",modePreviewText:"Preview",modePreviewTitle:"Switch to preview mode",examples:"Examples",default:"Default",containsInvalidProperties:"Contains invalid properties",containsInvalidItems:"Contains invalid items"},es:{array:"Matriz",auto:"Auto",appendText:"Agregar",appendTitle:"Agregue un nuevo campo con el tipo 'auto' despu\xE9s de este campo (Ctrl + Shift + Ins)",appendSubmenuTitle:"Seleccione el tipo de campo que se agregar\xE1",appendTitleAuto:"Agregue un nuevo campo con el tipo 'auto' (Ctrl + Shift + Ins)",ascending:"Ascendente",ascendingTitle:"Ordene los elementos secundarios de este ${type} en orden ascendente",actionsMenu:"Haga clic para abrir el men\xFA de acciones (Ctrl + M)",cannotParseFieldError:"No se puede parsear el campo en JSON",cannotParseValueError:"No se puede parsear el valor en JSON",collapseAll:"Contraer todos los campos",compactTitle:"Compactar datos JSON, eliminar todos los espacios en blanco (Ctrl + Shift + I)",descending:"Descendente",descendingTitle:"Ordene los hijos de este ${type} en orden descendente",drag:"Arrastre para mover este campo (Alt + May\xFAs + Flechas)",duplicateKey:"llave duplicada",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos seleccionados (Ctrl + D)",duplicateField:"Duplicar este campo (Ctrl + D)",duplicateFieldError:"Nombre de campo duplicado",empty:"vacio",expandAll:"Expandir todos los campos",expandTitle:`Haga clic para expandir/contraer este campo (Ctrl + E).
Ctrl+Clic para expandir/contraer incluyendo todos los ni\xF1os.`,formatTitle:"Formatee los datos JSON, con la sangr\xEDa y los avances de l\xEDnea adecuados (Ctrl + I)",insert:"Insertar",insertTitle:"Inserte un nuevo campo con el tipo 'auto' antes de este campo (Ctrl + Ins)",insertSub:"Seleccione el tipo de campo a insertar",object:"Objeto",ok:"Ok",redo:"Rehacer (Ctrl+May\xFAs+Z)",removeText:"Eliminar",removeTitle:"Eliminar campos seleccionados (Ctrl+Supr)",removeField:"Eliminar este campo (Ctrl+Supr)",repairTitle:"Reparar JSON: corrija comillas y caracteres de escape, elimine comentarios y notaci\xF3n JSONP, convierta objetos JavaScript en JSON.",searchTitle:"Campos de b\xFAsqueda y valores",searchNextResultTitle:"Siguiente resultado (Entrar)",searchPreviousResultTitle:"Resultado anterior (Shift + Enter)",selectNode:"Seleccione un nodo...",showAll:"mostrar todo",showMore:"mostrar m\xE1s",showMoreStatus:"mostrando ${visibleChilds} de ${totalChilds} elementos.",sort:"Ordenar",sortTitle:"Ordene los hijos de este ${type}",sortTitleShort:"Ordenar contenidos",sortFieldLabel:"Campo:",sortDirectionLabel:"Direcci\xF3n:",sortFieldTitle:"Seleccione el campo anidado por el cual ordenar la matriz u objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar el campo seleccionado en orden ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar por el campo seleccionado, en orden descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar o transformar los hijos de este ${type}",transformTitleShort:"Filtrar, ordenar o transformar contenidos",extract:"Extraer",extractTitle:"Extrae este ${type}",transformQueryTitle:"Ingrese una consulta JMESPath",transformWizardLabel:"Wizard",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Seleccione un campo",transformQueryLabel:"Consulta",transformPreviewLabel:"Vista Previa",type:"Tipo",typeTitle:"Cambiar el tipo de campo",openUrl:"Ctrl+Click o Ctrl+Enter para abrir la URL en una nueva ventana",undo:"Deshacer la \xFAltima acci\xF3n (Ctrl+Z)",validationCannotMove:"No se puede mover un campo a un hijo de s\xED mismo.",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Tipo de campo "objeto". Un objeto contiene un conjunto desordenado de pares clave/valor.',arrayType:'Tipo de campo "matriz". Una matriz contiene una colecci\xF3n ordenada de valores.',stringType:'Tipo de campo "cadena". El tipo de campo no se determina a partir del valor, pero siempre se devuelve como una cadena.',modeEditorTitle:"Cambiar modo de editor",modeCodeText:"Codigo",modeCodeTitle:"Cambiar al resaltador de c\xF3digo",modeFormText:"Formulario",modeFormTitle:"Cambiar al editor de formularios",modeTextText:"Texto",modeTextTitle:"Cambiar al editor de texto sin formato",modeTreeText:"Arbol",modeTreeTitle:"Cambiar al editor de \xE1rbol",modeViewText:"Vista",modeViewTitle:"Cambiar a la vista de \xE1rbol",modePreviewText:"Vista Previa",modePreviewTitle:"Cambiar al modo de vista previa",examples:"Ejemplos",default:"Predeterminado",containsInvalidProperties:"Contiene propiedades no validas",containsInvalidItems:"Contiene items no validos"},"zh-CN":{array:"\u6570\u7EC4",auto:"\u81EA\u52A8",appendText:"\u8FFD\u52A0",appendTitle:"\u5728\u6B64\u5B57\u6BB5\u540E\u8FFD\u52A0\u4E00\u4E2A\u7C7B\u578B\u4E3A\u201Cauto\u201D\u7684\u65B0\u5B57\u6BB5 (Ctrl+Shift+Ins)",appendSubmenuTitle:"\u9009\u62E9\u8981\u8FFD\u52A0\u7684\u5B57\u6BB5\u7C7B\u578B",appendTitleAuto:"\u8FFD\u52A0\u7C7B\u578B\u4E3A\u201Cauto\u201D\u7684\u65B0\u5B57\u6BB5 (Ctrl+Shift+Ins)",ascending:"\u5347\u5E8F",ascendingTitle:"\u5347\u5E8F\u6392\u5217${type}\u7684\u5B50\u8282\u70B9",actionsMenu:"\u70B9\u51FB\u6253\u5F00\u52A8\u4F5C\u83DC\u5355(Ctrl+M)",cannotParseFieldError:"\u65E0\u6CD5\u5C06\u5B57\u6BB5\u89E3\u6790\u4E3AJSON",cannotParseValueError:"\u65E0\u6CD5\u5C06\u503C\u89E3\u6790\u4E3AJSON",collapseAll:"\u7F29\u8FDB\u6240\u6709\u5B57\u6BB5",compactTitle:"\u538B\u7F29JSON\u6570\u636E\uFF0C\u5220\u9664\u6240\u6709\u7A7A\u683C (Ctrl+Shift+I)",descending:"\u964D\u5E8F",descendingTitle:"\u964D\u5E8F\u6392\u5217${type}\u7684\u5B50\u8282\u70B9",drag:"\u62D6\u62FD\u79FB\u52A8\u8BE5\u8282\u70B9(Alt+Shift+Arrows)",duplicateKey:"\u91CD\u590D\u952E",duplicateText:"\u590D\u5236",duplicateTitle:"\u590D\u5236\u9009\u4E2D\u5B57\u6BB5(Ctrl+D)",duplicateField:"\u590D\u5236\u8BE5\u5B57\u6BB5(Ctrl+D)",duplicateFieldError:"\u91CD\u590D\u7684\u5B57\u6BB5\u540D\u79F0",empty:"\u6E05\u7A7A",expandAll:"\u5C55\u5F00\u6240\u6709\u5B57\u6BB5",expandTitle:`\u70B9\u51FB \u5C55\u5F00/\u6536\u7F29 \u8BE5\u5B57\u6BB5(Ctrl+E).
Ctrl+Click \u5C55\u5F00/\u6536\u7F29 \u5305\u542B\u6240\u6709\u5B50\u8282\u70B9.`,formatTitle:"\u4F7F\u7528\u9002\u5F53\u7684\u7F29\u8FDB\u548C\u6362\u884C\u7B26\u683C\u5F0F\u5316JSON\u6570\u636E (Ctrl+I)",insert:"\u63D2\u5165",insertTitle:"\u5728\u6B64\u5B57\u6BB5\u524D\u63D2\u5165\u7C7B\u578B\u4E3A\u201Cauto\u201D\u7684\u65B0\u5B57\u6BB5 (Ctrl+Ins)",insertSub:"\u9009\u62E9\u8981\u63D2\u5165\u7684\u5B57\u6BB5\u7C7B\u578B",object:"\u5BF9\u8C61",ok:"Ok",redo:"\u91CD\u505A (Ctrl+Shift+Z)",removeText:"\u79FB\u9664",removeTitle:"\u79FB\u9664\u9009\u4E2D\u5B57\u6BB5 (Ctrl+Del)",removeField:"\u79FB\u9664\u8BE5\u5B57\u6BB5 (Ctrl+Del)",repairTitle:"\u4FEE\u590DJSON\uFF1A\u4FEE\u590D\u5F15\u53F7\u548C\u8F6C\u4E49\u7B26\uFF0C\u5220\u9664\u6CE8\u91CA\u548CJSONP\u8868\u793A\u6CD5\uFF0C\u5C06JavaScript\u5BF9\u8C61\u8F6C\u6362\u4E3AJSON\u3002",selectNode:"\u9009\u62E9\u4E00\u4E2A\u8282\u70B9...",showAll:"\u5C55\u793A\u5168\u90E8",showMore:"\u5C55\u793A\u66F4\u591A",showMoreStatus:"\u663E\u793A${totalChilds}\u7684${visibleChilds}\u9879\u76EE.",sort:"\u6392\u5E8F",sortTitle:"\u6392\u5E8F${type}\u7684\u5B50\u8282\u70B9",sortTitleShort:"\u5185\u5BB9\u6392\u5E8F",sortFieldLabel:"\u5B57\u6BB5\uFF1A",sortDirectionLabel:"\u65B9\u5411\uFF1A",sortFieldTitle:"\u9009\u62E9\u7528\u4E8E\u5BF9\u6570\u7EC4\u6216\u5BF9\u8C61\u6392\u5E8F\u7684\u5D4C\u5957\u5B57\u6BB5",sortAscending:"\u5347\u5E8F\u6392\u5E8F",sortAscendingTitle:"\u6309\u7167\u8BE5\u5B57\u6BB5\u5347\u5E8F\u6392\u5E8F",sortDescending:"\u964D\u5E8F\u6392\u5E8F",sortDescendingTitle:"\u6309\u7167\u8BE5\u5B57\u6BB5\u964D\u5E8F\u6392\u5E8F",string:"\u5B57\u7B26\u4E32",transform:"\u53D8\u6362",transformTitle:"\u7B5B\u9009\uFF0C\u6392\u5E8F\uFF0C\u6216\u8005\u8F6C\u6362${type}\u7684\u5B50\u8282\u70B9",transformTitleShort:"\u7B5B\u9009\uFF0C\u6392\u5E8F\uFF0C\u6216\u8005\u8F6C\u6362\u5185\u5BB9",extract:"\u63D0\u53D6",extractTitle:"\u63D0\u53D6\u8FD9\u4E2A ${type}",transformQueryTitle:"\u8F93\u5165JMESPath\u67E5\u8BE2",transformWizardLabel:"\u5411\u5BFC",transformWizardFilter:"\u7B5B\u9009",transformWizardSortBy:"\u6392\u5E8F",transformWizardSelectFields:"\u9009\u62E9\u5B57\u6BB5",transformQueryLabel:"\u67E5\u8BE2",transformPreviewLabel:"\u9884\u89C8",type:"\u7C7B\u578B",typeTitle:"\u66F4\u6539\u5B57\u6BB5\u7C7B\u578B",openUrl:"Ctrl+Click \u6216\u8005 Ctrl+Enter \u5728\u65B0\u7A97\u53E3\u6253\u5F00\u94FE\u63A5",undo:"\u64A4\u9500\u4E0A\u6B21\u52A8\u4F5C (Ctrl+Z)",validationCannotMove:"\u65E0\u6CD5\u5C06\u5B57\u6BB5\u79FB\u5165\u5176\u5B50\u8282\u70B9",autoType:'\u5B57\u6BB5\u7C7B\u578B "auto". \u5B57\u6BB5\u7C7B\u578B\u7531\u503C\u81EA\u52A8\u786E\u5B9A \u53EF\u4EE5\u4E3A string\uFF0Cnumber\uFF0Cboolean\uFF0C\u6216\u8005 null.',objectType:'\u5B57\u6BB5\u7C7B\u578B "object". \u5BF9\u8C61\u5305\u542B\u4E00\u7EC4\u65E0\u5E8F\u7684\u952E/\u503C\u5BF9.',arrayType:'\u5B57\u6BB5\u7C7B\u578B "array". \u6570\u7EC4\u5305\u542B\u503C\u7684\u6709\u5E8F\u96C6\u5408.',stringType:'\u5B57\u6BB5\u7C7B\u578B "string". \u5B57\u6BB5\u7C7B\u578B\u7531\u503C\u81EA\u52A8\u786E\u5B9A\uFF0C\u4F46\u59CB\u7EC8\u4F5C\u4E3A\u5B57\u7B26\u4E32\u8FD4\u56DE.',modeCodeText:"\u4EE3\u7801",modeCodeTitle:"\u5207\u6362\u81F3\u4EE3\u7801\u9AD8\u4EAE",modeFormText:"\u8868\u5355",modeFormTitle:"\u5207\u6362\u81F3\u8868\u5355\u7F16\u8F91",modeTextText:"\u6587\u672C",modeTextTitle:"\u5207\u6362\u81F3\u6587\u672C\u7F16\u8F91",modeTreeText:"\u6811",modeTreeTitle:"\u5207\u6362\u81F3\u6811\u7F16\u8F91",modeViewText:"\u89C6\u56FE",modeViewTitle:"\u5207\u6362\u81F3\u6811\u89C6\u56FE",modePreviewText:"\u9884\u89C8",modePreviewTitle:"\u5207\u6362\u81F3\u9884\u89C8\u6A21\u5F0F",examples:"\u4F8B\u5B50",default:"\u7F3A\u7701",containsInvalidProperties:"\u5305\u542B\u65E0\u6548\u7684\u5C5E\u6027",containsInvalidItems:"\u5305\u542B\u65E0\u6548\u9879\u76EE"},"pt-BR":{array:"Lista",auto:"Automatico",appendText:"Adicionar",appendTitle:"Adicionar novo campo com tipo 'auto' depois deste campo (Ctrl+Shift+Ins)",appendSubmenuTitle:"Selecione o tipo do campo a ser adicionado",appendTitleAuto:"Adicionar novo campo com tipo 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendente",ascendingTitle:"Organizar filhor do tipo ${type} em crescente",actionsMenu:"Clique para abrir o menu de a\xE7\xF5es (Ctrl+M)",cannotParseFieldError:"N\xE3o \xE9 poss\xEDvel analisar o campo no JSON",cannotParseValueError:"N\xE3o \xE9 poss\xEDvel analisar o valor em JSON",collapseAll:"Fechar todos campos",compactTitle:"Dados JSON compactos, remova todos os espa\xE7os em branco (Ctrl+Shift+I)",descending:"Descendente",descendingTitle:"Organizar o filhos do tipo ${type} em decrescente",duplicateKey:"chave duplicada",drag:"Arraste para mover este campo (Alt+Shift+Arrows)",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos selecionados (Ctrl+D)",duplicateField:"Duplicar este campo (Ctrl+D)",duplicateFieldError:"Nome do campo duplicado",empty:"vazio",expandAll:"Expandir todos campos",expandTitle:`Clique para expandir/encolher este campo (Ctrl+E).
Ctrl+Click para expandir/encolher incluindo todos os filhos.`,formatTitle:"Formate dados JSON, com recuo e feeds de linha adequados (Ctrl+I)",insert:"Inserir",insertTitle:"Inserir um novo campo do tipo 'auto' antes deste campo (Ctrl+Ins)",insertSub:"Selecionar o tipo de campo a ser inserido",object:"Objeto",ok:"Ok",redo:"Refazer (Ctrl+Shift+Z)",removeText:"Remover",removeTitle:"Remover campos selecionados (Ctrl+Del)",removeField:"Remover este campo (Ctrl+Del)",repairTitle:"Repare JSON: corrija aspas e caracteres de escape, remova coment\xE1rios e nota\xE7\xE3o JSONP, transforme objetos JavaScript em JSON.",selectNode:"Selecione um n\xF3dulo...",showAll:"mostrar todos",showMore:"mostrar mais",showMoreStatus:"exibindo ${visibleChilds} de ${totalChilds} itens.",sort:"Organizar",sortTitle:"Organizar os filhos deste ${type}",sortTitleShort:"Organizar os filhos",sortFieldLabel:"Campo:",sortDirectionLabel:"Dire\xE7\xE3o:",sortFieldTitle:"Selecione um campo filho pelo qual ordenar o array ou objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar o campo selecionado por ordem ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar o campo selecionado por ordem descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar ou transformar os filhos deste ${type}",transformTitleShort:"Filtrar, ordenar ou transformar conte\xFAdos",transformQueryTitle:"Insira uma express\xE3o JMESPath",transformWizardLabel:"Assistente",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Selecionar campos",transformQueryLabel:"Express\xE3o",transformPreviewLabel:"Visualizar",type:"Tipo",typeTitle:"Mudar o tipo deste campo",openUrl:"Ctrl+Click ou Ctrl+Enter para abrir link em nova janela",undo:"Desfazer \xFAltimo a\xE7\xE3o (Ctrl+Z)",validationCannotMove:"N\xE3o pode mover um campo como filho dele mesmo",autoType:'Campo do tipo "auto". O tipo do campo \xE9 determinao automaticamente a partir do seu valor e pode ser texto, n\xFAmero, verdade/falso ou nulo.',objectType:'Campo do tipo "objeto". Um objeto cont\xE9m uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma cole\xE7\xE3o de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao \xE9 determinado atrav\xE9s do seu valor, mas sempre retornara um texto.',examples:"Exemplos",default:"Revelia",containsInvalidProperties:"Cont\xE9m propriedades inv\xE1lidas",containsInvalidItems:"Cont\xE9m itens inv\xE1lidos"},tr:{array:"Dizin",auto:"Otomatik",appendText:"Ekle",appendTitle:"Bu alan\u0131n alt\u0131na 'otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",appendSubmenuTitle:"Eklenecek alan\u0131n tipini se\xE7",appendTitleAuto:"'Otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",ascending:"Artan",ascendingTitle:"${type}'\u0131n alt tiplerini artan d\xFCzende s\u0131rala",actionsMenu:"Aksiyon men\xFCs\xFCn\xFC a\xE7mak i\xE7in t\u0131klay\u0131n (Ctrl+M)",collapseAll:"T\xFCm alanlar\u0131 kapat",descending:"Azalan",descendingTitle:"${type}'\u0131n alt tiplerini azalan d\xFCzende s\u0131rala",drag:"Bu alan\u0131 ta\u015F\u0131mak i\xE7in s\xFCr\xFCkleyin (Alt+Shift+Arrows)",duplicateKey:"Var olan anahtar",duplicateText:"A\u015Fa\u011F\u0131ya kopyala",duplicateTitle:"Se\xE7ili alanlardan bir daha olu\u015Ftur (Ctrl+D)",duplicateField:"Bu alandan bir daha olu\u015Ftur (Ctrl+D)",duplicateFieldError:"Duplicate field name",cannotParseFieldError:"Alan JSON'a ayr\u0131\u015Ft\u0131r\u0131lam\u0131yor",cannotParseValueError:"JSON'a de\u011Fer ayr\u0131\u015Ft\u0131r\u0131lam\u0131yor",empty:"bo\u015F",expandAll:"T\xFCm alanlar\u0131 a\xE7",expandTitle:`Bu alan\u0131 a\xE7mak/kapatmak i\xE7in t\u0131kla (Ctrl+E).
Alt alanlarda dahil t\xFCm alanlar\u0131 a\xE7mak i\xE7in Ctrl+Click `,insert:"Ekle",insertTitle:"Bu alan\u0131n \xFCst\xFCne 'otomatik' tipinde yeni bir alan ekle (Ctrl+Ins)",insertSub:"Araya eklenecek alan\u0131n tipini se\xE7",object:"Nesne",ok:"Tamam",redo:"Yeniden yap (Ctrl+Shift+Z)",removeText:"Kald\u0131r",removeTitle:"Se\xE7ilen alanlar\u0131 kald\u0131r (Ctrl+Del)",removeField:"Bu alan\u0131 kald\u0131r (Ctrl+Del)",selectNode:"Bir nesne se\xE7...",showAll:"t\xFCm\xFCn\xFC g\xF6ster",showMore:"daha fazla g\xF6ster",showMoreStatus:"${totalChilds} alan\u0131n ${visibleChilds} alt alanlar\u0131 g\xF6steriliyor",sort:"S\u0131rala",sortTitle:"${type}'\u0131n alt alanlar\u0131n\u0131 s\u0131rala",sortTitleShort:"\u0130\xE7erikleri s\u0131rala",sortFieldLabel:"Alan:",sortDirectionLabel:"Y\xF6n:",sortFieldTitle:"Diziyi veya nesneyi s\u0131ralamak i\xE7in i\xE7 i\xE7e ge\xE7mi\u015F alan\u0131 se\xE7in",sortAscending:"Artan",sortAscendingTitle:"Se\xE7ili alan\u0131 artan d\xFCzende s\u0131rala",sortDescending:"Azalan",sortDescendingTitle:"Se\xE7ili alan\u0131 azalan d\xFCzende s\u0131rala",string:"Karakter Dizisi",transform:"D\xF6n\xFC\u015Ft\xFCr",transformTitle:"${type}'\u0131n alt alanlar\u0131n\u0131 filtrele, s\u0131rala veya d\xF6n\xFC\u015Ft\xFCr",transformTitleShort:"\u0130\xE7erikleri filterele, s\u0131rala veya d\xF6n\xFC\u015Ft\xFCr",transformQueryTitle:"JMESPath sorgusu gir",transformWizardLabel:"Sihirbaz",transformWizardFilter:"Filtre",transformWizardSortBy:"S\u0131rala",transformWizardSelectFields:"Alanlar\u0131 se\xE7",transformQueryLabel:"Sorgu",transformPreviewLabel:"\xD6nizleme",type:"Tip",typeTitle:"Bu alan\u0131n tipini de\u011Fi\u015Ftir",openUrl:"URL'i yeni bir pencerede a\xE7mak i\xE7in Ctrl+Click veya Ctrl+Enter",undo:"Son de\u011Fi\u015Fikli\u011Fi geri al (Ctrl+Z)",validationCannotMove:"Alt alan olarak ta\u015F\u0131nam\u0131yor",autoType:'Alan tipi "otomatik". Alan t\xFCr\xFC otomatik olarak de\u011Ferden belirlenirve bir dize, say\u0131, boolean veya null olabilir.',objectType:'Alan tipi "nesne". Bir nesne, s\u0131ralanmam\u0131\u015F bir anahtar / de\u011Fer \xE7ifti k\xFCmesi i\xE7erir.',arrayType:'Alan tipi "dizi". Bir dizi, d\xFCzenli de\u011Ferler koleksiyonu i\xE7erir.',stringType:'Alan tipi "karakter dizisi". Alan t\xFCr\xFC de\u011Ferden belirlenmez,ancak her zaman karakter dizisi olarak d\xF6nd\xFCr\xFCl\xFCr.',modeCodeText:"Kod",modeCodeTitle:"Kod vurgulay\u0131c\u0131ya ge\xE7",modeFormText:"Form",modeFormTitle:"Form d\xFCzenleyiciye ge\xE7",modeTextText:"Metin",modeTextTitle:"D\xFCz metin d\xFCzenleyiciye ge\xE7",modeTreeText:"A\u011Fa\xE7",modeTreeTitle:"A\u011Fa\xE7 d\xFCzenleyiciye ge\xE7",modeViewText:"G\xF6r\xFCn\xFCm",modeViewTitle:"A\u011Fa\xE7 g\xF6r\xFCn\xFCm\xFCne ge\xE7",examples:"\xD6rnekler",default:"Varsay\u0131lan",containsInvalidProperties:"Ge\xE7ersiz \xF6zellikler i\xE7eriyor",containsInvalidItems:"Ge\xE7ersiz \xF6\u011Feler i\xE7eriyor"},ja:{array:"\u914D\u5217",auto:"\u30AA\u30FC\u30C8",appendText:"\u8FFD\u52A0",appendTitle:'\u6B21\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306B"\u30AA\u30FC\u30C8"\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0 (Ctrl+Shift+Ins)',appendSubmenuTitle:"\u8FFD\u52A0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",appendTitleAuto:'"\u30AA\u30FC\u30C8"\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0 (Ctrl+Shift+Ins)',ascending:"\u6607\u9806",ascendingTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u6607\u9806\u306B\u4E26\u3079\u66FF\u3048",actionsMenu:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30A2\u30AF\u30B7\u30E7\u30F3\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F (Ctrl+M)",collapseAll:"\u3059\u3079\u3066\u3092\u6298\u308A\u305F\u305F\u3080",descending:"\u964D\u9806",descendingTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u964D\u9806\u306B\u4E26\u3079\u66FF\u3048",drag:"\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u79FB\u52D5 (Alt+Shift+Arrows)",duplicateKey:"\u8907\u88FD\u30AD\u30FC",duplicateText:"\u8907\u88FD",duplicateTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8907\u88FD (Ctrl+D)",duplicateField:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8907\u88FD (Ctrl+D)",duplicateFieldError:"\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059",cannotParseFieldError:"JSON\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093",cannotParseValueError:"JSON\u306E\u5024\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093",empty:"\u7A7A",expandAll:"\u3059\u3079\u3066\u3092\u5C55\u958B",expandTitle:`\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u5C55\u958B/\u6298\u308A\u305F\u305F\u3080 (Ctrl+E).
Ctrl+Click \u3067\u3059\u3079\u3066\u306E\u5B50\u8981\u7D20\u3092\u5C55\u958B/\u6298\u308A\u305F\u305F\u3080`,insert:"\u633F\u5165",insertTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u524D\u306B\u65B0\u3057\u3044\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u633F\u5165 (Ctrl+Ins)",insertSub:"\u633F\u5165\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u3092\u9078\u629E",object:"\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8",ok:"\u5B9F\u884C",redo:"\u3084\u308A\u76F4\u3059 (Ctrl+Shift+Z)",removeText:"\u524A\u9664",removeTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u524A\u9664 (Ctrl+Del)",removeField:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u524A\u9664 (Ctrl+Del)",selectNode:"\u30CE\u30FC\u30C9\u3092\u9078\u629E...",showAll:"\u3059\u3079\u3066\u3092\u8868\u793A",showMore:"\u3082\u3063\u3068\u898B\u308B",showMoreStatus:"${totalChilds}\u500B\u306E\u30A2\u30A4\u30C6\u30E0\u306E\u3046\u3061 ${visibleChilds}\u500B\u3092\u8868\u793A\u3057\u3066\u3044\u307E\u3059\u3002",sort:"\u4E26\u3079\u66FF\u3048",sortTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u4E26\u3079\u66FF\u3048",sortTitleShort:"\u4E26\u3079\u66FF\u3048",sortFieldLabel:"\u30D5\u30A3\u30FC\u30EB\u30C9:",sortDirectionLabel:"\u9806\u5E8F:",sortFieldTitle:"\u914D\u5217\u307E\u305F\u306F\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4E26\u3073\u66FF\u3048\u308B\u305F\u3081\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E",sortAscending:"\u6607\u9806",sortAscendingTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6607\u9806\u306B\u4E26\u3073\u66FF\u3048",sortDescending:"\u964D\u9806",sortDescendingTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u964D\u9806\u306B\u4E26\u3073\u66FF\u3048",string:"\u6587\u5B57\u5217",transform:"\u5909\u63DB",transformTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u30D5\u30A3\u30EB\u30BF\u30FC\u30FB\u4E26\u3073\u66FF\u3048\u30FB\u5909\u63DB\u3059\u308B",transformTitleShort:"\u5185\u5BB9\u3092\u30D5\u30A3\u30EB\u30BF\u30FC\u30FB\u4E26\u3073\u66FF\u3048\u30FB\u5909\u63DB\u3059\u308B",extract:"\u62BD\u51FA",extractTitle:"${type}\u3092\u62BD\u51FA",transformQueryTitle:"JMESPath\u30AF\u30A8\u30EA\u3092\u5165\u529B",transformWizardLabel:"\u30A6\u30A3\u30B6\u30FC\u30C9",transformWizardFilter:"\u30D5\u30A3\u30EB\u30BF\u30FC",transformWizardSortBy:"\u4E26\u3073\u66FF\u3048",transformWizardSelectFields:"\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E",transformQueryLabel:"\u30AF\u30A8\u30EA",transformPreviewLabel:"\u30D7\u30EC\u30D3\u30E5\u30FC",type:"\u578B",typeTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u3092\u5909\u66F4",openUrl:"Ctrl+Click \u307E\u305F\u306F Ctrl+Enter \u3067 \u65B0\u898F\u30A6\u30A3\u30F3\u30C9\u30A6\u3067URL\u3092\u958B\u304F",undo:"\u5143\u306B\u623B\u3059 (Ctrl+Z)",validationCannotMove:"\u5B50\u8981\u7D20\u306B\u79FB\u52D5\u3067\u304D\u307E\u305B\u3093 ",autoType:"\u30AA\u30FC\u30C8\uFF1A \u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u306F\u5024\u304B\u3089\u81EA\u52D5\u7684\u306B\u6C7A\u5B9A\u3055\u308C\u307E\u3059\u3002 (\u6587\u5B57\u5217\u30FB\u6570\u5024\u30FB\u30D6\u30FC\u30EB\u30FBnull)",objectType:"\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\uFF1A \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u9806\u5E8F\u304C\u6C7A\u307E\u3063\u3066\u3044\u306A\u3044\u30AD\u30FC\u3068\u5024\u306E\u30DA\u30A2\u7D44\u307F\u5408\u308F\u305B\u3067\u3059\u3002",arrayType:"\u914D\u5217\uFF1A \u914D\u5217\u306F\u9806\u5E8F\u304C\u6C7A\u307E\u3063\u3066\u3044\u308B\u5024\u306E\u96C6\u5408\u4F53\u3067\u3059\u3002",stringType:"\u6587\u5B57\u5217\uFF1A \u30D5\u30A3\u30FC\u30EB\u30C9\u578B\u306F\u5024\u304B\u3089\u6C7A\u5B9A\u3055\u308C\u307E\u305B\u3093\u304C\u3001\u5E38\u306B\u6587\u5B57\u5217\u3068\u3057\u3066\u8FD4\u3055\u308C\u307E\u3059\u3002",modeCodeText:"\u30B3\u30FC\u30C9\u30E2\u30FC\u30C9",modeCodeTitle:"\u30CF\u30A4\u30E9\u30A4\u30C8\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeFormText:"\u30D5\u30A9\u30FC\u30E0\u30E2\u30FC\u30C9",modeFormTitle:"\u30D5\u30A9\u30FC\u30E0\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeTextText:"\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9",modeTextTitle:"\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeTreeText:"\u30C4\u30EA\u30FC\u30E2\u30FC\u30C9",modeTreeTitle:"\u30C4\u30EA\u30FC\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeViewText:"\u30D3\u30E5\u30FC\u30E2\u30FC\u30C9",modeViewTitle:"\u30D3\u30E5\u30FC\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modePreviewText:"\u30D7\u30EC\u30D3\u30E5\u30FC",modePreviewTitle:"\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u5207\u308A\u66FF\u3048",examples:"\u4F8B",default:"\u30C7\u30D5\u30A9\u30EB\u30C8",containsInvalidProperties:"\u7121\u52B9\u306A\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059",containsInvalidItems:"\u7121\u52B9\u306A\u30A2\u30A4\u30C6\u30E0\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059"},"fr-FR":{array:"Liste",auto:"Auto",appendText:"Ajouter",appendTitle:"Ajouter un champ de type 'auto' apr\xE8s ce champ (Ctrl+Shift+Ins)",appendSubmenuTitle:"S\xE9lectionner le type du champ \xE0 ajouter",appendTitleAuto:"Ajouter un champ de type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendant",ascendingTitle:"Trier les enfants de ce ${type} par ordre ascendant",actionsMenu:"Ouvrir le menu des actions (Ctrl+M)",collapseAll:"Regrouper",descending:"Descendant",descendingTitle:"Trier les enfants de ce ${type} par ordre descendant",drag:"D\xE9placer (Alt+Shift+Arrows)",duplicateKey:"Dupliquer la cl\xE9",duplicateText:"Dupliquer",duplicateTitle:"Dupliquer les champs s\xE9lectionn\xE9s (Ctrl+D)",duplicateField:"Dupliquer ce champ (Ctrl+D)",duplicateFieldError:"Dupliquer le nom de champ",cannotParseFieldError:"Champ impossible \xE0 parser en JSON",cannotParseValueError:"Valeur impossible \xE0 parser en JSON",empty:"vide",expandAll:"\xC9tendre",expandTitle:`\xC9tendre/regrouper ce champ (Ctrl+E).
Ctrl+Click pour \xE9tendre/regrouper avec tous les champs.`,insert:"Ins\xE9rer",insertTitle:"Ins\xE9rer un champ de type 'auto' avant ce champ (Ctrl+Ins)",insertSub:"S\xE9lectionner le type de champ \xE0 ins\xE9rer",object:"Objet",ok:"Ok",redo:"Rejouer (Ctrl+Shift+Z)",removeText:"Supprimer",removeTitle:"Supprimer les champs s\xE9lectionn\xE9s (Ctrl+Del)",removeField:"Supprimer ce champ (Ctrl+Del)",searchTitle:"Rechercher champs et valeurs",searchNextResultTitle:"R\xE9sultat suivant (Enter)",searchPreviousResultTitle:"R\xE9sultat pr\xE9c\xE9dent (Shift + Enter)",selectNode:"S\xE9lectionner un n\u0153ud...",showAll:"voir tout",showMore:"voir plus",showMoreStatus:"${visibleChilds} \xE9l\xE9ments affich\xE9s de ${totalChilds}.",sort:"Trier",sortTitle:"Trier les champs de ce ${type}",sortTitleShort:"Trier",sortFieldLabel:"Champ:",sortDirectionLabel:"Direction:",sortFieldTitle:"S\xE9lectionner les champs permettant de trier les listes et objet",sortAscending:"Ascendant",sortAscendingTitle:"Trier les champs s\xE9lectionn\xE9s par ordre ascendant",sortDescending:"Descendant",sortDescendingTitle:"Trier les champs s\xE9lectionn\xE9s par ordre descendant",string:"Cha\xEEne",transform:"Transformer",transformTitle:"Filtrer, trier, or transformer les enfants de ce ${type}",transformTitleShort:"Filtrer, trier ou transformer le contenu",extract:"Extraire",extractTitle:"Extraire ce ${type}",transformQueryTitle:"Saisir une requ\xEAte JMESPath",transformWizardLabel:"Assistant",transformWizardFilter:"Filtrer",transformWizardSortBy:"Trier par",transformWizardSelectFields:"S\xE9lectionner les champs",transformQueryLabel:"Requ\xEAte",transformPreviewLabel:"Pr\xE9visualisation",type:"Type",typeTitle:"Changer le type de ce champ",openUrl:"Ctrl+Click ou Ctrl+Enter pour ouvrir l'url dans une autre fen\xEAtre",undo:"Annuler la derni\xE8re action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Champe de type "auto". Ce type de champ est automatiquement d\xE9termin\xE9 en fonction de la valeur et peut \xEAtre de type "cha\xEEne", "nombre", "bool\xE9en" ou null.',objectType:'Champ de type "objet". Un objet contient un ensemble non ordonn\xE9 de paires cl\xE9/valeur.',arrayType:'Champ de type "liste". Une liste contient une collection ordonn\xE9e de valeurs.',stringType:`Champ de type "cha\xEEne". Ce type de champ n'est pas d\xE9termin\xE9 en fonction de la valeur, mais retourne syst\xE9matiquement une cha\xEEne de caract\xE8res.`,modeEditorTitle:"Changer mode d'\xE9dition",modeCodeText:"Code",modeCodeTitle:"Activer surlignage code",modeFormText:"Formulaire",modeFormTitle:"Activer formulaire",modeTextText:"Texte",modeTextTitle:"Activer \xE9diteur texte",modeTreeText:"Arbre",modeTreeTitle:"Activer \xE9diteur arbre",modeViewText:"Lecture seule",modeViewTitle:"Activer vue arbre",modePreviewText:"Pr\xE9visualisation",modePreviewTitle:"Activer mode pr\xE9visualiser",examples:"Exemples",default:"D\xE9faut",containsInvalidProperties:"Contient des propri\xE9t\xE9s non valides",containsInvalidItems:"Contient des \xE9l\xE9ments invalides"},de:{array:"Auflistung",auto:"Auto",appendText:"anh\xE4ngen",appendTitle:"F\xFCgen Sie nach diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Umschalt+Ein)",appendSubmenuTitle:"W\xE4hlen Sie den Typ des neuen Feldes",appendTitleAuto:"Ein neues Feld vom Typ 'auto' hinzuf\xFCgen (Strg+Umschalt+Ein)",ascending:"Aufsteigend",ascendingTitle:"Sortieren Sie die Elemente dieses ${type} in aufsteigender Reihenfolge",actionsMenu:"Klicken Sie zum \xD6ffnen des Aktionsmen\xFCs (Strg+M)",cannotParseFieldError:"Feld kann nicht in JSON geparst werden",cannotParseValueError:"Wert kann nicht in JSON geparst werden",collapseAll:"Alle Felder zuklappen",compactTitle:"JSON-Daten verdichten, alle Leerzeichen entfernen (Strg+Umschalt+\\)",descending:"Absteigend",descendingTitle:"Sortieren Sie die Elemente dieses ${type} in absteigender Reihenfolge",drag:"Ziehen, um dieses Feld zu verschieben (Alt+Umschalt+Pfeile)",duplicateKey:"Doppelter Schl\xFCssel",duplicateText:"Duplikat",duplicateTitle:"Ausgew\xE4hlte Felder duplizieren (Strg+D)",duplicateField:"Dieses Feld duplizieren (Strg+D)",duplicateFieldError:"Doppelter Feldname",empty:"leer",expandAll:"Alle Felder anzeigen",expandTitle:`Klicken Sie, um dieses Feld zu erweitern/zu kollabieren (Strg+E).
Strg+Klicken Sie, um dieses Feld einschlie\xDFlich aller Elemente zu erweitern/zu kollabieren.`,formatTitle:"JSON-Daten mit korrekter Einr\xFCckung und Zeilenvorsch\xFCben formatieren (Strg+\\)",insert:"einf\xFCgen",insertTitle:"F\xFCgen Sie vor diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Einfg)",insertSub:"W\xE4hlen Sie den Typ des neuen Feldes",object:"Objekt",ok:"Ok",redo:"Wiederholen (Strg+Umschalt+Z)",removeText:"entfernen",removeTitle:"Ausgew\xE4hlte Felder entfernen (Strg+Entf)",removeField:"Dieses Feld entfernen (Strg+Entf)",repairTitle:"JSON reparieren: Anf\xFChrungszeichen und Escape-Zeichen korrigieren, Kommentare und JSONP-Notation entfernen, JavaScript-Objekte in JSON umwandeln.",searchTitle:"Suchfelder und Werte",searchNextResultTitle:"N\xE4chstes Ergebnis (Enter)",searchPreviousResultTitle:"Vorheriges Ergebnis (Umschalt + Eingabe)",selectNode:"W\xE4hlen Sie einen Knoten aus...",showAll:"alle anzeigen",showMore:"mehr anzeigen",showMoreStatus:"Anzeige von ${visibleChilds} von ${totalChilds}-Elementen.",sort:"Sortieren",sortTitle:"Sortieren Sie die Elemente dieses ${type}",sortTitleShort:"Inhalt sortieren",sortFieldLabel:"Feld:",sortDirectionLabel:"Richtung:",sortFieldTitle:"W\xE4hlen Sie das verschachtelte Feld, nach dem das Array oder Objekt sortiert werden soll.",sortAscending:"Aufsteigend",sortAscendingTitle:"Sortieren Sie das ausgew\xE4hlte Feld in aufsteigender Reihenfolge",sortDescending:"Absteigend",sortDescendingTitle:"Sortieren Sie das ausgew\xE4hlte Feld in absteigender Reihenfolge",string:"Zeichenfolge",transform:"Verwandeln",transformTitle:"Die Elemente dieses ${type} filtern, sortieren oder transformieren",transformTitleShort:"Inhalte filtern, sortieren oder transformieren",extract:"Auszug",extractTitle:"Extrahieren Sie diesen ${type}",transformQueryTitle:"Eine JMESPath-Abfrage eingeben",transformWizardLabel:"Zauberer",transformWizardFilter:"Filter",transformWizardSortBy:"Sortieren nach",transformWizardSelectFields:"Felder ausw\xE4hlen",transformQueryLabel:"Anfrage",transformPreviewLabel:"Vorschau",type:"Geben Sie ein.",typeTitle:"\xC4ndern Sie den Typ dieses Feldes",openUrl:"Strg+Klicken oder Strg+Eingabe, um die URL in einem neuen Fenster zu \xF6ffnen",undo:"Letzte Aktion r\xFCckg\xE4ngig machen (Strg+Z)",validationCannotMove:"Kann ein Feld nicht in ein Kind seiner selbst verschieben",autoType:'Feldtyp "auto". Der Feldtyp wird automatisch aus dem Wert bestimmt und kann ein String, eine Zahl, boolesch oder null sein.',objectType:'Feldtyp "Objekt". Ein Objekt enth\xE4lt eine ungeordnete Menge von Schl\xFCssel/Wert-Paaren.',arrayType:'Feldtyp "Array". Ein Array enth\xE4lt eine geordnete Sammlung von Werten.',stringType:'Feldtyp "Zeichenfolge". Der Feldtyp wird nicht aus dem Wert bestimmt, sondern immer als Zeichenfolge zur\xFCckgegeben.',modeEditorTitle:"Editor-Modus umschalten",modeCodeText:"Code",modeCodeTitle:"Umschalten auf Code-Highlighter",modeFormText:"Formular",modeFormTitle:"Zum Formular-Editor wechseln",modeTextText:"Text",modeTextTitle:"Zum Editor f\xFCr einfachen Text wechseln",modeTreeText:"Baum",modeTreeTitle:"Zum Baum-Editor wechseln",modeViewText:"Siehe",modeViewTitle:"Zur Baumansicht wechseln",modePreviewText:"Vorschau",modePreviewTitle:"In den Vorschau-Modus wechseln",examples:"Beispiele",default:"Standardm\xE4\xDFig",containsInvalidProperties:"Enth\xE4lt ung\xFCltige Eigenschaften",containsInvalidItems:"Enth\xE4lt ung\xFCltige Elemente"},ru:{array:"\u041C\u0430\u0441\u0441\u0438\u0432",auto:"\u0410\u0432\u0442\u043E",appendText:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",appendTitle:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435 \u0441 \u0442\u0438\u043F\u043E\u043C '\u0430\u0432\u0442\u043E' \u043F\u043E\u0441\u043B\u0435 \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F (Ctrl+Shift+Ins)",appendSubmenuTitle:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0438\u043F \u043F\u043E\u043B\u044F \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F",appendTitleAuto:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435 \u0441 \u0442\u0438\u043F\u043E\u043C '\u0430\u0432\u0442\u043E' (Ctrl+Shift+Ins)",ascending:"\u041F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",ascendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C ${type} \u043F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",actionsMenu:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u043C\u0435\u043D\u044E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (Ctrl+M)",cannotParseFieldError:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u0435 \u0432 JSON",cannotParseValueError:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 JSON",collapseAll:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435",compactTitle:"\u041C\u0438\u043D\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F JSON (Ctrl+Shift+I)",descending:"\u041F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",descendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C ${type} \u043F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",drag:"\u041F\u043E\u0442\u044F\u043D\u0438\u0442\u0435 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F (Alt+Shift+Arrows)",duplicateKey:"\u043F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0438\u0439\u0441\u044F \u043A\u043B\u044E\u0447",duplicateText:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C",duplicateTitle:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u043E\u043B\u0435\u0439 (Ctrl+D)",duplicateField:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u0435 (Ctrl+D)",duplicateFieldError:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u044F",empty:"\u043F\u0443\u0441\u0442\u043E\u0439",expandAll:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435",expandTitle:`\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u0440\u0430\u0441\u043A\u0440\u044B\u0442\u0438\u044F/\u0441\u043A\u0440\u044B\u0442\u0438\u044F \u043F\u043E\u043B\u044F (Ctrl+E)
\u0438\u043B\u0438 Ctrl+Click \u0434\u043B\u044F \u0440\u0430\u0441\u043A\u0440\u044B\u0442\u0438\u044F/\u0441\u043A\u0440\u044B\u0442\u0438\u044F \u0432\u0441\u0435\u0445 \u043F\u043E\u0442\u043E\u043C\u043A\u043E\u0432.`,formatTitle:"\u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 JSON (Ctrl+I)",insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C",insertTitle:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435 \u0441 \u0442\u0438\u043F\u043E\u043C '\u0430\u0432\u0442\u043E' \u043F\u0435\u0440\u0435\u0434 \u044D\u0442\u0438\u043C \u043F\u043E\u043B\u0435\u043C (Ctrl+Ins)",insertSub:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0438\u043F \u043F\u043E\u043B\u044F \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438",object:"\u041E\u0431\u044A\u0435\u043A\u0442",ok:"\u041E\u041A",redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C (Ctrl+Shift+Z)",removeText:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",removeTitle:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u043B\u044F (Ctrl+Del)",removeField:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043F\u043E\u043B\u0435 (Ctrl+Del)",repairTitle:"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 JSON: \u0438\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0438 escape-\u0441\u0438\u043C\u0432\u043E\u043B\u044B, \u0443\u0434\u0430\u043B\u0438\u0442\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u0438 \u043D\u043E\u0442\u0430\u0446\u0438\u044E JSONP, \u043C\u043E\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0439\u0442\u0435 \u043E\u0431\u044A\u0435\u043A\u0442\u044B JavaScript \u0432 JSON.",searchTitle:"\u041F\u043E\u0438\u0441\u043A",searchNextResultTitle:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 (Enter)",searchPreviousResultTitle:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 (Shift + Enter)",selectNode:"\u0412\u044B\u0431\u043E\u0440 \u0443\u0437\u043B\u0430...",showAll:"\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435",showMore:"\u0431\u043E\u043B\u044C\u0448\u0435",showMoreStatus:"${visibleChilds} \u0438\u0437 ${totalChilds}",sort:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430",sortTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u043F\u043E\u0442\u043E\u043C\u043A\u043E\u0432 \u0442\u0438\u043F\u0430 ${type}",sortTitleShort:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E",sortFieldLabel:"\u041F\u043E\u043B\u0435:",sortDirectionLabel:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435:",sortFieldTitle:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u043E\u043B\u0435 \u0434\u043B\u044F \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0438 \u043C\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u043B\u0438 \u043E\u0431\u044A\u0435\u043A\u0442\u0430",sortAscending:"\u041F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",sortAscendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u043E\u0440\u044F \u043F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",sortDescending:"\u041F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",sortDescendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u043E\u0440\u044F \u043F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",string:"\u0421\u0442\u0440\u043E\u043A\u0430",transform:"\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F",transformTitle:"\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F, \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0438\u043B\u0438 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445 \u0442\u0438\u043F\u0430 ${type}",transformTitleShort:"\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F, \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0438\u043B\u0438 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445",extract:"\u0418\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u0435",extractTitle:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0442\u0438\u043F ${type}",transformQueryTitle:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 JMESpath \u0437\u0430\u043F\u0440\u043E\u0441",transformWizardLabel:"\u041C\u0430\u0441\u0442\u0435\u0440",transformWizardFilter:"\u0424\u0438\u043B\u044C\u0442\u0440",transformWizardSortBy:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430",transformWizardSelectFields:"\u041F\u043E\u043B\u044F",transformQueryLabel:"\u0417\u0430\u043F\u0440\u043E\u0441",transformPreviewLabel:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",type:"\u0422\u0438\u043F",typeTitle:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0442\u0438\u043F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F",openUrl:"Ctrl+Click \u0438\u043B\u0438 Ctrl+Enter \u0434\u043B\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F url \u0432 \u043D\u043E\u0432\u043E\u043C \u043E\u043A\u043D\u0435",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C (Ctrl+Z)",validationCannotMove:"\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043E \u0432 \u043F\u043E\u0442\u043E\u043C\u043A\u0430",autoType:"\u0422\u0438\u043F \u043F\u043E\u043B\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u043F\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044E \u0438 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u043E\u0439, \u0447\u0438\u0441\u043B\u043E\u043C, \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u0438\u043C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\u043C \u0438\u043B\u0438 null.",objectType:"\u041E\u0431\u044A\u0435\u043A\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u0435\u043D\u043D\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u043F\u0430\u0440 \u043A\u043B\u044E\u0447/\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435.",arrayType:"\u041C\u0430\u0441\u0441\u0438\u0432 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u0435\u043D\u043D\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439.",stringType:"\u0422\u0438\u043F \u043F\u043E\u043B\u044F \u043D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u0438\u0437 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F, \u043D\u043E \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044F \u043A\u0430\u043A \u0441\u0442\u0440\u043E\u043A\u0430.",modeEditorTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0440\u0435\u0436\u0438\u043C\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430",modeCodeText:"\u041A\u043E\u0434",modeCodeTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043A\u043E\u0434\u0430",modeFormText:"\u0424\u043E\u0440\u043C\u0430",modeFormTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0444\u043E\u0440\u043C\u044B",modeTextText:"\u0422\u0435\u043A\u0441\u0442",modeTextTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0442\u0435\u043A\u0441\u0442\u0430",modeTreeText:"\u0414\u0435\u0440\u0435\u0432\u043E",modeTreeTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430",modeViewText:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0434\u0435\u0440\u0435\u0432\u0430",modeViewTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430",modePreviewText:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",modePreviewTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430",examples:"\u041F\u0440\u0438\u043C\u0435\u0440\u044B",default:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",containsInvalidProperties:"\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430",containsInvalidItems:"\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B"},ko:{array:"\uBC30\uC5F4",auto:"\uC790\uB3D9",appendText:"\uCD94\uAC00",appendTitle:'\uC120\uD0DD\uD55C \uC694\uC18C \uC544\uB798\uC5D0 "\uC790\uB3D9" \uC694\uC18C\uB97C \uCD94\uAC00\uD569\uB2C8\uB2E4. (Ctrl + Shift + Ins)',appendSubmenuTitle:"\uCD94\uAC00\uD560 \uC694\uC18C\uC758 \uC720\uD615\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",appendTitleAuto:'"\uC790\uB3D9" \uC694\uC18C\uB97C \uCD94\uAC00\uD569\uB2C8\uB2E4. (Ctrl + Shift + Ins)',ascending:"\uC624\uB984\uCC28\uC21C",ascendingTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uC624\uB984\uCC28\uC21C \uC815\uB82C\uD569\uB2C8\uB2E4.",actionsMenu:"\uBA54\uB274 \uC5F4\uAE30 (Ctrl + M)",cannotParseFieldError:"JSON\uC758 \uC694\uC18C\uB97C \uD574\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",cannotParseValueError:"JSON\uC758 \uAC12\uC744 \uD574\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",collapseAll:"\uBAA8\uB450 \uC811\uAE30",compactTitle:"\uBAA8\uB4E0 \uACF5\uBC31\uC744 \uC81C\uAC70\uD558\uC5EC JSON \uB370\uC774\uD130\uB97C \uC791\uAC8C \uB9CC\uB4ED\uB2C8\uB2E4. (Ctrl + Shift + I)",descending:"\uB0B4\uB9BC\uCC28\uC21C",descendingTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uB0B4\uB9BC\uCC28\uC21C\uC73C\uB85C \uC815\uB82C",drag:"\uB4DC\uB798\uADF8\uD558\uC5EC \uC694\uC18C\uB97C \uC774\uB3D9\uD569\uB2C8\uB2E4. (Alt + Shift + Arrows)",duplicateKey:"\uBCF5\uC81C\uD0A4",duplicateText:"\uBCF5\uC81C",duplicateTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uBCF5\uC81C\uD569\uB2C8\uB2E4. (Ctrl + D)",duplicateField:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uBCF5\uC81C\uD569\uB2C8\uB2E4. (Ctrl + D)",duplicateFieldError:"\uC694\uC18C \uC774\uB984\uC774 \uC911\uBCF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",empty:"\uBE44\uC5B4\uC788\uC74C",expandAll:"\uBAA8\uB450 \uC5F4\uAE30",expandTitle:`\uD074\uB9AD\uD558\uC5EC \uC694\uC18C\uB97C \uC5F4\uAC70\uB098 \uB2EB\uC2B5\uB2C8\uB2E4. (Ctrl + E)
Ctrl + Click\uC73C\uB85C \uBAA8\uB4E0 \uD558\uC704 \uC694\uC18C\uB97C \uC5F4\uAC70\uB098 \uB2EB\uC2B5\uB2C8\uB2E4.`,formatTitle:"\uC801\uC808\uD55C \uB4E4\uC5EC\uC4F0\uAE30 \uBC0F \uC904\uBC14\uAFC8\uC73C\uB85C JSON \uB370\uC774\uD130\uB97C \uC815\uD615\uD654\uD569\uB2C8\uB2E4. (Ctrl + I)",insert:"\uC0BD\uC785",insertTitle:"\uC120\uD0DD\uD55C \uC694\uC18C \uC704\uC5D0 \uC0C8\uC694\uC18C\uB97C \uC0BD\uC785\uD569\uB2C8\uB2E4. (Ctrl + Ins)",insertSub:"\uC0BD\uC785\uD560 \uC694\uC18C\uC758 \uC720\uD615\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",object:"\uAC1D\uCCB4",ok:"\uD655\uC778",redo:"\uB2E4\uC2DC \uC2E4\uD589 (Ctrl + Shift + Z)",removeText:"\uC0AD\uC81C",removeTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. (Ctrl + Del)",removeField:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. (Ctrl + Del)",repairTitle:"JSON \uAD50\uC815: JSON \uB0B4\uC758 \uC8FC\uC11D\uACFC JSONP \uD45C\uAE30\uBC95\uC744 \uC9C0\uC6B0\uACE0 \uB530\uC634\uD45C\uC640 \uC774\uC2A4\uCF00\uC774\uD504 \uBB38\uC790\uB97C \uC218\uC815\uD569\uB2C8\uB2E4.",searchTitle:"\uC694\uC18C \uB610\uB294 \uAC12 \uCC3E\uAE30",searchNextResultTitle:"\uB2E4\uC74C\uC73C\uB85C \uCC3E\uAE30 (Enter)",searchPreviousResultTitle:"\uC774\uC804\uC73C\uB85C \uCC3E\uAE30 (Shift + Enter)",selectNode:"\uC694\uC18C\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694...",showAll:"\uBAA8\uB450\uBCF4\uAE30",showMore:"\uB354\uBCF4\uAE30",showMoreStatus:"${totalChilds} \uAC1C\uC758 \uD56D\uBAA9 \uC911 ${visibleChilds} \uAC1C\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.",sort:"\uC815\uB82C",sortTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uC815\uB82C\uD569\uB2C8\uB2E4.",sortTitleShort:"\uC815\uB82C",sortFieldLabel:"\uC694\uC18C:",sortDirectionLabel:"\uC21C\uC11C:",sortFieldTitle:"\uBC30\uC5F4\uC774\uB098 \uAC1D\uCCB4\uB97C \uC815\uB82C\uD558\uB294 \uC694\uC18C\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",sortAscending:"\uC624\uB984\uCC28\uC21C",sortAscendingTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uC624\uB984\uCC28\uC21C\uC73C\uB85C \uC815\uB82C\uD569\uB2C8\uB2E4.",sortDescending:"\uB0B4\uB9BC\uCC28\uC21C",sortDescendingTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uB0B4\uB9BC\uCC28\uC21C\uC73C\uB85C \uC815\uB82C\uD569\uB2C8\uB2E4.",string:"\uBB38\uC790",transform:"\uBCC0\uD658",transformTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uD544\uD130\uD558\uAC70\uB098 \uC815\uB82C \uB610\uB294 \uBCC0\uD658\uD569\uB2C8\uB2E4.",transformTitleShort:"\uB0B4\uC6A9\uC744 \uD544\uD130\uD558\uAC70\uB098 \uC815\uB82C \uB610\uB294 \uBCC0\uD658\uD569\uB2C8\uB2E4.",extract:"\uCD94\uCD9C",extractTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uAC12\uC744 \uCD5C\uC0C1\uC704\uC5D0 \uC704\uCE58\uC2DC\uD0B5\uB2C8\uB2E4.",transformQueryTitle:"JMESPath \uCFFC\uB9AC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",transformWizardLabel:"\uB9C8\uBC95\uC0AC",transformWizardFilter:"\uD544\uD130",transformWizardSortBy:"\uC815\uB82C",transformWizardSelectFields:"\uC694\uC18C\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",transformQueryLabel:"\uCFFC\uB9AC",transformPreviewLabel:"\uBBF8\uB9AC\uBCF4\uAE30",type:"\uC720\uD615",typeTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uC758 \uC720\uD615\uC744 \uBCC0\uACBD\uD569\uB2C8\uB2E4.",openUrl:"Ctrl + Click \uB610\uB294 Ctrl + Enter\uB85C \uC0C8 \uCC3D\uC5D0\uC11C URL \uC5F4\uAE30",undo:"\uC2E4\uD589 \uCDE8\uC18C (Ctrl + Z)",validationCannotMove:"\uD558\uC704 \uC694\uC18C\uB85C \uC774\uB3D9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",autoType:"\uC790\uB3D9: \uC694\uC18C\uC758 \uD615\uC2DD\uC774 \uAC12\uC758 \uC720\uD615\uC73C\uB85C \uACB0\uC815\uB429\uB2C8\uB2E4. \uBB38\uC790, \uC22B\uC790, \uBD80\uC6B8, \uB610\uB294 null\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4.",objectType:"\uAC1D\uCCB4: \uC21C\uC11C\uB300\uB85C \uB098\uC5F4\uB418\uC9C0 \uC54A\uC740 \uC774\uB984/\uAC12 \uC30D\uC73C\uB85C \uC774\uB8E8\uC5B4\uC9C4 \uC9D1\uD569\uC785\uB2C8\uB2E4.",arrayType:"\uBC30\uC5F4: \uC21C\uC11C\uB300\uB85C \uB098\uC5F4\uB41C \uAC12\uC758 \uC9D1\uD569\uC785\uB2C8\uB2E4.",stringType:"\uBB38\uC790: \uC694\uC18C\uC758 \uC720\uD615\uC774 \uAC12\uC5D0\uC11C \uACB0\uC815\uB418\uC9C0 \uC54A\uC9C0\uB9CC \uD56D\uC0C1 \uBB38\uC790\uB85C \uBC18\uD658\uB429\uB2C8\uB2E4.",modeEditorTitle:"\uD3B8\uC9D1\uAE30 \uC720\uD615 \uBCC0\uACBD",modeCodeText:"\uCF54\uB4DC",modeCodeTitle:"\uD615\uC2DD \uAD50\uC815\uC744 \uB3C4\uC640\uC8FC\uB294 \uAE30\uB2A5\uC774 \uD3EC\uD568\uB41C \uBB38\uC790 \uD3B8\uC9D1\uAE30",modeFormText:"\uC785\uB825 \uC591\uC2DD",modeFormTitle:"\uC815\uD574\uC9C4 \uC694\uC18C\uC5D0 \uAC12\uC744 \uC785\uB825\uD558\uB294 \uD3B8\uC9D1\uAE30",modeTextText:"\uBB38\uC790",modeTextTitle:"\uB2E8\uC21C \uBB38\uC790 \uD3B8\uC9D1\uAE30",modeTreeText:"\uD2B8\uB9AC",modeTreeTitle:"\uD2B8\uB9AC \uAD6C\uC870\uB85C \uD45C\uC2DC\uB418\uB294 \uD3B8\uC9D1\uAE30",modeViewText:"\uBCF4\uAE30",modeViewTitle:"\uC77D\uAE30\uC804\uC6A9 \uD2B8\uB9AC \uAD6C\uC870\uB85C JSON\uC744 \uD45C\uC2DC",modePreviewText:"\uBBF8\uB9AC\uBCF4\uAE30",modePreviewTitle:"\uC77D\uAE30\uC804\uC6A9 \uBB38\uC790\uB85C JSON\uC744 \uD45C\uC2DC",examples:"\uC608\uC81C",default:"\uAE30\uBCF8\uAC12",containsInvalidProperties:"\uC798\uBABB\uB41C \uC18D\uC131\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",containsInvalidItems:"\uC798\uBABB\uB41C \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4"}},S=Object.keys(U),M="en",K=typeof navigator!="undefined"?navigator.language||navigator.userLanguage:void 0,j=S.find(function(A){return A===K})||M;function z(A){var m;A&&((m=S.find(function(T){return T===A}))?j=m:console.error("Language not found"))}function P(A){if(A)for(var m in A)(function(T){S.find(function(y){return y===T})||S.push(T),U[T]=Object.assign({},U[M],U[T],A[T])})(m)}function N(A,m,T){var y=U[T=T||j][A]||U[M][A]||A;if(m)for(var f in m)y=y.replace("${"+f+"}",m[f]);return y}},6056:function(le,U,Z){Z.d(U,{J:function(){return j},r:function(){return K}});var U=Z(5156),S=Z.n(U),M=Z(9791);function K(z,T){var N,A=T.sort,m=T.filter,T=T.projection,y="";return m?(N=m.field!=="@"?["0"].concat((0,M.parsePath)("."+m.field)):["0"],N=typeof(0,M.get)(z,N)=="string"?m.value:(0,M.parseString)(m.value),y+="[? "+m.field+" "+m.relation+" `"+JSON.stringify(N)+"`]"):y+=Array.isArray(z)?"[*]":"@",A&&(A.direction==="desc"?y+=" | reverse(sort_by(@, &"+A.field+"))":y+=" | sort_by(@, &"+A.field+")"),T&&(y[y.length-1]!=="]"&&(y+=" | [*]"),T.fields.length===1?y+="."+T.fields[0]:1<T.fields.length&&(y+=".{"+T.fields.map(function(f){var h=f.split(".");return h[h.length-1]+": "+f}).join(", ")+"}")),y}function j(z,P){return S().search(z,P)}},4987:function(){function le(g){g===void 0||"remove"in g||Object.defineProperty(g,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode!==void 0&&this.parentNode.removeChild(this)}})}typeof Element!="undefined"&&(window.Element!==void 0&&le(window.Element.prototype),window.CharacterData!==void 0&&le(window.CharacterData.prototype),window.DocumentType!==void 0)&&le(window.DocumentType.prototype),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(g){for(var Z=0;Z<this.length;Z++){var U=this[Z];if(g.call(this,U,Z,this))return Z}return-1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(g){return g=this.findIndex(g),this[g]},configurable:!0,writable:!0}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},341:function(le,a,h){h.r(a),h.d(a,{previewModeMixins:function(){return c}});var U=h(1262),S=h(4188),M=h(6436),K=h(2474);function j(t){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function z(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,function(s){return s=function(o,i){if(j(o)!=="object"||o===null)return o;var l=o[Symbol.toPrimitive];if(l===void 0)return(i==="string"?String:Number)(o);if(l=l.call(o,i||"default"),j(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}(s,"string"),j(s)==="symbol"?s:String(s)}(n.key),n)}}var P=function(){function t(n,s,o){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.onChange=n,this.calculateItemSize=s||function(){return 1},this.limit=o,this.items=[],this.index=-1}var r,e;return r=t,(e=[{key:"add",value:function(n){for(;this._calculateHistorySize()>this.limit&&1<this.items.length;)this.items.shift(),this.index--;this.items=this.items.slice(0,this.index+1),this.items.push(n),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var n=this.calculateItemSize,s=0;return this.items.forEach(function(o){s+=n(o)}),s}},{key:"undo",value:function(){if(this.canUndo())return this.index--,this.onChange(),this.items[this.index]}},{key:"redo",value:function(){if(this.canRedo())return this.index++,this.onChange(),this.items[this.index]}},{key:"canUndo",value:function(){return 0<this.index}},{key:"canRedo",value:function(){return this.index<this.items.length-1}},{key:"clear",value:function(){this.items=[],this.index=-1,this.onChange()}}])&&z(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),t}(),N=h(7907),A=h(6056),m=h(6617),T=h(6210),y=h(2558),a=h(8458),f=h(9791),h=a.textModeMixins[0].mixin,a={create:function(n){var r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},e=(r.statusBar===void 0&&(r.statusBar=!0),r.mainMenuBar=r.mainMenuBar!==!1,r.enableSort=r.enableSort!==!1,r.enableTransform=r.enableTransform!==!1,r.createQuery=r.createQuery||A.r,r.executeQuery=r.executeQuery||A.J,typeof(this.options=r).indentation=="number"?this.indentation=Number(r.indentation):this.indentation=2,(0,N.cC)(this.options.languages),(0,N.m0)(this.options.language),this.mode="preview",this),n=(this.container=n,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,f.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=n.clientWidth,this.height=n.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(s){s.preventDefault()},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),n=(this.frameFocusTracker=new K.R(n),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.dom.busy=document.createElement("div"),this.dom.busy.className="jsoneditor-busy",this.dom.busyContent=document.createElement("span"),this.dom.busyContent.textContent="busy...",this.dom.busy.appendChild(this.dom.busyContent),this.content.appendChild(this.dom.busy),this.dom.previewContent=document.createElement("pre"),this.dom.previewContent.className="jsoneditor-preview",this.dom.previewText=document.createTextNode(""),this.dom.previewContent.appendChild(this.dom.previewText),this.content.appendChild(this.dom.previewContent),this.options.mainMenuBar&&((0,f.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(n=document.createElement("button")).type="button",n.className="jsoneditor-format",n.title=(0,N.Iu)("formatTitle"),this.menu.appendChild(n),n.onclick=function(){e.executeWithBusyMessage(function(){try{e.format()}catch(s){e._onError(s)}},"formatting...")},(n=document.createElement("button")).type="button",n.className="jsoneditor-compact",n.title=(0,N.Iu)("compactTitle"),this.menu.appendChild(n),n.onclick=function(){e.executeWithBusyMessage(function(){try{e.compact()}catch(s){e._onError(s)}},"compacting...")},this.options.enableSort&&((n=document.createElement("button")).type="button",n.className="jsoneditor-sort",n.title=(0,N.Iu)("sortTitleShort"),n.onclick=function(){e._showSortModal()},this.menu.appendChild(n)),this.options.enableTransform&&((n=document.createElement("button")).type="button",n.title=(0,N.Iu)("transformTitleShort"),n.className="jsoneditor-transform",n.onclick=function(){e._showTransformModal()},this.dom.transform=n,this.menu.appendChild(n)),(n=document.createElement("button")).type="button",n.className="jsoneditor-repair",n.title=(0,N.Iu)("repairTitle"),this.menu.appendChild(n),!(n.onclick=function(){e.json===void 0&&e.executeWithBusyMessage(function(){try{e.repair()}catch(s){e._onError(s)}},"repairing...")})!==this.options.history&&(this.history=new P(function(){e.dom.undo.disabled=!e.history.canUndo(),e.dom.redo.disabled=!e.history.canRedo()},function(s){return 2*s.text.length},S.oW),(n=document.createElement("button")).type="button",n.className="jsoneditor-undo jsoneditor-separator",n.title=(0,N.Iu)("undo"),n.onclick=function(){var s=e.history.undo();s&&e._applyHistory(s)},this.menu.appendChild(n),this.dom.undo=n,(n=document.createElement("button")).type="button",n.className="jsoneditor-redo",n.title=(0,N.Iu)("redo"),n.onclick=function(){var s=e.history.redo();s&&e._applyHistory(s)},this.menu.appendChild(n),this.dom.redo=n,this.history.onChange()),this.options)&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new m.x(this.menu,this.options.modes,this.options.mode,function(s){try{e.setMode(s),e.modeSwitcher.focus()}catch(o){e._onError(o)}})),Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):this.options.showErrorTable===!0);this.errorTable=new M.Q({errorTableVisible:n,onToggleVisibility:function(){e.validate()},onFocusLine:null,onChangeHeight:function(s){s=s+(e.dom.statusBar?e.dom.statusBar.clientHeight:0)+1,e.content.style.marginBottom=-s+"px",e.content.style.paddingBottom=s+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),r.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),n=document.createElement("div"),(this.dom.statusBar=n).className="jsoneditor-statusbar",this.frame.appendChild(n),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",n.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",n.appendChild(this.dom.arrayInfo),n.appendChild(this.errorTable.getErrorCounter()),n.appendChild(this.errorTable.getWarningIcon()),n.appendChild(this.errorTable.getErrorIcon())),this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var t=this.getText();this.dom.previewText.nodeValue=(0,f.limitCharacters)(t,S.WF),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,f.formatSize)(t.length)),this.dom.arrayInfo&&(Array.isArray(this.json)?this.dom.arrayInfo.innerText="Array: "+this.json.length+" items":this.dom.arrayInfo.innerText="")},_onChange:function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(t){console.error("Error in onChange callback: ",t)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(t){console.error("Error in onChangeJSON callback: ",t)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(t){console.error("Error in onChangeText callback: ",t)}}},c=(a._showSortModal=function(){var t=this;this.executeWithBusyMessage(function(){var r=t.options.modalAnchor||S.qD,e=t.get();t._renderPreview(),(0,T.showSortModal)(r,e,function(n){t.executeWithBusyMessage(function(){var s,o,i;s=e,o=n,Array.isArray(s)&&(i=(0,f.sort)(s,o.path,o.direction),t.sortedBy=o,t._setAndFireOnChange(i)),(0,f.isObject)(s)&&(i=(0,f.sortObjectKeys)(s,o.direction),t.sortedBy=o,t._setAndFireOnChange(i))},"sorting...")},t.sortedBy)},"parsing...")},a._showTransformModal=function(){var t=this;this.executeWithBusyMessage(function(){var s=t.options,r=s.createQuery,e=s.executeQuery,n=s.modalAnchor,s=s.queryDescription,o=t.get();t._renderPreview(),(0,y.showTransformModal)({container:n||S.qD,json:o,queryDescription:s,createQuery:r,executeQuery:e,onTransform:function(i){t.executeWithBusyMessage(function(){var l=e(o,i);t._setAndFireOnChange(l)},"transforming...")}})},"parsing...")},a.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this._debouncedValidate=null,this.history&&(this.history.clear(),this.history=null),this.frameFocusTracker.destroy()},a.compact=function(){var t=this.get(),r=JSON.stringify(t);this._setTextAndFireOnChange(r,t)},a.format=function(){var t=this.get(),r=JSON.stringify(t,null,this.indentation);this._setTextAndFireOnChange(r,t)},a.repair=function(){var t=this.getText();try{var r=(0,U.K)(t);this._setTextAndFireOnChange(r)}catch{}},a.focus=function(){this.dom.transform.focus()},a.set=function(t){this.history&&this.history.clear(),this._set(t)},a.update=function(t){this._set(t)},a._set=function(t){this.text=void 0,this.json=t,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},a._setAndFireOnChange=function(t){this._set(t),this._onChange()},a.get=function(){var t;return this.json===void 0&&(t=this.getText(),this.json=(0,f.parse)(t)),this.json},a.getText=function(){return this.text===void 0&&(this.text=JSON.stringify(this.json,null,this.indentation),this.options.escapeUnicode===!0)&&(this.text=(0,f.escapeUnicodeChars)(this.text)),this.text},a.setText=function(t){this.history&&this.history.clear(),this._setText(t)},a.updateText=function(t){this.getText()!==t&&this._setText(t)},a._setText=function(t,r){var e;this.options.escapeUnicode===!0?this.text=(0,f.escapeUnicodeChars)(t):this.text=t,this.json=r,this._renderPreview(),this.json===void 0?(e=this).executeWithBusyMessage(function(){try{e.json=e.get(),e._renderPreview(),e._pushHistory()}catch{}},"parsing..."):this._pushHistory(),this._debouncedValidate()},a._setTextAndFireOnChange=function(t,r){this._setText(t,r),this._onChange()},a._applyHistory=function(t){this.json=t.json,this.text=t.text,this._renderPreview(),this._debouncedValidate()},a._pushHistory=function(){var t;this.history&&(t={text:this.text,json:this.json},this.history.add(t))},a.executeWithBusyMessage=function(t,r){var e;this.getText().length>S.EX?((0,f.addClassName)((e=this).frame,"busy"),e.dom.busyContent.innerText=r,setTimeout(function(){t(),(0,f.removeClassName)(e.frame,"busy"),e.dom.busyContent.innerText=""},100)):t()},a.validate=h.validate,a._renderErrors=h._renderErrors,[{mode:"preview",mixin:a,data:"json"}])},6210:function(le,U,Z){Z.r(U),Z.d(U,{showSortModal:function(){return j}});var U=Z(483),S=Z.n(U),M=Z(7907),K=Z(9791);function j(z,f,N,A){var m=Array.isArray(f)?(0,K.getChildPaths)(f):[""],T=A&&A.path&&(0,K.contains)(m,A.path)?A.path:m[0],y=A&&A.direction||"asc",f='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,M.Iu)("sort")+"</div><form><table><tbody><tr> <td>"+(0,M.Iu)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+(0,M.Iu)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+(0,M.Iu)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,M.Iu)("sortAscending")+'" title="'+(0,M.Iu)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,M.Iu)("sortDescending")+'" title="'+(0,M.Iu)("sortDescendingTitle")+'" data-value="desc" class="jsoneditor-button-last jsoneditor-button-desc"/> </div> </td></tr><tr><td colspan="2" class="jsoneditor-modal-input jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,M.Iu)("ok")+'" /></td></tr></tbody></table></form></div>';S()({parent:z,content:f,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(h){var a=h.modalElem().querySelector("form"),c=h.modalElem().querySelector("#ok"),t=h.modalElem().querySelector("#field"),r=h.modalElem().querySelector("#direction");function e(n){r.value=n,r.className="jsoneditor-button-group jsoneditor-button-group-value-"+r.value}m.forEach(function(n){var s,o=document.createElement("option");o.text=(s=n)===""?"@":s[0]==="."?s.slice(1):s,o.value=n,t.appendChild(o)}),t.value=T||m[0],e(y||"asc"),r.onclick=function(n){e(n.target.getAttribute("data-value"))},c.onclick=function(n){n.preventDefault(),n.stopPropagation(),h.close(),N({path:t.value,direction:r.value})},a&&(a.onsubmit=c.onclick)}).afterClose(function(h){h.destroy()}).show()}},2558:function(le,S,Z){Z.r(S),Z.d(S,{showTransformModal:function(){return T}});var S=Z(483),U=Z.n(S),S=Z(3879),M=Z.n(S),K=Z(7907);function j(y){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(y)}function z(y,f,h,a){if(typeof y=="boolean"||y instanceof Boolean||y===null||typeof y=="number"||y instanceof Number||typeof y=="string"||y instanceof String||y instanceof Date)return JSON.stringify(y);if(Array.isArray(y)){for(var c=y,t=f,r=h,e=a,n=t?r+t:void 0,s=t?`[
`:"[",o=0;o<c.length;o++){var i=c[o];if(t&&(s+=n),s+=i!==void 0&&typeof i!="function"?z(i,t,n,e):"null",o<c.length-1&&(s+=t?`,
`:","),s.length>e)return s+"..."}return s+=t?`
`+r+"]":"]"}if(y&&j(y)==="object"){var l,d=y,C=f,r=h,p=a,w=C?r+C:void 0,x=!0,$=C?`{
`:"{";if(typeof d.toJSON=="function")return z(d.toJSON(),C,r,p);for(l in d)if(function(O,u){return Object.prototype.hasOwnProperty.call(O,u)}(d,l)){var H=d[l];if(x?x=!1:$+=C?`,
`:",",($=($+=C?w+'"'+l+'": ':'"'+l+'":')+z(H,C,w,p)).length>p)return $+"..."}return $+=C?`
`+r+"}":"}"}}function P(y,f){for(var h="";0<f--;)h+=y;return h}var N=Z(9791),A=Z(4188),m='Enter a <a href="http://jmespath.org" target="_blank">JMESPath</a> query to filter, sort, or transform the JSON data.<br/>To learn JMESPath, go to <a href="http://jmespath.org/tutorial.html" target="_blank">the interactive tutorial</a>.';function T(n){var f=n.container,h=n.json,a=n.queryDescription,a=a===void 0?m:a,c=n.createQuery,t=n.executeQuery,r=n.onTransform,e=h,n='<label class="pico-modal-contents"><div class="pico-modal-header">'+(0,K.Iu)("transform")+"</div><p>"+a+'</p><div class="jsoneditor-jmespath-label">'+(0,K.Iu)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+(0,K.Iu)("transformWizardFilter")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-filter-field" > <select id="filterField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-relation" > <select id="filterRelation"> <option value="==">==</option> <option value="!=">!=</option> <option value="<">&lt;</option> <option value="<=">&lt;=</option> <option value=">">&gt;</option> <option value=">=">&gt;=</option> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-value" > <input type="text" class="value" placeholder="value..." id="filterValue" /> </div> </td> </tr> <tr> <th>'+(0,K.Iu)("transformWizardSortBy")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-sort-field"> <select id="sortField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-sort-order" > <select id="sortOrder"> <option value="asc">Ascending</option> <option value="desc">Descending</option> </select> </div> </td> </tr> <tr id="selectFieldsPart"> <th>'+(0,K.Iu)("transformWizardSelectFields")+'</th> <td class="jsoneditor-jmespath-filter"> <select class="jsoneditor-jmespath-select-fields" id="selectFields" multiple></select> </td> </tr> </tbody> </table></div><div class="jsoneditor-jmespath-label">'+(0,K.Iu)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+(0,K.Iu)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,K.Iu)("transformPreviewLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="preview" class="jsoneditor-transform-preview" readonly> </textarea></div><div class="jsoneditor-jmespath-block jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,K.Iu)("ok")+'" autofocus /></div></div>';U()({parent:f,content:n,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(s){var o=s.modalElem(),B=o.querySelector("#wizard"),i=o.querySelector("#ok"),l=o.querySelector("#filterField"),d=o.querySelector("#filterRelation"),C=o.querySelector("#filterValue"),p=o.querySelector("#sortField"),w=o.querySelector("#sortOrder"),x=o.querySelector("#selectFields"),$=o.querySelector("#query"),H=o.querySelector("#preview");Array.isArray(e)||(B.style.fontStyle="italic",B.textContent="(wizard not available for objects, only for arrays)"),(0,N.getChildPaths)(h).forEach(function(Q){var Q=v(Q),X=document.createElement("option"),X=(X.text=Q,X.value=Q,l.appendChild(X),document.createElement("option"));X.text=Q,X.value=Q,p.appendChild(X)});var B=(0,N.getChildPaths)(h,!0).filter(function(J){return J!==""}),B=(0<B.length?B.forEach(function(Q){var Q=v(Q),X=document.createElement("option");X.text=Q,X.value=Q,x.appendChild(X)}):(B=o.querySelector("#selectFieldsPart"))&&(B.style.display="none"),new(M())(l,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."})),O=new(M())(d,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),u=new(M())(p,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),I=new(M())(w,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),L=new(M())(x,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function v(J){return J===""?"@":J[0]==="."?J.slice(1):J}B.on("selectr.change",F),O.on("selectr.change",F),C.oninput=F,u.on("selectr.change",F),I.on("selectr.change",F),L.on("selectr.change",F),o.querySelector(".pico-modal-contents").onclick=function(J){J.target.nodeName!=="A"&&J.preventDefault()};var _=(0,N.debounce)(function(){try{var J=t(e,$.value);H.className="jsoneditor-transform-preview",H.value=(Q=J,X=2,te=A.WF,typeof X=="number"?10<X?E=P(" ",10):1<=X&&(E=P(" ",X)):typeof X=="string"&&X!==""&&(E=X),(X=z(Q,E,"",te)).length>te?(Q=X,(typeof(E=te)=="number"?Q.slice(0,E):Q)+"..."):X),i.disabled=!1}catch(G){H.className="jsoneditor-transform-preview jsoneditor-error",H.value=G.toString(),i.disabled=!0}var Q,X,te,E},300);function W(J,Q){try{$.value=c(J,Q),i.disabled=!1,_()}catch(X){J='Error: an error happened when executing "createQuery": '+(X.message||X.toString()),$.value="",i.disabled=!0,H.className="jsoneditor-transform-preview jsoneditor-error",H.value=J}}function F(){var J={};if(l.value&&d.value&&C.value&&(J.filter={field:l.value,relation:d.value,value:C.value}),p.value&&w.value&&(J.sort={field:p.value,direction:w.value}),x.value){for(var Q,X=[],te=0;te<x.options.length;te++)x.options[te].selected&&(Q=x.options[te].value,X.push(Q));J.projection={fields:X}}W(h,J)}$.oninput=_,i.onclick=function(J){J.preventDefault(),J.stopPropagation(),s.close(),r($.value)},W(h,{}),setTimeout(function(){$.select(),$.focus(),$.selectionStart=3,$.selectionEnd=3})}).afterClose(function(s){s.destroy()}).show()}},8458:function(le,r,Z){Z.r(r),Z.d(r,{textModeMixins:function(){return s}});var U=Z(1262),r=Z(8170),S=Z.n(r),M=Z(4188),K=Z(6436),j=Z(2474),z=Z(7907),P=Z(6056),N=Z(6617),A=Z(6210),m=Z(2558),T=Z(9125),y=Z(7026),f=Z(9791);function h(o){return(h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}function a(o,i){for(var l=0;l<i.length;l++){var d=i[l];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(o,function(C){return C=function(p,w){if(h(p)!=="object"||p===null)return p;var x=p[Symbol.toPrimitive];if(x===void 0)return(w==="string"?String:Number)(p);if(x=x.call(p,w||"default"),h(x)!=="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}(C,"string"),h(C)==="symbol"?C:String(C)}(d.key),d)}}var c=function(){function o(d,C){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.schema=d,this.schemaRefs=C||{},this.suggestions={},this.suggestionsRefs={},this._buildSuggestions()}var i,l;return i=o,(l=[{key:"_buildSuggestions",value:function(){for(var d in this._handleSchemaEntry("",this.schema,this.suggestions),this.schemaRefs)this.suggestionsRefs[d]={},this._handleSchemaEntry("",this.schemaRefs[d],this.suggestionsRefs[d])}},{key:"_handleRef",value:function(d,C,p){p[d]=p[d]||{},p[d].refs=p[d].refs||[],p[d].refs=(0,f.uniqueMergeArrays)(p[d].refs,[C])}},{key:"_handleSchemaEntry",value:function(d,C,p){if(C)if(C.$ref)this._handleRef(d,C.$ref,p);else{var w=this._checkOfConditon(C);if(w)this._handleOfCondition(d,C[w],p);else switch(C.type){case"object":this._handleObject(d,C,p);break;case"string":case"number":case"integer":this._handlePrimitive(d,C,p);break;case"boolean":this._handleBoolean(d,C,p);break;case"array":this._handleArray(d,C,p)}}else console.error("SchemaTextCompleter: schema node is missing for path",d)}},{key:"_handleObject",value:function(d,C,p){var w,x=this;(0,f.isObject)(C.properties)&&(w=Object.keys(C.properties),p[d]=p[d]||{},p[d].props=p[d].props||[],p[d].props=(0,f.uniqueMergeArrays)(p[d].props,w),w.forEach(function($){(0,f.asyncExec)(function(){x._handleSchemaEntry("".concat(d,"/").concat($),C.properties[$],p)})}))}},{key:"_handlePrimitive",value:function(d,C,p){p[d]=p[d]||{},(0,f.isArray)(C.examples)&&(p[d].examples=p[d].examples||[],p[d].examples=(0,f.uniqueMergeArrays)(p[d].examples,C.examples)),(0,f.isArray)(C.enum)&&(p[d].enum=p[d].enum||[],p[d].enum=(0,f.uniqueMergeArrays)(p[d].enum,C.enum))}},{key:"_handleBoolean",value:function(d,C,p){p[d]||(p[d]={bool:[!0,!1]})}},{key:"_handleArray",value:function(d,C,p){var w=this;C.items&&(0,f.asyncExec)(function(){w._handleSchemaEntry("".concat(d,"/\\d+"),C.items,p)})}},{key:"_handleOfCondition",value:function(d,C,p){var w=this;C&&C.length&&C.forEach(function(x){(0,f.asyncExec)(function(){w._handleSchemaEntry(d,x,p)})})}},{key:"_checkOfConditon",value:function(d){if(d)return d.oneOf?"oneOf":d.anyOf?"anyOf":d.allOf?"allOf":void 0}},{key:"getCompletions",value:function(d,C,p,w,x){var $=this;try{var H=y.parse(C.getValue()).pointers||{},B=function(O){function u(v){var _,W={props:"property",enum:"enum",bool:"boolean",examples:"examples"};O&&(_=O[v])!=null&&_.length&&(I=I.concat(O[v].map(function(F){return{caption:F+"",meta:"schema [".concat(W[v],"]"),score:L++,value:F+""}})))}var I=[],L=0;u("props"),u("enum"),u("bool"),u("examples"),I.length&&x(null,I)};Object.keys(H).forEach(function(O){(0,f.asyncExec)(function(){function u(v,_,W){var F,J=Object.keys(_).reduce(function(E,G){return new RegExp("^".concat(W).concat(G)).test(v)&&(!E||E.length<G.length)?G:E});if(typeof J=="string"){if((F=_[J])!=null&&(F=F.refs)!=null&&F.length){var Q,X={};for(Q in _[J].refs){var te=_[J].refs[Q];$.suggestionsRefs[te]&&((te=u(v,$.suggestionsRefs[te],"".concat(W).concat(J)))!=null&&te.enum&&(X.enum=(0,f.uniqueMergeArrays)(X.enum,te.enum)),te!=null&&te.examples&&(X.examples=(0,f.uniqueMergeArrays)(X.examples,te.examples)),te!=null&&te.bool&&(X.bool=(0,f.uniqueMergeArrays)(X.bool,te.bool)),te!=null)&&te.props&&(X.props=(0,f.uniqueMergeArrays)(X.props,te.props))}return X}if(new RegExp("^".concat(W).concat(J,"$")).test(v))return _[J]}}var I,L;((L=H[O].key)==null?void 0:L.line)===p.row&&p.column>=H[O].key.column&&p.column<=H[O].keyEnd.column&&(I=O.slice(0,O.lastIndexOf("/"))),(I=((L=H[O].value)==null?void 0:L.line)===p.row&&((L=H[O].value)==null?void 0:L.line)===((L=H[O].valueEnd)==null?void 0:L.line)&&p.column>=H[O].value.column&&p.column<=H[O].valueEnd.column?O:I)&&(L=u(I,$.suggestions,""),B(L))})})}catch{}}}])&&a(i.prototype,l),Object.defineProperty(i,"prototype",{writable:!1}),o}();function t(o){return(t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(o)}var r={},e="ace/theme/jsoneditor";function n(){try{this.format()}catch{}}r.create=function(x){var i,l,d,C=this,p=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},$=(p.statusBar===void 0&&(p.statusBar=!0),p.mainMenuBar=p.mainMenuBar!==!1,p.enableSort=p.enableSort!==!1,p.enableTransform=p.enableTransform!==!1,p.createQuery=p.createQuery||P.r,p.executeQuery=p.executeQuery||P.J,p.showErrorTable=p.showErrorTable!==void 0?p.showErrorTable:["text","preview"],typeof(this.options=p).indentation=="number"?this.indentation=Number(p.indentation):this.indentation=2,(0,z.cC)(this.options.languages),(0,z.m0)(this.options.language),p.ace||S()),w=(this.mode=p.mode==="code"?"code":"text",this.mode==="code"&&$===void 0&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=p.theme||e,this.theme===e&&$&&(0,T.O)(),p.onTextSelectionChange&&this.onTextSelectionChange(p.onTextSelectionChange),this),x=(this.container=x,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0,this._debouncedValidate=(0,f.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=x.clientWidth,this.height=x.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(H){H.preventDefault()},this.frame.onkeydown=function(H){w._onKeyDown(H)},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),x=(this.frameFocusTracker=new j.R(x),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,f.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(x=document.createElement("button")).type="button",x.className="jsoneditor-format",x.title=(0,z.Iu)("formatTitle"),this.menu.appendChild(x),x.onclick=function(){try{w.format(),w._onChange()}catch(H){w._onError(H)}},(x=document.createElement("button")).type="button",x.className="jsoneditor-compact",x.title=(0,z.Iu)("compactTitle"),this.menu.appendChild(x),x.onclick=function(){try{w.compact(),w._onChange()}catch(H){w._onError(H)}},this.options.enableSort&&((x=document.createElement("button")).type="button",x.className="jsoneditor-sort",x.title=(0,z.Iu)("sortTitleShort"),x.onclick=function(){w._showSortModal()},this.menu.appendChild(x)),this.options.enableTransform&&((x=document.createElement("button")).type="button",x.title=(0,z.Iu)("transformTitleShort"),x.className="jsoneditor-transform",x.onclick=function(){w._showTransformModal()},this.menu.appendChild(x)),(x=document.createElement("button")).type="button",x.className="jsoneditor-repair",x.title=(0,z.Iu)("repairTitle"),this.menu.appendChild(x),x.onclick=function(){try{w.repair(),w._onChange()}catch(H){w._onError(H)}},this.mode==="code"&&((x=document.createElement("button")).type="button",x.className="jsoneditor-undo jsoneditor-separator",x.title=(0,z.Iu)("undo"),x.onclick=function(){C.aceEditor.getSession().getUndoManager().undo()},this.menu.appendChild(x),this.dom.undo=x,(x=document.createElement("button")).type="button",x.className="jsoneditor-redo",x.title=(0,z.Iu)("redo"),x.onclick=function(){C.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(x),this.dom.redo=x),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new N.x(this.menu,this.options.modes,this.options.mode,function(H){try{w.setMode(H),w.modeSwitcher.focus()}catch(B){w._onError(B)}})),this.mode==="code")&&((i=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),i.href="https://ace.c9.io/",i.target="_blank",i.className="jsoneditor-poweredBy",i.onclick=function(){window.open(i.href,i.target,"noreferrer")},this.menu.appendChild(i)),this.options.onEditable&&t(this.options.onEditable==="function")&&!this.options.onEditable({})),$=(this.frame.appendChild(this.content),this.container.appendChild(this.frame),this.mode==="code"?(this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom),d=($=$.edit(this.editorDom)).getSession(),$.$blockScrolling=1/0,$.setTheme(this.theme),$.setOptions({readOnly:x}),$.setShowPrintMargin(!1),$.setFontSize("14px"),d.setMode("ace/mode/json"),d.setTabSize(this.indentation),d.setUseSoftTabs(!0),d.setUseWrapMode(!0),l=d.setAnnotations,d.setAnnotations=function(H){l.call(this,H&&H.length?H:w.annotations)},$.commands.bindKey("Ctrl-L",null),$.commands.bindKey("Command-L",null),$.commands.bindKey("Ctrl-\\",null),$.commands.bindKey("Command-\\",null),$.commands.bindKey("Ctrl-Shift-\\",null),$.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=$).on("change",this._onChange.bind(this)),$.on("changeSelection",this._onSelect.bind(this))):((d=document.createElement("textarea")).className="jsoneditor-text",d.spellcheck=!1,this.content.appendChild(d),this.textarea=d,this.textarea.readOnly=x,this.textarea.oninput===null?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),d.onselect=this._onSelect.bind(this),d.onmousedown=this._onMouseDown.bind(this),d.onblur=this._onBlur.bind(this)),this._updateHistoryButtons(),Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):this.options.showErrorTable===!0);this.errorTable=new K.Q({errorTableVisible:$,onToggleVisibility:function(){w._validateAndCatch()},onFocusLine:function(H){w.isFocused=!0,isNaN(H)||w.setTextSelection({row:H,column:1},{row:H,column:1e3})},onChangeHeight:function(H){H=H+(w.dom.statusBar?w.dom.statusBar.clientHeight:0)+1,w.content.style.marginBottom=-H+"px",w.content.style.paddingBottom=H+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),p.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},x=document.createElement("div"),(this.dom.statusBar=x).className="jsoneditor-statusbar",this.frame.appendChild(x),(d=document.createElement("span")).className="jsoneditor-curserinfo-label",d.innerText="Ln:",($=document.createElement("span")).className="jsoneditor-curserinfo-val",$.innerText="1",x.appendChild(d),x.appendChild($),(p=document.createElement("span")).className="jsoneditor-curserinfo-label",p.innerText="Col:",(d=document.createElement("span")).className="jsoneditor-curserinfo-val",d.innerText="1",x.appendChild(p),x.appendChild(d),this.curserInfoElements.colVal=d,this.curserInfoElements.lnVal=$,(p=document.createElement("span")).className="jsoneditor-curserinfo-label",p.innerText="characters selected",p.style.display="none",(d=document.createElement("span")).className="jsoneditor-curserinfo-count",d.innerText="0",d.style.display="none",this.curserInfoElements.countLabel=p,this.curserInfoElements.countVal=d,x.appendChild(d),x.appendChild(p),x.appendChild(this.errorTable.getErrorCounter()),x.appendChild(this.errorTable.getWarningIcon()),x.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},r._onSchemaChange=function(o,i){this.aceEditor&&(this.options.allowSchemaSuggestions&&o?(this.aceEditor.setOption("enableBasicAutocompletion",[new c(o,i)]),this.aceEditor.setOption("enableLiveAutocompletion",!0)):(this.aceEditor.setOption("enableBasicAutocompletion",void 0),this.aceEditor.setOption("enableLiveAutocompletion",!1)))},r._onChange=function(){var o=this;if(!this.onChangeDisabled){if(setTimeout(function(){o._updateHistoryButtons&&o._updateHistoryButtons()}),this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(i){console.error("Error in onChange callback: ",i)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(i){console.error("Error in onChangeText callback: ",i)}}},r._updateHistoryButtons=function(){var o;this.aceEditor&&this.dom.undo&&this.dom.redo&&(o=this.aceEditor.getSession().getUndoManager())&&o.hasUndo&&o.hasRedo&&(this.dom.undo.disabled=!o.hasUndo(),this.dom.redo.disabled=!o.hasRedo())},r._showSortModal=function(){try{var o=this,i=this.options.modalAnchor||M.qD,l=this.get();(0,A.showSortModal)(i,l,function(d){var C;Array.isArray(l)&&(C=(0,f.sort)(l,d.path,d.direction),o.sortedBy=d,o.update(C)),(0,f.isObject)(l)&&(C=(0,f.sortObjectKeys)(l,d.direction),o.sortedBy=d,o.update(C))},o.sortedBy)}catch(d){this._onError(d)}},r._showTransformModal=function(){var o=this;try{var i=this.options,l=i.modalAnchor,d=i.createQuery,C=i.executeQuery,p=i.queryDescription,w=this.get();(0,m.showTransformModal)({container:l||M.qD,json:w,queryDescription:p,createQuery:d,executeQuery:C,onTransform:function(x){x=C(w,x),o.update(x)}})}catch(x){this._onError(x)}},r._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},r._onKeyDown=function(o){var i=!1;(o.which||o.keyCode)===73&&o.ctrlKey&&(o.shiftKey?this.compact():this.format(),this._onChange(),i=!0),i&&(o.preventDefault(),o.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},r._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},r._onBlur=function(){var o=this;setTimeout(function(){o.isFocused||(o._updateCursorInfo(),o._emitSelectionChange()),o.isFocused=!1})},r._updateCursorInfo=function(){var o,i,l,d,C,p=this;function w(){p.curserInfoElements.countVal.innerText!==C&&(p.curserInfoElements.countVal.innerText=C,p.curserInfoElements.countVal.style.display=C?"inline":"none",p.curserInfoElements.countLabel.style.display=C?"inline":"none"),p.curserInfoElements.lnVal.innerText=l,p.curserInfoElements.colVal.innerText=d}this.textarea?setTimeout(function(){var x=(0,f.getInputSelection)(p.textarea);x.startIndex!==x.endIndex&&(C=x.endIndex-x.startIndex),d=(C&&p.cursorInfo&&p.cursorInfo.line===x.end.row&&p.cursorInfo.column===x.end.column?(l=x.start.row,x.start):(l=x.end.row,x.end)).column,p.cursorInfo={line:l,column:d,count:C},p.options.statusBar&&w()},0):this.aceEditor&&this.curserInfoElements&&(o=this.aceEditor.getCursorPosition(),i=this.aceEditor.getSelectedText(),l=o.row+1,d=o.column+1,C=i.length,p.cursorInfo={line:l,column:d,count:C},this.options.statusBar)&&w()},r._emitSelectionChange=function(){var o;this._selectionChangedHandler&&(o=this.getTextSelection(),this._selectionChangedHandler(o.start,o.end,o.text))},r._refreshAnnotations=function(){var o,i=this.aceEditor&&this.aceEditor.getSession();i&&(o=i.getAnnotations().filter(function(l){return l.type==="error"}),i.setAnnotations(o))},r.destroy=function(){this.aceEditor&&(this.aceEditor.destroy(),this.aceEditor=null),this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.textarea=null,this._debouncedValidate=null,this.frameFocusTracker.destroy()},r.compact=function(){var o=this.get(),o=JSON.stringify(o);this.updateText(o)},r.format=function(){var o=this.get(),o=JSON.stringify(o,null,this.indentation);this.updateText(o)},r.repair=function(){var o=this.getText();try{var i=(0,U.K)(o);this.updateText(i)}catch{}},r.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},r.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},r.set=function(o){this.setText(JSON.stringify(o,null,this.indentation))},r.update=function(o){this.updateText(JSON.stringify(o,null,this.indentation))},r.get=function(){var o=this.getText();return(0,f.parse)(o)},r.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},r._setText=function(C,i){var l,d=this,C=this.options.escapeUnicode===!0?(0,f.escapeUnicodeChars)(C):C;this.textarea&&(this.textarea.value=C),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(C,-1),this.onChangeDisabled=!1,i&&(l=this,setTimeout(function(){l.aceEditor&&l.aceEditor.session.getUndoManager().reset()})),setTimeout(function(){d._updateHistoryButtons&&d._updateHistoryButtons()})),this._debouncedValidate()},r.setText=function(o){this._setText(o,!0)},r.updateText=function(o){this.getText()!==o&&this._setText(o,!1)},r.validate=function(){var o,i=this,l=[],d=[];try{var C=this.get(),p=(this.validateSchema&&!this.validateSchema(C)&&(l=this.validateSchema.errors.map(function(x){return x.type="validation",(0,f.improveSchemaError)(x)})),this.validationSequence=(this.validationSequence||0)+1,this),w=this.validationSequence;return function(x,$){if(!$)return Promise.resolve([]);try{var H=$(x);return((0,f.isPromise)(H)?H:Promise.resolve(H)).then(function(B){return Array.isArray(B)?B.filter(function(O){var u=(0,f.isValidValidationError)(O);return u||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',O),u}).map(function(O){return{dataPath:(0,f.stringifyPath)(O.path),message:O.message,type:"customValidation"}}):[]})}catch(B){return Promise.reject(B)}}(C,this.options.onValidate).then(function(x){return w===p.validationSequence&&(x=l.concat(d).concat(x),p._renderErrors(x),typeof i.options.onValidationError=="function"&&(0,f.isValidationErrorChanged)(x,i.lastSchemaErrors)&&i.options.onValidationError.call(i,x),i.lastSchemaErrors=x),i.lastSchemaErrors})}catch(x){return this.getText()&&((C=/\w*line\s*(\d+)\w*/g.exec(x.message))&&(o=+C[1]),d=[{type:"error",message:x.message.replace(/\n/g,"<br>"),line:o}]),this._renderErrors(d),typeof this.options.onValidationError=="function"&&(0,f.isValidationErrorChanged)(d,this.lastSchemaErrors)&&this.options.onValidationError.call(this,d),this.lastSchemaErrors=d,Promise.resolve(this.lastSchemaErrors)}},r._validateAndCatch=function(){this.validate().catch(function(o){console.error("Error running validation:",o)})},r._renderErrors=function(o){var l=this.getText(),i=[],l=(o.reduce(function(d,C){return typeof C.dataPath=="string"&&d.indexOf(C.dataPath)===-1&&d.push(C.dataPath),d},i),(0,f.getPositionForPath)(l,i));this.aceEditor&&(this.annotations=l.map(function(d){var C=o.filter(function(w){return w.dataPath===d.path}),p=C.map(function(w){return w.message}).join(`
`);return p?{row:d.line,column:d.column,text:"Schema validation error"+(C.length!==1?"s":"")+`:
`+p,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(o,l),this.aceEditor&&this.aceEditor.resize(!1)},r.getTextSelection=function(){var o,i,l,d={};return this.textarea?(l=(0,f.getInputSelection)(this.textarea),this.cursorInfo&&this.cursorInfo.line===l.end.row&&this.cursorInfo.column===l.end.column?(d.start=l.end,d.end=l.start):d=l,{start:d.start,end:d.end,text:this.textarea.value.substring(l.startIndex,l.endIndex)}):this.aceEditor?(l=this.aceEditor.getSelection(),o=this.aceEditor.getSelectedText(),i=l.getRange(),(l=l.getSelectionLead()).row===i.end.row&&l.column===i.end.column?d=i:(d.start=i.end,d.end=i.start),{start:{row:d.start.row+1,column:d.start.column+1},end:{row:d.end.row+1,column:d.end.column+1},text:o}):void 0},r.onTextSelectionChange=function(o){typeof o=="function"&&(this._selectionChangedHandler=(0,f.debounce)(o,this.DEBOUNCE_INTERVAL))},r.setTextSelection=function(o,i){var l,d,C;o&&i&&(this.textarea?(l=(0,f.getIndexForPosition)(this.textarea,o.row,o.column),C=(0,f.getIndexForPosition)(this.textarea,i.row,i.column),-1<l&&-1<C&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(l,C)):this.textarea.createTextRange&&((d=this.textarea.createTextRange()).collapse(!0),d.moveEnd("character",C),d.moveStart("character",l),d.select()),C=(this.textarea.value.match(/\n/g)||[]).length+1,l=this.textarea.scrollHeight/C,d=o.row*l,this.textarea.scrollTop=d>this.textarea.clientHeight?d-this.textarea.clientHeight/2:0)):this.aceEditor&&(C={start:{row:o.row-1,column:o.column-1},end:{row:i.row-1,column:i.column-1}},this.aceEditor.selection.setRange(C),this.aceEditor.scrollToLine(o.row-1,!0)))};var s=[{mode:"text",mixin:r,data:"text",load:n},{mode:"code",mixin:r,data:"text",load:n}]},8038:function(le,J,X){X.r(J),X.d(J,{treeModeMixins:function(){return te}});var U={start:function(E,G,V){return G.indexOf(E)===0},contain:function(E,G,V){return-1<G.indexOf(E)}},S=X(897),M=X(2474);function K(E){return(K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G})(E)}function j(E,G){for(var V=0;V<G.length;V++){var b=G[V];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(E,function(k){return k=function(R,D){if(K(R)!=="object"||R===null)return R;var Y=R[Symbol.toPrimitive];if(Y===void 0)return(D==="string"?String:Number)(R);if(Y=Y.call(R,D||"default"),K(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),K(k)==="symbol"?k:String(k)}(b.key),b)}}var z=function(){function E(){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");this.locked=!1}var G,V;return G=E,(V=[{key:"highlight",value:function(b){this.locked||(this.node!==b&&(this.node&&this.node.setHighlight(!1),this.node=b,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var b;this.locked||(b=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){b.node.setHighlight(!1),b.node=void 0,b.unhighlightTimer=void 0},0))}},{key:"_cancelUnhighlight",value:function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}}])&&j(G.prototype,V),Object.defineProperty(G,"prototype",{writable:!1}),E}(),P=X(7907),N=X(6056),A=X(6617),J=X(233),m=X.n(J),T=X(2602),y=X(9791),f=X(6210),h=X(2558),a=X(4188);function c(E){return function(G){if(Array.isArray(G))return n(G)}(E)||function(G){if(typeof Symbol!="undefined"&&G[Symbol.iterator]!=null||G["@@iterator"]!=null)return Array.from(G)}(E)||e(E)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function t(E,G){return function(V){if(Array.isArray(V))return V}(E)||function(V,b){var k=V==null?null:typeof Symbol!="undefined"&&V[Symbol.iterator]||V["@@iterator"];if(k!=null){var R,D,Y,re,pe=[],me=!0,ye=!1;try{if(Y=(k=k.call(V)).next,b===0){if(Object(k)!==k)return;me=!1}else for(;!(me=(R=Y.call(k)).done)&&(pe.push(R.value),pe.length!==b);me=!0);}catch(Ee){ye=!0,D=Ee}finally{try{if(!me&&k.return!=null&&(re=k.return(),Object(re)!==re))return}finally{if(ye)throw D}}return pe}}(E,G)||e(E,G)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function r(E,G){var V,b,k,R,D=typeof Symbol!="undefined"&&E[Symbol.iterator]||E["@@iterator"];if(D)return b=!(V=!0),{s:function(){D=D.call(E)},n:function(){var Y=D.next();return V=Y.done,Y},e:function(Y){b=!0,k=Y},f:function(){try{V||D.return==null||D.return()}finally{if(b)throw k}}};if(Array.isArray(E)||(D=e(E))||G&&E&&typeof E.length=="number")return D&&(E=D),R=0,{s:G=function(){},n:function(){return R>=E.length?{done:!0}:{done:!1,value:E[R++]}},e:function(Y){throw Y},f:G};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e(E,G){var V;if(E)return typeof E=="string"?n(E,G):(V=(V=Object.prototype.toString.call(E).slice(8,-1))==="Object"&&E.constructor?E.constructor.name:V)==="Map"||V==="Set"?Array.from(E):V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V)?n(E,G):void 0}function n(E,G){(G==null||G>E.length)&&(G=E.length);for(var V=0,b=new Array(G);V<G;V++)b[V]=E[V];return b}function s(E){return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G})(E)}function o(E,G){for(var V=0;V<G.length;V++){var b=G[V];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(E,function(k){return k=function(R,D){if(s(R)!=="object"||R===null)return R;var Y=R[Symbol.toPrimitive];if(Y===void 0)return(D==="string"?String:Number)(R);if(Y=Y.call(R,D||"default"),s(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),s(k)==="symbol"?k:String(k)}(b.key),b)}}var i=function(){function E(b,k){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");this.editor=b,this.dom={},this.expanded=!1,k&&k instanceof Object?(this.setField(k.field,k.fieldEditable),"value"in k&&this.setValue(k.value,k.type),"internalValue"in k&&this.setInternalValue(k.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=(0,y.debounce)(this._onChangeValue.bind(this),E.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,y.debounce)(this._onChangeField.bind(this),E.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}var G,V;return G=E,(V=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:l}},{key:"_updateEditability",value:function(){var b,k;this.editable={field:!0,value:!0},this.editor&&(this.editable.field=this.editor.options.mode==="tree",this.editable.value=this.editor.options.mode!=="view",this.editor.options.mode!=="tree"&&this.editor.options.mode!=="form"||typeof this.editor.options.onEditable!="function"||(b=this.getValue.bind(this),typeof(k=this.editor.options.onEditable({field:this.field,get value(){return b()},path:this.getPath()}))=="boolean"?(this.editable.field=k,this.editable.value=k):s(k)==="object"&&k!==null?(typeof k.field=="boolean"&&(this.editable.field=k.field),typeof k.value=="boolean"&&(this.editable.value=k.value)):(console.error("Invalid return value for function onEditable.","Actual value:",k,".","Either a boolean or object { field: boolean, value: boolean } expected."),this.editable.field=!1,this.editable.value=!1)))}},{key:"getPath",value:function(){for(var b=this,k=[];b;){var R=b.getName();R!==void 0&&k.unshift(R),b=b.parent}return k}},{key:"getInternalPath",value:function(){for(var b=this,k=[];b;)b.parent&&k.unshift(b.getIndex()),b=b.parent;return k}},{key:"getName",value:function(){return this.parent?this.parent.type!=="array"?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(b){if(b){if(b.length===0)return this;if(b.length&&this.childs&&this.childs.length){for(var k=0;k<this.childs.length;++k)if(""+b[0]==""+this.childs[k].getName())return this.childs[k].findNodeByPath(b.slice(1))}}}},{key:"findNodeByInternalPath",value:function(b){if(b){for(var D=this,k=0;k<b.length&&D;k++)var R=b[k],D=D.childs[R];return D}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(b){for(var k=(0,y.parsePath)(b),R=this;R&&0<k.length;)(function(){var D=k.shift();if(typeof D=="number"){if(R.type!=="array")throw new Error("Cannot get child node at index "+D+": node is no array");R=R.childs[D]}else{if(R.type!=="object")throw new Error("Cannot get child node "+D+": node is no object");R=R.childs.filter(function(Y){return Y.field===D})[0]}})();return R}},{key:"findParents",value:function(){for(var b=[],k=this.parent;k;)b.unshift(k),k=k.parent;return b}},{key:"setError",value:function(b,k){this.error=b,this.errorChild=k,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var b=this,k=this.fieldError||this.valueError||this.error,R=this.dom.tdError;if(k&&this.dom&&this.dom.tr){(0,y.addClassName)(this.dom.tr,"jsoneditor-validation-error"),R||(R=document.createElement("td"),this.dom.tdError=R,this.dom.tdValue.parentNode.appendChild(R));var D=document.createElement("button"),Y=(D.type="button",D.className="jsoneditor-button jsoneditor-schema-error",function(){b.dom.popupAnchor&&b.dom.popupAnchor.destroy()}),re=function(){delete b.dom.popupAnchor},pe=function(be){var Ee=b.editor.frame,be=(b.dom.popupAnchor=(0,T.w)(D,b.editor.getPopupAnchor(),re,be),D.getBoundingClientRect()),Ee=120<Ee.getBoundingClientRect().width-be.x?"jsoneditor-above":"jsoneditor-left",be=document.createElement("div");be.className="jsoneditor-popover "+Ee,be.appendChild(document.createTextNode(k.message)),b.dom.popupAnchor.appendChild(be)},me=(D.onmouseover=function(){b.dom.popupAnchor||pe(!0)},D.onfocus=function(){Y(),pe(!1)},D.onblur=function(){Y()},this.errorChild);for(me&&(D.onclick=function(){me.findParents().forEach(function(ye){ye.expand(!1)}),me.scrollTo(function(){me.focus()})});R.firstChild;)R.removeChild(R.firstChild);R.appendChild(D)}else this.dom.tr&&(0,y.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),R&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){var b;return this.parent?(b=this.parent.childs.indexOf(this))!==-1?b:null:-1}},{key:"setParent",value:function(b){this.parent=b}},{key:"setField",value:function(b,k){this.field=b,this.previousField=b,this.fieldEditable=k===!0}},{key:"getField",value:function(){return this.field===void 0&&this._getDomField(),this.field}},{key:"setValue",value:function(b,k){var R,D,Y,re,pe,me,ye=this.childs;if(this.type=this._getType(b),k&&k!==this.type){if(k!=="string"||this.type!=="auto")throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+k+'"');this.type=k}if(this.type==="array"){for(this.childs||(this.childs=[]),R=0;R<b.length;R++)(pe=b[R])===void 0||pe instanceof Function||(R<this.childs.length?((Y=this.childs[R]).fieldEditable=!1,Y.index=R,Y.setValue(pe)):(Y=new E(this.editor,{value:pe}),re=R<this.getMaxVisibleChilds(),this.appendChild(Y,re,!1)));for(D=this.childs.length;D>=b.length;D--)this.removeChild(this.childs[D],!1)}else if(this.type==="object"){for(this.childs||(this.childs=[]),D=this.childs.length-1;0<=D;D--)p(b,this.childs[D].field)||this.removeChild(this.childs[D],!1);for(var Ee in R=0,b)p(b,Ee)&&((pe=b[Ee])===void 0||pe instanceof Function||((me=this.findChildByProperty(Ee))?(me.setField(Ee,!0),me.setValue(pe)):(me=new E(this.editor,{field:Ee,value:pe}),Ee=R<this.getMaxVisibleChilds(),this.appendChild(me,Ee,!1))),R++);!(this.value="")===this.editor.options.sortObjectKeys&&this.sort([],"asc",!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=b;Array.isArray(ye)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(b){var k,R,D,Y,re,pe=this.childs;if(this.type=b.type,b.type==="array"){for(this.childs||(this.childs=[]),Y=0;Y<b.childs.length;Y++)(k=b.childs[Y])===void 0||k instanceof Function||(Y<this.childs.length?((R=this.childs[Y]).fieldEditable=!1,R.index=Y,R.setInternalValue(k)):(R=new E(this.editor,{internalValue:k}),D=Y<this.getMaxVisibleChilds(),this.appendChild(R,D,!1)));for(re=this.childs.length;re>=b.childs.length;re--)this.removeChild(this.childs[re],!1)}else if(b.type==="object"){for(this.childs||(this.childs=[]),Y=0;Y<b.childs.length;Y++)(k=b.childs[Y])===void 0||k instanceof Function||(Y<this.childs.length?(delete(R=this.childs[Y]).index,R.setField(k.field,!0),R.setInternalValue(k.value)):(R=new E(this.editor,{field:k.field,internalValue:k.value}),D=Y<this.getMaxVisibleChilds(),this.appendChild(R,D,!1)));for(re=this.childs.length;re>=b.childs.length;re--)this.removeChild(this.childs[re],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=b.value;Array.isArray(pe)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var b;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(b=this._detachFromDom(),this.clearDom(),this._attachToDom(b)):this.clearDom()}},{key:"getValue",value:function(){var b,k;return this.type==="array"?(b=[],this.childs.forEach(function(R){b.push(R.getValue())}),b):this.type==="object"?(k={},this.childs.forEach(function(R){k[R.getField()]=R.getValue()}),k):(this.value===void 0&&this._getDomValue(),this.value)}},{key:"getInternalValue",value:function(){return this.type==="array"?{type:this.type,childs:this.childs.map(function(b){return b.getInternalValue()})}:this.type==="object"?{type:this.type,childs:this.childs.map(function(b){return{field:b.getField(),value:b.getInternalValue()}})}:(this.value===void 0&&this._getDomValue(),{type:this.type,value:this.value})}},{key:"getLevel",value:function(){return this.parent?this.parent.getLevel()+1:0}},{key:"getNodePath",value:function(){var b=this.parent?this.parent.getNodePath():[];return b.push(this),b}},{key:"clone",value:function(){var b,k;return(b=new E(this.editor)).type=this.type,b.field=this.field,b.fieldInnerText=this.fieldInnerText,b.fieldEditable=this.fieldEditable,b.previousField=this.previousField,b.value=this.value,b.valueInnerText=this.valueInnerText,b.previousValue=this.previousValue,b.expanded=this.expanded,b.visibleChilds=this.visibleChilds,this.childs?(k=[],this.childs.forEach(function(R){R=R.clone(),R.setParent(b),k.push(R)}),b.childs=k):b.childs=void 0,b}},{key:"expand",value:function(b){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),b!==!1&&this.childs.forEach(function(k){k.expand(b)}),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(b){this.childs&&(this.hideChilds(),b!==!1&&this.childs.forEach(function(k){k.collapse(b)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var b=this.childs;if(b&&this.expanded){var b=this.dom.tr,k=b?b.parentNode:void 0;if(k){for(var R=this.getAppendDom(),D=(R.parentNode||((Y=b.nextSibling)?k.insertBefore(R,Y):k.appendChild(R)),Math.min(this.childs.length,this.visibleChilds)),Y=this._getNextTr(),re=0;re<D;re++){var pe=this.childs[re];pe.getDom().parentNode||k.insertBefore(pe.getDom(),Y),pe.showChilds()}b=this.getShowMoreDom(),Y=this._getNextTr(),b.parentNode||k.insertBefore(b,Y),this.showMore.updateDom()}}}},{key:"_getNextTr",value:function(){return this.showMore&&this.showMore.getDom().parentNode?this.showMore.getDom():this.append&&this.append.getDom().parentNode?this.append.getDom():void 0}},{key:"hide",value:function(b){var k=this.dom.tr,R=k?k.parentNode:void 0;R&&R.removeChild(k),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(b)}},{key:"hideChilds",value:function(b){var k;this.childs&&this.expanded&&((k=this.getAppendDom()).parentNode&&k.parentNode.removeChild(k),this.childs.forEach(function(R){R.hide()}),(k=this.getShowMoreDom()).parentNode&&k.parentNode.removeChild(k),b&&!b.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var b,k;this.dom.field&&this.editor&&this.editor.options&&typeof this.editor.options.onClassName=="function"&&this.dom.tree&&((0,y.removeAllClassNames)(this.dom.tree),b=this.getValue.bind(this),k=this.editor.options.onClassName({path:this.getPath(),field:this.field,get value(){return b()}})||"",(0,y.addClassName)(this.dom.tree,"jsoneditor-values "+k))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var b=0;b<this.childs.length;b++)this.childs[b].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var b=this.parent;b;)b.expanded||b.expand(),b=b.parent}},{key:"appendChild",value:function(b,k,R){var D,Y;this._hasChilds()&&(b.setParent(this),b.fieldEditable=this.type==="object",this.type==="array"&&(b.index=this.childs.length),this.type==="object"&&b.field===void 0&&b.setField(""),this.childs.push(b),this.expanded&&k!==!1&&(k=b.getDom(),Y=(D=this._getNextTr())?D.parentNode:void 0,D&&Y&&Y.insertBefore(k,D),b.showChilds(),this.visibleChilds++),R!==!1)&&(this.updateDom({updateIndexes:!0}),b.updateDom({recurse:!0}))}},{key:"moveBefore",value:function(b,k,R){var D,Y,re;this._hasChilds()&&((D=this.dom.tr?this.dom.tr.parentNode:void 0)&&((Y=document.createElement("tr")).style.height=D.clientHeight+"px",D.appendChild(Y)),b.parent&&b.parent.removeChild(b),k instanceof w||!k?this.childs.length+1>this.visibleChilds?(re=this.childs[this.visibleChilds-1],this.insertBefore(b,re,R)):this.appendChild(b,!0,R):this.insertBefore(b,k,R),D)&&Y&&D.removeChild(Y)}},{key:"insertBefore",value:function(b,k,R){if(this._hasChilds()){if(this.visibleChilds++,this.type==="object"&&b.field===void 0&&b.setField(""),k===this.append)b.setParent(this),b.fieldEditable=this.type==="object",this.childs.push(b);else{var D=this.childs.indexOf(k);if(D===-1)throw new Error("Node not found");b.setParent(this),b.fieldEditable=this.type==="object",this.childs.splice(D,0,b)}var Y;this.expanded&&(D=b.getDom(),Y=(k=k.getDom())?k.parentNode:void 0,k&&Y&&Y.insertBefore(D,k),b.showChilds(),this.showChilds()),R!==!1&&(this.updateDom({updateIndexes:!0}),b.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(b,k){this._hasChilds()&&(k=this.childs.indexOf(k),(k=this.childs[k+1])?this.insertBefore(b,k):this.appendChild(b))}},{key:"search",value:function(b,k){Array.isArray(k)||(k=[]);var R=b?b.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,this.field!==void 0&&k.length<=this.MAX_SEARCH_RESULTS&&(String(this.field).toLowerCase().indexOf(R)!==-1&&(this.searchField=!0,k.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach(function(D){D.search(b,k)}):this.value!==void 0&&k.length<=this.MAX_SEARCH_RESULTS&&(String(this.value).toLowerCase().indexOf(R)!==-1&&(this.searchValue=!0,k.push({node:this,elem:"value"})),this._updateDomValue()),k}},{key:"scrollTo",value:function(b){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,b)}},{key:"expandPathToNode",value:function(){for(var b=this;b&&b.parent;){for(var k=b.parent.type==="array"?b.index:b.parent.childs.indexOf(b);b.parent.visibleChilds<k+1;)b.parent.visibleChilds+=this.getMaxVisibleChilds();b.parent.expand(!1),b=b.parent}}},{key:"focus",value:function(b){if(E.focusElement=b,this.dom.tr&&this.dom.tr.parentNode){var k=this.dom;switch(b){case"drag":(k.drag||k.menu).focus();break;case"menu":k.menu.focus();break;case"expand":this._hasChilds()?k.expand.focus():k.field&&this.fieldEditable?(k.field.focus(),(0,y.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,y.selectContentEditable)(k.value)):k.menu.focus();break;case"field":k.field&&this.fieldEditable?(k.field.focus(),(0,y.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,y.selectContentEditable)(k.value)):(this._hasChilds()?k.expand:k.menu).focus();break;default:k.select?k.select.focus():k.value&&!this._hasChilds()?(k.value.focus(),(0,y.selectContentEditable)(k.value)):k.field&&this.fieldEditable?(k.field.focus(),(0,y.selectContentEditable)(k.field)):(this._hasChilds()?k.expand:k.menu).focus()}}}},{key:"containsNode",value:function(b){if(this===b)return!0;var k=this.childs;if(k){for(var R=0,D=k.length;R<D;R++)if(k[R].containsNode(b))return!0}return!1}},{key:"removeChild",value:function(b,k){if(this.childs){var R=this.childs.indexOf(b);if(R!==-1)return R<this.visibleChilds&&this.expanded&&this.visibleChilds--,b.hide(),delete b.searchField,delete b.searchValue,(b=this.childs.splice(R,1)[0]).parent=null,k!==!1&&this.updateDom({updateIndexes:!0}),b}}},{key:"_remove",value:function(b){this.removeChild(b)}},{key:"changeType",value:function(b){var k,R=this.type;R!==b&&(b!=="string"&&b!=="auto"||R!=="string"&&R!=="auto"?(k=this._detachFromDom(),this.clearDom(),(this.type=b)==="object"?(this.childs||(this.childs=[]),this.childs.forEach(function(D){D.clearDom(),delete D.index,D.fieldEditable=!0,D.field===void 0&&(D.field="")}),R!=="string"&&R!=="auto"||(this.expanded=!0)):b==="array"?(this.childs||(this.childs=[]),this.childs.forEach(function(D,Y){D.clearDom(),D.fieldEditable=!1,D.index=Y}),R!=="string"&&R!=="auto"||(this.expanded=!0)):this.expanded=!1,this._attachToDom(k)):this.type=b,b!=="auto"&&b!=="string"||(this.value=b==="string"?String(this.value):(0,y.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(b){var k;if(this.type==="array"){if(!Array.isArray(b)||this.childs.length!==b.length)return!1;for(k=0;k<this.childs.length;k++)if(!this.childs[k].deepEqual(b[k]))return!1}else if(this.type==="object"){if(s(b)!=="object"||!b)return!1;var R=Object.keys(b);if(this.childs.length!==R.length)return!1;for(k=0;k<R.length;k++){var D=this.childs[k];if(D.field!==R[k]||!D.deepEqual(b[D.field]))return!1}}else if(this.value!==b)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&this.type!=="array"&&this.type!=="object"&&(this.valueInnerText=(0,y.getInnerText)(this.dom.value),this.valueInnerText==="")&&this.dom.value.innerHTML!==""&&(this.dom.value.textContent=""),this.valueInnerText!==void 0)try{var b,k;(k=this.type==="string"?this._unescapeHTML(this.valueInnerText):(b=this._unescapeHTML(this.valueInnerText),(0,y.parseString)(b)))!==this.value&&(this.value=k,this._debouncedOnChangeValue())}catch{this._setValueError((0,P.Iu)("cannotParseValueError"))}}},{key:"_setValueError",value:function(b){this.valueError={message:b},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(b){this.fieldError={message:b},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var b,k=this.editor.getDomSelection(),R=(k.range&&(R=(0,y.textDiff)(String(this.value),String(this.previousValue)),k.range.startOffset=R.start,k.range.endOffset=R.end),this.editor.getDomSelection());R.range&&(b=(0,y.textDiff)(String(this.previousValue),String(this.value)),R.range.startOffset=b.start,R.range.endOffset=b.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:k,newSelection:R}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var b=this.editor.getDomSelection(),k=this.previousField||"",R=(b.range&&(R=(0,y.textDiff)(this.field,k),b.range.startOffset=R.start,b.range.endOffset=R.end),this.editor.getDomSelection());R.range&&(k=(0,y.textDiff)(k,this.field),R.range.startOffset=k.start,R.range.endOffset=k.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:b,newSelection:R}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var b=this.dom.value;if(b){var k=["jsoneditor-value"],R=this.value,D=this.type==="auto"?(0,y.getType)(R):this.type,Y=D==="string"&&(0,y.isUrl)(R);if(k.push("jsoneditor-"+D),Y&&k.push("jsoneditor-url"),String(this.value)===""&&this.type!=="array"&&this.type!=="object"&&k.push("jsoneditor-empty"),this.searchValueActive&&k.push("jsoneditor-highlight-active"),this.searchValue&&k.push("jsoneditor-highlight"),b.className=k.join(" "),D==="array"||D==="object"?(k=this.childs?this.childs.length:0,b.title=this.type+" containing "+k+" items"):Y&&this.editable.value?b.title=(0,P.Iu)("openUrl"):b.title="",D==="boolean"&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value?(this.dom.select||(this.dom.select=document.createElement("select"),this.id=this.field+"_"+new Date().getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id,(k=document.createElement("option")).value="",k.textContent="--",this.dom.select.appendChild(k),this._updateEnumOptions(),this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)),this.dom.select.value=this.enum.indexOf(this.value)!==-1?this.value:"",!this.schema||p(this.schema,"oneOf")||p(this.schema,"anyOf")||p(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.textContent="")):this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML,this.dom.tdValue.appendChild(this.dom.value)),this.editor.options.colorPicker&&typeof R=="string"&&(0,y.isValidColor)(R)?(this.dom.color||(this.dom.color=document.createElement("div"),this.dom.color.className="jsoneditor-color",this.dom.tdColor=document.createElement("td"),this.dom.tdColor.className="jsoneditor-tree",this.dom.tdColor.appendChild(this.dom.color),this.dom.tdValue.parentNode.insertBefore(this.dom.tdColor,this.dom.tdValue)),(0,y.addClassName)(this.dom.value,"jsoneditor-color-value"),(this.editable.value?y.removeClassName:y.addClassName)(this.dom.color,"jsoneditor-color-readonly"),this.dom.color.style.backgroundColor=R):this._deleteDomColor(),this._showTimestampTag()){if(this.dom.date||(this.dom.date=document.createElement("div"),this.dom.date.className="jsoneditor-date",this.dom.value.parentNode.appendChild(this.dom.date)),Y=null,Y=typeof this.editor.options.timestampFormat=="function"?this.editor.options.timestampFormat({field:this.field,value:this.value,path:this.getPath()}):Y){for(;this.dom.date.firstChild;)this.dom.date.removeChild(this.dom.date.firstChild);this.dom.date.appendChild(document.createTextNode(Y))}else this.dom.date.textContent=new Date(R).toISOString();this.dom.date.title=new Date(R).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,y.stripFormatting)(b),this._updateDomDefault()}}},{key:"_updateEnumOptions",value:function(){if(this.enum&&this.dom.select){this.dom.select.innerHTML="";for(var b=0;b<this.enum.length;b++){var k=document.createElement("option");k.value=this.enum[b],k.textContent=this.enum[b],this.dom.select.appendChild(k)}}}},{key:"_deleteDomColor",value:function(){this.dom.color&&(this.dom.tdColor.parentNode.removeChild(this.dom.tdColor),delete this.dom.tdColor,delete this.dom.color,(0,y.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var b,k=this.dom.field;k&&((b=(0,y.makeFieldTooltip)(this.schema,this.editor.options.language))&&(k.title=b),(String(this.field)===""&&this.parent&&this.parent.type!=="array"?y.addClassName:y.removeClassName)(k,"jsoneditor-empty"),(this.searchFieldActive?y.addClassName:y.removeClassName)(k,"jsoneditor-highlight-active"),(this.searchField?y.addClassName:y.removeClassName)(k,"jsoneditor-highlight"),(0,y.stripFormatting)(k))}},{key:"_getDomField",value:function(b){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,y.getInnerText)(this.dom.field),this.fieldInnerText==="")&&this.dom.field.innerHTML!==""&&(this.dom.field.textContent=""),this.fieldInnerText!==void 0)try{var k=this._unescapeHTML(this.fieldInnerText),R=this.parent.getFieldNames(this);R.indexOf(k)!==-1?b?(k=(0,y.findUniqueName)(k,R))!==this.field&&(this.field=k,this._debouncedOnChangeField()):this._setFieldError((0,P.Iu)("duplicateFieldError")):k!==this.field&&(this.field=k,this._debouncedOnChangeField())}catch{this._setFieldError((0,P.Iu)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){var b;this.schema&&this.schema.default!==void 0&&!this._hasChilds()&&(b=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(b.title=(0,P.Iu)("default"),(0,y.addClassName)(b,"jsoneditor-is-default"),y.removeClassName):(b.removeAttribute("title"),(0,y.removeClassName)(b,"jsoneditor-is-default"),y.addClassName))(b,"jsoneditor-is-not-default")}},{key:"_showTimestampTag",value:function(){var b,k;return typeof this.value=="number"&&(typeof(b=this.editor.options.timestampTag)=="function"?typeof(k=b({field:this.field,value:this.value,path:this.getPath()}))=="boolean"?k:(0,y.isTimestamp)(this.field,this.value):b===!0&&(0,y.isTimestamp)(this.field,this.value))}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var b,k,R=this.dom;return R.tr||(this._updateEditability(),R.tr=document.createElement("tr"),(R.tr.node=this).editor.options.mode==="tree"&&(k=document.createElement("td"),this.editable.field&&this.parent&&((b=document.createElement("button")).type="button",(R.drag=b).className="jsoneditor-button jsoneditor-dragarea",b.title=(0,P.Iu)("drag"),k.appendChild(b)),R.tr.appendChild(k),b=document.createElement("td"),(k=document.createElement("button")).type="button",(R.menu=k).className="jsoneditor-button jsoneditor-contextmenu-button",k.title=(0,P.Iu)("actionsMenu"),b.appendChild(R.menu),R.tr.appendChild(b)),k=document.createElement("td"),R.tr.appendChild(k),R.tree=this._createDomTree(),k.appendChild(R.tree),this.updateDom({updateIndexes:!0})),R.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(b){for(var k=this.parent;k;){if(k===b)return!0;k=k.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(b){this.dom.tr&&((b?y.addClassName:y.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(b),this.childs)&&this.childs.forEach(function(k){k.setHighlight(b)})}},{key:"setSelected",value:function(b,k){this.selected=b,this.dom.tr&&((b?y.addClassName:y.removeClassName)(this.dom.tr,"jsoneditor-selected"),(k?y.addClassName:y.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(b),this.showMore&&this.showMore.setSelected(b),this.childs)&&this.childs.forEach(function(R){R.setSelected(b)})}},{key:"updateValue",value:function(b){this.value=b,this.previousValue=b,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(b){this.field=b,this.previousField=b,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(b){var k,R=this.dom.tree,R=(R&&(R.style.marginLeft=24*this.getLevel()+"px"),this.dom.field),R=(R&&(this.fieldEditable?(R.contentEditable=this.editable.field,R.spellcheck=!1,R.className="jsoneditor-field"):(R.contentEditable=!1,R.className="jsoneditor-readonly"),k=this.index!==void 0?this.index:this.field!==void 0?this.field:(k=this.editor.options.schema?E._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0)&&k.title?k.title:this._hasChilds()?this.type:"",k=this._escapeHTML(k),document.activeElement!==R&&k!==this._unescapeHTML((0,y.getInnerText)(R))&&(R.innerHTML=k),this._updateSchema(),this._updateEnumOptions()),this.dom.value),R=(R&&(this.type==="array"||this.type==="object"?this.updateNodeName():(k=this._escapeHTML(this.value),document.activeElement!==R&&k!==this._unescapeHTML((0,y.getInnerText)(R))&&(R.innerHTML=k))),this.dom.tr);R&&(this.type==="array"||this.type==="object"?((0,y.addClassName)(R,"jsoneditor-expandable"),this.expanded?((0,y.addClassName)(R,"jsoneditor-expanded"),(0,y.removeClassName)(R,"jsoneditor-collapsed")):((0,y.addClassName)(R,"jsoneditor-collapsed"),(0,y.removeClassName)(R,"jsoneditor-expanded"))):((0,y.removeClassName)(R,"jsoneditor-expandable"),(0,y.removeClassName)(R,"jsoneditor-expanded"),(0,y.removeClassName)(R,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),b&&b.updateIndexes===!0&&this._updateDomIndexes(),b&&b.recurse===!0&&this.childs&&this.childs.forEach(function(D){D.updateDom(b)}),this.error&&this.updateError(),this.append&&this.append.updateDom(),this.showMore&&this.showMore.updateDom(),this._updateCssClassName()}},{key:"_updateSchema",value:function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?E._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=E._findEnum(this.schema):delete this.enum)}},{key:"_updateDomIndexes",value:function(){var b=this.dom.value,k=this.childs;b&&k&&(this.type==="array"?k.forEach(function(R,D){R.index=D,R=R.dom.field,R&&(R.textContent=D)}):this.type==="object"&&k.forEach(function(R){R.index!==void 0&&(delete R.index,R.field===void 0)&&(R.field="")}))}},{key:"_createDomValue",value:function(){var b;return this.type==="array"?(b=document.createElement("div")).textContent="[...]":this.type==="object"?(b=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,y.isUrl)(this.value)?(b=document.createElement("a")).href=this.value:((b=document.createElement("div")).contentEditable=this.editable.value,b.spellcheck=!1),b.innerHTML=this._escapeHTML(this.value)),b}},{key:"_createDomExpandButton",value:function(){var b=document.createElement("button");return b.type="button",this._hasChilds()?(b.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",b.title=(0,P.Iu)("expandTitle")):(b.className="jsoneditor-button jsoneditor-invisible",b.title=""),b}},{key:"_createDomTree",value:function(){var b=this.dom,k=document.createElement("table"),D=document.createElement("tbody"),R=(k.style.borderCollapse="collapse",k.className="jsoneditor-values",k.appendChild(D),document.createElement("tr")),D=(D.appendChild(R),document.createElement("td")),D=(D.className="jsoneditor-tree",R.appendChild(D),b.expand=this._createDomExpandButton(),D.appendChild(b.expand),b.tdExpand=D,document.createElement("td")),D=(D.className="jsoneditor-tree",R.appendChild(D),b.field=this._createDomField(),D.appendChild(b.field),b.tdField=D,document.createElement("td")),D=(D.className="jsoneditor-tree",R.appendChild(D),this.type!=="object"&&this.type!=="array"&&(D.appendChild(document.createTextNode(":")),D.className="jsoneditor-separator"),b.tdSeparator=D,document.createElement("td"));return D.className="jsoneditor-tree",R.appendChild(D),b.value=this._createDomValue(),D.appendChild(b.value),b.tdValue=D,k}},{key:"onEvent",value:function(b){var k,R=b.type,D=b.target||b.srcElement,Y=this.dom,re=this,pe=this._hasChilds(),me=(D!==Y.drag&&D!==Y.menu||(R==="mouseover"?this.editor.highlighter.highlight(this):R==="mouseout"&&this.editor.highlighter.unhighlight()),R==="click"&&D===Y.menu&&((k=re.editor.highlighter).highlight(re),k.lock(),(0,y.addClassName)(Y.menu,"jsoneditor-selected"),this.showContextMenu(Y.menu,function(){(0,y.removeClassName)(Y.menu,"jsoneditor-selected"),k.unlock(),k.unhighlight()})),R==="click"&&D===Y.expand&&pe&&(Se=b.ctrlKey,this._onExpand(Se)),R!=="click"||b.target!==re.dom.tdColor&&b.target!==re.dom.color||!this.editable.value||this._showColorPicker(),R==="change"&&D===Y.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),R==="change"&&D===Y.select&&(this.dom.value.innerHTML=this._escapeHTML(Y.select.value),this._getDomValue(),this._updateDomValue()),Y.value);if(D===me)switch(R){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var ye=this._escapeHTML(this.value);ye!==this._unescapeHTML((0,y.getInnerText)(me))&&(me.innerHTML=ye);break;case"input":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":b.ctrlKey&&this.editable.value&&(0,y.isUrl)(this.value)&&(b.preventDefault(),window.open(this.value,"_blank","noreferrer"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){re._getDomValue(),re._updateDomValue()},1)}var Ee=Y.field;if(D===Ee)switch(R){case"blur":this._getDomField(!0),this._updateDomField();var be=this._escapeHTML(this.field);be!==this._unescapeHTML((0,y.getInnerText)(Ee))&&(Ee.innerHTML=be);break;case"input":this._getDomField(),this._updateSchema(),this._updateDomField(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"keyup":this._getDomField(),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){re._getDomField(),re._updateDomField()},1)}var Se=Y.tree;Se&&D===Se.parentNode&&R==="click"&&!b.hasMoved&&((b.offsetX!==void 0?b.offsetX<24*(this.getLevel()+1):b.pageX<(0,y.getAbsoluteLeft)(Y.tdSeparator))||pe?Ee&&((0,y.setEndOfContentEditable)(Ee),Ee.focus()):me&&!this.enum&&((0,y.setEndOfContentEditable)(me),me.focus())),(D!==Y.tdExpand||pe)&&D!==Y.tdField&&D!==Y.tdSeparator||R!=="click"||b.hasMoved||Ee&&((0,y.setEndOfContentEditable)(Ee),Ee.focus()),R==="keydown"&&this.onKeyDown(b),typeof this.editor.options.onEvent=="function"&&this._onEvent(b)}},{key:"_onEvent",value:function(b){var R=b.target,k=R===this.dom.field,R=R===this.dom.value||R===this.dom.checkbox||R===this.dom.select;(k||R)&&(k={field:this.getField(),path:this.getPath()},R&&!this._hasChilds()&&(k.value=this.getValue()),this.editor.options.onEvent(k,b))}},{key:"onKeyDown",value:function(b){var k,R,D,Y,re,pe,me,ye,Ee,be,Se,we,Ne,Pe,Te=b.which||b.keyCode,ce=b.target||b.srcElement,fe=b.ctrlKey,Ae=b.shiftKey,Ie=b.altKey,ne=!1,ie=this.editor.options.mode==="tree",ge=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],xe=ge[0],Me=ge[ge.length-1];Te===13?ce===this.dom.value?this.editable.value&&!b.ctrlKey||(0,y.isUrl)(this.value)&&(window.open(this.value,"_blank","noreferrer"),ne=!0):ce===this.dom.expand&&this._hasChilds()&&(Ne=b.ctrlKey,this._onExpand(Ne),ce.focus(),ne=!0):Te===68?fe&&ie&&(E.onDuplicate(ge),ne=!0):Te===69?fe&&(this._onExpand(Ae),ce.focus(),ne=!0):Te===77&&ie?fe&&(this.showContextMenu(ce),ne=!0):Te===46&&ie?fe&&(E.onRemove(ge),ne=!0):Te===45&&ie?fe&&!Ae?(this._onInsertBefore(),ne=!0):fe&&Ae&&(this._onInsertAfter(),ne=!0):Te===35?Ie&&((Ne=this._lastNode())&&Ne.focus(E.focusElement||this._getElementName(ce)),ne=!0):Te===36?Ie&&((Ne=this._firstNode())&&Ne.focus(E.focusElement||this._getElementName(ce)),ne=!0):Te===37?Ie&&!Ae?((Ne=this._previousElement(ce))&&this.focus(this._getElementName(Ne)),ne=!0):Ie&&Ae&&ie&&(Ne=Me.expanded?(Ne=Me.getAppendDom())?Ne.nextSibling:void 0:Me.getDom().nextSibling)&&(Se=E.getNodeFromTarget(Ne),Ne=Ne.nextSibling,we=E.getNodeFromTarget(Ne),Se)&&Se instanceof w&&Me.parent.childs.length!==1&&we&&we.parent&&(R=this.editor.getDomSelection(),D=(Y=xe.parent).childs[Me.getIndex()+1]||Y.append,re=xe.getIndex(),pe=we.getIndex(),me=Y.getInternalPath(),ye=we.parent.getInternalPath(),ge.forEach(function(He){we.parent.moveBefore(He,we)}),this.focus(E.focusElement||this._getElementName(ce)),this.editor._onAction("moveNodes",{count:ge.length,fieldNames:ge.map(C),oldParentPath:Y.getInternalPath(),newParentPath:xe.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:xe.getIndex(),oldIndexRedo:re,newIndexRedo:pe,oldParentPathRedo:me,newParentPathRedo:ye,oldSelection:R,newSelection:this.editor.getDomSelection()})):Te===38?Ie&&!Ae?((k=this._previousNode())&&(this.editor.deselect(!0),k.focus(E.focusElement||this._getElementName(ce))),ne=!0):!Ie&&fe&&Ae&&ie?((k=this._previousNode())&&((be=this.editor.multiselection).start=be.start||this,be.end=k,Ee=this.editor._findTopLevelNodes(be.start,be.end),this.editor.select(Ee),k.focus("field")),ne=!0):Ie&&Ae&&ie&&((k=xe._previousNode())&&k.parent&&(R=this.editor.getDomSelection(),D=(Y=xe.parent).childs[Me.getIndex()+1]||Y.append,re=xe.getIndex(),pe=k.getIndex(),me=Y.getInternalPath(),ye=k.parent.getInternalPath(),ge.forEach(function(He){k.parent.moveBefore(He,k)}),this.focus(E.focusElement||this._getElementName(ce)),this.editor._onAction("moveNodes",{count:ge.length,fieldNames:ge.map(C),oldParentPath:Y.getInternalPath(),newParentPath:xe.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:xe.getIndex(),oldIndexRedo:re,newIndexRedo:pe,oldParentPathRedo:me,newParentPathRedo:ye,oldSelection:R,newSelection:this.editor.getDomSelection()})),ne=!0):Te===39?Ie&&!Ae?((Ne=this._nextElement(ce))&&this.focus(this._getElementName(Ne)),ne=!0):Ie&&Ae&&ie&&(Ne=xe.getDom().previousSibling)&&(k=E.getNodeFromTarget(Ne))&&k.parent&&!k.isVisible()&&(R=this.editor.getDomSelection(),D=(Y=xe.parent).childs[Me.getIndex()+1]||Y.append,re=xe.getIndex(),pe=k.getIndex(),me=Y.getInternalPath(),ye=k.parent.getInternalPath(),ge.forEach(function(He){k.parent.moveBefore(He,k)}),this.focus(E.focusElement||this._getElementName(ce)),this.editor._onAction("moveNodes",{count:ge.length,fieldNames:ge.map(C),oldParentPath:Y.getInternalPath(),newParentPath:xe.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:xe.getIndex(),oldIndexRedo:re,newIndexRedo:pe,oldParentPathRedo:me,newParentPathRedo:ye,oldSelection:R,newSelection:this.editor.getDomSelection()})):Te===40&&(Ie&&!Ae?((Se=this._nextNode())&&(this.editor.deselect(!0),Se.focus(E.focusElement||this._getElementName(ce))),ne=!0):!Ie&&fe&&Ae&&ie?((Se=this._nextNode())&&((be=this.editor.multiselection).start=be.start||this,be.end=Se,Ee=this.editor._findTopLevelNodes(be.start,be.end),this.editor.select(Ee),Se.focus("field")),ne=!0):Ie&&Ae&&ie&&((Pe=(Se=(Se=(Se=Me.expanded?Me.append?Me.append._nextNode():void 0:Me._nextNode())&&!Se.isVisible()?Se.parent.showMore:Se)&&Se instanceof w?Me:Se)&&(Se._nextNode()||Se.parent.append))&&Pe.parent&&(R=this.editor.getDomSelection(),D=(Y=xe.parent).childs[Me.getIndex()+1]||Y.append,re=xe.getIndex(),pe=Pe.getIndex(),me=Y.getInternalPath(),ye=Pe.parent.getInternalPath(),ge.forEach(function(He){Pe.parent.moveBefore(He,Pe)}),this.focus(E.focusElement||this._getElementName(ce)),this.editor._onAction("moveNodes",{count:ge.length,fieldNames:ge.map(C),oldParentPath:Y.getInternalPath(),newParentPath:xe.parent.getInternalPath(),oldParentPathRedo:me,newParentPathRedo:ye,oldIndexRedo:re,newIndexRedo:pe,oldIndex:D.getIndex(),newIndex:xe.getIndex(),oldSelection:R,newSelection:this.editor.getDomSelection()})),ne=!0)),ne&&(b.preventDefault(),b.stopPropagation())}},{key:"_onExpand",value:function(b){var k,R,D;b&&(D=(R=(k=this.dom.tr.parentNode).parentNode).scrollTop,R.removeChild(k)),this.expanded?this.collapse(b):this.expand(b),b&&(R.appendChild(k),R.scrollTop=D),typeof this.editor.options.onExpand=="function"&&this.editor.options.onExpand({path:this.getPath(),isExpand:this.expanded,recursive:b})}},{key:"_showColorPicker",value:function(){var b,k;typeof this.editor.options.onColorPicker=="function"&&this.dom.color&&((b=this)._deleteDomColor(),b.updateDom(),k=(0,T.w)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(k,this.value,function(R){typeof R=="string"&&R!==b.value&&(b._deleteDomColor(),b.value=R,b.updateDom(),b._debouncedOnChangeValue())}))}},{key:"getFieldNames",value:function(b){return this.type==="object"?this.childs.filter(function(k){return k!==b}).map(function(k){return k.field}):[]}},{key:"_onInsertBefore",value:function(Y,re,pe){var D=this.editor.getDomSelection(),Y=new E(this.editor,{field:Y!==void 0?Y:"",value:re!==void 0?re:"",type:pe}),re=(Y.expand(!0),this.getInternalPath()),pe=(this.parent.insertBefore(Y,this),this.editor.highlighter.unhighlight(),Y.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertBeforeNodes",{nodes:[Y],paths:[Y.getInternalPath()],beforePath:re,parentPath:this.parent.getInternalPath(),oldSelection:D,newSelection:pe})}},{key:"_onInsertAfter",value:function(Y,re,R){var D=this.editor.getDomSelection(),Y=new E(this.editor,{field:Y!==void 0?Y:"",value:re!==void 0?re:"",type:R}),re=(Y.expand(!0),this.parent.insertAfter(Y,this),this.editor.highlighter.unhighlight(),Y.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertAfterNodes",{nodes:[Y],paths:[Y.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:D,newSelection:re})}},{key:"_onAppend",value:function(Y,re,R){var D=this.editor.getDomSelection(),Y=new E(this.editor,{field:Y!==void 0?Y:"",value:re!==void 0?re:"",type:R}),re=(Y.expand(!0),this.parent.appendChild(Y),this.editor.highlighter.unhighlight(),Y.focus("field"),this.editor.getDomSelection());this.editor._onAction("appendNodes",{nodes:[Y],paths:[Y.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:D,newSelection:re})}},{key:"_onChangeType",value:function(b){var k,R,D=this.type;b!==D&&(k=this.editor.getDomSelection(),this.changeType(b),R=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:D,newType:b,oldSelection:k,newSelection:R}))}},{key:"sort",value:function(b,k){var R,D,Y=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];typeof b=="string"&&(b=(0,y.parsePath)(b)),this._hasChilds()&&(this.hideChilds(),R=this.childs,this.childs=this.childs.concat(),D=k==="desc"?-1:1,this.type==="object"?this.childs.sort(function(re,pe){return D*m()(re.field,pe.field)}):this.childs.sort(function(me,ye){var me=me.getNestedChild(b),ye=ye.getNestedChild(b);return me?ye?(me=me.value,ye=ye.value,typeof me!="string"&&typeof ye!="string"?ye<me?D:me<ye?-D:0:D*m()(me,ye)):-D:D}),this._updateDomIndexes(),this.showChilds(),Y===!0)&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:R,newChilds:this.childs})}},{key:"update",value:function(b){var k=this.getInternalValue();this.setValue(b),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var b=this.dom.tr?this.dom.tr.parentNode:void 0,k=this.expanded?this.getAppendDom():this.getDom(),k=k&&k.parentNode?k.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:b,nextTr:k}}},{key:"_attachToDom",value:function(b){b.table&&(b.nextTr?b.table.insertBefore(this.getDom(),b.nextTr):b.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(b){if(this._hasChilds()){this.hideChilds();try{var k=this.getInternalValue(),R=this.getValue(),D=this.editor.options.executeQuery(R,b),Y=(this.setValue(D),this.getInternalValue());this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:Y}),this.showChilds()}catch(re){this.showChilds(),this.editor._onError(re)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var b=this.editor.node.getInternalValue(),k=(this.editor._setRoot(this),this.editor.node.getInternalValue());this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:b,newValue:k})}catch(R){this.editor._onError(R)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(b){for(var k=0,R=this;R&&k<b.length;)R=R.findChildByProperty(b[k]),k++;return R}},{key:"findChildByProperty",value:function(b){if(this.type==="object")return this.childs.find(function(k){return k.field===b})}},{key:"getAppendDom",value:function(){return this.append||(this.append=new w(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new $(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var b=this.parent.childs.indexOf(this);return this.parent.childs[b+1]||this.parent.append}},{key:"_previousNode",value:function(){var b=null,k=this.getDom();if(k&&k.parentNode)for(var R=k;R=R.previousSibling,b=E.getNodeFromTarget(R),R&&b&&b instanceof w&&!b.isVisible(););return b}},{key:"_nextNode",value:function(){var b=null,k=this.getDom();if(k&&k.parentNode)for(var R=k;R=R.nextSibling,b=E.getNodeFromTarget(R),R&&b&&b instanceof w&&!b.isVisible(););return b}},{key:"_firstNode",value:function(){var b=null,k=this.getDom();return k&&k.parentNode&&(k=k.parentNode.firstChild,b=E.getNodeFromTarget(k)),b}},{key:"_lastNode",value:function(){var b=null,k=this.getDom();if(k&&k.parentNode)for(var R=k.parentNode.lastChild,b=E.getNodeFromTarget(R);R&&b&&!b.isVisible();)R=R.previousSibling,b=E.getNodeFromTarget(R);return b}},{key:"_previousElement",value:function(b){var k=this.dom;switch(b){case k.value:if(this.fieldEditable)return k.field;case k.field:if(this._hasChilds())return k.expand;case k.expand:return k.menu;case k.menu:if(k.drag)return k.drag;default:return null}}},{key:"_nextElement",value:function(b){var k=this.dom;switch(b){case k.drag:return k.menu;case k.menu:if(this._hasChilds())return k.expand;case k.expand:if(this.fieldEditable)return k.field;case k.field:if(!this._hasChilds())return k.value;default:return null}}},{key:"_getElementName",value:function(b){var k=this;return Object.keys(this.dom).find(function(R){return k.dom[R]===b})}},{key:"_hasChilds",value:function(){return this.type==="array"||this.type==="object"}},{key:"addTemplates",value:function(b,k){var R=this,D=R.editor.options.templates;D!=null&&(D.length&&b.push({type:"separator"}),D.forEach(function(Y){b.push({text:Y.text,className:Y.className||"jsoneditor-type-object",title:Y.title,click:(k?function(re,pe){R._onAppend(re,pe)}:function(re,pe){R._onInsertBefore(re,pe)}).bind(this,Y.field,Y.value)})}))}},{key:"showContextMenu",value:function(b,k){var R,D=this,Y=[];this.editable.value&&Y.push({text:(0,P.Iu)("type"),title:(0,P.Iu)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:(0,P.Iu)("auto"),className:"jsoneditor-type-auto"+(this.type==="auto"?" jsoneditor-selected":""),title:(0,P.Iu)("autoType"),click:function(){D._onChangeType("auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array"+(this.type==="array"?" jsoneditor-selected":""),title:(0,P.Iu)("arrayType"),click:function(){D._onChangeType("array")}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object"+(this.type==="object"?" jsoneditor-selected":""),title:(0,P.Iu)("objectType"),click:function(){D._onChangeType("object")}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string"+(this.type==="string"?" jsoneditor-selected":""),title:(0,P.Iu)("stringType"),click:function(){D._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&Y.push({text:(0,P.Iu)("sort"),title:(0,P.Iu)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){D.showSortModal()}}),this.editor.options.enableTransform&&Y.push({text:(0,P.Iu)("transform"),title:(0,P.Iu)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){D.showTransformModal()}}),this.parent)&&Y.push({text:(0,P.Iu)("extract"),title:(0,P.Iu)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){D.extract()}}),this.parent&&this.parent._hasChilds()&&(Y.length&&Y.push({type:"separator"}),R=D.parent.childs,D===R[R.length-1]&&(R=[{text:(0,P.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,P.Iu)("autoType"),click:function(){D._onAppend("","","auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array",title:(0,P.Iu)("arrayType"),click:function(){D._onAppend("",[])}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object",title:(0,P.Iu)("objectType"),click:function(){D._onAppend("",{})}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string",title:(0,P.Iu)("stringType"),click:function(){D._onAppend("","","string")}}],D.addTemplates(R,!0),Y.push({text:(0,P.Iu)("appendText"),title:(0,P.Iu)("appendTitle"),submenuTitle:(0,P.Iu)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){D._onAppend("","","auto")},submenu:R})),R=[{text:(0,P.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,P.Iu)("autoType"),click:function(){D._onInsertBefore("","","auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array",title:(0,P.Iu)("arrayType"),click:function(){D._onInsertBefore("",[])}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object",title:(0,P.Iu)("objectType"),click:function(){D._onInsertBefore("",{})}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string",title:(0,P.Iu)("stringType"),click:function(){D._onInsertBefore("","","string")}}],D.addTemplates(R,!1),Y.push({text:(0,P.Iu)("insert"),title:(0,P.Iu)("insertTitle"),submenuTitle:(0,P.Iu)("insertSub"),className:"jsoneditor-insert",click:function(){D._onInsertBefore("","","auto")},submenu:R}),this.editable.field)&&(Y.push({text:(0,P.Iu)("duplicateText"),title:(0,P.Iu)("duplicateField"),className:"jsoneditor-duplicate",click:function(){E.onDuplicate(D)}}),Y.push({text:(0,P.Iu)("removeText"),title:(0,P.Iu)("removeField"),className:"jsoneditor-remove",click:function(){E.onRemove(D)}})),this.editor.options.onCreateMenu&&(R=D.getPath(),Y=this.editor.options.onCreateMenu(Y,{type:"single",path:R,paths:[R]})),new S.x(Y,{close:k}).show(b,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var b=this,k=this.editor.options.modalAnchor||a.qD,R=this.getValue();(0,f.showSortModal)(k,R,function(D){var Y=D.path,Y=(0,y.parsePath)(Y);b.sortedBy=D,b.sort(Y,D.direction)},b.sortedBy)}},{key:"showTransformModal",value:function(){var b=this,Y=this.editor.options,k=Y.modalAnchor,R=Y.createQuery,D=Y.executeQuery,Y=Y.queryDescription,re=this.getValue();(0,h.showTransformModal)({container:k||a.qD,json:re,queryDescription:Y,createQuery:R,executeQuery:D,onTransform:function(pe){b.transform(pe)}})}},{key:"_getType",value:function(b){return b instanceof Array?"array":b instanceof Object?"object":typeof b=="string"&&typeof(0,y.parseString)(b)!="string"?"string":"auto"}},{key:"_escapeHTML",value:function(b){return typeof b!="string"?String(b):(b=String(b).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/ {2}/g," &nbsp;").replace(/^ /,"&nbsp;").replace(/ $/,"&nbsp;"),b=(b=JSON.stringify(b)).substring(1,b.length-1),this.editor.options.escapeUnicode===!0?(0,y.escapeUnicodeChars)(b):b)}},{key:"_unescapeHTML",value:function(b){return b='"'+this._escapeJSON(b)+'"',(0,y.parse)(b).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;|\u00A0/g," ").replace(/&amp;/g,"&")}},{key:"_escapeJSON",value:function(b){for(var k="",R=0;R<b.length;){var D=b.charAt(R);D===`
`?k+="\\n":D==="\\"?(k+=D,R++,(D=b.charAt(R))!==""&&'"\\/bfnrtu'.indexOf(D)!==-1||(k+="\\"),k+=D):k+=D==='"'?'\\"':D,R++}return k}},{key:"updateNodeName",value:function(){var b=this.childs?this.childs.length:0;if(this.type==="object"||this.type==="array"){if(this.editor.options.onNodeName)try{var k=this.getValue.bind(this),R=this.editor.options.onNodeName({path:this.getPath(),size:b,type:this.type,get value(){return k()}})}catch(D){console.error("Error in onNodeName callback: ",D)}this.dom.value.textContent=this.type==="object"?"{"+(R||b)+"}":"["+(R||b)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),this.childs!=="undefined"))for(var b in this.childs)this.childs[b].recursivelyUpdateNodeName()}}])&&o(G.prototype,V),Object.defineProperty(G,"prototype",{writable:!1}),E}(),l=(i.prototype.DEBOUNCE_INTERVAL=150,i.prototype.MAX_SEARCH_RESULTS=999,100);function d(E){return E.getInternalPath()}function C(E){return E.getField()}function p(E,G){return Object.prototype.hasOwnProperty.call(E,G)}i.focusElement=void 0,i.select=function(E){setTimeout(function(){(0,y.selectContentEditable)(E)},0)},i.onDragStart=function(E,G){if(!Array.isArray(E))return i.onDragStart([E],G);var V,b,k,R,D;E.length!==0&&(V=E[0],b=E[E.length-1],k=V.parent,D=i.getNodeFromTarget(G.target),R=V.editor,D=(0,y.getAbsoluteTop)(D.dom.tr)-(0,y.getAbsoluteTop)(V.dom.tr),R.mousemove||(R.mousemove=(0,y.addEventListener)(G.view,"mousemove",function(Y){i.onDrag(E,Y)})),R.mouseup||(R.mouseup=(0,y.addEventListener)(G.view,"mouseup",function(Y){i.onDragEnd(E,Y)})),R.highlighter.lock(),R.drag={oldCursor:document.body.style.cursor,oldSelection:R.getDomSelection(),oldPaths:E.map(d),oldParent:k,oldNextNode:k.childs[b.getIndex()+1]||k.append,oldParentPathRedo:k.getInternalPath(),oldIndexRedo:V.getIndex(),mouseX:G.pageX,offsetY:D,level:V.getLevel()},document.body.style.cursor="move",G.preventDefault())},i.onDrag=function(E,G){if(!Array.isArray(E))return i.onDrag([E],G);if(E.length!==0){var V,b,k,R,D,Y=E[0].editor,re=G.pageY-Y.drag.offsetY,pe=G.pageX,me=!1,ye=E[0],Ee=ye.dom.tr,be=(0,y.getAbsoluteTop)(Ee),Se=Ee.offsetHeight;if(re<be){for(Te=Ee;Te=Te.previousSibling,ce=i.getNodeFromTarget(Te),k=Te?(0,y.getAbsoluteTop)(Te):0,Te&&re<k;);(ce=ce&&!ce.parent?void 0:ce)||(Te=(Ee=Ee.parentNode.firstChild)?Ee.nextSibling:void 0,(ce=i.getNodeFromTarget(Te))===ye&&(ce=void 0)),!(ce=ce&&ce.isVisible()&&(k=(Te=ce.dom.tr)?(0,y.getAbsoluteTop)(Te):0)+Se<re?void 0:ce)||Y.options.limitDragging!==!1&&ce.parent!==E[0].parent||(E.forEach(function(Ae){ce.parent.moveBefore(Ae,ce)}),me=!0)}else{var we=E[E.length-1];if(Se=(Ee=we.expanded&&we.append?we.append.getDom():we.dom.tr)?Ee.nextSibling:void 0){for(R=(0,y.getAbsoluteTop)(Se),V=Se;b=i.getNodeFromTarget(V),V&&(D=V.nextSibling?(0,y.getAbsoluteTop)(V.nextSibling):0,D=V?D-R:0,b&&b.parent.childs.length===E.length&&b.parent.childs[E.length-1]===we&&(be+=27),V=V.nextSibling),V&&be+D<re;);if(b&&b.parent){for(var Se=pe-Y.drag.mouseX,Se=Math.round(Se/24/2),Ne=Y.drag.level+Se,Pe=b.getLevel(),Te=b.dom.tr&&b.dom.tr.previousSibling;Pe<Ne&&Te;){var ce=i.getNodeFromTarget(Te),fe=E.some(function(Ie){return Ie===ce||ce.isDescendantOf(Ie)});if(!fe){if(!(ce instanceof w)||(fe=ce.parent.childs,fe.length===E.length&&fe[E.length-1]===we))break;Pe=(b=i.getNodeFromTarget(Te)).getLevel()}Te=Te.previousSibling}(b=b instanceof w&&!b.isVisible()&&b.parent.showMore.isVisible()?b._nextNode():b)&&(Y.options.limitDragging===!1||b.parent===E[0].parent)&&b.dom.tr&&b.dom.tr!==Ee.nextSibling&&(E.forEach(function(Ae){b.parent.moveBefore(Ae,b)}),me=!0)}}}me&&(Y.drag.mouseX=pe,Y.drag.level=ye.getLevel()),Y.startAutoScroll(re),G.preventDefault()}},i.onDragEnd=function(E,G){if(!Array.isArray(E))return i.onDrag([E],G);var V,b,k,R,D,Y,re,pe,me;E.length!==0&&(Y=E[0],V=Y.editor,Y&&Y.dom.menu&&Y.dom.menu.focus(),b=V.drag.oldParent.getInternalPath(),k=Y.parent.getInternalPath(),R=V.drag.oldParent===Y.parent,D=V.drag.oldNextNode.getIndex(),Y=Y.getIndex(),re=V.drag.oldParentPathRedo,pe=V.drag.oldIndexRedo,me=R&&pe<Y?Y+E.length:Y,R&&pe===Y||V._onAction("moveNodes",{count:E.length,fieldNames:E.map(C),oldParentPath:b,newParentPath:k,oldIndex:D,newIndex:Y,oldIndexRedo:pe,newIndexRedo:me,oldParentPathRedo:re,newParentPathRedo:null,oldSelection:V.drag.oldSelection,newSelection:V.getDomSelection()}),document.body.style.cursor=V.drag.oldCursor,V.highlighter.unlock(),E.forEach(function(ye){ye.updateDom(),G.target!==ye.dom.drag&&G.target!==ye.dom.menu&&V.highlighter.unhighlight()}),delete V.drag,V.mousemove&&((0,y.removeEventListener)(G.view,"mousemove",V.mousemove),delete V.mousemove),V.mouseup&&((0,y.removeEventListener)(G.view,"mouseup",V.mouseup),delete V.mouseup),V.stopAutoScroll(),G.preventDefault())},i._findEnum=function(E){return E.enum?E.enum:(E=E.oneOf||E.anyOf||E.allOf,E&&(E=E.filter(function(G){return G.enum}),0<E.length)?E[0].enum:null)},i._findSchema=function(E,G,V){for(var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:E,k=V.slice(1,V.length),R=V[0],D=[b],Y=0,re=[b.oneOf,b.anyOf,b.allOf];Y<re.length;Y++){var pe=re[Y];Array.isArray(pe)&&(D=D.concat(pe))}var me,ye=r(D);try{for(ye.s();!(me=ye.n()).done;){if("$ref"in(b=me.value)&&typeof b.$ref=="string"){var Ee,be=b.$ref;if(be in G)b=G[be];else{if(!be.startsWith("#/")){if(((Ee=be.match(/#\//g))==null?void 0:Ee.length)===1){var Se,we,Ne,Pe=t(be.split("#/"),2),Te=Pe[0],ce=Pe[1];if(Te in G)return Se=G[Te],we={$ref:"#/".concat(ce)},(Ne=[]).push(R),0<k.length&&Ne.push.apply(Ne,c(k)),i._findSchema(Se,G,Ne,we)}throw Error("Unable to resolve reference ".concat(be))}var fe,Ae=be.substring(2).split("/"),b=E,Ie=r(Ae);try{for(Ie.s();!(fe=Ie.n()).done;){var ne=fe.value;if(!(ne in b))throw Error("Unable to resolve reference ".concat(be));b=b[ne]}}catch(xe){Ie.e(xe)}finally{Ie.f()}}}if(R===void 0)return b;if(typeof R=="string"){if(s(b.properties)==="object"&&b.properties!==null&&R in b.properties)return b=b.properties[R],i._findSchema(E,G,k,b);if(s(b.patternProperties)==="object"&&b.patternProperties!==null){for(var ie in b.patternProperties)if(R.match(ie))return b=b.patternProperties[ie],i._findSchema(E,G,k,b)}if(s(b.additionalProperties)==="object")return b=b.additionalProperties,i._findSchema(E,G,k,b)}else if(typeof R=="number"&&s(b.items)==="object"&&b.items!==null)return b=b.items,i._findSchema(E,G,k,b)}}catch(ge){ye.e(ge)}finally{ye.f()}return null},i.onRemove=function(E){if(!Array.isArray(E))return i.onRemove([E]);var G,V,b,k,R,D;E&&0<E.length&&(G=(b=E[0]).parent,V=b.editor,b=b.getIndex(),V.highlighter.unhighlight(),k=V.getDomSelection(),i.blurNodes(E),R=V.getDomSelection(),D=E.map(d),E.forEach(function(Y){Y.parent._remove(Y)}),V._onAction("removeNodes",{nodes:E,paths:D,parentPath:G.getInternalPath(),index:b,oldSelection:k,newSelection:R}))},i.onDuplicate=function(E){if(!Array.isArray(E))return i.onDuplicate([E]);var G,V,b,k,R,D,Y;E&&0<E.length&&(G=E[E.length-1],V=G.parent,(b=G.editor).deselect(b.multiselection.nodes),k=b.getDomSelection(),R=G,D=E.map(function(re){var pe,me=re.clone();return re.parent.type==="object"&&(pe=re.parent.getFieldNames(),me.field=(0,y.findUniqueName)(re.field,pe)),V.insertAfter(me,R),R=me}),E.length===1?D[0].parent.type==="object"?(D[0].dom.field.innerHTML=E[0]._escapeHTML(E[0].field),D[0].focus("field")):D[0].focus():b.select(D),Y=b.getDomSelection(),b._onAction("duplicateNodes",{paths:E.map(d),clonePaths:D.map(d),afterPath:G.getInternalPath(),parentPath:V.getInternalPath(),oldSelection:k,newSelection:Y}))},i.getNodeFromTarget=function(E){for(;E;){if(E.node)return E.node;E=E.parentNode}},i.targetIsColorPicker=function(E){var G=i.getNodeFromTarget(E);if(G)for(var V=E&&E.parentNode;V;){if(V===G.dom.color)return!0;V=V.parentNode}return!1},i.blurNodes=function(E){var G,V;Array.isArray(E)?(G=(V=E[0]).parent,V=V.getIndex(),(G.childs[V+E.length]?G.childs[V+E.length]:G.childs[V-1]||G).focus()):i.blurNodes([E])},(x.prototype=new i).getDom=function(){var E=this.dom;if(E.tr)return E.tr;this._updateEditability();var G=document.createElement("tr"),V=(G.className="jsoneditor-append",G.node=this,E.tr=G,this.editor.options.mode==="tree"&&(E.tdDrag=document.createElement("td"),b=document.createElement("td"),E.tdMenu=b,(V=document.createElement("button")).type="button",V.className="jsoneditor-button jsoneditor-contextmenu-button",V.title="Click to open the actions menu (Ctrl+M)",E.menu=V,b.appendChild(E.menu)),document.createElement("td")),b=document.createElement("div");return b.appendChild(document.createTextNode("("+(0,P.Iu)("empty")+")")),b.className="jsoneditor-readonly",V.appendChild(b),E.td=V,E.text=b,this.updateDom(),G},x.prototype.getPath=function(){return null},x.prototype.getIndex=function(){return null},x.prototype.updateDom=function(E){var G=this.dom,V=G.td,b=(V&&(V.style.paddingLeft=24*this.getLevel()+26+"px"),G.text),b=(b&&(b.firstChild.nodeValue="("+(0,P.Iu)("empty")+" "+this.parent.type+")"),G.tr);this.isVisible()?G.tr.firstChild||(G.tdDrag&&b.appendChild(G.tdDrag),G.tdMenu&&b.appendChild(G.tdMenu),b.appendChild(V)):G.tr.firstChild&&(G.tdDrag&&b.removeChild(G.tdDrag),G.tdMenu&&b.removeChild(G.tdMenu),b.removeChild(V))},x.prototype.isVisible=function(){return this.parent.childs.length===0},x.prototype.showContextMenu=function(E,G){var V,b=this,k=[{text:(0,P.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,P.Iu)("autoType"),click:function(){b._onAppend("","","auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array",title:(0,P.Iu)("arrayType"),click:function(){b._onAppend("",[])}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object",title:(0,P.Iu)("objectType"),click:function(){b._onAppend("",{})}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string",title:(0,P.Iu)("stringType"),click:function(){b._onAppend("","","string")}}],k=(b.addTemplates(k,!0),[{text:(0,P.Iu)("appendText"),title:(0,P.Iu)("appendTitleAuto"),submenuTitle:(0,P.Iu)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){b._onAppend("","","auto")},submenu:k}]);this.editor.options.onCreateMenu&&(V=b.parent.getPath(),k=this.editor.options.onCreateMenu(k,{type:"append",path:V,paths:[V]})),new S.x(k,{close:G}).show(E,this.editor.getPopupAnchor())},x.prototype.onEvent=function(E){var G,V=E.type,b=E.target||E.srcElement,k=this.dom;b===k.menu&&(V==="mouseover"?this.editor.highlighter.highlight(this.parent):V==="mouseout"&&this.editor.highlighter.unhighlight()),V==="click"&&b===k.menu&&((G=this.editor.highlighter).highlight(this.parent),G.lock(),(0,y.addClassName)(k.menu,"jsoneditor-selected"),this.showContextMenu(k.menu,function(){(0,y.removeClassName)(k.menu,"jsoneditor-selected"),G.unlock(),G.unhighlight()})),V==="keydown"&&this.onKeyDown(E)};var w=x;function x(E){this.editor=E,this.dom={}}(H.prototype=new i).getDom=function(){var E,G,V,b,k,R;return this.dom.tr||(this._updateEditability(),this.dom.tr||(G=(E=this).parent,(k=document.createElement("a")).appendChild(document.createTextNode((0,P.Iu)("showMore"))),k.href="#",k.onclick=function(D){return G.visibleChilds=Math.floor(G.visibleChilds/G.getMaxVisibleChilds()+1)*G.getMaxVisibleChilds(),E.updateDom(),G.showChilds(),D.preventDefault(),!1},(R=document.createElement("a")).appendChild(document.createTextNode((0,P.Iu)("showAll"))),R.href="#",R.onclick=function(D){return G.visibleChilds=1/0,E.updateDom(),G.showChilds(),D.preventDefault(),!1},V=document.createElement("div"),b=document.createTextNode(this._getShowMoreText()),V.className="jsoneditor-show-more",V.appendChild(b),V.appendChild(k),V.appendChild(document.createTextNode(". ")),V.appendChild(R),V.appendChild(document.createTextNode(". ")),(k=document.createElement("td")).appendChild(V),R=document.createElement("tr"),this.editor.options.mode==="tree"&&(R.appendChild(document.createElement("td")),R.appendChild(document.createElement("td"))),R.appendChild(k),R.className="jsoneditor-show-more",this.dom.tr=R,this.dom.moreContents=V,this.dom.moreText=b),this.updateDom()),this.dom.tr},H.prototype.updateDom=function(E){var G;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(G=this.parent._getNextTr())&&G.parentNode.insertBefore(this.dom.tr,G),this.dom.moreText.nodeValue=this._getShowMoreText(),this.dom.moreContents.style.marginLeft=24*(this.getLevel()+1)+"px"):this.dom.tr&&this.dom.tr.parentNode&&this.dom.tr.parentNode.removeChild(this.dom.tr)},H.prototype._getShowMoreText=function(){return(0,P.Iu)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},H.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},H.prototype.onEvent=function(E){E.type==="keydown"&&this.onKeyDown(E)};var $=H;function H(E,G){this.editor=E,this.parent=G,this.dom={}}function B(E){return(B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G})(E)}function O(E,G){for(var V=0;V<G.length;V++){var b=G[V];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(E,function(k){return k=function(R,D){if(B(R)!=="object"||R===null)return R;var Y=R[Symbol.toPrimitive];if(Y===void 0)return(D==="string"?String:Number)(R);if(Y=Y.call(R,D||"default"),B(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),B(k)==="symbol"?k:String(k)}(b.key),b)}}var u=function(){function E(b){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");function k(R){return b.node.findNodeByInternalPath(R)}this.editor=b,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(R){k(R.parentPath).childs[R.index].updateField(R.oldValue)},redo:function(R){k(R.parentPath).childs[R.index].updateField(R.newValue)}},editValue:{undo:function(R){k(R.path).updateValue(R.oldValue)},redo:function(R){k(R.path).updateValue(R.newValue)}},changeType:{undo:function(R){k(R.path).changeType(R.oldType)},redo:function(R){k(R.path).changeType(R.newType)}},appendNodes:{undo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(Y){D.removeChild(Y)})},redo:function(R){var D=k(R.parentPath);R.nodes.forEach(function(Y){D.appendChild(Y)})}},insertBeforeNodes:{undo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(Y){D.removeChild(Y)})},redo:function(R){var D=k(R.parentPath),Y=k(R.beforePath);R.nodes.forEach(function(re){D.insertBefore(re,Y)})}},insertAfterNodes:{undo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(Y){D.removeChild(Y)})},redo:function(R){var D=k(R.parentPath),Y=k(R.afterPath);R.nodes.forEach(function(re){D.insertAfter(re,Y),Y=re})}},removeNodes:{undo:function(R){var D=k(R.parentPath),Y=D.childs[R.index]||D.append;R.nodes.forEach(function(re){D.insertBefore(re,Y)})},redo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(Y){D.removeChild(Y)})}},duplicateNodes:{undo:function(R){var D=k(R.parentPath);R.clonePaths.map(k).forEach(function(Y){D.removeChild(Y)})},redo:function(R){var D=k(R.parentPath),Y=k(R.afterPath);R.paths.map(k).forEach(function(re){var pe,me=re.clone();D.type==="object"&&(pe=D.getFieldNames(),me.field=(0,y.findUniqueName)(re.field,pe)),D.insertAfter(me,Y),Y=me})}},moveNodes:{undo:function(R){var D=k(R.oldParentPath),Y=k(R.newParentPath),re=D.childs[R.oldIndex]||D.append;Y.childs.slice(R.newIndex,R.newIndex+R.count).forEach(function(pe,me){pe.field=R.fieldNames[me],D.moveBefore(pe,re)}),R.newParentPathRedo===null&&(R.newParentPathRedo=Y.getInternalPath())},redo:function(R){var D=k(R.oldParentPathRedo),Y=k(R.newParentPathRedo),re=Y.childs[R.newIndexRedo]||Y.append;D.childs.slice(R.oldIndexRedo,R.oldIndexRedo+R.count).forEach(function(pe,me){pe.field=R.fieldNames[me],Y.moveBefore(pe,re)})}},sort:{undo:function(R){var D=k(R.path);D.hideChilds(),D.childs=R.oldChilds,D.updateDom({updateIndexes:!0}),D.showChilds()},redo:function(R){var D=k(R.path);D.hideChilds(),D.childs=R.newChilds,D.updateDom({updateIndexes:!0}),D.showChilds()}},transform:{undo:function(R){k(R.path).setInternalValue(R.oldValue)},redo:function(R){k(R.path).setInternalValue(R.newValue)}}}}var G,V;return G=E,(V=[{key:"onChange",value:function(){}},{key:"add",value:function(b,k){this.index++,this.history[this.index]={action:b,params:k,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()}},{key:"clear",value:function(){this.history=[],this.index=-1,this.onChange()}},{key:"canUndo",value:function(){return 0<=this.index}},{key:"canRedo",value:function(){return this.index<this.history.length-1}},{key:"undo",value:function(){if(this.canUndo()){var b=this.history[this.index];if(b){var k=this.actions[b.action];if(k&&k.undo){if(k.undo(b.params),b.params.oldSelection)try{this.editor.setDomSelection(b.params.oldSelection)}catch(R){console.error(R)}}else console.error(new Error('unknown action "'+b.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var b=this.history[this.index];if(b){var k=this.actions[b.action];if(k&&k.redo){if(k.redo(b.params),b.params.newSelection)try{this.editor.setDomSelection(b.params.newSelection)}catch(R){console.error(R)}}else console.error(new Error('unknown action "'+b.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&O(G.prototype,V),Object.defineProperty(G,"prototype",{writable:!1}),E}();function I(E){return(I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G})(E)}function L(E,G){for(var V=0;V<G.length;V++){var b=G[V];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(E,function(k){return k=function(R,D){if(I(R)!=="object"||R===null)return R;var Y=R[Symbol.toPrimitive];if(Y===void 0)return(D==="string"?String:Number)(R);if(Y=Y.call(R,D||"default"),I(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),I(k)==="symbol"?k:String(k)}(b.key),b)}}var v=function(){function E(re,D){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");var R=this,re=(this.editor=re,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=D,document.createElement("div")),D=((this.dom.wrapper=re).className="jsoneditor-search",D.appendChild(re),document.createElement("div")),D=((this.dom.results=D).className="jsoneditor-results",re.appendChild(D),document.createElement("div")),re=((this.dom.input=D).className="jsoneditor-frame",D.title=(0,P.Iu)("searchTitle"),re.appendChild(D),document.createElement("button")),Y=(re.type="button",re.className="jsoneditor-refresh",D.appendChild(re),document.createElement("input")),re=(Y.type="text",(this.dom.search=Y).oninput=function(pe){R._onDelayedSearch(pe)},Y.onchange=function(pe){R._onSearch()},Y.onkeydown=function(pe){R._onKeyDown(pe)},Y.onkeyup=function(pe){R._onKeyUp(pe)},re.onclick=function(pe){Y.select()},D.appendChild(Y),document.createElement("button")),re=(re.type="button",re.title=(0,P.Iu)("searchNextResultTitle"),re.className="jsoneditor-next",re.onclick=function(){R.next()},D.appendChild(re),document.createElement("button"));re.type="button",re.title=(0,P.Iu)("searchPreviousResultTitle"),re.className="jsoneditor-previous",re.onclick=function(){R.previous()},D.appendChild(re)}var G,V;return G=E,(V=[{key:"next",value:function(b){var k;this.results&&((k=this.resultIndex!==null?this.resultIndex+1:0)>this.results.length-1&&(k=0),this._setActiveResult(k,b))}},{key:"previous",value:function(b){var k,R;this.results&&(k=this.results.length-1,R=this.resultIndex!==null?this.resultIndex-1:k,this._setActiveResult(R=R<0?k:R,b))}},{key:"_setActiveResult",value:function(b,k){var R,D,Y;this.activeResult&&(R=this.activeResult.node,this.activeResult.elem==="field"?delete R.searchFieldActive:delete R.searchValueActive,R.updateDom()),this.results&&this.results[b]?(this.resultIndex=b,D=this.results[this.resultIndex].node,(Y=this.results[this.resultIndex].elem)==="field"?D.searchFieldActive=!0:D.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],D.updateDom(),D.scrollTo(function(){k&&D.focus(Y)})):(this.resultIndex=void 0,this.activeResult=void 0)}},{key:"_clearDelay",value:function(){this.timeout!==void 0&&(clearTimeout(this.timeout),delete this.timeout)}},{key:"_onDelayedSearch",value:function(b){this._clearDelay();var k=this;this.timeout=setTimeout(function(R){k._onSearch()},this.delay)}},{key:"_onSearch",value:function(b){this._clearDelay();var k=this.dom.search.value,k=0<k.length?k:void 0;if(k!==this.lastText||b){this.lastText=k,this.results=this.editor.search(k);var b=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0,R=0;if(this.activeResult){for(var D=0;D<this.results.length;D++)if(this.results[D].node===this.activeResult.node){R=D;break}}this._setActiveResult(R,!1),k!==void 0?(k=this.results.length,this.dom.results.textContent=k===0?"no\xA0results":k===1?"1\xA0result":b<k?b+"+\xA0results":k+"\xA0results"):this.dom.results.textContent=""}}},{key:"_onKeyDown",value:function(b){var k=b.which;k===27?(this.dom.search.value="",this._onSearch(),b.preventDefault(),b.stopPropagation()):k===13&&(b.ctrlKey?this._onSearch(!0):b.shiftKey?this.previous():this.next(),b.preventDefault(),b.stopPropagation())}},{key:"_onKeyUp",value:function(b){var k=b.keyCode;k!==27&&k!==13&&this._onDelayedSearch(b)}},{key:"clear",value:function(){this.dom.search.value="",this._onSearch()}},{key:"forceSearch",value:function(){this._onSearch(!0)}},{key:"isEmpty",value:function(){return this.dom.search.value===""}},{key:"destroy",value:function(){this.editor=null,this.dom.container.removeChild(this.dom.wrapper),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()}}])&&L(G.prototype,V),Object.defineProperty(G,"prototype",{writable:!1}),E}();function _(E){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G})(E)}function W(E,G){for(var V=0;V<G.length;V++){var b=G[V];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(E,function(k){return k=function(R,D){if(_(R)!=="object"||R===null)return R;var Y=R[Symbol.toPrimitive];if(Y===void 0)return(D==="string"?String:Number)(R);if(Y=Y.call(R,D||"default"),_(Y)!=="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),_(k)==="symbol"?k:String(k)}(b.key),b)}}var F=function(){function E(b,k){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function");b&&(this.root=k,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,b.appendChild(this.path),this.reset())}var G,V;return G=E,(V=[{key:"reset",value:function(){this.path.textContent=(0,P.Iu)("selectNode")}},{key:"setPath",value:function(b){var k=this;this.path.textContent="",b&&b.length&&b.forEach(function(R,D){var Y,re=document.createElement("span");re.className="jsoneditor-treepath-element",re.innerText=R.name,re.onclick=function(pe){this.selectionCallback&&this.selectionCallback(pe)}.bind(k,R),k.path.appendChild(re),R.children.length&&((Y=document.createElement("span")).className="jsoneditor-treepath-seperator",Y.textContent="\u25BA",Y.onclick=function(){k.contentMenuClicked=!0;var pe=[];R.children.forEach(function(me){pe.push({text:me.name,className:"jsoneditor-type-modes"+(b[D+1]+1&&b[D+1].name===me.name?" jsoneditor-selected":""),click:function(ye,Ee){this.contextMenuCallback&&this.contextMenuCallback(ye,Ee)}.bind(k,R,me.name)})}),new S.x(pe,{limitHeight:!0}).show(Y,k.root,!0)},k.path.appendChild(Y)),D===b.length-1&&(re=(Y||re).getBoundingClientRect().right,k.path.offsetWidth<re&&(k.path.scrollLeft=re),k.path.scrollLeft)&&((re=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",re.title="show all path",re.textContent="...",re.onclick=function(pe){(k.contentMenuClicked=!1,y.addClassName)(k.path,"show-all"),k.path.style.width=k.path.parentNode.getBoundingClientRect().width-10+"px",k.path.onblur=function(){k.contentMenuClicked?(k.contentMenuClicked=!1,k.path.focus()):((0,y.removeClassName)(k.path,"show-all"),k.path.onblur=void 0,k.path.style.width="",k.setPath(pe))}}.bind(k,b),k.path.insertBefore(re,k.path.firstChild))})}},{key:"onSectionSelected",value:function(b){typeof b=="function"&&(this.selectionCallback=b)}},{key:"onContextMenuItemSelected",value:function(b){typeof b=="function"&&(this.contextMenuCallback=b)}}])&&W(G.prototype,V),Object.defineProperty(G,"prototype",{writable:!1}),E}(),J=X(8037),Q=X.n(J),X={},te=(X.create=function(E,G){if(!E)throw new Error("No container element provided.");function V(ne){var ie,ge;document.createRange?((ie=document.createRange()).selectNodeContents(ne),ie.collapse(!1),(ge=window.getSelection()).removeAllRanges(),ge.addRange(ie)):document.selection&&((ie=document.body.createTextRange()).moveToElementText(ne),ie.collapse(!1),ie.select())}function b(ne){return re===void 0&&((re=document.createElement("span")).style.visibility="hidden",re.style.position="fixed",re.style.outline="0",re.style.margin="0",re.style.padding="0",re.style.border="0",re.style.left="0",re.style.whiteSpace="pre",re.style.fontSize=me,re.style.fontFamily=ye,re.style.fontWeight="normal",document.body.appendChild(re)),re.textContent=ne,re.getBoundingClientRect().right}function k(){this.style.backgroundColor="#ddd"}function R(){this.style.backgroundColor=""}function D(){Te.hide(),Te.onmouseselection(this.__hint,Te.rs)}var Y,re,pe,me,ye,Ee,be,Se,we,Ne,Pe,Te,ce,fe,Ae,Ie;this.container=E,this.dom={},this.highlighter=new z,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.lastSchemaErrors=void 0,this.node=null,this.focusTarget=null,this._setOptions(G),G.autocomplete&&(this.autocomplete=((Y=(Y=G.autocomplete)||{}).filter=Y.filter||"start",Y.trigger=Y.trigger||"keydown",Y.confirmKeys=Y.confirmKeys||[39,35,9],Y.caseSensitive=Y.caseSensitive||!1,ye=me="",(Ee=document.createElement("div")).style.position="relative",Ee.style.outline="0",Ee.style.border="0",Ee.style.margin="0",Ee.style.padding="0",(be=document.createElement("div")).className="autocomplete dropdown",be.style.position="absolute",be.style.visibility="hidden",Se=be,we=[],Pe=-1,fe=Te={rs:ce={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:Ne=0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:Ee,show:function(ne,ie,ge){var xe=this;this.startFrom=ie,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),me===""&&(me=window.getComputedStyle(ne).getPropertyValue("font-size")),ye===""&&(ye=window.getComputedStyle(ne).getPropertyValue("font-family")),be.style.marginLeft="0",be.style.marginTop=ne.getBoundingClientRect().height+"px",this.options=ge.map(String),this.element!==ne&&(this.element=ne,this.elementStyle={zIndex:this.element.style.zIndex,position:this.element.style.position,backgroundColor:this.element.style.backgroundColor,borderColor:this.element.style.borderColor}),this.element.style.zIndex=3,this.element.style.position="relative",this.element.style.backgroundColor="transparent",this.element.style.borderColor="transparent",this.elementHint=ne.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){xe.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",Ae),this.element.addEventListener("keydown",Ae,!1),this.element.removeEventListener("blur",Ie),this.element.addEventListener("blur",Ie,!1)),Ee.appendChild(this.elementHint),Ee.appendChild(be),ne.parentElement.appendChild(Ee),this.repaint(ne)},setText:function(ne){this.element.innerText=ne},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,fe.hide(),this.element.style.zIndex=this.elementStyle.zIndex,this.element.style.position=this.elementStyle.position,this.element.style.backgroundColor=this.elementStyle.backgroundColor,this.element.style.borderColor=this.elementStyle.borderColor)},repaint:function(ie){var ie=(ie=ie.innerText).replace(`
`,""),ge=this.options.length,xe=ie.substring(this.startFrom);pe=ie.substring(0,this.startFrom);for(var Me=0;Me<ge;Me++){var He=this.options[Me];if(!Y.caseSensitive&&He.toLowerCase().indexOf(xe.toLowerCase())===0||Y.caseSensitive&&He.indexOf(xe)===0){this.elementHint.innerText=pe+xe+He.substring(xe.length),this.elementHint.realInnerText=pe+He;break}}be.style.left=b(pe)+"px",fe.refresh(xe,this.options),this.elementHint.style.width=b(this.elementHint.innerText)+10+"px",be.style.visibility!=="hidden"&&(this.elementHint.style.width=b(this.elementHint.innerText)+be.clientWidth+"px")}},hide:function(){Se.style.visibility="hidden"},refresh:function(ne,ie){Se.style.visibility="hidden",Ne=0,Se.textContent="";var xe=window.innerHeight||document.documentElement.clientHeight,He=Se.parentNode.getBoundingClientRect(),ge=He.top-6,xe=xe-He.bottom-6,Me=(we=[],typeof Y.filter=="function"?Y.filter:U[Y.filter]),He=Me?ie.filter(function(ee){return Me(Y.caseSensitive?ne:ne.toLowerCase(),Y.caseSensitive?ee:ee.toLowerCase(),Y)}):[];(we=He.map(function(ee){var ae=document.createElement("div"),he=(ae.className="item",ae.onmouseover=k,ae.onmouseout=R,ae.onmousedown=D,ae.__hint=ee,ae.textContent="",ae.appendChild(document.createTextNode(ee.substring(0,ne.length))),document.createElement("b"));return he.appendChild(document.createTextNode(ee.substring(ne.length))),ae.appendChild(he),Se.appendChild(ae),ae})).length===0||we.length===1&&(ne.toLowerCase()===we[0].__hint.toLowerCase()&&!Y.caseSensitive||ne===we[0].__hint&&Y.caseSensitive)||we.length<2||(Te.highlight(0),3*xe<ge?(Se.style.maxHeight=ge+"px",Se.style.top="",Se.style.bottom="100%"):(Se.style.top="100%",Se.style.bottom="",Se.style.maxHeight=xe+"px"),Se.style.visibility="visible")},highlight:function(ne){Pe!==-1&&we[Pe]&&(we[Pe].className="item"),we[ne].className="item hover",Pe=ne},move:function(ne){return Se.style.visibility==="hidden"?"":(Ne+ne!==-1&&Ne+ne!==we.length&&(Ne+=ne,Te.highlight(Ne)),we[Ne].__hint)},onmouseselection:function(){}},Ae=function(ne){var ie=(ne=ne||window.event).keyCode;if(this.elementHint!=null&&ie!==33&&ie!==34)if(ie===27)ce.hideDropDown(),ce.element.focus(),ne.preventDefault(),ne.stopPropagation();else{var ge,xe=(xe=this.element.innerText).replace(`
`,"");if(0<=Y.confirmKeys.indexOf(ie))ie===9&&this.elementHint.innerText.length===0&&ce.onTab(),0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,ce.hideDropDown(),V(this.element),ie===9)&&(ce.element.focus(),ne.preventDefault(),ne.stopPropagation());else if(ie===13)if(this.elementHint.innerText.length===0)ce.onEnter();else{var Me=be.style.visibility==="hidden";if(fe.hide(),Me)return ce.hideDropDown(),ce.element.focus(),void ce.onEnter();this.element.innerText=this.elementHint.realInnerText,ce.hideDropDown(),V(this.element),ne.preventDefault(),ne.stopPropagation()}else ie===40?(Me=xe.substring(this.startFrom),(ge=fe.move(1))===""&&ce.onArrowDown(),this.elementHint.innerText=pe+Me+ge.substring(Me.length),this.elementHint.realInnerText=pe+ge,ne.preventDefault(),ne.stopPropagation()):ie===38&&(Me=xe.substring(this.startFrom),(ge=fe.move(-1))===""&&ce.onArrowUp(),this.elementHint.innerText=pe+Me+ge.substring(Me.length),this.elementHint.realInnerText=pe+ge,ne.preventDefault(),ne.stopPropagation())}}.bind(ce),Ie=function(ne){ce.hideDropDown()},fe.onmouseselection=function(ne,ie){ie.element.innerText=ie.elementHint.innerText=pe+ne,ie.hideDropDown(),window.setTimeout(function(){ie.element.focus(),V(ie.element)},1)},ce)),this.options.history&&this.options.mode!=="view"&&(this.history=new u(this)),this._createFrame(),this._createTable()},X.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.frameFocusTracker.destroy()},X._setOptions=function(E){var G=this;this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,limitDragging:!1,onSelectionChange:null,colorPicker:!0,onColorPicker:function(V,b,k){var R;Q()?(R=V.getBoundingClientRect().top,R=(0,y.getWindow)(V).innerHeight-R<300&&300<R,new(Q())({parent:V,color:b,popup:R?"top":"bottom",onDone:function(D){D=D.rgba[3]===1?D.hex.substr(0,7):D.hex,k(D)}}).show()):console.warn("Cannot open color picker: the `vanilla-picker` library is not included in the bundle. Either use the full bundle or implement your own color picker using `onColorPicker`.")},timestampTag:!0,timestampFormat:null,createQuery:N.r,executeQuery:N.J,onEvent:null,enableSort:!0,enableTransform:!0},E&&(Object.keys(E).forEach(function(V){G.options[V]=E[V]}),E.limitDragging==null)&&E.schema!=null&&(this.options.limitDragging=!0),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,y.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),E.onSelectionChange&&this.onSelectionChange(E.onSelectionChange),(0,P.cC)(this.options.languages),(0,P.m0)(this.options.language)},X.set=function(E){E instanceof Function||E===void 0?this.clear():(this.content.removeChild(this.table),E={field:this.options.name,value:E},E=new i(this,E),this._setRoot(E),this._validateAndCatch(),this.node.expand(!1),this.content.appendChild(this.table)),this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},X.update=function(E){var G,V;this.node.deepEqual(E)||(G=this.getSelection(),this.onChangeDisabled=!0,this.node.update(E),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),G&&G.start&&G.end&&(E=this.node.findNodeByPath(G.start.path),V=this.node.findNodeByPath(G.end.path),E)&&V?this.setSelection(G.start,G.end):this.setSelection({},{}))},X.get=function(){if(this.node)return this.node.getValue()},X.getText=function(){return JSON.stringify(this.get())},X.setText=function(E){try{this.set((0,y.parse)(E))}catch{E=(0,y.tryJsonRepair)(E),this.set((0,y.parse)(E))}},X.updateText=function(E){try{this.update((0,y.parse)(E))}catch{E=(0,y.tryJsonRepair)(E),this.update((0,y.parse)(E))}},X.setName=function(E){this.options.name=E,this.node&&this.node.updateField(this.options.name)},X.getName=function(){return this.options.name},X.focus=function(){var E=this.scrollableContent.querySelector("[contenteditable=true]");E?E.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(E=this.frame.querySelector("button"))&&E.focus()},X.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},X._setRoot=function(E){this.clear(),(this.node=E).setParent(null),E.setField(this.getName(),!1),delete E.index,this.tbody.appendChild(E.getDom())},X.search=function(E){var G;return this.node?(this.content.removeChild(this.table),G=this.node.search(E),this.content.appendChild(this.table)):G=[],G},X.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},X.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},X.expand=function(E){var G;E&&(G=this.node?this.node.findNodeByPath(E.path):null)&&(E.isExpand?G.expand(E.recursive):G.collapse(E.recursive))},X._onAction=function(E,G){this.history&&this.history.add(E,G),this._onChange()},X._onChange=function(){if(!this.onChangeDisabled){var E;if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath&&((E=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0)?this._updateTreePath(E.getNodePath()):this.treePath.reset()),this.options.onChange)try{this.options.onChange()}catch(G){console.error("Error in onChange callback: ",G)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(G){console.error("Error in onChangeJSON callback: ",G)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(G){console.error("Error in onChangeText callback: ",G)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(G){console.error("Error in onNodeName callback: ",G)}}},X.validate=function(){var E=this,G=this.node;if(G){var V=G.getValue(),b=[];this.validateSchema&&!this.validateSchema(V)&&(b=this.validateSchema.errors.map(function(D){return(0,y.improveSchemaError)(D)}).map(function(D){return{node:G.findNode(D.dataPath),error:D,type:"validation"}}).filter(function(D){return D.node!=null}));try{this.validationSequence++;var k=this,R=this.validationSequence;return this._validateCustom(V).then(function(D){return R===k.validationSequence&&(D=[].concat(b,D||[]),k._renderValidationErrors(D),typeof E.options.onValidationError=="function"&&(0,y.isValidationErrorChanged)(D,E.lastSchemaErrors)&&E.options.onValidationError.call(E,D),E.lastSchemaErrors=D),E.lastSchemaErrors})}catch(D){return Promise.reject(D)}}},X._validateAndCatch=function(){this.validate().catch(function(E){console.error("Error running validation:",E)})},X._renderValidationErrors=function(E){this.errorNodes&&this.errorNodes.forEach(function(V){V.setError(null)});var G=E.reduce(function(V,b){return b.node.findParents().filter(function(k){return!V.some(function(R){return R[0]===k})}).map(function(k){return[k,b.node]}).concat(V)},[]);this.errorNodes=G.map(function(V){return{node:V[0],child:V[1],error:{message:V[0].type==="object"?(0,P.Iu)("containsInvalidProperties"):(0,P.Iu)("containsInvalidItems")}}}).concat(E).map(function(V){return V.node.setError(V.error,V.child),V.node})},X._validateCustom=function(E){try{var G,V;if(this.options.onValidate)return G=this.node,V=this.options.onValidate(E),((0,y.isPromise)(V)?V:Promise.resolve(V)).then(function(b){return Array.isArray(b)?b.filter(function(k){var R=(0,y.isValidValidationError)(k);return R||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',k),R}).map(function(k){var R;try{R=k&&k.path?G.findNodeByPath(k.path):null}catch{}return R||console.warn("Ignoring validation error: node not found. Path:",k.path,"Error:",k),{node:R,error:k,type:"customValidation"}}).filter(function(k){return k&&k.node&&k.error&&k.error.message}):null})}catch(b){return Promise.reject(b)}return Promise.resolve(null)},X.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},X.startAutoScroll=function(E){var G=this,V=this.scrollableContent,b=(0,y.getAbsoluteTop)(V),k=V.clientHeight,R=b+k;E<b+24&&0<V.scrollTop?this.autoScrollStep=(b+24-E)/3:R-24<E&&k+V.scrollTop<V.scrollHeight?this.autoScrollStep=(R-24-E)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){G.autoScrollStep?V.scrollTop-=G.autoScrollStep:G.stopAutoScroll()},50)):this.stopAutoScroll()},X.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},X.setDomSelection=function(E){var G,V,b;E&&("scrollTop"in E&&this.scrollableContent&&(this.scrollableContent.scrollTop=E.scrollTop),E.paths?(G=this,V=E.paths.map(function(k){return G.node.findNodeByInternalPath(k)}),this.select(V)):(b=(V=E.path?this.node.findNodeByInternalPath(E.path):null)&&E.domName?V.dom[E.domName]:null,E.range&&b?(E=Object.assign({},E.range,{container:b}),(0,y.setSelectionOffset)(E)):V&&V.focus()))},X.getDomSelection=function(){var E=i.getNodeFromTarget(this.focusTarget),G=this.focusTarget,V=E?Object.keys(E.dom).find(function(k){return E.dom[k]===G}):null,b=(0,y.getSelectionOffset)();return(b=(b=b&&b.container.nodeName!=="DIV"?null:b)&&b.container!==G?null:b)&&delete b.container,{path:E?E.getInternalPath():null,domName:V,range:b,paths:0<this.multiselection.length?this.multiselection.nodes.map(function(k){return k.getInternalPath()}):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},X.scrollTo=function(E,G){var V,b,k,R,D=this.scrollableContent;D?((V=this).animateTimeout&&(clearTimeout(V.animateTimeout),delete V.animateTimeout),V.animateCallback&&(V.animateCallback(!1),delete V.animateCallback),b=D.clientHeight,k=D.scrollHeight-b,R=Math.min(Math.max(E-b/4,0),k),function Y(){var re=D.scrollTop,re=R-re;3<Math.abs(re)?(D.scrollTop+=re/3,V.animateCallback=G,V.animateTimeout=setTimeout(Y,50)):(G&&G(!0),D.scrollTop=R,delete V.animateTimeout,delete V.animateCallback)}()):G&&G(!1)},X._createFrame=function(){var E=this,G=(this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame),this.contentOuter=document.createElement("div"),this.contentOuter.className="jsoneditor-outer",this);function V(Y){G._onEvent&&G._onEvent(Y)}var b,k,R,D={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new M.R(D),this.frame.onclick=function(Y){var re=Y.target;V(Y),re.nodeName==="BUTTON"&&Y.preventDefault()},this.frame.oninput=V,this.frame.onchange=V,this.frame.onkeydown=V,this.frame.onkeyup=V,this.frame.oncut=V,this.frame.onpaste=V,this.frame.onmousedown=V,this.frame.onmouseup=V,this.frame.onmouseover=V,this.frame.onmouseout=V,(0,y.addEventListener)(this.frame,"focus",V,!0),(0,y.addEventListener)(this.frame,"blur",V,!0),this.frame.onfocusin=V,this.frame.onfocusout=V,this.options.mainMenuBar&&((0,y.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(D=document.createElement("button")).type="button",D.className="jsoneditor-expand-all",D.title=(0,P.Iu)("expandAll"),D.onclick=function(){G.expandAll(),typeof E.options.onExpand=="function"&&E.options.onExpand({path:[],isExpand:!0,recursive:!0})},this.menu.appendChild(D),(D=document.createElement("button")).type="button",D.title=(0,P.Iu)("collapseAll"),D.className="jsoneditor-collapse-all",D.onclick=function(){G.collapseAll(),typeof E.options.onExpand=="function"&&E.options.onExpand({path:[],isExpand:!1,recursive:!0})},this.menu.appendChild(D),this.options.enableSort&&((D=document.createElement("button")).type="button",D.className="jsoneditor-sort",D.title=(0,P.Iu)("sortTitleShort"),D.onclick=function(){G.node.showSortModal()},this.menu.appendChild(D)),this.options.enableTransform&&((D=document.createElement("button")).type="button",D.title=(0,P.Iu)("transformTitleShort"),D.className="jsoneditor-transform",D.onclick=function(){G.node.showTransformModal()},this.menu.appendChild(D)),this.history&&((b=document.createElement("button")).type="button",b.className="jsoneditor-undo jsoneditor-separator",b.title=(0,P.Iu)("undo"),b.onclick=function(){G._onUndo()},this.menu.appendChild(b),this.dom.undo=b,(k=document.createElement("button")).type="button",k.className="jsoneditor-redo",k.title=(0,P.Iu)("redo"),k.onclick=function(){G._onRedo()},this.menu.appendChild(k),this.dom.redo=k,this.history.onChange=function(){b.disabled=!G.history.canUndo(),k.disabled=!G.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&((R=this).modeSwitcher=new A.x(this.menu,this.options.modes,this.options.mode,function(Y){try{R.setMode(Y),R.modeSwitcher.focus()}catch(re){R._onError(re)}})),this.options.search)&&(this.searchBox=new v(this,this.menu)),this.options.navigationBar&&(this.navBar=document.createElement("div"),this.navBar.className="jsoneditor-navigation-bar nav-bar-empty",this.frame.appendChild(this.navBar),this.treePath=new F(this.navBar,this.getPopupAnchor()),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},X._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},X._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},X._onEvent=function(E){if(!i.targetIsColorPicker(E.target)){var G,V=i.getNodeFromTarget(E.target);if(E.type==="keydown"&&this._onKeyDown(E),V&&E.type==="focus"&&(this.focusTarget=E.target,this.options.autocomplete)&&this.options.autocomplete.trigger==="focus"&&this._showAutoComplete(E.target),E.type==="mousedown"&&this._startDragDistance(E),E.type!=="mousemove"&&E.type!=="mouseup"&&E.type!=="click"||this._updateDragDistance(E),V&&this.options&&this.options.navigationBar&&V&&(E.type==="keydown"||E.type==="mousedown")&&(G=this,setTimeout(function(){G._updateTreePath(V.getNodePath())})),V&&V.selected){if(E.type==="click"){if(E.target===V.dom.menu)return void this.showContextMenu(E.target);E.hasMoved||this.deselect()}E.type==="mousedown"&&i.onDragStart(this.multiselection.nodes,E)}else E.type==="mousedown"&&(0,y.hasParentNode)(E.target,this.content)&&(this.deselect(),V&&E.target===V.dom.drag?i.onDragStart(V,E):V&&(E.target===V.dom.field||E.target===V.dom.value||E.target===V.dom.select)||this._onMultiSelectStart(E));V&&V.onEvent(E)}},X._updateTreePath=function(E){var G;function V(b){return b.parent?b.parent.type==="array"?b.index:b.field:b.field||b.type}E&&E.length?((0,y.removeClassName)(this.navBar,"nav-bar-empty"),G=[],E.forEach(function(b){var k={name:V(b),node:b,children:[]};b.childs&&b.childs.length&&b.childs.forEach(function(R){k.children.push({name:V(R),node:R})}),G.push(k)}),this.treePath.setPath(G)):(0,y.addClassName)(this.navBar,"nav-bar-empty")},X._onTreePathSectionSelected=function(E){E&&E.node&&(E.node.expandTo(),E.node.focus())},X._onTreePathMenuItemSelected=function(E,G){E&&E.children.length&&(E=E.children.find(function(V){return V.name===G}))&&E.node&&(this._updateTreePath(E.node.getNodePath()),E.node.expandTo(),E.node.focus())},X._startDragDistance=function(E){this.dragDistanceEvent={initialTarget:E.target,initialPageX:E.pageX,initialPageY:E.pageY,dragDistance:0,hasMoved:!1}},X._updateDragDistance=function(E){this.dragDistanceEvent||this._startDragDistance(E);var G=E.pageX-this.dragDistanceEvent.initialPageX,V=E.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(G*G+V*V),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,E.dragDistance=this.dragDistanceEvent.dragDistance,E.hasMoved=this.dragDistanceEvent.hasMoved,E.dragDistance},X._onMultiSelectStart=function(E){var G,V=i.getNodeFromTarget(E.target);this.options.mode==="tree"&&this.options.onEditable===void 0&&(this.multiselection={start:V||null,end:null,nodes:[]},this._startDragDistance(E),(G=this).mousemove||(this.mousemove=(0,y.addEventListener)(E.view,"mousemove",function(b){G._onMultiSelect(b)})),this.mouseup||(this.mouseup=(0,y.addEventListener)(E.view,"mouseup",function(b){G._onMultiSelectEnd(b)})),E.preventDefault())},X._onMultiSelect=function(E){var G;E.preventDefault(),this._updateDragDistance(E),E.hasMoved&&((E=i.getNodeFromTarget(E.target))&&(this.multiselection.start==null&&(this.multiselection.start=E),this.multiselection.end=E),this.deselect(),E=this.multiselection.start,G=this.multiselection.end||this.multiselection.start,E)&&G&&(this.multiselection.nodes=this._findTopLevelNodes(E,G),this.multiselection.nodes&&this.multiselection.nodes.length&&(E=this.multiselection.nodes[0],this.multiselection.start===E||this.multiselection.start.isDescendantOf(E)?this.multiselection.direction="down":this.multiselection.direction="up"),this.select(this.multiselection.nodes))},X._onMultiSelectEnd=function(E){var G=this.multiselection.nodes[0];G&&G.dom.menu&&G.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,y.removeEventListener)(E.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,y.removeEventListener)(E.view,"mouseup",this.mouseup),delete this.mouseup)},X.deselect=function(E){var G=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach(function(V){V.setSelected(!1)}),this.multiselection.nodes=[],E&&(this.multiselection.start=null,this.multiselection.end=null),G&&this._selectionChangedHandler&&this._selectionChangedHandler()},X.select=function(E){if(!Array.isArray(E))return this.select([E]);var G;E&&(this.deselect(),this.multiselection.nodes=E.slice(0),G=E[0],E.forEach(function(V){V.expandPathToNode(),V.setSelected(!0,V===G)}),this._selectionChangedHandler)&&(E=this.getSelection(),this._selectionChangedHandler(E.start,E.end))},X._findTopLevelNodes=function(D,Y){for(var V=D.getNodePath(),b=Y.getNodePath(),k=0;k<V.length&&V[k]===b[k];)k++;var R,D=V[k-1],Y=V[k],re=b[k];return Y&&re||(D.parent?D=(re=Y=D).parent:(Y=D.childs[0],re=D.childs[D.childs.length-1])),D&&Y&&re?(Y=D.childs.indexOf(Y),re=D.childs.indexOf(re),R=Math.min(Y,re),Y=Math.max(Y,re),D.childs.slice(R,Y+1)):[]},X._showAutoComplete=function(E){var G,V=i.getNodeFromTarget(E),b="";0<=E.className.indexOf("jsoneditor-value")&&(b="value"),(b=0<=E.className.indexOf("jsoneditor-field")?"field":b)!==""&&(G=this,setTimeout(function(){var k;!V||!(G.options.autocomplete.trigger==="focus"||0<E.innerText.length)||(k=G.options.autocomplete.getOptions(E.innerText,V.getPath(),b,V.editor))===null?G.autocomplete.hideDropDown():typeof k.then=="function"?k.then(function(R){R===null?G.autocomplete.hideDropDown():R.options?G.autocomplete.show(E,R.startFrom,R.options):G.autocomplete.show(E,0,R)}).catch(function(R){console.error(R)}):k.options?G.autocomplete.show(E,k.startFrom,k.options):G.autocomplete.show(E,0,k)},50))},X._onKeyDown=function(E){var G,V=E.which||E.keyCode,b=E.altKey,k=E.ctrlKey,R=E.metaKey,D=E.shiftKey,Y=!1,re=this.focusTarget;V===9&&(G=this,setTimeout(function(){G.focusTarget!==re&&(0,y.selectContentEditable)(G.focusTarget)},0)),this.searchBox&&(k&&V===70?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),Y=!0):(V===114||k&&V===71)&&(D?this.searchBox.previous(!0):this.searchBox.next(!0),Y=!0)),this.history&&(k&&!D&&V===90?(this._onUndo(),Y=!0):k&&D&&V===90&&(this._onRedo(),Y=!0)),!this.options.autocomplete||Y||k||b||R||E.key.length!==1&&V!==8&&V!==46||(Y=!1,this._showAutoComplete(E.target)),Y&&(E.preventDefault(),E.stopPropagation())},X._createTable=function(){var E;this.options.navigationBar&&(0,y.addClassName)(this.contentOuter,"has-nav-bar"),this.scrollableContent=document.createElement("div"),this.scrollableContent.className="jsoneditor-tree",this.contentOuter.appendChild(this.scrollableContent),this.content=document.createElement("div"),this.content.className="jsoneditor-tree-inner",this.scrollableContent.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table),this.colgroupContent=document.createElement("colgroup"),this.options.mode==="tree"&&((E=document.createElement("col")).width="24px",this.colgroupContent.appendChild(E)),(E=document.createElement("col")).width="24px",this.colgroupContent.appendChild(E),E=document.createElement("col"),this.colgroupContent.appendChild(E),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(this.contentOuter)},X.showContextMenu=function(E,G){var V,b=[],k=this.multiselection.nodes.slice();b.push({text:(0,P.Iu)("duplicateText"),title:(0,P.Iu)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){i.onDuplicate(k)}}),b.push({text:(0,P.Iu)("remove"),title:(0,P.Iu)("removeTitle"),className:"jsoneditor-remove",click:function(){i.onRemove(k)}}),this.options.onCreateMenu&&(V=k.map(function(R){return R.getPath()}),b=this.options.onCreateMenu(b,{type:"multiple",path:V[0],paths:V})),new S.x(b,{close:G}).show(E,this.getPopupAnchor())},X.getPopupAnchor=function(){return this.options.popupAnchor||this.frame},X.getSelection=function(){var E,G,V={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(E=this.multiselection.nodes[0],G=this.multiselection.nodes[this.multiselection.nodes.length-1],this.multiselection.direction==="down"?(V.start=E.serialize(),V.end=G.serialize()):(V.start=G.serialize(),V.end=E.serialize())),V},X.onSelectionChange=function(E){typeof E=="function"&&(this._selectionChangedHandler=(0,y.debounce)(E,this.DEBOUNCE_INTERVAL))},X.setSelection=function(E,G){E&&E.dom&&E.range&&(console.warn("setSelection/getSelection usage for text selection is deprecated and should not be used, see documentation for supported selection options"),this.setDomSelection(E)),E=this._getNodeInstancesByRange(E,G),E.forEach(function(V){V.expandTo()}),this.select(E)},X._getNodeInstancesByRange=function(E,G){E&&E.path&&(V=this.node.findNodeByPath(E.path),G)&&G.path&&(b=this.node.findNodeByPath(G.path));var V,b,k=[];if(V instanceof i)if(b instanceof i&&b!==V)if(V.parent===b.parent){G=V.getIndex()<b.getIndex()?(E=V,b):(E=b,V);var R=E;for(k.push(R);R=R.nextSibling(),k.push(R),R&&R!==G;);}else k=this._findTopLevelNodes(V,b);else k.push(V);return k},X.getNodesByRange=function(V,G){var V=this._getNodeInstancesByRange(V,G),b=[];return V.forEach(function(k){b.push(k.serialize())}),b},[{mode:"tree",mixin:X,data:"json"},{mode:"view",mixin:X,data:"json"},{mode:"form",mixin:X,data:"json"}])},2744:function(le,g,Z){g.tryRequireAjv=function(){try{return Z(8903)}catch{}}},9125:function(le,g,Z){g.O=function(){try{Z(4864)}catch(U){console.error(U)}}},9791:function(le,U,Z){Z.r(U),Z.d(U,{addClassName:function(){return d},addEventListener:function(){return J},asyncExec:function(){return Me},clear:function(){return t},compileJSONPointer:function(){return me},contains:function(){return ie},debounce:function(){return R},escapeUnicodeChars:function(){return h},extend:function(){return c},findUniqueName:function(){return we},formatSize:function(){return Ae},get:function(){return Se},getAbsoluteLeft:function(){return i},getAbsoluteTop:function(){return l},getChildPaths:function(){return Ne},getColorCSS:function(){return ye},getIndexForPosition:function(){return re},getInnerText:function(){return I},getInputSelection:function(){return Y},getInternetExplorerVersion:function(){return _},getPositionForPath:function(){return pe},getSelection:function(){return H},getSelectionOffset:function(){return O},getType:function(){return r},getWindow:function(){return o},hasParentNode:function(){return v},improveSchemaError:function(){return G},insideRect:function(){return k},isArray:function(){return s},isChildOf:function(){return X},isFirefox:function(){return F},isObject:function(){return ne},isPromise:function(){return V},isTimestamp:function(){return fe},isUrl:function(){return n},isValidColor:function(){return Ee},isValidValidationError:function(){return b},isValidationErrorChanged:function(){return ge},limitCharacters:function(){return Ie},makeFieldTooltip:function(){return be},parse:function(){return y},parsePath:function(){return te},parseString:function(){return ce},removeAllClassNames:function(){return C},removeClassName:function(){return p},removeEventListener:function(){return Q},removeReturnsAndSurroundingWhitespace:function(){return L},selectContentEditable:function(){return $},setEndOfContentEditable:function(){return x},setSelection:function(){return B},setSelectionOffset:function(){return u},sort:function(){return Pe},sortObjectKeys:function(){return Te},stringifyPath:function(){return E},stripFormatting:function(){return w},textDiff:function(){return D},tryJsonRepair:function(){return f},uniqueMergeArrays:function(){return xe},validate:function(){return a}}),Z(4987);var U=Z(233),S=Z.n(U),M=Z(1262),K=Z(6589),j=Z(7026),z=Z(7907);function P(ee){return function(ae){if(Array.isArray(ae))return N(ae)}(ee)||function(ae){if(typeof Symbol!="undefined"&&ae[Symbol.iterator]!=null||ae["@@iterator"]!=null)return Array.from(ae)}(ee)||function(ae,he){var Ce;if(ae)return typeof ae=="string"?N(ae,he):(Ce=(Ce=Object.prototype.toString.call(ae).slice(8,-1))==="Object"&&ae.constructor?ae.constructor.name:Ce)==="Map"||Ce==="Set"?Array.from(ae):Ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ce)?N(ae,he):void 0}(ee)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function N(ee,ae){(ae==null||ae>ee.length)&&(ae=ee.length);for(var he=0,Ce=new Array(ae);he<ae;he++)Ce[he]=ee[he];return Ce}function A(ee){return(A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae})(ee)}var m=1e4,T=9466848e5;function y(ee){try{return JSON.parse(ee)}catch(ae){throw a(ee),ae}}function f(ee){try{return(0,M.K)(ee)}catch{return ee}}function h(ee){return ee.replace(/[\u007F-\uFFFF]/g,function(ae){return"\\u"+("0000"+ae.charCodeAt(0).toString(16)).slice(-4)})}function a(ee){(K!==void 0?K:JSON).parse(ee)}function c(ee,ae){for(var he in ae)He(ae,he)&&(ee[he]=ae[he]);return ee}function t(ee){for(var ae in ee)He(ee,ae)&&delete ee[ae];return ee}function r(ee){return ee===null?"null":ee===void 0?"undefined":ee instanceof Number||typeof ee=="number"?"number":ee instanceof String||typeof ee=="string"?"string":ee instanceof Boolean||typeof ee=="boolean"?"boolean":ee instanceof RegExp?"regexp":s(ee)?"array":"object"}var e=/^https?:\/\/\S+$/;function n(ee){return(typeof ee=="string"||ee instanceof String)&&e.test(ee)}function s(ee){return Object.prototype.toString.call(ee)==="[object Array]"}function o(ee){return ee.ownerDocument.defaultView}function i(ee){return ee.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function l(ee){return ee.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function d(ee,ae){var he=ee.className.split(" ");he.indexOf(ae)===-1&&(he.push(ae),ee.className=he.join(" "))}function C(ee){ee.className=""}function p(ee,Ce){var he=ee.className.split(" "),Ce=he.indexOf(Ce);Ce!==-1&&(he.splice(Ce,1),ee.className=he.join(" "))}function w(ee){for(var ae=ee.childNodes,he=0,Ce=ae.length;he<Ce;he++){var Le=ae[he],Re=(Le.style&&Le.removeAttribute("style"),Le.attributes);if(Re)for(var We=Re.length-1;0<=We;We--){var Ke=Re[We];Ke.specified===!0&&Le.removeAttribute(Ke.name)}w(Le)}}function x(ee){var ae;document.createRange&&((ae=document.createRange()).selectNodeContents(ee),ae.collapse(!1),(ee=window.getSelection()).removeAllRanges(),ee.addRange(ae))}function $(ee){var ae;ee&&ee.nodeName==="DIV"&&window.getSelection&&document.createRange&&((ae=document.createRange()).selectNodeContents(ee),(ee=window.getSelection()).removeAllRanges(),ee.addRange(ae))}function H(){if(window.getSelection){var ee=window.getSelection();if(ee.getRangeAt&&ee.rangeCount)return ee.getRangeAt(0)}return null}function B(ee){var ae;ee&&window.getSelection&&((ae=window.getSelection()).removeAllRanges(),ae.addRange(ee))}function O(){var ee=H();return ee&&"startOffset"in ee&&"endOffset"in ee&&ee.startContainer&&ee.startContainer===ee.endContainer?{startOffset:ee.startOffset,endOffset:ee.endOffset,container:ee.startContainer.parentNode}:null}function u(ee){var ae;document.createRange&&window.getSelection&&window.getSelection()&&(ae=document.createRange(),ee.container.firstChild||ee.container.appendChild(document.createTextNode("")),ae.setStart(ee.container.firstChild,ee.startOffset),ae.setEnd(ee.container.firstChild,ee.endOffset),B(ae))}function I(ee,ae){var he;if(ae===void 0&&(ae={_text:"",flush:function(){var rt=this._text;return this._text="",rt},set:function(rt){this._text=rt}}),ee.nodeValue)return(he=L(ee.nodeValue))!==""?ae.flush()+he:"";if(ee.hasChildNodes()){for(var Ce=ee.childNodes,Le="",Re=0,We=Ce.length;Re<We;Re++){var Ke,tt=Ce[Re];tt.nodeName==="DIV"||tt.nodeName==="P"?((Ke=(Ke=Ce[Re-1])?Ke.nodeName:void 0)&&Ke!=="DIV"&&Ke!=="P"&&Ke!=="BR"&&(Le!==""&&(Le+=`
`),ae.flush()),Le+=I(tt,ae),ae.set(`
`)):tt.nodeName==="BR"?(Le+=ae.flush(),ae.set(`
`)):Le+=I(tt,ae)}return Le}return""}function L(ee){return ee.replace(/(\b|^)\s*(\b|$)/g,function(ae){return/\n/.exec(ae)?"":ae})}function v(ee,ae){for(var he=ee?ee.parentNode:void 0;he;){if(he===ae)return!0;he=he.parentNode}return!1}function _(){var ee;return W===-1&&(ee=-1,typeof navigator!="undefined"&&navigator.appName==="Microsoft Internet Explorer"&&/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)!=null&&(ee=parseFloat(RegExp.$1)),W=ee),W}var W=-1;function F(){return typeof navigator!="undefined"&&navigator.userAgent.indexOf("Firefox")!==-1}function J(ee,ae,he,Ce){return ee.addEventListener?(Ce===void 0&&(Ce=!1),ae==="mousewheel"&&F()&&(ae="DOMMouseScroll"),ee.addEventListener(ae,he,Ce),he):ee.attachEvent?(ee.attachEvent("on"+ae,Ce=function(){return he.call(ee,window.event)}),Ce):void 0}function Q(ee,ae,he,Ce){ee.removeEventListener?(Ce===void 0&&(Ce=!1),ae==="mousewheel"&&F()&&(ae="DOMMouseScroll"),ee.removeEventListener(ae,he,Ce)):ee.detachEvent&&ee.detachEvent("on"+ae,he)}function X(ee,ae){for(var he=ee.parentNode;he;){if(he===ae)return!0;he=he.parentNode}return!1}function te(ee){var ae=[],he=0;function Ce(Re){for(var We="";ee[he]!==void 0&&ee[he]!==Re;)We+=ee[he],he++;if(ee[he]!==Re)throw new Error("Invalid JSON path: unexpected end, character "+Re+" expected");return We}for(;ee[he]!==void 0;)if(ee[he]===".")he++,ae.push(function(){for(var Re="";ee[he]!==void 0&&/[\w$]/.test(ee[he]);)Re+=ee[he],he++;if(Re==="")throw new Error("Invalid JSON path: property name expected at index "+he);return Re}());else{if(ee[he]!=="[")throw new Error('Invalid JSON path: unexpected character "'+ee[he]+'" at index '+he);if(ee[++he]==="'"||ee[he]==='"'){var Le=ee[he];if(he++,ae.push(Ce(Le)),ee[he]!==Le)throw new Error("Invalid JSON path: closing quote ' expected at index "+he);he++}else{if(Le=Ce("]").trim(),Le.length===0)throw new Error("Invalid JSON path: array value expected at index "+he);Le=Le==="*"?Le:JSON.parse(Le),ae.push(Le)}if(ee[he]!=="]")throw new Error("Invalid JSON path: closing bracket ] expected at index "+he);he++}return ae}function E(ee){return ee.map(function(ae){return typeof ae=="number"?"["+ae+"]":typeof ae=="string"&&ae.match(/^[A-Za-z0-9_$]+$/)?"."+ae:'["'+ae+'"]'}).join("")}function G(ee){var ae,he;return ee.keyword==="enum"&&Array.isArray(ee.schema)&&(he=ee.schema)&&(5<(he=he.map(function(Ce){return JSON.stringify(Ce)})).length&&(ae=["("+(he.length-5)+" more...)"],(he=he.slice(0,5)).push(ae)),ee.message="should be equal to one of: "+he.join(", ")),ee.keyword==="additionalProperties"&&(ee.message="should NOT have additional property: "+ee.params.additionalProperty),ee}function V(ee){return ee&&typeof ee.then=="function"&&typeof ee.catch=="function"}function b(ee){return A(ee)==="object"&&Array.isArray(ee.path)&&typeof ee.message=="string"}function k(ee,ae,he){return he=he!==void 0?he:0,ae.left-he>=ee.left&&ae.right+he<=ee.right&&ae.top-he>=ee.top&&ae.bottom+he<=ee.bottom}function R(ee,ae,he){var Ce;return function(){var Le=this,Re=arguments,We=he&&!Ce;clearTimeout(Ce),Ce=setTimeout(function(){Ce=null,he||ee.apply(Le,Re)},ae),We&&ee.apply(Le,Re)}}function D(ee,ae){for(var he=ae.length,Ce=0,Le=ee.length,Re=ae.length;ae.charAt(Ce)===ee.charAt(Ce)&&Ce<he;)Ce++;for(;ae.charAt(Re-1)===ee.charAt(Le-1)&&Ce<Re&&0<Le;)Re--,Le--;return{start:Ce,end:Re}}function Y(ee){var ae,he,Ce,Le,Re=0,We=0;return typeof ee.selectionStart=="number"&&typeof ee.selectionEnd=="number"?(Re=ee.selectionStart,We=ee.selectionEnd):(Le=document.selection.createRange())&&Le.parentElement()===ee&&(Ce=ee.value.length,ae=ee.value.replace(/\r\n/g,`
`),(he=ee.createTextRange()).moveToBookmark(Le.getBookmark()),(Le=ee.createTextRange()).collapse(!1),-1<he.compareEndPoints("StartToEnd",Le)?Re=We=Ce:(Re=-he.moveStart("character",-Ce),Re+=ae.slice(0,Re).split(`
`).length-1,-1<he.compareEndPoints("EndToEnd",Le)?We=Ce:(We=-he.moveEnd("character",-Ce),We+=ae.slice(0,We).split(`
`).length-1))),{startIndex:Re,endIndex:We,start:Ke(Re),end:Ke(We)};function Ke(tt){return tt=ee.value.substring(0,tt),{row:(tt.match(/\n/g)||[]).length+1,column:tt.length-tt.lastIndexOf(`
`)}}}function re(Ce,ae,he){var Ce=Ce.value||"";return 0<ae&&0<he?(Ce=Ce.split(`
`,ae),ae=Math.min(Ce.length,ae),he=Math.min(Ce[ae-1].length,he-1),he=ae===1?he:he+1,Ce.slice(0,ae-1).join(`
`).length+he):-1}function pe(ee,ae){var he,Ce=[];if(ae&&ae.length){try{he=j.parse(ee)}catch{return Ce}ae.forEach(function(Le){var Re=me(te(Le)),Re=he.pointers[Re];Re&&Ce.push({path:Le,line:Re.key?Re.key.line:Re.value?Re.value.line:0,column:Re.key?Re.key.column:Re.value?Re.value.column:0})})}return Ce}function me(ee){return ee.map(function(ae){return"/"+String(ae).replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function ye(ee){var ae=document.createElement("div");return ae.style.color=ee,ae.style.color.split(/\s+/).join("").toLowerCase()||null}function Ee(ee){return!!ye(ee)}function be(ee,ae){var he;return ee?(he="",ee.title&&(he+=ee.title),ee.description&&(0<he.length&&(he+=`
`),he+=ee.description),ee.default&&(0<he.length&&(he+=`
`),he=(he+=(0,z.Iu)("default",void 0,ae)+`
`)+JSON.stringify(ee.default,null,2)),Array.isArray(ee.examples)&&0<ee.examples.length&&(0<he.length&&(he+=`
`),he+=(0,z.Iu)("examples",void 0,ae)+`
`,ee.examples.forEach(function(Ce,Le){he+=JSON.stringify(Ce,null,2),Le!==ee.examples.length-1&&(he+=`
`)})),he):""}function Se(ee,ae){for(var he=ee,Ce=0;Ce<ae.length&&he!=null;Ce++)he=he[ae[Ce]];return he}function we(ee,ae){for(var he=ee.replace(/ \(copy( \d+)?\)$/,""),Ce=he,Le=1;ae.indexOf(Ce)!==-1;)Ce=he+" ("+("copy"+(1<Le?" "+Le:""))+")",Le++;return Ce}function Ne(ee,ae){var he={};if(Array.isArray(ee))for(var Ce=Math.min(ee.length,m),Le=0;Le<Ce;Le++)(function Re(We,Ke,tt,rt){(Array.isArray(We)||ne(We))&&!rt||(Ke[tt||""]=!0),ne(We)&&Object.keys(We).forEach(function(se){Re(We[se],Ke,tt+"."+se,rt)})})(ee[Le],he,"",ae);else he[""]=!0;return Object.keys(he).sort()}function Pe(ee,Re,he){var Ce=Re&&Re!=="."?te(Re):[],Le=he==="desc"?-1:1,Re=ee.slice();return Re.sort(function(We,Ke){return We=Se(We,Ce),Ke=Se(Ke,Ce),Le*(Ke<We?1:We<Ke?-1:0)}),Re}function Te(ee,Ce){var he=Ce==="desc"?-1:1,Ce=Object.keys(ee).sort(function(Re,We){return he*S()(Re,We)}),Le={};return Ce.forEach(function(Re){Le[Re]=ee[Re]}),Le}function ce(ee){var ae,he;return ee===""?"":(ae=ee.toLowerCase())==="null"?null:ae==="true"||ae!=="false"&&(ae=Number(ee),he=parseFloat(ee),isNaN(ae)||isNaN(he)?ee:ae)}function fe(ee,ae){return typeof ae=="number"&&T<ae&&isFinite(ae)&&Math.floor(ae)===ae&&!isNaN(new Date(ae).valueOf())}function Ae(ee){return ee<900?ee.toFixed()+" B":(ee=ee/1e3)<900?ee.toFixed(1)+" KB":(ee=ee/1e3)<900?ee.toFixed(1)+" MB":(ee=ee/1e3)<900?ee.toFixed(1)+" GB":(ee/1e3).toFixed(1)+" TB"}function Ie(ee,ae){return ee.length<=ae?ee:ee.slice(0,ae)+"..."}function ne(ee){return A(ee)==="object"&&ee!==null&&!Array.isArray(ee)}function ie(ee,ae){return ee.indexOf(ae)!==-1}function ge(ee,ae){if(ae||ee){if(ae&&!ee||!ae&&ee||ae.length!==ee.length)return!0;for(var he=0;he<ee.length;++he){var Ce=function(Le){var Re=ee[Le].type==="error"?ae.find(function(We){return We.line===ee[Le].line}):ae.find(function(We){return We.dataPath===ee[Le].dataPath&&We.schemaPath===ee[Le].schemaPath});if(!Re)return{v:!0}}(he);if(A(Ce)==="object")return Ce.v}}return!1}function xe(ee,ae){return ee=ee!=null&&ee.length?ee:[],ae=ae!=null&&ae.length?ae:[],P(new Set(ee.concat(ae)))}function Me(ee){setTimeout(ee)}function He(ee,ae){return Object.prototype.hasOwnProperty.call(ee,ae)}},8037:function(le,g,Z){var U;if(window.Picker)U=window.Picker;else try{U=Z(4049)}catch{}le.exports=U},6225:function(le,g,Z){function U(A,m){var T,y;return m=N(A,m),(A=j.modules[m])||(typeof(A=j.payloads[m])=="function"&&(T={id:m,uri:"",exports:y={},packaged:!0},y=A(function(f,h){return z(m,f,h)},y,T)||T.exports,j.modules[m]=y,delete j.payloads[m]),A=j.modules[m]=y||A),A}var S,M,K,j,z,P,N;le=Z.nmd(le),(K=function(){return this}())||typeof window=="undefined"||(K=window),(j=function(A,m,T){typeof A!="string"?j.original?j.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(arguments.length==2&&(T=m),j.modules[A]||(j.payloads[A]=T,j.modules[A]=null))}).modules={},j.payloads={},z=function(A,m,T){if(typeof m=="string"){var y=U(A,m);if(y!=null)return T&&T(),y}else if(Object.prototype.toString.call(m)==="[object Array]"){for(var f=[],h=0,a=m.length;h<a;++h){var c=U(A,m[h]);if(c==null&&P.original)return;f.push(c)}return T&&T.apply(null,f)||!0}},P=function(A,m){var T=z("",A,m);return T==null&&P.original?P.original.apply(this,arguments):T},N=function(A,m){var T;if(m.indexOf("!")!==-1)return T=m.split("!"),N(A,T[0])+"!"+N(A,T[1]);if(m.charAt(0)==".")for(m=A.split("/").slice(0,-1).join("/")+"/"+m;m.indexOf(".")!==-1&&y!=m;){var y=m;m=m.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return m},M=K,(S="ace")&&(K[S]||(K[S]={}),M=K[S]),M.define&&M.define.packaged||(j.original=M.define,M.define=j,M.define.packaged=!0),M.require&&M.require.packaged||(P.original=M.require,M.require=P,M.require.packaged=!0),ace.define("ace/lib/es6-shim",["require","exports","module"],function(A,m,T){function y(f,h,a){Object.defineProperty(f,h,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||y(String.prototype,"startsWith",function(f,h){return this.lastIndexOf(f,h=h||0)===h}),String.prototype.endsWith||y(String.prototype,"endsWith",function(f,h){return(h===void 0||h>this.length)&&(h=this.length),h-=f.length,f=this.indexOf(f,h),f!==-1&&f===h}),String.prototype.repeat||y(String.prototype,"repeat",function(f){for(var h="",a=this;0<f;)1&f&&(h+=a),(f>>=1)&&(a+=a);return h}),String.prototype.includes||y(String.prototype,"includes",function(f,h){return this.indexOf(f,h)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var h=Object(f),a=1;a<arguments.length;a++){var c=arguments[a];c!=null&&Object.keys(c).forEach(function(t){h[t]=c[t]})}return h}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(h){return f[h]})}),Array.prototype.find||y(Array.prototype,"find",function(f){for(var h=this.length,a=arguments[1],c=0;c<h;c++){var t=this[c];if(f.call(a,t,c,this))return t}}),Array.prototype.findIndex||y(Array.prototype,"findIndex",function(f){for(var h=this.length,a=arguments[1],c=0;c<h;c++){var t=this[c];if(f.call(a,t,c,this))return c}}),Array.prototype.includes||y(Array.prototype,"includes",function(f,h){return this.indexOf(f,h)!=-1}),Array.prototype.fill||y(Array.prototype,"fill",function(f){for(var h=this.length>>>0,c=arguments[1]>>0,a=c<0?Math.max(h+c,0):Math.min(c,h),c=arguments[2],c=c===void 0?h:c>>0,t=c<0?Math.max(h+c,0):Math.min(c,h);a<t;)this[a]=f,a++;return this}),Array.of||y(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(A,m,T){A("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(A,m,T){m.last=function(h){return h[h.length-1]},m.stringReverse=function(h){return h.split("").reverse().join("")},m.stringRepeat=function(h,a){for(var c="";0<a;)1&a&&(c+=h),(a>>=1)&&(h+=h);return c};var y=/^\s\s*/,f=/\s\s*$/;m.stringTrimLeft=function(h){return h.replace(y,"")},m.stringTrimRight=function(h){return h.replace(f,"")},m.copyObject=function(h){var a,c={};for(a in h)c[a]=h[a];return c},m.copyArray=function(h){for(var a=[],c=0,t=h.length;c<t;c++)h[c]&&typeof h[c]=="object"?a[c]=this.copyObject(h[c]):a[c]=h[c];return a},m.deepCopy=function h(a){if(typeof a!="object"||!a)return a;if(Array.isArray(a))for(var c=[],t=0;t<a.length;t++)c[t]=h(a[t]);else{if(Object.prototype.toString.call(a)!=="[object Object]")return a;for(var t in c={},a)c[t]=h(a[t])}return c},m.arrayToMap=function(h){for(var a={},c=0;c<h.length;c++)a[h[c]]=1;return a},m.createMap=function(h){var a,c=Object.create(null);for(a in h)c[a]=h[a];return c},m.arrayRemove=function(h,a){for(var c=0;c<=h.length;c++)a===h[c]&&h.splice(c,1)},m.escapeRegExp=function(h){return h.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},m.escapeHTML=function(h){return(""+h).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},m.getMatchOffsets=function(h,a){var c=[];return h.replace(a,function(t){c.push({offset:arguments[arguments.length-2],length:t.length})}),c},m.deferredCall=function(h){function a(){t=null,h()}function c(r){return c.cancel(),t=setTimeout(a,r||0),c}var t=null;return(c.schedule=c).call=function(){return this.cancel(),h(),c},c.cancel=function(){return clearTimeout(t),t=null,c},c.isPending=function(){return t},c},m.delayedCall=function(h,a){function c(){r=null,h()}function t(e){r==null&&(r=setTimeout(c,e||a))}var r=null;return t.delay=function(e){r&&clearTimeout(r),r=setTimeout(c,e||a)},(t.schedule=t).call=function(){this.cancel(),h()},t.cancel=function(){r&&clearTimeout(r),r=null},t.isPending=function(){return r},t}}),ace.define("ace/lib/useragent",["require","exports","module"],function(A,m,T){m.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},m.getOS=function(){return m.isMac?m.OS.MAC:m.isLinux?m.OS.LINUX:m.OS.WINDOWS};var h=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(h.platform)||["other"])[0].toLowerCase(),f=h.userAgent||"",h=h.appName||"";m.isWin=y=="win",m.isMac=y=="mac",m.isLinux=y=="linux",m.isIE=h=="Microsoft Internet Explorer"||0<=h.indexOf("MSAppHost")?parseFloat((f.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((f.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),m.isOldIE=m.isIE&&m.isIE<9,m.isGecko=m.isMozilla=f.match(/ Gecko\/\d+/),m.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",m.isWebKit=parseFloat(f.split("WebKit/")[1])||void 0,m.isChrome=parseFloat(f.split(" Chrome/")[1])||void 0,m.isEdge=parseFloat(f.split(" Edge/")[1])||void 0,m.isAIR=0<=f.indexOf("AdobeAIR"),m.isAndroid=0<=f.indexOf("Android"),m.isChromeOS=0<=f.indexOf(" CrOS "),m.isIOS=/iPad|iPhone|iPod/.test(f)&&!window.MSStream,m.isIOS&&(m.isMac=!0),m.isMobile=m.isIOS||m.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(h,m,T){var y,f,h=h("./useragent"),a=(m.buildDom=function r(e,n,s){if(typeof e=="string"&&e)return p=document.createTextNode(e),n&&n.appendChild(p),p;if(!Array.isArray(e))return e&&e.appendChild&&n&&n.appendChild(e),e;if(typeof e[0]!="string"||!e[0]){for(var o=[],i=0;i<e.length;i++){var l=r(e[i],n,s);l&&o.push(l)}return o}for(var d=document.createElement(e[0]),C=e[1],p=1,i=p=C&&typeof C=="object"&&!Array.isArray(C)?2:p;i<e.length;i++)r(e[i],d,s);return p==2&&Object.keys(C).forEach(function(w){var x=C[w];w==="class"?d.className=Array.isArray(x)?x.join(" "):x:typeof x=="function"||w=="value"||w[0]=="$"?d[w]=x:w==="ref"?s&&(s[x]=d):w==="style"?typeof x=="string"&&(d.style.cssText=x):x!=null&&d.setAttribute(w,x)}),n&&n.appendChild(d),d},m.getDocumentHead=function(r){return(r=r||document).head||r.getElementsByTagName("head")[0]||r.documentElement},m.createElement=function(r,e){return document.createElementNS?document.createElementNS(e||"http://www.w3.org/1999/xhtml",r):document.createElement(r)},m.removeChildren=function(r){r.innerHTML=""},m.createTextNode=function(r,e){return(e?e.ownerDocument:document).createTextNode(r)},m.createFragment=function(r){return(r?r.ownerDocument:document).createDocumentFragment()},m.hasCssClass=function(r,e){return(r.className+"").split(/\s+/g).indexOf(e)!==-1},m.addCssClass=function(r,e){m.hasCssClass(r,e)||(r.className+=" "+e)},m.removeCssClass=function(r,e){for(var n=r.className.split(/\s+/g);;){var s=n.indexOf(e);if(s==-1)break;n.splice(s,1)}r.className=n.join(" ")},m.toggleCssClass=function(r,e){for(var n=r.className.split(/\s+/g),s=!0;;){var o=n.indexOf(e);if(o==-1)break;s=!1,n.splice(o,1)}return s&&n.push(e),r.className=n.join(" "),s},m.setCssClass=function(r,e,n){n?m.addCssClass(r,e):m.removeCssClass(r,e)},m.hasCssString=function(r,e){var n,s=0;if(n=(e=e||document).querySelectorAll("style")){for(;s<n.length;)if(n[s++].id===r)return!0}},m.removeElementById=function(r,e){(e=e||document).getElementById(r)&&e.getElementById(r).remove()},[]);function c(){var r=a;a=null,r&&r.forEach(function(e){t(e[0],e[1])})}function t(r,e,n){if(typeof document!="undefined"){if(a){if(n)c();else if(n===!1)return a.push([r,e])}if(!y){var s=n,n=(s=n&&n.getRootNode&&(s=n.getRootNode())&&s!=n?s:document).ownerDocument||s;if(e&&m.hasCssString(e,s))return null;e&&(r+=`
/*# sourceURL=ace/css/`+e+" */");var o=m.createElement("style");o.appendChild(n.createTextNode(r)),e&&(o.id=e),(s=s==n?m.getDocumentHead(n):s).insertBefore(o,s.firstChild)}}}m.useStrictCSP=function(r){(y=r)==0?c():a=a||[]},m.importCssString=t,m.importCssStylsheet=function(r,e){m.buildDom(["link",{rel:"stylesheet",href:r}],m.getDocumentHead(e))},m.scrollbarWidth=function(s){var e=m.createElement("ace_inner"),n=(e.style.width="100%",e.style.minWidth="0px",e.style.height="200px",e.style.display="block",m.createElement("ace_outer")),i=n.style,s=(i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",n.appendChild(e),s&&s.documentElement||document&&document.documentElement);if(!s)return 0;s.appendChild(n);var o=e.offsetWidth,i=(i.overflow="scroll",e.offsetWidth);return o===i&&(i=n.clientWidth),s.removeChild(n),o-i},m.computedStyle=function(r,e){return window.getComputedStyle(r,"")||{}},m.setStyle=function(r,e,n){r[e]!==n&&(r[e]=n)},m.HAS_CSS_ANIMATION=!1,m.HAS_CSS_TRANSFORMS=!1,m.HI_DPI=!h.isWin||typeof window!="undefined"&&1.5<=window.devicePixelRatio,h.isChromeOS&&(m.HI_DPI=!1),typeof document!="undefined"&&(f=document.createElement("div"),m.HI_DPI&&f.style.transform!==void 0&&(m.HAS_CSS_TRANSFORMS=!0),h.isEdge||f.style.animationName===void 0||(m.HAS_CSS_ANIMATION=!0),f=null),m.HAS_CSS_TRANSFORMS?m.translate=function(r,e,n){r.style.transform="translate("+Math.round(e)+"px, "+Math.round(n)+"px)"}:m.translate=function(r,e,n){r.style.top=Math.round(n)+"px",r.style.left=Math.round(e)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(A,m,T){var y=A("./dom");m.get=function(f,h){var a=new XMLHttpRequest;a.open("GET",f,!0),a.onreadystatechange=function(){a.readyState===4&&h(a.responseText)},a.send(null)},m.loadScript=function(f,h){var a=y.getDocumentHead(),c=document.createElement("script");c.src=f,a.appendChild(c),c.onload=c.onreadystatechange=function(t,r){!r&&c.readyState&&c.readyState!="loaded"&&c.readyState!="complete"||(c=c.onload=c.onreadystatechange=null,r)||h()}},m.qualifyURL=function(f){var h=document.createElement("a");return h.href=f,h.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(A,m,T){m.inherits=function(y,f){y.super_=f,y.prototype=Object.create(f.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}})},m.mixin=function(y,f){for(var h in f)y[h]=f[h];return y},m.implement=function(y,f){m.mixin(y,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(A,m,T){function y(){this.propagationStopped=!0}function f(){this.defaultPrevented=!0}var h={};h._emit=h._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[a]||[],r=this._defaultHandlers[a];if(t.length||r){(c=typeof c=="object"&&c?c:{}).type||(c.type=a),c.stopPropagation||(c.stopPropagation=y),c.preventDefault||(c.preventDefault=f);for(var t=t.slice(),e=0;e<t.length&&(t[e](c,this),!c.propagationStopped);e++);return r&&!c.defaultPrevented?r(c,this):void 0}},h._signal=function(a,c){if(t=(this._eventRegistry||{})[a])for(var t=t.slice(),r=0;r<t.length;r++)t[r](c,this)},h.once=function(a,c){var t=this;if(this.on(a,function r(){t.off(a,r),c.apply(null,arguments)}),!c)return new Promise(function(r){c=r})},h.setDefaultHandler=function(a,c){var t,r,e=this._defaultHandlers;(e=e||(this._defaultHandlers={_disabled_:{}}))[a]&&(r=e[a],(t=e._disabled_[a])||(e._disabled_[a]=t=[]),t.push(r),(r=t.indexOf(c))!=-1)&&t.splice(r,1),e[a]=c},h.removeDefaultHandler=function(a,c){var t,r=this._defaultHandlers;r&&(t=r._disabled_[a],r[a]==c?t&&this.setDefaultHandler(a,t.pop()):t&&(r=t.indexOf(c))!=-1&&t.splice(r,1))},h.on=h.addEventListener=function(a,c,t){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];return(r=r||(this._eventRegistry[a]=[])).indexOf(c)==-1&&r[t?"unshift":"push"](c),c},h.off=h.removeListener=h.removeEventListener=function(a,c){this._eventRegistry=this._eventRegistry||{},a=this._eventRegistry[a],a&&(c=a.indexOf(c))!==-1&&a.splice(c,1)},h.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},m.EventEmitter=h}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(h,m,T){var y,f=h("./oop"),h=h("./event_emitter").EventEmitter,a={setOptions:function(e){Object.keys(e).forEach(function(n){this.setOption(n,e[n])},this)},getOptions:function(e){var n,s={};return e?Array.isArray(e)||(s=e,e=Object.keys(s)):(n=this.$options,e=Object.keys(n).filter(function(o){return!n[o].hidden})),e.forEach(function(o){s[o]=this.getOption(o)},this),s},setOption:function(e,n){var s;if(this["$"+e]!==n)return(s=this.$options[e])?s.forwardTo?this[s.forwardTo]&&this[s.forwardTo].setOption(e,n):(s.handlesSet||(this["$"+e]=n),void(s&&s.set&&s.set.call(this,n))):c('misspelled option "'+e+'"')},getOption:function(e){var n=this.$options[e];return n?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].getOption(e):n&&n.get?n.get.call(this):this["$"+e]:c('misspelled option "'+e+'"')}};function c(e){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}r.prototype.defineOptions=function(e,n,s){return e.$options||(this.$defaultOptions[n]=e.$options={}),Object.keys(s).forEach(function(o){var i=s[o];(i=typeof i=="string"?{forwardTo:i}:i).name||(i.name=o),"initialValue"in(e.$options[i.name]=i)&&(e["$"+i.name]=i.initialValue)}),f.implement(e,a),this},r.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(n){var s=e.$options[n];"value"in s&&e.setOption(n,s.value)})},r.prototype.setDefaultValue=function(e,n,s){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][n])break;if(!this.$defaultOptions[e][n])return!1}var o=this.$defaultOptions[e]||(this.$defaultOptions[e]={});o[n]&&(o.forwardTo?this.setDefaultValue(o.forwardTo,n,s):o[n].value=s)},r.prototype.setDefaultValues=function(e,n){Object.keys(n).forEach(function(s){this.setDefaultValue(e,s,n[s])},this)},r.prototype.setMessages=function(e){y=e},r.prototype.nls=function(e,n){return e=y&&y[e]||e,e=n?e.replace(/\$(\$|[\d]+)/g,function(s,o){return o=="$"?"$":n[o]}):e};var t=r;function r(){this.$defaultOptions={}}t.prototype.warn=c,t.prototype.reportError=function(e,n){var s=new Error(e);s.data=n,typeof console=="object"&&console.error&&console.error(s),setTimeout(function(){throw s})},f.implement(t.prototype,h),m.AppConfig=t}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(A,m,T){T.exports=`.ace-tm .ace_gutter {
background: #f0f0f0;
color: #333;
}
.ace-tm .ace_print-margin {
width: 1px;
background: #e8e8e8;
}
.ace-tm .ace_fold {
background-color: #6B72E6;
}
.ace-tm {
background-color: #FFFFFF;
color: black;
}
.ace-tm .ace_cursor {
color: black;
}
.ace-tm .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-tm .ace_storage,
.ace-tm .ace_keyword {
color: blue;
}
.ace-tm .ace_constant {
color: rgb(197, 6, 11);
}
.ace-tm .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-tm .ace_constant.ace_language {
color: rgb(88, 92, 246);
}
.ace-tm .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-tm .ace_invalid {
background-color: rgba(255, 0, 0, 0.1);
color: red;
}
.ace-tm .ace_support.ace_function {
color: rgb(60, 76, 114);
}
.ace-tm .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
color: rgb(109, 121, 222);
}
.ace-tm .ace_keyword.ace_operator {
color: rgb(104, 118, 135);
}
.ace-tm .ace_string {
color: rgb(3, 106, 7);
}
.ace-tm .ace_comment {
color: rgb(76, 136, 107);
}
.ace-tm .ace_comment.ace_doc {
color: rgb(0, 102, 255);
}
.ace-tm .ace_comment.ace_doc.ace_tag {
color: rgb(128, 159, 191);
}
.ace-tm .ace_constant.ace_numeric {
color: rgb(0, 0, 205);
}
.ace-tm .ace_variable {
color: rgb(49, 132, 149);
}
.ace-tm .ace_xml-pe {
color: rgb(104, 104, 91);
}
.ace-tm .ace_entity.ace_name.ace_function {
color: #0000A2;
}
.ace-tm .ace_heading {
color: rgb(12, 7, 255);
}
.ace-tm .ace_list {
color:rgb(185, 6, 144);
}
.ace-tm .ace_meta.ace_tag {
color:rgb(0, 22, 142);
}
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-tm .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-tm .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-tm .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-tm .ace_marker-layer .ace_active-line {
background: rgba(0, 0, 0, 0.07);
}
.ace-tm .ace_gutter-active-line {
background-color : #dcdcdc;
}
.ace-tm .ace_marker-layer .ace_selected-word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-tm .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}
.ace-tm .ace_indent-guide-active {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],function(A,m,T){m.isDark=!1,m.cssClass="ace-tm",m.cssText=A("./textmate.css"),m.$id="ace/theme/textmate",A("../lib/dom").importCssString(m.cssText,m.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(A,m,T){var y=A("./lib/lang"),f=A("./lib/net"),h=A("./lib/dom"),a=A("./lib/app_config").AppConfig,c=(T.exports=m=new a,{packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null}),t=(m.get=function(e){if(c.hasOwnProperty(e))return c[e];throw new Error("Unknown config key: "+e)},m.set=function(e,n){if(c.hasOwnProperty(e))c[e]=n;else if(this.setDefaultValue("",e,n)==0)throw new Error("Unknown config key: "+e);e=="useStrictCSP"&&h.useStrictCSP(n)},m.all=function(){return y.copyObject(c)},m.$modes={},m.moduleUrl=function(e,n){var s,o,i;return c.$moduleUrls[e]||(e=e.split("/"),s=(n=n||e[e.length-2]||"")=="snippets"?"/":"-",o=e[e.length-1],n=="worker"&&s=="-"&&(i=new RegExp("^"+n+"[\\-_]|[\\-_]"+n+"$","g"),o=o.replace(i,"")),(!o||o==n)&&1<e.length&&(o=e[e.length-2]),(i=c[n+"Path"])==null?i=c.basePath:s=="/"&&(n=s=""),i&&i.slice(-1)!="/"&&(i+="/"),i+n+s+o+this.get("suffix"))},m.setModuleUrl=function(e,n){return c.$moduleUrls[e]=n},function(e,n){return e==="ace/theme/textmate"||e==="./theme/textmate"?n(null,A("./theme/textmate")):console.error("loader is not configured")}),r=(m.setLoader=function(e){t=e},m.dynamicModules=Object.create(null),m.$loading={},m.loadModule=function(e,n){function s(l){if(l&&!m.$loading[e])return n&&n(l);if(m.$loading[e]||(m.$loading[e]=[]),m.$loading[e].push(n),!(1<m.$loading[e].length)){let d=function(){t(e,function(C,p){m._emit("load.module",{name:e,module:p});var w=m.$loading[e];m.$loading[e]=null,w.forEach(function(x){x&&x(p)})})};if(!m.get("packaged"))return d();f.loadScript(m.moduleUrl(e,i),d),r()}}var o,i;if(Array.isArray(e)&&(i=e[0],e=e[1]),m.dynamicModules[e])m.dynamicModules[e]().then(function(l){l.default?s(l.default):s(l)});else{try{o=A(e)}catch{}s(o)}},m.setModuleLoader=function(e,n){m.dynamicModules[e]=n},function(){c.basePath||c.workerPath||c.modePath||c.themePath||Object.keys(c.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),r=function(){})});m.version="1.20.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(A,m,T){A("./lib/fixoldbrowsers");var y=A("./config"),f=(y.setLoader(function(a,c){A([a],function(t){c(null,t)})}),function(){return this||typeof window!="undefined"&&window}());function h(a){if(f&&f.document){y.set("packaged",a||A.packaged||T.packaged||f.define&&Z.amdD.packaged);for(var c,t={},r="",a=document.currentScript||document._currentScript,e=a&&a.ownerDocument||document,n=(a&&a.src&&(r=a.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||""),e.getElementsByTagName("script")),s=0;s<n.length;s++){var o=n[s],i=o.src||o.getAttribute("src");if(i){for(var l=o.attributes,d=0,C=l.length;d<C;d++){var p=l[d];p.name.indexOf("data-ace-")===0&&(t[p.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(x,$){return $.toUpperCase()})]=p.value)}o=i.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/),o&&(r=o[1])}}for(c in r&&(t.base=t.base||r,t.packaged=!0),t.basePath=t.base,t.workerPath=t.workerPath||t.base,t.modePath=t.modePath||t.base,t.themePath=t.themePath||t.base,delete t.base,t)t[c]!==void 0&&y.set(c,t[c])}}T.exports=function(a){y.init=h,a.require=A,a.define=Z.amdD},h(!0)}),ace.define("ace/range",["require","exports","module"],function(A,m,T){f.prototype.isEqual=function(h){return this.start.row===h.start.row&&this.end.row===h.end.row&&this.start.column===h.start.column&&this.end.column===h.end.column},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(h,a){return this.compare(h,a)==0},f.prototype.compareRange=function(a){var c=a.end,a=a.start,c=this.compare(c.row,c.column);return c==1?(c=this.compare(a.row,a.column))==1?2:c==0?1:0:c==-1?-2:(c=this.compare(a.row,a.column))==-1?-1:c==1?42:0},f.prototype.comparePoint=function(h){return this.compare(h.row,h.column)},f.prototype.containsRange=function(h){return this.comparePoint(h.start)==0&&this.comparePoint(h.end)==0},f.prototype.intersects=function(h){return h=this.compareRange(h),h==-1||h==0||h==1},f.prototype.isEnd=function(h,a){return this.end.row==h&&this.end.column==a},f.prototype.isStart=function(h,a){return this.start.row==h&&this.start.column==a},f.prototype.setStart=function(h,a){typeof h=="object"?(this.start.column=h.column,this.start.row=h.row):(this.start.row=h,this.start.column=a)},f.prototype.setEnd=function(h,a){typeof h=="object"?(this.end.column=h.column,this.end.row=h.row):(this.end.row=h,this.end.column=a)},f.prototype.inside=function(h,a){return this.compare(h,a)==0&&!this.isEnd(h,a)&&!this.isStart(h,a)},f.prototype.insideStart=function(h,a){return this.compare(h,a)==0&&!this.isEnd(h,a)},f.prototype.insideEnd=function(h,a){return this.compare(h,a)==0&&!this.isStart(h,a)},f.prototype.compare=function(h,a){return this.isMultiLine()||h!==this.start.row?h<this.start.row?-1:h>this.end.row?1:this.start.row===h?a>=this.start.column?0:-1:this.end.row!==h||a<=this.end.column?0:1:a<this.start.column?-1:a>this.end.column?1:0},f.prototype.compareStart=function(h,a){return this.start.row==h&&this.start.column==a?-1:this.compare(h,a)},f.prototype.compareEnd=function(h,a){return this.end.row==h&&this.end.column==a?1:this.compare(h,a)},f.prototype.compareInside=function(h,a){return this.end.row==h&&this.end.column==a?1:this.start.row==h&&this.start.column==a?-1:this.compare(h,a)},f.prototype.clipRows=function(h,a){var c,t;return this.end.row>a?c={row:a+1,column:0}:this.end.row<h&&(c={row:h,column:0}),this.start.row>a?t={row:a+1,column:0}:this.start.row<h&&(t={row:h,column:0}),f.fromPoints(t||this.start,c||this.end)},f.prototype.extend=function(h,a){var c,t,r=this.compare(h,a);return r==0?this:(r==-1?c={row:h,column:a}:t={row:h,column:a},f.fromPoints(c||this.start,t||this.end))},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(c){var a=c.documentToScreenPosition(this.start),c=c.documentToScreenPosition(this.end);return new f(a.row,a.column,c.row,c.column)},f.prototype.moveBy=function(h,a){this.start.row+=h,this.start.column+=a,this.end.row+=h,this.end.column+=a};var y=f;function f(h,a,c,t){this.start={row:h,column:a},this.end={row:c,column:t}}y.fromPoints=function(h,a){return new y(h.row,h.column,a.row,a.column)},y.comparePoints=function(h,a){return h.row-a.row||h.column-a.column},y.comparePoints=function(h,a){return h.row-a.row||h.column-a.column},m.Range=y}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(A,m,T){var y=A("./oop"),f=function(){var h,a,c={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(a in c.PRINTABLE_KEYS[173]="-",c.FUNCTION_KEYS)h=c.FUNCTION_KEYS[a].toLowerCase(),c[h]=parseInt(a,10);for(a in c.PRINTABLE_KEYS)h=c.PRINTABLE_KEYS[a].toLowerCase(),c[h]=parseInt(a,10);y.mixin(c,c.MODIFIER_KEYS),y.mixin(c,c.PRINTABLE_KEYS),y.mixin(c,c.FUNCTION_KEYS),c.enter=c.return,c.escape=c.esc,c.del=c.delete;for(var t=["cmd","ctrl","alt","shift"],r=Math.pow(2,t.length);r--;)c.KEY_MODS[r]=t.filter(function(e){return r&c.KEY_MODS[e]}).join("-")+"-";return c.KEY_MODS[0]="",c.KEY_MODS[-1]="input-",c}();y.mixin(m,f),m.keyCodeToString=function(h){var a=f[h];return(a=typeof a!="string"?String.fromCharCode(h):a).toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(A,m,T){var y,f=A("./keys"),h=A("./useragent"),a=null,c=0;function t(){if(y==null){y=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){y={passive:!1}}})}catch{}}return y}function r(d,C,p){this.elem=d,this.type=C,this.callback=p}r.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};function e(d){return 0|(d.ctrlKey?1:0)|(d.altKey?2:0)|(d.shiftKey?4:0)|(d.metaKey?8:0)}var n,s=m.addListener=function(d,C,p,w){d.addEventListener(C,p,t()),w&&w.$toDestroy.push(new r(d,C,p))},o=m.removeListener=function(d,C,p){d.removeEventListener(C,p,t())};m.stopEvent=function(d){return m.stopPropagation(d),m.preventDefault(d),!1},m.stopPropagation=function(d){d.stopPropagation&&d.stopPropagation()},m.preventDefault=function(d){d.preventDefault&&d.preventDefault()},m.getButton=function(d){return d.type=="dblclick"?0:d.type=="contextmenu"||h.isMac&&d.ctrlKey&&!d.altKey&&!d.shiftKey?2:d.button},m.capture=function(d,C,p){var w=d&&d.ownerDocument||document;function x($){C&&C($),p&&p($),o(w,"mousemove",C),o(w,"mouseup",x),o(w,"dragstart",x)}return s(w,"mousemove",C),s(w,"mouseup",x),s(w,"dragstart",x),x},m.addMouseWheelListener=function(d,C,p){s(d,"wheel",function(w){var x=w.deltaX||0,$=w.deltaY||0;switch(w.deltaMode){case w.DOM_DELTA_PIXEL:w.wheelX=.15*x,w.wheelY=.15*$;break;case w.DOM_DELTA_LINE:w.wheelX=15*x,w.wheelY=15*$;break;case w.DOM_DELTA_PAGE:w.wheelX=150*x,w.wheelY=150*$}C(w)},p)},m.addMultiMouseDownListener=function(d,C,p,w,x){var $,H,B,O=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function I(L){var v;if(m.getButton(L)!==0?O=0:1<L.detail&&!(4<++O)||(O=1),h.isIE&&(v=5<Math.abs(L.clientX-$)||5<Math.abs(L.clientY-H),B&&!v||(O=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},C[O-1]||600),O==1)&&($=L.clientX,H=L.clientY),L._clicks=O,p[w]("mousedown",L),4<O)O=0;else if(1<O)return p[w](u[O],L)}(d=Array.isArray(d)?d:[d]).forEach(function(L){s(L,"mousedown",I,x)})};function i(d,C,p){var w=e(C);if(!h.isMac&&a){if(C.getModifierState&&(C.getModifierState("OS")||C.getModifierState("Win"))&&(w|=8),a.altGr){if((3&w)==3)return;a.altGr=0}p!==18&&p!==17||(x="location"in C?C.location:C.keyLocation,p===17&&x===1?a[p]==1&&(c=C.timeStamp):p===18&&w===3&&x===2&&C.timeStamp-c<50&&(a.altGr=!0))}if(p in f.MODIFIER_KEYS&&(p=-1),!w&&p===13){var x="location"in C?C.location:C.keyLocation;if(x===3&&(d(C,w,-p),C.defaultPrevented))return}if(h.isChromeOS&&8&w){if(d(C,w,p),C.defaultPrevented)return;w&=-9}return!!(w||p in f.FUNCTION_KEYS||p in f.PRINTABLE_KEYS)&&d(C,w,p)}function l(){a=Object.create(null)}m.getModifierString=function(d){return f.KEY_MODS[e(d)]},m.addCommandKeyListener=function(d,C,p){var w,x;h.isOldGecko||h.isOpera&&!("KeyboardEvent"in window)?(w=null,s(d,"keydown",function($){w=$.keyCode},p),s(d,"keypress",function($){return i(C,$,w)},p)):(x=null,s(d,"keydown",function($){a[$.keyCode]=(a[$.keyCode]||0)+1;var H=i(C,$,$.keyCode);return x=$.defaultPrevented,H},p),s(d,"keypress",function($){x&&($.ctrlKey||$.altKey||$.shiftKey||$.metaKey)&&(m.stopEvent($),x=null)},p),s(d,"keyup",function($){a[$.keyCode]=null},p),a||(l(),s(window,"focus",l)))},typeof window=="object"&&window.postMessage&&!h.isOldIE&&(n=1,m.nextTick=function(d,C){C=C||window;function p(x){x.data==w&&(m.stopPropagation(x),o(C,"message",p),d())}var w="zero-timeout-message-"+n++;s(C,"message",p),C.postMessage(w,"*")}),m.$idleBlocked=!1,m.onIdle=function(d,C){return setTimeout(function p(){m.$idleBlocked?setTimeout(p,100):d()},C)},m.$idleBlockId=null,m.blockIdle=function(d){m.$idleBlockId&&clearTimeout(m.$idleBlockId),m.$idleBlocked=!0,m.$idleBlockId=setTimeout(function(){m.$idleBlocked=!1},d||100)},m.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),m.nextFrame?m.nextFrame=m.nextFrame.bind(window):m.nextFrame=function(d){setTimeout(d,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(A,m,T){var y;T.exports={lineMode:!1,pasteCancelled:function(){return!!(y&&y>Date.now()-50)||(y=!1)},cancel:function(){y=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(A,m,T){var y=A("../lib/event"),f=A("../config").nls,h=A("../lib/useragent"),a=A("../lib/dom"),c=A("../lib/lang"),t=A("../clipboard"),r=h.isChrome<18,e=h.isIE,n=63<h.isChrome,s=A("../lib/keys"),o=s.KEY_MODS,i=h.isIOS,l=i?/\s/:/\n/,d=h.isMobile;m.TextInput=function(C,p){var w=a.createElement("textarea"),x=(w.className="ace_text-input",w.setAttribute("wrap","off"),w.setAttribute("autocorrect","off"),w.setAttribute("autocapitalize","off"),w.setAttribute("spellcheck",!1),w.style.opacity="0",C.insertBefore(w,C.firstChild),!1),$=!1,H=!1,B=!1,O="",u=(d||(w.style.fontSize="1px"),!1),I=!1,L="",v=0,_=0,W=0;try{var F=document.activeElement===w}catch{}this.setAriaOptions=function(ce){ce.activeDescendant?(w.setAttribute("aria-haspopup","true"),w.setAttribute("aria-autocomplete",ce.inline?"both":"list"),w.setAttribute("aria-activedescendant",ce.activeDescendant)):(w.setAttribute("aria-haspopup","false"),w.setAttribute("aria-autocomplete","both"),w.removeAttribute("aria-activedescendant")),ce.role&&w.setAttribute("role",ce.role)},this.setAriaLabel=function(){var ce;p.session&&p.renderer.enableKeyboardAccessibility?(ce=p.session.selection.cursor.row,w.setAttribute("aria-roledescription",f("editor")),w.setAttribute("aria-label",f("Cursor at row $0",[ce+1]))):(w.removeAttribute("aria-roledescription"),w.removeAttribute("aria-label"))},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),y.addListener(w,"blur",function(ce){I||(p.onBlur(ce),F=!1,d&&!i&&document.removeEventListener("selectionchange",X))},p),y.addListener(w,"focus",function(ce){if(!I){if(F=!0,h.isEdge)try{if(!document.hasFocus())return}catch{}p.onFocus(ce),h.isEdge?setTimeout(J):J(),d&&!i&&document.addEventListener("selectionchange",X)}},p),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),O||n||this.$focusScroll=="browser")return w.focus({preventScroll:!0});var ce=w.style.top;w.style.position="fixed",w.style.top="0px";try{var fe=w.getBoundingClientRect().top!=0}catch{return}var Ae=[];if(fe)for(var Ie=w.parentElement;Ie&&Ie.nodeType==1;)Ae.push(Ie),Ie.setAttribute("ace_nocontext",!0),Ie=!Ie.parentElement&&Ie.getRootNode?Ie.getRootNode().host:Ie.parentElement;w.focus({preventScroll:!0}),fe&&Ae.forEach(function(ne){ne.removeAttribute("ace_nocontext")}),setTimeout(function(){w.style.position="",w.style.top=="0px"&&(w.style.top=ce)},0)},this.blur=function(){w.blur()},this.isFocused=function(){return F},p.on("beforeEndOperation",function(){var ce=p.curOp,fe=ce&&ce.command&&ce.command.name;fe!="insertstring"&&(fe=fe&&(ce.docChanged||ce.selectionChanged),H&&fe&&(L=w.value="",pe()),J())});var J=i?function(ce){var fe;!F||x&&!ce||B||((fe=`
ab`+(ce=ce||"")+`cde fg
`)!=w.value&&(w.value=L=fe),fe=4+(ce.length||(p.selection.isEmpty()?0:1)),v==4&&_==fe||w.setSelectionRange(4,fe),v=4,_=fe)}:function(){if(!H&&!B&&(F||b)){H=!0;var ce,fe,Ae=0,Ie=0,ne="",ie=(p.session&&(ie=(ce=p.selection).getRange(),ce=ce.cursor.row,Ae=ie.start.column,Ie=ie.end.column,ne=p.session.getLine(ce),ie.start.row!=ce?(fe=p.session.getLine(ce-1),Ae=ie.start.row<ce-1?0:Ae,Ie+=fe.length+1,ne=fe+`
`+ne):ie.end.row!=ce?(fe=p.session.getLine(ce+1),Ie=ie.end.row>ce+1?fe.length:Ie,Ie+=ne.length+1,ne=ne+`
`+fe):d&&0<ce&&(ne=`
`+ne,Ie+=1,Ae+=1),400<ne.length)&&(Ae<400&&Ie<400?ne=ne.slice(0,400):(ne=`
`,Ae==Ie?Ae=Ie=0:(Ae=0,Ie=1))),ne+`
`);if(ie!=L&&(w.value=L=ie,v=_=ie.length),b&&(v=w.selectionStart,_=w.selectionEnd),_!=Ie||v!=Ae||w.selectionEnd!=_)try{w.setSelectionRange(Ae,Ie),v=Ae,_=Ie}catch{}H=!1}},Q=(this.resetSelection=J,F&&p.onFocus(),function(ce){return ce.selectionStart===0&&ce.selectionEnd>=L.length&&ce.value===L&&L&&ce.selectionEnd!==_});function X(ce){if(w&&w.parentNode||document.removeEventListener("selectionchange",X),!H&&w.selectionStart===w.selectionEnd)for(var fe=w.selectionStart-v,Ae=_-v,Ie=(0<fe?fe=Math.max(fe-Ae,1):fe===0&&Ae&&(fe=-1),Math.abs(fe)),ne=0<fe?s.right:s.left,ie=0;ie<Ie;ie++)p.onCommandKey({},0,ne)}function te(ce){Y(ce,!0)}function E(ce){Y(ce,!1)}function G(ce){var fe=D(ce);t.pasteCancelled()||(typeof fe=="string"?(fe&&p.onPaste(fe,ce),h.isIE&&setTimeout(J),y.preventDefault(ce)):(w.value="",$=!0))}var V=null,b=(this.setInputHandler=function(ce){V=ce},!(this.getInputHandler=function(){return V})),k=function(ce,fe){if(b=b&&!1,$)return J(),ce&&p.onPaste(ce),$=!1,"";for(var Ae=w.selectionStart,Ie=w.selectionEnd,ne=v,ie=L.length-_,ge=ce,xe=ce.length-Ae,Me=ce.length-Ie,He=0;0<ne&&L[He]==ce[He];)He++,ne--;for(ge=ge.slice(He),He=1;0<ie&&L.length-He>v-1&&L[L.length-He]==ce[ce.length-He];)He++,ie--;xe-=He-1,Me-=He-1;var ee=ge.length-He+1;return ee<0&&(ne=-ee,ee=0),ge=ge.slice(0,ee),fe||ge||xe||ne||ie||Me?(ee=!(B=!0),h.isAndroid&&ge==". "&&(ge=" ",ee=!0),ge&&!ne&&!ie&&!xe&&!Me||u?p.onTextInput(ge):p.onTextInput(ge,{extendLeft:ne,extendRight:ie,restoreStart:xe,restoreEnd:Me}),B=!1,L=ce,v=Ae,_=Ie,W=Me,ee?`
`:ge):""},R=function(fe){if(H)return re();if(fe&&fe.inputType){if(fe.inputType=="historyUndo")return p.execCommand("undo");if(fe.inputType=="historyRedo")return p.execCommand("redo")}var fe=w.value,Ae=k(fe,!0);(500<fe.length||l.test(Ae)||d&&v<1&&v==_)&&J()},D=function(ce,fe,Ae){var Ie=ce.clipboardData||window.clipboardData;if(Ie&&!r){var ne=e||Ae?"Text":"text/plain";try{return fe?Ie.setData(ne,fe)!==!1:Ie.getData(ne)}catch(ie){if(!Ae)return D(ie,fe,!0)}}},Y=function(ce,fe){var Ae=p.getCopyText();if(!Ae)return y.preventDefault(ce);D(ce,Ae)?(i&&(J(Ae),x=Ae,setTimeout(function(){x=!1},10)),fe?p.onCut():p.onCopy(),y.preventDefault(ce)):(x=!0,w.value=Ae,w.select(),setTimeout(function(){x=!1,J(),fe?p.onCut():p.onCopy()}))},re=(y.addCommandKeyListener(w,p.onCommandKey.bind(p),p),y.addListener(w,"select",function(ce){H||(x?x=!1:Q(w)?(p.selectAll(),J()):d&&w.selectionStart!=v&&J())},p),y.addListener(w,"input",R,p),y.addListener(w,"cut",te,p),y.addListener(w,"copy",E,p),y.addListener(w,"paste",G,p),"oncut"in w&&"oncopy"in w&&"onpaste"in w||y.addListener(C,"keydown",function(ce){if((!h.isMac||ce.metaKey)&&ce.ctrlKey)switch(ce.keyCode){case 67:E(ce);break;case 86:G(ce);break;case 88:te(ce)}},p),function(){var ce;if(H&&p.onCompositionUpdate&&!p.$readOnly)return u?me():void(H.useTextareaForIME?p.onCompositionUpdate(w.value):(ce=w.value,k(ce),H.markerRange&&(H.context&&(H.markerRange.start.column=H.selectionStart=H.context.compositionStartOffset),H.markerRange.end.column=H.markerRange.start.column+_-H.selectionStart+W)))}),pe=function(ce){p.onCompositionEnd&&!p.$readOnly&&(H=!1,p.onCompositionEnd(),p.off("mousedown",me),ce)&&R()};function me(){I=!0,w.blur(),w.focus(),I=!1}var ye,Ee=c.delayedCall(re,50).schedule.bind(null,null);function be(){clearTimeout(ye),ye=setTimeout(function(){O&&(w.style.cssText=O,O=""),p.renderer.$isMousePressed=!1,p.renderer.$keepTextAreaAtCursor&&p.renderer.$moveTextAreaToCursor()},0)}y.addListener(w,"compositionstart",function(ce){H||!p.onCompositionStart||p.$readOnly||(H={},u)||(ce.data&&(H.useTextareaForIME=!1),setTimeout(re,0),p._signal("compositionStart"),p.on("mousedown",me),(ce=p.getSelectionRange()).end.row=ce.start.row,ce.end.column=ce.start.column,H.markerRange=ce,H.selectionStart=v,p.onCompositionStart(H),H.useTextareaForIME?(L=w.value="",_=v=0):(w.msGetInputContext&&(H.context=w.msGetInputContext()),w.getInputContext&&(H.context=w.getInputContext())))},p),y.addListener(w,"compositionupdate",re,p),y.addListener(w,"keyup",function(ce){ce.keyCode==27&&w.value.length<w.selectionStart&&(H||(L=w.value),v=_=-1,J()),Ee()},p),y.addListener(w,"keydown",Ee,p),y.addListener(w,"compositionend",pe,p),this.getElement=function(){return w},this.setCommandMode=function(ce){u=ce,w.readOnly=!1},this.setReadOnly=function(ce){u||(w.readOnly=ce)},this.setCopyWithEmptySelection=function(ce){},this.onContextMenu=function(ce){b=!0,J(),p._emit("nativecontextmenu",{target:p,domEvent:ce}),this.moveToMouse(ce,!0)},this.moveToMouse=function(ce,Ie){O=O||w.style.cssText,w.style.cssText=(Ie?"z-index:100000;":"")+(h.isIE?"opacity:0.1;":"")+"text-indent: -"+(v+_)*p.renderer.characterWidth*.5+"px;";function Ae(Me){a.translate(w,Me.clientX-ge-2,Math.min(Me.clientY-ie-2,xe))}var Ie=p.container.getBoundingClientRect(),ne=a.computedStyle(p.container),ie=Ie.top+(parseInt(ne.borderTopWidth)||0),ge=Ie.left+(parseInt(Ie.borderLeftWidth)||0),xe=Ie.bottom-ie-w.clientHeight-2;Ae(ce),ce.type=="mousedown"&&(p.renderer.$isMousePressed=!0,clearTimeout(ye),h.isWin)&&y.capture(p.container,Ae,be)},this.onContextMenuClose=be;function Se(ce){p.textInput.onContextMenu(ce),be()}if(y.addListener(w,"mouseup",Se,p),y.addListener(w,"mousedown",function(ce){ce.preventDefault(),be()},p),y.addListener(p.renderer.scroller,"contextmenu",Se,p),y.addListener(w,"contextmenu",Se,p),i){let ce=function(fe){var Ae,Ie,ne,ie;document.activeElement!==Ne||Te||H||we.$mouseHandler.isMousePressed||x||(Ae=Ne.selectionStart,Ie=Ne.selectionEnd,ne=null,(ie=0)==Ae?ne=s.up:Ae==1?ne=s.home:_<Ie&&L[Ie]==`
`?ne=s.end:Ae<v&&L[Ae-1]==" "?(ne=s.left,ie=o.option):Ae<v||Ae==v&&_!=v&&Ae==Ie?ne=s.left:_<Ie&&2<L.slice(0,Ie).split(`
`).length?ne=s.down:_<Ie&&L[Ie-1]==" "?(ne=s.right,ie=o.option):(_<Ie||Ie==_&&_!=v&&Ae==Ie)&&(ne=s.right),Ae!==Ie&&(ie|=o.shift),ne&&(!we.onCommandKey({},ie,ne)&&we.commands&&(ne=s.keyCodeToString(ne),ie=we.commands.findKeyCommand(ie,ne))&&we.execCommand(ie),v=Ae,_=Ie,J("")))};var we=p,Ne=w,Pe=null,Te=!1;Ne.addEventListener("keydown",function(fe){Pe&&clearTimeout(Pe),Te=!0},!0),Ne.addEventListener("keyup",function(fe){Pe=setTimeout(function(){Te=!1},100)},!0),document.addEventListener("selectionchange",ce),we.on("destroy",function(){document.removeEventListener("selectionchange",ce)})}this.destroy=function(){w.parentElement&&w.parentElement.removeChild(w)}},m.$setUserAgentForTests=function(C,p){d=C,i=p}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(f,m,T){var y=f("../lib/useragent"),f=(h.prototype.onMouseDown=function(c){var t=c.inSelection(),r=c.getDocumentPosition(),e=(this.mousedownEvent=c,this.editor),n=c.getButton();if(n!==0)!e.getSelectionRange().isEmpty()&&n!=1||e.selection.moveToPosition(r),n==2&&(e.textInput.onContextMenu(c.domEvent),y.isMozilla||c.preventDefault());else{if(this.mousedownEvent.time=Date.now(),!t||e.isFocused()||(e.focus(),!this.$focusTimeout)||this.$clickSelection||e.inMultiSelectMode)return this.captureMouse(c),this.startSelect(r,1<c.domEvent._clicks),c.preventDefault();this.setState("focusWait"),this.captureMouse(c)}},h.prototype.startSelect=function(c,t){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var r=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?r.selection.selectToPosition(c):t||r.selection.moveToPosition(c),t||this.select(),r.setStyle("ace_selecting"),this.setState("select"))},h.prototype.select=function(){var c,t=this.editor,r=t.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(c=(c=this.$clickSelection.comparePoint(r))==-1?this.$clickSelection.end:c==1?this.$clickSelection.start:(r=(c=a(this.$clickSelection,r)).cursor,c.anchor),t.selection.setSelectionAnchor(c.row,c.column)),t.selection.selectToPosition(r),t.renderer.scrollCursorIntoView()},h.prototype.extendSelectionBy=function(o){var t,r,e,n=this.editor,s=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[o](s.row,s.column);this.$clickSelection&&(r=this.$clickSelection.comparePoint(o.start),t=this.$clickSelection.comparePoint(o.end),r==-1&&t<=0?(e=this.$clickSelection.end,o.end.row==s.row&&o.end.column==s.column||(s=o.start)):t==1&&0<=r?(e=this.$clickSelection.start,o.start.row==s.row&&o.start.column==s.column||(s=o.end)):e=r==-1&&t==1?(s=o.end,o.start):(s=(r=a(this.$clickSelection,s)).cursor,r.anchor),n.selection.setSelectionAnchor(e.row,e.column)),n.selection.selectToPosition(s),n.renderer.scrollCursorIntoView()},h.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},h.prototype.focusWait=function(){e=this.mousedownEvent.x,c=this.mousedownEvent.y,r=this.x,t=this.y;var c,t,r=Math.sqrt(Math.pow(r-e,2)+Math.pow(t-c,2)),e=Date.now();(0<r||e-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},h.prototype.onDoubleClick=function(t){var t=t.getDocumentPosition(),r=this.editor,e=r.session.getBracketRange(t);e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.setState("select")):(e=r.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=e,this.select()},h.prototype.onTripleClick=function(t){var t=t.getDocumentPosition(),r=this.editor,e=(this.setState("selectByLines"),r.getSelectionRange());e.isMultiLine()&&e.contains(t.row,t.column)?(this.$clickSelection=r.selection.getLineRange(e.start.row),this.$clickSelection.end=r.selection.getLineRange(e.end.row).end):this.$clickSelection=r.selection.getLineRange(t.row),this.select()},h.prototype.onQuadClick=function(c){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},h.prototype.onMouseWheel=function(c){var t,r,e,n,s,o,i;if(!c.getAccelKey())return c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),r=this.$lastScroll,n=(i=(e=c.domEvent.timeStamp)-r.t)?c.wheelX/i:r.vx,s=i?c.wheelY/i:r.vy,i<550&&(n=(n+r.vx)/2,s=(s+r.vy)/2),i=!1,1<=(o=Math.abs(n/s))&&t.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(i=!0),(i=o<=1&&t.renderer.isScrollableBy(0,c.wheelY*c.speed)?!0:i)?r.allowed=e:e-r.allowed<550&&(Math.abs(n)<=1.5*Math.abs(r.vx)&&Math.abs(s)<=1.5*Math.abs(r.vy)?(i=!0,r.allowed=e):r.allowed=0),r.t=e,r.vx=n,r.vy=s,i?(t.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()):void 0},h);function h(c){c.$clickSelection=null;var t=c.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(r){c[r]=this[r]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}function a(c,t){return(c.start.row==c.end.row?2*t.column-c.start.column-c.end.column:c.start.row!=c.end.row-1||c.start.column||c.end.column?2*t.row-c.start.row-c.end.row:t.column-4)<0?{cursor:c.start,anchor:c.end}:{cursor:c.end,anchor:c.start}}f.prototype.selectEnd=f.prototype.selectByLinesEnd,f.prototype.selectAllEnd=f.prototype.selectByLinesEnd,f.prototype.selectByWordsEnd=f.prototype.selectByLinesEnd,m.DefaultHandlers=f}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],function(t,m,T){var y,o=this&&this.__extends||(y=function(l,d){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(C,p){C.__proto__=p}:function(C,p){for(var w in p)Object.prototype.hasOwnProperty.call(p,w)&&(C[w]=p[w])}))(l,d)},function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function C(){this.constructor=l}y(l,d),l.prototype=d===null?Object.create(d):(C.prototype=d.prototype,new C)}),f=this&&this.__values||function(l){var d=typeof Symbol=="function"&&Symbol.iterator,C=d&&l[d],p=0;if(C)return C.call(l);if(l&&typeof l.length=="number")return{next:function(){return{value:(l=l&&p>=l.length?void 0:l)&&l[p++],done:!l}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},h=t("./lib/dom"),a=t("./range").Range,c="ace_tooltip",t=(r.prototype.$init=function(){return this.$element=h.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},r.prototype.getElement=function(){return this.$element||this.$init()},r.prototype.setText=function(l){this.getElement().textContent=l},r.prototype.setHtml=function(l){this.getElement().innerHTML=l},r.prototype.setPosition=function(l,d){this.getElement().style.left=l+"px",this.getElement().style.top=d+"px"},r.prototype.setClassName=function(l){h.addCssClass(this.getElement(),l)},r.prototype.setTheme=function(l){this.$element.className=c+" "+(l.isDark?"ace_dark ":"")+(l.cssClass||"")},r.prototype.show=function(l,d,C){l!=null&&this.setText(l),d!=null&&C!=null&&this.setPosition(d,C),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},r.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},r.prototype.getHeight=function(){return this.getElement().offsetHeight},r.prototype.getWidth=function(){return this.getElement().offsetWidth},r.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},r);function r(l){this.isOpen=!1,this.$element=null,this.$parentNode=l}function e(){this.popups=[]}e.prototype.addPopup=function(l){this.popups.push(l),this.updatePopups()},e.prototype.removePopup=function(l){l=this.popups.indexOf(l),l!==-1&&(this.popups.splice(l,1),this.updatePopups())},e.prototype.updatePopups=function(){this.popups.sort(function(L,v){return v.priority-L.priority});var l,d,C,p,w=[];try{for(var x=f(this.popups),$=x.next();!$.done;$=x.next()){var H=$.value,B=!0;try{C=void 0;for(var O=f(w),u=O.next();!u.done;u=O.next()){var I=u.value;if(this.doPopupsOverlap(I,H)){B=!1;break}}}catch(L){C={error:L}}finally{try{u&&!u.done&&(p=O.return)&&p.call(O)}finally{if(C)throw C.error}}B?w.push(H):H.hide()}}catch(L){l={error:L}}finally{try{$&&!$.done&&(d=x.return)&&d.call(x)}finally{if(l)throw l.error}}},e.prototype.doPopupsOverlap=function(l,d){return l=l.getElement().getBoundingClientRect(),d=d.getElement().getBoundingClientRect(),l.left<d.right&&l.right>d.left&&l.top<d.bottom&&l.bottom>d.top};var n,s=new e,o=(m.popupManager=s,m.Tooltip=t,o(i,n=t),i.prototype.addToEditor=function(l){l.on("mousemove",this.onMouseMove),l.on("mousedown",this.hide),l.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},i.prototype.removeFromEditor=function(l){l.off("mousemove",this.onMouseMove),l.off("mousedown",this.hide),l.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},i.prototype.onMouseMove=function(l,p){this.lastEvent=l,this.lastT=Date.now();var C,p=p.$mouseHandler.isMousePressed;this.isOpen&&(C=this.lastEvent&&this.lastEvent.getDocumentPosition(),this.range&&this.range.contains(C.row,C.column)&&!p&&!this.isOutsideOfText(this.lastEvent)||this.hide()),this.timeout||p||(this.lastEvent=l,this.timeout=setTimeout(this.waitForHover,this.idleTime))},i.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var l=Date.now()-this.lastT;10<this.idleTime-l?this.timeout=setTimeout(this.waitForHover,this.idleTime-l):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},i.prototype.isOutsideOfText=function(l){var d=l.editor,C=l.getDocumentPosition(),p=d.session.getLine(C.row);return C.column==p.length&&(p=d.renderer.pixelToScreenCoordinates(l.clientX,l.clientY),l=d.session.documentToScreenPosition(C.row,C.column),l.column!=p.column||l.row!=p.row)},i.prototype.setDataProvider=function(l){this.$gatherData=l},i.prototype.showForRange=function(l,d,C,p){var w,x,$;p&&p!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement()||(p=l.renderer,this.isOpen||(s.addPopup(this),this.$registerCloseEvents(),this.setTheme(p.theme)),this.isOpen=!0,this.addMarker(d,l.session),this.range=a.fromPoints(d.start,d.end),(w=this.getElement()).innerHTML="",w.appendChild(C),w.style.display="block",C=p.textToScreenCoordinates(d.start.row,d.start.column),d=l.getCursorPosition(),l=w.clientHeight,x=p.scroller.getBoundingClientRect(),$=!0,this.row>d.row?$=!0:this.row<d.row&&($=!1),C.pageY-l+p.lineHeight<x.top?$=!0:C.pageY+l>x.bottom&&($=!1),$?C.pageY+=p.lineHeight:C.pageY-=l,w.style.maxWidth=x.width-(C.pageX-x.left)+"px",this.setPosition(C.pageX,C.pageY))},i.prototype.addMarker=function(l,d){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=d,this.marker=d&&d.addMarker(l,"ace_highlight-marker","text")},i.prototype.hide=function(l){!l&&document.activeElement==this.getElement()||l&&l.target&&(l.type!="keydown"||l.ctrlKey||l.metaKey)&&this.$element.contains(l.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,s.removePopup(this)))},i.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},i.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},i.prototype.onMouseOut=function(l){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,!this.isOpen||!l.relatedTarget||l.relatedTarget==this.getElement()||l&&l.currentTarget.contains(l.relatedTarget)||l.relatedTarget.classList.contains("ace_content")||this.hide()},i);function i(d){d===void 0&&(d=document.body);var d=n.call(this,d)||this,C=(d.timeout=void 0,d.lastT=0,d.idleTime=350,d.lastEvent=void 0,d.onMouseOut=d.onMouseOut.bind(d),d.onMouseMove=d.onMouseMove.bind(d),d.waitForHover=d.waitForHover.bind(d),d.hide=d.hide.bind(d),d.getElement());return C.style.whiteSpace="pre-wrap",C.style.pointerEvents="auto",C.addEventListener("mouseout",d.onMouseOut),C.tabIndex=-1,C.addEventListener("blur",function(){C.contains(document.activeElement)||this.hide()}.bind(d)),d}m.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(A,m,T){var y,f=this&&this.__extends||(y=function(o,i){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,d){l.__proto__=d}:function(l,d){for(var C in d)Object.prototype.hasOwnProperty.call(d,C)&&(l[C]=d[C])}))(o,i)},function(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function l(){this.constructor=o}y(o,i),o.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}),h=this&&this.__values||function(o){var i=typeof Symbol=="function"&&Symbol.iterator,l=i&&o[i],d=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return{value:(o=o&&d>=o.length?void 0:o)&&o[d++],done:!o}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},a=A("../lib/dom"),c=A("../lib/event"),t=A("../tooltip").Tooltip,r=A("../config").nls;m.GutterHandler=function(o){var i,l,d=o.editor,C=d.renderer.$gutterLayer,p=new n(d);function w(){i=i&&clearTimeout(i),p.isOpen&&(p.hide(),d._signal("hideGutterTooltip",p),d.off("mousewheel",w))}function x($){p.setPosition($.x,$.y)}o.editor.setDefaultHandler("guttermousedown",function($){if(d.isFocused()&&$.getButton()==0){var H=C.getRegion($);if(H!="foldWidgets"){var H=$.getDocumentPosition().row,B=d.session.selection;if($.getShiftKey())B.selectTo(H,0);else{if($.domEvent.detail==2)return d.selectAll(),$.preventDefault();o.$clickSelection=d.selection.getLineRange(H)}return o.setState("selectByLines"),o.captureMouse($),$.preventDefault()}}}),o.editor.setDefaultHandler("guttermousemove",function($){var H=$.domEvent.target||$.domEvent.srcElement;if(a.hasCssClass(H,"ace_fold-widget"))return w();p.isOpen&&o.$tooltipFollowsMouse&&x($),l=$,i=i||setTimeout(function(){if(i=null,l&&!o.isMousePressed){var B=l.getDocumentPosition().row;if(B==d.session.getLength()){var O=d.renderer.pixelToScreenCoordinates(0,l.y).row,u=l.$pos;if(O>d.session.documentToScreenRow(u.row,u.column))return void w()}p.showTooltip(B),d.on("mousewheel",w),o.$tooltipFollowsMouse?x(l):(O=C.$lines.cells[B].element.querySelector("[class*=ace_icon]").getBoundingClientRect(),(u=p.getElement().style).left=O.right+"px",u.top=O.bottom+"px")}else w()},50)}),c.addListener(d.renderer.$gutter,"mouseout",function($){l=null,p.isOpen&&(i=i||setTimeout(function(){i=null,w()},50))},d),d.on("changeSession",w)},f(s,e=t),s.prototype.setPosition=function(o,i){var l=window.innerWidth||document.documentElement.clientWidth,d=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),p=this.getHeight();l<(o+=15)+C&&(o-=o+C-l),d<(i+=15)+p&&(i-=20+p),t.prototype.setPosition.call(this,o,i)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:r("error"),plural:r("errors")},warning:{singular:r("warning"),plural:r("warnings")},info:{singular:r("information message"),plural:r("information messages")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(o){var i=this.editor.renderer.$gutterLayer,l=i.$annotations[o],d=l?{text:Array.from(l.text),type:Array.from(l.type)}:{text:[],type:[]},C=i.session.getFoldLine(o);if(C&&i.$showFoldedAnnotations){for(var p,w={error:[],warning:[],info:[]},x=o+1;x<=C.end.row;x++)if(i.$annotations[x])for(var $=0;$<i.$annotations[x].text.length;$++){var H=i.$annotations[x].type[$];w[H].push(i.$annotations[x].text[$]),H==="error"?p="error_fold":H==="warning"&&(p="warning_fold")}p!=="error_fold"&&p!=="warning_fold"||(l="".concat(s.annotationsToSummaryString(w)," in folded code."),d.text.push(l),d.type.push(p))}if(d.text.length===0)return this.hide();for(var B={error:[],warning:[],info:[]},O=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",x=0;x<d.text.length;x++){var u="<span class='ace_".concat(d.type[x]," ").concat(O,"' aria-label='").concat(s.annotationLabels[d.type[x].replace("_fold","")].singular,"' role=img> </span> ").concat(d.text[x]);B[d.type[x].replace("_fold","")].push(u)}o=[].concat(B.error,B.warning,B.info).join("<br>"),this.setHtml(o),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},s.annotationsToSummaryString=function(o){var i,l,d=[];try{for(var C=h(["error","warning","info"]),p=C.next();!p.done;p=C.next()){var w,x=p.value;o[x].length&&(w=o[x].length===1?s.annotationLabels[x].singular:s.annotationLabels[x].plural,d.push("".concat(o[x].length," ").concat(w)))}}catch($){i={error:$}}finally{try{p&&!p.done&&(l=C.return)&&l.call(C)}finally{if(i)throw i.error}}return d.join(", ")};var e,n=s;function s(o){var i=e.call(this,o.container)||this;return i.editor=o,i}m.GutterTooltip=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(A,m,T){var y=A("../lib/event"),f=A("../lib/useragent");function h(a,c){this.domEvent=a,this.editor=c,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}h.prototype.stopPropagation=function(){y.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){y.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},h.prototype.inSelection=function(){var a,c;return this.$inSelection===null&&((a=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(c=this.getDocumentPosition(),this.$inSelection=a.contains(c.row,c.column))),this.$inSelection},h.prototype.getButton=function(){return y.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},m.MouseEvent=h}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(A,m,T){var y=A("../lib/dom"),f=A("../lib/event"),h=A("../lib/useragent");function a(t){var r,e,n,s,o,i,l,d,C,p,w,x=t.editor,$=y.createElement("div"),H=($.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",$.textContent="\xA0",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(F){t[F]=this[F]},this),x.on("mousedown",this.onMouseDown.bind(t)),x.container),B=0;function O(){var F,J,Q,X,te,E,G,V,b=i;i=x.renderer.screenToTextCoordinates(e,n),Q=i,J=b,X=Date.now(),F=!J||Q.row!=J.row,J=!J||Q.column!=J.column,!p||F||J?(x.moveCursorToPosition(Q),p=X,w={x:e,y:n}):5<c(w.x,w.y,e,n)?p=null:200<=X-p&&(x.renderer.scrollCursorIntoView(),p=null),F=i,J=b,Q=Date.now(),X=x.renderer.layerConfig.lineHeight,b=x.renderer.layerConfig.characterWidth,te=x.renderer.scroller.getBoundingClientRect(),te={x:{left:e-te.left,right:te.right-e},y:{top:n-te.top,bottom:te.bottom-n}},E=Math.min(te.x.left,te.x.right),G=Math.min(te.y.top,te.y.bottom),V={row:F.row,column:F.column},E/b<=2&&(V.column+=te.x.left<te.x.right?-3:2),G/X<=1&&(V.row+=te.y.top<te.y.bottom?-1:1),E=F.row!=V.row,b=F.column!=V.column,G=!J||F.row!=J.row,E||b&&!G?C?200<=Q-C&&x.renderer.scrollCursorIntoView(V):C=Q:C=null}function u(){o=x.selection.toOrientedRange(),r=x.session.addMarker(o,"ace_selection",x.getSelectionStyle()),x.clearSelection(),x.isFocused()&&x.renderer.$cursorLayer.setBlinking(!1),clearInterval(s),O(),s=setInterval(O,20),B=0,f.addListener(document,"mousemove",v)}function I(){clearInterval(s),x.session.removeMarker(r),r=null,x.selection.fromOrientedRange(o),x.isFocused()&&!d&&x.$resetCursorStyle(),B=0,p=C=i=o=null,f.removeListener(document,"mousemove",v)}this.onDragStart=function(F){var J;if(this.cancelDrag||!H.draggable)return J=this,setTimeout(function(){J.startSelect(),J.captureMouse(F)},0),F.preventDefault();o=x.getSelectionRange();var Q=F.dataTransfer;Q.effectAllowed=x.getReadOnly()?"copy":"copyMove",x.container.appendChild($),Q.setDragImage&&Q.setDragImage($,0,0),setTimeout(function(){x.container.removeChild($)}),Q.clearData(),Q.setData("Text",x.session.getTextRange()),d=!0,this.setState("drag")},this.onDragEnd=function(F){H.draggable=!1,d=!1,this.setState(null),x.getReadOnly()||(F=F.dataTransfer.dropEffect,l||F!="move"||x.session.remove(x.getSelectionRange()),x.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(F){if(!x.getReadOnly()&&_(F.dataTransfer))return e=F.clientX,n=F.clientY,r||u(),B++,F.dataTransfer.dropEffect=l=W(F),f.preventDefault(F)},this.onDragOver=function(F){if(!x.getReadOnly()&&_(F.dataTransfer))return e=F.clientX,n=F.clientY,r||(u(),B++),L!==null&&(L=null),F.dataTransfer.dropEffect=l=W(F),f.preventDefault(F)},this.onDragLeave=function(F){if(--B<=0&&r)return I(),l=null,f.preventDefault(F)},this.onDrop=function(F){if(i){var J=F.dataTransfer;if(d)switch(l){case"move":o=o.contains(i.row,i.column)?{start:i,end:i}:x.moveText(o,i);break;case"copy":o=x.moveText(o,i,!0)}else J=J.getData("Text"),o={start:i,end:x.session.insert(i,J)},x.focus(),l=null;return I(),f.preventDefault(F)}},f.addListener(H,"dragstart",this.onDragStart.bind(t),x),f.addListener(H,"dragend",this.onDragEnd.bind(t),x),f.addListener(H,"dragenter",this.onDragEnter.bind(t),x),f.addListener(H,"dragover",this.onDragOver.bind(t),x),f.addListener(H,"dragleave",this.onDragLeave.bind(t),x),f.addListener(H,"drop",this.onDrop.bind(t),x);var L=null;function v(){L==null&&(L=setTimeout(function(){L!=null&&r&&I()},20))}function _(F){return F=F.types,!F||Array.prototype.some.call(F,function(J){return J=="text/plain"||J=="Text"})}function W(F){var J=["copy","copymove","all","uninitialized"],Q=h.isMac?F.altKey:F.ctrlKey,X="uninitialized";try{X=F.dataTransfer.effectAllowed.toLowerCase()}catch{}var te="none";return Q&&0<=J.indexOf(X)?te="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(X)?te="move":0<=J.indexOf(X)&&(te="copy"),te}}function c(t,r,e,n){return Math.sqrt(Math.pow(e-t,2)+Math.pow(n-r,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,r=(t.container.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging"),h.isWin?"default":"move");t.renderer.setCursorStyle(r),this.setState("dragReady")},this.onMouseDrag=function(t){var r=this.editor.container;h.isIE&&this.state=="dragReady"&&3<c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&r.dragDrop(),this.state==="dragWait"&&0<c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(t){var r,e,n;this.$dragEnabled&&(this.mousedownEvent=t,r=this.editor,e=t.inSelection(),n=t.getButton(),(t.domEvent.detail||1)!==1||n!==0||!e||t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(n=t.domEvent.target||t.domEvent.srcElement)&&(n.unselectable="on"),r.getDragDelay()?(h.isWebKit&&(this.cancelDrag=!0,r.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0))}}).call(a.prototype),m.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(A,m,T){var y=A("./mouse_event").MouseEvent,f=A("../lib/event"),h=A("../lib/dom");m.addTouchListeners=function(a,c){var t,r,e,n,s,o,i,l,d,C="scroll",p=0,w=0,x=0,$=0;function H(){function I(_){var W,F=_.target.getAttribute("action");F!="more"&&v?(F=="paste"?L.readText().then(function(J){c.execCommand(F,J)}):F&&(F!="cut"&&F!="copy"||(L?L.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(F)),d.firstChild.style.display="none",v=!1,F!="openCommandPallete"&&c.focus()):(v=!v,_=c.getCopyText(),W=c.session.getUndoManager().hasUndo(),d.replaceChild(h.buildDom(v?["span",!_&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],L&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],W&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),d.firstChild))}var L=window.navigator&&window.navigator.clipboard,v=!1;d=h.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(_){C="menu",_.stopPropagation(),_.preventDefault(),c.textInput.focus()},ontouchend:function(_){_.stopPropagation(),_.preventDefault(),I(_)},onclick:I},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function B(){d||H();var I=c.selection.cursor,I=c.renderer.textToScreenCoordinates(I.row,I.column),L=c.renderer.textToScreenCoordinates(0,0).pageX,v=c.renderer.scrollLeft,_=c.container.getBoundingClientRect();d.style.top=I.pageY-_.top-3+"px",I.pageX-_.left<_.width-70?(d.style.left="",d.style.right="10px"):(d.style.right="",d.style.left=L+v-_.left+"px"),d.style.display="",d.firstChild.style.display="none",c.on("input",O)}function O(I){d&&(d.style.display="none"),c.off("input",O)}function u(){s=null,clearTimeout(s);var I=c.selection.getRange(),L=I.contains(i.row,i.column);!I.isEmpty()&&L||(c.selection.moveToPosition(i),c.selection.selectWord()),C="wait",B()}f.addListener(a,"contextmenu",function(I){l&&c.textInput.getElement().focus()},c),f.addListener(a,"touchstart",function(I){var L=I.touches;if(s||1<L.length)clearTimeout(s),s=null,e=-1,C="zoom";else{l=c.$mouseHandler.isMousePressed=!0;var v=c.renderer.layerConfig.lineHeight,_=c.renderer.layerConfig.lineHeight,W=I.timeStamp,F=(n=W,L[0]),J=F.clientX,F=F.clientY,J=(Math.abs(t-J)+Math.abs(r-F)>v&&(e=-1),t=I.clientX=J,r=I.clientY=F,x=$=0,new y(I,c));if(i=J.getDocumentPosition(),W-e<500&&L.length==1&&!p)w++,I.preventDefault(),I.button=0,s=null,clearTimeout(s),c.selection.moveToPosition(i),(F=2<=w?c.selection.getLineRange(i.row):c.session.getBracketRange(i))&&!F.isEmpty()?c.selection.setRange(F):c.selection.selectWord(),C="wait";else{w=0;var J=c.selection.cursor,L=c.selection.isEmpty()?J:c.selection.anchor,F=c.renderer.$cursorLayer.getPixelPosition(J,!0),J=c.renderer.$cursorLayer.getPixelPosition(L,!0),L=c.renderer.scroller.getBoundingClientRect(),Q=c.renderer.layerConfig.offset,X=c.renderer.scrollLeft,te=function(b,k){return(b/=_)*b+(k=k/v-.75)*k};if(I.clientX<L.left)return void(C="zoom");F=te(I.clientX-L.left-F.left+X,I.clientY-L.top-F.top+Q),te=te(I.clientX-L.left-J.left+X,I.clientY-L.top-J.top+Q),F<3.5&&te<3.5&&(C=te<F?"cursor":"anchor"),C=te<3.5?"anchor":F<3.5?"cursor":"scroll",s=setTimeout(u,450)}e=W}},c),f.addListener(a,"touchend",function(I){l=c.$mouseHandler.isMousePressed=!1,o&&clearInterval(o),C=="zoom"?(C="",p=0):(s?(c.selection.moveToPosition(i),p=0,B):C=="scroll"?(p+=60,o=setInterval(function(){p--<=0&&(clearInterval(o),o=null),Math.abs(x)<.01&&(x=0),Math.abs($)<.01&&($=0),p<20&&(x*=.9),p<20&&($*=.9);var L=c.session.getScrollTop();c.renderer.scrollBy(10*x,10*$),L==c.session.getScrollTop()&&(p=0)},10),O):B)(),clearTimeout(s),s=null},c),f.addListener(a,"touchmove",function(I){s&&(clearTimeout(s),s=null);var L=I.touches;if(!(1<L.length||C=="zoom")){var L=L[0],v=t-L.clientX,_=r-L.clientY;if(C=="wait"){if(!(4<v*v+_*_))return I.preventDefault();C="cursor"}t=L.clientX,r=L.clientY,I.clientX=L.clientX,I.clientY=L.clientY;var L=I.timeStamp,W=L-n;n=L,C=="scroll"?((L=new y(I,c)).speed=1,L.wheelX=v,L.wheelY=_,10*Math.abs(v)<Math.abs(_)&&(v=0),10*Math.abs(_)<Math.abs(v)&&(_=0),W!=0&&(x=v/W,$=_/W),c._emit("mousewheel",L),L.propagationStopped||(x=$=0)):(v=new y(I,c).getDocumentPosition(),C=="cursor"?c.selection.moveCursorToPosition(v):C=="anchor"&&c.selection.setSelectionAnchor(v.row,v.column),c.renderer.scrollCursorIntoView(v),I.preventDefault())}},c)}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,m,T){var y=e("../lib/event"),f=e("../lib/useragent"),h=e("./default_handlers").DefaultHandlers,a=e("./default_gutter_handler").GutterHandler,c=e("./mouse_event").MouseEvent,t=e("./dragdrop_handler").DragdropHandler,r=e("./touch_handler").addTouchListeners,e=e("../config"),n=(s.prototype.onMouseEvent=function(o,i){this.editor.session&&this.editor._emit(o,new c(i,this.editor))},s.prototype.onMouseMove=function(o,i){var l=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;l&&l.length&&this.editor._emit(o,new c(i,this.editor))},s.prototype.onMouseWheel=function(o,i){var l=new c(i,this.editor);l.speed=2*this.$scrollSpeed,l.wheelX=i.wheelX,l.wheelY=i.wheelY,this.editor._emit(o,l)},s.prototype.setState=function(o){this.state=o},s.prototype.captureMouse=function(o,i){this.x=o.x,this.y=o.y,this.isMousePressed=!0;function l(B){if(B){if(f.isWebKit&&!B.which&&x.releaseMouse)return x.releaseMouse();x.x=B.clientX,x.y=B.clientY,i&&i(B),x.mouseEvent=new c(B,x.editor),x.$mouseMoved=!0}}function d(B){p.off("beforeEndOperation",$),clearInterval(H),p.session&&C(),x[x.state+"End"]&&x[x.state+"End"](B),x.state="",x.isMousePressed=w.$isMousePressed=!1,w.$keepTextAreaAtCursor&&w.$moveTextAreaToCursor(),x.$onCaptureMouseMove=x.releaseMouse=null,B&&x.onMouseEvent("mouseup",B),p.endOperation()}function C(){x[x.state]&&x[x.state](),x.$mouseMoved=!1}var p=this.editor,w=this.editor.renderer,x=(w.$isMousePressed=!0,this);if(f.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){d(o)});var $=function(B){x.releaseMouse&&p.curOp.command.name&&p.curOp.selectionChanged&&(x[x.state+"End"]&&x[x.state+"End"](),x.state="",x.releaseMouse())},H=(p.on("beforeEndOperation",$),p.startOperation({command:{name:"mouse"}}),x.$onCaptureMouseMove=l,x.releaseMouse=y.capture(this.editor.container,l,d),setInterval(C,20))},s.prototype.cancelContextMenu=function(){var o=function(i){i&&i.domEvent&&i.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),i&&i.domEvent&&y.stopEvent(i.domEvent))}.bind(this);setTimeout(o,10),this.editor.on("nativecontextmenu",o)},s.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},s);function s(o){function i(p){document.hasFocus&&document.hasFocus()&&(o.isFocused()||document.activeElement!=(o.textInput&&o.textInput.getElement()))||window.focus(),o.focus(),setTimeout(function(){o.isFocused()||o.focus()})}var l=this,d=(this.editor=o,new h(this),new a(this),new t(this),o.renderer.getMouseEventTarget()),C=(y.addListener(d,"click",this.onMouseEvent.bind(this,"click"),o),y.addListener(d,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),y.addMultiMouseDownListener([d,o.renderer.scrollBarV&&o.renderer.scrollBarV.inner,o.renderer.scrollBarH&&o.renderer.scrollBarH.inner,o.textInput&&o.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",o),y.addMouseWheelListener(o.container,this.onMouseWheel.bind(this,"mousewheel"),o),r(o.container,o),o.renderer.$gutter);y.addListener(C,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),y.addListener(C,"click",this.onMouseEvent.bind(this,"gutterclick"),o),y.addListener(C,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),y.addListener(C,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),y.addListener(d,"mousedown",i,o),y.addListener(C,"mousedown",i,o),f.isIE&&o.renderer.scrollBarV&&(y.addListener(o.renderer.scrollBarV.element,"mousedown",i,o),y.addListener(o.renderer.scrollBarH.element,"mousedown",i,o)),o.on("mousemove",function(p){var w,x;l.state||l.$dragDelay||!l.$dragEnabled||(p=o.renderer.screenToTextCoordinates(p.x,p.y),w=o.session.selection.getRange(),x=o.renderer,!w.isEmpty()&&w.insideStart(p.row,p.column)?x.setCursorStyle("default"):x.setCursorStyle(""))},o)}n.prototype.releaseMouse=null,e.defineOptions(n.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),m.MouseHandler=n}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(A,m,T){var y=A("../lib/dom");m.FoldHandler=function(f){f.on("click",function(h){var c=h.getDocumentPosition(),a=f.session,c=a.getFoldAt(c.row,c.column,1),c=(c&&(h.getAccelKey()?a.removeFold(c):a.expandFold(c),h.stop()),h.domEvent&&h.domEvent.target);c&&y.hasCssClass(c,"ace_inline_button")&&y.hasCssClass(c,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),f.renderer.scrollCursorIntoView())}),f.on("gutterclick",function(h){var a,c;f.renderer.$gutterLayer.getRegion(h)=="foldWidgets"&&(a=h.getDocumentPosition().row,(c=f.session).foldWidgets&&c.foldWidgets[a]&&f.session.onFoldWidgetClick(a,h),f.isFocused()||f.focus(),h.stop())}),f.on("gutterdblclick",function(h){var a,c,t;f.renderer.$gutterLayer.getRegion(h)=="foldWidgets"&&(t=h.getDocumentPosition().row,(c=(c=(a=f.session).getParentFoldRangeData(t,!0)).range||c.firstRange)&&(t=c.start.row,(t=a.getFoldAt(t,a.getLine(t).length,1))?a.removeFold(t):(a.addFold("...",c),f.renderer.scrollCursorIntoView({row:c.start.row,column:0}))),h.stop())})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(A,m,T){var y=A("../lib/keys"),f=A("../lib/event");function h(a){this.$editor=a,this.$data={editor:a},this.$handlers=[],this.setDefaultHandler(a.commands)}h.prototype.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0)},h.prototype.setKeyboardHandler=function(a){var c=this.$handlers;if(c[c.length-1]!=a){for(;c[c.length-1]&&c[c.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(c[c.length-1]);this.addKeyboardHandler(a,1)}},h.prototype.addKeyboardHandler=function(a,c){var t;a&&(typeof a!="function"||a.handleKeyboard||(a.handleKeyboard=a),(t=this.$handlers.indexOf(a))!=-1&&this.$handlers.splice(t,1),c==null?this.$handlers.push(a):this.$handlers.splice(c,0,a),t==-1)&&a.attach&&a.attach(this.$editor)},h.prototype.removeKeyboardHandler=function(a){var c=this.$handlers.indexOf(a);return c!=-1&&(this.$handlers.splice(c,1),a.detach&&a.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var a=this.$data,c=a.editor;return this.$handlers.map(function(t){return t.getStatusText&&t.getStatusText(c,a)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(a,c,t,r){for(var e,n=!1,s=this.$editor.commands,o=this.$handlers.length;o--&&!((e=this.$handlers[o].handleKeyboard(this.$data,a,c,t,r))&&e.command&&((n=e.command=="null"||s.exec(e.command,this.$editor,e.args,r))&&r&&a!=-1&&e.passEvent!=1&&e.command.passEvent!=1&&f.stopEvent(r),n)););return n||a!=-1||(e={command:"insertstring"},n=s.exec("insertstring",this.$editor,c)),n&&this.$editor._signal&&this.$editor._signal("keyboardActivity",e),n},h.prototype.onCommandKey=function(a,c,t){var r=y.keyCodeToString(t);return this.$callKeyboardHandlers(c,r,t,a)},h.prototype.onTextInput=function(a){return this.$callKeyboardHandlers(-1,a)},m.KeyBinding=h}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(A,m,T){var y=0,f=0,h=!1,a=!1,c=!1,t=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],r=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],e=0,n=1,s=2,o=3,i=4,l=5,d=6,C=7,p=8,w=9,x=10,$=11,H=12,B=13,O=14,u=15,I=16,L=17,v=18,_=[v,v,v,v,v,v,v,v,v,d,l,d,p,l,v,v,v,v,v,v,v,v,v,v,v,v,v,v,l,l,l,d,p,i,i,$,$,$,i,i,i,i,i,x,w,x,w,w,s,s,s,s,s,s,s,s,s,s,w,i,i,i,i,i,i,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,i,i,i,i,i,i,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,i,i,i,i,v,v,v,v,v,v,l,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,w,i,$,$,$,$,i,i,i,i,e,i,i,v,i,i,$,$,s,s,i,e,i,i,i,s,e,i,i,i,i,i],W=[p,p,p,p,p,p,p,p,p,p,p,v,v,v,e,n,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,p,l,B,O,u,I,L,w,$,$,$,$,$,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,w,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,p];function F(X,te,E,G){var V,b,k,R=y?r:t,D=0,Y=-1,re=null,pe=null,me=[];if(!G)for(re=0,G=[];re<E;re++)G[re]=Q(X[re]);for(f=y,c=a=h=!1,pe=0;pe<E;pe++){if(k=D,me[pe]=V=function(Ee,be,Se,we){var Ne,Pe,Te,ce=be[we];switch(ce){case e:case n:h=!1;case i:case o:return ce;case s:return h?o:s;case C:return h=!0,n;case p:return i;case w:return we<1||we+1>=be.length||(Ne=Se[we-1])!=s&&Ne!=o||(fe=be[we+1])!=s&&fe!=o?i:(fe=h?o:fe)==Ne?fe:i;case x:return(Ne=0<we?Se[we-1]:l)==s&&we+1<be.length&&be[we+1]==s?s:i;case $:if(0<we&&Se[we-1]==s)return s;if(h)return i;for(Te=we+1,Pe=be.length;Te<Pe&&be[Te]==$;)Te++;return Te<Pe&&be[Te]==s?s:i;case H:for(Pe=be.length,Te=we+1;Te<Pe&&be[Te]==H;)Te++;if(Te<Pe){var fe=Ee[we],fe=1425<=fe&&fe<=2303||fe==64286;if(Ne=be[Te],fe&&(Ne==n||Ne==C))return n}return we<1||(Ne=be[we-1])==l?i:Se[we-1];case l:return a=!(h=!1),y;case d:return c=!0,i;case B:case O:case I:case L:case u:h=!1;case v:return i}}(X,G,me,pe),k=240&(D=R[k][V]),D&=15,te[pe]=b=R[D][5],0<k){if(k==16)for(re=Y;re<pe;re++)te[re]=1;Y=-1}if(R[D][6])Y==-1&&(Y=pe);else if(-1<Y){for(re=Y;re<pe;re++)te[re]=b;Y=-1}G[pe]==l&&(te[pe]=0),f|=b}if(c){for(re=0;re<E;re++)if(G[re]==d){te[re]=y;for(var ye=re-1;0<=ye&&G[ye]==p;ye--)te[ye]=y}}}function J(X,te,E){if(!(f<X))if(X!=1||y!=1||a)for(var G,V,b,k,R=E.length,D=0;D<R;){if(te[D]>=X){for(G=D+1;G<R&&te[G]>=X;)G++;for(V=D,b=G-1;V<b;V++,b--)k=E[V],E[V]=E[b],E[b]=k;D=G}D++}else E.reverse()}function Q(X){var te=X.charCodeAt(0),E=te>>8;return E==0?191<te?e:_[te]:E==5?/[\u0591-\u05f4]/.test(X)?n:e:E==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(X)?H:/[\u0660-\u0669\u066b-\u066c]/.test(X)?o:te==1642?$:/[\u06f0-\u06f9]/.test(X)?s:C:E==32&&te<=8287?W[255&te]:E==254&&65136<=te?C:i}m.L=e,m.R=n,m.EN=s,m.ON_R=3,m.AN=4,m.R_H=5,m.B=6,m.RLE=7,m.DOT="\xB7",m.doBidiReorder=function(X,te,E){if(X.length<2)return{};var G=X.split(""),V=new Array(G.length),b=new Array(G.length),k=[];y=E?1:0,F(G,k,G.length,te);for(var R=0;R<V.length;V[R]=R,R++);for(J(2,k,V),J(1,k,V),R=0;R<V.length-1;R++)te[R]===o?k[R]=m.AN:k[R]===n&&(te[R]>C&&te[R]<B||te[R]===i||te[R]===v)?k[R]=m.ON_R:0<R&&G[R-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(G[R])&&(k[R-1]=k[R]=m.R_H,R++);for(G[G.length-1]===m.DOT&&(k[G.length-1]=m.B),G[0]==="\u202B"&&(k[0]=m.RLE),R=0;R<V.length;R++)b[R]=k[V[R]];return{logicalFromVisual:V,bidiLevels:b}},m.hasBidiCharacters=function(X,te){for(var E=!1,G=0;G<X.length;G++)te[G]=Q(X.charAt(G)),E||te[G]!=n&&te[G]!=C&&te[G]!=o||(E=!0);return E},m.getVisualFromLogicalIdx=function(X,te){for(var E=0;E<te.logicalFromVisual.length;E++)if(te.logicalFromVisual[E]==X)return E;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(A,m,T){var y=A("./lib/bidiutil"),f=A("./lib/lang"),h=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;function a(c){this.session=c,this.bidiMap={},this.currentRow=null,this.bidiUtil=y,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=h.test(c.getValue())}a.prototype.isBidiRow=function(c,t,r){return!!this.seenBidi&&(c!==this.currentRow&&(this.currentRow=c,this.updateRowLine(t,r),this.updateBidiMap()),this.bidiMap.bidiLevels)},a.prototype.onChange=function(c){this.seenBidi?this.currentRow=null:c.action=="insert"&&h.test(c.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},a.prototype.getDocumentRow=function(){var c=0,t=this.session.$screenRowCache;return c=t.length&&0<=(t=this.session.$getRowCacheIndex(t,this.currentRow))?this.session.$docRowCache[t]:c},a.prototype.getSplitIndex=function(){var c=0,t=this.session.$screenRowCache;if(t.length)for(var r,e=this.session.$getRowCacheIndex(t,this.currentRow);0<this.currentRow-c&&(r=this.session.$getRowCacheIndex(t,this.currentRow-c-1))===e;)e=r,c++;else c=this.currentRow;return c},a.prototype.updateRowLine=function(c,t){var r,e=(c=c===void 0?this.getDocumentRow():c)===this.session.getLength()-1?this.EOF:this.EOL,n=(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,(!this.session.$useWrapMode||(c=this.session.$wrapData[c])&&(0<(t=t===void 0?this.getSplitIndex():t)&&c.length?(this.wrapIndent=c.indent,this.wrapOffset=this.wrapIndent*this.charWidths[y.L],this.line=t<c.length?this.line.substring(c[t-1],c[t]):this.line.substring(c[c.length-1])):this.line=this.line.substring(0,c[t]),t==c.length))&&(this.line+=this.showInvisibles?e:y.DOT),this.session),s=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(o,i){return o===" "||n.isFullWidth(o.charCodeAt(0))?(r=o===" "?n.getScreenTabSize(i+s):2,s+=r-1,f.stringRepeat(y.DOT,r)):o}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==y.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},a.prototype.updateBidiMap=function(){var c=[];y.hasBidiCharacters(this.line,c)||this.isRtlDir?this.bidiMap=y.doBidiReorder(this.line,c,this.isRtlDir):this.bidiMap={}},a.prototype.markAsDirty=function(){this.currentRow=null},a.prototype.updateCharacterWidths=function(c){var t;this.characterWidth!==c.$characterSize.width&&(this.fontMetrics=c,t=this.characterWidth=c.$characterSize.width,c=c.$measureCharWidth("\u05D4"),this.charWidths[y.L]=this.charWidths[y.EN]=this.charWidths[y.ON_R]=t,this.charWidths[y.R]=this.charWidths[y.AN]=c,this.charWidths[y.R_H]=.45*c,this.charWidths[y.B]=this.charWidths[y.RLE]=0,this.currentRow=null)},a.prototype.setShowInvisibles=function(c){this.showInvisibles=c,this.currentRow=null},a.prototype.setEolChar=function(c){this.EOL=c},a.prototype.setContentWidth=function(c){this.contentWidth=c},a.prototype.isRtlLine=function(c){return!!this.$isRtl||(c!=null?this.session.getLine(c).charAt(0)==this.RLE:this.isRtlDir)},a.prototype.setRtlDirection=function(c,t){for(var r=c.getCursorPosition(),e=c.selection.getSelectionAnchor().row;e<=r.row;e++)t||c.session.getLine(e).charAt(0)!==c.session.$bidiHandler.RLE?t&&c.session.getLine(e).charAt(0)!==c.session.$bidiHandler.RLE&&c.session.doc.insert({column:0,row:e},c.session.$bidiHandler.RLE):c.session.doc.removeInLine(e,0,1)},a.prototype.getPosLeft=function(c){c-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,r=t<c?this.session.getOverwrite()?c:c-1:t,e=y.getVisualFromLogicalIdx(r,this.bidiMap),n=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&c<=t&&n[e]%2!=0&&e++;for(var o=0;o<e;o++)s+=this.charWidths[n[o]];return!this.session.getOverwrite()&&t<c&&n[e]%2==0&&(s+=this.charWidths[n[e]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},a.prototype.getSelections=function(c,t){var r,e=this.bidiMap,n=e.bidiLevels,s=[],o=0,i=Math.min(c,t)-this.wrapIndent,l=Math.max(c,t)-this.wrapIndent,d=!1,C=!1,p=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,x=0;x<n.length;x++)w=e.logicalFromVisual[x],r=n[x],(d=i<=w&&w<l)&&!C?p=o:!d&&C&&s.push({left:p,width:o-p}),o+=this.charWidths[r],C=d;if(d&&x===n.length&&s.push({left:p,width:o-p}),this.isRtlDir)for(var $=0;$<s.length;$++)s[$].left+=this.rtlLineOffset;return s},a.prototype.offsetToCol=function(r){this.isRtlDir&&(r-=this.rtlLineOffset);var t=0,r=Math.max(r,0),e=0,n=0,s=this.bidiMap.bidiLevels,o=this.charWidths[s[n]];for(this.wrapIndent&&(r-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e+o/2<r;){if(e+=o,n===s.length-1){o=0;break}o=this.charWidths[s[++n]]}return(t=0<n&&s[n-1]%2!=0&&s[n]%2==0?(r<e&&n--,this.bidiMap.logicalFromVisual[n]):0<n&&s[n-1]%2==0&&s[n]%2!=0?1+(e<r?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===s.length-1&&o===0&&s[n-1]%2==0||!this.isRtlDir&&n===0&&s[n]%2!=0?1+this.bidiMap.logicalFromVisual[n]:(0<n&&s[n-1]%2!=0&&o!==0&&n--,this.bidiMap.logicalFromVisual[n]))===0&&this.isRtlDir&&t++,t+this.wrapIndent},m.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(A,m,T){function y(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var r=this;this.cursor.on("change",function(e){r.$cursorChanged=!0,r.$silent||r._emit("changeCursor"),r.$isEmpty||r.$silent||r._emit("changeSelection"),r.$keepDesiredColumnOnChange||e.old.column==e.value.column||(r.$desiredColumn=null)}),this.anchor.on("change",function(){r.$anchorChanged=!0,r.$isEmpty||r.$silent||r._emit("changeSelection")})}var f=A("./lib/oop"),h=A("./lib/lang"),a=A("./lib/event_emitter").EventEmitter,c=A("./range").Range;(function(){f.implement(this,a),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(t,r){this.$isEmpty=!1,this.anchor.setPosition(t,r)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,r=this.lead;return t.row>r.row||t.row==r.row&&t.column>r.column},this.getRange=function(){var t=this.anchor,r=this.lead;return this.$isEmpty?c.fromPoints(r,r):this.isBackwards()?c.fromPoints(r,t):c.fromPoints(t,r)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,n){var e=n?t.end:t.start,n=n?t.start:t.end;this.$setSelection(e.row,e.column,n.row,n.column)},this.$setSelection=function(t,r,e,n){var s,o;!this.$silent&&(s=this.$isEmpty,o=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,r),this.cursor.setPosition(e,n),this.$isEmpty=!c.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||o)&&this._emit("changeSelection")},this.$moveSelection=function(t){var r=this.lead;this.$isEmpty&&this.setSelectionAnchor(r.row,r.column),t.call(this)},this.selectTo=function(t,r){this.$moveSelection(function(){this.moveCursorTo(t,r)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.moveTo=function(t,r){this.clearSelection(),this.moveCursorTo(t,r)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,r){var e;return r===void 0&&(t=(e=t||this.lead).row,r=e.column),this.session.getWordRange(t,r)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),t=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(t)},this.getLineRange=function(e,r){var e=typeof e=="number"?e:this.lead.row,n=this.session.getFoldLine(e),n=n?(e=n.start.row,n.end.row):e;return r===!0?new c(e,0,n,this.session.getLine(n).length):new c(e,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,r,e){var n=t.column,s=t.column+r;return e<0&&(n=t.column-r,s=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(n,s).split(" ").length-1==r},this.moveCursorLeft=function(){var t,r=this.lead.getPosition();(t=this.session.getFoldAt(r.row,r.column,-1))?this.moveCursorTo(t.start.row,t.start.column):r.column===0?0<r.row&&this.moveCursorTo(r.row-1,this.doc.getLine(r.row-1).length):(t=this.session.getTabSize(),this.wouldMoveIntoSoftTab(r,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1))},this.moveCursorRight=function(){var t,r=this.lead.getPosition();(t=this.session.getFoldAt(r.row,r.column,1))?this.moveCursorTo(t.end.row,t.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(t=this.session.getTabSize(),r=this.lead,this.wouldMoveIntoSoftTab(r,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1))},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,r=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(r,0),e=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);e[0].length==t||this.session.$useEmacsStyleLineStart||(r.column+=e[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var t,r=this.lead,r=this.session.getDocumentLastRowColumnPosition(r.row,r.column);this.lead.column==r.column&&(t=this.session.getLine(r.row),r.column==t.length)&&0<(t=t.search(/\s+$/))&&(r.column=t),this.moveCursorTo(r.row,r.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,r=this.doc.getLine(t).length;this.moveCursorTo(t,r)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,r=this.lead.column,e=this.doc.getLine(t),n=e.substring(r),s=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.getFoldAt(t,r,1));s?this.moveCursorTo(s.end.row,s.end.column):(this.session.nonTokenRe.exec(n)&&(r+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=e.substring(r)),r>=e.length?(this.moveCursorTo(t,e.length),this.moveCursorRight(),t<this.doc.getLength()-1&&this.moveCursorWordRight()):(this.session.tokenRe.exec(n)&&(r+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,r)))},this.moveCursorLongWordLeft=function(){var t,r=this.lead.row,e=this.lead.column;(t=this.session.getFoldAt(r,e,-1))?this.moveCursorTo(t.start.row,t.start.column):((t=this.session.getFoldStringAt(r,e,-1))==null&&(t=this.doc.getLine(r).substring(0,e)),t=h.stringReverse(t),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(t)&&(e-=this.session.nonTokenRe.lastIndex,t=t.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),e<=0?(this.moveCursorTo(r,0),this.moveCursorLeft(),0<r&&this.moveCursorWordLeft()):(this.session.tokenRe.exec(t)&&(e-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,e)))},this.$shortWordEndIndex=function(t){var r,e=0,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(t))e=this.session.tokenRe.lastIndex;else{for(;(r=t[e])&&n.test(r);)e++;if(e<1){for(s.lastIndex=0;(r=t[e])&&!s.test(r);)if(s.lastIndex=0,e++,n.test(r)){if(2<e){e--;break}for(;(r=t[e])&&n.test(r);)e++;if(2<e)break}}}return s.lastIndex=0,e},this.moveCursorShortWordRight=function(){var t=this.lead.row,r=this.lead.column,e=this.doc.getLine(t),n=e.substring(r),s=this.session.getFoldAt(t,r,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(r==e.length){for(var o=this.doc.getLength();n=this.doc.getLine(++t),t<o&&/^\s*$/.test(n););/^\s+/.test(n)||(n=""),r=0}s=this.$shortWordEndIndex(n),this.moveCursorTo(t,r+s)},this.moveCursorShortWordLeft=function(){var t=this.lead.row,r=this.lead.column;if(n=this.session.getFoldAt(t,r,-1))return this.moveCursorTo(n.start.row,n.start.column);var e=this.session.getLine(t).substring(0,r);if(r===0){for(;e=this.doc.getLine(--t),0<t&&/^\s*$/.test(e););r=e.length,/\s+$/.test(e)||(e="")}var n=h.stringReverse(e),n=this.$shortWordEndIndex(n);return this.moveCursorTo(t,r-n)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,r){var e,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s=(r===0&&(t!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),t!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(s=this.session.lineWidgets[this.lead.row],t<0?t-=s.rowsAbove||0:0<t&&(t+=s.rowCount-(s.rowsAbove||0))),this.session.screenToDocumentPosition(n.row+t,n.column,e));t!==0&&r===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+r,r===0)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,r,e){var n=this.session.getFoldAt(t,r,1),n=(n&&(t=n.start.row,r=n.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(t));/[\uDC00-\uDFFF]/.test(n.charAt(r))&&n.charAt(r-1)&&(this.lead.row==t&&this.lead.column==r+1?r-=1:r+=1),this.lead.setPosition(t,r),this.$keepDesiredColumnOnChange=!1,e||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,r,e){t=this.session.screenToDocumentPosition(t,r),this.moveCursorTo(t.row,t.column,e)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var r=this.getRange();return t?(t.start.column=r.start.column,t.start.row=r.start.row,t.end.column=r.end.column,t.end.row=r.end.row):t=r,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var r=this.getCursor();try{t(this);var e=this.getCursor();return c.fromPoints(r,e)}catch{return c.fromPoints(r,r)}finally{this.moveCursorToPosition(r)}},this.toJSON=function(){var t;return this.rangeCount?t=this.ranges.map(function(r){var e=r.clone();return e.isBackwards=r.cursor==r.start,e}):(t=this.getRange()).isBackwards=this.isBackwards(),t},this.fromJSON=function(t){if(t.start==null){if(this.rangeList&&1<t.length){this.toSingleRange(t[0]);for(var r=t.length;r--;){var e=c.fromPoints(t[r].start,t[r].end);t[r].isBackwards&&(e.cursor=e.start),this.addRange(e,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var r=this.ranges.length;r--;)if(!this.ranges[r].isEqual(t[r]))return!1;return!0}}).call(y.prototype),m.Selection=y}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(y,m,T){var y=y("./config"),f=2e3,h=(a.prototype.$setMaxTokenCount=function(c){f=0|c},a.prototype.$applyToken=function(c){var t=this.splitRegex.exec(c).slice(1),r=this.token.apply(this,t);if(typeof r=="string")return[{type:r,value:c}];for(var e=[],n=0,s=r.length;n<s;n++)t[n]&&(e[e.length]={type:r[n],value:t[n]});return e},a.prototype.$arrayTokens=function(c){if(!c)return[];var t=this.splitRegex.exec(c);if(!t)return"text";for(var r=[],e=this.tokenArray,n=0,s=e.length;n<s;n++)t[n+1]&&(r[r.length]={type:e[n],value:t[n+1]});return r},a.prototype.removeCapturingGroups=function(c){return c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(t,r){return r?"(?:":t})},a.prototype.createSplitterRegexp=function(c,t){var r,e,n;return(c=(c=c.indexOf("(?=")!=-1&&(r=0,e=!1,n={},c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(s,o,i,l,d,C){return e?e=d!="]":d?e=!0:l?(r==n.stack&&(n.end=C+1,n.stack=-1),r--):i&&(r++,i.length!=1)&&(n.stack=r,n.start=C),s}),n.end!=null)&&/^\)*$/.test(c.substr(n.end))?c.substring(0,n.start)+c.substr(n.end):c).charAt(0)!="^"?"^"+c:c).charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(t||"").replace("g",""))},a.prototype.getLineTokens=function(c,t){t&&typeof t!="string"?(t=(r=t.slice(0))[0])==="#tmp"&&(r.shift(),t=r.shift()):r=[];for(var r,e,n=t||"start",s=(s=this.states[n])||this.states[n="start"],o=this.matchMappings[n],i=this.regExps[n],l=[],d=i.lastIndex=0,C=0,p={type:null,value:""};e=i.exec(c);){var w,x=o.defaultToken,$=null,H=e[0],B=i.lastIndex;B-H.length>d&&(w=c.substring(d,B-H.length),p.type==x?p.value+=w:(p.type&&l.push(p),p={type:x,value:w}));for(var O=0;O<e.length-2;O++)if(e[O+1]!==void 0){x=($=s[o[O]]).onMatch?$.onMatch(H,n,r,c):$.token,$.next&&(n=typeof $.next=="string"?$.next:$.next(n,r),(s=this.states[n])||(this.reportError("state doesn't exist",n),s=this.states[n="start"]),o=this.matchMappings[n],(i=this.regExps[n]).lastIndex=d=B),$.consumeLineEnd&&(d=B);break}if(H){if(typeof x=="string")$&&$.merge===!1||p.type!==x?(p.type&&l.push(p),p={type:x,value:H}):p.value+=H;else if(x)for(p.type&&l.push(p),p={type:null,value:""},O=0;O<x.length;O++)l.push(x[O])}if(d==c.length)break;if(d=B,C++>f){for(C>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:c});d<c.length;)p.type&&l.push(p),p={value:c.substring(d,d+=500),type:"overflow"};n="start",r=[];break}}return p.type&&l.push(p),1<r.length&&r[0]!==n&&r.unshift("#tmp",n),{tokens:l,state:r.length?r:n}},a);function a(c){for(var t in this.states=c,this.regExps={},this.matchMappings={},this.states){for(var r=this.states[t],e=[],n=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",i=[],l=0;l<r.length;l++){var d,C,p=r[l];p.defaultToken&&(s.defaultToken=p.defaultToken),p.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),p.unicode&&o.indexOf("u")===-1&&(o+="u"),p.regex==null||(p.regex instanceof RegExp&&(p.regex=p.regex.toString().slice(1,-1)),d=p.regex,C=new RegExp("(?:("+d+")|(.))").exec("a").length-2,Array.isArray(p.token)?p.token.length==1||C==1?p.token=p.token[0]:C-1!=p.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:p,groupCount:C-1}),p.token=p.token[0]):(p.tokenArray=p.token,p.token=null,p.onMatch=this.$arrayTokens):typeof p.token!="function"||p.onMatch||(p.onMatch=1<C?this.$applyToken:p.token),1<C&&(d=/\\\d/.test(p.regex)?p.regex.replace(/\\([0-9]+)/g,function(w,x){return"\\"+(parseInt(x,10)+n+1)}):(C=1,this.removeCapturingGroups(p.regex)),p.splitRegex||typeof p.token=="string"||i.push(p)),s[n]=l,n+=C,e.push(d),p.onMatch)||(p.onMatch=null)}e.length||(s[0]=0,e.push("$")),i.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,o)},this),this.regExps[t]=new RegExp("("+e.join(")|(")+")|($)",o)}}h.prototype.reportError=y.reportError,m.Tokenizer=h}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(A,m,T){function y(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}var f=A("../lib/lang");(function(){this.addRules=function(c,t){if(t)for(var r in c){for(var e=c[r],n=0;n<e.length;n++){var s=e[n];(s.next||s.onMatch)&&(typeof s.next=="string"&&s.next.indexOf(t)!==0&&(s.next=t+s.next),s.nextState)&&s.nextState.indexOf(t)!==0&&(s.nextState=t+s.nextState)}this.$rules[t+r]=e}else for(var r in c)this.$rules[r]=c[r]},this.getRules=function(){return this.$rules},this.embedRules=function(c,t,r,e,n){if(c=typeof c=="function"?new c().getRules():c,e)for(var s=0;s<e.length;s++)e[s]=t+e[s];else for(var o in e=[],c)e.push(t+o);if(this.addRules(c,t),r)for(var i=Array.prototype[n?"push":"unshift"],s=0;s<e.length;s++)i.apply(this.$rules[e[s]],f.deepCopy(r));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};function h(c,t){return c=="start"&&!t.length||t.unshift(this.nextState,c),this.nextState}function a(c,t){return t.shift(),t.shift()||"start"}this.normalizeRules=function(){var c=0,t=this.$rules;Object.keys(t).forEach(function r(e){var n=t[e];n.processed=!0;for(var s=0;s<n.length;s++){var o=n[s],i=null,l=(Array.isArray(o)&&(i=o,o={}),!o.regex&&o.start&&(o.regex=o.start,o.next||(o.next=[]),o.next.push({defaultToken:o.token},{token:o.token+".end",regex:o.end||o.start,next:"pop"}),o.token=o.token+".start",o.push=!0),o.next||o.push);if(l&&Array.isArray(l)?((C=o.stateName)||(typeof(C=o.token)!="string"&&(C=C[0]||""),t[C]&&(C+=c++)),t[C]=l,r(o.next=C)):l=="pop"&&(o.next=a),o.push&&(o.nextState=o.next||o.push,o.next=h,delete o.push),o.rules)for(var d in o.rules)t[d]?t[d].push&&t[d].push.apply(t[d],o.rules[d]):t[d]=o.rules[d];var C=typeof o=="string"?o:o.include;C&&(C==="$self"&&(C="start"),i=Array.isArray(C)?C.map(function(p){return t[p]}):t[C]),i&&(l=[s,1].concat(i),o.noEscape&&(l=l.filter(function(p){return!p.next})),n.splice.apply(n,l),s--),o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}},this)},this.createKeywordMapper=function(c,t,r,e){var n=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(s){for(var o=c[s].split(e||"|"),i=o.length;i--;){var l=o[i];this.$keywordList.push(l),r&&(l=l.toLowerCase()),n[l]=s}},this),c=null,r?function(s){return n[s.toLowerCase()]||t}:function(s){return n[s]||t}},this.getKeywords=function(){return this.$keywords}}).call(y.prototype),m.TextHighlightRules=y}),ace.define("ace/mode/behaviour",["require","exports","module"],function(A,m,T){function y(){this.$behaviours={}}(function(){this.add=function(f,h,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][h]=a},this.addBehaviours=function(f){for(var h in f)for(var a in f[h])this.add(h,a,f[h][a])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,h){f=(typeof f=="function"?new f:f).getBehaviours(h),this.addBehaviours(f)},this.getBehaviours=function(f){if(f){for(var h={},a=0;a<f.length;a++)this.$behaviours[f[a]]&&(h[f[a]]=this.$behaviours[f[a]]);return h}return this.$behaviours}}).call(y.prototype),m.Behaviour=y}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(A,m,T){var y=A("./range").Range;function f(h,a,c){this.$session=h,this.$row=a,this.$rowTokens=h.getTokens(a),h=h.getTokenAt(a,c),this.$tokenIndex=h?h.index:-1}f.prototype.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},f.prototype.stepForward=function(){var h;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h=h||this.$session.getLength(),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentTokenRow=function(){return this.$row},f.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,a=this.$tokenIndex,c=h[a].start;if(c===void 0)for(c=0;0<a;)c+=h[--a].value.length;return c},f.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},f.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],a=this.getCurrentTokenColumn();return new y(this.$row,a,this.$row,a+h.value.length)},m.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(A,m,T){function y(l){var d=-1;if((o=l.multiSelect&&(d=l.selection.index,o.rangeCount!=l.multiSelect.rangeCount)?{rangeCount:l.multiSelect.rangeCount}:o)[d])return a=o[d];a=o[d]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function f(l,d,C,p){var w=l.end.row-l.start.row;return{text:C+d+p,selection:[0,l.start.column+1,w,l.end.column+(w?0:1)]}}function h(l){this.add("braces","insertion",function(d,C,p,w,x){var $=p.getCursorPosition(),H=w.doc.getLine($.row);if(x=="{")return y(p),O=p.getSelectionRange(),(u=w.doc.getTextRange(O))!==""&&u!=="{"&&p.getWrapBehavioursEnabled()?f(O,u,"{","}"):h.isSaneInsertion(p,w)?/[\]\}\)]/.test(H[$.column])||p.inMultiSelectMode||l&&l.braces?(h.recordAutoInsert(p,w,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(p,w,"{"),{text:"{",selection:[1,1]}):void 0;if(x=="}"){y(p);var B=H.substring($.column,$.column+1);if(B=="}"&&w.$findOpeningBracket("}",{column:$.column+1,row:$.row})!==null&&h.isAutoInsertedClosing($,H,x))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if(x==`
`||x==`\r
`){y(p);var O="";if(h.isMaybeInsertedClosing($,H)&&(O=e.stringRepeat("}",a.maybeInsertedBrackets),h.clearMaybeInsertedClosing()),(B=H.substring($.column,$.column+1))==="}"){var u=w.findMatchingBracket({row:$.row,column:$.column+1},"}");if(!u)return null;var I=this.$getIndent(w.getLine(u.row))}else{if(!O)return void h.clearMaybeInsertedClosing();I=this.$getIndent(H)}return x=I+w.getTabString(),{text:`
`+x+`
`+I+O,selection:[1,x.length,1,x.length]}}h.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(d,C,p,w,x){var $=w.doc.getTextRange(x);if(!x.isMultiLine()&&$=="{"){if(y(p),w.doc.getLine(x.start.row).substring(x.end.column,x.end.column+1)=="}")return x.end.column++,x;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(d,C,p,w,x){if(x=="(")return y(p),$=p.getSelectionRange(),(H=w.doc.getTextRange($))!==""&&p.getWrapBehavioursEnabled()?f($,H,"(",")"):h.isSaneInsertion(p,w)?(h.recordAutoInsert(p,w,")"),{text:"()",selection:[1,1]}):void 0;if(x==")"){y(p);var $=p.getCursorPosition(),H=w.doc.getLine($.row),p=H.substring($.column,$.column+1);if(p==")"&&w.$findOpeningBracket(")",{column:$.column+1,row:$.row})!==null&&h.isAutoInsertedClosing($,H,x))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(d,C,p,w,x){var $=w.doc.getTextRange(x);if(!x.isMultiLine()&&$=="("&&(y(p),w.doc.getLine(x.start.row).substring(x.start.column+1,x.start.column+2)==")"))return x.end.column++,x}),this.add("brackets","insertion",function(d,C,p,w,x){if(x=="[")return y(p),$=p.getSelectionRange(),(H=w.doc.getTextRange($))!==""&&p.getWrapBehavioursEnabled()?f($,H,"[","]"):h.isSaneInsertion(p,w)?(h.recordAutoInsert(p,w,"]"),{text:"[]",selection:[1,1]}):void 0;if(x=="]"){y(p);var $=p.getCursorPosition(),H=w.doc.getLine($.row),p=H.substring($.column,$.column+1);if(p=="]"&&w.$findOpeningBracket("]",{column:$.column+1,row:$.row})!==null&&h.isAutoInsertedClosing($,H,x))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(d,C,p,w,x){var $=w.doc.getTextRange(x);if(!x.isMultiLine()&&$=="["&&(y(p),w.doc.getLine(x.start.row).substring(x.start.column+1,x.start.column+2)=="]"))return x.end.column++,x}),this.add("string_dquotes","insertion",function(d,C,p,w,x){var $=w.$mode.$quotes||i;if(x.length==1&&$[x]&&(!this.lineCommentStart||this.lineCommentStart.indexOf(x)==-1)){y(p);var H=p.getSelectionRange(),B=w.doc.getTextRange(H);if(!(B===""||B.length==1&&$[B])&&p.getWrapBehavioursEnabled())return f(H,B,x,x);if(!B){var $=p.getCursorPosition(),H=w.doc.getLine($.row),B=H.substring($.column-1,$.column),p=H.substring($.column,$.column+1),I=w.getTokenAt($.row,$.column),O=w.getTokenAt($.row,$.column+1);if(B=="\\"&&I&&/escape/.test(I.type))return null;var u,I=I&&/string|escape/.test(I.type),L=!O||/string|escape/.test(O.type);if(p==x)(u=I!==L)&&/string\.end/.test(O.type)&&(u=!1);else{if(I&&!L||I&&L||(O=w.$mode.tokenRe,I=(O.lastIndex=0,O.test(B)),L=(O.lastIndex=0,O.test(p)),w=w.$mode.$pairQuotesAfter,!(w&&w[x]&&w[x].test(B))&&I||L)||p&&!/[\s;,.})\]\\]/.test(p)||(w=H[$.column-2],B==x&&(w==x||O.test(w))))return null;u=!0}return{text:u?x+x:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(d,C,p,w,x){var $=w.$mode.$quotes||i,H=w.doc.getTextRange(x);if(!x.isMultiLine()&&$.hasOwnProperty(H)&&(y(p),w.doc.getLine(x.start.row).substring(x.start.column+1,x.start.column+2)==H))return x.end.column++,x})}var a,c=A("../../lib/oop"),t=A("../behaviour").Behaviour,r=A("../../token_iterator").TokenIterator,e=A("../../lib/lang"),n=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o={},i={'"':'"',"'":"'"};h.isSaneInsertion=function(l,d){var C=l.getCursorPosition(),p=new r(d,C.row,C.column);if(!this.$matchTokenType(p.getCurrentToken()||"text",n)){if(/[)}\]]/.test(l.session.getLine(C.row)[C.column]))return!0;if(l=new r(d,C.row,C.column+1),!this.$matchTokenType(l.getCurrentToken()||"text",n))return!1}return p.stepForward(),p.getCurrentTokenRow()!==C.row||this.$matchTokenType(p.getCurrentToken()||"text",s)},h.$matchTokenType=function(l,d){return-1<d.indexOf(l.type||l)},h.recordAutoInsert=function(l,d,C){l=l.getCursorPosition(),d=d.doc.getLine(l.row),this.isAutoInsertedClosing(l,d,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=l.row,a.autoInsertedLineEnd=C+d.substr(l.column),a.autoInsertedBrackets++},h.recordMaybeInsert=function(l,d,C){l=l.getCursorPosition(),d=d.doc.getLine(l.row),this.isMaybeInsertedClosing(l,d)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=l.row,a.maybeInsertedLineStart=d.substr(0,l.column)+C,a.maybeInsertedLineEnd=d.substr(l.column),a.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(l,d,C){return 0<a.autoInsertedBrackets&&l.row===a.autoInsertedRow&&C===a.autoInsertedLineEnd[0]&&d.substr(l.column)===a.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(l,d){return 0<a.maybeInsertedBrackets&&l.row===a.maybeInsertedRow&&d.substr(l.column)===a.maybeInsertedLineEnd&&d.substr(0,l.column)==a.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},c.inherits(h,t),m.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(A,m,T){for(var y=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],f=0,h=[],a=0;a<y.length;a+=2)h.push(f+=y[a]),y[a+1]&&h.push(45,f+=y[a+1]);m.wordChars=String.fromCharCode.apply(null,h)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(A,m,T){function y(){this.HighlightRules=a}var f=A("../config"),h=A("../tokenizer").Tokenizer,a=A("./text_highlight_rules").TextHighlightRules,c=A("./behaviour/cstyle").CstyleBehaviour,t=A("../unicode"),r=A("../lib/lang"),e=A("../token_iterator").TokenIterator,n=A("../range").Range;(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+t.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+t.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new h(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(s,o,i,l){var d=o.doc,C=!0,p=!0,w=1/0,x=o.getTabSize(),$=!1;if(this.lineCommentStart){L=Array.isArray(this.lineCommentStart)?(_=this.lineCommentStart.map(r.escapeRegExp).join("|"),this.lineCommentStart[0]):(_=r.escapeRegExp(this.lineCommentStart),this.lineCommentStart),_=new RegExp("^(\\s*)(?:"+_+") ?"),$=o.getUseSoftTabs();var H=function(Q,X){var te,E,G=Q.match(_);G&&(te=G[1].length,E=G[0].length,I(Q,te,E)||G[0][E-1]!=" "||E--,d.removeInLine(X,te,E))},B=L+" ",O=function(Q,X){C&&!/\S/.test(Q)||(I(Q,w,w)?d.insertInLine({row:X,column:w},B):d.insertInLine({row:X,column:w},L))},u=function(Q,X){return _.test(Q)},I=function(Q,X,te){for(var E=0;X--&&Q.charAt(X)==" ";)E++;if(E%x!=0)return!1;for(E=0;Q.charAt(te++)==" ";)E++;return 2<x?E%x!=x-1:E%x==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,v=this.blockComment.end,_=new RegExp("^(\\s*)(?:"+r.escapeRegExp(L)+")"),W=new RegExp("(?:"+r.escapeRegExp(v)+")\\s*$"),O=function(E,G){u(E,G)||C&&!/\S/.test(E)||(d.insertInLine({row:G,column:E.length},v),d.insertInLine({row:G,column:w},L))},H=function(E,G){var V;(V=E.match(W))&&d.removeInLine(G,E.length-V[0].length,E.length),(V=E.match(_))&&d.removeInLine(G,V[1].length,V[0].length)},u=function(E,G){if(_.test(E))return!0;for(var V=o.getTokens(G),b=0;b<V.length;b++)if(V[b].type==="comment")return!0}}function F(Q){for(var X=i;X<=l;X++)Q(d.getLine(X),X)}var J=1/0;F(function(Q,X){var te=Q.search(/\S/);te!==-1?(te<w&&(w=te),p&&!u(Q,X)&&(p=!1)):J>Q.length&&(J=Q.length)}),w==1/0&&(w=J,p=C=!1),$&&w%x!=0&&(w=Math.floor(w/x)*x),F(p?H:O)},this.toggleBlockComment=function(s,o,i,l){var d=this.blockComment;if(d){!d.start&&d[0]&&(d=d[0]);var C,p,w=(O=new e(o,l.row,l.column)).getCurrentToken(),x=(o.selection,o.selection.toOrientedRange());if(w&&/comment/.test(w.type)){for(;w&&/comment/.test(w.type);){if((u=w.value.indexOf(d.start))!=-1){var $=O.getCurrentTokenRow(),H=O.getCurrentTokenColumn()+u,B=new n($,H,$,H+d.start.length);break}w=O.stepBackward()}for(var O,u,w=(O=new e(o,l.row,l.column)).getCurrentToken();w&&/comment/.test(w.type);){if((u=w.value.indexOf(d.end))!=-1){var $=O.getCurrentTokenRow(),H=O.getCurrentTokenColumn()+u,I=new n($,H,$,H+d.end.length);break}w=O.stepForward()}I&&o.remove(I),B&&(o.remove(B),C=B.start.row,p=-d.start.length)}else p=d.start.length,C=i.start.row,o.insert(i.end,d.end),o.insert(i.start,d.start);x.start.row==C&&(x.start.column+=p),x.end.row==C&&(x.end.column+=p),o.selection.fromOrientedRange(x)}},this.getNextLineIndent=function(s,o,i){return this.$getIndent(o)},this.checkOutdent=function(s,o,i){return!1},this.autoOutdent=function(s,o,i){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){for(var o in this.$embeds=[],this.$modes={},s){var i,l,d;s[o]&&(l=(i=s[o]).prototype.$id,(d=f.$modes[l])||(f.$modes[l]=d=new i),f.$modes[o]||(f.$modes[o]=d),this.$embeds.push(o),this.$modes[o]=d)}for(var C=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],o=0;o<C.length;o++)(function(w){var x=C[o],$=w[x];w[C[o]]=function(){return this.$delegator(x,arguments,$)}})(this)},this.$delegator=function(s,o,i){var l=o[0]||"start";if(typeof l!="string"){if(Array.isArray(l[2])){var d=l[2][l[2].length-1];if(p=this.$modes[d])return p[s].apply(p,[l[1]].concat([].slice.call(o,1)))}l=l[0]||"start"}for(var C=0;C<this.$embeds.length;C++)if(this.$modes[this.$embeds[C]]){var p,w=l.split(this.$embeds[C]);if(!w[0]&&w[1])return o[0]=w[1],(p=this.$modes[this.$embeds[C]])[s].apply(p,o)}return d=i.apply(this,o),i?d:void 0},this.transformAction=function(s,o,i,l,d){if(this.$behaviour){var C,p=this.$behaviour.getBehaviours();for(C in p)if(p[C][o]){var w=p[C][o].apply(this,arguments);if(w)return w}}},this.getKeywords=function(s){if(!this.completionKeywords){var o=this.$tokenizer.rules,i=[];for(p in o)for(var l=o[p],d=0,C=l.length;d<C;d++)if(typeof l[d].token=="string")/keyword|support|storage/.test(l[d].token)&&i.push(l[d].regex);else if(typeof l[d].token=="object")for(var p,w=0,x=l[d].token.length;w<x;w++)/keyword|support|storage/.test(l[d].token[w])&&(p=l[d].regex.match(/\(.+?\)/g)[w],i.push(p.substr(1,p.length-2)));this.completionKeywords=i}return s?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(s,o,i,l){return(this.$keywordList||this.$createKeywordList()).map(function(d){return{name:d,value:d,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(y.prototype),m.Mode=y}),ace.define("ace/apply_delta",["require","exports","module"],function(A,m,T){m.applyDelta=function(y,f,h){var a=f.start.row,c=f.start.column,t=y[a]||"";switch(f.action){case"insert":f.lines.length===1?y[a]=t.substring(0,c)+f.lines[0]+t.substring(c):(r=[a,1].concat(f.lines),y.splice.apply(y,r),y[a]=t.substring(0,c)+y[a],y[a+f.lines.length-1]+=t.substring(c));break;case"remove":var r=f.end.column,e=f.end.row;a===e?y[a]=t.substring(0,c)+t.substring(r):y.splice(a,e-a+1,t.substring(0,c)+y[e].substring(r))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,m,T){var y=f("./lib/oop"),f=f("./lib/event_emitter").EventEmitter,h=(a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(t){t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row||(t=function(r,e,n){var l=r.action=="insert",s=(l?1:-1)*(r.end.row-r.start.row),o=(l?1:-1)*(r.end.column-r.start.column),i=r.start,l=l?i:r.end;return c(e,i,n)?{row:e.row,column:e.column}:c(l,e,!n)?{row:e.row+s,column:e.column+(e.row==l.row?o:0)}:{row:i.row,column:i.column}}(t,{row:this.row,column:this.column},this.$insertRight),this.setPosition(t.row,t.column,!0))},a.prototype.setPosition=function(t,r,e){e=e?{row:t,column:r}:this.$clipPositionToDocument(t,r),this.row==e.row&&this.column==e.column||(t={row:this.row,column:this.column},this.row=e.row,this.column=e.column,this._signal("change",{old:t,value:e}))},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(t,r){var e={};return t>=this.document.getLength()?(e.row=Math.max(0,this.document.getLength()-1),e.column=this.document.getLine(e.row).length):t<0?(e.row=0,e.column=0):(e.row=t,e.column=Math.min(this.document.getLine(e.row).length,Math.max(0,r))),r<0&&(e.column=0),e},a);function a(t,r,e){this.$onChange=this.onChange.bind(this),this.attach(t),e===void 0?this.setPosition(r.row,r.column):this.setPosition(r,e)}function c(t,r,e){return e=e?t.column<=r.column:t.column<r.column,t.row<r.row||t.row==r.row&&e}h.prototype.$insertRight=!1,y.implement(h.prototype,f),m.Anchor=h}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,m,T){var y=t("./lib/oop"),f=t("./apply_delta").applyDelta,h=t("./lib/event_emitter").EventEmitter,a=t("./range").Range,c=t("./anchor").Anchor,t=(r.prototype.setValue=function(e){var n=this.getLength()-1;this.remove(new a(0,0,n,this.getLine(n).length)),this.insert({row:0,column:0},e||"")},r.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},r.prototype.createAnchor=function(e,n){return new c(this,e,n)},r.prototype.$detectNewLine=function(e){e=e.match(/^.*?(\r\n|\r|\n)/m),this.$autoNewLine=e?e[1]:`
`,this._signal("changeNewLineMode")},r.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},r.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},r.prototype.getNewLineMode=function(){return this.$newLineMode},r.prototype.isNewLine=function(e){return e==`\r
`||e=="\r"||e==`
`},r.prototype.getLine=function(e){return this.$lines[e]||""},r.prototype.getLines=function(e,n){return this.$lines.slice(e,n+1)},r.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},r.prototype.getLength=function(){return this.$lines.length},r.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},r.prototype.getLinesForRange=function(e){var n,s;return e.start.row===e.end.row?n=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((n=this.getLines(e.start.row,e.end.row))[0]=(n[0]||"").substring(e.start.column),s=n.length-1,e.end.row-e.start.row==s&&(n[s]=n[s].substring(0,e.end.column))),n},r.prototype.insertLines=function(e,n){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,n)},r.prototype.removeLines=function(e,n){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,n)},r.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},r.prototype.insert=function(e,n){return this.getLength()<=1&&this.$detectNewLine(n),this.insertMergedLines(e,this.$split(n))},r.prototype.insertInLine=function(o,n){var s=this.clippedPos(o.row,o.column),o=this.pos(o.row,o.column+n.length);return this.applyDelta({start:s,end:o,action:"insert",lines:[n]},!0),this.clonePos(o)},r.prototype.clippedPos=function(e,n){var s=this.getLength(),s=(e===void 0?e=s:e<0?e=0:s<=e&&(e=s-1,n=void 0),this.getLine(e));return n==null&&(n=s.length),{row:e,column:n=Math.min(Math.max(n,0),s.length)}},r.prototype.clonePos=function(e){return{row:e.row,column:e.column}},r.prototype.pos=function(e,n){return{row:e,column:n}},r.prototype.$clipPosition=function(e){var n=this.getLength();return e.row>=n?(e.row=Math.max(0,n-1),e.column=this.getLine(n-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},r.prototype.insertFullLines=function(e,n){var s=0,s=(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(n=n.concat([""]),0):(n=[""].concat(n),this.$lines[--e].length);this.insertMergedLines({row:e,column:s},n)},r.prototype.insertMergedLines=function(s,n){var s=this.clippedPos(s.row,s.column),o={row:s.row+n.length-1,column:(n.length==1?s.column:0)+n[n.length-1].length};return this.applyDelta({start:s,end:o,action:"insert",lines:n}),this.clonePos(o)},r.prototype.remove=function(s){var n=this.clippedPos(s.start.row,s.start.column),s=this.clippedPos(s.end.row,s.end.column);return this.applyDelta({start:n,end:s,action:"remove",lines:this.getLinesForRange({start:n,end:s})}),this.clonePos(n)},r.prototype.removeInLine=function(e,n,s){return n=this.clippedPos(e,n),e=this.clippedPos(e,s),this.applyDelta({start:n,end:e,action:"remove",lines:this.getLinesForRange({start:n,end:e})},!0),this.clonePos(n)},r.prototype.removeFullLines=function(e,n){e=Math.min(Math.max(0,e),this.getLength()-1);var l=(n=Math.min(Math.max(0,n),this.getLength()-1))==this.getLength()-1&&0<e,o=n<this.getLength()-1,i=l?e-1:e,l=l?this.getLine(i).length:0,s=o?n+1:n,o=o?0:this.getLine(s).length,i=new a(i,l,s,o),l=this.$lines.slice(e,n+1);return this.applyDelta({start:i.start,end:i.end,action:"remove",lines:this.getLinesForRange(i)}),l},r.prototype.removeNewLine=function(e){e<this.getLength()-1&&0<=e&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},r.prototype.replace=function(e,n){return e instanceof a||(e=a.fromPoints(e.start,e.end)),n.length===0&&e.isEmpty()?e.start:n==this.getTextRange(e)?e.end:(this.remove(e),n?this.insert(e.start,n):e.start)},r.prototype.applyDeltas=function(e){for(var n=0;n<e.length;n++)this.applyDelta(e[n])},r.prototype.revertDeltas=function(e){for(var n=e.length-1;0<=n;n--)this.revertDelta(e[n])},r.prototype.applyDelta=function(e,n){var s=e.action=="insert";(s?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(s&&2e4<e.lines.length?this.$splitAndapplyLargeDelta(e,2e4):(f(this.$lines,e,n),this._signal("change",e)))},r.prototype.$safeApplyDelta=function(e){var n=this.$lines.length;(e.action=="remove"&&e.start.row<n&&e.end.row<n||e.action=="insert"&&e.start.row<=n)&&this.applyDelta(e)},r.prototype.$splitAndapplyLargeDelta=function(e,n){for(var s=e.lines,o=s.length-n+1,i=e.start.row,l=e.start.column,d=0,C=0;d<o;d=C){C+=n-1;var p=s.slice(d,C);p.push(""),this.applyDelta({start:this.pos(i+d,l),end:this.pos(i+C,l=0),action:e.action,lines:p},!0)}e.lines=s.slice(d),e.start.row=i+d,e.start.column=l,this.applyDelta(e,!0)},r.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},r.prototype.indexToPosition=function(e,n){for(var s=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=n||0,l=s.length;i<l;i++)if((e-=s[i].length+o)<0)return{row:i,column:e+s[i].length+o};return{row:l-1,column:e+s[l-1].length+o}},r.prototype.positionToIndex=function(e,n){for(var s=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,i=0,l=Math.min(e.row,s.length),d=n||0;d<l;++d)i+=s[d].length+o;return i+e.column},r.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},r);function r(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}t.prototype.$autoNewLine="",t.prototype.$newLineMode="auto",y.implement(t.prototype,h),m.Document=t}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(f,m,T){var y=f("./lib/oop"),f=f("./lib/event_emitter").EventEmitter,h=(a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,t){this._signal("update",{data:{first:c,last:t}})},a.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var t=c.start.row,r=c.end.row-t;r==0?this.lines[t]=null:c.action=="remove"?(this.lines.splice(t,1+r,null),this.states.splice(t,1+r,null)):((c=Array(1+r)).unshift(t,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)),this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var r=this.doc.getLine(c),t=this.states[c-1],r=this.tokenizer.getLineTokens(r,t,c);return this.states[c]+""!=r.state+""?(this.states[c]=r.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=r.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a);function a(c,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var r=this;this.$worker=function(){if(r.running){for(var e=new Date,n=r.currentLine,s=-1,o=r.doc,i=n;r.lines[n];)n++;var l=o.getLength(),d=0;for(r.running=!1;n<l;){for(r.$tokenizeRow(n),s=n;n++,r.lines[n];);if(++d%5==0&&20<new Date-e){r.running=setTimeout(r.$worker,20);break}}r.currentLine=n,i<=(s=s==-1?n:s)&&r.fireUpdateEvent(i,s)}}}y.implement(h.prototype,f),m.BackgroundTokenizer=h}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(h,m,T){var y=h("./lib/lang"),f=h("./range").Range,h=(a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,t,r,e){if(this.regExp)for(var n=e.firstRow,s=e.lastRow,o={},i=n;i<=s;i++){var l=this.cache[i];l==null&&(l=(l=(l=y.getMatchOffsets(r.getLine(i),this.regExp)).length>this.MAX_RANGES?l.slice(0,this.MAX_RANGES):l).map(function(w){return new f(i,w.offset,i,w.offset+w.length)}),this.cache[i]=l.length?l:"");for(var d=l.length;d--;){var C=l[d].toScreenRange(r),p=C.toString();o[p]||(o[p]=!0,t.drawSingleLineMarker(c,C,this.clazz,e))}}},a);function a(c,t,r){r===void 0&&(r="text"),this.setRegexp(c),this.clazz=t,this.type=r}h.prototype.MAX_RANGES=500,m.SearchHighlight=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(A,m,T){var y=A("../range").Range;function f(h,a){this.foldData=h,Array.isArray(a)?this.folds=a:a=this.folds=[a],h=a[a.length-1],this.range=new y(a[0].start.row,a[0].start.column,h.end.row,h.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(c){c.setFoldLine(this)},this)}f.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(a){a.start.row+=h,a.end.row+=h})},f.prototype.addFold=function(h){if(h.sameRow){if(h.start.row<this.startRow||h.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(a,c){return-a.range.compareEnd(c.start.row,c.start.column)}),0<this.range.compareEnd(h.start.row,h.start.column)?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else{if(h.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column}h.foldLine=this},f.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},f.prototype.walk=function(h,a,c){var t,r,e=0,n=this.folds,s=!0;a==null&&(a=this.end.row,c=this.end.column);for(var o=0;o<n.length;o++){if((r=(t=n[o]).range.compareStart(a,c))==-1)return void h(null,a,c,e,s);if(!h(null,t.start.row,t.start.column,e,s)&&h(t.placeholder,t.start.row,t.start.column,e)||r===0)return;s=!t.sameRow,e=t.end.column}h(null,a,c,e,s)},f.prototype.getNextFoldTo=function(h,a){for(var c,t,r=0;r<this.folds.length;r++){if((t=(c=this.folds[r]).range.compareEnd(h,a))==-1)return{fold:c,kind:"after"};if(t===0)return{fold:c,kind:"inside"}}return null},f.prototype.addRemoveChars=function(h,a,c){var t,r=this.getNextFoldTo(h,a);if(r){if(t=r.fold,r.kind=="inside"&&t.start.column!=a&&t.start.row!=h)window.console&&window.console.log(h,a,t);else if(t.start.row==h){var e,n=(e=this.folds).indexOf(t);for(n===0&&(this.start.column+=c);n<e.length;n++){if((t=e[n]).start.column+=c,!t.sameRow)return;t.end.column+=c}this.end.column+=c}}},f.prototype.split=function(r,a){var c,t,r=this.getNextFoldTo(r,a);return r&&r.kind!="inside"?(a=r.fold,r=this.folds,c=this.foldData,a=r.indexOf(a),t=r[a-1],this.end.row=t.end.row,this.end.column=t.end.column,t=new f(c,r=r.splice(a,r.length-a)),c.splice(c.indexOf(this)+1,0,t),t):null},f.prototype.merge=function(h){for(var a=h.folds,c=0;c<a.length;c++)this.addFold(a[c]);var t=this.foldData;t.splice(t.indexOf(h),1)},f.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(a){h.push(" "+a.toString())}),h.push("]"),h.join(`
`)},f.prototype.idxToPosition=function(h){for(var a=0,c=0;c<this.folds.length;c++){var t=this.folds[c];if((h-=t.start.column-a)<0)return{row:t.start.row,column:t.start.column+h};if((h-=t.placeholder.length)<0)return t.start;a=t.end.column}return{row:this.end.row,column:this.end.column+h}},m.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(f,m,T){var y=f("./range").Range.comparePoints,f=(h.prototype.pointIndex=function(a,c,t){for(var r=this.ranges,e=t||0;e<r.length;e++){var n=r[e],s=y(a,n.end);if(!(0<s))return n=y(a,n.start),s===0?c&&n!==0?-e-2:e:0<n||n===0&&!c?e:-e-1}return-e-1},h.prototype.add=function(a){var t=!a.isEmpty(),c=this.pointIndex(a.start,t),t=this.pointIndex(a.end,t,c=c<0?-c-1:c);return t<0?t=-t-1:t++,this.ranges.splice(c,t-c,a)},h.prototype.addList=function(a){for(var c=[],t=a.length;t--;)c.push.apply(c,this.add(a[t]));return c},h.prototype.substractPoint=function(a){if(a=this.pointIndex(a),0<=a)return this.ranges.splice(a,1)},h.prototype.merge=function(){for(var a=[],c=this.ranges,t=(c=c.sort(function(s,o){return y(s.start,o.start)}))[0],r=1;r<c.length;r++){var e=t,t=c[r],n=y(e.end,t.start);n<0||(n!=0||e.isEmpty()||t.isEmpty())&&(y(e.end,t.end)<0&&(e.end.row=t.end.row,e.end.column=t.end.column),c.splice(r,1),a.push(t),t=e,r--)}return this.ranges=c,a},h.prototype.contains=function(a,c){return 0<=this.pointIndex({row:a,column:c})},h.prototype.containsPoint=function(a){return 0<=this.pointIndex(a)},h.prototype.rangeAtPoint=function(a){if(a=this.pointIndex(a),0<=a)return this.ranges[a]},h.prototype.clipRows=function(a,c){var t=this.ranges;if(t[0].start.row>c||t[t.length-1].start.row<a)return[];for(var a=this.pointIndex({row:a,column:0}),r=this.pointIndex({row:c,column:0},a=a<0?-a-1:a),e=(r<0&&(r=-r-1),[]),n=a;n<r;n++)e.push(t[n]);return e},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(a){for(var c=a.start,t=a.end,r=c.row,e=t.row,n=this.ranges,s=0,o=n.length;s<o&&!((d=n[s]).end.row>=r);s++);if(a.action=="insert")for(var i=e-r,l=-c.column+t.column;s<o&&!((d=n[s]).start.row>r);s++)d.start.row==r&&d.start.column>=c.column&&(d.start.column==c.column&&this.$bias<=0||(d.start.column+=l,d.start.row+=i)),d.end.row==r&&d.end.column>=c.column&&(d.end.column==c.column&&this.$bias<0||(d.end.column==c.column&&0<l&&s<o-1&&d.end.column>d.start.column&&d.end.column==n[s+1].start.column&&(d.end.column-=l),d.end.column+=l,d.end.row+=i));else for(var d,i=r-e,l=c.column-t.column;s<o&&!((d=n[s]).start.row>e);s++)d.end.row<e&&(r<d.end.row||r==d.end.row&&c.column<d.end.column)?(d.end.row=r,d.end.column=c.column):d.end.row==e?d.end.column<=t.column?(i||d.end.column>c.column)&&(d.end.column=c.column,d.end.row=c.row):(d.end.column+=l,d.end.row+=i):d.end.row>e&&(d.end.row+=i),d.start.row<e&&(r<d.start.row||r==d.start.row&&c.column<d.start.column)?(d.start.row=r,d.start.column=c.column):d.start.row==e?d.start.column<=t.column?(i||d.start.column>c.column)&&(d.start.column=c.column,d.start.row=c.row):(d.start.column+=l,d.start.row+=i):d.start.row>e&&(d.start.row+=i);if(i!=0&&s<o)for(;s<o;s++)(d=n[s]).start.row+=i,d.end.row+=i},h);function h(){this.ranges=[],this.$bias=1}f.prototype.comparePoints=y,m.RangeList=f}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(h,m,T){var y,f,a=this&&this.__extends||(y=function(e,n){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(s,o){s.__proto__=o}:function(s,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(s[i]=o[i])}))(e,n)},function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function s(){this.constructor=e}y(e,n),e.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}),h=h("../range_list").RangeList,a=(a(c,f=h),c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(n){n.setFoldLine(e)})},c.prototype.clone=function(){var e=new c(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(n){e.subFolds.push(n.clone())}),e.collapseChildren=this.collapseChildren,e},c.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){l=e,d=this.start,t(l.start,d),t(l.end,d);for(var n=e.start.row,s=e.start.column,o=0,i=-1;o<this.subFolds.length&&(i=this.subFolds[o].range.compare(n,s))==1;o++);var l=this.subFolds[o],d=0;if(i==0){if(l.range.containsRange(e))return l.addSubFold(e);d=1}for(var n=e.range.end.row,s=e.range.end.column,C=o,i=-1;C<this.subFolds.length&&(i=this.subFolds[C].range.compare(n,s))==1;C++);i==0&&C++;for(var p=this.subFolds.splice(o,C-o,e),w=i==0?p.length-1:p.length,x=d;x<w;x++)e.addSubFold(p[x]);return e.setFoldLine(this.foldLine),e}},c.prototype.restoreRange=function(e){return e=e,n=this.start,r(e.start,n),void r(e.end,n);var n},c);function c(e,n){var s=f.call(this)||this;return s.foldLine=null,s.placeholder=n,s.range=e,s.start=e.start,s.end=e.end,s.sameRow=e.start.row==e.end.row,s.subFolds=s.ranges=[],s}function t(e,n){e.row-=n.row,e.row==0&&(e.column-=n.column)}function r(e,n){e.row==0&&(e.column+=n.column),e.row+=n.row}m.Fold=a}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(A,m,T){var y=A("../range").Range,f=A("./fold_line").FoldLine,h=A("./fold").Fold,a=A("../token_iterator").TokenIterator,c=A("../mouse/mouse_event").MouseEvent;m.Folding=function(){this.getFoldAt=function(t,r,e){var n=this.getFoldLine(t);if(!n)return null;for(var s=n.folds,o=0;o<s.length;o++){var i=s[o].range;if(i.contains(t,r)&&(e!=1||!i.isEnd(t,r)||i.isEmpty())&&(e!=-1||!i.isStart(t,r)||i.isEmpty()))return s[o]}},this.getFoldsInRange=function(t){var r=t.start,e=t.end,n=this.$foldData,s=[];r.column+=1,--e.column;for(var o=0;o<n.length;o++){var i=n[o].range.compareRange(t);if(i!=2){if(i==-2)break;for(var l=n[o].folds,d=0;d<l.length;d++){var C=l[d];if((i=C.range.compareRange(t))==-2)break;if(i!=2){if(i==42)break;s.push(C)}}}}return--r.column,e.column+=1,s},this.getFoldsInRangeList=function(t){var r;return Array.isArray(t)?(r=[],t.forEach(function(e){r=r.concat(this.getFoldsInRange(e))},this)):r=this.getFoldsInRange(t),r},this.getAllFolds=function(){for(var t=[],r=this.$foldData,e=0;e<r.length;e++)for(var n=0;n<r[e].folds.length;n++)t.push(r[e].folds[n]);return t},this.getFoldStringAt=function(t,r,e,n){if(!(n=n||this.getFoldLine(t)))return null;for(var s,o={end:{column:0}},i=0;i<n.folds.length;i++){var l,d=(l=n.folds[i]).range.compareEnd(t,r);if(d==-1){s=this.getLine(l.start.row).substring(o.end.column,l.start.column);break}if(d===0)return null;o=l}return s=s||this.getLine(l.start.row).substring(o.end.column),e==-1?s.substring(0,r-o.end.column):e==1?s.substring(r-o.end.column):s},this.getFoldLine=function(t,r){var e=this.$foldData,n=0;for((n=r?e.indexOf(r):n)==-1&&(n=0);n<e.length;n++){var s=e[n];if(s.start.row<=t&&s.end.row>=t)return s;if(s.end.row>t)return null}return null},this.getNextFoldLine=function(t,r){var e=this.$foldData,n=0;for((n=r?e.indexOf(r):n)==-1&&(n=0);n<e.length;n++){var s=e[n];if(s.end.row>=t)return s}return null},this.getFoldedRowCount=function(t,r){for(var e=this.$foldData,n=r-t+1,s=0;s<e.length;s++){var i=e[s],o=i.end.row,i=i.start.row;if(r<=o){i<r&&(t<=i?n-=r-i:n=0);break}t<=o&&(n-=t<=i?o-i:o-t+1)}return n},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(r,e){return r.start.row-e.start.row}),t},this.addFold=function(i,d){var e,n=this.$foldData,s=!1,o=(i instanceof h?e=i:(e=new h(d,i)).collapseChildren=d.collapseChildren,this.$clipRangeToDocument(e.range),e.start.row),i=e.start.column,l=e.end.row,d=e.end.column,C=this.getFoldAt(o,i,1),p=this.getFoldAt(l,d,-1);if(C&&p==C)return C.addSubFold(e);C&&!C.range.isStart(o,i)&&this.removeFold(C),p&&!p.range.isEnd(l,d)&&this.removeFold(p),i=this.getFoldsInRange(e.range),0<i.length&&(this.removeFolds(i),e.collapseChildren||i.forEach(function(H){e.addSubFold(H)}));for(var w=0;w<n.length;w++){var x=n[w];if(l==x.start.row){x.addFold(e),s=!0;break}if(o==x.end.row){if(x.addFold(e),s=!0,!e.sameRow){var $=n[w+1];if($&&$.start.row==l){x.merge($);break}}break}if(l<=x.start.row)break}return s||(x=this.$addFoldLine(new f(this.$foldData,e))),this.$useWrapMode?this.$updateWrapData(x.start.row,x.start.row):this.$updateRowLengthCache(x.start.row,x.start.row),this.$modified=!0,this._signal("changeFold",{data:e,action:"add"}),e},this.addFolds=function(t){t.forEach(function(r){this.addFold(r)},this)},this.removeFold=function(t){var r=t.foldLine,e=r.start.row,n=r.end.row,s=this.$foldData,o=r.folds;o.length==1?s.splice(s.indexOf(r),1):r.range.isEnd(t.end.row,t.end.column)?(o.pop(),r.end.row=o[o.length-1].end.row,r.end.column=o[o.length-1].end.column):r.range.isStart(t.start.row,t.start.column)?(o.shift(),r.start.row=o[0].start.row,r.start.column=o[0].start.column):t.sameRow?o.splice(o.indexOf(t),1):((o=(s=r.split(t.start.row,t.start.column)).folds).shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(e,n):this.$updateRowLengthCache(e,n)),this.$modified=!0,this._signal("changeFold",{data:t,action:"remove"})},this.removeFolds=function(t){for(var r=[],e=0;e<t.length;e++)r.push(t[e]);r.forEach(function(n){this.removeFold(n)},this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach(function(r){t.restoreRange(r),this.addFold(r)},this),0<t.collapseChildren&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(r){this.expandFold(r)},this)},this.unfold=function(t,r){var e;if(t==null)e=new y(0,0,this.getLength(),0),r==null&&(r=!0);else if(typeof t=="number")e=new y(t,0,t,this.getLine(t).length);else if("row"in t)e=y.fromPoints(t,t);else{if(Array.isArray(t))return n=[],t.forEach(function(s){n=n.concat(this.unfold(s))},this),n;e=t}for(var n,t=n=this.getFoldsInRangeList(e);n.length==1&&y.comparePoints(n[0].start,e.start)<0&&0<y.comparePoints(n[0].end,e.end);)this.expandFolds(n),n=this.getFoldsInRangeList(e);if(r!=0?this.removeFolds(n):this.expandFolds(n),t.length)return t},this.isRowFolded=function(t,r){return!!this.getFoldLine(t,r)},this.getRowFoldEnd=function(t,r){return r=this.getFoldLine(t,r),r?r.end.row:t},this.getRowFoldStart=function(t,r){return r=this.getFoldLine(t,r),r?r.start.row:t},this.getFoldDisplayLine=function(t,r,e,n,s){n==null&&(n=t.start.row),s==null&&(s=0),r==null&&(r=t.end.row),e==null&&(e=this.getLine(r).length);var o=this.doc,i="";return t.walk(function(l,d,C,p){if(!(d<n)){if(d==n){if(C<s)return;p=Math.max(s,p)}i+=l!=null?l:o.getLine(d).substring(p,C)}},r,e),i},this.getDisplayLine=function(t,r,e,n){var s=this.getFoldLine(t);return s?this.getFoldDisplayLine(s,t,r,e,n):(s=this.doc.getLine(t)).substring(n||0,r||s.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map(function(r){return r=r.folds.map(function(e){return e.clone()}),new f(t,r)})},this.toggleFold=function(t){var r=this.selection.getRange();if(r.isEmpty()){var e,n=r.start;if(e=this.getFoldAt(n.row,n.column))return void this.expandFold(e);(s=this.findMatchingBracket(n))?r.comparePoint(s)==1?r.end=s:(r.start=s,r.start.column++,r.end.column--):(s=this.findMatchingBracket({row:n.row,column:n.column+1}))?(r.comparePoint(s)==1?r.end=s:r.start=s,r.start.column++):r=this.getCommentFoldRange(n.row,n.column)||r}else{var s=this.getFoldsInRange(r);if(t&&s.length)return void this.expandFolds(s);s.length==1&&(e=s[0])}if((e=e||this.getFoldAt(r.start.row,r.start.column))&&e.range.toString()==r.toString())this.expandFold(e);else{if(n="...",!r.isMultiLine()){if((n=this.getTextRange(r)).length<4)return;n=n.trim().substring(0,2)+".."}this.addFold(n,r)}},this.getCommentFoldRange=function(t,r,e){var n=new a(this,t,r),s=n.getCurrentToken(),o=s&&s.type;if(s&&/^comment|string/.test(o)){(o=o.match(/comment|string/)[0])=="comment"&&(o+="|doc-start");var i=new RegExp(o),o=new y;if(e!=1){for(;(s=n.stepBackward())&&i.test(s.type)&&!/^comment.end/.test(s.type););s=n.stepForward()}if(o.start.row=n.getCurrentTokenRow(),o.start.column=n.getCurrentTokenColumn()+(/^comment.start/.test(s.type)?s.value.length:2),n=new a(this,t,r),e!=-1){var l=-1;do if(s=n.stepForward(),l==-1){var d=this.getState(n.$row);i.test(d)||(l=n.$row)}else if(n.$row>l)break;while(s&&i.test(s.type)&&!/^comment.start/.test(s.type));s=n.stepBackward()}else s=n.getCurrentToken();return o.end.row=n.getCurrentTokenRow(),o.end.column=n.getCurrentTokenColumn(),/^comment.end/.test(s.type)||(o.end.column+=s.value.length-2),o}},this.foldAll=function(t,r,e,n){e==null&&(e=1e5);var s=this.foldWidgets;if(s){r=r||this.getLength();for(var o,i=t=t||0;i<r;i++)s[i]==null&&(s[i]=this.getFoldWidget(i)),s[i]!="start"||n&&!n(i)||(o=this.getFoldWidgetRange(i))&&o.isMultiLine()&&o.end.row<=r&&o.start.row>=t&&(i=o.end.row,o.collapseChildren=e,this.addFold("...",o))}},this.foldToLevel=function(t){for(this.foldAll();0<t--;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(r){for(var e=t.getTokens(r),n=0;n<e.length;n++){var s=e[n];if(s.type!="text"||!/^\s+$/.test(s.value))return!!/comment/.test(s.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");this.$foldStyle!=t&&((this.$foldStyle=t)=="manual"&&this.unfold(),t=this.$foldMode,this.$setFolding(null),this.$setFolding(t))},this.$setFolding=function(t){this.$foldMode!=t&&(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),t&&this.$foldStyle!="manual"?(this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(t,r){var e=this.foldWidgets;if(!e||r&&e[t])return{};for(var n=t-1;0<=n;){var s=e[n];if((s=s==null?e[n]=this.getFoldWidget(n):s)=="start"){var o=this.getFoldWidgetRange(n),i=i||o;if(o&&o.end.row>=t)break}n--}return{range:n!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(t,r){var e={children:(r=r instanceof c?r.domEvent:r).shiftKey,all:r.ctrlKey||r.metaKey,siblings:r.altKey};this.$toggleFoldWidget(t,e)||(t=r.target||r.srcElement)&&/ace_fold-widget/.test(t.className)&&(t.className+=" ace_invalid")},this.$toggleFoldWidget=function(t,r){var e,n,s,o;if(this.getFoldWidget)return e=this.getFoldWidget(t),n=this.getLine(t),(n=this.getFoldAt(t,(e=e==="end"?-1:1)==-1?0:n.length,e))?(r.children||r.all?this.removeFold(n):this.expandFold(n),n):(e=this.getFoldWidgetRange(t,!0))&&!e.isMultiLine()&&(n=this.getFoldAt(e.start.row,e.start.column,1))&&e.isEqual(n.range)?(this.removeFold(n),n):(r.siblings?((n=this.getParentFoldRangeData(t)).range&&(s=n.range.start.row+1,o=n.range.end.row),this.foldAll(s,o,r.all?1e4:0)):r.children?(o=e?e.end.row:this.getLength(),this.foldAll(t+1,o,r.all?1e4:0)):e&&(r.all&&(e.collapseChildren=1e4),this.addFold("...",e)),e)},this.toggleFoldWidget=function(t){var r,e=this.selection.getCursor().row;e=this.getRowFoldStart(e),!this.$toggleFoldWidget(e,{})&&(r=(r=this.getParentFoldRangeData(e,!0)).range||r.firstRange)&&(e=r.start.row,(e=this.getFoldAt(e,this.getLine(e).length,1))?this.removeFold(e):this.addFold("...",r))},this.updateFoldWidgets=function(t){var r=t.start.row,e=t.end.row-r;e==0?this.foldWidgets[r]=null:t.action=="remove"?this.foldWidgets.splice(r,1+e,null):((t=Array(1+e)).unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,t))},this.tokenizerUpdateFoldWidgets=function(t){t=t.data,t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(A,m,T){var y=A("../token_iterator").TokenIterator,f=A("../range").Range;m.BracketMatch=function(){this.findMatchingBracket=function(h,a){return h.column!=0&&(a=a||this.getLine(h.row).charAt(h.column-1))!=""&&(a=a.match(/([\(\[\{])|([\)\]\}])/))?a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h):null},this.getBracketRange=function(h){var a,c,t=this.getLine(h.row),r=!0,e=t.charAt(h.column-1),n=e&&e.match(/([\(\[\{])|([\)\]\}])/);if(n||(e=t.charAt(h.column),h={row:h.row,column:h.column+1},n=e&&e.match(/([\(\[\{])|([\)\]\}])/),r=!1),!n)return null;if(n[1]){if(!(c=this.$findClosingBracket(n[1],h)))return null;a=f.fromPoints(h,c),r||(a.end.column++,a.start.column--),a.cursor=a.end}else{if(!(c=this.$findOpeningBracket(n[2],h)))return null;a=f.fromPoints(c,h),r||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(h,a){var c=this.getLine(h.row),t=/([\(\[\{])|([\)\]\}])/,r=!a&&c.charAt(h.column-1),e=r&&r.match(t);return e||(r=(a===void 0||a)&&c.charAt(h.column),h={row:h.row,column:h.column+1},e=r&&r.match(t)),e?(a=new f(h.row,h.column-1,h.row,h.column),(c=e[1]?this.$findClosingBracket(e[1],h):this.$findOpeningBracket(e[2],h))?[a,new f(c.row,c.column,c.row,c.column+1)]:[a]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,a,c){var t=this.$brackets[h],r=1,e=new y(this,a.row,a.column),n=e.getCurrentToken();if(n=n||e.stepForward()){c=c||new RegExp("(\\.?"+n.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+");for(var s=a.column-e.getCurrentTokenColumn()-2,o=n.value;;){for(;0<=s;){var i=o.charAt(s);if(i==t){if(--r==0)return{row:e.getCurrentTokenRow(),column:s+e.getCurrentTokenColumn()}}else i==h&&(r+=1);--s}for(;(n=e.stepBackward())&&!c.test(n.type););if(n==null)break;s=(o=n.value).length-1}return null}},this.$findClosingBracket=function(h,a,c){var t=this.$brackets[h],r=1,e=new y(this,a.row,a.column),n=e.getCurrentToken();if(n=n||e.stepForward()){c=c||new RegExp("(\\.?"+n.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+");for(var s=a.column-e.getCurrentTokenColumn();;){for(var o=n.value,i=o.length;s<i;){var l=o.charAt(s);if(l==t){if(--r==0)return{row:e.getCurrentTokenRow(),column:s+e.getCurrentTokenColumn()}}else l==h&&(r+=1);s+=1}for(;(n=e.stepForward())&&!c.test(n.type););if(n==null)break;s=0}return null}},this.getMatchingTags=function(a){var a=new y(this,a.row,a.column),c=this.$findTagName(a);if(c)return a.stepBackward().value==="<"?this.$findClosingTag(a,c):this.$findOpeningTag(a,c)},this.$findTagName=function(h){var a=h.getCurrentToken(),c=!1,t=!1;if(a&&a.type.indexOf("tag-name")===-1)for(;(a=t?h.stepBackward():h.stepForward())&&(a.value==="/>"?t=!0:a.type.indexOf("tag-name")!==-1&&(c=!0)),a&&!c;);return a},this.$findClosingTag=function(h,a){var c=a.value,t=a.value,r=0,e=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1),n=(a=h.stepForward(),new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+a.value.length)),s=!1;do{var o,i=a;if(a=h.stepForward())if(a.value!==">"||s||(o=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1),s=!0),a.type.indexOf("tag-name")!==-1){if(t===(c=a.value)){if(i.value==="<")r++;else if(i.value==="</"&&--r<0){h.stepBackward();var l=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),d=(a=h.stepForward(),new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+a.value.length));if(!(a=h.stepForward())||a.value!==">")return;var C=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}}else t===c&&a.value==="/>"&&--r<0&&(C=d=l=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),o=new f(n.end.row,n.end.column,n.end.row,n.end.column+1))}while(a&&0<=r);if(e&&o&&l&&C&&n&&d)return{openTag:new f(e.start.row,e.start.column,o.end.row,o.end.column),closeTag:new f(l.start.row,l.start.column,C.end.row,C.end.column),openTagName:n,closeTagName:d}},this.$findOpeningTag=function(h,a){var c,t=h.getCurrentToken(),r=a.value,e=0,n=h.getCurrentTokenRow(),s=h.getCurrentTokenColumn(),o=new f(n,s,n,s+2),i=(h.stepForward(),new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+a.value.length));if((a=h.stepForward())&&a.value===">"){var l=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(a=t,n=h.getCurrentTokenRow(),c=(s=h.getCurrentTokenColumn())+a.value.length,t=h.stepBackward(),a){if(a.type.indexOf("tag-name")!==-1){if(r===a.value)if(t.value==="<"){if(0<++e){for(var d=new f(n,s,n,c),C=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);(a=h.stepForward())&&a.value!==">";);var p=new f(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else t.value==="</"&&e--}else if(a.value==="/>"){for(var w=0,x=t;x;){if(x.type.indexOf("tag-name")!==-1&&x.value===r){e--;break}if(x.value==="<")break;x=h.stepBackward(),w++}for(var $=0;$<w;$++)h.stepForward()}}while(t&&e<=0);return C&&p&&o&&l&&d&&i?{openTag:new f(C.start.row,C.start.column,p.end.row,p.end.column),closeTag:new f(o.start.row,o.start.column,l.end.row,l.end.column),openTagName:d,closeTagName:i}:void 0}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(A,m,T){var y=A("./lib/oop"),f=A("./lib/lang"),h=A("./bidihandler").BidiHandler,a=A("./config"),c=A("./lib/event_emitter").EventEmitter,t=A("./selection").Selection,r=A("./mode/text").Mode,e=A("./range").Range,n=A("./document").Document,s=A("./background_tokenizer").BackgroundTokenizer,o=A("./search_highlight").SearchHighlight,i=(l.prototype.setDocument=function(u){this.doc&&this.doc.off("change",this.$onChange),(this.doc=u).on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},l.prototype.getDocument=function(){return this.doc},l.prototype.$resetRowCache=function(u){var I;u?(I=this.$docRowCache.length,(u=this.$getRowCacheIndex(this.$docRowCache,u)+1)<I&&(this.$docRowCache.splice(u,I),this.$screenRowCache.splice(u,I))):(this.$docRowCache=[],this.$screenRowCache=[])},l.prototype.$getRowCacheIndex=function(u,I){for(var L=0,v=u.length-1;L<=v;){var _=L+v>>1,W=u[_];if(W<I)L=1+_;else{if(!(I<W))return _;v=_-1}}return L-1},l.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},l.prototype.onChangeFold=function(u){u=u.data,this.$resetRowCache(u.start.row)},l.prototype.onChange=function(u){this.$modified=!0,this.$bidiHandler.onChange(u),this.$resetRowCache(u.start.row);var I=this.$updateInternalDataOnChange(u);!this.$fromUndo&&this.$undoManager&&(I&&I.length&&(this.$undoManager.add({action:"removeFolds",folds:I},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(u,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(u),this._signal("change",u)},l.prototype.setValue=function(u){this.doc.setValue(u),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},l.prototype.toString=function(){return this.doc.getValue()},l.prototype.getSelection=function(){return this.selection},l.prototype.getState=function(u){return this.bgTokenizer.getState(u)},l.prototype.getTokens=function(u){return this.bgTokenizer.getTokens(u)},l.prototype.getTokenAt=function(u,I){var L=this.bgTokenizer.getTokens(u),_=0;if(I==null)var v=L.length-1,_=this.getLine(u).length;else for(v=0;v<L.length&&!(I<=(_+=L[v].value.length));v++);return(u=L[v])?(u.index=v,u.start=_-u.value.length,u):null},l.prototype.setUndoManager=function(u){var I;this.$undoManager=u,this.$informUndoManager&&this.$informUndoManager.cancel(),u?(u.addSession(I=this),this.$syncInformUndoManager=function(){I.$informUndoManager.cancel(),I.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},l.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},l.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},l.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):" "},l.prototype.setUseSoftTabs=function(u){this.setOption("useSoftTabs",u)},l.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},l.prototype.setTabSize=function(u){this.setOption("tabSize",u)},l.prototype.getTabSize=function(){return this.$tabSize},l.prototype.isTabStop=function(u){return this.$useSoftTabs&&u.column%this.$tabSize==0},l.prototype.setNavigateWithinSoftTabs=function(u){this.setOption("navigateWithinSoftTabs",u)},l.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},l.prototype.setOverwrite=function(u){this.setOption("overwrite",u)},l.prototype.getOverwrite=function(){return this.$overwrite},l.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},l.prototype.addGutterDecoration=function(u,I){this.$decorations[u]||(this.$decorations[u]=""),this.$decorations[u]+=" "+I,this._signal("changeBreakpoint",{})},l.prototype.removeGutterDecoration=function(u,I){this.$decorations[u]=(this.$decorations[u]||"").replace(" "+I,""),this._signal("changeBreakpoint",{})},l.prototype.getBreakpoints=function(){return this.$breakpoints},l.prototype.setBreakpoints=function(u){this.$breakpoints=[];for(var I=0;I<u.length;I++)this.$breakpoints[u[I]]="ace_breakpoint";this._signal("changeBreakpoint",{})},l.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},l.prototype.setBreakpoint=function(u,I){(I=I===void 0?"ace_breakpoint":I)?this.$breakpoints[u]=I:delete this.$breakpoints[u],this._signal("changeBreakpoint",{})},l.prototype.clearBreakpoint=function(u){delete this.$breakpoints[u],this._signal("changeBreakpoint",{})},l.prototype.addMarker=function(W,I,L,v){var _=this.$markerId++,W={range:W,type:L||"line",renderer:typeof L=="function"?L:null,clazz:I,inFront:!!v,id:_};return v?(this.$frontMarkers[_]=W,this._signal("changeFrontMarker")):(this.$backMarkers[_]=W,this._signal("changeBackMarker")),_},l.prototype.addDynamicMarker=function(u,I){var L;if(u.update)return L=this.$markerId++,u.id=L,u.inFront=!!I,I?(this.$frontMarkers[L]=u,this._signal("changeFrontMarker")):(this.$backMarkers[L]=u,this._signal("changeBackMarker")),u},l.prototype.removeMarker=function(u){var I=this.$frontMarkers[u]||this.$backMarkers[u];I&&(delete(I.inFront?this.$frontMarkers:this.$backMarkers)[u],this._signal(I.inFront?"changeFrontMarker":"changeBackMarker"))},l.prototype.getMarkers=function(u){return u?this.$frontMarkers:this.$backMarkers},l.prototype.highlight=function(u){var I;this.$searchHighlight||(I=new o(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(I)),this.$searchHighlight.setRegexp(u)},l.prototype.highlightLines=function(u,I,L,v){return typeof I!="number"&&(L=I,I=u),L=L||"ace_step",u=new e(u,0,I,1/0),u.id=this.addMarker(u,L,"fullLine",v),u},l.prototype.setAnnotations=function(u){this.$annotations=u,this._signal("changeAnnotation",{})},l.prototype.getAnnotations=function(){return this.$annotations||[]},l.prototype.clearAnnotations=function(){this.setAnnotations([])},l.prototype.$detectNewLine=function(u){u=u.match(/^.*?(\r?\n)/m),this.$autoNewLine=u?u[1]:`
`},l.prototype.getWordRange=function(u,I){var L,v=this.getLine(u),_=!1,W=(L=(_=(_=0<I?!!v.charAt(I-1).match(this.tokenRe):_)||!!v.charAt(I).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(v.slice(I-1,I+1))?/\s/:this.nonTokenRe,I);if(0<W){for(;0<=--W&&v.charAt(W).match(L););W++}for(var F=I;F<v.length&&v.charAt(F).match(L);)F++;return new e(u,W,u,F)},l.prototype.getAWordRange=function(u,I){for(var L=this.getWordRange(u,I),v=this.getLine(L.end.row);v.charAt(L.end.column).match(/[ \t]/);)L.end.column+=1;return L},l.prototype.setNewLineMode=function(u){this.doc.setNewLineMode(u)},l.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},l.prototype.setUseWorker=function(u){this.setOption("useWorker",u)},l.prototype.getUseWorker=function(){return this.$useWorker},l.prototype.onReloadTokenizer=function(u){var I=u.data;this.bgTokenizer.start(I.first),this._signal("tokenizerUpdate",u)},l.prototype.setMode=function(u,I){if(u&&typeof u=="object"){if(u.getTokenizer)return this.$onChangeMode(u);var L=u,v=L.path}else v=u||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new r),this.$modes[v]&&!L?(this.$onChangeMode(this.$modes[v]),I&&I()):(this.$modeId=v,a.loadModule(["mode",v],function(_){if(this.$modeId!==v)return I&&I();this.$modes[v]&&!L?this.$onChangeMode(this.$modes[v]):_&&_.Mode&&(_=new _.Mode(L),L||((this.$modes[v]=_).$id=v),this.$onChangeMode(_)),I&&I()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0))},l.prototype.$onChangeMode=function(u,I){var L,v,_;I||(this.$modeId=u.$id),this.$mode===u||(L=this.$mode,this.$mode=u,this.$stopWorker(),this.$useWorker&&this.$startWorker(),(v=u.getTokenizer()).on!==void 0&&(_=this.onReloadTokenizer.bind(this),v.on("update",_)),this.bgTokenizer.setTokenizer(v),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=u.tokenRe,this.nonTokenRe=u.nonTokenRe,I)||(u.attachToSession&&u.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(u.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:L,mode:u}))},l.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},l.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(u){a.warn("Could not load worker",u),this.$worker=null}},l.prototype.getMode=function(){return this.$mode},l.prototype.setScrollTop=function(u){this.$scrollTop===u||isNaN(u)||(this.$scrollTop=u,this._signal("changeScrollTop",u))},l.prototype.getScrollTop=function(){return this.$scrollTop},l.prototype.setScrollLeft=function(u){this.$scrollLeft===u||isNaN(u)||(this.$scrollLeft=u,this._signal("changeScrollLeft",u))},l.prototype.getScrollLeft=function(){return this.$scrollLeft},l.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},l.prototype.getLineWidgetMaxWidth=function(){var u;return this.lineWidgetsWidth!=null?this.lineWidgetsWidth:(u=0,this.lineWidgets.forEach(function(I){I&&I.screenWidth>u&&(u=I.screenWidth)}),this.lineWidgetWidth=u)},l.prototype.$computeWidth=function(u){if(this.$modified||u){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var I=this.doc.getAllLines(),L=this.$rowLengthCache,v=0,_=0,W=this.$foldData[_],F=W?W.start.row:1/0,J=I.length,Q=0;Q<J;Q++){if(F<Q){if(J<=(Q=W.end.row+1))break;F=(W=this.$foldData[_++])?W.start.row:1/0}L[Q]==null&&(L[Q]=this.$getStringScreenWidth(I[Q])[0]),L[Q]>v&&(v=L[Q])}this.screenWidth=v}},l.prototype.getLine=function(u){return this.doc.getLine(u)},l.prototype.getLines=function(u,I){return this.doc.getLines(u,I)},l.prototype.getLength=function(){return this.doc.getLength()},l.prototype.getTextRange=function(u){return this.doc.getTextRange(u||this.selection.getRange())},l.prototype.insert=function(u,I){return this.doc.insert(u,I)},l.prototype.remove=function(u){return this.doc.remove(u)},l.prototype.removeFullLines=function(u,I){return this.doc.removeFullLines(u,I)},l.prototype.undoChanges=function(u,I){if(u.length){this.$fromUndo=!0;for(var L=u.length-1;L!=-1;L--){var v=u[L];v.action=="insert"||v.action=="remove"?this.doc.revertDelta(v):v.folds&&this.addFolds(v.folds)}!I&&this.$undoSelect&&(u.selectionBefore?this.selection.fromJSON(u.selectionBefore):this.selection.setRange(this.$getUndoSelection(u,!0))),this.$fromUndo=!1}},l.prototype.redoChanges=function(u,I){if(u.length){this.$fromUndo=!0;for(var L=0;L<u.length;L++){var v=u[L];v.action!="insert"&&v.action!="remove"||this.doc.$safeApplyDelta(v)}!I&&this.$undoSelect&&(u.selectionAfter?this.selection.fromJSON(u.selectionAfter):this.selection.setRange(this.$getUndoSelection(u,!1))),this.$fromUndo=!1}},l.prototype.setUndoSelect=function(u){this.$undoSelect=u},l.prototype.$getUndoSelection=function(u,I){function L(J){return I?J.action!=="insert":J.action==="insert"}for(var v,_,W=0;W<u.length;W++){var F=u[W];F.start&&(v?L(F)?(_=F.start,v.compare(_.row,_.column)==-1&&v.setStart(_),_=F.end,v.compare(_.row,_.column)==1&&v.setEnd(_)):(_=F.start,v.compare(_.row,_.column)==-1&&(v=e.fromPoints(F.start,F.start))):v=L(F)?e.fromPoints(F.start,F.end):e.fromPoints(F.start,F.start))}return v},l.prototype.replace=function(u,I){return this.doc.replace(u,I)},l.prototype.moveText=function(u,Q,L){var v,_,W,F=this.getTextRange(u),J=this.getFoldsInRange(u),Q=e.fromPoints(Q,Q);return L||(this.remove(u),_=u.start.row-u.end.row,(W=_?-u.end.column:u.start.column-u.end.column)&&(Q.start.row==u.end.row&&Q.start.column>u.end.column&&(Q.start.column+=W),Q.end.row==u.end.row)&&Q.end.column>u.end.column&&(Q.end.column+=W),_&&Q.start.row>=u.end.row&&(Q.start.row+=_,Q.end.row+=_)),Q.end=this.insert(Q.start,F),J.length&&(v=u.start,L=Q.start,_=L.row-v.row,W=L.column-v.column,this.addFolds(J.map(function(X){return(X=X.clone()).start.row==v.row&&(X.start.column+=W),X.end.row==v.row&&(X.end.column+=W),X.start.row+=_,X.end.row+=_,X}))),Q},l.prototype.indentRows=function(u,I,L){L=L.replace(/\t/g,this.getTabString());for(var v=u;v<=I;v++)this.doc.insertInLine({row:v,column:0},L)},l.prototype.outdentRows=function(u){for(var I=u.collapseRows(),L=new e(0,0,0,0),v=this.getTabSize(),_=I.start.row;_<=I.end.row;++_){var W=this.getLine(_);L.start.row=_,L.end.row=_;for(var F=0;F<v&&W.charAt(F)==" ";++F);F<v&&W.charAt(F)==" "?(L.start.column=F,L.end.column=F+1):(L.start.column=0,L.end.column=F),this.remove(L)}},l.prototype.$moveLines=function(u,I,W){if(u=this.getRowFoldStart(u),I=this.getRowFoldEnd(I),W<0){if((_=this.getRowFoldStart(u+W))<0)return 0;var v=_-u}else if(0<W){if((_=this.getRowFoldEnd(I+W))>this.doc.getLength()-1)return 0;v=_-I}else u=this.$clipRowToDocument(u),v=(I=this.$clipRowToDocument(I))-u+1;var _=new e(u,0,I,Number.MAX_VALUE),_=this.getFoldsInRange(_).map(function(F){return(F=F.clone()).start.row+=v,F.end.row+=v,F}),W=W==0?this.doc.getLines(u,I):this.doc.removeFullLines(u,I);return this.doc.insertFullLines(u+v,W),_.length&&this.addFolds(_),v},l.prototype.moveLinesUp=function(u,I){return this.$moveLines(u,I,-1)},l.prototype.moveLinesDown=function(u,I){return this.$moveLines(u,I,1)},l.prototype.duplicateLines=function(u,I){return this.$moveLines(u,I,0)},l.prototype.$clipRowToDocument=function(u){return Math.max(0,Math.min(u,this.doc.getLength()-1))},l.prototype.$clipColumnToRow=function(u,I){return I<0?0:Math.min(this.doc.getLine(u).length,I)},l.prototype.$clipPositionToDocument=function(u,I){var L;return I=Math.max(0,I),I=u<0?u=0:(L=this.doc.getLength())<=u?this.doc.getLine(u=L-1).length:Math.min(this.doc.getLine(u).length,I),{row:u,column:I}},l.prototype.$clipRangeToDocument=function(u){u.start.row<0?(u.start.row=0,u.start.column=0):u.start.column=this.$clipColumnToRow(u.start.row,u.start.column);var I=this.doc.getLength()-1;return u.end.row>I?(u.end.row=I,u.end.column=this.doc.getLine(I).length):u.end.column=this.$clipColumnToRow(u.end.row,u.end.column),u},l.prototype.setUseWrapMode=function(u){u!=this.$useWrapMode&&(this.$useWrapMode=u,this.$modified=!0,this.$resetRowCache(0),u&&(u=this.getLength(),this.$wrapData=Array(u),this.$updateWrapData(0,u-1)),this._signal("changeWrapMode"))},l.prototype.getUseWrapMode=function(){return this.$useWrapMode},l.prototype.setWrapLimitRange=function(u,I){this.$wrapLimitRange.min===u&&this.$wrapLimitRange.max===I||(this.$wrapLimitRange={min:u,max:I},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},l.prototype.adjustWrapLimit=function(u,v){var L=this.$wrapLimitRange,v=(L.max<0&&(L={min:v,max:v}),this.$constrainWrapLimit(u,L.min,L.max));return v!=this.$wrapLimit&&1<v&&(this.$wrapLimit=v,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},l.prototype.$constrainWrapLimit=function(u,I,L){return I&&(u=Math.max(I,u)),u=L?Math.min(L,u):u},l.prototype.getWrapLimit=function(){return this.$wrapLimit},l.prototype.setWrapLimit=function(u){this.setWrapLimitRange(u,u)},l.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},l.prototype.$updateInternalDataOnChange=function(u){var I=this.$useWrapMode,L=u.action,v=u.start,_=u.end,W=v.row,F=_.row,J=F-W,Q=null;if(this.$updating=!0,J!=0)if(L==="remove"){this[I?"$wrapData":"$rowLengthCache"].splice(W,J);var X=this.$foldData,Q=this.getFoldsInRange(u);this.removeFolds(Q);var te=0;for((V=this.getFoldLine(_.row))&&(V.addRemoveChars(_.row,_.column,v.column-_.column),V.shiftRow(-J),(E=this.getFoldLine(W))&&E!==V&&(E.merge(V),V=E),te=X.indexOf(V)+1);te<X.length;te++)(V=X[te]).start.row>=_.row&&V.shiftRow(-J);F=W}else{var E=Array(J),G=(E.unshift(W,0),I?this.$wrapData:this.$rowLengthCache),X=(G.splice.apply(G,E),this.$foldData),te=0;for((V=this.getFoldLine(W))&&((G=V.range.compareInside(v.row,v.column))==0?(V=V.split(v.row,v.column))&&(V.shiftRow(J),V.addRemoveChars(F,0,_.column-v.column)):G==-1&&(V.addRemoveChars(W,0,_.column-v.column),V.shiftRow(J)),te=X.indexOf(V)+1);te<X.length;te++)(V=X[te]).start.row>=W&&V.shiftRow(J)}else{var V,J=Math.abs(u.start.column-u.end.column);L==="remove"&&(Q=this.getFoldsInRange(u),this.removeFolds(Q),J=-J),(V=this.getFoldLine(W))&&V.addRemoveChars(W,v.column,J)}return I&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,I?this.$updateWrapData(W,F):this.$updateRowLengthCache(W,F),Q},l.prototype.$updateRowLengthCache=function(u,I,L){this.$rowLengthCache[u]=null,this.$rowLengthCache[I]=null},l.prototype.$updateWrapData=function(u,I){var L,v,_=this.doc.getAllLines(),W=this.getTabSize(),F=this.$wrapData,J=this.$wrapLimit,Q=u;for(I=Math.min(I,_.length-1);Q<=I;)(v=this.getFoldLine(Q,v))?(L=[],v.walk(function(X,te,E,G){var V;if(X!=null){(V=this.$getDisplayTokens(X,L.length))[0]=p;for(var b=1;b<V.length;b++)V[b]=w}else V=this.$getDisplayTokens(_[te].substring(G,E),L.length);L=L.concat(V)}.bind(this),v.end.row,_[v.end.row].length+1),F[v.start.row]=this.$computeWrapSplits(L,J,W),Q=v.end.row+1):(L=this.$getDisplayTokens(_[Q]),F[Q]=this.$computeWrapSplits(L,J,W),Q++)},l.prototype.$computeWrapSplits=function(u,I,L){if(u.length==0)return[];var v=[],_=u.length,W=0,F=0,J=this.$wrapAsCode,Q=this.$indentedSoftWrap,X=I<=Math.max(2*L,8)||Q===!1?0:Math.floor(I/2);function te(b){for(var k=b-W,R=W;R<b;R++){var D=u[R];D!==12&&D!==2||--k}v.length||(E=function(){var Y=0;if(X===0)return Y;if(Q)for(var re=0;re<u.length;re++){var pe=u[re];if(pe==$)Y+=1;else if(pe==H)Y+=L;else if(pe!=B)break}return J&&Q!==!1&&(Y+=L),Math.min(Y,X)}(),v.indent=E),F+=k,v.push(F),W=b}for(var E=0;I-E<_-W;){var G=W+I-E;if(u[G-1]>=$&&u[G]>=$)te(G);else if(u[G]==p||u[G]==w){for(;G!=W-1&&u[G]!=p;G--);if(!(W<G)){for(G=W+I;G<u.length&&u[G]==w;G++);if(G==u.length)break}te(G)}else{for(var V=Math.max(G-(I-(I>>2)),W-1);V<G&&u[G]<p;)G--;if(J){for(;V<G&&u[G]<p;)G--;for(;V<G&&u[G]==x;)G--}else for(;V<G&&u[G]<$;)G--;V<G?te(++G):(u[G=W+I]==C&&G--,te(G-E))}}return v},l.prototype.$getDisplayTokens=function(u,I){var L,v=[];I=I||0;for(var _=0;_<u.length;_++){var W=u.charCodeAt(_);if(W==9){L=this.getScreenTabSize(v.length+I),v.push(H);for(var F=1;F<L;F++)v.push(B)}else W==32?v.push($):39<W&&W<48||57<W&&W<64?v.push(x):4352<=W&&O(W)?v.push(d,C):v.push(d)}return v},l.prototype.$getStringScreenWidth=function(u,I,L){if(I==0)return[0,0];var v,_;for(I==null&&(I=1/0),L=L||0,_=0;_<u.length&&((v=u.charCodeAt(_))==9?L+=this.getScreenTabSize(L):4352<=v&&O(v)?L+=2:L+=1,!(I<L));_++);return[L,_]},l.prototype.getRowLength=function(u){var I=1;return this.lineWidgets&&(I+=this.lineWidgets[u]&&this.lineWidgets[u].rowCount||0),this.$useWrapMode&&this.$wrapData[u]?this.$wrapData[u].length+I:I},l.prototype.getRowLineCount=function(u){return this.$useWrapMode&&this.$wrapData[u]?this.$wrapData[u].length+1:1},l.prototype.getRowWrapIndent=function(u){var I;return this.$useWrapMode&&(u=this.screenToDocumentPosition(u,Number.MAX_VALUE),(I=this.$wrapData[u.row]).length)&&I[0]<u.column?I.indent:0},l.prototype.getScreenLastRowColumn=function(u){return u=this.screenToDocumentPosition(u,Number.MAX_VALUE),this.documentToScreenColumn(u.row,u.column)},l.prototype.getDocumentLastRowColumn=function(u,I){return u=this.documentToScreenRow(u,I),this.getScreenLastRowColumn(u)},l.prototype.getDocumentLastRowColumnPosition=function(u,I){return u=this.documentToScreenRow(u,I),this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},l.prototype.getRowSplitData=function(u){if(this.$useWrapMode)return this.$wrapData[u]},l.prototype.getScreenTabSize=function(u){return this.$tabSize-(u%this.$tabSize|0)},l.prototype.screenToDocumentRow=function(u,I){return this.screenToDocumentPosition(u,I).row},l.prototype.screenToDocumentColumn=function(u,I){return this.screenToDocumentPosition(u,I).column},l.prototype.screenToDocumentPosition=function(u,I,L){if(u<0)return{row:0,column:0};for(var v,_,W,F=0,J=0,Q=0,X=0,te=this.$screenRowCache,E=this.$getRowCacheIndex(te,u),G=te.length,V=(W=G&&0<=E?(Q=te[E],F=this.$docRowCache[E],u>te[G-1]):!G,this.getLength()-1),b=this.getNextFoldLine(F),k=b?b.start.row:1/0;Q<=u&&!(u<Q+(X=this.getRowLength(F))||V<=F);)Q+=X,k<++F&&(F=b.end.row+1,k=(b=this.getNextFoldLine(F,b))?b.start.row:1/0),W&&(this.$docRowCache.push(F),this.$screenRowCache.push(Q));if(b&&b.start.row<=F)v=this.getFoldDisplayLine(b),F=b.start.row;else{if(Q+X<=u||V<F)return{row:V,column:this.getLine(V).length};v=this.getLine(F),b=null}return E=0,te=Math.floor(u-Q),this.$useWrapMode&&(G=this.$wrapData[F])&&(_=G[te],0<te)&&G.length&&(E=G.indent,J=G[te-1]||G[G.length-1],v=v.substring(J)),L!==void 0&&this.$bidiHandler.isBidiRow(Q+te,F,te)&&(I=this.$bidiHandler.offsetToCol(L)),J+=this.$getStringScreenWidth(v,I-E)[1],this.$useWrapMode&&_<=J&&(J=_-1),b?b.idxToPosition(J):{row:F,column:J}},l.prototype.documentToScreenPosition=function(u,I){var E=I===void 0?this.$clipPositionToDocument(u.row,u.column):this.$clipPositionToDocument(u,I),L=(u=E.row,I=E.column,0),E=null;(F=this.getFoldAt(u,I,1))&&(u=F.start.row,I=F.start.column);for(var v,_,W=0,F=this.$docRowCache,G=this.$getRowCacheIndex(F,u),J=F.length,Q=(_=J&&0<=G?(W=F[G],L=this.$screenRowCache[G],u>F[J-1]):!J,this.getNextFoldLine(W)),X=Q?Q.start.row:1/0;W<u;){if(X<=W){if(u<(v=Q.end.row+1))break;X=(Q=this.getNextFoldLine(v,Q))?Q.start.row:1/0}else v=W+1;L+=this.getRowLength(W),W=v,_&&(this.$docRowCache.push(W),this.$screenRowCache.push(L))}var te="",E=Q&&X<=W?(te=this.getFoldDisplayLine(Q,u,I),Q.start.row):(te=this.getLine(u).substring(0,I),u),G=0;if(this.$useWrapMode){var V=this.$wrapData[E];if(V){for(var b=0;te.length>=V[b];)L++,b++;te=te.substring(V[b-1]||0,te.length),G=0<b?V.indent:0}}return this.lineWidgets&&this.lineWidgets[W]&&this.lineWidgets[W].rowsAbove&&(L+=this.lineWidgets[W].rowsAbove),{row:L,column:G+this.$getStringScreenWidth(te)[0]}},l.prototype.documentToScreenColumn=function(u,I){return this.documentToScreenPosition(u,I).column},l.prototype.documentToScreenRow=function(u,I){return this.documentToScreenPosition(u,I).row},l.prototype.getScreenLength=function(){var u=0,I=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,v=0,_=0,W=(I=this.$foldData[_++])?I.start.row:1/0;v<L;){var F=this.$wrapData[v];u+=F?F.length+1:1,W<++v&&(v=I.end.row+1,W=(I=this.$foldData[_++])?I.start.row:1/0)}else for(var u=this.getLength(),J=this.$foldData,_=0;_<J.length;_++)u-=(I=J[_]).end.row-I.start.row;return this.lineWidgets&&(u+=this.$getWidgetScreenLength()),u},l.prototype.$setFontMetrics=function(u){this.$enableVarChar&&(this.$getStringScreenWidth=function(I,L,v){if(L===0)return[0,0];var _,W;for(L=L||1/0,v=v||0,W=0;W<I.length&&!(L<(v+=(_=I.charAt(W))===" "?this.getScreenTabSize(v):u.getCharacterWidth(_)));W++);return[v,W]})},l.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},l);function l(u,I){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++l.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.bgTokenizer=new s(new r().getTokenizer(),this);var L=this;this.bgTokenizer.on("update",function(v){L._signal("tokenizerUpdate",v)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),typeof u=="object"&&u.getLine||(u=new n(u)),this.setDocument(u),this.selection=new t(this),this.$bidiHandler=new h(this),a.resetOptions(this),this.setMode(I),a._signal("session",this),this.destroyed=!1}i.$uid=0,i.prototype.$modes=a.$modes,i.prototype.getValue=i.prototype.toString,i.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},i.prototype.$overwrite=!1,i.prototype.$mode=null,i.prototype.$modeId=null,i.prototype.$scrollTop=0,i.prototype.$scrollLeft=0,i.prototype.$wrapLimit=80,i.prototype.$useWrapMode=!1,i.prototype.$wrapLimitRange={min:null,max:null},i.prototype.lineWidgets=null,i.prototype.isFullWidth=O,y.implement(i.prototype,c);var d=1,C=2,p=3,w=4,x=9,$=10,H=11,B=12;function O(u){return!(u<4352)&&(4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12288<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510)}A("./edit_session/folding").Folding.call(i.prototype),A("./edit_session/bracket_match").BracketMatch.call(i.prototype),a.defineOptions(i.prototype,"session",{wrap:{set:function(u){u&&u!="off"?u=="free"?u=!0:u=="printMargin"?u=-1:typeof u=="string"&&(u=parseInt(u,10)||!1):u=!1,this.$wrap!=u&&((this.$wrap=u)?(this.setWrapLimitRange(u=typeof u=="number"?u:null,u),this.setUseWrapMode(!0)):this.setUseWrapMode(!1))},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(u){(u=u=="auto"?this.$mode.type!="text":u!="text")!=this.$wrapAsCode&&(this.$wrapAsCode=u,this.$useWrapMode)&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(u){this.$useWorker=u,this.$stopWorker(),u&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(u){0<(u=parseInt(u))&&this.$tabSize!==u&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=u,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(u){this.setFoldStyle(u)},handlesSet:!0},overwrite:{set:function(u){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(u){this.doc.setNewLineMode(u)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(u){this.setMode(u)},get:function(){return this.$modeId},handlesSet:!0}}),m.EditSession=i}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(A,m,T){var y=A("./lib/lang"),f=A("./lib/oop"),h=A("./range").Range;function a(){this.$options={}}a.prototype.set=function(c){return f.mixin(this.$options,c),this},a.prototype.getOptions=function(){return y.copyObject(this.$options)},a.prototype.setOptions=function(c){this.$options=c},a.prototype.find=function(e){var t,r=this.$options,e=this.$matchIterator(e,r);return!!e&&(t=null,e.forEach(function(n,s,o,i){return t=new h(n,s,o,i),!(s==i&&r.start&&r.start.start&&r.skipCurrent!=0&&t.isEqual(r.start)&&(t=null,1))}),t)},a.prototype.findAll=function(c){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var r=t.range,e=r?c.getLines(r.start.row,r.end.row):c.doc.getAllLines(),n=[],s=t.re;if(t.$isMultiLine){var o,i=s.length,l=e.length-i;e:for(var d=s.offset||0;d<=l;d++){for(var C=0;C<i;C++)if(e[d+C].search(s[C])==-1)continue e;var p=e[d],w=e[d+i-1],p=p.length-p.match(s[0])[0].length,w=w.match(s[i-1])[0].length;o&&o.end.row===d&&o.end.column>p||(n.push(o=new h(d,p,d+i-1,w)),2<i&&(d=d+i-2))}}else for(var x=0;x<e.length;x++)for(var $=y.getMatchOffsets(e[x],s),C=0;C<$.length;C++){var H=$[C];n.push(new h(x,H.offset,x,H.offset+H.length))}if(r){for(var B=r.start.column,O=r.end.column,x=0,C=n.length-1;x<C&&n[x].start.column<B&&n[x].start.row==0;)x++;for(var u=r.end.row-r.start.row;x<C&&n[C].end.column>O&&n[C].end.row==u;)C--;for(n=n.slice(x,C+1),x=0,C=n.length;x<C;x++)n[x].start.row+=r.start.row,n[x].end.row+=r.start.row}return n},a.prototype.replace=function(c,t){var r=this.$options,e=this.$assembleRegExp(r);if(r.$isMultiLine)return t;if(e){var n=e.exec(c);if(!n||n[0].length!=c.length)return null;if(t=c.replace(e,t),r.preserveCase){t=t.split("");for(var s=Math.min(c.length,c.length);s--;){var o=c[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t}},a.prototype.$assembleRegExp=function(c,t){if(c.needle instanceof RegExp)return c.re=c.needle;var r,e=c.needle;if(!c.needle)return c.re=!1;function n(i){return/\w/.test(i)||r.regExp?"\\b":""}c.regExp||(e=y.escapeRegExp(e)),c.wholeWord&&(r=c,e=n((s=e)[0])+s+n(s[s.length-1]));var s=c.caseSensitive?"gm":"gmi";if(c.$isMultiLine=!t&&/[\n\r]/.test(e),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(e,s);try{var o=new RegExp(e,s)}catch{o=!1}return c.re=o},a.prototype.$assembleMultilineRegExp=function(c,t){for(var r=c.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),e=[],n=0;n<r.length;n++)try{e.push(new RegExp(r[n],t))}catch{return!1}return e},a.prototype.$matchIterator=function(c,t){var r,e,n,s,o,i,l,d,C=this.$assembleRegExp(t);return!!C&&(r=t.backwards==1,e=t.skipCurrent!=0,n=t.range,(s=(s=t.start)||(n?n[r?"end":"start"]:c.selection.getRange())).start&&(s=s[e!=r?"end":"start"]),o=n?n.start.row:0,i=n?n.end.row:c.getLength()-1,d=t.$isMultiLine?(l=C.length,function(p,w,x){var $=r?p-l+1:p;if(!($<0||$+l>c.getLength())){var H=c.getLine($),p=H.search(C[0]);if(!(!r&&p<w||p===-1)){for(var B=1;B<l;B++)if((H=c.getLine($+B)).search(C[B])==-1)return;var O=H.match(C[l-1])[0].length;if(!(r&&w<O))return!!x($,p,$+l-1,O)||void 0}}}):r?function(p,w,x){var $,H=c.getLine(p),B=[];for(C.lastIndex=0;$=C.exec(H);){var O=$[0].length,u=$.index;if(!O){if(u>=H.length)break;C.lastIndex=u+=1}if($.index+O>w)break;B.push($.index,O)}for(var I=B.length-1;0<=I;I-=2){var L=B[I-1];if(x(p,L,p,L+(O=B[I])))return!0}}:function(p,w,x){var $=c.getLine(p);for(C.lastIndex=w;H=C.exec($);){var H,B=H[0].length;if(x(p,H=H.index,p,H+B))return!0;if(!B&&(C.lastIndex=H+=1,H>=$.length))return!1}},{forEach:r?function(p){var w=s.row;if(!d(w,s.column,p)){for(w--;o<=w;w--)if(d(w,Number.MAX_VALUE,p))return;if(t.wrap!=0){for(w=i,o=s.row;o<=w;w--)if(d(w,Number.MAX_VALUE,p))return}}}:function(p){var w=s.row;if(!d(w,s.column,p)){for(w+=1;w<=i;w++)if(d(w,0,p))return;if(t.wrap!=0){for(w=o,i=s.row;w<=i;w++)if(d(w,0,p))return}}}})},m.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(A,m,T){var y=A("../lib/keys"),f=A("../lib/useragent"),h=y.KEY_MODS;function a(t,r){this.platform=r||(f.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function c(t,r){a.call(this,t,r),this.$singleCommand=!1}c.prototype=a.prototype,function(){function t(r){return typeof r=="object"&&r.bindKey&&r.bindKey.position||(r.isDefault?-100:0)}this.addCommand=function(r){this.commands[r.name]&&this.removeCommand(r),(this.commands[r.name]=r).bindKey&&this._buildKeyHash(r)},this.removeCommand=function(r,e){var n,s=r&&(typeof r=="string"?r:r.name),o=(r=this.commands[s],e||delete this.commands[s],this.commandKeyBinding);for(n in o){var i,l=o[n];l==r?delete o[n]:Array.isArray(l)&&(i=l.indexOf(r))!=-1&&(l.splice(i,1),l.length==1)&&(o[n]=l[0])}},this.bindKey=function(r,e,n){if(typeof r=="object"&&r&&(n==null&&(n=r.position),r=r[this.platform]),r)return typeof e=="function"?this.addCommand({exec:e,bindKey:r,name:e.name||r}):void r.split("|").forEach(function(l){var o="",i=(l.indexOf(" ")!=-1&&(l=(i=l.split(/\s+/)).pop(),i.forEach(function(d){d=this.parseKeys(d),d=h[d.hashId]+d.key,o+=(o?" ":"")+d,this._addCommandToBinding(o,"chainKeys")},this),o+=" "),this.parseKeys(l)),l=h[i.hashId]+i.key;this._addCommandToBinding(o+l,e,n)},this)},this._addCommandToBinding=function(r,e,n){var s=this.commandKeyBinding;if(e)if(!s[r]||this.$singleCommand)s[r]=e;else{Array.isArray(s[r])?(i=s[r].indexOf(e))!=-1&&s[r].splice(i,1):s[r]=[s[r]],typeof n!="number"&&(n=t(e));for(var o=s[r],i=0;i<o.length&&!(n<t(o[i]));i++);o.splice(i,0,e)}else delete s[r]},this.addCommands=function(r){r&&Object.keys(r).forEach(function(e){var n=r[e];if(n){if(typeof n=="string")return this.bindKey(n,e);typeof(n=typeof n=="function"?{exec:n}:n)=="object"&&(n.name||(n.name=e),this.addCommand(n))}},this)},this.removeCommands=function(r){Object.keys(r).forEach(function(e){this.removeCommand(r[e])},this)},this.bindKeys=function(r){Object.keys(r).forEach(function(e){this.bindKey(e,r[e])},this)},this._buildKeyHash=function(r){this.bindKey(r.bindKey,r)},this.parseKeys=function(r){var e=r.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(d){return d}),n=e.pop(),s=y[n];if(y.FUNCTION_KEYS[s])n=y.FUNCTION_KEYS[s].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(e.length==1&&e[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}for(var o=0,i=e.length;i--;){var l=y.KEY_MODS[e[i]];if(l==null)return typeof console!="undefined"&&console.error("invalid modifier "+e[i]+" in "+r),!1;o|=l}return{key:n,hashId:o}},this.findKeyCommand=function(r,e){return r=h[r]+e,this.commandKeyBinding[r]},this.handleKeyboard=function(r,e,n,s){var o,i;if(!(s<0))return o=h[e]+n,i=this.commandKeyBinding[o],r.$keyChain&&(r.$keyChain+=" "+o,i=this.commandKeyBinding[r.$keyChain]||i),!i||i!="chainKeys"&&i[i.length-1]!="chainKeys"?(r.$keyChain&&(e&&e!=4||n.length!=1?(e==-1||0<s)&&(r.$keyChain=""):r.$keyChain=r.$keyChain.slice(0,-o.length-1)),{command:i}):(r.$keyChain=r.$keyChain||o,{command:"null"})},this.getStatusText=function(r,e){return e.$keyChain||""}}.call(a.prototype),m.HashHandler=a,m.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(c,m,T){var y,f,t=this&&this.__extends||(y=function(e,n){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(s,o){s.__proto__=o}:function(s,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(s[i]=o[i])}))(e,n)},function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function s(){this.constructor=e}y(e,n),e.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}),h=c("../lib/oop"),a=c("../keyboard/hash_handler").MultiHashHandler,c=c("../lib/event_emitter").EventEmitter,t=(t(r,f=a),r.prototype.exec=function(e,n,s){if(Array.isArray(e)){for(var o=e.length;o--;)if(this.exec(e[o],n,s))return!0;return!1}var i;return!!(e=typeof e=="string"?this.commands[e]:e)&&!(n&&n.$readOnly&&!e.readOnly||this.$checkCommandState!=0&&e.isAvailable&&!e.isAvailable(n)||((i={editor:n,command:e,args:s}).returnValue=this._emit("exec",i),this._signal("afterExec",i),i.returnValue===!1))},r.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(n){this.macro.push([n.command,n.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},r.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(n){typeof n=="string"?this.exec(n,e):this.exec(n[0],e,n[1])},this)}finally{this.$inReplay=!1}}},r.prototype.trimMacro=function(e){return e.map(function(n){return typeof n[0]!="string"&&(n[0]=n[0].name),n=n[1]?n:n[0]})},r);function r(e,n){return n=f.call(this,n,e)||this,n.byName=n.commands,n.setDefaultHandler("exec",function(s){return s.args?s.command.exec(s.editor,s.args,s.event,!1):s.command.exec(s.editor,{},s.event,!0)}),n}h.implement(t.prototype,c),m.CommandManager=t}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(A,m,T){var y=A("../lib/lang"),f=A("../config"),h=A("../range").Range;function a(t,r){return{win:t,mac:r}}m.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(t){f.loadModule("ace/ext/settings_menu",function(r){r.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(t){f.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(t){f.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(t,r){typeof r!="number"||isNaN(r)||t.gotoLine(r),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(t){f.loadModule("ace/ext/searchbox",function(r){r.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(t,r){t.navigateUp(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(t,r){t.navigateDown(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(t,r){t.navigateLeft(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(t,r){t.navigateRight(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var r=t.$copyWithEmptySelection&&t.selection.isEmpty()?t.selection.getLineRange():t.selection.getRange();t._emit("cut",r),r.isEmpty()||t.session.remove(r),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,r){t.$handlePaste(r)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(t){f.loadModule("ace/ext/searchbox",function(r){r.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(t){var r=t.selection.getRange();r.start.column=0,t.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(t){var r=t.selection.getRange();r.end.column=Number.MAX_VALUE,t.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,r){t.insert(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,r){t.insert(y.stringRepeat(r.text||"",r.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var r=t.selection.getRange();r.start.column=r.end.column=0,r.end.row++,t.selection.setRange(r,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(t){for(var n=t.selection.isBackwards(),r=n?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),e=n?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),n=t.session.doc.getLine(r.row).length,s=t.session.doc.getTextRange(t.selection.getRange()).replace(/\n\s*/," ").length,o=t.session.doc.getLine(r.row),i=r.row+1;i<=e.row+1;i++){var l=y.stringTrimLeft(y.stringTrimRight(t.session.doc.getLine(i)));o+=l=l.length!==0?" "+l:l}e.row+1<t.session.doc.getLength()-1&&(o+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new h(r.row,0,e.row+2,0),o),0<s?(t.selection.moveCursorTo(r.row,r.column),t.selection.selectTo(r.row,r.column+s)):(n=t.session.doc.getLine(r.row).length>n?n+1:n,t.selection.moveCursorTo(r.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(t){var r=t.session.doc.getLength()-1,e=t.session.doc.getLine(r).length,n=t.selection.rangeList.ranges,s=[];n.length<1&&(n=[t.selection.getRange()]);for(var o=0;o<n.length;o++)o!=n.length-1||n[o].end.row===r&&n[o].end.column===e||s.push(new h(n[o].end.row,n[o].end.column,r,e)),o===0?n[o].start.row===0&&n[o].start.column===0||s.push(new h(0,0,n[o].start.row,n[o].start.column)):s.push(new h(n[o-1].end.row,n[o-1].end.column,n[o].start.row,n[o].start.column));for(t.exitMultiSelectMode(),t.clearSelection(),o=0;o<s.length;o++)t.selection.addRange(s[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(t){t.selection.clearSelection();var r=t.getCursorPosition();t.selection.moveTo(r.row-1,Number.MAX_VALUE),t.insert(`
`),r.row===0&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:a("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)m.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(A,m,T){var y=A("./lib/dom");function f(h){this.session=h,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}f.prototype.getRowLength=function(h){var a=this.lineWidgets&&this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0;return this.$useWrapMode&&this.$wrapData[h]?this.$wrapData[h].length+1+a:1+a},f.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(a){a&&a.rowCount&&!a.hidden&&(h+=a.rowCount)}),h},f.prototype.$onChangeEditor=function(h){this.attach(h.editor)},f.prototype.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h)&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets))},f.prototype.detach=function(h){var a=this.editor;a&&(this.editor=null,a.widgetManager=null,a.renderer.off("beforeRender",this.measureWidgets),a.renderer.off("afterRender",this.renderWidgets),a=this.session.lineWidgets)&&a.forEach(function(c){c&&c.el&&c.el.parentNode&&(c._inDocument=!1,c.el.parentNode.removeChild(c.el))})},f.prototype.updateOnFold=function(h,a){var c=a.lineWidgets;if(c&&h.action){for(var a=h.data,t=a.start.row,r=a.end.row,e=h.action=="add",n=t+1;n<r;n++)c[n]&&(c[n].hidden=e);c[r]&&(e?c[t]?c[r].hidden=e:c[t]=c[r]:(c[t]==c[r]&&(c[t]=void 0),c[r].hidden=e))}},f.prototype.updateOnChange=function(h){var a,c,t,r=this.session.lineWidgets;r&&(a=h.start.row,(c=h.end.row-a)!=0)&&(h.action=="remove"?(t=r.splice(a+1,c),!r[a]&&t[t.length-1]&&(r[a]=t.pop()),t.forEach(function(e){e&&this.removeLineWidget(e)},this)):(t=new Array(c),r[a]&&r[a].column!=null&&h.start.column>r[a].column&&a++,t.unshift(a,0),r.splice.apply(r,t)),this.$updateRows())},f.prototype.$updateRows=function(){var h,a=this.session.lineWidgets;a&&(h=!0,a.forEach(function(c,t){if(c)for(h=!1,c.row=t;c.$oldWidget;)c.$oldWidget.row=t,c=c.$oldWidget}),h)&&(this.session.lineWidgets=null)},f.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var a=this.session.lineWidgets[h.row];return a&&(h.$oldWidget=a).el&&a.el.parentNode&&(a.el.parentNode.removeChild(a.el),a._inDocument=!1),this.session.lineWidgets[h.row]=h},f.prototype.addLineWidget=function(h){var a,c,t;return this.$registerLineWidget(h),h.session=this.session,this.editor&&(a=this.editor.renderer,h.html&&!h.el&&(h.el=y.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=y.createElement("div"),h.el.textContent=h.text),h.el&&(y.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&y.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex=5,a.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex=3),h.pixelHeight==null)&&(h.pixelHeight=h.el.offsetHeight),h.rowCount==null&&(h.rowCount=h.pixelHeight/a.layerConfig.lineHeight),c=this.session.getFoldAt(h.row,0),(h.$fold=c)&&(t=this.session.lineWidgets,h.row!=c.end.row||t[c.start.row]?h.hidden=!0:t[c.start.row]=h),this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,a),this.onWidgetChanged(h)),h},f.prototype.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var a=this.session.lineWidgets[h.row];if(a==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;a;){if(a.$oldWidget==h){a.$oldWidget=h.$oldWidget;break}a=a.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},f.prototype.getWidgetsAtRow=function(h){for(var a=this.session.lineWidgets,c=a&&a[h],t=[];c;)t.push(c),c=c.$oldWidget;return t},f.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},f.prototype.measureWidgets=function(h,a){var c=this.session._changedWidgets,t=a.layerConfig;if(c&&c.length){for(var r=1/0,e=0;e<c.length;e++){var n=c[e];if(n&&n.el&&n.session==this.session){if(!n._inDocument){if(this.session.lineWidgets[n.row]!=n)continue;n._inDocument=!0,a.container.appendChild(n.el)}n.h=n.el.offsetHeight,n.fixedWidth||(n.w=n.el.offsetWidth,n.screenWidth=Math.ceil(n.w/t.characterWidth));var s=n.h/t.lineHeight;n.coverLine&&(s-=this.session.getRowLineCount(n.row))<0&&(s=0),n.rowCount!=s&&(n.rowCount=s,n.row<r)&&(r=n.row)}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},f.prototype.renderWidgets=function(h,a){var c=a.layerConfig,t=this.session.lineWidgets;if(t){for(var r=Math.min(this.firstRow,c.firstRow),e=Math.max(this.lastRow,c.lastRow,t.length);0<r&&!t[r];)r--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,a.$cursorLayer.config=c;for(var n=r;n<=e;n++){var s,o=t[n];o&&o.el&&(o.hidden?o.el.style.top=-100-(o.pixelHeight||0)+"px":(o._inDocument||(o._inDocument=!0,a.container.appendChild(o.el)),s=a.$cursorLayer.getPixelPosition({row:n,column:0},!0).top,o.coverLine||(s+=c.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=s-c.offset+"px",s=o.coverGutter?0:a.gutterWidth,o.fixedWidth||(s-=a.scrollLeft),o.el.style.left=s+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=c.width+2*c.padding+"px"),o.fixedWidth?o.el.style.right=a.scrollBar.getWidth()+"px":o.el.style.right=""))}}},m.LineWidgets=f}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(A,m,T){var y=A("../lib/keys"),f=A("../mouse/default_gutter_handler").GutterTooltip;function h(a){this.editor=a,this.gutterLayer=a.renderer.$gutterLayer,this.element=a.renderer.$gutter,this.lines=a.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new f(this.editor)}h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(a){var c;if(this.annotationTooltip.isOpen)a.preventDefault(),a.keyCode===y.escape&&this.annotationTooltip.hide();else if(a.target===this.element)a.keyCode==y.enter&&(a.preventDefault(),c=this.editor.getCursorPosition().row,this.editor.isRowVisible(c)||this.editor.scrollToLine(c,!0,!0),setTimeout(function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),s=this.$findNearestFoldWidget(n),o=this.$findNearestAnnotation(n);s===null&&o===null||(s===null&&o!==null||(s===null||o!==null)&&Math.abs(o-n)<Math.abs(s-n)?(this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=s,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex)))}.bind(this),10));else if(a.keyCode===y.tab)a.preventDefault();else if(a.keyCode===y.escape)a.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;else if(a.keyCode===y.up)switch(a.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}else if(a.keyCode===y.down)switch(a.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else if(a.keyCode===y.left&&(a.preventDefault(),this.$switchLane("annotation")),a.keyCode===y.right&&(a.preventDefault(),this.$switchLane("fold")),a.keyCode===y.enter||a.keyCode===y.space)switch(a.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var t=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),a),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var r=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=r.right+"px",e.top=r.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},h.prototype.$isFoldWidgetVisible=function(t){var c=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),t=this.$getFoldWidget(t).style.display!=="none";return c&&t},h.prototype.$isAnnotationVisible=function(t){var c=this.editor.isRowFullyVisible(this.$rowIndexToRow(t)),t=this.$getAnnotation(t).style.display!=="none";return c&&t},h.prototype.$getFoldWidget=function(a){return this.lines.get(a).element.childNodes[1]},h.prototype.$getAnnotation=function(a){return this.lines.get(a).element.childNodes[2]},h.prototype.$findNearestFoldWidget=function(a){if(this.$isFoldWidgetVisible(a))return a;for(var c=0;0<a-c||a+c<this.lines.getLength()-1;){if(0<=a-++c&&this.$isFoldWidgetVisible(a-c))return a-c;if(a+c<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(a+c))return a+c}return null},h.prototype.$findNearestAnnotation=function(a){if(this.$isAnnotationVisible(a))return a;for(var c=0;0<a-c||a+c<this.lines.getLength()-1;){if(0<=a-++c&&this.$isAnnotationVisible(a-c))return a-c;if(a+c<=this.lines.getLength()-1&&this.$isAnnotationVisible(a+c))return a+c}return null},h.prototype.$focusFoldWidget=function(a){a!=null&&((a=this.$getFoldWidget(a)).classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())},h.prototype.$focusAnnotation=function(a){a!=null&&((a=this.$getAnnotation(a)).classList.add(this.editor.renderer.keyboardFocusClassName),a.setAttribute("role","button"),a.focus())},h.prototype.$blurFoldWidget=function(a){a=this.$getFoldWidget(a),a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},h.prototype.$blurAnnotation=function(a){a=this.$getAnnotation(a),a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.removeAttribute("role"),a.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var a=this.activeRowIndex;0<a;)if(this.$isFoldWidgetVisible(--a))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=a,void this.$focusFoldWidget(this.activeRowIndex)},h.prototype.$moveFoldWidgetDown=function(){for(var a=this.activeRowIndex;a<this.lines.getLength()-1;)if(this.$isFoldWidgetVisible(++a))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=a,void this.$focusFoldWidget(this.activeRowIndex)},h.prototype.$moveAnnotationUp=function(){for(var a=this.activeRowIndex;0<a;)if(this.$isAnnotationVisible(--a))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,void this.$focusAnnotation(this.activeRowIndex)},h.prototype.$moveAnnotationDown=function(){for(var a=this.activeRowIndex;a<this.lines.getLength()-1;)if(this.$isAnnotationVisible(++a))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,void this.$focusAnnotation(this.activeRowIndex)},h.prototype.$switchLane=function(a){switch(a){case"annotation":this.activeLane!=="annotation"&&(c=this.$findNearestAnnotation(this.activeRowIndex))!=null&&(this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex));break;case"fold":var c;this.activeLane!=="fold"&&(c=this.$findNearestFoldWidget(this.activeRowIndex))!=null&&(this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex))}},h.prototype.$rowIndexToRow=function(a){return a=this.lines.get(a),a?a.row:null},h.prototype.$rowToRowIndex=function(a){for(var c=0;c<this.lines.getLength();c++)if(this.lines.get(c).row==a)return c;return null},m.GutterKeyboardHandler=h}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(u,m,T){var y=this&&this.__values||function(v){var _=typeof Symbol=="function"&&Symbol.iterator,W=_&&v[_],F=0;if(W)return W.call(v);if(v&&typeof v.length=="number")return{next:function(){return{value:(v=v&&F>=v.length?void 0:v)&&v[F++],done:!v}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},f=u("./lib/oop"),h=u("./lib/dom"),a=u("./lib/lang"),c=u("./lib/useragent"),t=u("./keyboard/textinput").TextInput,r=u("./mouse/mouse_handler").MouseHandler,e=u("./mouse/fold_handler").FoldHandler,n=u("./keyboard/keybinding").KeyBinding,s=u("./edit_session").EditSession,o=u("./search").Search,i=u("./range").Range,l=u("./lib/event_emitter").EventEmitter,d=u("./commands/command_manager").CommandManager,C=u("./commands/default_commands").commands,p=u("./config"),w=u("./token_iterator").TokenIterator,x=u("./line_widgets").LineWidgets,$=u("./keyboard/gutter_handler").GutterKeyboardHandler,H=u("./config").nls,B=u("./clipboard"),O=u("./lib/keys"),u=(I.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},I.prototype.startOperation=function(v){if(this.curOp){if(!v||this.curOp.command)return;this.prevOp=this.curOp}v||(this.previousCommand=null,v={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:v.command||{},args:v.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},I.prototype.endOperation=function(v){if(this.curOp&&this.session){if(v&&v.returnValue===!1||!this.session)return this.curOp=null;if((v!=1||!this.curOp.command||this.curOp.command.name!="mouse")&&(this._signal("beforeEndOperation"),this.curOp)){var v=this.curOp.command,_=v&&v.scrollIntoView;if(_){switch(_){case"center-animate":_="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var W=this.selection.getRange(),F=this.renderer.layerConfig;(W.start.row>=F.lastRow||W.end.row<=F.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}_=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}v=this.selection.toJSON(),this.curOp.selectionAfter=v,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(v),this.prevOp=this.curOp,this.curOp=null}}},I.prototype.$historyTracker=function(v){var _,W,F,J;this.$mergeUndoDeltas&&(_=this.prevOp,W=this.$mergeableCommands,F=_.command&&v.command.name==_.command.name,v.command.name=="insertstring"?(J=v.args,this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),F=F&&this.mergeNextCommand&&(!/\s/.test(J)||/\s/.test(_.args)),this.mergeNextCommand=!0):F=F&&W.indexOf(v.command.name)!==-1,(F=this.$mergeUndoDeltas!="always"&&2e3<Date.now()-this.sequenceStartTime?!1:F)?this.session.mergeUndoDeltas=!0:W.indexOf(v.command.name)!==-1&&(this.sequenceStartTime=Date.now()))},I.prototype.setKeyboardHandler=function(v,_){var W;v&&typeof v=="string"&&v!="ace"?(this.$keybindingId=v,W=this,p.loadModule(["keybinding",v],function(F){W.$keybindingId==v&&W.keyBinding.setKeyboardHandler(F&&F.handler),_&&_()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(v),_&&_())},I.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},I.prototype.setSession=function(v){var _,W;this.session!=v&&(this.curOp&&this.endOperation(),this.curOp={},(_=this.session)&&(this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),(W=this.session.getSelection()).off("changeCursor",this.$onCursorChange),W.off("changeSelection",this.$onSelectionChange)),(this.session=v)?(this.$onDocumentChange=this.onDocumentChange.bind(this),v.on("change",this.$onDocumentChange),this.renderer.setSession(v),this.$onChangeMode=this.onChangeMode.bind(this),v.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),v.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),v.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),v.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),v.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),v.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=v.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(v)),this._signal("changeSession",{session:v,oldSession:_}),this.curOp=null,_&&_._signal("changeEditor",{oldEditor:this}),v&&v._signal("changeEditor",{editor:this}),v)&&!v.destroyed&&v.bgTokenizer.scheduleStart()},I.prototype.getSession=function(){return this.session},I.prototype.setValue=function(v,_){return this.session.doc.setValue(v),_?_==1?this.navigateFileEnd():_==-1&&this.navigateFileStart():this.selectAll(),v},I.prototype.getValue=function(){return this.session.getValue()},I.prototype.getSelection=function(){return this.selection},I.prototype.resize=function(v){this.renderer.onResize(v)},I.prototype.setTheme=function(v,_){this.renderer.setTheme(v,_)},I.prototype.getTheme=function(){return this.renderer.getTheme()},I.prototype.setStyle=function(v){this.renderer.setStyle(v)},I.prototype.unsetStyle=function(v){this.renderer.unsetStyle(v)},I.prototype.getFontSize=function(){return this.getOption("fontSize")||h.computedStyle(this.container).fontSize},I.prototype.setFontSize=function(v){this.setOption("fontSize",v)},I.prototype.$highlightBrackets=function(){var v;this.$highlightPending||((v=this).$highlightPending=!0,setTimeout(function(){v.$highlightPending=!1;var _,W,F,J,Q=v.session;Q&&!Q.destroyed&&(Q.$bracketHighlight&&(Q.$bracketHighlight.markerIds.forEach(function(X){Q.removeMarker(X)}),Q.$bracketHighlight=null),_=v.getCursorPosition(),W=(W=v.getKeyboardHandler())&&W.$getDirectionForHighlight&&W.$getDirectionForHighlight(v),(W=Q.getMatchingBracketRanges(_,W))||(F=new w(Q,_.row,_.column).getCurrentToken())&&/\b(?:tag-open|tag-name)/.test(F.type)&&(F=Q.getMatchingTags(_))&&(W=[F.openTagName,F.closeTagName]),(W=!W&&Q.$mode.getMatching?Q.$mode.getMatching(v.session):W)&&(J="ace_bracket",Array.isArray(W)?W.length==1&&(J="ace_error_bracket"):W=[W],W.length==2&&(i.comparePoints(W[0].end,W[1].start)==0?W=[i.fromPoints(W[0].start,W[1].end)]:i.comparePoints(W[0].start,W[1].end)==0&&(W=[i.fromPoints(W[1].start,W[0].end)])),Q.$bracketHighlight={ranges:W,markerIds:W.map(function(X){return Q.addMarker(X,J,"text")})}),v.getHighlightIndentGuides())&&v.renderer.$textLayer.$highlightIndentGuide()},50))},I.prototype.focus=function(){this.textInput.focus()},I.prototype.isFocused=function(){return this.textInput.isFocused()},I.prototype.blur=function(){this.textInput.blur()},I.prototype.onFocus=function(v){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",v))},I.prototype.onBlur=function(v){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",v))},I.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},I.prototype.onDocumentChange=function(v){var _=this.session.$useWrapMode,W=v.start.row==v.end.row?v.end.row:1/0;this.renderer.updateLines(v.start.row,W,_),this._signal("change",v),this.$cursorChange()},I.prototype.onTokenizerUpdate=function(v){v=v.data,this.renderer.updateLines(v.first,v.last)},I.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},I.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},I.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},I.prototype.$updateHighlightActiveLine=function(){var v,_,W=this.getSession();this.$highlightActiveLine&&(this.$selectionStyle=="line"&&this.selection.isMultiLine()||(v=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(v=!1),!this.renderer.$maxLines||this.session.getLength()!==1||1<this.renderer.$minLines||(v=!1)),W.$highlightLineMarker&&!v?(W.removeMarker(W.$highlightLineMarker.id),W.$highlightLineMarker=null):!W.$highlightLineMarker&&v?((_=new i(v.row,v.column,v.row,1/0)).id=W.addMarker(_,"ace_active-line","screenLine"),W.$highlightLineMarker=_):v&&(W.$highlightLineMarker.start.row=v.row,W.$highlightLineMarker.end.row=v.row,W.$highlightLineMarker.start.column=v.column,W._signal("changeBackMarker"))},I.prototype.onSelectionChange=function(v){var _,W,F=this.session,F=(F.$selectionMarker&&F.removeMarker(F.$selectionMarker),F.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(_=this.selection.getRange(),W=this.getSelectionStyle(),F.$selectionMarker=F.addMarker(_,"ace_selection",W)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(F),this._signal("changeSelection")},I.prototype.$getSelectionHighLightRegexp=function(){var v=this.session,_=this.getSelectionRange();if(!_.isEmpty()&&!_.isMultiLine()){var W=_.start.column,F=_.end.column,v=v.getLine(_.start.row),_=v.substring(W,F);if(!(5e3<_.length)&&/[\w\d]/.test(_)&&(_=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),v=v.substring(W-1,F+1),_.test(v)))return _}},I.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},I.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},I.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},I.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},I.prototype.onChangeMode=function(v){this.renderer.updateText(),this._emit("changeMode",v)},I.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},I.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},I.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},I.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},I.prototype.getCopyText=function(){var v=this.getSelectedText(),_=this.session.doc.getNewLineCharacter(),W=!1;if(!v&&this.$copyWithEmptySelection)for(var W=!0,F=this.selection.getAllRanges(),J=0;J<F.length;J++){var Q=F[J];J&&F[J-1].start.row==Q.start.row||(v+=this.session.getLine(Q.start.row)+_)}var X={text:v};return this._signal("copy",X),B.lineMode=!!W&&X.text,X.text},I.prototype.onCopy=function(){this.commands.exec("copy",this)},I.prototype.onCut=function(){this.commands.exec("cut",this)},I.prototype.onPaste=function(v,_){this.commands.exec("paste",this,{text:v,event:_})},I.prototype.$handlePaste=function(W){this._signal("paste",W=typeof W=="string"?{text:W}:W);var _=W.text,W=_===B.lineMode,F=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)W?F.insert({row:this.selection.lead.row,column:0},_):this.insert(_);else if(W)this.selection.rangeList.ranges.forEach(function(E){F.insert({row:E.start.row,column:0},_)});else{var J=_.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,W=!(J.length!=2||J[0]&&J[1]);if(J.length!=Q.length||W)return this.commands.exec("insertstring",this,_);for(var X=Q.length;X--;){var te=Q[X];te.isEmpty()||F.remove(te),F.insert(te.start,J[X])}}},I.prototype.execCommand=function(v,_){return this.commands.exec(v,this,_)},I.prototype.insert=function(v,te){var W,F=this.session,J=F.getMode(),Q=this.getCursorPosition(),X=(this.getBehavioursEnabled()&&!te&&(W=J.transformAction(F.getState(Q.row),"insertion",this,F,v))&&(v===W.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),v=W.text),v==" "&&(v=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&v.indexOf(`
`)==-1&&((X=new i.fromPoints(Q,Q)).end.column+=v.length,this.session.remove(X)):(X=this.getSelectionRange(),Q=this.session.remove(X),this.clearSelection()),v!=`
`&&v!=`\r
`||(E=F.getLine(Q.row),Q.column>E.search(/\S|$/)&&(te=E.substr(Q.column).search(/\S|$/),F.doc.removeInLine(Q.row,Q.column,Q.column+te))),this.clearSelection(),Q.column),te=F.getState(Q.row),E=F.getLine(Q.row),G=J.checkOutdent(te,E,v);F.insert(Q,v),W&&W.selection&&(W.selection.length==2?this.selection.setSelectionRange(new i(Q.row,X+W.selection[0],Q.row,X+W.selection[1])):this.selection.setSelectionRange(new i(Q.row+W.selection[0],W.selection[1],Q.row+W.selection[2],W.selection[3]))),this.$enableAutoIndent&&(F.getDocument().isNewLine(v)&&(X=J.getNextLineIndent(te,E.slice(0,Q.column),F.getTabString()),F.insert({row:Q.row+1,column:0},X)),G)&&J.autoOutdent(te,F,Q.row)},I.prototype.autoIndent=function(){for(var v,_,W,F,J,Q=this.session,X=Q.getMode(),te=(W=this.selection.isEmpty()?(_=0,Q.doc.getLength()-1):(_=(v=this.getSelectionRange()).start.row,v.end.row),""),E="",G=Q.getTabString(),V=_;V<=W;V++)0<V&&(te=Q.getState(V-1),F=Q.getLine(V-1),E=X.getNextLineIndent(te,F,G)),F=Q.getLine(V),E!==(J=X.$getIndent(F))&&(0<J.length&&(J=new i(V,0,V,J.length),Q.remove(J)),0<E.length)&&Q.insert({row:V,column:0},E),X.autoOutdent(te,Q,V)},I.prototype.onTextInput=function(v,_){if(!_)return this.keyBinding.onTextInput(v);this.startOperation({command:{name:"insertstring"}}),v=this.applyComposition.bind(this,v,_),this.selection.rangeCount?this.forEachSelection(v):v(),this.endOperation()},I.prototype.applyComposition=function(v,_){var W;(_.extendLeft||_.extendRight)&&((W=this.selection.getRange()).start.column-=_.extendLeft,W.end.column+=_.extendRight,W.start.column<0&&(W.start.row--,W.start.column+=this.session.getLine(W.start.row).length+1),this.selection.setRange(W),v||W.isEmpty()||this.remove()),!v&&this.selection.isEmpty()||this.insert(v,!0),(_.restoreStart||_.restoreEnd)&&((W=this.selection.getRange()).start.column-=_.restoreStart,W.end.column-=_.restoreEnd,this.selection.setRange(W))},I.prototype.onCommandKey=function(v,_,W){return this.keyBinding.onCommandKey(v,_,W)},I.prototype.setOverwrite=function(v){this.session.setOverwrite(v)},I.prototype.getOverwrite=function(){return this.session.getOverwrite()},I.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},I.prototype.setScrollSpeed=function(v){this.setOption("scrollSpeed",v)},I.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},I.prototype.setDragDelay=function(v){this.setOption("dragDelay",v)},I.prototype.getDragDelay=function(){return this.getOption("dragDelay")},I.prototype.setSelectionStyle=function(v){this.setOption("selectionStyle",v)},I.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},I.prototype.setHighlightActiveLine=function(v){this.setOption("highlightActiveLine",v)},I.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},I.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.setHighlightSelectedWord=function(v){this.setOption("highlightSelectedWord",v)},I.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},I.prototype.setAnimatedScroll=function(v){this.renderer.setAnimatedScroll(v)},I.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},I.prototype.setShowInvisibles=function(v){this.renderer.setShowInvisibles(v)},I.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},I.prototype.setDisplayIndentGuides=function(v){this.renderer.setDisplayIndentGuides(v)},I.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},I.prototype.setHighlightIndentGuides=function(v){this.renderer.setHighlightIndentGuides(v)},I.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},I.prototype.setShowPrintMargin=function(v){this.renderer.setShowPrintMargin(v)},I.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},I.prototype.setPrintMarginColumn=function(v){this.renderer.setPrintMarginColumn(v)},I.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},I.prototype.setReadOnly=function(v){this.setOption("readOnly",v)},I.prototype.getReadOnly=function(){return this.getOption("readOnly")},I.prototype.setBehavioursEnabled=function(v){this.setOption("behavioursEnabled",v)},I.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},I.prototype.setWrapBehavioursEnabled=function(v){this.setOption("wrapBehavioursEnabled",v)},I.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},I.prototype.setShowFoldWidgets=function(v){this.setOption("showFoldWidgets",v)},I.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},I.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.remove=function(J){this.selection.isEmpty()&&(J=="left"?this.selection.selectLeft():this.selection.selectRight());var _,W,F,J=this.getSelectionRange();this.getBehavioursEnabled()&&(W=(_=this.session).getState(J.start.row),W=_.getMode().transformAction(W,"deletion",this,_,J),J.end.column===0&&(F=_.getTextRange(J))[F.length-1]==`
`&&(F=_.getLine(J.end.row),/^\s+$/.test(F))&&(J.end.column=F.length),W)&&(J=W),this.session.remove(J),this.clearSelection()},I.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},I.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},I.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},I.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var v=this.getSelectionRange();v.start.column==v.end.column&&v.start.row==v.end.row&&(v.end.column=0,v.end.row++),this.session.remove(v),this.clearSelection()},I.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var v=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(v)},I.prototype.setGhostText=function(v,_){this.session.widgetManager||(this.session.widgetManager=new x(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(v,_)},I.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},I.prototype.transposeLetters=function(){var v,_,W,F;this.selection.isEmpty()&&(_=(v=this.getCursorPosition()).column)!==0&&(F=_<(F=this.session.getLine(v.row)).length?(W=F.charAt(_)+F.charAt(_-1),new i(v.row,_-1,v.row,_+1)):(W=F.charAt(_-1)+F.charAt(_-2),new i(v.row,_-2,v.row,_)),this.session.replace(F,W),this.session.selection.moveToPosition(F.end))},I.prototype.toLowerCase=function(){var v=this.getSelectionRange(),_=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),W=this.session.getTextRange(_);this.session.replace(_,W.toLowerCase()),this.selection.setSelectionRange(v)},I.prototype.toUpperCase=function(){var v=this.getSelectionRange(),_=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),W=this.session.getTextRange(_);this.session.replace(_,W.toUpperCase()),this.selection.setSelectionRange(v)},I.prototype.indent=function(){var v=this.session,_=this.getSelectionRange();if(!(_.start.row<_.end.row)){if(_.start.column<_.end.column){var W,Q=v.getTextRange(_);if(!/^\s+$/.test(Q))return W=this.$getSelectedRows(),void v.indentRows(W.first,W.last," ")}var F=v.getLine(_.start.row),Q=_.start,J=v.getTabSize(),Q=v.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var X=J-Q%J,te=a.stringRepeat(" ",X);else{for(X=Q%J;F[_.start.column-1]==" "&&X;)_.start.column--,X--;this.selection.setSelectionRange(_),te=" "}return this.insert(te)}W=this.$getSelectedRows(),v.indentRows(W.first,W.last," ")},I.prototype.blockIndent=function(){var v=this.$getSelectedRows();this.session.indentRows(v.first,v.last," ")},I.prototype.blockOutdent=function(){var v=this.session.getSelection();this.session.outdentRows(v.getRange())},I.prototype.sortLines=function(){for(var v=this.$getSelectedRows(),_=this.session,W=[],F=v.first;F<=v.last;F++)W.push(_.getLine(F));W.sort(function(X,te){return X.toLowerCase()<te.toLowerCase()?-1:X.toLowerCase()>te.toLowerCase()?1:0});for(var J=new i(0,0,0,0),F=v.first;F<=v.last;F++){var Q=_.getLine(F);J.start.row=F,J.end.row=F,J.end.column=Q.length,_.replace(J,W[F-v.first])}},I.prototype.toggleCommentLines=function(){var v=this.session.getState(this.getCursorPosition().row),_=this.$getSelectedRows();this.session.getMode().toggleCommentLines(v,this.session,_.first,_.last)},I.prototype.toggleBlockComment=function(){var v=this.getCursorPosition(),_=this.session.getState(v.row),W=this.getSelectionRange();this.session.getMode().toggleBlockComment(_,this.session,W,v)},I.prototype.getNumberAt=function(v,_){for(var W=/[\-]?[0-9]+(?:\.[0-9]+)?/g,F=(W.lastIndex=0,this.session.getLine(v));W.lastIndex<_;){var J=W.exec(F);if(J.index<=_&&J.index+J[0].length>=_)return{value:J[0],start:J.index,end:J.index+J[0].length}}return null},I.prototype.modifyNumber=function(v){var _,W,F,J=this.selection.getCursor().row,Q=this.selection.getCursor().column,X=new i(J,Q-1,J,Q),X=this.session.getTextRange(X);!isNaN(parseFloat(X))&&isFinite(X)?(X=this.getNumberAt(J,Q))&&(F=0<=X.value.indexOf(".")?X.start+X.value.indexOf(".")+1:X.end,_=X.start+X.value.length-F,W=parseFloat(X.value),W*=Math.pow(10,_),F!==X.end&&Q<F?v*=Math.pow(10,X.end-Q-1):v*=Math.pow(10,X.end-Q),F=(W=(W+=v)/Math.pow(10,_)).toFixed(_),v=new i(J,X.start,J,X.end),this.session.replace(v,F),this.moveCursorTo(J,Math.max(X.start+1,Q+F.length-X.value.length))):this.toggleWord()},I.prototype.toggleWord=function(){for(var v,_=this.selection.getCursor().row,W=this.selection.getCursor().column,F=(this.selection.selectWord(),this.getSelectedText()),J=this.selection.getWordRange().start.column,Q=F.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),X=W-J-1,te=(X<0&&(X=0),0),E=this,G=(F.match(/[A-Za-z0-9_]+/)&&Q.forEach(function(Y,re){v=te+Y.length,te<=X&&X<=v&&(F=Y,E.selection.clearSelection(),E.moveCursorTo(_,te+J),E.selection.selectTo(_,v+J)),te=v}),this.$toggleWordPairs),V=0;V<G.length;V++)for(var b=G[V],k=0;k<=1;k++){var R=+!k,D=F.match(new RegExp("^\\s?_?("+a.escapeRegExp(b[k])+")\\s?$","i"));D&&F.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(D[1])+")($|\\s)","g"))&&(D=F.replace(new RegExp(a.escapeRegExp(b[k]),"i"),function(Y){var re=b[R];return Y.toUpperCase()==Y?re=re.toUpperCase():Y.charAt(0).toUpperCase()==Y.charAt(0)&&(re=re.substr(0,0)+b[R].charAt(0).toUpperCase()+re.substr(1)),re}),this.insert(D))}},I.prototype.findLinkAt=function(Q,_){var W,F,J,Q=this.session.getLine(Q).split(/((?:https?|ftp):\/\/[\S]+)/),X=_,te=(X<0&&(X=0),0);try{for(var E=y(Q),G=E.next();!G.done;G=E.next()){var V=G.value,b=te+V.length;if(te<=X&&X<=b&&V.match(/((?:https?|ftp):\/\/[\S]+)/)){J=V.replace(/[\s:.,'";}\]]+$/,"");break}te=b}}catch(k){W={error:k}}finally{try{G&&!G.done&&(F=E.return)&&F.call(E)}finally{if(W)throw W.error}}return J},I.prototype.openLink=function(){var v=this.selection.getCursor(),v=this.findLinkAt(v.row,v.column);return v&&window.open(v,"_blank"),v!=null},I.prototype.removeLines=function(){var v=this.$getSelectedRows();this.session.removeFullLines(v.first,v.last),this.clearSelection()},I.prototype.duplicateSelection=function(){var v,_=this.selection,W=this.session,F=_.getRange(),J=_.isBackwards();F.isEmpty()?(v=F.start.row,W.duplicateLines(v,v)):(v=J?F.start:F.end,W=W.insert(v,W.getTextRange(F),!1),F.start=v,F.end=W,_.setSelectionRange(F,J))},I.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},I.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},I.prototype.moveText=function(v,_,W){return this.session.moveText(v,_,W)},I.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},I.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},I.prototype.$moveLines=function(v,_){var W=this.selection;if(!W.inMultiSelectMode||this.inVirtualSelectionMode){var F=W.toOrientedRange(),J=this.$getSelectedRows(F),Q=this.session.$moveLines(J.first,J.last,_?0:v);F.moveBy(Q=_&&v==-1?0:Q,0),W.fromOrientedRange(F)}else{for(var X=W.rangeList.ranges,te=(W.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),E=0,G=X.length,V=0;V<G;V++){for(var b=V,k=(X[V].moveBy(te,0),(J=this.$getSelectedRows(X[V])).first),R=J.last;++V<G;){E&&X[V].moveBy(E,0);var D=this.$getSelectedRows(X[V]);if(_&&D.first!=R||!_&&D.first>R+1)break;R=D.last}for(V--,te=this.session.$moveLines(k,R,_?0:v),_&&v==-1&&(b=V+1);b<=V;)X[b].moveBy(te,0),b++;E+=te=_?te:0}W.fromOrientedRange(W.ranges[0]),W.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},I.prototype.$getSelectedRows=function(v){return v=(v||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(v.start.row),last:this.session.getRowFoldEnd(v.end.row)}},I.prototype.onCompositionStart=function(v){this.renderer.showComposition(v)},I.prototype.onCompositionUpdate=function(v){this.renderer.setCompositionText(v)},I.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},I.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},I.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},I.prototype.isRowVisible=function(v){return v>=this.getFirstVisibleRow()&&v<=this.getLastVisibleRow()},I.prototype.isRowFullyVisible=function(v){return v>=this.renderer.getFirstFullyVisibleRow()&&v<=this.renderer.getLastFullyVisibleRow()},I.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},I.prototype.$moveByPage=function(Q,_){var W=this.renderer,F=this.renderer.layerConfig,J=Q*Math.floor(F.height/F.lineHeight),Q=(_===!0?this.selection.$moveSelection(function(){this.moveCursorBy(J,0)}):_===!1&&(this.selection.moveCursorBy(J,0),this.selection.clearSelection()),W.scrollTop);W.scrollBy(0,J*F.lineHeight),_!=null&&W.scrollCursorIntoView(null,.5),W.animateScrolling(Q)},I.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},I.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},I.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},I.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},I.prototype.scrollPageDown=function(){this.$moveByPage(1)},I.prototype.scrollPageUp=function(){this.$moveByPage(-1)},I.prototype.scrollToRow=function(v){this.renderer.scrollToRow(v)},I.prototype.scrollToLine=function(v,_,W,F){this.renderer.scrollToLine(v,_,W,F)},I.prototype.centerSelection=function(){var v=this.getSelectionRange(),v={row:Math.floor(v.start.row+(v.end.row-v.start.row)/2),column:Math.floor(v.start.column+(v.end.column-v.start.column)/2)};this.renderer.alignCursor(v,.5)},I.prototype.getCursorPosition=function(){return this.selection.getCursor()},I.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},I.prototype.getSelectionRange=function(){return this.selection.getRange()},I.prototype.selectAll=function(){this.selection.selectAll()},I.prototype.clearSelection=function(){this.selection.clearSelection()},I.prototype.moveCursorTo=function(v,_){this.selection.moveCursorTo(v,_)},I.prototype.moveCursorToPosition=function(v){this.selection.moveCursorToPosition(v)},I.prototype.jumpToMatching=function(v,_){var W=this.getCursorPosition(),F=new w(this.session,W.row,W.column),J=F.getCurrentToken(),Q=0,X=(J=J&&J.type.indexOf("tag-name")!==-1?F.stepBackward():J)||F.stepForward();if(X){var te,E,G=!1,V={},b=W.column-X.start,k={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do if(X.value.match(/[{}()\[\]]/g)){for(;b<X.value.length&&!G;b++)if(k[X.value[b]])switch(E=k[X.value[b]]+"."+X.type.replace("rparen","lparen"),isNaN(V[E])&&(V[E]=0),X.value[b]){case"(":case"[":case"{":V[E]++;break;case")":case"]":case"}":V[E]--,V[E]===-1&&(te="bracket",G=!0)}}else X.type.indexOf("tag-name")!==-1&&(isNaN(V[X.value])&&(V[X.value]=0),J.value==="<"&&1<Q?V[X.value]++:J.value==="</"&&V[X.value]--,V[X.value]===-1)&&(te="tag",G=!0);while(G||(J=X,Q++,X=F.stepForward(),b=0),X&&!G);if(te){if(te==="bracket")!(D=this.session.getBracketRange(W))&&(Y=(D=new i(F.getCurrentTokenRow(),F.getCurrentTokenColumn()+b-1,F.getCurrentTokenRow(),F.getCurrentTokenColumn()+b-1)).start,_||Y.row===W.row&&Math.abs(Y.column-W.column)<2)&&(D=this.session.getBracketRange(Y));else if(te==="tag"){if(!X||X.type.indexOf("tag-name")===-1)return;var R,D,Y=(Y=(D=new i(F.getCurrentTokenRow(),F.getCurrentTokenColumn()-2,F.getCurrentTokenRow(),F.getCurrentTokenColumn()-2)).compare(W.row,W.column)===0&&(R=this.session.getMatchingTags(W))?R.openTag.contains(W.row,W.column)?(D=R.closeTag).start:(D=R.openTag,R.closeTag.start.row===W.row&&R.closeTag.start.column===W.column?D.end:D.start):Y)||D.start}(Y=D&&D.cursor||Y)&&(v?D&&_?this.selection.setRange(D):D&&D.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Y.row,Y.column):this.selection.moveTo(Y.row,Y.column))}}},I.prototype.gotoLine=function(v,_,W){this.selection.clearSelection(),this.session.unfold({row:v-1,column:_||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(v-1,_||0),this.isRowFullyVisible(v-1)||this.scrollToLine(v-1,!0,W)},I.prototype.navigateTo=function(v,_){this.selection.moveTo(v,_)},I.prototype.navigateUp=function(v){var _;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return _=this.selection.anchor.getPosition(),this.moveCursorToPosition(_);this.selection.clearSelection(),this.selection.moveCursorBy(-v||-1,0)},I.prototype.navigateDown=function(v){var _;if(this.selection.isMultiLine()&&this.selection.isBackwards())return _=this.selection.anchor.getPosition(),this.moveCursorToPosition(_);this.selection.clearSelection(),this.selection.moveCursorBy(v||1,0)},I.prototype.navigateLeft=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorLeft();else{var _=this.getSelectionRange().start;this.moveCursorToPosition(_)}this.clearSelection()},I.prototype.navigateRight=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorRight();else{var _=this.getSelectionRange().end;this.moveCursorToPosition(_)}this.clearSelection()},I.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},I.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},I.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},I.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},I.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},I.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},I.prototype.replace=function(v,W){W&&this.$search.set(W);var W=this.$search.find(this.session),F=0;return W&&(this.$tryReplace(W,v)&&(F=1),this.selection.setSelectionRange(W),this.renderer.scrollSelectionIntoView(W.start,W.end)),F},I.prototype.replaceAll=function(v,_){_&&this.$search.set(_);var W=this.$search.findAll(this.session),F=0;if(W.length){_=this.getSelectionRange(),this.selection.moveTo(0,0);for(var J=W.length-1;0<=J;--J)this.$tryReplace(W[J],v)&&F++;this.selection.setSelectionRange(_)}return F},I.prototype.$tryReplace=function(v,_){var W=this.session.getTextRange(v);return(_=this.$search.replace(W,_))!==null?(v.end=this.session.replace(v,_),v):null},I.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},I.prototype.find=function(J,_,W){_=_||{},typeof J=="string"||J instanceof RegExp?_.needle=J:typeof J=="object"&&f.mixin(_,J);var F=this.selection.getRange(),J=(_.needle==null&&((J=this.session.getTextRange(F)||this.$search.$options.needle)||(F=this.session.getWordRange(F.start.row,F.start.column),J=this.session.getTextRange(F)),this.$search.set({needle:J})),this.$search.set(_),_.start||this.$search.set({start:F}),this.$search.find(this.session));return _.preventScroll?J:J?(this.revealRange(J,W),J):(_.backwards?F.start=F.end:F.end=F.start,void this.selection.setRange(F))},I.prototype.findNext=function(v,_){this.find({skipCurrent:!0,backwards:!1},v,_)},I.prototype.findPrevious=function(v,_){this.find(v,{skipCurrent:!0,backwards:!0},_)},I.prototype.revealRange=function(v,_){this.session.unfold(v),this.selection.setSelectionRange(v);var W=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(v.start,v.end,.5),_!==!1&&this.renderer.animateScrolling(W)},I.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},I.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},I.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(v){v.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},I.prototype.setAutoScrollEditorIntoView=function(v){var _,W,F,J,Q,X,te;v&&(F=!1,(W=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(J=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(J,this.container.firstChild),Q=this.on("changeSelection",function(){F=!0}),X=this.renderer.on("beforeRender",function(){F&&(_=W.renderer.container.getBoundingClientRect())}),te=this.renderer.on("afterRender",function(){var E,G,V;F&&_&&(W.isFocused()||W.searchBox&&W.searchBox.isFocused())&&(E=(G=W.renderer).$cursorLayer.$pixelPos,G=G.layerConfig,V=E.top-G.offset,(F=0<=E.top&&V+_.top<0||!(E.top<G.height&&E.top+_.top+G.lineHeight>window.innerHeight)&&null)!=null&&(J.style.top=V+"px",J.style.left=E.left+"px",J.style.height=G.lineHeight+"px",J.scrollIntoView(F)),F=_=null)}),this.setAutoScrollEditorIntoView=function(E){E||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",te),this.renderer.off("beforeRender",X))})},I.prototype.$resetCursorStyle=function(){var v=this.$cursorStyle||"ace",_=this.renderer.$cursorLayer;_&&(_.setSmoothBlinking(/smooth/.test(v)),_.isBlinking=!this.$readOnly&&v!="wide",h.setCssClass(_.element,"ace_slim-cursors",/slim/.test(v)))},I.prototype.prompt=function(v,_,W){var F=this;p.loadModule("ace/ext/prompt",function(J){J.prompt(F,v,_,W)})},I);function I(v,_,W){this.$toDestroy=[];var F=v.getContainerElement();this.container=F,this.renderer=v,this.id="editor"+ ++I.$uid,this.commands=new d(c.isMac?"mac":"win",C),typeof document=="object"&&(this.textInput=new t(v.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new r(this),new e(this)),this.keyBinding=new n(this),this.$search=new o().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(J,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(_||W&&W.session||new s("")),p.resetOptions(this),W&&this.setOptions(W),p._signal("editor",this)}u.$uid=0,u.prototype.curOp=null,u.prototype.prevOp={},u.prototype.$mergeableCommands=["backspace","del","insertstring"],u.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],f.implement(u.prototype,l),p.defineOptions(u.prototype,"editor",{selectionStyle:{set:function(v){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:v})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(v){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(v){this.textInput.setReadOnly(v),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(v){this.textInput.setCopyWithEmptySelection(v)},initialValue:!1},cursorStyle:{set:function(v){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(v){this.setAutoScrollEditorIntoView(v)}},keyboardHandler:{set:function(v){this.setKeyboardHandler(v)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(v){this.session.setValue(v)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(v){this.setSession(v)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(v){this.renderer.$gutterLayer.setShowLineNumbers(v),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),v&&this.$relativeLineNumbers?L.attach(this):L.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(v){this.$showLineNumbers&&v?L.attach(this):L.detach(this)}},placeholder:{set:function(v){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var _=this.session&&(this.renderer.$composition||this.getValue());_&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),h.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):_||this.renderer.placeholderNode?!_&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),h.addCssClass(this.container,"ace_hasPlaceholder"),(_=h.createElement("div")).className="ace_placeholder",_.textContent=this.$placeholder||"",this.renderer.placeholderNode=_,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(v){function _(J){J.target==this.renderer.scroller&&J.keyCode===O.enter&&(J.preventDefault(),J=this.getCursorPosition().row,this.isRowVisible(J)||this.scrollToLine(J,!0,!0),this.focus())}var W,F={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(J){J.blur(),J.renderer.scroller.focus()},readOnly:!0};v?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",H("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",H("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",_.bind(this)),this.commands.addCommand(F),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",H("editor")),this.renderer.$gutter.setAttribute("aria-label",H("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),(W=W||new $(this)).addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",_.bind(this)),this.commands.removeCommand(F),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),W&&W.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var L={getText:function(v,_){return(Math.abs(v.selection.lead.row-_)||_+1+(_<9?"\xB7":""))+""},getWidth:function(v,_,W){return Math.max(_.toString().length,(W.lastRow+1).toString().length,2)*W.characterWidth},update:function(v,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function(v){v.renderer.$gutterLayer.$renderer=this,v.on("changeSelection",this.update),this.update(null,v)},detach:function(v){v.renderer.$gutterLayer.$renderer==this&&(v.renderer.$gutterLayer.$renderer=null),v.off("changeSelection",this.update),this.update(null,v)}};m.Editor=u}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(A,m,T){f.prototype.addSession=function(i){this.$session=i},f.prototype.add=function(i,l,d){this.$fromUndo||i!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),l!==!1&&this.lastDeltas||(this.lastDeltas=[],(l=this.$undoStack.length)>this.$undoDepth-1&&this.$undoStack.splice(0,l-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),i.id=this.$rev=++this.$maxRev),i.action!="remove"&&i.action!="insert"||(this.$lastDelta=i),this.lastDeltas.push(i))},f.prototype.addSelection=function(i,l){this.selections.push({value:i,rev:l||this.$rev})},f.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},f.prototype.markIgnored=function(i,l){l==null&&(l=this.$rev+1);for(var d=this.$undoStack,C=d.length;C--;){var p=d[C][0];if(p.id<=i)break;p.id<l&&(p.ignore=!0)}this.lastDeltas=null},f.prototype.getSelection=function(i,l){for(var d=this.selections,C=d.length;C--;){var p=d[C];if(p.rev<i)return p=l?d[C+1]:p}},f.prototype.getRevision=function(){return this.$rev},f.prototype.getDeltas=function(i,l){l==null&&(l=this.$rev+1);for(var d=this.$undoStack,C=null,p=0,w=d.length;w--;){var x=d[w][0];if(x.id<l&&!C&&(C=w+1),x.id<=i){p=w+1;break}}return d.slice(p,C)},f.prototype.getChangedRanges=function(i,l){l==null&&this.$rev},f.prototype.getChangedLines=function(i,l){l==null&&this.$rev},f.prototype.undo=function(i,l){this.lastDeltas=null;var d,C=this.$undoStack;if(function(p,w){for(var x=w;x--;){var $=p[x];if($&&!$[0].ignore){for(;x<w-1;){var H=function(B,O){for(var u=B.length;u--;)for(var I=0;I<O.length;I++)if(!e(B[u],O[I])){for(;u<B.length;){for(;I--;)e(O[I],B[u]);I=O.length,u++}return[B,O]}return B.selectionBefore=O.selectionBefore=B.selectionAfter=O.selectionAfter=null,[O,B]}(p[x],p[x+1]);p[x]=H[0],p[x+1]=H[1],x++}return 1}}}(C,C.length))return i=i||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,d=null,(C=C.pop())&&(d=i.undoChanges(C,l),this.$redoStack.push(C),this.$syncRev()),this.$fromUndo=!1,d},f.prototype.redo=function(i,l){if(this.lastDeltas=null,i=i||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),d=this.$redoStack,C=L,p=0;p<C.length;p++)for(var w=C[p],x=0;x<w.length;x++){$=void 0,H=void 0,B=void 0,O=void 0,u=void 0,I=void 0;var $=d,H=w[x];H=function(W){return{start:c(W.start),end:c(W.end),action:W.action,lines:W.lines.slice()}}(H);for(var B=$.length;B--;){for(var O=$[B],u=0;u<O.length;u++){var I=function(W,F){var J,Q,X=W.action=="insert",te=F.action=="insert";if(X&&te)a(W.start,F.start)<0?n(F,W,1):n(W,F,1);else if(X&&!te)0<=a(W.start,F.end)?n(W,F,-1):(a(W.start,F.start)<=0||n(W,h.fromPoints(F.start,W.start),-1),n(F,W,1));else if(!X&&te)0<=a(F.start,W.end)?n(F,W,-1):(a(F.start,W.start)<=0||n(F,h.fromPoints(W.start,F.start),-1),n(W,F,1));else if(!X&&!te)if(0<=a(F.start,W.end))n(F,W,-1);else{if(!(a(F.end,W.start)<=0))return a(W.start,F.start)<0&&(W=o(J=W,F.start)),0<a(W.end,F.end)&&(Q=o(W,F.end)),s(F.end,W.start,W.end,-1),Q&&!J&&(W.lines=Q.lines,W.start=Q.start,W.end=Q.end,Q=W),[F,J,Q].filter(Boolean);n(W,F,-1)}return[F,W]}(O[u],H);H=I[0],I.length!=2&&(I[2]?(O.splice(u+1,1,I[1],I[2]),u++):I[1]||(O.splice(u,1),u--))}O.length||$.splice(B,1)}}this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(_){_[0].id=++this.$maxRev},this)}var L=this.$redoStack.pop(),v=null;return L&&(v=i.redoChanges(L,l),this.$undoStack.push(L),this.$syncRev()),this.$fromUndo=!1,v},f.prototype.$syncRev=function(){var i=this.$undoStack,i=i[i.length-1],i=i&&i[0].id||0;this.$redoStackBaseRev=i,this.$rev=i},f.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},f.prototype.canUndo=function(){return 0<this.$undoStack.length},f.prototype.canRedo=function(){return 0<this.$redoStack.length},f.prototype.bookmark=function(i){i==null&&(i=this.$rev),this.mark=i},f.prototype.isAtBookmark=function(){return this.$rev===this.mark},f.prototype.toJSON=function(){},f.prototype.fromJSON=function(){},f.prototype.$prettyPrint=function(i){return i?t(i):t(this.$undoStack)+`
---
`+t(this.$redoStack)};var y=f;function f(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}y.prototype.hasUndo=y.prototype.canUndo,y.prototype.hasRedo=y.prototype.canRedo,y.prototype.isClean=y.prototype.isAtBookmark,y.prototype.markClean=y.prototype.bookmark;var h=A("./range").Range,a=h.comparePoints;h.comparePoints;function c(i){return{row:i.row,column:i.column}}function t(i){var l;return i=i||this,Array.isArray(i)?i.map(t).join(`
`):(l="",i.action?(l=i.action=="insert"?"+":"-",l+="["+i.lines+"]"):i.value&&(l=Array.isArray(i.value)?i.value.map(r).join(`
`):r(i.value)),i.start&&(l+=r(i)),(i.id||i.rev)&&(l+=" ("+(i.id||i.rev)+")"),l)}function r(i){return i.start.row+":"+i.start.column+"=>"+i.end.row+":"+i.end.column}function e(i,l){var d=i.action=="insert",C=l.action=="insert";if(d&&C)if(0<=a(l.start,i.end))n(l,i,-1);else{if(!(a(l.start,i.start)<=0))return;n(i,l,1)}else if(d&&!C)if(0<=a(l.start,i.end))n(l,i,-1);else{if(!(a(l.end,i.start)<=0))return;n(i,l,-1)}else if(!d&&C)if(0<=a(l.start,i.start))n(l,i,1);else{if(!(a(l.start,i.start)<=0))return;n(i,l,1)}else if(!d&&!C)if(0<=a(l.start,i.start))n(l,i,1);else{if(!(a(l.end,i.start)<=0))return;n(i,l,-1)}return 1}function n(i,l,d){s(i.start,l.start,l.end,d),s(i.end,l.start,l.end,d)}function s(i,l,d,C){i.row==(C==1?l:d).row&&(i.column+=C*(d.column-l.column)),i.row+=C*(d.row-l.row)}function o(i,l){var d=i.lines,C=i.end,w=(i.end=c(l),i.end.row-i.start.row),p=d.splice(w,d.length),w=w?l.column:l.column-i.start.column;return d.push(p[0].substring(0,w)),p[0]=p[0].substr(w),{start:c(l),end:C,lines:p,action:i.action}}m.UndoManager=y}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(A,m,T){var y=A("../lib/dom");function f(h,a){this.element=h,this.canvasHeight=a||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}f.prototype.moveContainer=function(h){y.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},f.prototype.pageChanged=function(h,a){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)},f.prototype.computeLineTop=function(h,a,c){var t=a.firstRowScreen*a.lineHeight,t=Math.floor(t/this.canvasHeight);return c.documentToScreenRow(h,0)*a.lineHeight-t*this.canvasHeight},f.prototype.computeLineHeight=function(h,a,c){return a.lineHeight*c.getRowLineCount(h)},f.prototype.getLength=function(){return this.cells.length},f.prototype.get=function(h){return this.cells[h]},f.prototype.shift=function(){this.$cacheCell(this.cells.shift())},f.prototype.pop=function(){this.$cacheCell(this.cells.pop())},f.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var a=y.createFragment(this.element),c=0;c<h.length;c++)a.appendChild(h[c].element);this.element.appendChild(a)}else this.cells.push(h),this.element.appendChild(h.element)},f.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var a=y.createFragment(this.element),c=0;c<h.length;c++)a.appendChild(h[c].element);this.element.firstChild?this.element.insertBefore(a,this.element.firstChild):this.element.appendChild(a)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},f.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},f.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},f.prototype.createCell=function(h,a,c,t){var r,e=this.cellCache.pop();return e||(r=y.createElement("div"),t&&t(r),this.element.appendChild(r),e={element:r,text:"",row:h}),e.row=h,e},m.Lines=f}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(r,m,T){var y=r("../lib/dom"),f=r("../lib/oop"),h=r("../lib/lang"),a=r("../lib/event_emitter").EventEmitter,c=r("./lines").Lines,t=r("../config").nls,r=(e.prototype.setSession=function(s){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=s)&&s.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(s,o){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(s,o)},e.prototype.removeGutterDecoration=function(s,o){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(s,o)},e.prototype.setAnnotations=function(s){this.$annotations=[];for(var o=0;o<s.length;o++){var i=s[o],C=i.row,l=(l=this.$annotations[C])||(this.$annotations[C]={text:[],type:[]}),C=i.text,d=i.type,C=C?h.escapeHTML(C):i.html||"",C=(l.text.indexOf(C)===-1&&(l.text.push(C),l.type.push(d)),i.className);C?l.className=C:d=="error"?l.className=" ace_error":d=="warning"&&l.className!=" ace_error"?l.className=" ace_warning":d!="info"||l.className||(l.className=" ace_info")}},e.prototype.$updateAnnotations=function(s){var o,i;this.$annotations.length&&(o=s.start.row,(i=s.end.row-o)!=0)&&(s.action=="remove"?this.$annotations.splice(o,1+i,null):((s=new Array(1+i)).unshift(o,1),this.$annotations.splice.apply(this.$annotations,s)))},e.prototype.update=function(s){this.config=s;for(var o=this.session,i=s.firstRow,l=Math.min(s.lastRow+s.gutterOffset,o.getLength()-1),d=(this.oldLastRow=l,this.config=s,this.$lines.moveContainer(s),this.$updateCursorRow(),o.getNextFoldLine(i)),C=d?d.start.row:1/0,p=null,w=-1,x=i;;){if(C<x&&(x=d.end.row+1,C=(d=o.getNextFoldLine(x,d))?d.start.row:1/0),l<x){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}(p=this.$lines.get(++w))?p.row=x:(p=this.$lines.createCell(x,s,this.session,n),this.$lines.push(p)),this.$renderCell(p,s,d,x),x++}this._signal("afterRender"),this.$updateGutterWidth(s)},e.prototype.$updateGutterWidth=function(s){var o=this.session,d=o.gutterRenderer||this.$renderer,l=o.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"",l=((this.$fixedWidth||o.$useWrapMode)&&(i=o.getLength()+l-1),d?d.getWidth(o,i,s):i.toString().length*s.characterWidth),d=this.$padding||this.$computePadding();(l+=d.left+d.right)===this.gutterWidth||isNaN(l)||(this.gutterWidth=l,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",l))},e.prototype.$updateCursorRow=function(){var s;this.$highlightGutterLine&&(s=this.session.selection.getCursor(),this.$cursorRow!==s.row)&&(this.$cursorRow=s.row)},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!this.$cursorCell||this.$cursorCell.row!=s){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var o=this.$lines.cells;this.$cursorCell=null;for(var i=0;i<o.length;i++){var l=o[i];if(l.row>=this.$cursorRow){if(l.row>this.$cursorRow){var d=this.session.getFoldLine(this.$cursorRow);if(!(0<i&&d&&d.start.row==o[i-1].row))break;l=o[i-1]}l.element.className="ace_gutter-active-line "+l.element.className,this.$cursorCell=l;break}}}}},e.prototype.scrollLines=function(s){var o=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(o,s))return this.update(s);this.$lines.moveContainer(s);var i=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),l=this.oldLastRow;if(this.oldLastRow=i,!o||l<s.firstRow)return this.update(s);if(i<o.firstRow)return this.update(s);if(o.firstRow<s.firstRow)for(var d=this.session.getFoldedRowCount(o.firstRow,s.firstRow-1);0<d;d--)this.$lines.shift();if(i<l)for(d=this.session.getFoldedRowCount(i+1,l);0<d;d--)this.$lines.pop();s.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLines(s,s.firstRow,o.firstRow-1)),l<i&&this.$lines.push(this.$renderLines(s,l+1,i)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},e.prototype.$renderLines=function(s,o,i){for(var l=[],d=o,C=this.session.getNextFoldLine(d),p=C?C.start.row:1/0;p<d&&(d=C.end.row+1,p=(C=this.session.getNextFoldLine(d,C))?C.start.row:1/0),!(i<d);){var w=this.$lines.createCell(d,s,this.session,n);this.$renderCell(w,s,C,d),l.push(w),d++}return l},e.prototype.$renderCell=function(s,o,i,l){var d,C=s.element,p=this.session,w=C.childNodes[0],x=C.childNodes[1],$=C.childNodes[2],H=$.firstChild,B=p.$firstLineNumber,O=p.$breakpoints,u=p.$decorations,F=p.gutterRenderer||this.$renderer,I=this.$showFoldWidgets&&p.foldWidgets,L=i?i.start.row:Number.MAX_VALUE,v=o.lineHeight+"px",_=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",W=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",F=(F?F.getText(p,l):l+B).toString();if(this.$highlightGutterLine&&(l==this.$cursorRow||i&&l<this.$cursorRow&&L<=l&&this.$cursorRow<=i.end.row)&&(_+="ace_gutter-active-line ",this.$cursorCell!=s)&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s),O[l]&&(_+=O[l]),u[l]&&(_+=u[l]),this.$annotations[l]&&l!==L&&(_+=this.$annotations[l].className),C.className!=_&&(C.className=_),d=I&&(d=I[l])==null?I[l]=p.getFoldWidget(l):d){if(_="ace_fold-widget ace_"+d,d=="start"&&l==L&&l<i.end.row){_+=" ace_closed";for(var J,Q=!1,X=l+1;X<=i.end.row;X++)if(this.$annotations[X]){if(this.$annotations[X].className===" ace_error"){Q=!0,J=" ace_error_fold";break}this.$annotations[X].className===" ace_warning"&&(Q=!0,J=" ace_warning_fold")}C.className+=J}else _+=" ace_open";x.className!=_&&(x.className=_),y.setStyle(x.style,"height",v),y.setStyle(x.style,"display","inline-block"),x.setAttribute("role","button"),x.setAttribute("tabindex","-1"),(i=p.getFoldLine(F-1))?(x.setAttribute("aria-label",t("Unfold rows $0 to $1",[F,i.end.row+1])),x.setAttribute("title",t("Unfold code"))):(x.setAttribute("aria-label",t("Fold at row $0",[F])),x.setAttribute("title",t("Fold code")))}else x&&(y.setStyle(x.style,"display","none"),x.setAttribute("tabindex","0"),x.removeAttribute("role"),x.removeAttribute("aria-label"));return Q&&this.$showFoldedAnnotations?($.className="ace_gutter_annotation",H.className=W,H.className+=J,y.setStyle(H.style,"height",v),y.setStyle($.style,"display","block"),y.setStyle($.style,"height",v),$.setAttribute("aria-label",t("Read annotations row $0",[F])),$.setAttribute("tabindex","-1")):this.$annotations[l]?($.className="ace_gutter_annotation",H.className=W,this.$useSvgGutterIcons?H.className+=this.$annotations[l].className:C.classList.add(this.$annotations[l].className.replace(" ","")),y.setStyle(H.style,"height",v),y.setStyle($.style,"display","block"),y.setStyle($.style,"height",v),$.setAttribute("aria-label",t("Read annotations row $0",[F])),$.setAttribute("tabindex","-1")):(y.setStyle($.style,"display","none"),$.removeAttribute("aria-label"),$.setAttribute("tabindex","0")),F!==w.data&&(w.data=F),y.setStyle(s.element.style,"height",this.$lines.computeLineHeight(l,o,p)+"px"),y.setStyle(s.element.style,"top",this.$lines.computeLineTop(l,o,p)+"px"),s.text=F,$.style.display==="none"&&x.style.display==="none"?s.element.setAttribute("aria-hidden",!0):s.element.setAttribute("aria-hidden",!1),s},e.prototype.setHighlightGutterLine=function(s){this.$highlightGutterLine=s},e.prototype.setShowLineNumbers=function(s){this.$renderer=!s&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(s){s?y.addCssClass(this.element,"ace_folding-enabled"):y.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=s,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$computePadding=function(){var s;return this.element.firstChild?(s=y.computedStyle(this.element.firstChild),this.$padding={},this.$padding.left=(parseInt(s.borderLeftWidth)||0)+(parseInt(s.paddingLeft)||0)+1,this.$padding.right=(parseInt(s.borderRightWidth)||0)+(parseInt(s.paddingRight)||0),this.$padding):{left:0,right:0}},e.prototype.getRegion=function(s){var o=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return s.x<o.left+i.left?"markers":this.$showFoldWidgets&&s.x>i.right-o.right?"foldWidgets":void 0},e);function e(s){this.element=y.createElement("div"),this.element.className="ace_layer ace_gutter-layer",s.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}function n(s){var o=document.createTextNode(""),o=(s.appendChild(o),y.createElement("span")),o=(s.appendChild(o),y.createElement("span")),i=(s.appendChild(o),y.createElement("span"));return o.appendChild(i),s}r.prototype.$fixedWidth=!1,r.prototype.$highlightGutterLine=!0,r.prototype.$renderer="",r.prototype.$showLineNumbers=!0,r.prototype.$showFoldWidgets=!0,f.implement(r.prototype,a),m.Gutter=r}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(h,m,T){var y=h("../range").Range,f=h("../lib/dom"),h=(a.prototype.setPadding=function(c){this.$padding=c},a.prototype.setSession=function(c){this.session=c},a.prototype.setMarkers=function(c){this.markers=c},a.prototype.elt=function(c,t){var r=this.i!=-1&&this.element.childNodes[this.i];r?this.i++:(r=document.createElement("div"),this.element.appendChild(r),this.i=-1),r.style.cssText=t,r.className=c},a.prototype.update=function(c){if(c){var t,r;for(r in this.config=c,this.i=0,this.markers){var e,n,s,o=this.markers[r];o.range?(s=o.range.clipRows(c.firstRow,c.lastRow)).isEmpty()||(s=s.toScreenRange(this.session),o.renderer?(e=this.$getTop(s.start.row,c),n=this.$padding+s.start.column*c.characterWidth,o.renderer(t,s,n,e,c)):o.type=="fullLine"?this.drawFullLineMarker(t,s,o.clazz,c):o.type=="screenLine"?this.drawScreenLineMarker(t,s,o.clazz,c):s.isMultiLine()?o.type=="text"?this.drawTextMarker(t,s,o.clazz,c):this.drawMultiLineMarker(t,s,o.clazz,c):this.drawSingleLineMarker(t,s,o.clazz+" ace_start ace_br15",c)):o.update(t,this,this.session,c)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},a.prototype.$getTop=function(c,t){return(c-t.firstRowScreen)*t.lineHeight},a.prototype.drawTextMarker=function(c,t,r,e,n){for(var s,o=this.session,i=t.start.row,l=t.end.row,d=i,C=0,p=o.getScreenLastRowColumn(d),w=new y(d,t.start.column,d,C);d<=l;d++)w.start.row=w.end.row=d,w.start.column=d==i?t.start.column:o.getRowWrapIndent(d),w.end.column=p,s=C,C=p,p=d+1<l?o.getScreenLastRowColumn(d+1):d==l?0:t.end.column,this.drawSingleLineMarker(c,w,r+(d==i?" ace_start":"")+" ace_br"+((d==i||d==i+1&&t.start.column?1:0)|(s<C?2:0)|(p<C?4:0)|(d==l?8:0)),e,d==l?0:1,n)},a.prototype.drawMultiLineMarker=function(c,t,r,e,n){var s,o=this.$padding,i=e.lineHeight,l=this.$getTop(t.start.row,e),d=o+t.start.column*e.characterWidth;n=n||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((s=t.clone()).end.row=s.start.row,s.end.column=this.session.getLine(s.start.row).length,this.drawBidiSingleLineMarker(c,s,r+" ace_br1 ace_start",e,null,n)):this.elt(r+" ace_br1 ace_start","height:"+i+"px;right:0;top:"+l+"px;left:"+d+"px;"+(n||"")),this.session.$bidiHandler.isBidiRow(t.end.row)?((s=t.clone()).start.row=s.end.row,s.start.column=0,this.drawBidiSingleLineMarker(c,s,r+" ace_br12",e,null,n)):(l=this.$getTop(t.end.row,e),d=t.end.column*e.characterWidth,this.elt(r+" ace_br12","height:"+i+"px;width:"+d+"px;top:"+l+"px;left:"+o+"px;"+(n||""))),(i=(t.end.row-t.start.row-1)*e.lineHeight)<=0||(l=this.$getTop(t.start.row+1,e),c=(t.start.column?1:0)|(t.end.column?0:8),this.elt(r+(c?" ace_br"+c:""),"height:"+i+"px;right:0;top:"+l+"px;left:"+o+"px;"+(n||"")))},a.prototype.drawSingleLineMarker=function(o,d,r,e,i,s){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(o,d,r,e,i,s);var o=e.lineHeight,i=(d.end.column+(i||0)-d.start.column)*e.characterWidth,l=this.$getTop(d.start.row,e),d=this.$padding+d.start.column*e.characterWidth;this.elt(r,"height:"+o+"px;width:"+i+"px;top:"+l+"px;left:"+d+"px;"+(s||""))},a.prototype.drawBidiSingleLineMarker=function(c,t,r,e,n,s){var o=e.lineHeight,i=this.$getTop(t.start.row,e),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(d){this.elt(r,"height:"+o+"px;width:"+(d.width+(n||0))+"px;top:"+i+"px;left:"+(l+d.left)+"px;"+(s||""))},this)},a.prototype.drawFullLineMarker=function(c,t,r,e,n){var s=this.$getTop(t.start.row,e),o=e.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,e)-s),this.elt(r,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(n||""))},a.prototype.drawScreenLineMarker=function(c,t,r,e,n){t=this.$getTop(t.start.row,e),e=e.lineHeight,this.elt(r,"height:"+e+"px;top:"+t+"px;left:0;right:0;"+(n||""))},a);function a(c){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}h.prototype.$padding=0,m.Marker=h}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(c,m,T){var y=c("../lib/oop"),f=c("../lib/dom"),h=c("../lib/lang"),a=c("./lines").Lines,c=c("../lib/event_emitter").EventEmitter,t=(r.prototype.$updateEolChar=function(){var e=this.session.doc,e=e.getNewLineCharacter()==`
`&&e.getNewLineMode()!="windows"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},r.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},r.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},r.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},r.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(n){this._signal("changeCharacterSize",n)}.bind(this)),this.$pollSizeChanges()},r.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},r.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},r.prototype.setSession=function(e){(this.session=e)&&this.$computeTabString()},r.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(typeof(this.showInvisibles=e)=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},r.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},r.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e)},r.prototype.$computeTabString=function(){for(var e,n,s,o,i,l,d=this.session.getTabSize(),C=(this.tabSize=d,this.$tabStrings=[0]),p=1;p<d+1;p++)this.showTabs?((l=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",l.textContent=h.stringRepeat(this.TAB_CHAR,p),C.push(l)):C.push(this.dom.createTextNode(h.stringRepeat(" ",p),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,e="ace_indent-guide",n=this.showSpaces?" ace_invisible ace_invisible_space":"",s=this.showSpaces?h.stringRepeat(this.SPACE_CHAR,this.tabSize):h.stringRepeat(" ",this.tabSize),o=this.showTabs?" ace_invisible ace_invisible_tab":"",i=this.showTabs?h.stringRepeat(this.TAB_CHAR,this.tabSize):s,(l=this.dom.createElement("span")).className=e+n,l.textContent=s,this.$tabStrings[" "]=l,(l=this.dom.createElement("span")).className=e+o,l.textContent=i,this.$tabStrings[" "]=l)},r.prototype.updateLines=function(e,n,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var o=Math.max(n,e.firstRow),i=Math.min(s,e.lastRow),l=this.element.childNodes,d=0,C=e.firstRow;C<o;C++){if(p=this.session.getFoldLine(C)){if(p.containsRow(o)){o=p.start.row;break}C=p.end.row}d++}for(var p,w=!1,C=o,x=(p=this.session.getNextFoldLine(C))?p.start.row:1/0;x<C&&(C=p.end.row+1,x=(p=this.session.getNextFoldLine(C,p))?p.start.row:1/0),!(i<C);){var $,H=l[d++];H&&(this.dom.removeChildren(H),this.$renderLine(H,C,C==x&&p),w&&(H.style.top=this.$lines.computeLineTop(C,e,this.session)+"px"),$=e.lineHeight*this.session.getRowLength(C)+"px",H.style.height!=$)&&(w=!0,H.style.height=$),C++}if(w)for(;d<this.$lines.cells.length;){var B=this.$lines.cells[d++];B.element.style.top=this.$lines.computeLineTop(B.row,e,this.session)+"px"}},r.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,o=n?n.lastRow:-1;if(!n||o<e.firstRow)return this.update(e);if(s<n.firstRow)return this.update(e);if(!n||n.lastRow<e.firstRow)return this.update(e);if(e.lastRow<n.firstRow)return this.update(e);if(n.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(n.firstRow,e.firstRow-1);0<i;i--)this.$lines.shift();if(n.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);0<i;i--)this.$lines.pop();e.firstRow<n.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,n.firstRow-1)),e.lastRow>n.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},r.prototype.$renderLinesFragment=function(e,n,s){for(var o=[],i=n,l=this.session.getNextFoldLine(i),d=l?l.start.row:1/0;d<i&&(i=l.end.row+1,d=(l=this.session.getNextFoldLine(i,l))?l.start.row:1/0),!(s<i);){var C=this.$lines.createCell(i,e,this.session),p=C.element;this.dom.removeChildren(p),f.setStyle(p.style,"height",this.$lines.computeLineHeight(i,e,this.session)+"px"),f.setStyle(p.style,"top",this.$lines.computeLineTop(i,e,this.session)+"px"),this.$renderLine(p,i,i==d&&l),this.$useLineGroups()?p.className="ace_line_group":p.className="ace_line",o.push(C),i++}return o},r.prototype.update=function(e){this.$lines.moveContainer(e);for(var n=(this.config=e).firstRow,s=e.lastRow,o=this.$lines;o.getLength();)o.pop();o.push(this.$renderLinesFragment(e,n,s))},r.prototype.$renderToken=function(e,n,s,o){for(var i,l,d=this,C=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,p=this.dom.createFragment(this.element),w=0;i=C.exec(o);){var x,$,H=i[1],B=i[2],O=i[3],u=i[4],I=i[5];!d.showSpaces&&B||(x=w!=i.index?o.slice(w,i.index):"",w=i.index+i[0].length,x&&p.appendChild(this.dom.createTextNode(x,this.element)),H?(x=d.session.getScreenTabSize(n+i.index),p.appendChild(d.$tabStrings[x].cloneNode(!0)),n+=x-1):B?d.showSpaces?(($=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",$.textContent=h.stringRepeat(d.SPACE_CHAR,B.length),p.appendChild($)):p.appendChild(this.com.createTextNode(B,this.element)):O?(($=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",$.textContent=h.stringRepeat(d.SPACE_CHAR,O.length),p.appendChild($)):u?(n+=1,($=this.dom.createElement("span")).style.width=2*d.config.characterWidth+"px",$.className=d.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",$.textContent=d.showSpaces?d.SPACE_CHAR:u,p.appendChild($)):I&&(n+=1,($=this.dom.createElement("span")).style.width=2*d.config.characterWidth+"px",$.className="ace_cjk",$.textContent=I,p.appendChild($)))}return p.appendChild(this.dom.createTextNode(w?o.slice(w):o,this.element)),this.$textToken[s.type]?e.appendChild(p):(l="ace_"+s.type.replace(/\./g," ace_"),$=this.dom.createElement("span"),s.type=="fold"&&($.style.width=s.value.length*this.config.characterWidth+"px",$.setAttribute("title","Unfold code")),$.className=l,$.appendChild(p),e.appendChild($)),n+o.length},r.prototype.renderIndentGuide=function(e,n,s){var o=n.search(this.$indentGuideRe);if(!(o<=0||s<=o)){if(n[0]==" "){for(var i=(o-=o%this.tabSize)/this.tabSize,l=0;l<i;l++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(o)}if(n[0]==" "){for(l=0;l<o;l++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),n.substr(o)}this.$highlightIndentGuide()}return n},r.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var n=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(n.row))[0].length,o=Math.floor(s/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:o,start:n.row},this.session.$bracketHighlight){for(var i=this.session.$bracketHighlight.ranges,l=0;l<i.length;l++)if(n.row!==i[l].start.row){this.$highlightIndentGuideMarker.end=i[l].start.row,n.row>i[l].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[n.row]!==""&&n.column===e[n.row].length)for(this.$highlightIndentGuideMarker.dir=1,l=n.row+1;l<e.length;l++){var d=e[l],C=/^\s*/.exec(d)[0].length;if(d!==""&&(this.$highlightIndentGuideMarker.end=l,C<=s))break}this.$renderHighlightIndentGuide()}}},r.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,n=0;n<e.length;n++){var s=e[n].element.childNodes;if(0<s.length){for(var o=0;o<s.length;o++)if(s[o].classList&&s[o].classList.contains("ace_indent-guide-active")){s[o].classList.remove("ace_indent-guide-active");break}}}},r.prototype.$setIndentGuideActive=function(e,n){this.session.doc.getLine(e.row)!==""&&(e=e.element.childNodes)&&(e=e[n-1])&&e.classList&&e.classList.contains("ace_indent-guide")&&e.classList.add("ace_indent-guide-active")},r.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells,n=(this.$clearActiveIndentGuide(),this.$highlightIndentGuideMarker.indentLevel);if(n!==0){if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var o=e[s];if(this.$highlightIndentGuideMarker.end&&o.row>=this.$highlightIndentGuideMarker.start+1){if(o.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,n)}}else for(s=e.length-1;0<=s;s--)if(o=e[s],this.$highlightIndentGuideMarker.end&&o.row<this.$highlightIndentGuideMarker.start){if(o.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(o,n)}}}},r.prototype.$createLineElement=function(e){var n=this.dom.createElement("div");return n.className="ace_line",n.style.height=this.config.lineHeight+"px",n},r.prototype.$renderWrappedLine=function(e,n,s){var o=0,i=0,l=s[0],d=0,C=this.$createLineElement();e.appendChild(C);for(var p=0;p<n.length;p++){var w=n[p],x=w.value;if(p==0&&this.displayIndentGuides){if(o=x.length,!(x=this.renderIndentGuide(C,x,l)))continue;o-=x.length}if(o+x.length<l)d=this.$renderToken(C,d,w,x),o+=x.length;else{for(;o+x.length>=l;)d=this.$renderToken(C,d,w,x.substring(0,l-o)),x=x.substring(l-o),o=l,C=this.$createLineElement(),e.appendChild(C),C.appendChild(this.dom.createTextNode(h.stringRepeat("\xA0",s.indent),this.element)),d=0,l=s[++i]||Number.MAX_VALUE;x.length!=0&&(o+=x.length,d=this.$renderToken(C,d,w,x))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,d,null,"",!0)},r.prototype.$renderSimpleLine=function(e,n){for(var s=0,o=0;o<n.length;o++){var i=n[o],l=i.value;if(o!=0||!this.displayIndentGuides||(l=this.renderIndentGuide(e,l))){if(s+l.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,i,l);s=this.$renderToken(e,s,i,l)}}},r.prototype.$renderOverflowMessage=function(e,n,s,o,i){s&&this.$renderToken(e,n,s,o.slice(0,this.MAX_LINE_LENGTH-n)),s=this.dom.createElement("span"),s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=i?"<hide>":"<click to see more...>",e.appendChild(s)},r.prototype.$renderLine=function(e,n,s){var o,i,l=e;(o=(s=s||s==0?s:this.session.getFoldLine(n))?this.$getFoldLineTokens(n,s):this.session.getTokens(n)).length?(i=this.session.getRowSplitData(n))&&i.length?(this.$renderWrappedLine(e,o,i),l=e.lastChild):(l=e,this.$useLineGroups()&&(l=this.$createLineElement(),e.appendChild(l)),this.$renderSimpleLine(l,o)):this.$useLineGroups()&&(l=this.$createLineElement(),e.appendChild(l)),this.showEOL&&l&&(s&&(n=s.end.row),(i=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",i.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,l.appendChild(i))},r.prototype.$getFoldLineTokens=function(e,n){var s=this.session,o=[],i=s.getTokens(e);return n.walk(function(l,d,C,p,w){if(l!=null)o.push({type:"fold",value:l});else if((i=w?s.getTokens(d):i).length){for(var x,$=i,H=p,B=C,O=0,u=0;u+$[O].value.length<H;)if(u+=$[O].value.length,++O==$.length)return;for(u!=H&&((x=$[O].value.substring(H-u)).length>B-H&&(x=x.substring(0,B-H)),o.push({type:$[O].type,value:x}),u=H+x.length,O+=1);u<B&&O<$.length;)(x=$[O].value).length+u>B?o.push({type:$[O].type,value:x.substring(0,B-u)}):o.push($[O]),u+=x.length,O+=1}},n.end.row,this.session.getLine(n.end.row).length),o},r.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},r);function r(e){this.dom=f,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}t.prototype.$textToken={text:!0,rparen:!0,lparen:!0},t.prototype.EOF_CHAR="\xB6",t.prototype.EOL_CHAR_LF="\xAC",t.prototype.EOL_CHAR_CRLF="\xA4",t.prototype.EOL_CHAR=t.prototype.EOL_CHAR_LF,t.prototype.TAB_CHAR="\u2014",t.prototype.SPACE_CHAR="\xB7",t.prototype.$padding=0,t.prototype.MAX_LINE_LENGTH=1e4,t.prototype.showInvisibles=!1,t.prototype.showSpaces=!1,t.prototype.showTabs=!1,t.prototype.showEOL=!1,t.prototype.displayIndentGuides=!0,t.prototype.$highlightIndentGuides=!0,t.prototype.$tabStrings=[],t.prototype.destroy={},t.prototype.onChangeTabSize=t.prototype.$computeTabString,y.implement(t.prototype,c),m.Text=t}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(f,m,T){var y=f("../lib/dom"),f=(h.prototype.$updateOpacity=function(a){for(var c=this.cursors,t=c.length;t--;)y.setStyle(c[t].style,"opacity",a?"":"0")},h.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&y.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},h.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,y.removeCssClass(this.element,"ace_animate-blinking")},h.prototype.setPadding=function(a){this.$padding=a},h.prototype.setSession=function(a){this.session=a},h.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},h.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},h.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,y.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},h.prototype.addCursor=function(){var a=y.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},h.prototype.removeCursor=function(){var a;if(1<this.cursors.length)return(a=this.cursors.pop()).parentNode.removeChild(a),a},h.prototype.hideCursor=function(){this.isVisible=!1,y.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},h.prototype.showCursor=function(){this.isVisible=!0,y.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},h.prototype.restartTimer=function(){var a,c=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,y.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&y.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),y.HAS_CSS_ANIMATION?this.$startCssAnimation():(a=function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){c(!0),a()},this.blinkInterval),a())):this.$stopCssAnimation()},h.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a=a||this.session.selection.getCursor();var t=this.session.documentToScreenPosition(a);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,a.row)?this.session.$bidiHandler.getPosLeft(t.column):t.column*this.config.characterWidth),top:(t.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight}},h.prototype.isCursorInView=function(a,c){return 0<=a.top&&a.top<c.maxHeight},h.prototype.update=function(a){this.config=a;for(var c=this.session.$selectionMarkers,r=0,t=0,r=0,e=(c=c!==void 0&&c.length!==0?c:[{cursor:null}]).length;r<e;r++){var n,s,o=this.getPixelPosition(c[r].cursor,!0);(o.top>a.height+a.offset||o.top<0)&&1<r||(s=(n=this.cursors[t++]||this.addCursor()).style,this.drawCursor?this.drawCursor(n,o,a,c[r],this.session):this.isCursorInView(o,a)?(y.setStyle(s,"display","block"),y.translate(n,o.left,o.top),y.setStyle(s,"width",Math.round(a.characterWidth)+"px"),y.setStyle(s,"height",a.lineHeight+"px")):y.setStyle(s,"display","none"))}for(;this.cursors.length>t;)this.removeCursor();var i=this.session.getOverwrite();this.$setOverwrite(i),this.$pixelPos=o,this.restartTimer()},h.prototype.$setOverwrite=function(a){a!=this.overwrite&&((this.overwrite=a)?y.addCssClass(this.element,"ace_overwrite-cursors"):y.removeCssClass(this.element,"ace_overwrite-cursors"))},h.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},h);function h(a){this.element=y.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),y.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}f.prototype.$padding=0,f.prototype.drawCursor=null,m.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(o,m,T){var y,f=this&&this.__extends||(y=function(l,d){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(C,p){C.__proto__=p}:function(C,p){for(var w in p)Object.prototype.hasOwnProperty.call(p,w)&&(C[w]=p[w])}))(l,d)},function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function C(){this.constructor=l}y(l,d),l.prototype=d===null?Object.create(d):(C.prototype=d.prototype,new C)}),e=o("./lib/oop"),h=o("./lib/dom"),a=o("./lib/event"),o=o("./lib/event_emitter").EventEmitter,c=(t.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},t);function t(l,d){this.element=h.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+d,this.inner=h.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}e.implement(c.prototype,o),f(n,r=c),n.prototype.onScroll=function(){var l;this.skipEvent||(this.scrollTop=this.element.scrollTop,this.coeff!=1&&(l=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-l)/(this.coeff-l)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(l){this.element.style.height=l+"px"},n.prototype.setScrollHeight=function(l){32768<(this.scrollHeight=l)?(this.coeff=32768/l,l=32768):this.coeff!=1&&(this.coeff=1),this.inner.style.height=l+"px"},n.prototype.setScrollTop=function(l){this.scrollTop!=l&&(this.skipEvent=!0,this.scrollTop=l,this.element.scrollTop=l*this.coeff)};var r,e=n;function n(l,d){var C=r.call(this,l,"-v")||this;return C.scrollTop=0,C.scrollHeight=0,d.$scrollbarWidth=C.width=h.scrollbarWidth(l.ownerDocument),C.inner.style.width=C.element.style.width=(C.width||15)+5+"px",C.$minWidth=0,C}e.prototype.setInnerHeight=e.prototype.setScrollHeight,f(i,s=c),i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(l){this.element.style.width=l+"px"},i.prototype.setInnerWidth=function(l){this.inner.style.width=l+"px"},i.prototype.setScrollWidth=function(l){this.inner.style.width=l+"px"},i.prototype.setScrollLeft=function(l){this.scrollLeft!=l&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=l)};var s,o=i;function i(l,d){return l=s.call(this,l,"-h")||this,l.scrollLeft=0,l.height=d.$scrollbarWidth,l.inner.style.height=l.element.style.height=(l.height||15)+5+"px",l}m.ScrollBar=e,m.ScrollBarV=e,m.ScrollBarH=o,m.VScrollBar=e,m.HScrollBar=o}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(o,m,T){var y,f=this&&this.__extends||(y=function(l,d){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(C,p){C.__proto__=p}:function(C,p){for(var w in p)Object.prototype.hasOwnProperty.call(p,w)&&(C[w]=p[w])}))(l,d)},function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function C(){this.constructor=l}y(l,d),l.prototype=d===null?Object.create(d):(C.prototype=d.prototype,new C)}),e=o("./lib/oop"),h=o("./lib/dom"),a=o("./lib/event"),o=o("./lib/event_emitter").EventEmitter,c=(h.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
position: absolute;
background: rgba(128, 128, 128, 0.6);
-moz-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #bbb;
border-radius: 2px;
z-index: 8;
}
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
position: absolute;
z-index: 6;
background: none;
overflow: hidden!important;
}
.ace_editor>.ace_sb-v {
z-index: 6;
right: 0;
top: 0;
width: 12px;
}
.ace_editor>.ace_sb-v div {
z-index: 8;
right: 0;
width: 100%;
}
.ace_editor>.ace_sb-h {
bottom: 0;
left: 0;
height: 12px;
}
.ace_editor>.ace_sb-h div {
bottom: 0;
height: 100%;
}
.ace_editor>.ace_sb_grabbed {
z-index: 8;
background: #000;
}`,"ace_scrollbar.css",!1),t.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},t);function t(l,d){this.element=h.createElement("div"),this.element.className="ace_sb"+d,this.inner=h.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}e.implement(c.prototype,o),f(n,r=c),n.prototype.onMouseDown=function(l,d){var C,p,w,x,$;if(l==="mousedown"&&a.getButton(d)===0&&d.detail!==2)return d.target===this.inner?(C=this,p=d.clientY,w=d.clientY,x=this.thumbTop,a.capture(this.inner,function(H){p=H.clientY},function(){clearInterval($)}),$=setInterval(function(){var H;p!==void 0&&(H=C.scrollTopFromThumbTop(x+p-w))!==C.scrollTop&&C._emit("scroll",{data:H})},20)):(l=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2,this._emit("scroll",{data:this.scrollTopFromThumbTop(l)})),a.preventDefault(d)},n.prototype.getHeight=function(){return this.height},n.prototype.scrollTopFromThumbTop=function(l){return l=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight),(l>>=0)<0?l=0:l>this.pageHeight-this.viewHeight&&(l=this.pageHeight-this.viewHeight),l},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},n.prototype.setScrollHeight=function(l,d){(this.pageHeight!==l||d)&&(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight)&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop}))},n.prototype.setScrollTop=function(l){this.scrollTop=l,this.thumbTop=(l=l<0?0:l)*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"};var r,e=n;function n(l,d){var C=r.call(this,l,"-v")||this;return C.scrollTop=0,C.scrollHeight=0,C.parent=l,C.width=C.VScrollWidth,C.renderer=d,C.inner.style.width=C.element.style.width=(C.width||15)+"px",C.$minWidth=0,C}e.prototype.setInnerHeight=e.prototype.setScrollHeight,f(i,s=c),i.prototype.onMouseDown=function(l,d){var C,p,w,x,$;if(l==="mousedown"&&a.getButton(d)===0&&d.detail!==2)return d.target===this.inner?(C=this,p=d.clientX,w=d.clientX,x=this.thumbLeft,a.capture(this.inner,function(H){p=H.clientX},function(){clearInterval($)}),$=setInterval(function(){var H;p!==void 0&&(H=C.scrollLeftFromThumbLeft(x+p-w))!==C.scrollLeft&&C._emit("scroll",{data:H})},20)):(l=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2,this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)})),a.preventDefault(d)},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(l){return l=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth),(l>>=0)<0?l=0:l>this.pageWidth-this.viewWidth&&(l=this.pageWidth-this.viewWidth),l},i.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(l,d){(this.pageWidth!==l||d)&&(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth)&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft}))},i.prototype.setScrollLeft=function(l){this.scrollLeft=l,this.thumbLeft=(l=l<0?0:l)*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"};var s,o=i;function i(l,d){return l=s.call(this,l,"-h")||this,l.scrollLeft=0,l.scrollWidth=0,l.height=l.HScrollHeight,l.inner.style.height=l.element.style.height=(l.height||12)+"px",l.renderer=d,l}o.prototype.setInnerWidth=o.prototype.setScrollWidth,m.ScrollBar=e,m.ScrollBarV=e,m.ScrollBarH=o,m.VScrollBar=e,m.HScrollBar=o}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(A,m,T){var y=A("./lib/event");function f(h,a){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=a||window;var c=this;this._flush=function(t){c.pending=!1;var r=c.changes;r&&(y.blockIdle(100),c.changes=0,c.onRender(r)),c.changes?c.$recursionLimit--<0||c.schedule():c.$recursionLimit=2}}f.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(y.nextFrame(this._flush),this.pending=!0)},f.prototype.clear=function(h){var a=this.changes;return this.changes=0,a},m.RenderLoop=f}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,m,T){var y=t("../lib/oop"),f=t("../lib/dom"),h=t("../lib/lang"),a=t("../lib/event"),c=t("../lib/useragent"),t=t("../lib/event_emitter").EventEmitter,r=typeof ResizeObserver=="function",e=(n.prototype.$setMeasureNodeStyles=function(s,o){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",c.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=o?"hidden":"visible"},n.prototype.checkForSizeChanges=function(s){var o;!(s=s===void 0?this.$measureSizes():s)||this.$characterSize.width===s.width&&this.$characterSize.height===s.height||(this.$measureNode.style.fontWeight="bold",o=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=o&&o.width===s.width&&o.height===s.height,this._emit("changeCharacterSize",{data:s}))},n.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(o){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){var s;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(s=this).$pollSizeChangesTimer=a.onIdle(function o(){s.checkForSizeChanges(),a.onIdle(o,500)},500)},n.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(s){return s={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/512},s.width===0||s.height===0?null:s},n.prototype.$measureCharWidth=function(s){return this.$main.textContent=h.stringRepeat(s,512),this.$main.getBoundingClientRect().width/512},n.prototype.getCharacterWidth=function(s){var o=this.charSizes[s];return o=o===void 0?this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width:o},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(s){return s&&s.parentElement?(window.getComputedStyle(s).zoom||1)*this.$getZoom(s.parentElement):1},n.prototype.$initTransformMeasureNodes=function(){function s(o,i){return["div",{style:"position: absolute;top:"+o+"px;left:"+i+"px;"}]}this.els=f.buildDom([s(0,0),s(200,0),s(0,200),s(200,200)],this.el)},n.prototype.transformCoordinates=function(s,o){function i(O,u,I){var L=O[1]*u[0]-O[0]*u[1];return[(-u[1]*I[0]+u[0]*I[1])/L,(+O[1]*I[0]-O[0]*I[1])/L]}function l(O,u){return[O[0]-u[0],O[1]-u[1]]}function d(O,u){return[O[0]+u[0],O[1]+u[1]]}function C(O,u){return[O*u[0],O*u[1]]}function p(O){return O=O.getBoundingClientRect(),[O.left,O.top]}s=s&&C(1/this.$getZoom(this.el),s),this.els||this.$initTransformMeasureNodes();var w,x=p(this.els[0]),H=p(this.els[1]),B=p(this.els[2]),$=p(this.els[3]),$=i(l($,H),l($,B),l(d(H,B),d($,x))),H=C(1+$[0],l(H,x)),B=C(1+$[1],l(B,x));return o?(w=$[0]*o[0]/200+$[1]*o[1]/200+1,o=d(C(o[0],H),C(o[1],B)),d(C(1/w/200,o),x)):(w=l(s,x),o=i(l(H,C($[0],w)),l(B,C($[1],w)),w),C(200,o))},n);function n(s){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=h.stringRepeat("X",512),this.$characterSize={width:0,height:0},r?this.$addObserver():this.checkForSizeChanges()}e.prototype.$characterSize={width:0,height:0},y.implement(e.prototype,t),m.FontMetrics=e}),ace.define("ace/css/editor.css",["require","exports","module"],function(A,m,T){T.exports=`
.ace_br1 {border-top-left-radius : 3px;}
.ace_br2 {border-top-right-radius : 3px;}
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
.ace_br4 {border-bottom-right-radius: 3px;}
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
.ace_br8 {border-bottom-left-radius : 3px;}
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_editor {
position: relative;
overflow: hidden;
padding: 0;
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
direction: ltr;
text-align: left;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.ace_scroller {
position: absolute;
overflow: hidden;
top: 0;
bottom: 0;
background-color: inherit;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
cursor: text;
}
.ace_content {
position: absolute;
box-sizing: border-box;
min-width: 100%;
contain: style size layout;
font-variant-ligatures: no-common-ligatures;
}
.ace_keyboard-focus:focus {
box-shadow: inset 0 0 0 2px #5E9ED6;
outline: none;
}
.ace_dragging .ace_scroller:before{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
content: '';
background: rgba(250, 250, 250, 0.01);
z-index: 1000;
}
.ace_dragging.ace_dark .ace_scroller:before{
background: rgba(0, 0, 0, 0.01);
}
.ace_gutter {
position: absolute;
overflow : hidden;
width: auto;
top: 0;
bottom: 0;
left: 0;
cursor: default;
z-index: 4;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
contain: style size layout;
}
.ace_gutter-active-line {
position: absolute;
left: 0;
right: 0;
}
.ace_scroller.ace_scroll-left:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
pointer-events: none;
}
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
position: absolute;
top: 0;
left: 0;
right: 0;
padding-left: 19px;
padding-right: 6px;
background-repeat: no-repeat;
}
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
margin-left: -14px;
float: left;
}
.ace_gutter-cell .ace_gutter_annotation {
margin-left: -19px;
float: left;
}
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_gutter-cell.ace_info, .ace_icon.ace_info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
}
.ace_icon_svg.ace_error {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
background-color: crimson;
}
.ace_icon_svg.ace_warning {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
background-color: darkorange;
}
.ace_icon_svg.ace_info {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
background-color: royalblue;
}
.ace_icon_svg.ace_error_fold {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
background-color: crimson;
}
.ace_icon_svg.ace_warning_fold {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
background-color: darkorange;
}
.ace_scrollbar {
contain: strict;
position: absolute;
right: 0;
bottom: 0;
z-index: 6;
}
.ace_scrollbar-inner {
position: absolute;
cursor: text;
left: 0;
top: 0;
}
.ace_scrollbar-v{
overflow-x: hidden;
overflow-y: scroll;
top: 0;
}
.ace_scrollbar-h {
overflow-x: scroll;
overflow-y: hidden;
left: 0;
}
.ace_print-margin {
position: absolute;
height: 100%;
}
.ace_text-input {
position: absolute;
z-index: 0;
width: 0.5em;
height: 1em;
opacity: 0;
background: transparent;
-moz-appearance: none;
appearance: none;
border: none;
resize: none;
outline: none;
overflow: hidden;
font: inherit;
padding: 0 1px;
margin: 0 -1px;
contain: strict;
-ms-user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
user-select: text;
/*with \`pre-line\` chrome inserts &nbsp; instead of space*/
white-space: pre!important;
}
.ace_text-input.ace_composition {
background: transparent;
color: inherit;
z-index: 1000;
opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker {
border-bottom: 1px solid;
position: absolute;
border-radius: 0;
margin-top: 1px;
}
[ace_nocontext=true] {
transform: none!important;
filter: none!important;
clip-path: none!important;
mask : none!important;
contain: none!important;
perspective: none!important;
mix-blend-mode: initial!important;
z-index: auto;
}
.ace_layer {
z-index: 1;
position: absolute;
overflow: hidden;
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
word-wrap: normal;
white-space: pre;
height: 100%;
width: 100%;
box-sizing: border-box;
/* setting pointer-events: auto; on node under the mouse, which changes
during scroll, will break mouse wheel scrolling in Safari */
pointer-events: none;
}
.ace_gutter-layer {
position: relative;
width: auto;
text-align: right;
pointer-events: auto;
height: 1000000px;
contain: style size layout;
}
.ace_text-layer {
font: inherit !important;
position: absolute;
height: 1000000px;
width: 1000000px;
contain: style size layout;
}
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
contain: style size layout;
position: absolute;
top: 0;
left: 0;
right: 0;
}
.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line,
.ace_hidpi .ace_text-layer > .ace_line_group {
contain: strict;
}
.ace_cjk {
display: inline-block;
text-align: center;
}
.ace_cursor-layer {
z-index: 4;
}
.ace_cursor {
z-index: 4;
position: absolute;
box-sizing: border-box;
border-left: 2px solid;
/* workaround for smooth cursor repaintng whole screen in chrome */
transform: translatez(0);
}
.ace_multiselect .ace_cursor {
border-left-width: 1px;
}
.ace_slim-cursors .ace_cursor {
border-left-width: 1px;
}
.ace_overwrite-cursors .ace_cursor {
border-left-width: 0;
border-bottom: 1px solid;
}
.ace_hidden-cursors .ace_cursor {
opacity: 0.2;
}
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
opacity: 0;
}
.ace_smooth-blinking .ace_cursor {
transition: opacity 0.18s;
}
.ace_animate-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: step-end;
animation-name: blink-ace-animate;
animation-iteration-count: infinite;
}
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: ease-in-out;
animation-name: blink-ace-animate-smooth;
}
@keyframes blink-ace-animate {
from, to { opacity: 1; }
60% { opacity: 0; }
}
@keyframes blink-ace-animate-smooth {
from, to { opacity: 1; }
45% { opacity: 1; }
60% { opacity: 0; }
85% { opacity: 0; }
}
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
position: absolute;
z-index: 3;
}
.ace_marker-layer .ace_selection {
position: absolute;
z-index: 5;
}
.ace_marker-layer .ace_bracket {
position: absolute;
z-index: 6;
}
.ace_marker-layer .ace_error_bracket {
position: absolute;
border-bottom: 1px solid #DE5555;
border-radius: 0;
}
.ace_marker-layer .ace_active-line {
position: absolute;
z-index: 2;
}
.ace_marker-layer .ace_selected-word {
position: absolute;
z-index: 4;
box-sizing: border-box;
}
.ace_line .ace_fold {
box-sizing: border-box;
display: inline-block;
height: 11px;
margin-top: -2px;
vertical-align: middle;
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
background-repeat: no-repeat, repeat-x;
background-position: center center, top left;
color: transparent;
border: 1px solid black;
border-radius: 2px;
cursor: pointer;
pointer-events: auto;
}
.ace_dark .ace_fold {
}
.ace_fold:hover{
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}
.ace_tooltip {
background-color: #f5f5f5;
border: 1px solid gray;
border-radius: 1px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
color: black;
max-width: 100%;
padding: 3px 4px;
position: fixed;
z-index: 999999;
box-sizing: border-box;
cursor: default;
white-space: pre;
word-wrap: break-word;
line-height: normal;
font-style: normal;
font-weight: normal;
letter-spacing: normal;
pointer-events: none;
}
.ace_tooltip.ace_dark {
background-color: #636363;
color: #fff;
}
.ace_tooltip:focus {
outline: 1px solid #5E9ED6;
}
.ace_icon {
display: inline-block;
width: 18px;
vertical-align: top;
}
.ace_icon_svg {
display: inline-block;
width: 12px;
vertical-align: top;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 12px;
-webkit-mask-position: center;
}
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
padding-right: 13px;
}
.ace_fold-widget {
box-sizing: border-box;
margin: 0 -12px 0 1px;
display: none;
width: 11px;
vertical-align: top;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: center;
border-radius: 3px;
border: 1px solid transparent;
cursor: pointer;
}
.ace_folding-enabled .ace_fold-widget {
display: inline-block;
}
.ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
}
.ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
}
.ace_fold-widget:hover {
border: 1px solid rgba(0, 0, 0, 0.3);
background-color: rgba(255, 255, 255, 0.2);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}
.ace_fold-widget:active {
border: 1px solid rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}
/**
* Dark version for fold widgets
*/
.ace_dark .ace_fold-widget {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
}
.ace_dark .ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget:hover {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
background-color: rgba(255, 255, 255, 0.1);
}
.ace_dark .ace_fold-widget:active {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}
.ace_inline_button {
border: 1px solid lightgray;
display: inline-block;
margin: -1px 8px;
padding: 0 5px;
pointer-events: auto;
cursor: pointer;
}
.ace_inline_button:hover {
border-color: gray;
background: rgba(200,200,200,0.2);
display: inline-block;
pointer-events: auto;
}
.ace_fold-widget.ace_invalid {
background-color: #FFB4B4;
border-color: #DE5555;
}
.ace_fade-fold-widgets .ace_fold-widget {
transition: opacity 0.4s ease 0.05s;
opacity: 0;
}
.ace_fade-fold-widgets:hover .ace_fold-widget {
transition: opacity 0.05s ease 0.05s;
opacity:1;
}
.ace_underline {
text-decoration: underline;
}
.ace_bold {
font-weight: bold;
}
.ace_nobold .ace_bold {
font-weight: normal;
}
.ace_italic {
font-style: italic;
}
.ace_error-marker {
background-color: rgba(255, 0, 0,0.2);
position: absolute;
z-index: 9;
}
.ace_highlight-marker {
background-color: rgba(255, 255, 0,0.2);
position: absolute;
z-index: 8;
}
.ace_mobile-menu {
position: absolute;
line-height: 1.5;
border-radius: 4px;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
background: white;
box-shadow: 1px 3px 2px grey;
border: 1px solid #dcdcdc;
color: black;
}
.ace_dark > .ace_mobile-menu {
background: #333;
color: #ccc;
box-shadow: 1px 3px 2px grey;
border: 1px solid #444;
}
.ace_mobile-button {
padding: 2px;
cursor: pointer;
overflow: hidden;
}
.ace_mobile-button:hover {
background-color: #eee;
opacity:1;
}
.ace_mobile-button:active {
background-color: #ddd;
}
.ace_placeholder {
font-family: arial;
transform: scale(0.9);
transform-origin: left;
white-space: pre;
opacity: 0.7;
margin: 0 10px;
}
.ace_ghost_text {
opacity: 0.5;
font-style: italic;
white-space: pre;
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(h,m,T){var y=h("../lib/dom"),f=h("../lib/oop"),h=h("../lib/event_emitter").EventEmitter,a=(c.prototype.$updateDecorators=function(t){var r=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light,e=(t&&(this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.height,(t.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight),this.canvas.getContext("2d")),n=this.renderer.session.$annotations;if(e.clearRect(0,0,this.canvas.width,this.canvas.height),n)for(var s={info:1,warning:2,error:3},o=(n.forEach(function(x){x.priority=s[x.type]||null}),n=n.sort(function(x,$){return x.priority<$.priority?-1:x.priority>$.priority?1:0}),this.renderer.session.$foldData),i=0;i<n.length;i++){var l,w=n[i].row,d=this.compensateFoldRows(w,o),C=Math.round((w-d)*this.lineHeight*this.heightRatio),p=Math.round((w-d)*this.lineHeight*this.heightRatio),w=Math.round(((w-d)*this.lineHeight+this.lineHeight)*this.heightRatio);w-p<this.minDecorationHeight&&((l=(p+w)/2|0)<this.halfMinDecorationHeight?l=this.halfMinDecorationHeight:l+this.halfMinDecorationHeight>this.canvasHeight&&(l=this.canvasHeight-this.halfMinDecorationHeight),p=Math.round(l-this.halfMinDecorationHeight),w=Math.round(l+this.halfMinDecorationHeight)),e.fillStyle=r[n[i].type]||null,e.fillRect(0,C,this.canvasWidth,w-p)}t=this.renderer.session.selection.getCursor(),t&&(d=this.compensateFoldRows(t.row,o),C=Math.round((t.row-d)*this.lineHeight*this.heightRatio),e.fillStyle="rgba(0, 0, 0, 0.5)",e.fillRect(0,C,this.canvasWidth,2))},c.prototype.compensateFoldRows=function(t,r){var e=0;if(r&&0<r.length)for(var n=0;n<r.length;n++)t>r[n].start.row&&t<r[n].end.row?e+=t-r[n].start.row:t>=r[n].end.row&&(e+=r[n].end.row-r[n].start.row);return e},c);function c(t,r){this.canvas=y.createElement("canvas"),this.renderer=r,this.pixelRatio=1,this.maxHeight=r.layerConfig.maxHeight,this.lineHeight=r.layerConfig.lineHeight,this.canvasHeight=t.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=t.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},t.element.appendChild(this.canvas)}f.implement(a.prototype,h),m.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],function($,m,T){var y=$("./lib/oop"),f=$("./lib/dom"),h=$("./lib/lang"),a=$("./config"),c=$("./layer/gutter").Gutter,t=$("./layer/marker").Marker,r=$("./layer/text").Text,e=$("./layer/cursor").Cursor,n=$("./scrollbar").HScrollBar,s=$("./scrollbar").VScrollBar,o=$("./scrollbar_custom").HScrollBar,i=$("./scrollbar_custom").VScrollBar,l=$("./renderloop").RenderLoop,d=$("./layer/font_metrics").FontMetrics,C=$("./lib/event_emitter").EventEmitter,p=$("./css/editor.css"),w=$("./layer/decorators").Decorator,x=$("./lib/useragent"),$=(f.importCssString(p,"ace_editor.css",!1),H.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},H.prototype.setSession=function(B){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=B)&&this.scrollMargin.top&&B.getScrollTop()<=0&&B.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(B),this.$markerBack.setSession(B),this.$markerFront.setSession(B),this.$gutterLayer.setSession(B),this.$textLayer.setSession(B),B&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},H.prototype.updateLines=function(B,O,u){if(O===void 0&&(O=1/0),this.$changedLines?(this.$changedLines.firstRow>B&&(this.$changedLines.firstRow=B),this.$changedLines.lastRow<O&&(this.$changedLines.lastRow=O)):this.$changedLines={firstRow:B,lastRow:O},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!u)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},H.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},H.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},H.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},H.prototype.updateFull=function(B){B?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},H.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},H.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},H.prototype.onResize=function(B,O,u,I){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=B?1:0;var L=this.container,L=(I=I||L.clientHeight||L.scrollHeight,u=u||L.clientWidth||L.scrollWidth,this.$updateCachedSize(B,O,u,I));if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!u&&!I)return this.resizing=0;B&&(this.$gutterLayer.$padding=null),B?this.$renderChanges(L|this.$changes,!0):this.$loop.schedule(L|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},H.prototype.$updateCachedSize=function(B,O,u,I){I-=this.$extraHeight||0;var L=0,v=this.$size,_={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};return I&&(B||v.height!=I)&&(v.height=I,L|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",L|=this.CHANGE_SCROLL),u&&(B||v.width!=u)&&(L|=this.CHANGE_SIZE,v.width=u,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,f.setStyle(this.scrollBarH.element.style,"left",O+"px"),f.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),v.scrollerWidth=Math.max(0,u-O-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px"),O=this.scrollBarV.getWidth()+"px",f.setStyle(this.scrollBarH.element.style,"right",O),f.setStyle(this.scroller.style,"right",O),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||B)&&(L|=this.CHANGE_FULL),v.$dirty=!u||!I,L&&this._signal("resize",_),L},H.prototype.onGutterResize=function(B){B=this.$showGutter?B:0,B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},H.prototype.adjustWrapLimit=function(){var B=this.$size.scrollerWidth-2*this.$padding,B=Math.floor(B/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},H.prototype.setAnimatedScroll=function(B){this.setOption("animatedScroll",B)},H.prototype.getAnimatedScroll=function(){return this.$animatedScroll},H.prototype.setShowInvisibles=function(B){this.setOption("showInvisibles",B),this.session.$bidiHandler.setShowInvisibles(B)},H.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},H.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},H.prototype.setDisplayIndentGuides=function(B){this.setOption("displayIndentGuides",B)},H.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},H.prototype.setHighlightIndentGuides=function(B){this.setOption("highlightIndentGuides",B)},H.prototype.setShowPrintMargin=function(B){this.setOption("showPrintMargin",B)},H.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},H.prototype.setPrintMarginColumn=function(B){this.setOption("printMarginColumn",B)},H.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},H.prototype.getShowGutter=function(){return this.getOption("showGutter")},H.prototype.setShowGutter=function(B){return this.setOption("showGutter",B)},H.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},H.prototype.setFadeFoldWidgets=function(B){this.setOption("fadeFoldWidgets",B)},H.prototype.setHighlightGutterLine=function(B){this.setOption("highlightGutterLine",B)},H.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},H.prototype.$updatePrintMargin=function(){var B;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((B=f.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",B.appendChild(this.$printMarginEl),this.content.insertBefore(B,this.content.firstChild)),(B=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.visibility=this.$showPrintMargin?"visible":"hidden",this.session)&&this.session.$wrap==-1&&this.adjustWrapLimit()},H.prototype.getContainerElement=function(){return this.container},H.prototype.getMouseEventTarget=function(){return this.scroller},H.prototype.getTextAreaContainer=function(){return this.container},H.prototype.$moveTextAreaToCursor=function(){var B,O,u,I,L,v,_;this.$isMousePressed||(B=this.textarea.style,v=this.$composition,this.$keepTextAreaAtCursor||v?(u=this.$cursorLayer.$pixelPos)&&(v&&v.markerRange&&(u=this.$cursorLayer.getPixelPosition(v.markerRange.start,!0)),_=this.layerConfig,O=u.top,u=u.left,O-=_.offset,I=v&&v.useTextareaForIME||x.isMobile?this.lineHeight:1,O<0||O>_.height-I?f.translate(this.textarea,0,0):(_=1,L=this.$size.height-I,v?v.useTextareaForIME?(v=this.textarea.value,_=this.characterWidth*this.session.$getStringScreenWidth(v)[0]):O+=this.lineHeight+2:O+=this.lineHeight,(u-=this.scrollLeft)>this.$size.scrollerWidth-_&&(u=this.$size.scrollerWidth-_),u+=this.gutterWidth+this.margin.left,f.setStyle(B,"height",I+"px"),f.setStyle(B,"width",_+"px"),f.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-_),Math.min(O,L)))):f.translate(this.textarea,-100,0))},H.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},H.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},H.prototype.getLastFullyVisibleRow=function(){var B=this.layerConfig,O=B.lastRow;return this.session.documentToScreenRow(O,0)*B.lineHeight-this.session.getScrollTop()>B.height-B.lineHeight?O-1:O},H.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},H.prototype.setPadding=function(B){this.$padding=B,this.$textLayer.setPadding(B),this.$cursorLayer.setPadding(B),this.$markerFront.setPadding(B),this.$markerBack.setPadding(B),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},H.prototype.setScrollMargin=function(B,O,u,I){var L=this.scrollMargin;L.top=0|B,L.bottom=0|O,L.right=0|I,L.left=0|u,L.v=L.top+L.bottom,L.h=L.left+L.right,L.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-L.top),this.updateFull()},H.prototype.setMargin=function(B,O,u,I){var L=this.margin;L.top=0|B,L.bottom=0|O,L.right=0|I,L.left=0|u,L.v=L.top+L.bottom,L.h=L.left+L.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},H.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},H.prototype.setHScrollBarAlwaysVisible=function(B){this.setOption("hScrollBarAlwaysVisible",B)},H.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},H.prototype.setVScrollBarAlwaysVisible=function(B){this.setOption("vScrollBarAlwaysVisible",B)},H.prototype.$updateScrollBarV=function(){var B=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(B-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>B-O)&&(B=this.scrollTop+O,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(B+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},H.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},H.prototype.freeze=function(){this.$frozen=!0},H.prototype.unfreeze=function(){this.$frozen=!1},H.prototype.$renderChanges=function(B,O){if(this.$changes&&(B|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(B||O)){if(this.$size.$dirty)return this.$changes|=B,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",B),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var u,I,O=this.layerConfig;(B&this.CHANGE_FULL||B&this.CHANGE_SIZE||B&this.CHANGE_TEXT||B&this.CHANGE_LINES||B&this.CHANGE_SCROLL||B&this.CHANGE_H_SCROLL)&&(B|=this.$computeLayerConfig()|this.$loop.clear(),O.firstRow!=this.layerConfig.firstRow&&O.firstRowScreen==this.layerConfig.firstRowScreen&&0<(u=this.scrollTop+(O.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight)&&(this.scrollTop=u,B=(B|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),O=this.layerConfig,this.$updateScrollBarV(),B&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-O.offset),u=O.width+2*this.$padding+"px",I=O.minHeight+"px",f.setStyle(this.content.style,"width",u),f.setStyle(this.content.style,"height",I)),B&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-O.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility)&&(this.scroller.className+=this.keyboardFocusClassName),B&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(O),this.$showGutter&&this.$gutterLayer.update(O),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(O),this.$markerBack.update(O),this.$markerFront.update(O),this.$cursorLayer.update(O),this.$moveTextAreaToCursor()):B&this.CHANGE_SCROLL?(this.$changedLines=null,B&this.CHANGE_TEXT||B&this.CHANGE_LINES?this.$textLayer.update(O):this.$textLayer.scrollLines(O),this.$showGutter&&(B&this.CHANGE_GUTTER||B&this.CHANGE_LINES?this.$gutterLayer.update(O):this.$gutterLayer.scrollLines(O)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(O),this.$markerBack.update(O),this.$markerFront.update(O),this.$cursorLayer.update(O),this.$moveTextAreaToCursor()):(B&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(O),this.$showGutter&&this.$gutterLayer.update(O),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(O)):B&this.CHANGE_LINES?((this.$updateLines()||B&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(O),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(O)):B&this.CHANGE_TEXT||B&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(O),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(O)):B&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(O),this.$customScrollbar)&&this.$scrollDecorator.$updateDecorators(O),B&this.CHANGE_CURSOR&&(this.$cursorLayer.update(O),this.$moveTextAreaToCursor()),B&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(O),B&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(O)),this._signal("afterRender",B)}else this.$changes|=B},H.prototype.$autosize=function(){var B=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,u=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,B))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(u+=this.scrollBarH.getHeight()),O=!((u=this.$maxPixelHeight&&u>this.$maxPixelHeight?this.$maxPixelHeight:u)<=2*this.lineHeight)&&O<B,u==this.desiredHeight&&this.$size.height==this.desiredHeight&&O==this.$vScroll||(O!=this.$vScroll&&(this.$vScroll=O,this.scrollBarV.setVisible(O)),B=this.container.clientWidth,this.container.style.height=u+"px",this.$updateCachedSize(!0,this.$gutterWidth,B,u),this.desiredHeight=u,this._signal("autosize"))},H.prototype.$computeLayerConfig=function(){var B,te=this.session,O=this.$size,Q=O.height<=2*this.lineHeight,u=this.session.getScreenLength()*this.lineHeight,I=this.$getLongestLine(),F=!Q&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-I-2*this.$padding<0),L=this.$horizScroll!==F,F=(L&&(this.$horizScroll=F,this.scrollBarH.setVisible(F)),this.$vScroll),v=(this.$maxLines&&1<this.lineHeight&&this.$autosize(),O.scrollerHeight+this.lineHeight),_=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,W=(u+=_,this.scrollMargin),Q=(this.session.setScrollTop(Math.max(-W.top,Math.min(this.scrollTop,u-O.scrollerHeight+W.bottom))),this.session.setScrollLeft(Math.max(-W.left,Math.min(this.scrollLeft,I+2*this.$padding-O.scrollerWidth+W.right))),!Q&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-u+_<0||this.scrollTop>W.top)),_=F!==Q,W=(_&&(this.$vScroll=Q,this.scrollBarV.setVisible(Q)),this.scrollTop%this.lineHeight),F=Math.ceil(v/this.lineHeight)-1,F=(Q=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)))+F,J=this.lineHeight,Q=te.screenToDocumentRow(Q,0),X=te.getFoldLine(Q),te=(X&&(Q=X.start.row),X=te.documentToScreenRow(Q,0),B=te.getRowLength(Q)*J,F=Math.min(te.screenToDocumentRow(F,0),te.getLength()-1),v=O.scrollerHeight+te.getRowLength(F)*J+B,W=this.scrollTop-X*J,0);return this.layerConfig.width==I&&!L||(te=this.CHANGE_H_SCROLL),(L||_)&&(te|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),_)&&(I=this.$getLongestLine()),this.layerConfig={width:I,padding:this.$padding,firstRow:Q,firstRowScreen:X,lastRow:F,lineHeight:J,characterWidth:this.characterWidth,minHeight:v,maxHeight:u,offset:W,gutterOffset:J?Math.max(0,Math.ceil((W+O.height-O.scrollerHeight)/J)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(I-this.$padding),te},H.prototype.$updateLines=function(){if(this.$changedLines){var B=this.$changedLines.firstRow,O=this.$changedLines.lastRow,u=(this.$changedLines=null,this.layerConfig);if(!(B>u.lastRow+1||O<u.firstRow)){if(O!==1/0)return this.$textLayer.updateLines(u,B,O),!0;this.$showGutter&&this.$gutterLayer.update(u),this.$textLayer.update(u)}}},H.prototype.$getLongestLine=function(){var B=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(B+=1),this.$textLayer&&B>this.$textLayer.MAX_LINE_LENGTH&&(B=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(B*this.characterWidth))},H.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},H.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},H.prototype.addGutterDecoration=function(B,O){this.$gutterLayer.addGutterDecoration(B,O)},H.prototype.removeGutterDecoration=function(B,O){this.$gutterLayer.removeGutterDecoration(B,O)},H.prototype.updateBreakpoints=function(B){this.$loop.schedule(this.CHANGE_GUTTER)},H.prototype.setAnnotations=function(B){this.$gutterLayer.setAnnotations(B),this.$loop.schedule(this.CHANGE_GUTTER)},H.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},H.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},H.prototype.showCursor=function(){this.$cursorLayer.showCursor()},H.prototype.scrollSelectionIntoView=function(B,O,u){this.scrollCursorIntoView(B,u),this.scrollCursorIntoView(O,u)},H.prototype.scrollCursorIntoView=function(B,O,u){var I,L,v;this.$size.scrollerHeight!==0&&(I=(B=this.$cursorLayer.getPixelPosition(B)).left,B=B.top,L=u&&u.top||0,u=u&&u.bottom||0,this.$scrollAnimation&&(this.$stopAnimation=!0),B<(v=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+L?(O&&v+L>B+this.lineHeight&&(B-=O*this.$size.scrollerHeight),B===0&&(B=-this.scrollMargin.top),this.session.setScrollTop(B)):v+this.$size.scrollerHeight-u<B+this.lineHeight&&(O&&v+this.$size.scrollerHeight-u<B-this.lineHeight&&(B+=O*this.$size.scrollerHeight),this.session.setScrollTop(B+this.lineHeight+u-this.$size.scrollerHeight)),L=this.scrollLeft,I-(v=2*this.layerConfig.characterWidth)<L?((I-=v)<this.$padding+v&&(I=-this.scrollMargin.left),this.session.setScrollLeft(I)):L+this.$size.scrollerWidth<(I+=v)+this.characterWidth?this.session.setScrollLeft(Math.round(I+this.characterWidth-this.$size.scrollerWidth)):L<=this.$padding&&I-L<this.characterWidth&&this.session.setScrollLeft(0))},H.prototype.getScrollTop=function(){return this.session.getScrollTop()},H.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},H.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},H.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},H.prototype.scrollToRow=function(B){this.session.setScrollTop(B*this.lineHeight)},H.prototype.alignCursor=function(I,O){var I=this.$cursorLayer.getPixelPosition(I=typeof I=="number"?{row:I,column:0}:I),u=this.$size.scrollerHeight-this.lineHeight,I=I.top-u*(O||0);return this.session.setScrollTop(I),I},H.prototype.$calcSteps=function(B,O){for(var u,I,_=0,L=this.STEPS,v=[],_=0;_<L;++_)v.push((u=_/this.STEPS,(O-(I=B))*(Math.pow(u-1,3)+1)+I));return v},H.prototype.scrollToLine=function(B,O,u,I){B=this.$cursorLayer.getPixelPosition({row:B,column:0}).top,O&&(B-=this.$size.scrollerHeight/2),O=this.scrollTop,this.session.setScrollTop(B),u!==!1&&this.animateScrolling(O,I)},H.prototype.animateScrolling=function(B,O){var u=this.scrollTop;if(this.$animatedScroll){var I=this;if(B!=u){if(this.$scrollAnimation){var L=this.$scrollAnimation.steps;if(L.length&&(B=L[0])==u)return}var v=I.$calcSteps(B,u);this.$scrollAnimation={from:B,to:u,steps:v},clearInterval(this.$timer),I.session.setScrollTop(v.shift()),I.session.$scrollTop=u,this.$timer=setInterval(function(){if(!I.$stopAnimation)return I.session?void(v.length?(I.session.setScrollTop(v.shift()),I.session.$scrollTop=u):u!=null?(I.session.$scrollTop=-1,I.session.setScrollTop(u),u=null):_()):clearInterval(I.$timer);_()},10)}}function _(){I.$timer=clearInterval(I.$timer),I.$scrollAnimation=null,I.$stopAnimation=!1,O&&O()}},H.prototype.scrollToY=function(B){this.scrollTop!==B&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=B)},H.prototype.scrollToX=function(B){this.scrollLeft!==B&&(this.scrollLeft=B),this.$loop.schedule(this.CHANGE_H_SCROLL)},H.prototype.scrollTo=function(B,O){this.session.setScrollTop(O),this.session.setScrollLeft(B)},H.prototype.scrollBy=function(B,O){O&&this.session.setScrollTop(this.session.getScrollTop()+O),B&&this.session.setScrollLeft(this.session.getScrollLeft()+B)},H.prototype.isScrollableBy=function(B,O){return O<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<O&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||B<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<B&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},H.prototype.pixelToScreenCoordinates=function(I,L){this.$hasCssTransforms?(v={top:0,left:0},I=(u=this.$fontMetrics.transformCoordinates([I,L]))[1]-this.gutterWidth-this.margin.left,L=u[0]):v=this.scroller.getBoundingClientRect();var u=I+this.scrollLeft-v.left-this.$padding,I=u/this.characterWidth,L=Math.floor((L+this.scrollTop-v.top)/this.lineHeight),v=this.$blockCursor?Math.floor(I):Math.round(I);return{row:L,column:v,side:0<I-v?1:-1,offsetX:u}},H.prototype.screenToTextCoordinates=function(L,v){this.$hasCssTransforms?(u={top:0,left:0},L=(I=this.$fontMetrics.transformCoordinates([L,v]))[1]-this.gutterWidth-this.margin.left,v=I[0]):u=this.scroller.getBoundingClientRect();var u,I=L+this.scrollLeft-u.left-this.$padding,L=I/this.characterWidth,L=this.$blockCursor?Math.floor(L):Math.round(L),v=Math.floor((v+this.scrollTop-u.top)/this.lineHeight);return this.session.screenToDocumentPosition(v,Math.max(L,0),I)},H.prototype.textToScreenCoordinates=function(I,L){var u=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition(I,L),I=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,I)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),L=L.row*this.lineHeight;return{pageX:u.left+I-this.scrollLeft,pageY:u.top+L-this.scrollTop}},H.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},H.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},H.prototype.showComposition=function(B){(this.$composition=B).cssText||(B.cssText=this.textarea.style.cssText),B.useTextareaForIME==null&&(B.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):B.markerId=this.session.addMarker(B.markerRange,"ace_composition_marker","text")},H.prototype.setCompositionText=function(B){var O=this.session.selection.cursor;this.addToken(B,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},H.prototype.hideComposition=function(){var B;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,B=this.session.selection.cursor,this.removeExtraToken(B.row,B.column),this.$composition=null,this.$cursorLayer.element.style.display="")},H.prototype.setGhostText=function(B,u){var I=this.session.selection.cursor,u=u||{row:I.row,column:I.column},I=(this.removeGhostText(),B.split(`
`));this.addToken(I[0],"ghost_text",u.row,u.column),this.$ghostText={text:B,position:{row:u.row,column:u.column}},1<I.length&&(this.$ghostTextWidget={text:I.slice(1).join(`
`),row:u.row,column:u.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},H.prototype.removeGhostText=function(){var B;this.$ghostText&&(B=this.$ghostText.position,this.removeExtraToken(B.row,B.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null)},H.prototype.addToken=function(B,O,u,I){var L=this.session,v=(L.bgTokenizer.lines[u]=null,{type:O,value:B}),_=L.getTokens(u);if(I!=null&&_.length)for(var W=0,F=0;F<_.length;F++){var J=_[F];if(I<=(W+=J.value.length)){var X=J.value.length-(W-I),Q=J.value.slice(0,X),X=J.value.slice(X);_.splice(F,1,{type:J.type,value:Q},v,{type:J.type,value:X});break}}else _.push(v);this.updateLines(u,u)},H.prototype.removeExtraToken=function(B,O){this.session.bgTokenizer.lines[B]=null,this.updateLines(B,B)},H.prototype.setTheme=function(B,O){var u,I=this;function L(v){if(I.$themeId!=B)return O&&O();if(!v||!v.cssClass)throw new Error("couldn't load module "+B+" or it didn't call define");v.$id&&(I.$themeId=v.$id),f.importCssString(v.cssText,v.cssClass,I.container),I.theme&&f.removeCssClass(I.container,I.theme.cssClass);var _="padding"in v?v.padding:"padding"in(I.theme||{})?4:I.$padding;I.$padding&&_!=I.$padding&&I.setPadding(_),I.$theme=v.cssClass,I.theme=v,f.addCssClass(I.container,v.cssClass),f.setCssClass(I.container,"ace_dark",v.isDark),I.$size&&(I.$size.width=0,I.$updateSizeAsync()),I._dispatchEvent("themeLoaded",{theme:v}),O&&O()}this.$themeId=B,I._dispatchEvent("themeChange",{theme:B}),B&&typeof B!="string"?L(B):(u=B||this.$options.theme.initialValue,a.loadModule(["theme",u],L))},H.prototype.getTheme=function(){return this.$themeId},H.prototype.setStyle=function(B,O){f.setCssClass(this.container,B,O!==!1)},H.prototype.unsetStyle=function(B){f.removeCssClass(this.container,B)},H.prototype.setCursorStyle=function(B){f.setStyle(this.scroller.style,"cursor",B)},H.prototype.setMouseCursor=function(B){f.setStyle(this.scroller.style,"cursor",B)},H.prototype.attachToShadowRoot=function(){f.importCssString(p,"ace_editor.css",this.container)},H.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},H.prototype.$updateCustomScrollbar=function(B){var O=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,B===!0?(this.scrollBarV=new i(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(u){O.$scrollAnimation||O.session.setScrollTop(u.data-O.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(u){O.$scrollAnimation||O.session.setScrollLeft(u.data-O.scrollMargin.left)}),this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new s(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.addEventListener("scroll",function(u){O.$scrollAnimation||O.session.setScrollTop(u.data-O.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(u){O.$scrollAnimation||O.session.setScrollLeft(u.data-O.scrollMargin.left)}))},H.prototype.$addResizeObserver=function(){var B;window.ResizeObserver&&!this.$resizeObserver&&((B=this).$resizeTimer=h.delayedCall(function(){B.destroyed||B.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(I){var u=I[0].contentRect.width,I=I[0].contentRect.height;1<Math.abs(B.$size.width-u)||1<Math.abs(B.$size.height-I)?B.$resizeTimer.delay():B.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container))},H);function H(I,O){var u=this,I=(this.container=I||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(O),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new t(this.content),this.$textLayer=new r(this.content));this.canvas=I.element,this.$markerFront=new t(this.content),this.$cursorLayer=new e(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new n(this.container,this),this.scrollBarV.on("scroll",function(L){u.$scrollAnimation||u.session.setScrollTop(L.data-u.scrollMargin.top)}),this.scrollBarH.on("scroll",function(L){u.$scrollAnimation||u.session.setScrollLeft(L.data-u.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new d(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(L){u.updateCharacterSize(),u.onResize(!0,u.gutterWidth,u.$size.width,u.$size.height),u._signal("changeCharacterSize",L)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new l(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}$.prototype.CHANGE_CURSOR=1,$.prototype.CHANGE_MARKER=2,$.prototype.CHANGE_GUTTER=4,$.prototype.CHANGE_SCROLL=8,$.prototype.CHANGE_LINES=16,$.prototype.CHANGE_TEXT=32,$.prototype.CHANGE_SIZE=64,$.prototype.CHANGE_MARKER_BACK=128,$.prototype.CHANGE_MARKER_FRONT=256,$.prototype.CHANGE_FULL=512,$.prototype.CHANGE_H_SCROLL=1024,$.prototype.$changes=0,$.prototype.$padding=null,$.prototype.$frozen=!1,$.prototype.STEPS=8,y.implement($.prototype,C),a.defineOptions($.prototype,"renderer",{useResizeObserver:{set:function(B){!B&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):B&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(B){this.$textLayer.setShowInvisibles(B)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(B){typeof B=="number"&&(this.$printMarginColumn=B),this.$showPrintMargin=!!B,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(B){this.$gutter.style.display=B?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(B){this.$gutterLayer.$useSvgGutterIcons=B},initialValue:!1},showFoldedAnnotations:{set:function(B){this.$gutterLayer.$showFoldedAnnotations=B},initialValue:!1},fadeFoldWidgets:{set:function(B){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",B)},initialValue:!1},showFoldWidgets:{set:function(B){this.$gutterLayer.setShowFoldWidgets(B),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(B){this.$textLayer.setDisplayIndentGuides(B)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(B){this.$textLayer.setHighlightIndentGuides(B)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(B){this.$gutterLayer.setHighlightGutterLine(B),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(B){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(B){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(B){typeof B=="number"&&(B+="px"),this.container.style.fontSize=B,this.updateFontSize()},initialValue:12},fontFamily:{set:function(B){this.container.style.fontFamily=B,this.updateFontSize()}},maxLines:{set:function(B){this.updateFull()}},minLines:{set:function(B){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(B){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(B){this.$scrollPastEnd!=(B=+B||0)&&(this.$scrollPastEnd=B,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(B){this.$gutterLayer.$fixedWidth=!!B,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(B){this.$updateCustomScrollbar(B)},initialValue:!1},theme:{set:function(B){this.setTheme(B)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),m.VirtualRenderer=$}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(A,m,T){var y=A("../lib/oop"),f=A("../lib/net"),h=A("../lib/event_emitter").EventEmitter,a=A("../config");function c(r){var e;return typeof Worker=="undefined"?{postMessage:function(){},terminate:function(){}}:a.get("loadWorkerFromBlob")?(e=function(n){n="importScripts('"+f.qualifyURL(n)+"');";try{return new Blob([n],{type:"application/javascript"})}catch{var s=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return s.append(n),s.getBlob("application/javascript")}}(r),e=(window.URL||window.webkitURL).createObjectURL(e),new Worker(e)):new Worker(r)}function t(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage}(function(){y.implement(this,h),this.$createWorkerFromOldConfig=function(r,e,n,s,o){var i,l;return A.nameToUrl&&!A.toUrl&&(A.toUrl=A.nameToUrl),a.get("packaged")||!A.toUrl?s=s||a.moduleUrl(e,"worker"):(i=this.$normalizePath,s=s||i(A.toUrl("ace/worker/worker.js",null,"_")),l={},r.forEach(function(d){l[d]=i(A.toUrl(d,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=c(s),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:l,module:e,classname:n}),this.$worker},this.onMessage=function(r){var e=r.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data)}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return f.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,e){this.$worker.postMessage({command:r,args:e})},this.call=function(r,e,n){var s;n&&(s=this.callbackId++,this.callbacks[s]=n,e.push(s)),this.send(r,e)},this.emit=function(r,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:r,data:{data:e.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener,!0)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,50<r.length&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(t.prototype),m.UIWorkerClient=function(r,e,n){var s=null,o=!1,i=Object.create(h),l=[],d=new t({messageBuffer:l,terminate:function(){},postMessage:function(p){l.push(p),s&&(o?setTimeout(C):C())}}),C=(d.setEmitSync=function(p){o=p},function(){var p=l.shift();p.command?s[p.command].apply(s,p.args):p.event&&i._signal(p.event,p.data)});return i.postMessage=function(p){d.onMessage({data:p})},i.callback=function(p,w){this.postMessage({type:"call",id:w,data:p})},i.emit=function(p,w){this.postMessage({type:"event",name:p,data:w})},a.loadModule(["worker",e],function(p){for(s=new p[n](i);l.length;)C()}),d},m.WorkerClient=t,m.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(h,m,T){var y=h("./range").Range,f=h("./lib/event_emitter").EventEmitter,h=h("./lib/oop"),a=(c.prototype.setup=function(){var t=this,r=this.doc,e=this.session,n=(this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=r.createAnchor(this.$pos.row,this.$pos.column),this.pos);n.$insertRight=!0,n.detach(),n.markerId=e.addMarker(new y(n.row,n.column,n.row,n.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){s=r.createAnchor(s.row,s.column),s.$insertRight=!0,s.detach(),t.others.push(s)}),e.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){var t,r;this.othersActive||(t=this.session,(r=this).othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new y(e.row,e.column,e.row,e.column+r.length),r.othersClass,null,!1)}))},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},c.prototype.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var r=t;if(r.start.row===r.end.row&&r.start.row===this.pos.row){this.$updating=!0;var e=t.action==="insert"?r.end.column-r.start.column:r.start.column-r.end.column,n=r.start.column>=this.pos.column&&r.start.column<=this.pos.column+this.length+1,s=r.start.column-this.pos.column;if(this.updateAnchors(t),n&&(this.length+=e),n&&!this.session.$fromUndo){if(t.action==="insert")for(var o=this.others.length-1;0<=o;o--){var i={row:(l=this.others[o]).row,column:l.column+s};this.doc.insertMergedLines(i,t.lines)}else if(t.action==="remove")for(o=this.others.length-1;0<=o;o--){var l,i={row:(l=this.others[o]).row,column:l.column+s};this.doc.remove(new y(i.row,i.column,i.row,i.column-e))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var r=this.others.length;r--;)this.others[r].onChange(t);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var t=this,r=this.session,e=function(s,o){r.removeMarker(s.markerId),s.markerId=r.addMarker(new y(s.row,s.column,s.row,s.column+t.length),o,null,!1)};e(this.pos,this.mainClass);for(var n=this.others.length;n--;)e(this.others[n],this.othersClass)}},c.prototype.onCursorChange=function(t){var r;!this.$updating&&this.session&&((r=this.session.selection.getCursor()).row===this.pos.row&&r.column>=this.pos.column&&r.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t)))},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var t=this.session.getUndoManager(),r=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,e=0;e<r;e++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c);function c(t,l,e,n,s,o){var i=this,l=(this.length=l,this.session=t,this.doc=t.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){i.onCursorChange()})},this.$pos=e,t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=l.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}h.implement(a.prototype,f),m.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(A,m,T){var y=A("../lib/event"),f=A("../lib/useragent");function h(a,c){return a.row==c.row&&a.column==c.column}m.onMouseDown=function(a){var c=a.domEvent,t=c.altKey,r=c.shiftKey,e=c.ctrlKey,n=a.getAccelKey(),s=a.getButton();if(e&&f.isMac&&(s=c.button),a.editor.inMultiSelectMode&&s==2)a.editor.textInput.onContextMenu(a.domEvent);else if(e||t||n){if(s===0){var o,i,l,d,C,p,w,x,$=a.editor,H=$.selection,B=$.inMultiSelectMode,O=a.getDocumentPosition(),u=H.getCursor(),u=a.inSelection()||H.isEmpty()&&h(O,u),I=a.x,L=a.y,v=$.session,_=$.renderer.pixelToScreenCoordinates(I,L),W=_;if($.$mouseHandler.$enableJumpToDef)e&&t||n&&t?o=r?"block":"add":t&&$.$blockSelectEnabled&&(o="block");else if(n&&!t){if(o="add",!B&&r)return}else t&&$.$blockSelectEnabled&&(o="block");if(o&&f.isMac&&c.ctrlKey&&$.$mouseHandler.cancelContextMenu(),o=="add")!B&&u||(B||(i=H.toOrientedRange(),$.addSelectionMarker(i)),l=H.rangeList.rangeAtPoint(O),$.inVirtualSelectionMode=!0,r&&(l=null,i=H.ranges[0]||i,$.removeSelectionMarker(i)),$.once("mouseup",function(){var F=H.toOrientedRange();l&&F.isEmpty()&&h(l.cursor,F.cursor)?H.substractPoint(F.cursor):(r?H.substractPoint(i.cursor):i&&($.removeSelectionMarker(i),H.addRange(i)),H.addRange(F)),$.inVirtualSelectionMode=!1}));else if(o=="block")return a.stop(),$.inVirtualSelectionMode=!0,C=[],p=function(){var F=$.renderer.pixelToScreenCoordinates(I,L),J=v.screenToDocumentPosition(F.row,F.column,F.offsetX);h(W,F)&&h(J,H.lead)||(W=F,$.selection.moveToPosition(J),$.renderer.scrollCursorIntoView(),$.removeSelectionMarkers(C),C=H.rectangularRangeBlock(W,_),$.$mouseHandler.$clickSelection&&C.length==1&&C[0].isEmpty()&&(C[0]=$.$mouseHandler.$clickSelection.clone()),C.forEach($.addSelectionMarker,$),$.updateSelectionMarkers())},B&&!n?H.toSingleRange():!B&&n&&(d=H.toOrientedRange(),$.addSelectionMarker(d)),r?_=v.documentToScreenPosition(H.lead):H.moveToPosition(O),W={row:-1,column:-1},w=p,y.capture($.container,function(F){I=F.clientX,L=F.clientY},function(F){p(),clearInterval(x),$.removeSelectionMarkers(C),C.length||(C=[H.toOrientedRange()]),d&&($.removeSelectionMarker(d),H.toSingleRange(d));for(var J=0;J<C.length;J++)H.addRange(C[J]);$.inVirtualSelectionMode=!1,$.$mouseHandler.$clickSelection=null}),x=setInterval(function(){w()},20),a.preventDefault()}}else s===0&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(A,m,T){m.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(y){y.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(y){y.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(y){y.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(y){y.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(y){y.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(y){y.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(y){y.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(y){y.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(y){1<y.multiSelect.rangeCount?y.multiSelect.joinSelections():y.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(y){y.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(y){y.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(y){y.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],m.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(y){y.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(y){return y&&y.inMultiSelectMode}}],A=A("../keyboard/hash_handler").HashHandler,m.keyboardHandler=new A(m.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(A,m,T){var y=A("./range_list").RangeList,f=A("./range").Range,h=A("./selection").Selection,a=A("./mouse/multi_select_handler").onMouseDown,c=A("./lib/event"),t=A("./lib/lang"),r=A("./commands/multi_select_commands");m.commands=r.defaultCommands.concat(r.multiSelectCommands);var e=new(A("./search")).Search,n=A("./edit_session").EditSession,n=(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(n.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(o,i){if(o){if(!this.inMultiSelectMode&&this.rangeCount===0){var l=this.toOrientedRange();if(this.rangeList.add(l),this.rangeList.add(o),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),i||this.fromOrientedRange(o);this.rangeList.removeAll(),this.rangeList.add(l),this.$onAddRange(l)}return o.cursor||(o.cursor=o.end),l=this.rangeList.add(o),this.$onAddRange(o),l.length&&this.$onRemoveRange(l),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),i||this.fromOrientedRange(o)}},this.toSingleRange=function(o){o=o||this.ranges[0];var i=this.rangeList.removeAll();i.length&&this.$onRemoveRange(i),o&&this.fromOrientedRange(o)},this.substractPoint=function(o){if(o=this.rangeList.substractPoint(o),o)return this.$onRemoveRange(o),o[0]},this.mergeOverlappingRanges=function(){var o=this.rangeList.merge();o.length&&this.$onRemoveRange(o)},this.$onAddRange=function(o){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(o),this._signal("addRange",{range:o})},this.$onRemoveRange=function(o){var i;this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode&&(i=this.rangeList.ranges.pop(),o.push(i),this.rangeCount=0);for(var l=o.length;l--;){var d=this.ranges.indexOf(o[l]);this.ranges.splice(d,1)}this._signal("removeRange",{ranges:o}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(i=i||this.ranges[0])&&!i.isEqual(this.getRange())&&this.fromOrientedRange(i)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new y,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var o=this.ranges.length?this.ranges:[this.getRange()],i=[],l=0;l<o.length;l++){var d=o[l],C=d.start.row,p=d.end.row;if(C===p)i.push(d.clone());else{for(i.push(new f(C,d.start.column,C,this.session.getLine(C).length));++C<p;)i.push(this.getLineRange(C,!0));i.push(new f(p,0,p,d.end.column))}l!=0||this.isBackwards()||(i=i.reverse())}for(this.toSingleRange(),l=i.length;l--;)this.addRange(i[l])},this.joinSelections=function(){var i=this.rangeList.ranges,o=i[i.length-1],i=f.fromPoints(i[0].start,o.end);this.toSingleRange(),this.setSelectionRange(i,o.cursor==o.start)},this.toggleBlockSelection=function(){var o,i;1<this.rangeCount?(i=(o=this.rangeList.ranges)[o.length-1],o=f.fromPoints(o[0].start,i.end),this.toSingleRange(),this.setSelectionRange(o,i.cursor==i.start)):(o=this.session.documentToScreenPosition(this.cursor),i=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(o,i).forEach(this.addRange,this))},this.rectangularRangeBlock=function(o,i,l){var d,C,p,w,x,$,H,B=[],O=o.column<i.column,u=(w=(O?(d=o.column,C=i.column,p=o.offsetX,i):(d=i.column,C=o.column,p=i.offsetX,o)).offsetX,o.row<i.row);$=(u?(x=o.row,i):(x=i.row,o)).row,d<0&&(d=0),(x=x<0?0:x)==$&&(l=!0);for(var I,L,v=x;v<=$;v++){var _=f.fromPoints(this.session.screenToDocumentPosition(v,d,p),this.session.screenToDocumentPosition(v,C,w));if(_.isEmpty()){if(H&&(I=_.end,L=H,I.row==L.row)&&I.column==L.column)break;H=_.end}_.cursor=O?_.start:_.end,B.push(_)}if(u&&B.reverse(),!l){for(var W=B.length-1;B[W].isEmpty()&&0<W;)W--;if(0<W)for(var F=0;B[F].isEmpty();)F++;for(var J=W;F<=J;J--)B[J].isEmpty()&&B.splice(J,1)}return B}}.call(h.prototype),A("./editor").Editor);function s(o){var i,l;function d(C){l&&(i.renderer.setMouseCursor(""),l=!1)}o.$multiselectOnSessionChange||(o.$onAddRange=o.$onAddRange.bind(o),o.$onRemoveRange=o.$onRemoveRange.bind(o),o.$onMultiSelect=o.$onMultiSelect.bind(o),o.$onSingleSelect=o.$onSingleSelect.bind(o),o.$multiselectOnSessionChange=m.onSessionChange.bind(o),o.$checkMultiselectChange=o.$checkMultiselectChange.bind(o),o.$multiselectOnSessionChange(o),o.on("changeSession",o.$multiselectOnSessionChange),o.on("mousedown",a),o.commands.addCommands(r.defaultCommands),(i=o).textInput&&(o=i.textInput.getElement(),l=!1,c.addListener(o,"keydown",function(C){C=C.keyCode==18&&!(C.ctrlKey||C.shiftKey||C.metaKey),i.$blockSelectEnabled&&C?l||(i.renderer.setMouseCursor("crosshair"),l=!0):l&&d()},i),c.addListener(o,"keyup",d,i),c.addListener(o,"blur",d,i)))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(o){o.cursor||(o.cursor=o.end);var i=this.getSelectionStyle();return o.marker=this.session.addMarker(o,"ace_selection",i),this.session.$selectionMarkers.push(o),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,o},this.removeSelectionMarker=function(o){o.marker&&(this.session.removeMarker(o.marker),(o=this.session.$selectionMarkers.indexOf(o))!=-1&&this.session.$selectionMarkers.splice(o,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(o){for(var i=this.session.$selectionMarkers,l=o.length;l--;){var d=o[l];d.marker&&(this.session.removeMarker(d.marker),(d=i.indexOf(d))!=-1)&&i.splice(d,1)}this.session.selectionMarkerCount=i.length},this.$onAddRange=function(o){this.addSelectionMarker(o.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(o){this.removeSelectionMarkers(o.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(o){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(r.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(o){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(r.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(o){var i,l=o.command,d=o.editor;if(d.multiSelect)return l.multiSelectAction?i=l.multiSelectAction=="forEach"?d.forEachSelection(l,o.args):l.multiSelectAction=="forEachLine"?d.forEachSelection(l,o.args,!0):l.multiSelectAction=="single"?(d.exitMultiSelectMode(),l.exec(d,o.args||{})):l.multiSelectAction(d,o.args||{}):(i=l.exec(d,o.args||{}),d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()),i},this.forEachSelection=function(o,i,l){if(!this.inVirtualSelectionMode){var d,$=l&&l.keepOrder,C=l==1||l&&l.$byLines,p=this.session,l=this.selection,w=l.rangeList,x=($?l:w).ranges;if(!x.length)return o.exec?o.exec(this,i||{}):o(this,i||{});var $=l._eventRegistry,H=(l._eventRegistry={},new h(p));this.inVirtualSelectionMode=!0;for(var B=x.length;B--;){if(C)for(;0<B&&x[B].start.row==x[B-1].end.row;)B--;H.fromOrientedRange(x[B]),H.index=B,this.selection=p.selection=H;var O=o.exec?o.exec(this,i||{}):o(this,i||{});d||O===void 0||(d=O),H.toOrientedRange(x[B])}return H.detach(),this.selection=p.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=$,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]),w=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),w&&w.from==w.to&&this.renderer.animateScrolling(w.from),d}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var o="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var i=this.multiSelect.rangeList.ranges,l=[],d=0;d<i.length;d++)l.push(this.session.getTextRange(i[d]));var C=this.session.getDocument().getNewLineCharacter();(o=l.join(C)).length==(l.length-1)*C.length&&(o="")}else this.selection.isEmpty()||(o=this.session.getTextRange(this.getSelectionRange()));return o},this.$checkMultiselectChange=function(o,i){var l;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(l=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&i==this.multiSelect.anchor||((l=i==this.multiSelect.anchor?l.cursor==l.start?l.end:l.start:l.cursor).row!=i.row||this.session.$clipPositionToDocument(l.row,l.column).column!=i.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(o,i,l){(i=i||{}).needle=o||i.needle,i.needle==null&&(d=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),i.needle=this.session.getTextRange(d)),this.$search.set(i);var d,C=this.$search.findAll(this.session);if(!C.length)return 0;var p=this.multiSelect;l||p.toSingleRange(C[0]);for(var w=C.length;w--;)p.addRange(C[w],!0);return d&&p.rangeList.rangeAtPoint(d.start)&&p.addRange(d,!0),C.length},this.selectMoreLines=function(o,i){var l,d,C,p=this.selection.toOrientedRange(),w=p.cursor==p.end,x=this.session.documentToScreenPosition(p.cursor),$=(this.selection.$desiredColumn&&(x.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(x.row+o,x.column));o=p.isEmpty()?$:(l=this.session.documentToScreenPosition(w?p.end:p.start),this.session.screenToDocumentPosition(l.row+o,l.column)),w?(d=f.fromPoints($,o)).cursor=d.start:(d=f.fromPoints(o,$)).cursor=d.end,d.desiredColumn=x.column,this.selection.inMultiSelectMode?i&&(C=p.cursor):this.selection.addRange(p),this.selection.addRange(d),C&&this.selection.substractPoint(C)},this.transposeSelections=function(o){for(var i=this.session,l=i.multiSelect,d=l.ranges,C=d.length;C--;)(w=d[C]).isEmpty()&&(x=i.getWordRange(w.start.row,w.start.column),w.start.row=x.start.row,w.start.column=x.start.column,w.end.row=x.end.row,w.end.column=x.end.column);l.mergeOverlappingRanges();for(var p=[],C=d.length;C--;){var w=d[C];p.unshift(i.getTextRange(w))}for(o<0?p.unshift(p.pop()):p.push(p.shift()),C=d.length;C--;){var x=(w=d[C]).clone();i.replace(w,p[C]),w.start.row=x.start.row,w.start.column=x.start.column}l.fromOrientedRange(l.ranges[0])},this.selectMore=function(o,i,l){var d,C=this.session,p=C.multiSelect.toOrientedRange();p.isEmpty()&&((p=C.getWordRange(p.start.row,p.start.column)).cursor=o==-1?p.start:p.end,this.multiSelect.addRange(p),l)||(l=C.getTextRange(p),C=C,l=l,d=o,e.$options.wrap=!0,e.$options.needle=l,e.$options.backwards=d==-1,(l=e.find(C))&&(l.cursor=o==-1?l.start:l.end,this.session.unfold(l),this.multiSelect.addRange(l),this.renderer.scrollCursorIntoView(null,.5)),i&&this.multiSelect.substractPoint(p.cursor))},this.alignCursors=function(){var o=this.session,i=o.multiSelect,l=i.ranges,d=-1,C=l.filter(function(I){if(I.cursor.row==d)return!0;d=I.cursor.row});if(l.length&&C.length!=l.length-1){C.forEach(function(I){i.substractPoint(I.cursor)});var p=0,w=1/0,x=l.map(function(L){var L=L.cursor,v=o.getLine(L.row).substr(L.column).search(/\S/g);return L.column>p&&(p=L.column),(v=v==-1?0:v)<w&&(w=v),v});l.forEach(function(I,W){var v=I.cursor,_=p-v.column,W=x[W]-w;W<_?o.insert(v,t.stringRepeat(" ",_-W)):o.remove(new f(v.row,v.column,v.row,v.column-_+W)),I.start.column=I.end.column=p,I.start.row=I.end.row=v.row,I.cursor=I.end}),i.fromOrientedRange(l[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var C=this.selection.getRange(),$=C.start.row,H=C.end.row,l=$==H;if(l){for(var B,O=this.session.getLength();B=this.session.getLine(H),/[=:]/.test(B)&&++H<O;);for(;B=this.session.getLine($),/[=:]/.test(B)&&0<--$;);$<0&&($=0),O<=H&&(H=O-1)}var u=this.session.removeFullLines($,H),u=this.$reAlignText(u,l);this.session.insert({row:$,column:0},u.join(`
`)+`
`),l||(C.start.column=0,C.end.column=u[u.length-1].length),this.selection.setRange(C)}},this.$reAlignText=function(o,i){var l,d,C,p=!0,w=!0;return o.map(function(H){var B=H.match(/(\s*)(.*?)(\s*)([=:].*)/);return B?(l==null?(l=B[1].length,d=B[2].length,C=B[3].length):(l+d+C!=B[1].length+B[2].length+B[3].length&&(w=!1),l!=B[1].length&&(p=!1),l>B[1].length&&(l=B[1].length),d<B[2].length&&(d=B[2].length),C>B[3].length&&(C=B[3].length)),B):[H]}).map(i?$:p?w?function(H){return H[2]?x(l+d-H[2].length)+H[2]+x(C)+H[4].replace(/^([=:])\s+/,"$1 "):H[0]}:$:function(H){return H[2]?x(l)+H[2]+x(C)+H[4].replace(/^([=:])\s+/,"$1 "):H[0]});function x(H){return t.stringRepeat(" ",H)}function $(H){return H[2]?x(l)+H[2]+x(d-H[2].length+C)+H[4].replace(/^([=:])\s+/,"$1 "):H[0]}}}).call(n.prototype),m.onSessionChange=function(l){var i=l.session,l=(i&&!i.multiSelect&&(i.$selectionMarkers=[],i.selection.$initRangeList(),i.multiSelect=i.selection),this.multiSelect=i&&i.multiSelect,l.oldSession);l&&(l.multiSelect.off("addRange",this.$onAddRange),l.multiSelect.off("removeRange",this.$onRemoveRange),l.multiSelect.off("multiSelect",this.$onMultiSelect),l.multiSelect.off("singleSelect",this.$onSingleSelect),l.multiSelect.lead.off("change",this.$checkMultiselectChange),l.multiSelect.anchor.off("change",this.$checkMultiselectChange)),i&&(i.multiSelect.on("addRange",this.$onAddRange),i.multiSelect.on("removeRange",this.$onRemoveRange),i.multiSelect.on("multiSelect",this.$onMultiSelect),i.multiSelect.on("singleSelect",this.$onSingleSelect),i.multiSelect.lead.on("change",this.$checkMultiselectChange),i.multiSelect.anchor.on("change",this.$checkMultiselectChange)),i&&this.inMultiSelectMode!=i.selection.inMultiSelectMode&&(i.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},m.MultiSelect=s,A("./config").defineOptions(n.prototype,"editor",{enableMultiselect:{set:function(o){s(this),o?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",a)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",a))},value:!0},enableBlockSelect:{set:function(o){this.$blockSelectEnabled=o},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(f,m,T){var y=f("../../range").Range,f=m.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(h,a,c){return h=h.getLine(c),this.foldingStartMarker.test(h)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(h)?"end":""},this.getFoldWidgetRange=function(h,a,c){return null},this.indentationBlock=function(h,a,c){var t=/\S/,r=h.getLine(a),e=r.search(t);if(e!=-1){for(var n,c=c||r.length,s=h.getLength(),r=a,o=a;++a<s;){var i=h.getLine(a).search(t);if(i!=-1){if(i<=e&&(i=h.getTokenAt(a,0),!i||i.type!=="string"))break;o=a}}return r<o?(n=h.getLine(o).length,new y(r,c,o,n)):void 0}},this.openingBracketBlock=function(h,a,c,t,r){if(c={row:c,column:t+1},t=h.$findClosingBracket(a,c,r),t)return(a=(a=h.foldWidgets[t.row])==null?h.getFoldWidget(t.row):a)=="start"&&t.row>c.row&&(t.row--,t.column=h.getLine(t.row).length),y.fromPoints(c,t)},this.closingBracketBlock=function(h,a,c,t,r){if(c={row:c,column:t},t=h.$findOpeningBracket(a,c),t)return t.column++,c.column--,y.fromPoints(t,c)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(A,m,T){var y=A("../line_widgets").LineWidgets,f=A("../lib/dom"),h=A("../range").Range,a=A("../config").nls;function c(t,r,e){var n=t.getAnnotations().sort(h.comparePoints);if(n.length){var s=function(l,d,C){for(var p=0,w=l.length-1;p<=w;){var x=p+w>>1,$=C(d,l[x]);if(0<$)p=1+x;else{if(!($<0))return x;w=x-1}}return-(p+1)}(n,{row:r,column:-1},h.comparePoints),o=((s=s<0?-s-1:s)>=n.length?s=0<e?0:n.length-1:s===0&&e<0&&(s=n.length-1),n[s]);if(o&&e){if(o.row===r){for(;(o=n[s+=e])&&o.row===r;);if(!o)return n.slice()}var i=[];for(r=o.row;i[e<0?"unshift":"push"](o),(o=n[s+=e])&&o.row==r;);return i.length&&i}}}m.showErrorMarker=function(t,d){var e,n=t.session,s=(n.widgetManager||(n.widgetManager=new y(n),n.widgetManager.attach(t)),t.getCursorPosition()),l=s.row,C=n.widgetManager.getWidgetsAtRow(l).filter(function(p){return p.type=="errorMarker"})[0],l=(C?C.destroy():l-=d,c(n,l,d));if(l)d=l[0],s.column=(d.pos&&typeof d.column!="number"?d.pos.sc:d.column)||0,s.row=d.row,e=t.renderer.$gutterLayer.$annotations[s.row];else{if(C)return;e={text:[a("Looks good!")],className:"ace_ok"}}t.session.unfold(s.row),t.selection.moveToPosition(s);function o(p,w,x){if(w===0&&(x==="esc"||x==="return"))return i.destroy(),{command:"null"}}var i={row:s.row,fixedWidth:!0,coverGutter:!0,el:f.createElement("div"),type:"errorMarker"},l=i.el.appendChild(f.createElement("div")),d=i.el.appendChild(f.createElement("div")),C=(d.className="error_widget_arrow "+e.className,t.renderer.$cursorLayer.getPixelPosition(s).left);d.style.left=C+t.renderer.gutterWidth-5+"px",i.el.className="error_widget_wrapper",l.className="error_widget "+e.className,l.innerHTML=e.text.join("<br>"),l.appendChild(f.createElement("div")),i.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(o),n.widgetManager.removeLineWidget(i),t.off("changeSelection",i.destroy),t.off("changeSession",i.destroy),t.off("mouseup",i.destroy),t.off("change",i.destroy))},t.keyBinding.addKeyboardHandler(o),t.on("changeSelection",i.destroy),t.on("changeSession",i.destroy),t.on("mouseup",i.destroy),t.on("change",i.destroy),t.session.widgetManager.addLineWidget(i),i.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:i.el.offsetHeight})},f.importCssString(`
.error_widget_wrapper {
background: inherit;
color: inherit;
border:none
}
.error_widget {
border-top: solid 2px;
border-bottom: solid 2px;
margin: 5px 0;
padding: 10px 40px;
white-space: pre-wrap;
}
.error_widget.ace_error, .error_widget_arrow.ace_error{
border-color: #ff5a5a
}
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
border-color: #F1D817
}
.error_widget.ace_info, .error_widget_arrow.ace_info{
border-color: #5a5a5a
}
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
border-color: #5aaa5a
}
.error_widget_arrow {
position: absolute;
border: solid 5px;
border-top-color: transparent!important;
border-right-color: transparent!important;
border-left-color: transparent!important;
top: -5px;
}
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(A,m,T){A("./loader_build")(m);var y=A("./lib/dom"),f=A("./range").Range,h=A("./editor").Editor,a=A("./edit_session").EditSession,c=A("./undomanager").UndoManager,t=A("./virtual_renderer").VirtualRenderer;A("./worker/worker_client"),A("./keyboard/hash_handler"),A("./placeholder"),A("./multi_select"),A("./mode/folding/fold_mode"),A("./theme/textmate"),A("./ext/error_marker"),m.config=A("./config"),m.edit=function(r,e){if(typeof r=="string"){var n=r;if(!(r=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}var s,o;return r&&r.env&&r.env.editor instanceof h?r.env.editor:(n="",r&&/input|textarea/i.test(r.tagName)?(n=(s=r).value,r=y.createElement("pre"),s.parentNode.replaceChild(r,s)):r&&(n=r.textContent,r.innerHTML=""),n=m.createEditSession(n),r=new h(new t(r),n,e),o={document:n,editor:r,onResize:r.resize.bind(r,null)},s&&(o.textarea=s),r.on("destroy",function(){o.editor.container.env=null}),r.container.env=r.env=o,r)},m.createEditSession=function(r,e){return r=new a(r,e),r.setUndoManager(new c),r},m.Range=f,m.Editor=h,m.EditSession=a,m.UndoManager=c,m.VirtualRenderer=t,m.version=m.config.version}),ace.require(["ace/ace"],function(A){for(var m in A&&(A.config.init(!0),A.define=ace.define),window.ace||(window.ace=A),A)A.hasOwnProperty(m)&&(window.ace[m]=A[m]);window.ace.default=window.ace,le&&(le.exports=window.ace)})},4317:function(le,g,Z){le=Z.nmd(le),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(U,S,M){var r=U("./lib/dom"),K=U("./lib/oop"),j=U("./lib/event_emitter").EventEmitter,z=U("./lib/lang"),P=U("./range").Range,N=U("./range_list").RangeList,A=U("./keyboard/hash_handler").HashHandler,m=U("./tokenizer").Tokenizer,T=U("./clipboard"),y={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,n,s){return e=e.session.getTextRange(),s?e.replace(/\n\r?([ \t]*\S)/g,`
`+s+"$1"):e},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return T.getText&&T.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){return e=e.session.$mode||{},e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(e){return e=e.session.$mode||{},e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:f.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:f.bind(null,{year:"2-digit"}),CURRENT_MONTH:f.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:f.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:f.bind(null,{month:"short"}),CURRENT_DATE:f.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:f.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:f.bind(null,{weekday:"short"}),CURRENT_HOUR:f.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:f.bind(null,{minute:"2-digit"}),CURRENT_SECOND:f.bind(null,{second:"2-digit"})};function f(e){return e=new Date().toLocaleString("en-us",e),e.length==1?"0"+e:e}y.SELECTED_TEXT=y.SELECTION;function h(){this.snippetMap={},this.snippetNameMap={}}(function(){K.implement(this,j),this.getTokenizer=function(){return h.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function n(i){return i=i.substr(1),/^\d+$/.test(i)?[{tabstopId:parseInt(i,10)}]:[{text:i}]}function s(i){return"(?:[^\\\\"+i+"]|\\\\.)"}var o={regex:"/("+s("/")+"+)/",onMatch:function(i,l,d){return d=d[0],d.fmtString=!0,d.guard=i.slice(1,-1),d.flag=""},next:"formatString"};return h.$tokenizer=new m({start:[{regex:/\\./,onMatch:function(i,l,d){var C=i[1];return[i=C=="}"&&d.length||"`$\\".indexOf(C)!=-1?C:i]}},{regex:/}/,onMatch:function(i,l,d){return[d.length?d.shift():i]}},{regex:/\$(?:\d+|\w+)/,onMatch:n},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(i,l,d){return i=n(i.substr(1)),d.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+s("\\|")+"*\\|",onMatch:function(i,l,d){return i=i.slice(1,-1).replace(/\\[,|\\]|,/g,function(C){return C.length==2?C[1]:"\0"}).split("\0").map(function(C){return{value:C}}),[(d[0].choices=i)[0]]},next:"start"},o,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(i,l,d){return d.length&&d[0].expectElse?(d[0].expectElse=!1,d[0].ifEnd={elseEnd:d[0]},[d[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(i,l,d){var C=i[1];return C=="}"&&d.length||"`$\\".indexOf(C)!=-1?i=C:C=="n"?i=`
`:C=="t"?i=" ":"ulULE".indexOf(C)!=-1&&(i={changeCase:C,local:"a"<C}),[i]}},{regex:"/\\w*}",onMatch:function(i,l,d){return d=d.shift(),d&&(d.flag=i.slice(1,-1)),this.next=d&&d.tabstopId?"start":"",[d||i]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(i,l,d){return[{text:i.slice(1)}]}},{regex:/\${\w+/,onMatch:function(i,l,d){return i={text:i.slice(2)},d.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(i,l,d){return d=d.shift(),this.next=d&&d.tabstopId?"start":"",[d||i]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(i,l,d){return d[0].formatFunction=i.slice(2,-1),[d.shift()]},next:"formatString"},o,{regex:/:[\?\-+]?/,onMatch:function(i,l,d){i[1]=="+"&&(d[0].ifEnd=d[0]),i[1]=="?"&&(d[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(n,s){return this.getTokenizer().getLineTokens(n,s).tokens.map(function(o){return o.value||o})},this.getVariableValue=function(n,s,o){var i;return/^\d+$/.test(s)?(this.variables.__||{})[s]||"":/^[A-Z]\d+$/.test(s)?(this.variables[s[0]+"__"]||{})[s.substr(1)]||"":(s=s.replace(/^TM_/,""),!this.variables.hasOwnProperty(s)||(i=typeof(i=this.variables[s])=="function"?this.variables[s](n,s,o):i)==null?"":i)},this.variables=y,this.tmStrFormat=function(n,s,o){var i,l,d,C;return s.fmt?(i=s.flag||"",l=s.guard,l=new RegExp(l,i.replace(/[^gim]/g,"")),d=typeof s.fmt=="string"?this.tokenizeTmSnippet(s.fmt,"formatString"):s.fmt,C=this,n.replace(l,function(){for(var p=C.variables.__,w=(C.variables.__=[].slice.call(arguments),C.resolveVariables(d,o)),x="E",$=0;$<w.length;$++){var H,B=w[$];typeof B=="object"?(w[$]="",B.changeCase&&B.local?(H=w[$+1])&&typeof H=="string"&&(B.changeCase=="u"?w[$]=H[0].toUpperCase():w[$]=H[0].toLowerCase(),w[$+1]=H.substr(1)):B.changeCase&&(x=B.changeCase)):x=="U"?w[$]=B.toUpperCase():x=="L"&&(w[$]=B.toLowerCase())}return C.variables.__=p,w.join("")})):n},this.tmFormatFunction=function(n,s,o){return s.formatFunction=="upcase"?n.toUpperCase():s.formatFunction=="downcase"?n.toLowerCase():n},this.resolveVariables=function(n,s){for(var o=[],i="",l=!0,d=0;d<n.length;d++){var C,p=n[d];typeof p=="string"?(o.push(p),p==`
`?(l=!0,i=""):l&&(i=/^\t*/.exec(p)[0],l=/\S/.test(p))):p&&(l=!1,p.fmtString&&((C=n.indexOf(p,d+1))==-1&&(C=n.length),p.fmt=n.slice(d+1,C),d=C),p.text?(C=this.getVariableValue(s,p.text,i)+"",p.fmtString&&(C=this.tmStrFormat(C,p,s)),(C=p.formatFunction?this.tmFormatFunction(C,p,s):C)&&!p.ifEnd?(o.push(C),w(p)):!C&&p.ifEnd&&w(p.ifEnd)):p.elseEnd?w(p.elseEnd):p.tabstopId==null&&p.changeCase==null||o.push(p))}function w(x){x=n.indexOf(x,d+1),x!=-1&&(d=x)}return o};function e(n,s,o){o===void 0&&(o={});for(var i=n.getCursorPosition(),l=n.session.getLine(i.row),d=n.session.getTabString(),C=l.match(/^\s*/)[0],p=(i.column<C.length&&(C=C.slice(0,i.column)),s=s.replace(/\r/g,""),this.tokenizeTmSnippet(s)),w=(p=(p=this.resolveVariables(p,n)).map(function(_){return _!=`
`||o.excludeExtraIndent?typeof _=="string"?_.replace(/\t/g,d):_:_+C}),[]),x=(p.forEach(function(_,W){var F,J,Q;typeof _=="object"&&(Q=_.tabstopId,(F=w[Q])||((F=w[Q]=[]).index=Q,F.value="",F.parents={}),F.indexOf(_)===-1)&&(_.choices&&!F.choices&&(F.choices=_.choices),F.push(_),(J=p.indexOf(_,W+1))!==-1)&&((Q=p.slice(W+1,J)).some(function(X){return typeof X=="object"})&&!F.value?F.value=Q:!Q.length||F.value&&typeof F.value=="string"||(F.value=Q.join("")))}),w.forEach(function(_){_.length=0}),{}),$=0;$<p.length;$++){var H,B,O,u=p[$];typeof u=="object"&&(O=u.tabstopId,H=w[O],B=p.indexOf(u,$+1),x[O]?x[O]===u&&(delete x[O],Object.keys(x).forEach(function(_){H.parents[_]=!0})):(x[O]=u,typeof(O=H.value)!="string"?O=function(_){for(var W=[],F=0;F<_.length;F++){if(typeof(J=_[F])=="object"){if(x[J.tabstopId])continue;var J=W[_.lastIndexOf(J,F-1)]||{tabstopId:J.tabstopId}}W[F]=J}return W}(O):u.fmt&&(O=this.tmStrFormat(O,u,n)),p.splice.apply(p,[$+1,Math.max(0,B-$)].concat(O,u)),H.indexOf(u)===-1&&H.push(u)))}var I=0,L=0,v="";return p.forEach(function(_){var W;typeof _=="string"?(1<(W=_.split(`
`)).length?(L=W[W.length-1].length,I+=W.length-1):L+=_.length,v+=_):_&&(_.start?_.end={row:I,column:L}:_.start={row:I,column:L})}),{text:v,tabstops:w,tokens:p}}this.getDisplayTextForSnippet=function(n,s){return e.call(this,n,s).text},this.insertSnippetForSelection=function(p,i,d){var i=e.call(this,p,i,d=d===void 0?{}:d),l=p.getSelectionRange(),d=(d.range&&d.range.compareRange(l)===0&&(l=d.range),p.session.replace(l,i.text)),C=new a(p),p=p.inVirtualSelectionMode&&p.selection.index;C.addTabstops(i.tabstops,l.start,d,p)},this.insertSnippet=function(n,s,o){var i=this;if(!(o=o===void 0?{}:o).range||o.range instanceof P||(o.range=P.fromPoints(o.range.start,o.range.end)),n.inVirtualSelectionMode)return i.insertSnippetForSelection(n,s,o);n.forEachSelection(function(){i.insertSnippetForSelection(n,s,o)},null,{keepOrder:!0}),n.tabstopManager&&n.tabstopManager.tabNext()},this.$getScope=function(n){var s,o=n.session.$mode.$id||"";return(o=o.split("/").pop())!=="html"&&o!=="php"||(o!=="php"||n.session.$mode.inlinePhp||(o="html"),s=n.getCursorPosition(),(n=typeof(n=n.session.getState(s.row))=="object"?n[0]:n).substring&&(n.substring(0,3)=="js-"?o="javascript":n.substring(0,4)=="css-"?o="css":n.substring(0,4)=="php-"&&(o="php"))),o},this.getActiveScopes=function(s){var s=this.$getScope(s),o=[s],i=this.snippetMap;return i[s]&&i[s].includeScopes&&o.push.apply(o,i[s].includeScopes),o.push("_"),o},this.expandWithTab=function(n,s){var o=this,i=n.forEachSelection(function(){return o.expandSnippetForSelection(n,s)},null,{keepOrder:!0});return i&&n.tabstopManager&&n.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(n,s){var o,i=n.getCursorPosition(),l=n.session.getLine(i.row),d=l.substring(0,i.column),C=l.substr(i.column),p=this.snippetMap;return this.getActiveScopes(n).some(function(w){return w=p[w],!!(o=w?this.findMatchingSnippet(w,d,C):o)},this),!!o&&(s&&s.dryRun||(n.session.doc.removeInLine(i.row,i.column-o.replaceBefore.length,i.column+o.replaceAfter.length),this.variables.M__=o.matchBefore,this.variables.T__=o.matchAfter,this.insertSnippetForSelection(n,o.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(n,s,o){for(var i=n.length;i--;){var l=n[i];if((!l.startRe||l.startRe.test(s))&&(!l.endRe||l.endRe.test(o))&&(l.startRe||l.endRe))return l.matchBefore=l.startRe?l.startRe.exec(s):[""],l.matchAfter=l.endRe?l.endRe.exec(o):[""],l.replaceBefore=l.triggerRe?l.triggerRe.exec(s)[0]:"",l.replaceAfter=l.endTriggerRe?l.endTriggerRe.exec(o)[0]:"",l}},this.snippetMap={},this.snippetNameMap={},this.register=function(n,s){var o=this.snippetMap,i=this.snippetNameMap,l=this;function d(w){return(w=w&&!/^\^?\(.*\)\$?$|^\\b$/.test(w)?"(?:"+w+")":w)||""}function C(w,x,$){return w=d(w),x=d(x),$?(w=x+w)&&w[w.length-1]!="$"&&(w+="$"):(w+=x)&&w[0]!="^"&&(w="^"+w),new RegExp(w)}function p(w){w.scope||(w.scope=s||"_"),s=w.scope,o[s]||(o[s]=[],i[s]={});var x,$=i[s];w.name&&((x=$[w.name])&&l.unregister(x),$[w.name]=w),o[s].push(w),w.prefix&&(w.tabTrigger=w.prefix),!w.content&&w.body&&(w.content=Array.isArray(w.body)?w.body.join(`
`):w.body),w.tabTrigger&&!w.trigger&&(!w.guard&&/^\w/.test(w.tabTrigger)&&(w.guard="\\b"),w.trigger=z.escapeRegExp(w.tabTrigger)),(w.trigger||w.guard||w.endTrigger||w.endGuard)&&(w.startRe=C(w.trigger,w.guard,!0),w.triggerRe=new RegExp(w.trigger),w.endRe=C(w.endTrigger,w.endGuard,!0),w.endTriggerRe=new RegExp(w.endTrigger))}n=n||[],Array.isArray(n)?n.forEach(p):Object.keys(n).forEach(function(w){p(n[w])}),this._signal("registerSnippets",{scope:s})},this.unregister=function(n,s){var o=this.snippetMap,i=this.snippetNameMap;function l(d){var C=i[d.scope||s];C&&C[d.name]&&(delete C[d.name],0<=(d=(C=o[d.scope||s])&&C.indexOf(d)))&&C.splice(d,1)}n.content?l(n):Array.isArray(n)&&n.forEach(l)},this.parseSnippetFile=function(n){n=n.replace(/\r/g,"");for(var s,o,i,l=[],d={},C=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;o=C.exec(n);){if(o[1])try{d=JSON.parse(o[1]),l.push(d)}catch{}o[4]?(d.content=o[4].replace(/^\t/gm,""),l.push(d),d={}):(s=o[2],o=o[3],s=="regex"?(d.guard=(i=/\/((?:[^\/\\]|\\.)*)|$/g).exec(o)[1],d.trigger=i.exec(o)[1],d.endTrigger=i.exec(o)[1],d.endGuard=i.exec(o)[1]):s=="snippet"?(d.tabTrigger=o.match(/^\S*/)[0],d.name||(d.name=o)):s&&(d[s]=o))}return l},this.getSnippetByName=function(n,s){var o,i=this.snippetNameMap;return this.getActiveScopes(s).some(function(l){return l=i[l],!!(o=l?l[n]:o)},this),o}}).call(h.prototype);var a=function(e){if(e.tabstopManager)return e.tabstopManager;(e.tabstopManager=this).$onChange=this.onChange.bind(this),this.$onChangeSelection=z.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)},c=(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var n=e.action[0]=="r",s=this.selectedTabstop||{},o=s.parents||{},i=(this.tabstops||[]).slice(),l=0;l<i.length;l++){var d=i[l],C=d==s||o[d.index];if(d.rangeList.$bias=C?0:1,e.action=="remove"&&d!==s)for(var C=d.parents&&d.parents[s.index],p=(p=d.rangeList.pointIndex(e.start,C))<0?-p-1:p+1,C=d.rangeList.pointIndex(e.end,C),w=d.rangeList.ranges.slice(p,C<0?-C-1:C-1),x=0;x<w.length;x++)this.removeRange(w[x]);d.rangeList.$onChange(e)}var $=this.editor.session;this.$inChange||!n||$.getLength()!=1||$.getValue()||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.editor.session,s=n.getTextRange(e.firstNonLinked),o=0;o<e.length;o++){var i,l=e[o];l.linked&&(i=l.original,i=S.snippetManager.tmStrFormat(s,i,this.editor),n.replace(l,i))}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,n=this.editor.selection.anchor,s=this.editor.selection.isEmpty(),o=0;o<this.ranges.length;o++)if(!this.ranges[o].linked){var i=this.ranges[o].contains(e.row,e.column),l=s||this.ranges[o].contains(n.row,n.column);if(i&&l)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(s){var n=this.tabstops.length,s=this.index+(s||1),s=Math.min(Math.max(s,1),n);this.selectTabstop(s=s==n?0:s),s===0&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var n=this.tabstops[this.index];if(n&&this.addTabstopMarkers(n),this.index=e,(n=this.tabstops[this.index])&&n.length){if(e=(this.selectedTabstop=n).firstNonLinked||n,n.choices&&(e.cursor=e.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(e);else{var s=this.editor.multiSelect;s.toSingleRange(e);for(var o=0;o<n.length;o++)n.hasLinkedRanges&&n[o].linked||s.addRange(n[o].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(e,n,s){var o=this.useLink||!this.editor.getOption("enableMultiselect");this.$openTabstops||(this.$openTabstops=[]),e[0]||(s=P.fromPoints(s,s),t(s.start,n),t(s.end,n),e[0]=[s],e[0].index=0);var i=[this.index+1,0],l=this.ranges;e.forEach(function(d,C){for(var p=this.$openTabstops[C]||d,w=0;w<d.length;w++){var x=d[w],$=P.fromPoints(x.start,x.end||x.start);c($.start,n),c($.end,n),$.original=x,$.tabstop=p,l.push($),p!=d?p.unshift($):p[w]=$,x.fmtString||p.firstNonLinked&&o?($.linked=!0,p.hasLinkedRanges=!0):p.firstNonLinked||(p.firstNonLinked=$)}p.firstNonLinked||(p.hasLinkedRanges=!1),p===d&&(i.push(p),this.$openTabstops[C]=p),this.addTabstopMarkers(p),p.rangeList=p.rangeList||new N,p.rangeList.$bias=0,p.rangeList.addList(p)},this),2<i.length&&(this.tabstops.length&&i.push(i.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,i))},this.addTabstopMarkers=function(e){var n=this.editor.session;e.forEach(function(s){s.markerId||(s.markerId=n.addMarker(s,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var n=this.editor.session;e.forEach(function(s){n.removeMarker(s.markerId),s.markerId=null})},this.removeRange=function(e){var n=e.tabstop.indexOf(e);n!=-1&&e.tabstop.splice(n,1),(n=this.ranges.indexOf(e))!=-1&&this.ranges.splice(n,1),(n=e.tabstop.rangeList.ranges.indexOf(e))!=-1&&e.tabstop.splice(n,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||((n=this.tabstops.indexOf(e.tabstop))!=-1&&this.tabstops.splice(n,1),this.tabstops.length)||this.detach()},this.keyboardHandler=new A,this.keyboardHandler.bindKeys({Tab:function(e){S.snippetManager&&S.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}})}.call(a.prototype),function(e,n){e.row==0&&(e.column+=n.column),e.row+=n.row}),t=function(e,n){e.row==n.row&&(e.column-=n.column),e.row-=n.row},r=(r.importCssString(`
.ace_snippet-marker {
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(194, 193, 208, 0.09);
border: 1px dotted rgba(211, 208, 235, 0.62);
position: absolute;
}`,"snippets.css",!1),S.snippetManager=new h,U("./editor").Editor);(function(){this.insertSnippet=function(e,n){return S.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return S.snippetManager.expandWithTab(this,e)}}).call(r.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(U,S,M){function K(h){return"suggest-aria-id:".concat(h)}function j(h){return(h=new P(h)).$maxLines=4,(h=new N(h)).setHighlightActiveLine(!1),h.setShowPrintMargin(!1),h.renderer.setShowGutter(!1),h.renderer.setHighlightGutterLine(!1),h.$mouseHandler.$focusTimeout=0,h.$highlightTagPending=!0,h}function z(h){function a(){}function c(){o(-1)}var t,r=y.createElement("div"),e=new j(r),n=(h&&h.appendChild(r),r.style.display="none",e.renderer.content.style.cursor="default",e.renderer.setStyle("ace_autocomplete"),e.renderer.container.setAttribute("role","listbox"),e.renderer.container.setAttribute("aria-label",f("Autocomplete suggestions")),e.setOption("displayIndentGuides",!1),e.setOption("dragDelay",150),e.focus=a,e.$isFocused=!0,e.renderer.$cursorLayer.restartTimer=a,e.renderer.$cursorLayer.element.style.opacity=0,e.renderer.$maxLines=8,e.renderer.$keepTextAreaAtCursor=!1,e.setHighlightActiveLine(!1),e.session.highlight(""),e.session.$searchHighlight.clazz="ace_highlight-marker",e.on("mousedown",function(i){var l=i.getDocumentPosition();e.selection.moveToPosition(l),s.start.row=s.end.row=l.row,i.stop()}),new A(-1,0,-1,1/0)),s=new A(-1,0,-1,1/0),o=(s.id=e.session.addMarker(s,"ace_active-line","fullLine"),e.setSelectOnHover=function(i){i?n.id&&(e.session.removeMarker(n.id),n.id=null):n.id=e.session.addMarker(n,"ace_line-hover","fullLine")},e.setSelectOnHover(!1),e.on("mousemove",function(i){var l;t?t.x==i.x&&t.y==i.y||((t=i).scrollTop=e.renderer.scrollTop,l=t.getDocumentPosition().row,n.start.row!=l&&(n.id||e.setRow(l),o(l))):t=i}),e.renderer.on("beforeRender",function(){var i;t&&n.start.row!=-1&&(t.$pos=null,i=t.getDocumentPosition().row,n.id||e.setRow(i),o(i,!0))}),e.renderer.on("afterRender",function(){var i=e.getRow(),l=e.renderer.$textLayer,d=l.element.childNodes[i-l.config.firstRow],C=document.activeElement;d!==l.selectedNode&&l.selectedNode&&(y.removeCssClass(l.selectedNode,"ace_selected"),C.removeAttribute("aria-activedescendant"),l.selectedNode.removeAttribute("id")),(l.selectedNode=d)&&(y.addCssClass(d,"ace_selected"),l=K(i),d.id=l,e.renderer.container.setAttribute("aria-activedescendant",l),C.setAttribute("aria-activedescendant",l),d.setAttribute("role","option"),d.setAttribute("aria-label",e.getData(i).value),d.setAttribute("aria-setsize",e.data.length),d.setAttribute("aria-posinset",i))}),function(i,l){i!==n.start.row&&(n.start.row=n.end.row=i,l||e.session._emit("changeBackMarker"),e._emit("changeHoverMarker"))});return e.getHoveredRow=function(){return n.start.row},m.addListener(e.container,"mouseout",c),e.on("hide",c),e.on("changeSelection",c),e.session.doc.getLength=function(){return e.data.length},e.session.doc.getLine=function(i){return i=e.data[i],typeof i=="string"?i:i&&i.value||""},(h=e.session.bgTokenizer).$tokenizeRow=function(i){var l=e.data[i],d=[];if(l){for(var C,p,w=(l=typeof l=="string"?{value:l}:l).caption||l.value||l.name,x=w.toLowerCase(),$=(e.filterText||"").toLowerCase(),H=0,B=0,O=0;O<=$.length;O++)O!=B&&(l.matchMask&1<<O||O==$.length)&&(C=$.slice(B,O),B=O,(p=x.indexOf(C,H))!=-1)&&(u(w.slice(H,p),""),H=p+C.length,u(w.slice(p,H),"completion-highlight"));u(w.slice(H,w.length),""),l.meta&&d.push({type:"completion-meta",value:l.meta}),l.message&&d.push({type:"completion-message",value:l.message})}return d;function u(I,L){I&&d.push({type:(l.className||"")+(L||""),value:I})}},h.$updateOnChange=a,h.start=a,e.session.$computeWidth=function(){return this.screenWidth=0},e.isOpen=!1,e.isTopdown=!1,e.autoSelect=!0,e.filterText="",e.data=[],e.setData=function(i,l){e.filterText=l||"",e.setValue(T.stringRepeat(`
`,i.length),-1),e.data=i||[],e.setRow(0)},e.getData=function(i){return e.data[i]},e.getRow=function(){return s.start.row},e.setRow=function(i){i=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,i)),s.start.row!=i&&(e.selection.clearSelection(),s.start.row=s.end.row=i||0,e.session._emit("changeBackMarker"),e.moveCursorTo(i||0,0),e.isOpen)&&e._signal("select")},e.on("changeSelection",function(){e.isOpen&&e.setRow(e.selection.lead.row),e.renderer.scrollCursorIntoView()}),e.hide=function(){this.container.style.display="none",e.anchorPos=null,e.anchor=null,e.isOpen&&(e.isOpen=!1,this._signal("hide"))},e.tryShow=function(i,l,d,C){if(C||!e.isOpen||!e.anchorPos||!e.anchor||e.anchorPos.top!==i.top||e.anchorPos.left!==i.left||e.anchor!==d){var p=this.container,w=window.innerHeight,x=window.innerWidth,$=this.renderer,H=$.$maxLines*l*1.4,B={top:0,bottom:0,left:0},O=w-i.top-3*this.$borderSize-l,u=i.top-3*this.$borderSize,l=((d=d||(u<=O||H<=O?"bottom":"top"))==="top"?(B.bottom=i.top-this.$borderSize,B.top=B.bottom-H):d==="bottom"&&(B.top=i.top+l+this.$borderSize,B.bottom=B.top+H),0<=B.top&&B.bottom<=w);if(!C&&!l)return!1;$.$maxPixelHeight=l?null:d==="top"?u:O,d==="top"?(p.style.top="",p.style.bottom=w-B.bottom+"px",e.isTopdown=!1):(p.style.top=B.top+"px",p.style.bottom="",e.isTopdown=!0),p.style.display="",H=i.left,H+p.offsetWidth>x&&(H=x-p.offsetWidth),p.style.left=H+"px",p.style.right="",e.isOpen||(e.isOpen=!0,this._signal("show"),t=null),e.anchorPos=i,e.anchor=d}return!0},e.show=function(i,l,d){this.tryShow(i,l,d?"bottom":void 0,!0)},e.goTo=function(i){var l=this.getRow(),d=this.session.getLength()-1;switch(i){case"up":l=l<=0?d:l-1;break;case"down":l=d<=l?-1:l+1;break;case"start":l=0;break;case"end":l=d}this.setRow(l)},e.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},e.$imageSize=0,e.$borderSize=1,e}var P=U("../virtual_renderer").VirtualRenderer,N=U("../editor").Editor,A=U("../range").Range,m=U("../lib/event"),T=U("../lib/lang"),y=U("../lib/dom"),f=U("../config").nls;y.importCssString(`
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #CAD6FA;
z-index: 1;
}
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #3a674e;
}
.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid #abbffe;
margin-top: -1px;
background: rgba(233,233,253,0.4);
position: absolute;
z-index: 2;
}
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid rgba(109, 150, 13, 0.8);
background: rgba(58, 103, 78, 0.62);
}
.ace_completion-meta {
opacity: 0.5;
margin: 0 0.9em;
}
.ace_completion-message {
color: blue;
}
.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #2d69c7;
}
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #93ca12;
}
.ace_editor.ace_autocomplete {
width: 300px;
z-index: 200000;
border: 1px lightgray solid;
position: fixed;
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
line-height: 1.4;
background: #fefefe;
color: #111;
}
.ace_dark.ace_editor.ace_autocomplete {
border: 1px #484747 solid;
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
line-height: 1.4;
background: #25282c;
color: #c1c1c1;
}
.ace_autocomplete_right .ace_text-layer {
width: calc(100% - 8px);
}
.ace_autocomplete_right .ace_line {
display: flex;
}
.ace_autocomplete_right .ace_completion-meta {
flex: 1;
text-align: right;
}
`,"autocompletion.css",!1),S.AcePopup=z,S.$singleLineEditor=j,S.getAriaId=K}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(U,S,M){var K=U("../snippets").snippetManager;function j(){this.editor=null}j.prototype.show=function(z,P,N){return N=N||"",z&&this.editor&&this.editor!==z&&(this.hide(),this.editor=null),!(!z||!P||!(P=P.snippet?K.getDisplayTextForSnippet(z,P.snippet):P.value)||!P.startsWith(N)||(this.editor=z,(P=P.slice(N.length))===""?z.removeGhostText():z.setGhostText(P),0))},j.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},j.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},j.prototype.destroy=function(){this.hide(),this.editor=null},S.AceInline=j}),ace.define("ace/autocomplete/util",["require","exports","module"],function(U,S,M){S.parForEach=function(j,z,P){var N=0,A=j.length;A===0&&P();for(var m=0;m<A;m++)z(j[m],function(T,y){++N===A&&P(T,y)})};var K=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;S.retrievePrecedingIdentifier=function(j,z,P){P=P||K;for(var N=[],A=z-1;0<=A&&P.test(j[A]);A--)N.push(j[A]);return N.reverse().join("")},S.retrieveFollowingIdentifier=function(j,z,P){P=P||K;for(var N=[],A=z;A<j.length&&P.test(j[A]);A++)N.push(j[A]);return N},S.getCompletionPrefix=function(j){var z,P=j.getCursorPosition(),N=j.session.getLine(P.row);return j.completers.forEach(function(A){A.identifierRegexps&&A.identifierRegexps.forEach(function(m){!z&&m&&(z=this.retrievePrecedingIdentifier(N,P.column,m))}.bind(this))}.bind(this)),z||this.retrievePrecedingIdentifier(N,P.column)}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],function(U,S,M){function K(n,s){s.completer&&s.completer.destroy()}var j=U("./keyboard/hash_handler").HashHandler,z=U("./autocomplete/popup").AcePopup,P=U("./autocomplete/inline").AceInline,N=U("./autocomplete/popup").getAriaId,A=U("./autocomplete/util"),m=U("./lib/lang"),T=U("./lib/dom"),y=U("./snippets").snippetManager,f=U("./config"),h=(a.prototype.$init=function(){return this.popup=new z(document.body||document.documentElement),this.popup.on("click",function(n){this.insertMatch(),n.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupChange.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},a.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new P,this.inlineRenderer},a.prototype.getPopup=function(){return this.popup||this.$init()},a.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip()},a.prototype.$onPopupChange=function(n){var s;this.inlineRenderer&&this.inlineEnabled&&(n=n?null:this.popup.getData(this.popup.getRow()),s=A.getCompletionPrefix(this.editor),this.inlineRenderer.show(this.editor,n,s)||this.inlineRenderer.hide(),this.$updatePopupPosition()),this.tooltipTimer.call(null,null)},a.prototype.$updatePopupPosition=function(){var n=this.editor,s=n.renderer,o=s.layerConfig.lineHeight,i=s.$cursorLayer.getPixelPosition(this.base,!0),l=(i.left-=this.popup.getTextLeftOffset(),n.container.getBoundingClientRect()),l=(i.top+=l.top-s.layerConfig.offset,i.left+=l.left-n.renderer.scrollLeft,i.left+=s.gutterWidth,{top:i.top,left:i.left});s.$ghostText&&s.$ghostTextWidget&&this.base.row===s.$ghostText.position.row&&(l.top+=s.$ghostTextWidget.el.offsetHeight),this.popup.tryShow(l,o,"bottom")||this.popup.tryShow(i,o,"top")||this.popup.show(i,o)},a.prototype.openPopup=function(n,s,o){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:N(this.popup.getRow()),inline:this.inlineEnabled}),n.keyBinding.addKeyboardHandler(this.keyboardHandler),this.popup.setRow(this.autoSelect?0:-1),o?s||this.detach():(this.popup.setTheme(n.getTheme()),this.popup.setFontSize(n.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel()},a.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},a.prototype.changeListener=function(n){var s=this.editor.selection.lead;(s.row!=this.base.row||s.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},a.prototype.blurListener=function(n){var s=document.activeElement,o=this.editor.textInput.getElement(),i=n.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(n.relatedTarget),l=this.popup&&this.popup.container;s==o||s.parentNode==l||i||s==this.tooltipNode||n.relatedTarget==o||this.detach()},a.prototype.mousedownListener=function(n){this.detach()},a.prototype.mousewheelListener=function(n){this.detach()},a.prototype.goTo=function(n){this.popup.goTo(n)},a.prototype.insertMatch=function(n,s){var o;return!!(n=n||this.popup.getData(this.popup.getRow()))&&(o=this.completions,n=this.getCompletionProvider().insertMatch(this.editor,n,o.filterText,s),this.completions==o&&this.detach(),n)},a.prototype.showPopup=function(n,s){this.editor&&this.detach(),this.activated=!0,(this.editor=n).completer!=this&&(n.completer&&n.completer.detach(),n.completer=this),n.on("changeSelection",this.changeListener),n.on("blur",this.blurListener),n.on("mousedown",this.mousedownListener),n.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,s)},a.prototype.getCompletionProvider=function(){return this.completionProvider||(this.completionProvider=new c),this.completionProvider},a.prototype.gatherCompletions=function(n,s){return this.getCompletionProvider().gatherCompletions(n,s)},a.prototype.updateCompletions=function(n,s){var o,i;return n&&this.base&&this.completions?(o=this.editor.getCursorPosition(),(i=this.editor.session.getTextRange({start:this.base,end:o}))==this.completions.filterText?void 0:(this.completions.setFilter(i),this.completions.filtered.length&&(this.completions.filtered.length!=1||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,i,n):this.detach())):s&&s.matches?(o=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(o.row,o.column),this.base.$insertRight=!0,this.completions=new r(s.matches),this.openPopup(this.editor,"",n)):(s=this.editor.getSession(),o=this.editor.getCursorPosition(),i=A.getCompletionPrefix(this.editor),this.base=s.doc.createAnchor(o.row,o.column-i.length),this.base.$insertRight=!0,s={exactMatch:this.exactMatch},void this.getCompletionProvider().provideCompletions(this.editor,s,function(l,d,C){var p=d.filtered,w=A.getCompletionPrefix(this.editor);if(C){if(!p.length)return this.detach();if(p.length==1&&p[0].value==w&&!p[0].snippet)return this.detach();if(this.autoInsert&&p.length==1)return this.insertMatch(p[0])}this.completions=d,this.openPopup(this.editor,w,n)}.bind(this)))},a.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},a.prototype.updateDocTooltip=function(){var n=this.popup,s=n.data,o=s&&(s[n.getHoveredRow()]||s[n.getRow()]),i=null;if(!o||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var l=this.editor.completers.length,d=0;d<l;d++){var C=this.editor.completers[d];if(C.getDocTooltip&&o.completerId===C.id){i=C.getDocTooltip(o);break}}if(!(i=typeof(i=i||typeof o=="string"?i:o)=="string"?{docText:i}:i)||!i.docHTML&&!i.docText)return this.hideDocTooltip();this.showDocTooltip(i)},a.prototype.showDocTooltip=function(o){this.tooltipNode||(this.tooltipNode=T.createElement("div"),this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var s=this.editor.renderer.theme,s=(this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(s.isDark?"ace_dark ":"")+(s.cssClass||""),this.tooltipNode),o=(o.docHTML?s.innerHTML=o.docHTML:o.docText&&(s.textContent=o.docText),s.parentNode||document.body.appendChild(s),this.popup),i=o.container.getBoundingClientRect();s.style.top=o.container.style.top,s.style.bottom=o.container.style.bottom,s.style.display="block",window.innerWidth-i.right<320?i.left<320?(o.isTopdown?s.style.top=i.bottom+"px":s.style.top=o.container.offsetTop-s.offsetHeight+"px",s.style.left=i.left+"px",s.style.right="",s.style.bottom=""):(s.style.right=window.innerWidth-i.left+"px",s.style.left=""):(s.style.left=i.right+1+"px",s.style.right="")},a.prototype.hideDocTooltip=function(){var n;this.tooltipTimer.cancel(),this.tooltipNode&&(n=this.tooltipNode,this.editor.isFocused()||document.activeElement!=n||this.editor.focus(),this.tooltipNode=null,n.parentNode)&&n.parentNode.removeChild(n)},a.prototype.onTooltipClick=function(n){for(var s=n.target;s&&s!=this.tooltipNode;){if(s.nodeName=="A"&&s.href){s.rel="noreferrer",s.target="_blank";break}s=s.parentNode}},a.prototype.destroy=function(){var n;this.detach(),this.popup&&(this.popup.destroy(),n=this.popup.container)&&n.parentNode&&n.parentNode.removeChild(n),this.editor&&this.editor.completer==this&&(this.editor.off("destroy",K),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},a);function a(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new j,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=m.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=m.delayedCall(this.updateDocTooltip.bind(this),50)}h.prototype.commands={Up:function(n){n.completer.goTo("up")},Down:function(n){n.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(n){n.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(n){n.completer.goTo("end")},Esc:function(n){n.completer.detach()},Return:function(n){return n.completer.insertMatch()},"Shift-Return":function(n){n.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(n){var s=n.completer.insertMatch();if(s||n.tabstopManager)return s;n.completer.goTo("down")},PageUp:function(n){n.completer.popup.gotoPageUp()},PageDown:function(n){n.completer.popup.gotoPageDown()}},h.for=function(n){return n.completer instanceof h||(n.completer&&(n.completer.destroy(),n.completer=null),f.get("sharedPopups")?(h.$sharedInstance||(h.$sharedInstance=new h),n.completer=h.$sharedInstance):(n.completer=new h,n.once("destroy",K))),n.completer},h.startCommand={name:"startAutocomplete",exec:function(n,s){var o=h.for(n);o.autoInsert=!1,o.autoSelect=!0,o.showPopup(n,s),o.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"},t.prototype.insertByIndex=function(n,s,o){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(n,this.completions.filtered[s],o)},t.prototype.insertMatch=function(n,s,o){if(!s)return!1;if(n.startOperation({command:{name:"insertMatch"}}),s.completer&&s.completer.insertMatch)s.completer.insertMatch(n,s);else{if(!this.completions)return!1;if(this.completions.filterText)for(var i,l=n.selection.getAllRanges?n.selection.getAllRanges():[n.getSelectionRange()],d=0;i=l[d];d++)i.start.column-=this.completions.filterText.length,n.session.remove(i);s.snippet?y.insertSnippet(n,s.snippet,{range:s.range}):this.$insertString(n,s),s.command&&s.command==="startAutocomplete"&&n.execCommand(s.command)}return n.endOperation(),!0},t.prototype.$insertString=function(n,s){var o=s.value||s;if(s.range){if(n.inVirtualSelectionMode)return n.session.replace(s.range,o);n.forEachSelection(function(){var i=n.getSelectionRange();s.range.compareRange(i)===0?n.session.replace(s.range,o):n.insert(o)},null,{keepOrder:!0})}else n.execCommand("insertstring",o)},t.prototype.gatherCompletions=function(n,s){var o=n.getSession(),i=n.getCursorPosition(),l=A.getCompletionPrefix(n),d=[],C=n.completers.length;return n.completers.forEach(function(p,w){p.getCompletions(n,o,i,l,function(x,$){!x&&$&&(d=d.concat($)),s(null,{prefix:A.getCompletionPrefix(n),matches:d,finished:--C==0})})}),!0},t.prototype.provideCompletions=function(n,s,o){var i=function(C){var p=C.prefix,w=C.matches;this.completions=new r(w),s.exactMatch&&(this.completions.exactMatch=!0),s.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(p),(C.finished||this.completions.filtered.length)&&o(null,this.completions,C.finished)}.bind(this),l=!0,d=null;this.gatherCompletions(n,function(C,p){this.active&&(C&&(o(C,[],!0),this.detach()),p.prefix.indexOf(p.prefix)===0)&&(l?d=p:i(p))}.bind(this)),l=!1,d&&(n=d,d=null,i(n))},t.prototype.detach=function(){this.active=!1};var c=t;function t(){this.active=!0}e.prototype.setFilter=function(n){s=n.length>this.filterText&&n.lastIndexOf(this.filterText,0)===0?this.filtered:this.all,this.filterText=n,s=(s=this.filterCompletions(s,this.filterText)).sort(function(i,l){return l.exactMatch-i.exactMatch||l.$score-i.$score||(i.caption||i.value).localeCompare(l.caption||l.value)});var s,o=null;s=s.filter(function(i){return i=i.snippet||i.caption||i.value,i!==o&&(o=i,!0)}),this.filtered=s},e.prototype.filterCompletions=function(n,s){var o=[],i=s.toUpperCase(),l=s.toLowerCase();e:for(var d,C=0;d=n[C];C++){var p=!this.ignoreCaption&&d.caption||d.value||d.snippet;if(p){var w=-1,x=0,$=0;if(this.exactMatch){if(s!==p.substr(0,s.length))continue}else{var H=p.toLowerCase().indexOf(l);if(-1<H)$=H;else for(var B=0;B<s.length;B++){var O=p.indexOf(l[B],w+1),u=p.indexOf(i[B],w+1);if((O=0<=O&&(u<0||O<u)?O:u)<0)continue e;0<(u=O-w-1)&&(w===-1&&($+=10),$+=u,x|=1<<B),w=O}}d.matchMask=x,d.exactMatch=$?0:1,d.$score=(d.score||0)-$,o.push(d)}}return o};var r=e;function e(n,s){this.all=n,this.filtered=n,this.filterText=s||"",this.exactMatch=!1,this.ignoreCaption=!1}S.Autocomplete=h,S.CompletionProvider=c,S.FilteredList=r}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(U,S,M){var K=U("../range").Range,j=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function z(P,N){var A=P.getTextRange(K.fromPoints({row:0,column:0},N)).split(j).length-1,m=P.getValue().split(j),T=Object.create(null),y=m[A];return m.forEach(function(f,h){f&&f!==y&&(h=Math.abs(A-h),h=m.length-h,T[f]?T[f]=Math.max(h,T[f]):T[f]=h)}),T}S.getCompletions=function(P,N,A,m,T){var y=z(N,A);T(null,Object.keys(y).map(function(f){return{caption:f,value:f,score:y[f],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(U,S,M){function K(r,e){a(e.session.$mode)}function j(r){var e=r.editor,n=e.completer&&e.completer.activated;r.command.name==="backspace"?n&&!m.getCompletionPrefix(e)&&e.completer.detach():r.command.name==="insertstring"&&m.getCompletionPrefix(e)&&!n&&((r=P.for(e)).autoInsert=!1,r.showPopup(e))}var z=U("../snippets").snippetManager,P=U("../autocomplete").Autocomplete,N=U("../config"),A=U("../lib/lang"),m=U("../autocomplete/util"),t=U("../autocomplete/text_completer"),T={getCompletions:function(r,e,n,s,o){if(e.$mode.completer)return e.$mode.completer.getCompletions(r,e,n,s,o);r=r.session.getState(n.row),o(null,e.$mode.getCompletions(r,e,n,s).map(function(i){return i.completerId=T.id,i}))},id:"keywordCompleter"},y={getCompletions:function(r,l,n,s,o){var i=[],l=l.getTokenAt(n.row,n.column),d=(l&&l.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?i.push("html-tag"):i=z.getActiveScopes(r),z.snippetMap),C=[];i.forEach(function(p){for(var w=d[p]||[],x=w.length;x--;){var $=w[x],H=$.name||$.tabTrigger;H&&C.push({caption:H,snippet:$.content,meta:$.tabTrigger&&!$.name?$.tabTrigger+"\u21E5 ":"snippet",completerId:y.id})}},this),o(null,C)},getDocTooltip:function(r){var e;r.snippet&&!r.docHTML&&(r.docHTML=["<b>",A.escapeHTML(r.caption),"</b>","<hr></hr>",A.escapeHTML((r=r.snippet,e={},r.replace(/\${(\d+)(:(.*?))?}/g,function(n,s,o,i){return e[s]=i||""}).replace(/\$(\d+?)/g,function(n,s){return e[s]})))].join(""))},id:"snippetCompleter"},f=[y,t,T],h=(S.setCompleters=function(r){f.length=0,r&&f.push.apply(f,r)},S.addCompleter=function(r){f.push(r)},S.textCompleter=t,S.keyWordCompleter=T,S.snippetCompleter=y,{name:"expandSnippet",exec:function(r){return z.expandWithTab(r)},bindKey:"Tab"}),a=function(r){(r=typeof r=="string"?N.$modes[r]:r)&&(z.files||(z.files={}),c(r.$id,r.snippetFileId),r.modes)&&r.modes.forEach(a)},c=function(r,e){e&&r&&!z.files[r]&&(z.files[r]={},N.loadModule(e,function(n){n&&(!(z.files[r]=n).snippets&&n.snippetText&&(n.snippets=z.parseSnippetFile(n.snippetText)),z.register(n.snippets||[],n.scope),n.includeScopes)&&(z.snippetMap[n.scope].includeScopes=n.includeScopes,n.includeScopes.forEach(function(s){a("ace/mode/"+s)}))}))},t=U("../editor").Editor;U("../config").defineOptions(t.prototype,"editor",{enableBasicAutocompletion:{set:function(r){r?(this.completers||(this.completers=Array.isArray(r)?r:f),this.commands.addCommand(P.startCommand)):this.commands.removeCommand(P.startCommand)},value:!1},enableLiveAutocompletion:{set:function(r){r?(this.completers||(this.completers=Array.isArray(r)?r:f),this.commands.on("afterExec",j)):this.commands.removeListener("afterExec",j)},value:!1},enableSnippets:{set:function(r){r?(this.commands.addCommand(h),this.on("changeMode",K),K(0,this)):(this.commands.removeCommand(h),this.off("changeMode",K))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(U){le&&(le.exports=U)})},3330:function(le,g,Z){le=Z.nmd(le),ace.define("ace/ext/searchbox.css",["require","exports","module"],function(U,S,M){M.exports=`
/* ------------------------------------------------------------------------------------------
* Editor Search Form
* --------------------------------------------------------------------------------------- */
.ace_search {
background-color: #ddd;
color: #666;
border: 1px solid #cbcbcb;
border-top: 0 none;
overflow: hidden;
margin: 0;
padding: 4px 6px 0 4px;
position: absolute;
top: 0;
z-index: 99;
white-space: normal;
}
.ace_search.left {
border-left: 0 none;
border-radius: 0px 0px 5px 0px;
left: 0;
}
.ace_search.right {
border-radius: 0px 0px 0px 5px;
border-right: 0 none;
right: 0;
}
.ace_search_form, .ace_replace_form {
margin: 0 20px 4px 0;
overflow: hidden;
line-height: 1.9;
}
.ace_replace_form {
margin-right: 0;
}
.ace_search_form.ace_nomatch {
outline: 1px solid red;
}
.ace_search_field {
border-radius: 3px 0 0 3px;
background-color: white;
color: black;
border: 1px solid #cbcbcb;
border-right: 0 none;
outline: 0;
padding: 0;
font-size: inherit;
margin: 0;
line-height: inherit;
padding: 0 6px;
min-width: 17em;
vertical-align: top;
min-height: 1.8em;
box-sizing: content-box;
}
.ace_searchbtn {
border: 1px solid #cbcbcb;
line-height: inherit;
display: inline-block;
padding: 0 6px;
background: #fff;
border-right: 0 none;
border-left: 1px solid #dcdcdc;
cursor: pointer;
margin: 0;
position: relative;
color: #666;
}
.ace_searchbtn:last-child {
border-radius: 0 3px 3px 0;
border-right: 1px solid #cbcbcb;
}
.ace_searchbtn:disabled {
background: none;
cursor: default;
}
.ace_searchbtn:hover {
background-color: #eef1f6;
}
.ace_searchbtn.prev, .ace_searchbtn.next {
padding: 0px 0.7em
}
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
content: "";
border: solid 2px #888;
width: 0.5em;
height: 0.5em;
border-width: 2px 0 0 2px;
display:inline-block;
transform: rotate(-45deg);
}
.ace_searchbtn.next:after {
border-width: 0 2px 2px 0 ;
}
.ace_searchbtn_close {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
border-radius: 50%;
border: 0 none;
color: #656565;
cursor: pointer;
font: 16px/16px Arial;
padding: 0;
height: 14px;
width: 14px;
top: 9px;
right: 7px;
position: absolute;
}
.ace_searchbtn_close:hover {
background-color: #656565;
background-position: 50% 100%;
color: white;
}
.ace_button {
margin-left: 2px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
opacity: 0.7;
border: 1px solid rgba(100,100,100,0.23);
padding: 1px;
box-sizing: border-box!important;
color: black;
}
.ace_button:hover {
background-color: #eee;
opacity:1;
}
.ace_button:active {
background-color: #ddd;
}
.ace_button.checked {
border-color: #3399ff;
opacity:1;
}
.ace_search_options{
margin-bottom: 3px;
text-align: right;
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select: none;
-ms-user-select: none;
user-select: none;
clear: both;
}
.ace_search_counter {
float: left;
font-family: arial;
padding: 0 8px;
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox.css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(U,S,M){var K=U("../lib/dom"),j=U("../lib/lang"),z=U("../lib/event"),P=U("./searchbox.css"),N=U("../keyboard/hash_handler").HashHandler,A=U("../lib/keys"),m=U("../config").nls,T=(K.importCssString(P,"ace_searchbox",!1),y.prototype.setEditor=function(f){f.searchBox=this,f.renderer.scroller.appendChild(this.element),this.editor=f},y.prototype.setSession=function(f){this.searchRange=null,this.$syncOptions(!0)},y.prototype.$initElements=function(f){this.searchBox=f.querySelector(".ace_search_form"),this.replaceBox=f.querySelector(".ace_replace_form"),this.searchOption=f.querySelector("[action=searchInSelection]"),this.replaceOption=f.querySelector("[action=toggleReplace]"),this.regExpOption=f.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=f.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=f.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=f.querySelector(".ace_search_counter")},y.prototype.$init=function(){var f=this.element,h=(this.$initElements(f),this);z.addListener(f,"mousedown",function(a){setTimeout(function(){h.activeInput.focus()},0),z.stopPropagation(a)}),z.addListener(f,"click",function(a){var c=(a.target||a.srcElement).getAttribute("action");c&&h[c]?h[c]():h.$searchBarKb.commands[c]&&h.$searchBarKb.commands[c].exec(h),z.stopPropagation(a)}),z.addCommandKeyListener(f,function(a,c,t){t=A.keyCodeToString(t),c=h.$searchBarKb.findKeyCommand(c,t),c&&c.exec&&(c.exec(h),z.stopEvent(a))}),this.$onChange=j.delayedCall(function(){h.find(!1,!1)}),z.addListener(this.searchInput,"input",function(){h.$onChange.schedule(20)}),z.addListener(this.searchInput,"focus",function(){h.activeInput=h.searchInput,h.searchInput.value&&h.highlight()}),z.addListener(this.replaceInput,"focus",function(){h.activeInput=h.replaceInput,h.searchInput.value&&h.highlight()})},y.prototype.setSearchRange=function(f){(this.searchRange=f)?this.searchRangeMarker=this.editor.session.addMarker(f,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},y.prototype.$syncOptions=function(f){K.setCssClass(this.replaceOption,"checked",this.searchRange),K.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",K.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),K.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),K.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var h=this.editor.getReadOnly();this.replaceOption.style.display=h?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!h?"":"none",this.find(!1,!1,f)},y.prototype.highlight=function(f){this.editor.session.highlight(f||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},y.prototype.find=function(f,h,a){f=!this.editor.find(this.searchInput.value,{skipCurrent:f,backwards:h,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:a,range:this.searchRange})&&this.searchInput.value,K.setCssClass(this.searchBox,"ace_nomatch",f),this.editor._emit("findSearchBox",{match:!f}),this.highlight(),this.updateCounter()},y.prototype.updateCounter=function(){var f=this.editor,h=f.$search.$options.re,a=0,c=0;if(h){var t,r,e=this.searchRange?f.session.getTextRange(this.searchRange):f.getValue(),n=f.session.doc.positionToIndex(f.selection.anchor);for(this.searchRange&&(n-=f.session.doc.positionToIndex(this.searchRange.start)),h.lastIndex=0;(r=h.exec(e))&&((t=r.index)<=n&&c++,!(999<++a))&&(r[0]||(h.lastIndex=t+=1,!(t>=e.length))););}this.searchCounter.textContent=m("$0 of $1",[c,999<a?"999+":a])},y.prototype.findNext=function(){this.find(!0,!1)},y.prototype.findPrev=function(){this.find(!0,!0)},y.prototype.findAll=function(){var f=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;K.setCssClass(this.searchBox,"ace_nomatch",f),this.editor._emit("findSearchBox",{match:!f}),this.highlight(),this.hide()},y.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},y.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},y.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},y.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},y.prototype.show=function(f,h){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=h,f&&(this.searchInput.value=f),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},y.prototype.isFocused=function(){var f=document.activeElement;return f==this.searchInput||f==this.replaceInput},y);function y(f,h,a){var c=K.createElement("div");K.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:m("Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"\u200B"],["span",{action:"findNext",class:"ace_searchbtn next"},"\u200B"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},m("All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:m("Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},m("Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},m("All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:m("Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:m("RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:m("CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:m("Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:m("Search In Selection")},"S"]]],c),this.element=c.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(f),K.importCssString(P,"ace_searchbox",f.container)}U=new N,U.bindKeys({"Ctrl-f|Command-f":function(f){var h=f.isReplace=!f.isReplace;f.replaceBox.style.display=h?"":"none",f.replaceOption.checked=!1,f.$syncOptions(),f.searchInput.focus()},"Ctrl-H|Command-Option-F":function(f){f.editor.getReadOnly()||(f.replaceOption.checked=!0,f.$syncOptions(),f.replaceInput.focus())},"Ctrl-G|Command-G":function(f){f.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(f){f.findPrev()},esc:function(f){setTimeout(function(){f.hide()})},Return:function(f){f.activeInput==f.replaceInput&&f.replace(),f.findNext()},"Shift-Return":function(f){f.activeInput==f.replaceInput&&f.replace(),f.findPrev()},"Alt-Return":function(f){f.activeInput==f.replaceInput&&f.replaceAll(),f.findAll()},Tab:function(f){(f.activeInput==f.replaceInput?f.searchInput:f.replaceInput).focus()}}),U.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(f){f.regExpOption.checked=!f.regExpOption.checked,f.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(f){f.caseSensitiveOption.checked=!f.caseSensitiveOption.checked,f.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(f){f.wholeWordOption.checked=!f.wholeWordOption.checked,f.$syncOptions()}},{name:"toggleReplace",exec:function(f){f.replaceOption.checked=!f.replaceOption.checked,f.$syncOptions()}},{name:"searchInSelection",exec:function(f){f.searchOption.checked=!f.searchRange,f.setSearchRange(f.searchOption.checked&&f.editor.getSelectionRange()),f.$syncOptions()}}]),N=new N([{bindKey:"Esc",name:"closeSearchBar",exec:function(f){f.searchBox.hide()}}]),T.prototype.$searchBarKb=U,T.prototype.$closeSearchBarKb=N,S.SearchBox=T,S.Search=function(f,h){(f.searchBox||new T(f)).show(f.session.getTextRange(),h)}}),ace.require(["ace/ext/searchbox"],function(U){le&&(le.exports=U)})},4091:function(le,g,Z){le=Z.nmd(le),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(z,S,M){function K(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}}var j=z("../lib/oop"),z=z("./text_highlight_rules").TextHighlightRules;j.inherits(K,z),S.JsonHighlightRules=K}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(U,S,M){function K(){}var j=U("../range").Range;(function(){this.checkOutdent=function(z,P){return!!/^\s+$/.test(z)&&/^\s*\}/.test(P)},this.autoOutdent=function(z,P){var N,A=z.getLine(P).match(/^(\s*\})/);return A&&(A=A[1].length,N=z.findMatchingBracket({row:P,column:A}))&&N.row!=P?(N=this.$getIndent(z.getLine(N.row)),void z.replace(new j(P,0,P,A-1),N)):0},this.$getIndent=function(z){return z.match(/^\s*/)[0]}}).call(K.prototype),S.MatchingBraceOutdent=K}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(z,P,M){var K=z("../../lib/oop"),j=z("../../range").Range,z=z("./fold_mode").FoldMode,P=P.FoldMode=function(N){N&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+N.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+N.end)))};K.inherits(P,z),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(N,A,m){var T=N.getLine(m);return!this.singleLineBlockCommentRe.test(T)||this.startRegionRe.test(T)||this.tripleStarBlockCommentRe.test(T)?!(N=this._getFoldWidgetBase(N,A,m))&&this.startRegionRe.test(T)?"start":N:""},this.getFoldWidgetRange=function(N,A,m,T){var y,f,h,a=N.getLine(m);return this.startRegionRe.test(a)?this.getCommentRegionBlock(N,a,m):(f=a.match(this.foldingStartMarker))?(h=f.index,f[1]?this.openingBracketBlock(N,f[1],m,h):((y=N.getCommentFoldRange(m,h+f[0].length,1))&&!y.isMultiLine()&&(T?y=this.getSectionRange(N,m):A!="all"&&(y=null)),y)):A!=="markbegin"&&(f=a.match(this.foldingStopMarker))?(h=f.index+f[0].length,f[1]?this.closingBracketBlock(N,f[1],m,h):N.getCommentFoldRange(m,h,-1)):void 0},this.getSectionRange=function(N,A){for(var m=(a=N.getLine(A)).search(/\S/),T=A,y=a.length,f=A+=1,h=N.getLength();++A<h;){var a,c=(a=N.getLine(A)).search(/\S/);if(c!==-1){if(c<m)break;var t=this.getFoldWidgetRange(N,"all",A);if(t){if(t.start.row<=T)break;if(t.isMultiLine())A=t.end.row;else if(m==c)break}f=A}}return new j(T,y,f,N.getLine(f).length)},this.getCommentRegionBlock=function(N,A,m){for(var T=A.search(/\s*$/),y=N.getLength(),f=m,h=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;++m<y;){A=N.getLine(m);var c=h.exec(A);if(c&&(c[1]?a--:a++,!a))break}if(f<m)return new j(f,T,m,A.length)}}.call(P.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(U,S,M){function K(){this.HighlightRules=P,this.$outdent=new N,this.$behaviour=new A,this.foldingRules=new m}var j=U("../lib/oop"),z=U("./text").Mode,P=U("./json_highlight_rules").JsonHighlightRules,N=U("./matching_brace_outdent").MatchingBraceOutdent,A=U("./behaviour/cstyle").CstyleBehaviour,m=U("./folding/cstyle").FoldMode,T=U("../worker/worker_client").WorkerClient;j.inherits(K,z),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(y,f,h){var a=this.$getIndent(f);return y=="start"&&f.match(/^.*[\{\(\[]\s*$/)&&(a+=h),a},this.checkOutdent=function(y,f,h){return this.$outdent.checkOutdent(f,h)},this.autoOutdent=function(y,f,h){this.$outdent.autoOutdent(f,h)},this.createWorker=function(y){var f=new T(["ace"],"ace/mode/json_worker","JsonWorker");return f.attachToDocument(y.getDocument()),f.on("annotate",function(h){y.setAnnotations(h.data)}),f.on("terminate",function(){y.clearAnnotations()}),f},this.$id="ace/mode/json"}.call(K.prototype),S.Mode=K}),ace.require(["ace/mode/json"],function(U){le&&(le.exports=U)})},8903:function(m,g,Z){var U=Z(5689),S=Z(3969),M=Z(5255),K=Z(4293),j=Z(3508),z=Z(3368),P=Z(742),N=Z(9394),A=Z(3724),m=((m.exports=h).prototype.validate=function(o,i){var l;if(typeof o=="string"){if(!(l=this.getSchema(o)))throw new Error('no schema with key or ref "'+o+'"')}else o=this._addSchema(o),l=o.validate||this._compile(o);return o=l(i),l.$async!==!0&&(this.errors=l.errors),o},h.prototype.compile=function(o,i){return o=this._addSchema(o,void 0,i),o.validate||this._compile(o)},h.prototype.addSchema=function(o,i,l,d){if(Array.isArray(o))for(var C=0;C<o.length;C++)this.addSchema(o[C],void 0,l,d);else{var p=this._getId(o);if(p!==void 0&&typeof p!="string")throw new Error("schema id must be string");n(this,i=S.normalizeId(i||p)),this._schemas[i]=this._addSchema(o,l,d,!0)}return this},h.prototype.addMetaSchema=function(o,i,l){return this.addSchema(o,i,l,!0),this},h.prototype.validateSchema=function(o,i){var l=o.$schema;if(l!==void 0&&typeof l!="string")throw new Error("$schema must be a string");if(!(l=l||this._opts.defaultMeta||function(d){var C=d._opts.meta;return d._opts.defaultMeta=typeof C=="object"?d._getId(C)||C:d.getSchema(T)?T:void 0,d._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);if(l=this.validate(l,o),!l&&i){if(o="schema is invalid: "+this.errorsText(),this._opts.validateSchema!="log")throw new Error(o);this.logger.error(o)}return l},h.prototype.getSchema=function(o){var i=a(this,o);switch(typeof i){case"object":return i.validate||this._compile(i);case"string":return this.getSchema(i);case"undefined":return function(l,d){var C=S.schema.call(l,{schema:{}},d);{var p,w,x;if(C)return p=C.schema,w=C.root,C=C.baseId,x=U.call(l,p,w,void 0,C),l._fragments[d]=new K({ref:d,fragment:!0,schema:p,root:w,baseId:C,validate:x}),x}}(this,o)}},h.prototype.removeSchema=function(o){if(o instanceof RegExp)c(this,this._schemas,o),c(this,this._refs,o);else switch(typeof o){case"undefined":return c(this,this._schemas),c(this,this._refs),this._cache.clear(),this;case"string":var i=a(this,o);return i&&this._cache.del(i.cacheKey),delete this._schemas[o],delete this._refs[o],this;case"object":i=this._opts.serialize,i=i?i(o):o,i=(this._cache.del(i),this._getId(o)),i&&(i=S.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},h.prototype.addFormat=function(o,i){return typeof i=="string"&&(i=new RegExp(i)),this._formats[o]=i,this},h.prototype.errorsText=function(o,i){if(!(o=o||this.errors))return"No errors";for(var l=(i=i||{}).separator===void 0?", ":i.separator,d=i.dataVar===void 0?"data":i.dataVar,C="",p=0;p<o.length;p++){var w=o[p];w&&(C+=d+w.dataPath+" "+w.message+l)}return C.slice(0,-l.length)},h.prototype._addSchema=function(o,x,l,d){if(typeof o!="object"&&typeof o!="boolean")throw new Error("schema should be object or boolean");var C=this._opts.serialize,C=C?C(o):o,p=this._cache.get(C);if(p)return p;d=d||this._opts.addUsedSchema!==!1,p=S.normalizeId(this._getId(o)),p&&d&&n(this,p);var w,x=this._opts.validateSchema!==!1&&!x;x&&!(w=p&&p==S.normalizeId(o.$schema))&&this.validateSchema(o,!0);var $=S.ids.call(this,o),$=new K({id:p,schema:o,localRefs:$,cacheKey:C,meta:l});return p[0]!="#"&&d&&(this._refs[p]=$),this._cache.put(C,$),x&&w&&this.validateSchema(o,!0),$},h.prototype._compile=function(o,i){if(o.compiling)return(o.validate=C).schema=o.schema,C.errors=null,C.root=i||C,o.schema.$async===!0&&(C.$async=!0),C;var l,d;o.compiling=!0,o.meta&&(l=this._opts,this._opts=this._metaOpts);try{d=U.call(this,o.schema,i,o.localRefs)}catch(p){throw delete o.validate,p}finally{o.compiling=!1,o.meta&&(this._opts=l)}return o.validate=d,o.refs=d.refs,o.refVal=d.refVal,o.root=d.root,d;function C(){var p=o.validate,w=p.apply(this,arguments);return C.errors=p.errors,w}},h.prototype.compileAsync=Z(9677),Z(7931)),m=(h.prototype.addKeyword=m.add,h.prototype.getKeyword=m.get,h.prototype.removeKeyword=m.remove,h.prototype.validateKeyword=m.validate,Z(5359)),T=(h.ValidationError=m.Validation,h.MissingRefError=m.MissingRef,h.$dataMetaSchema=N,"http://json-schema.org/draft-07/schema"),y=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],f=["/properties"];function h(o){if(!(this instanceof h))return new h(o);o=this._opts=A.copy(o)||{};var H=this,i=H._opts.logger;if(i===!1)H.logger={log:s,warn:s,error:s};else{if(!(typeof(i=i===void 0?console:i)=="object"&&i.log&&i.warn&&i.error))throw new Error("logger must implement log, warn and error methods");H.logger=i}if(this._schemas={},this._refs={},this._fragments={},this._formats=z(o.format),this._cache=o.cache||new M,this._loadingSchemas={},this._compilations=[],this.RULES=P(),this._getId=function(I){switch(I.schemaId){case"auto":return e;case"id":return t;default:return r}}(o),o.loopRequired=o.loopRequired||1/0,o.errorDataPath=="property"&&(o._errorDataPathProperty=!0),o.serialize===void 0&&(o.serialize=j),this._metaOpts=function(I){for(var L=A.copy(I._opts),v=0;v<y.length;v++)delete L[y[v]];return L}(this),o.formats){var l,d=this;for(l in d._opts.formats){var C=d._opts.formats[l];d.addFormat(l,C)}}if(o.keywords){var p,w=this;for(p in w._opts.keywords){var x=w._opts.keywords[p];w.addKeyword(p,x)}}var $,H=this,B=(H._opts.$data&&($=Z(894),H.addMetaSchema($,$.$id,!0)),H._opts.meta!==!1&&($=Z(6680),H._opts.$data&&($=N($,f)),H.addMetaSchema($,T,!0),H._refs["http://json-schema.org/schema"]=T),typeof o.meta=="object"&&this.addMetaSchema(o.meta),o.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),this),O=B._opts.schemas;if(O)if(Array.isArray(O))B.addSchema(O);else for(var u in O)B.addSchema(O[u],u)}function a(o,i){return i=S.normalizeId(i),o._schemas[i]||o._refs[i]||o._fragments[i]}function c(o,i,l){for(var d in i){var C=i[d];C.meta||l&&!l.test(d)||(o._cache.del(C.cacheKey),delete i[d])}}function t(o){return o.$id&&this.logger.warn("schema $id ignored",o.$id),o.id}function r(o){return o.id&&this.logger.warn("schema id ignored",o.id),o.$id}function e(o){if(o.$id&&o.id&&o.$id!=o.id)throw new Error("schema $id is different from id");return o.$id||o.id}function n(o,i){if(o._schemas[i]||o._refs[i])throw new Error('schema with key or id "'+i+'" already exists')}function s(){}},5255:function(le){le=le.exports=function(){this._cache={}},le.prototype.put=function(g,Z){this._cache[g]=Z},le.prototype.get=function(g){return this._cache[g]},le.prototype.del=function(g){delete this._cache[g]},le.prototype.clear=function(){this._cache={}}},9677:function(le,g,Z){var U=Z(5359).MissingRef;function S(M,K,j){var z=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof K=="function"&&(j=K,K=void 0);var P=N(M).then(function(){var A=z._addSchema(M,void 0,K);return A.validate||function m(T){try{return z._compile(T)}catch(f){if(f instanceof U)return y(f);throw f}function y(f){var h=f.missingSchema;if(c(h))throw new Error("Schema "+h+" is loaded but "+f.missingRef+" cannot be resolved");return f=z._loadingSchemas[h],f||(f=z._loadingSchemas[h]=z._opts.loadSchema(h)).then(a,a),f.then(function(t){if(!c(h))return N(t).then(function(){c(h)||z.addSchema(t,h,void 0,K)})}).then(function(){return m(T)});function a(){delete z._loadingSchemas[h]}function c(t){return z._refs[t]||z._schemas[t]}}}(A)});return j&&P.then(function(A){j(null,A)},j),P;function N(A){return A=A.$schema,A&&!z.getSchema(A)?S.call(z,{$ref:A},!0):Promise.resolve()}}le.exports=S},5359:function(le,g,Z){var U=Z(3969);function S(K,j,z){this.message=z||S.message(K,j),this.missingRef=U.url(K,j),this.missingSchema=U.normalizeId(U.fullPath(this.missingRef))}function M(K){return K.prototype=Object.create(Error.prototype),K.prototype.constructor=K}le.exports={Validation:M(function(K){this.message="validation failed",this.errors=K,this.ajv=this.validation=!0}),MissingRef:M(S)},S.message=function(K,j){return"can't resolve reference "+j+" from id "+K}},3368:function(le,g,j){var U=j(3724),S=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,M=[0,31,28,31,30,31,30,31,31,30,31,30,31],K=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,j=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,z=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,P=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,N=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,A=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,m=/^(?:\/(?:[^~/]|~0|~1)*)*$/,T=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,y=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function f(n){return U.copy(f[n=n=="full"?"full":"fast"])}function h(i){var s,o,i=i.match(S);return!!i&&(s=+i[1],o=+i[2],i=+i[3],1<=o)&&o<=12&&1<=i&&i<=(o!=2||(i=s)%4!=0||i%100==0&&i%400!=0?M[o]:29)}function a(d,s){var o,i,l,d=d.match(K);return!!d&&(o=d[1],i=d[2],l=d[3],d=d[5],o<=23&&i<=59&&l<=59||o==23&&i==59&&l==60)&&(!s||d)}(le.exports=f).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":P,url:N,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:j,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:e,uuid:A,"json-pointer":m,"json-pointer-uri-fragment":T,"relative-json-pointer":y},f.full={date:h,time:a,"date-time":function(n){return n=n.split(c),n.length==2&&h(n[0])&&a(n[1],!0)},uri:function(n){return t.test(n)&&z.test(n)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":P,url:N,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:j,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:e,uuid:A,"json-pointer":m,"json-pointer-uri-fragment":T,"relative-json-pointer":y};var c=/t|\s/i,t=/\/|:/,r=/[^\\]\\Z/;function e(n){if(r.test(n))return!1;try{return new RegExp(n),!0}catch{return!1}}},5689:function(le,g,Z){var U=Z(3969),S=Z(3724),M=Z(5359),K=Z(3508),j=Z(1869),z=S.ucs2length,P=Z(2303),N=M.Validation;function A(c,t,r,e){var n=this,s=this._opts,o=[void 0],i={},l=[],d={},C=[],p={},w=[],x=(t=t||{schema:c,refVal:o,refs:i},function(X,te,E){var G=m.call(this,X,te,E);return 0<=G?{index:G,compiling:!0}:(G=this._compilations.length,this._compilations[G]={schema:X,root:te,baseId:E},{index:G,compiling:!1})}.call(this,c,t,e)),$=this._compilations[x.index];if(x.compiling)return $.callValidate=I;var H=this._formats,B=this.RULES;try{var O=L(c,t,r,e),u=($.validate=O,$.callValidate);return u&&(u.schema=O.schema,u.errors=null,u.refs=O.refs,u.refVal=O.refVal,u.root=O.root,u.$async=O.$async,s.sourceCode)&&(u.source=O.source),O}finally{(function(X,te,E){X=m.call(this,X,te,E),0<=X&&this._compilations.splice(X,1)}).call(this,c,t,e)}function I(){var X=$.validate,te=X.apply(this,arguments);return I.errors=X.errors,te}function L(X,te,E,G){var V=!te||te.schema==X;if(te.schema!=t.schema)return A.call(n,X,te,E,G);E=X.$async===!0,G=j({isTop:!0,schema:X,isRoot:V,baseId:G,root:te,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:M.MissingRef,RULES:B,validate:j,util:S,resolve:U,resolveRef:v,usePattern:F,useDefault:J,useCustomRule:Q,opts:s,formats:H,logger:n.logger,self:n}),G=a(o,f)+a(l,T)+a(C,y)+a(w,h)+G,s.processCode&&(G=s.processCode(G,X));try{var b=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",G)(n,B,H,t,o,C,w,P,z,N);o[0]=b}catch(k){throw n.logger.error("Error compiling schema, function code:",G),k}return b.schema=X,b.errors=null,b.refs=i,b.refVal=o,b.root=V?b:te,E&&(b.$async=!0),s.sourceCode===!0&&(b.source={code:G,patterns:l,defaults:C}),b}function v(X,te,k){te=U.url(X,te);var G=i[te];if(G!==void 0)return W(V=o[G],b="refVal["+G+"]");if(!k&&t.refs&&(G=t.refs[te],G!==void 0))return W(V=t.refVal[G],b=_(te,V));var V,b=_(te),k=U.call(n,L,t,te);if((k=k===void 0&&(G=r&&r[te])?U.inlineRef(G,s.inlineRefs)?G:A.call(n,G,t,r,X):k)!==void 0)return V=k,G=i[G=te],o[G]=V,W(k,b);delete i[te]}function _(X,te){var E=o.length;return o[E]=te,"refVal"+(i[X]=E)}function W(X,te){return typeof X=="object"||typeof X=="boolean"?{code:te,schema:X,inline:!0}:{code:te,$async:X&&!!X.$async}}function F(X){var te=d[X];return te===void 0&&(te=d[X]=l.length,l[te]=X),"pattern"+te}function J(X){switch(typeof X){case"boolean":case"number":return""+X;case"string":return S.toQuotedString(X);case"object":var te,E;return X===null?"null":(te=K(X),(E=p[te])===void 0&&(E=p[te]=C.length,C[E]=X),"default"+E)}}function Q(X,te,E,G){if(n._opts.validateSchema!==!1){var b=X.definition.dependencies;if(b&&!b.every(function(Y){return Object.prototype.hasOwnProperty.call(E,Y)}))throw new Error("parent schema must have all required keywords: "+b.join(","));if(b=X.definition.validateSchema,b&&!b(te)){if(b="keyword schema is invalid: "+n.errorsText(b.errors),n._opts.validateSchema!="log")throw new Error(b);n.logger.error(b)}}var V,b=X.definition.compile,k=X.definition.inline,R=X.definition.macro;if(b)V=b.call(n,te,E,G);else if(R)V=R.call(n,te,E,G),s.validateSchema!==!1&&n.validateSchema(V,!0);else if(k)V=k.call(n,G,X.keyword,te,E);else if(!(V=X.definition.validate))return;if(V===void 0)throw new Error('custom keyword "'+X.keyword+'"failed to compile');return b=w.length,{code:"customRule"+b,validate:w[b]=V}}}function m(c,t,r){for(var e=0;e<this._compilations.length;e++){var n=this._compilations[e];if(n.schema==c&&n.root==t&&n.baseId==r)return e}return-1}function T(c,t){return"var pattern"+c+" = new RegExp("+S.toQuotedString(t[c])+");"}function y(c){return"var default"+c+" = defaults["+c+"];"}function f(c,t){return t[c]===void 0?"":"var refVal"+c+" = refVal["+c+"];"}function h(c){return"var customRule"+c+" = customRules["+c+"];"}function a(c,t){if(!c.length)return"";for(var r="",e=0;e<c.length;e++)r+=t(e,c);return r}le.exports=A},3969:function(le,g,Z){var U=Z(7533),S=Z(2303),M=Z(3724),K=Z(4293),j=Z(500);function z(t,r,e){var n,s,o,i=this._refs[e];if(typeof i=="string"){if(!this._refs[i])return z.call(this,t,r,i);i=this._refs[i]}return(i=i||this._schemas[e])instanceof K?T(i.schema,this._opts.inlineRefs)?i.schema:i.validate||this._compile(i):((i=P.call(this,r,e))&&(n=i.schema,r=i.root,o=i.baseId),n instanceof K?s=n.validate||t.call(this,n.schema,r,void 0,o):n!==void 0&&(s=T(n,this._opts.inlineRefs)?n:t.call(this,n,r,void 0,o)),s)}function P(t,r){var e=U.parse(r),n=f(e),s=y(this._getId(t.schema));if(Object.keys(t.schema).length===0||n!==s){var n=a(n),o=this._refs[n];if(typeof o=="string")return function(l,d,C){d=P.call(this,l,d);{var p,w;if(d)return p=d.schema,w=d.baseId,l=d.root,(d=this._getId(p))&&(w=c(w,d)),A.call(this,C,w,p,l)}}.call(this,t,o,e);if(o instanceof K)o.validate||this._compile(o);else{if(!((o=this._schemas[n])instanceof K))return;if(o.validate||this._compile(o),n==a(r))return{schema:o,root:t,baseId:s}}if(!(t=o).schema)return;s=y(this._getId(t.schema))}return A.call(this,e,s,t.schema,t)}(le.exports=z).normalizeId=a,z.fullPath=y,z.url=c,z.ids=function(t){var r=a(this._getId(t)),e={"":r},n={"":y(r,!1)},s={},o=this;return j(t,{allKeys:!0},function(i,l,d,C,p,w,x){if(l!==""){var $=o._getId(i),H=e[C],C=n[C]+"/"+p;if(x!==void 0&&(C+="/"+(typeof x=="number"?x:M.escapeFragment(x))),typeof $=="string"){if($=H=a(H?U.resolve(H,$):$),p=o._refs[$],(p=typeof p=="string"?o._refs[p]:p)&&p.schema){if(!S(i,p.schema))throw new Error('id "'+$+'" resolves to more than one schema')}else if($!=a(C))if($[0]=="#"){if(s[$]&&!S(i,s[$]))throw new Error('id "'+$+'" resolves to more than one schema');s[$]=i}else o._refs[$]=C}e[l]=H,n[l]=C}}),s},z.inlineRef=T,z.schema=P;var N=M.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function A(t,r,e,n){if(t.fragment=t.fragment||"",t.fragment.slice(0,1)=="/"){for(var s=t.fragment.split("/"),o=1;o<s.length;o++){var i=s[o];if(i){if((e=e[i=M.unescapeFragment(i)])===void 0)break;N[i]||((i=this._getId(e))&&(r=c(r,i)),e.$ref&&(i=c(r,e.$ref),i=P.call(this,n,i))&&(e=i.schema,n=i.root,r=i.baseId))}}return e!==void 0&&e!==n.schema?{schema:e,root:n,baseId:r}:void 0}}var m=M.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function T(t,r){return r!==!1&&(r===void 0||r===!0?function e(n){var s;if(Array.isArray(n)){for(var o=0;o<n.length;o++)if(typeof(s=n[o])=="object"&&!e(s))return!1}else for(var i in n)if(i=="$ref"||typeof(s=n[i])=="object"&&!e(s))return!1;return!0}(t):r?function e(n){var s,o=0;if(Array.isArray(n)){for(var i=0;i<n.length;i++)if(typeof(s=n[i])=="object"&&(o+=e(s)),o==1/0)return 1/0}else for(var l in n){if(l=="$ref")return 1/0;if(m[l])o++;else if(typeof(s=n[l])=="object"&&(o+=e(s)+1),o==1/0)return 1/0}return o}(t)<=r:void 0)}function y(t,r){return r!==!1&&(t=a(t)),f(U.parse(t))}function f(t){return U.serialize(t).split("#")[0]+"#"}var h=/#\/?$/;function a(t){return t?t.replace(h,""):""}function c(t,r){return r=a(r),U.resolve(t,r)}},742:function(le,g,Z){var U=Z(9646),S=Z(3724).toHash;le.exports=function(){var M=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],K=["type","$comment"];return M.all=S(K),M.types=S(["number","integer","string","array","object","boolean","null"]),M.forEach(function(j){j.rules=j.rules.map(function(z){var P,N;return typeof z=="object"&&(N=z[P=Object.keys(z)[0]],z=P,N.forEach(function(A){K.push(A),M.all[A]=!0})),K.push(z),M.all[z]={keyword:z,code:U[z],implements:N}}),M.all.$comment={keyword:"$comment",code:U.$comment},j.type&&(M.types[j.type]=j)}),M.keywords=S(K.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),M.custom={},M}},4293:function(le,g,Z){var U=Z(3724);le.exports=function(S){U.copy(S,this)}},6887:function(le){le.exports=function(g){for(var Z,U=0,S=g.length,M=0;M<S;)U++,55296<=(Z=g.charCodeAt(M++))&&Z<=56319&&M<S&&(64512&g.charCodeAt(M))==56320&&M++;return U}},3724:function(le,g,Z){function U(h,a,c,t){var r=t?" !== ":" === ",e=t?" || ":" && ",n=t?"!":"",s=t?"":"!";switch(h){case"null":return a+r+"null";case"array":return n+"Array.isArray("+a+")";case"object":return"("+n+a+e+"typeof "+a+r+'"object"'+e+s+"Array.isArray("+a+"))";case"integer":return"(typeof "+a+r+'"number"'+e+s+"("+a+" % 1)"+e+a+r+a+(c?e+n+"isFinite("+a+")":"")+")";case"number":return"(typeof "+a+r+'"'+h+'"'+(c?e+n+"isFinite("+a+")":"")+")";default:return"typeof "+a+r+'"'+h+'"'}}le.exports={copy:function(h,a){for(var c in a=a||{},h)a[c]=h[c];return a},checkDataType:U,checkDataTypes:function(h,a,c){{if(h.length===1)return U(h[0],a,c,!0);var t,r="",h=M(h);for(t in h.array&&h.object&&(r=h.null?"(":"(!"+a+" || ",r+="typeof "+a+' !== "object")',delete h.null,delete h.array,delete h.object),h.number&&delete h.integer,h)r+=(r?" && ":"")+U(t,a,c,!0);return r}},coerceToTypes:function(h,a){{if(!Array.isArray(a))return S[a]?[a]:h==="array"&&a==="array"?["array"]:void 0;for(var c=[],t=0;t<a.length;t++){var r=a[t];(S[r]||h==="array"&&r==="array")&&(c[c.length]=r)}return c.length?c:void 0}},toHash:M,getProperty:z,escapeQuotes:P,equal:Z(2303),ucs2length:Z(6887),varOccurences:function(h,a){return a+="[^0-9]",h=h.match(new RegExp(a,"g")),h?h.length:0},varReplace:function(h,a,c){return a+="([^0-9])",c=c.replace(/\$/g,"$$$$"),h.replace(new RegExp(a,"g"),c+"$1")},schemaHasRules:function(h,a){if(typeof h=="boolean")return!h;for(var c in h)if(a[c])return!0},schemaHasRulesExcept:function(h,a,c){if(typeof h=="boolean")return!h&&c!="not";for(var t in h)if(t!=c&&a[t])return!0},schemaUnknownRules:function(h,a){if(typeof h!="boolean"){for(var c in h)if(!a[c])return c}},toQuotedString:N,getPathExpr:function(h,a,c,t){return T(h,c?"'/' + "+a+(t?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):t?"'[' + "+a+" + ']'":"'[\\'' + "+a+" + '\\']'")},getPath:function(h,a,c){return c=N(c?"/"+y(a):z(a)),T(h,c)},getData:function(h,a,c){var t,r,e;if(h==="")return"rootData";if(h[0]=="/"){if(!A.test(h))throw new Error("Invalid JSON-pointer: "+h);t=h,r="rootData"}else{if(!(e=h.match(m)))throw new Error("Invalid JSON-pointer: "+h);if(h=+e[1],(t=e[2])=="#"){if(a<=h)throw new Error("Cannot access property/index "+h+" levels up, current level is "+a);return c[a-h]}if(a<h)throw new Error("Cannot access data "+h+" levels up, current level is "+a);if(r="data"+(a-h||""),!t)return r}for(var n=r,s=t.split("/"),o=0;o<s.length;o++){var i=s[o];i&&(r+=z(f(i)),n+=" && "+r)}return n},unescapeFragment:function(h){return f(decodeURIComponent(h))},unescapeJsonPointer:f,escapeFragment:function(h){return encodeURIComponent(y(h))},escapeJsonPointer:y};var S=M(["string","number","integer","boolean","null"]);function M(h){for(var a={},c=0;c<h.length;c++)a[h[c]]=!0;return a}var K=/^[a-z$_][a-z$_0-9]*$/i,j=/'|\\/g;function z(h){return typeof h=="number"?"["+h+"]":K.test(h)?"."+h:"['"+P(h)+"']"}function P(h){return h.replace(j,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function N(h){return"'"+P(h)+"'"}var A=/^\/(?:[^~]|~0|~1)*$/,m=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function T(h,a){return h=='""'?a:(h+" + "+a).replace(/([^\\])' \+ '/g,"$1")}function y(h){return h.replace(/~/g,"~0").replace(/\//g,"~1")}function f(h){return h.replace(/~1/g,"/").replace(/~0/g,"~")}},9394:function(le){var g=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];le.exports=function(Z,U){for(var S=0;S<U.length;S++){Z=JSON.parse(JSON.stringify(Z));for(var M=U[S].split("/"),K=Z,j=1;j<M.length;j++)K=K[M[j]];for(j=0;j<g.length;j++){var z=g[j],P=K[z];P&&(K[z]={anyOf:[P,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return Z}},5868:function(le,g,Z){Z=Z(6680),le.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Z.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Z.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},1796:function(le){le.exports=function(g,Z,U){var S,M,K,j,z,P=" ",N=g.level,A=g.dataLevel,m=g.schema[Z],T=g.schemaPath+g.util.getProperty(Z),y=g.errSchemaPath+"/"+Z,f=!g.opts.allErrors,h="data"+(A||""),a=g.opts.$data&&m&&m.$data,c=a?(P+=" var schema"+N+" = "+g.util.getData(m.$data,A,g.dataPathArr)+"; ","schema"+N):m,t=Z=="maximum",r=t?"exclusiveMaximum":"exclusiveMinimum",e=g.schema[r],n=g.opts.$data&&e&&e.$data,s=t?"<":">",o=t?">":"<",i=void 0;if(!a&&typeof m!="number"&&m!==void 0)throw new Error(Z+" must be number");if(!n&&e!==void 0&&typeof e!="number"&&typeof e!="boolean")throw new Error(r+" must be number or boolean");n?(A=g.util.getData(e.$data,A,g.dataPathArr),K="exclIsNumber"+N,j="' + "+(z="op"+N)+" + '",i=r,(l=l||[]).push(P=P+(" var schemaExcl"+N+" = "+A+"; ")+(" var "+(S="exclusive"+N)+"; var "+(M="exclType"+N)+" = typeof "+(A="schemaExcl"+N)+"; if ("+M+" != 'boolean' && "+M+" != 'undefined' && "+M+" != 'number') { ")),P="",g.createErrors!==!1?(P+=" { keyword: '"+(i||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(y)+" , params: {} ",g.opts.messages!==!1&&(P+=" , message: '"+r+" should be boolean' "),g.opts.verbose&&(P+=" , schema: validate.schema"+T+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+h+" "),P+=" } "):P+=" {} ",d=P,P=l.pop(),!g.compositeRule&&f?g.async?P+=" throw new ValidationError(["+d+"]); ":P+=" validate.errors = ["+d+"]; return false; ":P+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",P+=" } else if ( ",a&&(P+=" ("+c+" !== undefined && typeof "+c+" != 'number') || "),P+=" "+M+" == 'number' ? ( ("+S+" = "+c+" === undefined || "+A+" "+s+"= "+c+") ? "+h+" "+o+"= "+A+" : "+h+" "+o+" "+c+" ) : ( ("+S+" = "+A+" === true) ? "+h+" "+o+"= "+c+" : "+h+" "+o+" "+c+" ) || "+h+" !== "+h+") { var op"+N+" = "+S+" ? '"+s+"' : '"+s+"='; ",m===void 0&&(y=g.errSchemaPath+"/"+(i=r),c=A,a=n)):(j=s,(K=typeof e=="number")&&a?(z="'"+j+"'",P+=" if ( ",a&&(P+=" ("+c+" !== undefined && typeof "+c+" != 'number') || "),P+=" ( "+c+" === undefined || "+e+" "+s+"= "+c+" ? "+h+" "+o+"= "+e+" : "+h+" "+o+" "+c+" ) || "+h+" !== "+h+") { "):(K&&m===void 0?(S=!0,y=g.errSchemaPath+"/"+(i=r),c=e,o+="="):(K&&(c=Math[t?"min":"max"](e,m)),e===(!K||c)?(S=!0,y=g.errSchemaPath+"/"+(i=r),o+="="):(S=!1,j+="=")),z="'"+j+"'",P+=" if ( ",a&&(P+=" ("+c+" !== undefined && typeof "+c+" != 'number') || "),P+=" "+h+" "+o+" "+c+" || "+h+" !== "+h+") { ")),i=i||Z,(l=l||[]).push(P),P="",g.createErrors!==!1?(P+=" { keyword: '"+(i||"_limit")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(y)+" , params: { comparison: "+z+", limit: "+c+", exclusive: "+S+" } ",g.opts.messages!==!1&&(P=P+" , message: 'should be "+j+" "+(a?"' + "+c:c+"'")),g.opts.verbose&&(P=(P+=" , schema: ")+(a?"validate.schema"+T:""+m)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+h+" "),P+=" } "):P+=" {} ";var l,d=P;return P=l.pop(),!g.compositeRule&&f?g.async?P+=" throw new ValidationError(["+d+"]); ":P+=" validate.errors = ["+d+"]; return false; ":P+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",P+=" } ",f&&(P+=" else { "),P}},2407:function(le){le.exports=function(g,Z,U){var S,M=" ",K=g.level,T=g.dataLevel,j=g.schema[Z],z=g.schemaPath+g.util.getProperty(Z),P=g.errSchemaPath+"/"+Z,N=!g.opts.allErrors,A="data"+(T||""),m=g.opts.$data&&j&&j.$data,T=m?(M+=" var schema"+K+" = "+g.util.getData(j.$data,T,g.dataPathArr)+"; ","schema"+K):j;if(m||typeof j=="number")return M+="if ( ",m&&(M+=" ("+T+" !== undefined && typeof "+T+" != 'number') || "),(K=[]).push(M+=" "+A+".length "+((S=Z)=="maxItems"?">":"<")+" "+T+") { "),M="",g.createErrors!==!1?(M+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { limit: "+T+" } ",g.opts.messages!==!1&&(M=(M=(M+=" , message: 'should NOT have ")+(Z=="maxItems"?"more":"fewer")+" than ")+(m?"' + "+T+" + '":""+j)+" items' "),g.opts.verbose&&(M=(M+=" , schema: ")+(m?"validate.schema"+z:""+j)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),M+=" } "):M+=" {} ",S=M,M=K.pop(),!g.compositeRule&&N?g.async?M+=" throw new ValidationError(["+S+"]); ":M+=" validate.errors = ["+S+"]; return false; ":M+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+="} ",N&&(M+=" else { "),M;throw new Error(Z+" must be number")}},1250:function(le){le.exports=function(g,Z,U){var S,M=" ",K=g.level,T=g.dataLevel,j=g.schema[Z],z=g.schemaPath+g.util.getProperty(Z),P=g.errSchemaPath+"/"+Z,N=!g.opts.allErrors,A="data"+(T||""),m=g.opts.$data&&j&&j.$data,T=m?(M+=" var schema"+K+" = "+g.util.getData(j.$data,T,g.dataPathArr)+"; ","schema"+K):j;if(m||typeof j=="number")return M+="if ( ",m&&(M+=" ("+T+" !== undefined && typeof "+T+" != 'number') || "),g.opts.unicode===!1?M+=" "+A+".length ":M+=" ucs2length("+A+") ",(K=[]).push(M+=" "+((S=Z)=="maxLength"?">":"<")+" "+T+") { "),M="",g.createErrors!==!1?(M+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { limit: "+T+" } ",g.opts.messages!==!1&&(M=(M=(M+=" , message: 'should NOT be ")+(Z=="maxLength"?"longer":"shorter")+" than ")+(m?"' + "+T+" + '":""+j)+" characters' "),g.opts.verbose&&(M=(M+=" , schema: ")+(m?"validate.schema"+z:""+j)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),M+=" } "):M+=" {} ",S=M,M=K.pop(),!g.compositeRule&&N?g.async?M+=" throw new ValidationError(["+S+"]); ":M+=" validate.errors = ["+S+"]; return false; ":M+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+="} ",N&&(M+=" else { "),M;throw new Error(Z+" must be number")}},2596:function(le){le.exports=function(g,Z,U){var S,M=" ",K=g.level,T=g.dataLevel,j=g.schema[Z],z=g.schemaPath+g.util.getProperty(Z),P=g.errSchemaPath+"/"+Z,N=!g.opts.allErrors,A="data"+(T||""),m=g.opts.$data&&j&&j.$data,T=m?(M+=" var schema"+K+" = "+g.util.getData(j.$data,T,g.dataPathArr)+"; ","schema"+K):j;if(m||typeof j=="number")return M+="if ( ",m&&(M+=" ("+T+" !== undefined && typeof "+T+" != 'number') || "),(K=[]).push(M+=" Object.keys("+A+").length "+((S=Z)=="maxProperties"?">":"<")+" "+T+") { "),M="",g.createErrors!==!1?(M+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { limit: "+T+" } ",g.opts.messages!==!1&&(M=(M=(M+=" , message: 'should NOT have ")+(Z=="maxProperties"?"more":"fewer")+" than ")+(m?"' + "+T+" + '":""+j)+" properties' "),g.opts.verbose&&(M=(M+=" , schema: ")+(m?"validate.schema"+z:""+j)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),M+=" } "):M+=" {} ",S=M,M=K.pop(),!g.compositeRule&&N?g.async?M+=" throw new ValidationError(["+S+"]); ":M+=" validate.errors = ["+S+"]; return false; ":M+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+="} ",N&&(M+=" else { "),M;throw new Error(Z+" must be number")}},9486:function(le){le.exports=function(g,Z,U){var S=" ",M=g.schema[Z],K=g.schemaPath+g.util.getProperty(Z),j=g.errSchemaPath+"/"+Z,z=!g.opts.allErrors,P=g.util.copy(g),N="",A=(P.level++,"valid"+P.level),m=P.baseId,T=!0,y=M;if(y)for(var f,h=-1,a=y.length-1;h<a;)f=y[h+=1],(g.opts.strictKeywords?typeof f=="object"&&0<Object.keys(f).length||f===!1:g.util.schemaHasRules(f,g.RULES.all))&&(T=!1,P.schema=f,P.schemaPath=K+"["+h+"]",P.errSchemaPath=j+"/"+h,S+=" "+g.validate(P)+" ",P.baseId=m,z)&&(S+=" if ("+A+") { ",N+="}");return z&&(S+=T?" if (true) { ":" "+N.slice(0,-1)+" "),S}},5347:function(le){le.exports=function(g,z,U){var S=" ",A=g.level,P=g.dataLevel,M=g.schema[z],K=g.schemaPath+g.util.getProperty(z),j=g.errSchemaPath+"/"+z,z=!g.opts.allErrors,P="data"+(P||""),N="valid"+A,A="errs__"+A,m=g.util.copy(g),T="",y=(m.level++,"valid"+m.level);if(M.every(function(e){return g.opts.strictKeywords?typeof e=="object"&&0<Object.keys(e).length||e===!1:g.util.schemaHasRules(e,g.RULES.all)})){var f=m.baseId,h=(S+=" var "+A+" = errors; var "+N+" = false; ",g.compositeRule),a=(g.compositeRule=m.compositeRule=!0,M);if(a)for(var c,t=-1,r=a.length-1;t<r;)c=a[t+=1],m.schema=c,m.schemaPath=K+"["+t+"]",m.errSchemaPath=j+"/"+t,S+=" "+g.validate(m)+" ",m.baseId=f,S+=" "+N+" = "+N+" || "+y+"; if (!"+N+") { ",T+="}";g.compositeRule=m.compositeRule=h,S+=" "+T+" if (!"+N+") { var err = ",g.createErrors!==!1?(S+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(j)+" , params: {} ",g.opts.messages!==!1&&(S+=" , message: 'should match some schema in anyOf' "),g.opts.verbose&&(S+=" , schema: validate.schema"+K+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+P+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&z&&(g.async?S+=" throw new ValidationError(vErrors); ":S+=" validate.errors = vErrors; return false; "),S+=" } else { errors = "+A+"; if (vErrors !== null) { if ("+A+") vErrors.length = "+A+"; else vErrors = null; } ",g.opts.allErrors&&(S+=" } ")}else z&&(S+=" if (true) { ");return S}},923:function(le){le.exports=function(g,M,U){var S=" ",K=g.schema[M],M=g.errSchemaPath+"/"+M,K=(g.opts.allErrors,g.util.toQuotedString(K));return g.opts.$comment===!0?S+=" console.log("+K+");":typeof g.opts.$comment=="function"&&(S+=" self._opts.$comment("+K+", "+g.util.toQuotedString(M)+", validate.root.schema);"),S}},2617:function(le){le.exports=function(g,K,U){var T=" ",S=g.level,m=g.dataLevel,A=g.schema[K],M=g.schemaPath+g.util.getProperty(K),K=g.errSchemaPath+"/"+K,j=!g.opts.allErrors,z="data"+(m||""),P="valid"+S,N=g.opts.$data&&A&&A.$data,A=(N&&(T+=" var schema"+S+" = "+g.util.getData(A.$data,m,g.dataPathArr)+"; "),N||(T+=" var schema"+S+" = validate.schema"+M+";"),[]),m=(A.push(T+="var "+P+" = equal("+z+", schema"+S+"); if (!"+P+") { "),T="",g.createErrors!==!1?(T+=" { keyword: 'const' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(K)+" , params: { allowedValue: schema"+S+" } ",g.opts.messages!==!1&&(T+=" , message: 'should be equal to constant' "),g.opts.verbose&&(T+=" , schema: validate.schema"+M+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+z+" "),T+=" } "):T+=" {} ",T),T=A.pop();return!g.compositeRule&&j?g.async?T+=" throw new ValidationError(["+m+"]); ":T+=" validate.errors = ["+m+"]; return false; ":T+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",T+=" }",j&&(T+=" else { "),T}},2119:function(le){le.exports=function(g,K,U){var c=" ",h=g.level,z=g.dataLevel,S=g.schema[K],M=g.schemaPath+g.util.getProperty(K),K=g.errSchemaPath+"/"+K,j=!g.opts.allErrors,z="data"+(z||""),P="valid"+h,N="errs__"+h,A=g.util.copy(g),m=(A.level++,"valid"+A.level),h="i"+h,T=A.dataLevel=g.dataLevel+1,y="data"+T,a=g.baseId,f=g.opts.strictKeywords?typeof S=="object"&&0<Object.keys(S).length||S===!1:g.util.schemaHasRules(S,g.RULES.all),h=(c+="var "+N+" = errors;var "+P+";",f?(P=g.compositeRule,g.compositeRule=A.compositeRule=!0,A.schema=S,A.schemaPath=M,A.errSchemaPath=K,c+=" var "+m+" = false; for (var "+h+" = 0; "+h+" < "+z+".length; "+h+"++) { ",A.errorPath=g.util.getPathExpr(g.errorPath,h,g.opts.jsonPointers,!0),S=z+"["+h+"]",A.dataPathArr[T]=h,T=g.validate(A),A.baseId=a,g.util.varOccurences(T,y)<2?c+=" "+g.util.varReplace(T,y,S)+" ":c+=" var "+y+" = "+S+"; "+T+" ",c+=" if ("+m+") break; } ",g.compositeRule=A.compositeRule=P,c+=" if (!"+m+") {"):c+=" if ("+z+".length == 0) {",[]),a=(h.push(c),c="",g.createErrors!==!1?(c+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(K)+" , params: {} ",g.opts.messages!==!1&&(c+=" , message: 'should contain a valid item' "),g.opts.verbose&&(c+=" , schema: validate.schema"+M+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+z+" "),c+=" } "):c+=" {} ",c),c=h.pop();return!g.compositeRule&&j?g.async?c+=" throw new ValidationError(["+a+"]); ":c+=" validate.errors = ["+a+"]; return false; ":c+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else { ",f&&(c+=" errors = "+N+"; if (vErrors !== null) { if ("+N+") vErrors.length = "+N+"; else vErrors = null; } "),g.opts.allErrors&&(c+=" } "),c}},1793:function(le){le.exports=function(g,C,U){var S,M,K,j=" ",z=g.level,P=g.dataLevel,p=g.schema[C],N=g.schemaPath+g.util.getProperty(C),A=g.errSchemaPath+"/"+C,m=!g.opts.allErrors,T="data"+(P||""),y="valid"+z,f="errs__"+z,h=g.opts.$data&&p&&p.$data,a=h?(j+=" var schema"+z+" = "+g.util.getData(p.$data,P,g.dataPathArr)+"; ","schema"+z):p,c="definition"+z,t=this.definition,r="";if(h&&t.$data){var e="keywordValidate"+z,n=t.validateSchema;j+=" var "+c+" = RULES.custom['"+C+"'].definition; var "+e+" = "+c+".validate;"}else{if(!(l=g.useCustomRule(this,p,g.schema,g)))return;a="validate.schema"+N,e=l.code,S=t.compile,M=t.inline,K=t.macro}var s,o,i,l,d,C=e+".errors",p="i"+z,w="ruleErr"+z,x=t.async;if(x&&!g.async)throw new Error("async keyword in sync schema");return M||K||(j+=C+" = null;"),j+="var "+f+" = errors;var "+y+";",h&&t.$data&&(r+="}",j+=" if ("+a+" === undefined) { "+y+" = true; } else { ",n)&&(r+="}",j+=" "+y+" = "+c+".validateSchema("+a+"); if ("+y+") { "),M?t.statements?j+=" "+l.validate+" ":j+=" "+y+" = "+l.validate+"; ":K?(r="",(h=g.util.copy(g)).level++,s="valid"+h.level,h.schema=l.validate,h.schemaPath="",n=g.compositeRule,g.compositeRule=h.compositeRule=!0,c=g.validate(h).replace(/validate\.schema/g,e),g.compositeRule=h.compositeRule=n,j+=" "+c):((d=d||[]).push(j),j="",j+=" "+e+".call( ",g.opts.passContext?j+="this":j+="self",S||t.schema===!1?j+=" , "+T+" ":j+=" , "+a+" , "+T+" , validate.schema"+g.schemaPath+" ",j+=" , (dataPath || '')",g.errorPath!='""'&&(j+=" + "+g.errorPath),l=j+=" , "+(o=P?"data"+(P-1||""):"parentData")+" , "+(i=P?g.dataPathArr[P]:"parentDataProperty")+" , rootData ) ",j=d.pop(),t.errors===!1?(j+=" "+y+" = ",x&&(j+="await "),j+=l+"; "):j+=x?" var "+(C="customErrors"+z)+" = null; try { "+y+" = await "+l+"; } catch (e) { "+y+" = false; if (e instanceof ValidationError) "+C+" = e.errors; else throw e; } ":" "+C+" = null; "+y+" = "+l+"; "),t.modifying&&(j+=" if ("+o+") "+T+" = "+o+"["+i+"];"),j+=""+r,t.valid?m&&(j+=" if (true) { "):(j+=" if ( ",t.valid===void 0?j=j+" !"+(K?""+s:y):j+=" "+!t.valid+" ",h=this.keyword,(d=d||[]).push(j+=") { "),(d=d||[]).push(j=""),j="",g.createErrors!==!1?(j+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(A)+" , params: { keyword: '"+this.keyword+"' } ",g.opts.messages!==!1&&(j+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),g.opts.verbose&&(j+=" , schema: validate.schema"+N+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+T+" "),j+=" } "):j+=" {} ",n=j,j=d.pop(),!g.compositeRule&&m?g.async?j+=" throw new ValidationError(["+n+"]); ":j+=" validate.errors = ["+n+"]; return false; ":j+=" var err = "+n+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=j,j=d.pop(),M?t.errors?t.errors!="full"&&(j+=" for (var "+p+"="+f+"; "+p+"<errors; "+p+"++) { var "+w+" = vErrors["+p+"]; if ("+w+".dataPath === undefined) "+w+".dataPath = (dataPath || '') + "+g.errorPath+"; if ("+w+".schemaPath === undefined) { "+w+'.schemaPath = "'+A+'"; } ',g.opts.verbose&&(j+=" "+w+".schema = "+a+"; "+w+".data = "+T+"; "),j+=" } "):t.errors===!1?j+=" "+c+" ":(j+=" if ("+f+" == errors) { "+c+" } else { for (var "+p+"="+f+"; "+p+"<errors; "+p+"++) { var "+w+" = vErrors["+p+"]; if ("+w+".dataPath === undefined) "+w+".dataPath = (dataPath || '') + "+g.errorPath+"; if ("+w+".schemaPath === undefined) { "+w+'.schemaPath = "'+A+'"; } ',g.opts.verbose&&(j+=" "+w+".schema = "+a+"; "+w+".data = "+T+"; "),j+=" } } "):K?(j+=" var err = ",g.createErrors!==!1?(j+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(A)+" , params: { keyword: '"+this.keyword+"' } ",g.opts.messages!==!1&&(j+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),g.opts.verbose&&(j+=" , schema: validate.schema"+N+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+T+" "),j+=" } "):j+=" {} ",j+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&m&&(g.async?j+=" throw new ValidationError(vErrors); ":j+=" validate.errors = vErrors; return false; ")):t.errors===!1?j+=" "+c+" ":(j+=" if (Array.isArray("+C+")) { if (vErrors === null) vErrors = "+C+"; else vErrors = vErrors.concat("+C+"); errors = vErrors.length; for (var "+p+"="+f+"; "+p+"<errors; "+p+"++) { var "+w+" = vErrors["+p+"]; if ("+w+".dataPath === undefined) "+w+".dataPath = (dataPath || '') + "+g.errorPath+"; "+w+'.schemaPath = "'+A+'"; ',g.opts.verbose&&(j+=" "+w+".schema = "+a+"; "+w+".data = "+T+"; "),j+=" } } else { "+c+" } "),j+=" } ",m&&(j+=" else { ")),j}},9115:function(le){le.exports=function(g,T,U){var S,M=" ",K=g.level,j=g.dataLevel,z=g.schema[T],P=g.schemaPath+g.util.getProperty(T),N=g.errSchemaPath+"/"+T,A=!g.opts.allErrors,m="data"+(j||""),T="errs__"+K,y=g.util.copy(g),f="",h=(y.level++,"valid"+y.level),a={},c={},t=g.opts.ownProperties;for(H in z)H!="__proto__"&&(O=z[H],(S=Array.isArray(O)?c:a)[H]=O);var r=g.errorPath;for(H in M=M+("var "+T+" = errors;")+("var missing"+K+";"),c)if((S=c[H]).length){if(M+=" if ( "+m+g.util.getProperty(H)+" !== undefined ",t&&(M+=" && Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(H)+"') "),A){M+=" && ( ";var e=S;if(e)for(var n=-1,s=e.length-1;n<s;)C=e[n+=1],n&&(M+=" || "),M+=" ( ( "+($=m+(x=g.util.getProperty(C)))+" === undefined ",t&&(M+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(C)+"') "),M+=") && (missing"+K+" = "+g.util.toQuotedString(g.opts.jsonPointers?C:x)+") ) ";M+=")) { ";var l="missing"+K,o="' + "+l+" + '",i=(g.opts._errorDataPathProperty&&(g.errorPath=g.opts.jsonPointers?g.util.getPathExpr(r,l,!0):r+" + "+l),i||[]),l=(i.push(M),M="",g.createErrors!==!1?(M+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(N)+" , params: { property: '"+g.util.escapeQuotes(H)+"', missingProperty: '"+o+"', depsCount: "+S.length+", deps: '"+g.util.escapeQuotes(S.length==1?S[0]:S.join(", "))+"' } ",g.opts.messages!==!1&&(M+=" , message: 'should have ",S.length==1?M+="property "+g.util.escapeQuotes(S[0]):M+="properties "+g.util.escapeQuotes(S.join(", ")),M+=" when property "+g.util.escapeQuotes(H)+" is present' "),g.opts.verbose&&(M+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),M+=" } "):M+=" {} ",M),M=i.pop();!g.compositeRule&&A?g.async?M+=" throw new ValidationError(["+l+"]); ":M+=" validate.errors = ["+l+"]; return false; ":M+=" var err = "+l+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{M+=" ) { ";var d=S;if(d)for(var C,p=-1,w=d.length-1;p<w;){C=d[p+=1];var x=g.util.getProperty(C),o=g.util.escapeQuotes(C),$=m+x;g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPath(r,C,g.opts.jsonPointers)),M+=" if ( "+$+" === undefined ",t&&(M+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(C)+"') "),M+=") { var err = ",g.createErrors!==!1?(M+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(N)+" , params: { property: '"+g.util.escapeQuotes(H)+"', missingProperty: '"+o+"', depsCount: "+S.length+", deps: '"+g.util.escapeQuotes(S.length==1?S[0]:S.join(", "))+"' } ",g.opts.messages!==!1&&(M+=" , message: 'should have ",S.length==1?M+="property "+g.util.escapeQuotes(S[0]):M+="properties "+g.util.escapeQuotes(S.join(", ")),M+=" when property "+g.util.escapeQuotes(H)+" is present' "),g.opts.verbose&&(M+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),M+=" } "):M+=" {} ",M+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}M+=" } ",A&&(f+="}",M+=" else { ")}g.errorPath=r;var H,B=y.baseId;for(H in a){var O=a[H];(g.opts.strictKeywords?typeof O=="object"&&0<Object.keys(O).length||O===!1:g.util.schemaHasRules(O,g.RULES.all))&&(M+=" "+h+" = true; if ( "+m+g.util.getProperty(H)+" !== undefined ",t&&(M+=" && Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(H)+"') "),M+=") { ",y.schema=O,y.schemaPath=P+g.util.getProperty(H),y.errSchemaPath=N+"/"+g.util.escapeFragment(H),M+=" "+g.validate(y)+" ",y.baseId=B,M+=" } ",A)&&(M+=" if ("+h+") { ",f+="}")}return A&&(M+=" "+f+" if ("+T+" == errors) {"),M}},9317:function(le){le.exports=function(g,K,U){var T=" ",S=g.level,A=g.dataLevel,m=g.schema[K],M=g.schemaPath+g.util.getProperty(K),K=g.errSchemaPath+"/"+K,j=!g.opts.allErrors,z="data"+(A||""),P="valid"+S,N=g.opts.$data&&m&&m.$data,m=(N&&(T+=" var schema"+S+" = "+g.util.getData(m.$data,A,g.dataPathArr)+"; "),"i"+S),A="schema"+S,A=(N||(T+=" var "+A+" = validate.schema"+M+";"),T+="var "+P+";",N&&(T+=" if (schema"+S+" === undefined) "+P+" = true; else if (!Array.isArray(schema"+S+")) "+P+" = false; else {"),T+=P+" = false;for (var "+m+"=0; "+m+"<"+A+".length; "+m+"++) if (equal("+z+", "+A+"["+m+"])) { "+P+" = true; break; }",N&&(T+=" } "),[]),m=(A.push(T+=" if (!"+P+") { "),T="",g.createErrors!==!1?(T+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(K)+" , params: { allowedValues: schema"+S+" } ",g.opts.messages!==!1&&(T+=" , message: 'should be equal to one of the allowed values' "),g.opts.verbose&&(T+=" , schema: validate.schema"+M+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+z+" "),T+=" } "):T+=" {} ",T),T=A.pop();return!g.compositeRule&&j?g.async?T+=" throw new ValidationError(["+m+"]); ":T+=" validate.errors = ["+m+"]; return false; ":T+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",T+=" }",j&&(T+=" else { "),T}},8327:function(le){le.exports=function(g,P,U){var S=" ",M=g.level,K=g.dataLevel,j=g.schema[P],z=g.schemaPath+g.util.getProperty(P),P=g.errSchemaPath+"/"+P,N=!g.opts.allErrors,A="data"+(K||"");if(g.opts.format===!1)N&&(S+=" if (true) { ");else{var m,T=g.opts.$data&&j&&j.$data,K=T?(S+=" var schema"+M+" = "+g.util.getData(j.$data,K,g.dataPathArr)+"; ","schema"+M):j,y=g.opts.unknownFormats,f=Array.isArray(y);if(T)S+=" var "+(m="format"+M)+" = formats["+K+"]; var "+(h="isObject"+M)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(c="formatType"+M)+" = "+h+" && "+m+".type || 'string'; if ("+h+") { ",g.async&&(S+=" var async"+M+" = "+m+".async; "),S+=" "+m+" = "+m+".validate; } if ( ",T&&(S+=" ("+K+" !== undefined && typeof "+K+" != 'string') || "),S+=" (",y!="ignore"&&(S+=" ("+K+" && !"+m+" ",f&&(S+=" && self._opts.unknownFormats.indexOf("+K+") == -1 "),S+=") || "),S+=" ("+m+" && "+c+" == '"+U+"' && !(typeof "+m+" == 'function' ? ",g.async?S+=" (async"+M+" ? await "+m+"("+A+") : "+m+"("+A+")) ":S+=" "+m+"("+A+") ",S+=" : "+m+".test("+A+"))))) {";else{if(!(m=g.formats[j])){if(y=="ignore")return g.logger.warn('unknown format "'+j+'" ignored in schema at path "'+g.errSchemaPath+'"'),N&&(S+=" if (true) { "),S;if(f&&0<=y.indexOf(j))return N&&(S+=" if (true) { "),S;throw new Error('unknown format "'+j+'" is used in schema at path "'+g.errSchemaPath+'"')}var h,a,c=(h=typeof m=="object"&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(h&&(a=m.async===!0,m=m.validate),c!=U)return N&&(S+=" if (true) { "),S;if(a){if(!g.async)throw new Error("async format in sync schema");S+=" if (!(await "+(t="formats"+g.util.getProperty(j)+".validate")+"("+A+"))) { "}else{S+=" if (! ";var t="formats"+g.util.getProperty(j);h&&(t+=".validate"),S=S+(typeof m=="function"?" "+t+"("+A+") ":" "+t+".test("+A+") ")+") { "}}M=[],f=(M.push(S),S="",g.createErrors!==!1?(S=(S+=" { keyword: 'format' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { format: ")+(T?""+K:""+g.util.toQuotedString(j))+" } ",g.opts.messages!==!1&&(S=(S+=` , message: 'should match format "`)+(T?"' + "+K+" + '":""+g.util.escapeQuotes(j))+`"' `),g.opts.verbose&&(S=(S=(S+=" , schema: ")+(T?"validate.schema"+z:""+g.util.toQuotedString(j)))+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),S+=" } "):S+=" {} ",S),S=M.pop(),!g.compositeRule&&N?g.async?S+=" throw new ValidationError(["+f+"]); ":S+=" validate.errors = ["+f+"]; return false; ":S+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } ",N&&(S+=" else { ")}return S}},5926:function(le){le.exports=function(g,P,U){var S,M=" ",K=g.level,A=g.dataLevel,j=g.schema[P],z=g.schemaPath+g.util.getProperty(P),P=g.errSchemaPath+"/"+P,N=!g.opts.allErrors,A="data"+(A||""),m="valid"+K,T="errs__"+K,y=g.util.copy(g),f=(y.level++,"valid"+y.level),h=g.schema.then,a=g.schema.else,h=h!==void 0&&(g.opts.strictKeywords?typeof h=="object"&&0<Object.keys(h).length||h===!1:g.util.schemaHasRules(h,g.RULES.all)),a=a!==void 0&&(g.opts.strictKeywords?typeof a=="object"&&0<Object.keys(a).length||a===!1:g.util.schemaHasRules(a,g.RULES.all)),c=y.baseId;return h||a?(y.createErrors=!1,y.schema=j,y.schemaPath=z,y.errSchemaPath=P,M+=" var "+T+" = errors; var "+m+" = true; ",j=g.compositeRule,g.compositeRule=y.compositeRule=!0,M+=" "+g.validate(y)+" ",y.baseId=c,y.createErrors=!0,M+=" errors = "+T+"; if (vErrors !== null) { if ("+T+") vErrors.length = "+T+"; else vErrors = null; } ",g.compositeRule=y.compositeRule=j,h?(M+=" if ("+f+") { ",y.schema=g.schema.then,y.schemaPath=g.schemaPath+".then",y.errSchemaPath=g.errSchemaPath+"/then",M+=" "+g.validate(y)+" ",y.baseId=c,M+=" "+m+" = "+f+"; ",h&&a?M+=" var "+(S="ifClause"+K)+" = 'then'; ":S="'then'",M+=" } ",a&&(M+=" else { ")):M+=" if (!"+f+") { ",a&&(y.schema=g.schema.else,y.schemaPath=g.schemaPath+".else",y.errSchemaPath=g.errSchemaPath+"/else",M+=" "+g.validate(y)+" ",y.baseId=c,M+=" "+m+" = "+f+"; ",h&&a?M+=" var "+(S="ifClause"+K)+" = 'else'; ":S="'else'",M+=" } "),M+=" if (!"+m+") { var err = ",g.createErrors!==!1?(M+=" { keyword: 'if' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { failingKeyword: "+S+" } ",g.opts.messages!==!1&&(M+=` , message: 'should match "' + `+S+` + '" schema' `),g.opts.verbose&&(M+=" , schema: validate.schema"+z+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),M+=" } "):M+=" {} ",M+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&N&&(g.async?M+=" throw new ValidationError(vErrors); ":M+=" validate.errors = vErrors; return false; "),M+=" } ",N&&(M+=" else { ")):N&&(M+=" if (true) { "),M}},9646:function(le,g,Z){le.exports={$ref:Z(2331),allOf:Z(9486),anyOf:Z(5347),$comment:Z(923),const:Z(2617),contains:Z(2119),dependencies:Z(9115),enum:Z(9317),format:Z(8327),if:Z(5926),items:Z(392),maximum:Z(1796),minimum:Z(1796),maxItems:Z(2407),minItems:Z(2407),maxLength:Z(1250),minLength:Z(1250),maxProperties:Z(2596),minProperties:Z(2596),multipleOf:Z(6039),not:Z(7946),oneOf:Z(9344),pattern:Z(9737),properties:Z(2537),propertyNames:Z(2127),required:Z(1204),uniqueItems:Z(1985),validate:Z(1869)}},392:function(le){le.exports=function(g,N,U){var S=" ",f=g.level,A=g.dataLevel,M=g.schema[N],K=g.schemaPath+g.util.getProperty(N),j=g.errSchemaPath+"/"+N,z=!g.opts.allErrors,P="data"+(A||""),N="valid"+f,A="errs__"+f,m=g.util.copy(g),T="",y=(m.level++,"valid"+m.level),f="i"+f,h=m.dataLevel=g.dataLevel+1,a="data"+h,c=g.baseId;if(S+="var "+A+" = errors;var "+N+";",Array.isArray(M)){var t,r,e=g.schema.additionalItems,n=(e===!1&&(S+=" "+N+" = "+P+".length <= "+M.length+"; ",t=j,j=g.errSchemaPath+"/additionalItems",(r=r||[]).push(S+=" if (!"+N+") { "),S="",g.createErrors!==!1?(S+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(j)+" , params: { limit: "+M.length+" } ",g.opts.messages!==!1&&(S+=" , message: 'should NOT have more than "+M.length+" items' "),g.opts.verbose&&(S+=" , schema: false , parentSchema: validate.schema"+g.schemaPath+" , data: "+P+" "),S+=" } "):S+=" {} ",N=S,S=r.pop(),!g.compositeRule&&z?g.async?S+=" throw new ValidationError(["+N+"]); ":S+=" validate.errors = ["+N+"]; return false; ":S+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } ",j=t,z)&&(T+="}",S+=" else { "),M);if(n)for(var s=-1,o=n.length-1;s<o;){var i,l,d=n[s+=1];(g.opts.strictKeywords?typeof d=="object"&&0<Object.keys(d).length||d===!1:g.util.schemaHasRules(d,g.RULES.all))&&(S+=" "+y+" = true; if ("+P+".length > "+s+") { ",i=P+"["+s+"]",m.schema=d,m.schemaPath=K+"["+s+"]",m.errSchemaPath=j+"/"+s,m.errorPath=g.util.getPathExpr(g.errorPath,s,g.opts.jsonPointers,!0),m.dataPathArr[h]=s,l=g.validate(m),m.baseId=c,g.util.varOccurences(l,a)<2?S+=" "+g.util.varReplace(l,a,i)+" ":S+=" var "+a+" = "+i+"; "+l+" ",S+=" } ",z)&&(S+=" if ("+y+") { ",T+="}")}typeof e=="object"&&(g.opts.strictKeywords?typeof e=="object"&&0<Object.keys(e).length||e===!1:g.util.schemaHasRules(e,g.RULES.all))&&(m.schema=e,m.schemaPath=g.schemaPath+".additionalItems",m.errSchemaPath=g.errSchemaPath+"/additionalItems",S+=" "+y+" = true; if ("+P+".length > "+M.length+") { for (var "+f+" = "+M.length+"; "+f+" < "+P+".length; "+f+"++) { ",m.errorPath=g.util.getPathExpr(g.errorPath,f,g.opts.jsonPointers,!0),i=P+"["+f+"]",m.dataPathArr[h]=f,l=g.validate(m),m.baseId=c,g.util.varOccurences(l,a)<2?S+=" "+g.util.varReplace(l,a,i)+" ":S+=" var "+a+" = "+i+"; "+l+" ",z&&(S+=" if (!"+y+") break; "),S+=" } } ",z)&&(S+=" if ("+y+") { ",T+="}")}else(g.opts.strictKeywords?typeof M=="object"&&0<Object.keys(M).length||M===!1:g.util.schemaHasRules(M,g.RULES.all))&&(m.schema=M,m.schemaPath=K,m.errSchemaPath=j,S+=" for (var "+f+" = 0; "+f+" < "+P+".length; "+f+"++) { ",m.errorPath=g.util.getPathExpr(g.errorPath,f,g.opts.jsonPointers,!0),i=P+"["+f+"]",m.dataPathArr[h]=f,l=g.validate(m),m.baseId=c,g.util.varOccurences(l,a)<2?S+=" "+g.util.varReplace(l,a,i)+" ":S+=" var "+a+" = "+i+"; "+l+" ",z&&(S+=" if (!"+y+") break; "),S+=" }");return z&&(S+=" "+T+" if ("+A+" == errors) {"),S}},6039:function(le){le.exports=function(g,Z,U){var S=" ",M=g.level,m=g.dataLevel,K=g.schema[Z],j=g.schemaPath+g.util.getProperty(Z),z=g.errSchemaPath+"/"+Z,P=!g.opts.allErrors,N="data"+(m||""),A=g.opts.$data&&K&&K.$data,m=A?(S+=" var schema"+M+" = "+g.util.getData(K.$data,m,g.dataPathArr)+"; ","schema"+M):K;if(!A&&typeof K!="number")throw new Error(Z+" must be number");return S+="var division"+M+";if (",A&&(S+=" "+m+" !== undefined && ( typeof "+m+" != 'number' || "),S+=" (division"+M+" = "+N+" / "+m+", ",g.opts.multipleOfPrecision?S+=" Math.abs(Math.round(division"+M+") - division"+M+") > 1e-"+g.opts.multipleOfPrecision+" ":S+=" division"+M+" !== parseInt(division"+M+") ",S+=" ) ",A&&(S+=" ) "),Z=[],Z.push(S+=" ) { "),S="",g.createErrors!==!1?(S+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(z)+" , params: { multipleOf: "+m+" } ",g.opts.messages!==!1&&(S=S+" , message: 'should be multiple of "+(A?"' + "+m:m+"'")),g.opts.verbose&&(S=(S+=" , schema: ")+(A?"validate.schema"+j:""+K)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",M=S,S=Z.pop(),!g.compositeRule&&P?g.async?S+=" throw new ValidationError(["+M+"]); ":S+=" validate.errors = ["+M+"]; return false; ":S+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+="} ",P&&(S+=" else { "),S}},7946:function(le){le.exports=function(g,P,U){var S,M,K=" ",m=g.level,A=g.dataLevel,j=g.schema[P],z=g.schemaPath+g.util.getProperty(P),P=g.errSchemaPath+"/"+P,N=!g.opts.allErrors,A="data"+(A||""),m="errs__"+m,T=g.util.copy(g),y=(T.level++,"valid"+T.level);return(g.opts.strictKeywords?typeof j=="object"&&0<Object.keys(j).length||j===!1:g.util.schemaHasRules(j,g.RULES.all))?(T.schema=j,T.schemaPath=z,T.errSchemaPath=P,K+=" var "+m+" = errors; ",j=g.compositeRule,g.compositeRule=T.compositeRule=!0,T.createErrors=!1,T.opts.allErrors&&(M=T.opts.allErrors,T.opts.allErrors=!1),K+=" "+g.validate(T)+" ",T.createErrors=!0,M&&(T.opts.allErrors=M),g.compositeRule=T.compositeRule=j,(S=S||[]).push(K+=" if ("+y+") { "),K="",g.createErrors!==!1?(K+=" { keyword: 'not' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: {} ",g.opts.messages!==!1&&(K+=" , message: 'should NOT be valid' "),g.opts.verbose&&(K+=" , schema: validate.schema"+z+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),K+=" } "):K+=" {} ",M=K,K=S.pop(),!g.compositeRule&&N?g.async?K+=" throw new ValidationError(["+M+"]); ":K+=" validate.errors = ["+M+"]; return false; ":K+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",K+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",g.opts.allErrors&&(K+=" } ")):(K+=" var err = ",g.createErrors!==!1?(K+=" { keyword: 'not' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: {} ",g.opts.messages!==!1&&(K+=" , message: 'should NOT be valid' "),g.opts.verbose&&(K+=" , schema: validate.schema"+z+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),K+=" } "):K+=" {} ",K+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N&&(K+=" if (false) { ")),K}},9344:function(le){le.exports=function(g,z,U){var S=" ",c=g.level,P=g.dataLevel,M=g.schema[z],K=g.schemaPath+g.util.getProperty(z),j=g.errSchemaPath+"/"+z,z=!g.opts.allErrors,P="data"+(P||""),N="valid"+c,A="errs__"+c,m=g.util.copy(g),T="",y=(m.level++,"valid"+m.level),f=m.baseId,h="prevValid"+c,a="passingSchemas"+c,c=(S+="var "+A+" = errors , "+h+" = false , "+N+" = false , "+a+" = null; ",g.compositeRule),t=(g.compositeRule=m.compositeRule=!0,M);if(t)for(var r,e=-1,n=t.length-1;e<n;)r=t[e+=1],(g.opts.strictKeywords?typeof r=="object"&&0<Object.keys(r).length||r===!1:g.util.schemaHasRules(r,g.RULES.all))?(m.schema=r,m.schemaPath=K+"["+e+"]",m.errSchemaPath=j+"/"+e,S+=" "+g.validate(m)+" ",m.baseId=f):S+=" var "+y+" = true; ",e&&(S+=" if ("+y+" && "+h+") { "+N+" = false; "+a+" = ["+a+", "+e+"]; } else { ",T+="}"),S+=" if ("+y+") { "+N+" = "+h+" = true; "+a+" = "+e+"; }";return g.compositeRule=m.compositeRule=c,S+=T+"if (!"+N+") { var err = ",g.createErrors!==!1?(S+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(j)+" , params: { passingSchemas: "+a+" } ",g.opts.messages!==!1&&(S+=" , message: 'should match exactly one schema in oneOf' "),g.opts.verbose&&(S+=" , schema: validate.schema"+K+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+P+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&z&&(g.async?S+=" throw new ValidationError(vErrors); ":S+=" validate.errors = vErrors; return false; "),S+="} else { errors = "+A+"; if (vErrors !== null) { if ("+A+") vErrors.length = "+A+"; else vErrors = null; }",g.opts.allErrors&&(S+=" } "),S}},9737:function(le){le.exports=function(g,K,U){var T=" ",m=g.level,N=g.dataLevel,S=g.schema[K],M=g.schemaPath+g.util.getProperty(K),K=g.errSchemaPath+"/"+K,j=!g.opts.allErrors,z="data"+(N||""),P=g.opts.$data&&S&&S.$data,N=P?(T+=" var schema"+m+" = "+g.util.getData(S.$data,N,g.dataPathArr)+"; ","schema"+m):S,m=P?"(new RegExp("+N+"))":g.usePattern(S),A=(T+="if ( ",P&&(T+=" ("+N+" !== undefined && typeof "+N+" != 'string') || "),[]),m=(A.push(T+=" !"+m+".test("+z+") ) { "),T="",g.createErrors!==!1?(T=(T+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(K)+" , params: { pattern: ")+(P?""+N:""+g.util.toQuotedString(S))+" } ",g.opts.messages!==!1&&(T=(T+=` , message: 'should match pattern "`)+(P?"' + "+N+" + '":""+g.util.escapeQuotes(S))+`"' `),g.opts.verbose&&(T=(T=(T+=" , schema: ")+(P?"validate.schema"+M:""+g.util.toQuotedString(S)))+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+z+" "),T+=" } "):T+=" {} ",T),T=A.pop();return!g.compositeRule&&j?g.async?T+=" throw new ValidationError(["+m+"]); ":T+=" validate.errors = ["+m+"]; return false; ":T+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",T+="} ",j&&(T+=" else { "),T}},2537:function(le){le.exports=function(g,m,U){var S,M=" ",K=g.level,e=g.dataLevel,j=g.schema[m],z=g.schemaPath+g.util.getProperty(m),P=g.errSchemaPath+"/"+m,N=!g.opts.allErrors,A="data"+(e||""),m="errs__"+K,T=g.util.copy(g),y="",f=(T.level++,"valid"+T.level),h="key"+K,a="idx"+K,c=T.dataLevel=g.dataLevel+1,t="data"+c,r="dataProperties"+K,e=Object.keys(j||{}).filter(H),n=g.schema.patternProperties||{},s=Object.keys(n).filter(H),o=g.schema.additionalProperties,i=e.length||s.length,l=o===!1,d=typeof o=="object"&&Object.keys(o).length,C=g.opts.removeAdditional,p=l||d||C,w=g.opts.ownProperties,x=g.baseId,$=g.schema.required;function H(Ee){return Ee!=="__proto__"}if($&&(!g.opts.$data||!$.$data)&&$.length<g.opts.loopRequired&&(S=g.util.toHash($)),M+="var "+m+" = errors;var "+f+" = true;",w&&(M+=" var "+r+" = undefined;"),p){if(M+=w?" "+r+" = "+r+" || Object.keys("+A+"); for (var "+a+"=0; "+a+"<"+r+".length; "+a+"++) { var "+h+" = "+r+"["+a+"]; ":" for (var "+h+" in "+A+") { ",i){if(M+=" var isAdditional"+K+" = !(false ",e.length)if(8<e.length)M+=" || validate.schema"+z+".hasOwnProperty("+h+") ";else{var B=e;if(B)for(var O=-1,u=B.length-1;O<u;)F=B[O+=1],M+=" || "+h+" == "+g.util.toQuotedString(F)+" "}if(s.length){var I=s;if(I)for(var L=-1,v=I.length-1;L<v;)Y=I[L+=1],M+=" || "+g.usePattern(Y)+".test("+h+") "}M+=" ); if (isAdditional"+K+") { "}C=="all"?M+=" delete "+A+"["+h+"]; ":(E=g.errorPath,$="' + "+h+" + '",g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPathExpr(g.errorPath,h,g.opts.jsonPointers)),l?C?M+=" delete "+A+"["+h+"]; ":(G=P,P=g.errSchemaPath+"/additionalProperties",(b=b||[]).push(M+=" "+f+" = false; "),M="",g.createErrors!==!1?(M+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { additionalProperty: '"+$+"' } ",g.opts.messages!==!1&&(M+=" , message: '",g.opts._errorDataPathProperty?M+="is an invalid additional property":M+="should NOT have additional properties",M+="' "),g.opts.verbose&&(M+=" , schema: false , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),M+=" } "):M+=" {} ",k=M,M=b.pop(),!g.compositeRule&&N?g.async?M+=" throw new ValidationError(["+k+"]); ":M+=" validate.errors = ["+k+"]; return false; ":M+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",P=G,N&&(M+=" break; ")):d&&(C=="failing"?(M+=" var "+m+" = errors; ",p=g.compositeRule,g.compositeRule=T.compositeRule=!0,T.schema=o,T.schemaPath=g.schemaPath+".additionalProperties",T.errSchemaPath=g.errSchemaPath+"/additionalProperties",T.errorPath=g.opts._errorDataPathProperty?g.errorPath:g.util.getPathExpr(g.errorPath,h,g.opts.jsonPointers),me=A+"["+h+"]",T.dataPathArr[c]=h,ye=g.validate(T),T.baseId=x,g.util.varOccurences(ye,t)<2?M+=" "+g.util.varReplace(ye,t,me)+" ":M+=" var "+t+" = "+me+"; "+ye+" ",M+=" if (!"+f+") { errors = "+m+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+A+"["+h+"]; } ",g.compositeRule=T.compositeRule=p):(T.schema=o,T.schemaPath=g.schemaPath+".additionalProperties",T.errSchemaPath=g.errSchemaPath+"/additionalProperties",T.errorPath=g.opts._errorDataPathProperty?g.errorPath:g.util.getPathExpr(g.errorPath,h,g.opts.jsonPointers),me=A+"["+h+"]",T.dataPathArr[c]=h,ye=g.validate(T),T.baseId=x,g.util.varOccurences(ye,t)<2?M+=" "+g.util.varReplace(ye,t,me)+" ":M+=" var "+t+" = "+me+"; "+ye+" ",N&&(M+=" if (!"+f+") break; "))),g.errorPath=E),i&&(M+=" } "),M+=" } ",N&&(M+=" if ("+f+") { ",y+="}")}var _=g.opts.useDefaults&&!g.compositeRule;if(e.length){var W=e;if(W)for(var F,J=-1,Q=W.length-1;J<Q;){var X,te,E,G,V,b,k,R=j[F=W[J+=1]];(g.opts.strictKeywords?typeof R=="object"&&0<Object.keys(R).length||R===!1:g.util.schemaHasRules(R,g.RULES.all))&&(me=A+(V=g.util.getProperty(F)),X=_&&R.default!==void 0,T.schema=R,T.schemaPath=z+V,T.errSchemaPath=P+"/"+g.util.escapeFragment(F),T.errorPath=g.util.getPath(g.errorPath,F,g.opts.jsonPointers),T.dataPathArr[c]=g.util.toQuotedString(F),ye=g.validate(T),T.baseId=x,g.util.varOccurences(ye,t)<2?(ye=g.util.varReplace(ye,t,me),te=me):M+=" var "+(te=t)+" = "+me+"; ",X?M+=" "+ye+" ":(S&&S[F]?(M+=" if ( "+te+" === undefined ",w&&(M+=" || ! Object.prototype.hasOwnProperty.call("+A+", '"+g.util.escapeQuotes(F)+"') "),M+=") { "+f+" = false; ",E=g.errorPath,G=P,V=g.util.escapeQuotes(F),g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPath(E,F,g.opts.jsonPointers)),P=g.errSchemaPath+"/required",(b=b||[]).push(M),M="",g.createErrors!==!1?(M+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { missingProperty: '"+V+"' } ",g.opts.messages!==!1&&(M+=" , message: '",g.opts._errorDataPathProperty?M+="is a required property":M+="should have required property \\'"+V+"\\'",M+="' "),g.opts.verbose&&(M+=" , schema: validate.schema"+z+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),M+=" } "):M+=" {} ",k=M,M=b.pop(),!g.compositeRule&&N?g.async?M+=" throw new ValidationError(["+k+"]); ":M+=" validate.errors = ["+k+"]; return false; ":M+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",P=G,g.errorPath=E,M+=" } else { "):N?(M+=" if ( "+te+" === undefined ",w&&(M+=" || ! Object.prototype.hasOwnProperty.call("+A+", '"+g.util.escapeQuotes(F)+"') "),M+=") { "+f+" = true; } else { "):(M+=" if ("+te+" !== undefined ",w&&(M+=" && Object.prototype.hasOwnProperty.call("+A+", '"+g.util.escapeQuotes(F)+"') "),M+=" ) { "),M+=" "+ye+" } ")),N&&(M+=" if ("+f+") { ",y+="}")}}if(s.length){var D=s;if(D)for(var Y,re=-1,pe=D.length-1;re<pe;){var me,ye,R=n[Y=D[re+=1]];(g.opts.strictKeywords?typeof R=="object"&&0<Object.keys(R).length||R===!1:g.util.schemaHasRules(R,g.RULES.all))&&(T.schema=R,T.schemaPath=g.schemaPath+".patternProperties"+g.util.getProperty(Y),T.errSchemaPath=g.errSchemaPath+"/patternProperties/"+g.util.escapeFragment(Y),M=(M+=w?" "+r+" = "+r+" || Object.keys("+A+"); for (var "+a+"=0; "+a+"<"+r+".length; "+a+"++) { var "+h+" = "+r+"["+a+"]; ":" for (var "+h+" in "+A+") { ")+" if ("+g.usePattern(Y)+".test("+h+")) { ",T.errorPath=g.util.getPathExpr(g.errorPath,h,g.opts.jsonPointers),me=A+"["+h+"]",T.dataPathArr[c]=h,ye=g.validate(T),T.baseId=x,g.util.varOccurences(ye,t)<2?M+=" "+g.util.varReplace(ye,t,me)+" ":M+=" var "+t+" = "+me+"; "+ye+" ",N&&(M+=" if (!"+f+") break; "),M+=" } ",N&&(M+=" else "+f+" = true; "),M+=" } ",N)&&(M+=" if ("+f+") { ",y+="}")}}return N&&(M+=" "+y+" if ("+m+" == errors) {"),M}},2127:function(le){le.exports=function(g,f,U){var S,M,K,j,z,P,N,A=" ",m=g.level,a=g.dataLevel,T=g.schema[f],y=g.schemaPath+g.util.getProperty(f),f=g.errSchemaPath+"/"+f,h=!g.opts.allErrors,a="data"+(a||""),c="errs__"+m,t=g.util.copy(g),r=(t.level++,"valid"+t.level);return A+="var "+c+" = errors;",(g.opts.strictKeywords?typeof T=="object"&&0<Object.keys(T).length||T===!1:g.util.schemaHasRules(T,g.RULES.all))&&(t.schema=T,t.schemaPath=y,t.errSchemaPath=f,T="idx"+m,M="i"+m,K="' + "+(S="key"+m)+" + '",j="data"+(t.dataLevel=g.dataLevel+1),N="dataProperties"+m,P=g.opts.ownProperties,z=g.baseId,P&&(A+=" var "+N+" = undefined; "),A=A+(P?" "+N+" = "+N+" || Object.keys("+a+"); for (var "+T+"=0; "+T+"<"+N+".length; "+T+"++) { var "+S+" = "+N+"["+T+"]; ":" for (var "+S+" in "+a+") { ")+" var startErrs"+m+" = errors; ",P=S,N=g.compositeRule,g.compositeRule=t.compositeRule=!0,T=g.validate(t),t.baseId=z,g.util.varOccurences(T,j)<2?A+=" "+g.util.varReplace(T,j,P)+" ":A+=" var "+j+" = "+P+"; "+T+" ",g.compositeRule=t.compositeRule=N,A+=" if (!"+r+") { for (var "+M+"=startErrs"+m+"; "+M+"<errors; "+M+"++) { vErrors["+M+"].propertyName = "+S+"; } var err = ",g.createErrors!==!1?(A+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(f)+" , params: { propertyName: '"+K+"' } ",g.opts.messages!==!1&&(A+=" , message: 'property name \\'"+K+"\\' is invalid' "),g.opts.verbose&&(A+=" , schema: validate.schema"+y+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+a+" "),A+=" } "):A+=" {} ",A+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&h&&(g.async?A+=" throw new ValidationError(vErrors); ":A+=" validate.errors = vErrors; return false; "),h&&(A+=" break; "),A+=" } }"),h&&(A+=" if ("+c+" == errors) {"),A}},2331:function(le){le.exports=function(g,P,U){var S,M,K=" ",m=g.level,j=g.dataLevel,z=g.schema[P],P=g.errSchemaPath+"/"+P,N=!g.opts.allErrors,A="data"+(j||""),m="valid"+m;if(z=="#"||z=="#/")M=g.isRoot?(S=g.async,"validate"):(S=g.root.schema.$async===!0,"root.refVal[0]");else{var T=g.resolveRef(g.baseId,z,g.isRoot);if(T===void 0){var y=g.MissingRefError.message(g.baseId,z);if(g.opts.missingRefs=="fail")g.logger.error(y),(f=f||[]).push(K),K="",g.createErrors!==!1?(K+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { ref: '"+g.util.escapeQuotes(z)+"' } ",g.opts.messages!==!1&&(K+=" , message: 'can\\'t resolve reference "+g.util.escapeQuotes(z)+"' "),g.opts.verbose&&(K+=" , schema: "+g.util.toQuotedString(z)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),K+=" } "):K+=" {} ",P=K,K=f.pop(),!g.compositeRule&&N?g.async?K+=" throw new ValidationError(["+P+"]); ":K+=" validate.errors = ["+P+"]; return false; ":K+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N&&(K+=" if (false) { ");else{if(g.opts.missingRefs!="ignore")throw new g.MissingRefError(g.baseId,z,y);g.logger.warn(y),N&&(K+=" if (true) { ")}}else T.inline?((P=g.util.copy(g)).level++,y="valid"+P.level,P.schema=T.schema,P.schemaPath="",P.errSchemaPath=z,K+=" "+g.validate(P).replace(/validate\.schema/g,T.code)+" ",N&&(K+=" if ("+y+") { ")):(S=T.$async===!0||g.async&&T.$async!==!1,M=T.code)}if(M){(f=f||[]).push(K),K="",g.opts.passContext?K+=" "+M+".call(this, ":K+=" "+M+"( ",K+=" "+A+", (dataPath || '')",g.errorPath!='""'&&(K+=" + "+g.errorPath);var f,z=j?"data"+(j-1||""):"parentData",P=K+=" , "+z+" , "+(j?g.dataPathArr[j]:"parentDataProperty")+", rootData) ";if(K=f.pop(),S){if(!g.async)throw new Error("async schema referenced by sync schema");N&&(K+=" var "+m+"; "),K+=" try { await "+P+"; ",N&&(K+=" "+m+" = true; "),K+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",N&&(K+=" "+m+" = false; "),K+=" } ",N&&(K+=" if ("+m+") { ")}else K+=" if (!"+P+") { if (vErrors === null) vErrors = "+M+".errors; else vErrors = vErrors.concat("+M+".errors); errors = vErrors.length; } ",N&&(K+=" else { ")}return K}},1204:function(le){le.exports=function(g,P,U){var S=" ",M=g.level,T=g.dataLevel,K=g.schema[P],j=g.schemaPath+g.util.getProperty(P),z=g.errSchemaPath+"/"+P,P=!g.opts.allErrors,N="data"+(T||""),A="valid"+M,m=g.opts.$data&&K&&K.$data,T=(m&&(S+=" var schema"+M+" = "+g.util.getData(K.$data,T,g.dataPathArr)+"; "),"schema"+M);if(!m)if(K.length<g.opts.loopRequired&&g.schema.properties&&Object.keys(g.schema.properties).length){var y=[],f=K;if(f)for(var h=-1,a=f.length-1;h<a;){var c=f[h+=1],t=g.schema.properties[c];t&&(g.opts.strictKeywords?typeof t=="object"&&0<Object.keys(t).length||t===!1:g.util.schemaHasRules(t,g.RULES.all))||(y[y.length]=c)}}else y=K;if(m||y.length){var r=g.errorPath,K=m||y.length>=g.opts.loopRequired,e=g.opts.ownProperties;if(P){if(S+=" var missing"+M+"; ",K){m||(S+=" var "+T+" = validate.schema"+j+"; ");var n="' + "+(C="schema"+M+"["+(i="i"+M)+"]")+" + '";g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPathExpr(r,C,g.opts.jsonPointers)),S+=" var "+A+" = true; ",m&&(S+=" if (schema"+M+" === undefined) "+A+" = true; else if (!Array.isArray(schema"+M+")) "+A+" = false; else {"),S+=" for (var "+i+" = 0; "+i+" < "+T+".length; "+i+"++) { "+A+" = "+N+"["+T+"["+i+"]] !== undefined ",e&&(S+=" && Object.prototype.hasOwnProperty.call("+N+", "+T+"["+i+"]) "),S+="; if (!"+A+") break; } ",m&&(S+=" } "),(d=d||[]).push(S+=" if (!"+A+") { "),S="",g.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(z)+" , params: { missingProperty: '"+n+"' } ",g.opts.messages!==!1&&(S+=" , message: '",g.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+n+"\\'",S+="' "),g.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ";var s=S,S=d.pop()}else{S+=" if ( ";var o=y;if(o)for(var i=-1,l=o.length-1;i<l;)w=o[i+=1],i&&(S+=" || "),S+=" ( ( "+(B=N+(H=g.util.getProperty(w)))+" === undefined ",e&&(S+=" || ! Object.prototype.hasOwnProperty.call("+N+", '"+g.util.escapeQuotes(w)+"') "),S+=") && (missing"+M+" = "+g.util.toQuotedString(g.opts.jsonPointers?w:H)+") ) ";S+=") { ",n="' + "+(C="missing"+M)+" + '",g.opts._errorDataPathProperty&&(g.errorPath=g.opts.jsonPointers?g.util.getPathExpr(r,C,!0):r+" + "+C),(d=d||[]).push(S),S="",g.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(z)+" , params: { missingProperty: '"+n+"' } ",g.opts.messages!==!1&&(S+=" , message: '",g.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+n+"\\'",S+="' "),g.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ";var d,s=S;S=d.pop()}!g.compositeRule&&P?g.async?S+=" throw new ValidationError(["+s+"]); ":S+=" validate.errors = ["+s+"]; return false; ":S+=" var err = "+s+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } else { "}else if(K){m||(S+=" var "+T+" = validate.schema"+j+"; ");var C,n="' + "+(C="schema"+M+"["+(i="i"+M)+"]")+" + '";g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPathExpr(r,C,g.opts.jsonPointers)),m&&(S+=" if ("+T+" && !Array.isArray("+T+")) { var err = ",g.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(z)+" , params: { missingProperty: '"+n+"' } ",g.opts.messages!==!1&&(S+=" , message: '",g.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+n+"\\'",S+="' "),g.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+T+" !== undefined) { "),S+=" for (var "+i+" = 0; "+i+" < "+T+".length; "+i+"++) { if ("+N+"["+T+"["+i+"]] === undefined ",e&&(S+=" || ! Object.prototype.hasOwnProperty.call("+N+", "+T+"["+i+"]) "),S+=") { var err = ",g.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(z)+" , params: { missingProperty: '"+n+"' } ",g.opts.messages!==!1&&(S+=" , message: '",g.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+n+"\\'",S+="' "),g.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(S+=" } ")}else{var p=y;if(p)for(var w,x=-1,$=p.length-1;x<$;){w=p[x+=1];var H=g.util.getProperty(w),n=g.util.escapeQuotes(w),B=N+H;g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPath(r,w,g.opts.jsonPointers)),S+=" if ( "+B+" === undefined ",e&&(S+=" || ! Object.prototype.hasOwnProperty.call("+N+", '"+g.util.escapeQuotes(w)+"') "),S+=") { var err = ",g.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(z)+" , params: { missingProperty: '"+n+"' } ",g.opts.messages!==!1&&(S+=" , message: '",g.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+n+"\\'",S+="' "),g.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}g.errorPath=r}else P&&(S+=" if (true) {");return S}},1985:function(le){le.exports=function(g,P,U){var S,M=" ",K=g.level,y=g.dataLevel,j=g.schema[P],z=g.schemaPath+g.util.getProperty(P),P=g.errSchemaPath+"/"+P,N=!g.opts.allErrors,A="data"+(y||""),m="valid"+K,T=g.opts.$data&&j&&j.$data,y=T?(M+=" var schema"+K+" = "+g.util.getData(j.$data,y,g.dataPathArr)+"; ","schema"+K):j;return(j||T)&&g.opts.uniqueItems!==!1?(T&&(M+=" var "+m+"; if ("+y+" === false || "+y+" === undefined) "+m+" = true; else if (typeof "+y+" != 'boolean') "+m+" = false; else { "),M+=" var i = "+A+".length , "+m+" = true , j; if (i > 1) { ",K=g.schema.items&&g.schema.items.type,y=Array.isArray(K),!K||K=="object"||K=="array"||y&&(0<=K.indexOf("object")||0<=K.indexOf("array"))?M+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+A+"[i], "+A+"[j])) { "+m+" = false; break outer; } } } ":(M=(M+=" var itemIndices = {}, item; for (;i--;) { var item = "+A+"[i]; ")+" if ("+g.util["checkDataType"+(y?"s":"")](K,"item",g.opts.strictNumbers,!0)+") continue; ",y&&(M+=` if (typeof item == 'string') item = '"' + item; `),M+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),M+=" } ",T&&(M+=" } "),(S=S||[]).push(M+=" if (!"+m+") { "),M="",g.createErrors!==!1?(M+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { i: i, j: j } ",g.opts.messages!==!1&&(M+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),g.opts.verbose&&(M=(M+=" , schema: ")+(T?"validate.schema"+z:""+j)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),M+=" } "):M+=" {} ",K=M,M=S.pop(),!g.compositeRule&&N?g.async?M+=" throw new ValidationError(["+K+"]); ":M+=" validate.errors = ["+K+"]; return false; ":M+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+=" } ",N&&(M+=" else { ")):N&&(M+=" if (true) { "),M}},1869:function(le){le.exports=function(g,Z,U){var S="",M=g.schema.$async===!0,K=g.util.schemaHasRulesExcept(g.schema,g.RULES.all,"$ref"),j=g.self._getId(g.schema);if(g.opts.strictKeywords){var z=g.util.schemaUnknownRules(g.schema,g.RULES.keywords);if(z){if(z="unknown keyword: "+z,g.opts.strictKeywords!=="log")throw new Error(z);g.logger.warn(z)}}if(g.isTop&&(S+=" var validate = ",M&&(g.async=!0,S+="async "),S+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",j)&&(g.opts.sourceCode||g.opts.processCode)&&(S+=" /*# sourceURL="+j+" */ "),typeof g.schema=="boolean"||!K&&!g.schema.$ref)N=g.level,A=g.dataLevel,B=g.schema[Z="false schema"],n=g.schemaPath+g.util.getProperty(Z),s=g.errSchemaPath+"/"+Z,f=!g.opts.allErrors,m="data"+(A||""),y="valid"+N,g.schema===!1?(g.isTop?f=!0:S+=" var "+y+" = false; ",(J=J||[]).push(S),S="",g.createErrors!==!1?(S+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(s)+" , params: {} ",g.opts.messages!==!1&&(S+=" , message: 'boolean schema is false' "),g.opts.verbose&&(S+=" , schema: false , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),S+=" } "):S+=" {} ",w=S,S=J.pop(),!g.compositeRule&&f?g.async?S+=" throw new ValidationError(["+w+"]); ":S+=" validate.errors = ["+w+"]; return false; ":S+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):g.isTop?S+=M?" return data; ":" validate.errors = null; return true; ":S+=" var "+y+" = true; ",g.isTop&&(S+=" }; return validate; ");else{if(g.isTop){var P=g.isTop,N=g.level=0,A=g.dataLevel=0,m="data";if(g.rootId=g.resolve.fullPath(g.self._getId(g.root.schema)),g.baseId=g.baseId||g.rootId,delete g.isTop,g.dataPathArr=[""],g.schema.default!==void 0&&g.opts.useDefaults&&g.opts.strictDefaults){var T="default is ignored in the schema root";if(g.opts.strictDefaults!=="log")throw new Error(T);g.logger.warn(T)}S=(S+=" var vErrors = null; ")+" var errors = 0; if (rootData === undefined) rootData = data; "}else{if(N=g.level,m="data"+((A=g.dataLevel)||""),j&&(g.baseId=g.resolve.url(g.baseId,j)),M&&!g.async)throw new Error("async schema in sync schema");S+=" var errs_"+N+" = errors;"}var y="valid"+N,f=!g.opts.allErrors,h="",a="",c=g.schema.type,t=Array.isArray(c);if(c&&g.opts.nullable&&g.schema.nullable===!0&&(t?c.indexOf("null")==-1&&(c=c.concat("null")):c!="null"&&(c=[c,"null"],t=!0)),t&&c.length==1&&(c=c[0],t=!1),g.schema.$ref&&K){if(g.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+g.errSchemaPath+'" (see option extendRefs)');g.opts.extendRefs!==!0&&(K=!1,g.logger.warn('$ref: keywords ignored in schema at path "'+g.errSchemaPath+'"'))}if(g.schema.$comment&&g.opts.$comment&&(S+=" "+g.RULES.all.$comment.code(g,"$comment")),c){g.opts.coerceTypes&&(r=g.util.coerceToTypes(g.opts.coerceTypes,c));var r,e=g.RULES.types[c];if(r||t||e===!0||e&&!G(e)){var n=g.schemaPath+".type",s=g.errSchemaPath+"/type",n=g.schemaPath+".type",s=g.errSchemaPath+"/type";if(S+=" if ("+g.util[t?"checkDataTypes":"checkDataType"](c,m,g.opts.strictNumbers,!0)+") { ",r){var o="dataType"+N,i="coerced"+N,l=(S+=" var "+o+" = typeof "+m+"; var "+i+" = undefined; ",g.opts.coerceTypes=="array"&&(S+=" if ("+o+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+o+" = typeof "+m+"; if ("+g.util.checkDataType(g.schema.type,m,g.opts.strictNumbers)+") "+i+" = "+m+"; } "),S+=" if ("+i+" !== undefined) ; ",r);if(l)for(var d,C=-1,p=l.length-1;C<p;)(d=l[C+=1])=="string"?S+=" else if ("+o+" == 'number' || "+o+" == 'boolean') "+i+" = '' + "+m+"; else if ("+m+" === null) "+i+" = ''; ":d=="number"||d=="integer"?(S+=" else if ("+o+" == 'boolean' || "+m+" === null || ("+o+" == 'string' && "+m+" && "+m+" == +"+m+" ",d=="integer"&&(S+=" && !("+m+" % 1)"),S+=")) "+i+" = +"+m+"; "):d=="boolean"?S+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+i+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+i+" = true; ":d=="null"?S+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+i+" = null; ":g.opts.coerceTypes=="array"&&d=="array"&&(S+=" else if ("+o+" == 'string' || "+o+" == 'number' || "+o+" == 'boolean' || "+m+" == null) "+i+" = ["+m+"]; ");(J=J||[]).push(S+=" else { "),S="",g.createErrors!==!1?(S=(S+=" { keyword: 'type' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(s)+" , params: { type: '")+(t?""+c.join(","):""+c)+"' } ",g.opts.messages!==!1&&(S=(S+=" , message: 'should be ")+(t?""+c.join(","):""+c)+"' "),g.opts.verbose&&(S+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),S+=" } "):S+=" {} ";var w=S,z=(S=J.pop(),!g.compositeRule&&f?g.async?S+=" throw new ValidationError(["+w+"]); ":S+=" validate.errors = ["+w+"]; return false; ":S+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",A?"data"+(A-1||""):"parentData");S=S+(" } if ("+i+" !== undefined) { ")+(" "+m+" = "+i+"; "),A||(S+="if ("+z+" !== undefined)"),S+=" "+z+"["+(A?g.dataPathArr[A]:"parentDataProperty")+"] = "+i+"; } "}else w=((J=J||[]).push(S),S="",g.createErrors!==!1?(S=(S+=" { keyword: 'type' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(s)+" , params: { type: '")+(t?""+c.join(","):""+c)+"' } ",g.opts.messages!==!1&&(S=(S+=" , message: 'should be ")+(t?""+c.join(","):""+c)+"' "),g.opts.verbose&&(S+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),S+=" } "):S+=" {} ",S),S=J.pop(),!g.compositeRule&&f?g.async?S+=" throw new ValidationError(["+w+"]); ":S+=" validate.errors = ["+w+"]; return false; ":S+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";S+=" } "}}if(g.schema.$ref&&!K)S+=" "+g.RULES.all.$ref.code(g,"$ref")+" ",f&&(S=(S+=" } if (errors === ")+(P?"0":"errs_"+N)+") { ",a+="}");else{var x=g.RULES;if(x){for(var $=-1,H=x.length-1;$<H;)if(G(e=x[$+=1])){if(e.type&&(S+=" if ("+g.util.checkDataType(e.type,m,g.opts.strictNumbers)+") { "),g.opts.useDefaults){if(e.type=="object"&&g.schema.properties){var B=g.schema.properties,O=Object.keys(B);if(O){for(var u,I=-1,L=O.length-1;I<L;)if((W=B[u=O[I+=1]]).default!==void 0){var v=m+g.util.getProperty(u);if(g.compositeRule){if(g.opts.strictDefaults){if(T="default is ignored for: "+v,g.opts.strictDefaults!=="log")throw new Error(T);g.logger.warn(T)}}else S+=" if ("+v+" === undefined ",g.opts.useDefaults=="empty"&&(S+=" || "+v+" === null || "+v+" === '' "),S+=" ) "+v+" = ",g.opts.useDefaults=="shared"?S+=" "+g.useDefault(W.default)+" ":S+=" "+JSON.stringify(W.default)+" ",S+="; "}}}else if(e.type=="array"&&Array.isArray(g.schema.items)){var _=g.schema.items;if(_){for(var W,C=-1,F=_.length-1;C<F;)if((W=_[C+=1]).default!==void 0)if(v=m+"["+C+"]",g.compositeRule){if(g.opts.strictDefaults){if(T="default is ignored for: "+v,g.opts.strictDefaults!=="log")throw new Error(T);g.logger.warn(T)}}else S+=" if ("+v+" === undefined ",g.opts.useDefaults=="empty"&&(S+=" || "+v+" === null || "+v+" === '' "),S+=" ) "+v+" = ",g.opts.useDefaults=="shared"?S+=" "+g.useDefault(W.default)+" ":S+=" "+JSON.stringify(W.default)+" ",S+="; "}}}var J,Q=e.rules;if(Q)for(var X,te=-1,E=Q.length-1;te<E;)V(X=Q[te+=1])&&(X=X.code(g,X.keyword,e.type))&&(S+=" "+X+" ",f)&&(h+="}");f&&(S+=" "+h+" ",h=""),e.type&&(S+=" } ",c)&&c===e.type&&!r&&(S+=" else { ",n=g.schemaPath+".type",s=g.errSchemaPath+"/type",(J=J||[]).push(S),S="",g.createErrors!==!1?(S=(S+=" { keyword: 'type' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(s)+" , params: { type: '")+(t?""+c.join(","):""+c)+"' } ",g.opts.messages!==!1&&(S=(S+=" , message: 'should be ")+(t?""+c.join(","):""+c)+"' "),g.opts.verbose&&(S+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),S+=" } "):S+=" {} ",w=S,S=J.pop(),!g.compositeRule&&f?g.async?S+=" throw new ValidationError(["+w+"]); ":S+=" validate.errors = ["+w+"]; return false; ":S+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } "),f&&(S=(S+=" if (errors === ")+(P?"0":"errs_"+N)+") { ",a+="}")}}}f&&(S+=" "+a+" "),P?S=S+(M?" if (errors === 0) return data; else throw new ValidationError(vErrors); ":" validate.errors = vErrors; return errors === 0; ")+" }; return validate;":S+=" var "+y+" = errors === errs_"+N+";"}return S;function G(b){for(var k=b.rules,R=0;R<k.length;R++)if(V(k[R]))return 1}function V(b){return g.schema[b.keyword]!==void 0||b.implements&&function(k){for(var R=k.implements,D=0;D<R.length;D++)if(g.schema[R[D]]!==void 0)return 1}(b)}}},7931:function(le,g,Z){var U=/^[a-z_$][a-z0-9_$-]*$/i,S=Z(1793),M=Z(5868);function K(j,z){K.errors=null;var P=this._validateKeyword=this._validateKeyword||this.compile(M,!0);if(P(j))return!0;if(K.errors=P.errors,z)throw new Error("custom keyword definition is invalid: "+this.errorsText(P.errors));return!1}le.exports={add:function(j,z){var P=this.RULES;if(P.keywords[j])throw new Error("Keyword "+j+" is already defined");if(!U.test(j))throw new Error("Keyword "+j+" is not a valid identifier");if(z){this.validateKeyword(z,!0);var N=z.type;if(Array.isArray(N))for(var A=0;A<N.length;A++)T(j,N[A],z);else T(j,N,z);var m=z.metaSchema;m&&(z.$data&&this._opts.$data&&(m={anyOf:[m,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),z.validateSchema=this.compile(m,!0))}function T(y,f,h){for(var a,c=0;c<P.length;c++){var t=P[c];if(t.type==f){a=t;break}}a||P.push(a={type:f,rules:[]}),h={keyword:y,definition:h,custom:!0,code:S,implements:h.implements},a.rules.push(h),P.custom[y]=h}return P.keywords[j]=P.all[j]=!0,this},get:function(j){var z=this.RULES.custom[j];return z?z.definition:this.RULES.keywords[j]||!1},remove:function(j){var z=this.RULES;delete z.keywords[j],delete z.all[j],delete z.custom[j];for(var P=0;P<z.length;P++)for(var N=z[P].rules,A=0;A<N.length;A++)if(N[A].keyword==j){N.splice(A,1);break}return this},validate:K}},2303:function(le){le.exports=function g(Z,U){if(Z===U)return!0;if(Z&&U&&typeof Z=="object"&&typeof U=="object"){if(Z.constructor!==U.constructor)return!1;var S,M,K;if(Array.isArray(Z)){if((S=Z.length)!=U.length)return!1;for(M=S;M--!=0;)if(!g(Z[M],U[M]))return!1}else{if(Z.constructor===RegExp)return Z.source===U.source&&Z.flags===U.flags;if(Z.valueOf!==Object.prototype.valueOf)return Z.valueOf()===U.valueOf();if(Z.toString!==Object.prototype.toString)return Z.toString()===U.toString();if((S=(K=Object.keys(Z)).length)!==Object.keys(U).length)return!1;for(M=S;M--!=0;)if(!Object.prototype.hasOwnProperty.call(U,K[M]))return!1;for(M=S;M--!=0;){var j=K[M];if(!g(Z[j],U[j]))return!1}}return!0}return Z!=Z&&U!=U}},3508:function(le){le.exports=function(g,Z){var U,S=typeof(Z=typeof(Z=Z||{})=="function"?{cmp:Z}:Z).cycles=="boolean"&&Z.cycles,M=Z.cmp&&(U=Z.cmp,function(j){return function(z,P){return z={key:z,value:j[z]},P={key:P,value:j[P]},U(z,P)}}),K=[];return function j(z){if((z=z&&z.toJSON&&typeof z.toJSON=="function"?z.toJSON():z)!==void 0){if(typeof z=="number")return isFinite(z)?""+z:"null";if(typeof z!="object")return JSON.stringify(z);if(Array.isArray(z)){for(A="[",m=0;m<z.length;m++)m&&(A+=","),A+=j(z[m])||"null";return A+"]"}if(z===null)return"null";if(K.indexOf(z)!==-1){if(S)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var P=K.push(z)-1,N=Object.keys(z).sort(M&&M(z)),A="",m=0;m<N.length;m++){var T=N[m],y=j(z[T]);y&&(A&&(A+=","),A+=JSON.stringify(T)+":"+y)}return K.splice(P,1),"{"+A+"}"}}(g)}},233:function(le){le.exports=function g(N,A){function S(c){return g.insensitive&&(""+c).toLowerCase()||""+c}var M,K,f=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,y=/(^[ ]*|[ ]*$)/g,j=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,z=/^0x[0-9a-f]+$/i,P=/^0/,N=S(N).replace(y,"")||"",A=S(A).replace(y,"")||"",m=N.replace(f,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),T=A.replace(f,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),y=parseInt(N.match(z),16)||m.length!==1&&N.match(j)&&Date.parse(N),f=parseInt(A.match(z),16)||y&&A.match(j)&&Date.parse(A)||null;if(f){if(y<f)return-1;if(f<y)return 1}for(var h=0,a=Math.max(m.length,T.length);h<a;h++){if(M=!(m[h]||"").match(P)&&parseFloat(m[h])||m[h]||0,K=!(T[h]||"").match(P)&&parseFloat(T[h])||T[h]||0,isNaN(M)!==isNaN(K))return isNaN(M)?1:-1;if(typeof M!=typeof K&&(M+="",K+=""),M<K)return-1;if(K<M)return 1}return 0}},5156:function(le,g){(function(Z){function U(u){return u!==null&&Object.prototype.toString.call(u)==="[object Array]"}function S(u){return u!==null&&Object.prototype.toString.call(u)==="[object Object]"}function M(u,I){if(u!==I){if(Object.prototype.toString.call(u)!==Object.prototype.toString.call(I))return!1;if(U(u)===!0){if(u.length!==I.length)return!1;for(var L=0;L<u.length;L++)if(M(u[L],I[L])===!1)return!1}else{if(S(u)!==!0)return!1;var v,_,W={};for(v in u)if(hasOwnProperty.call(u,v)){if(M(u[v],I[v])===!1)return!1;W[v]=!0}for(_ in I)if(hasOwnProperty.call(I,_)&&W[_]!==!0)return!1}}return!0}function K(u){if(u===""||u===!1||u===null||U(u)&&u.length===0)return!0;if(S(u)){for(var I in u)if(u.hasOwnProperty(I))return!1;return!0}return!1}var j=typeof String.prototype.trimLeft=="function"?function(u){return u.trimLeft()}:function(u){return u.match(/^\s*(.*)/)[1]},z={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},P="UnquotedIdentifier",N="QuotedIdentifier",A="Rbracket",m="Rparen",T="Comma",y="Colon",f="Rbrace",h="Number",a="Current",c="Expref",t="Pipe",r="Flatten",e="Star",n="Filter",s="Lbrace",o="Lbracket",i="Lparen",l="Literal",d={".":"Dot","*":e,",":T,":":y,"{":s,"}":f,"]":A,"(":i,")":m,"@":a},C={"<":!0,">":!0,"=":!0,"!":!0},p={" ":!0," ":!0,"\n":!0};function w(u){return"0"<=u&&u<="9"||u==="-"}function x(){}x.prototype={tokenize:function(u){var I,L,v=[];for(this._current=0;this._current<u.length;)if("a"<=(W=u[this._current])&&W<="z"||"A"<=W&&W<="Z"||W==="_")_=this._current,I=this._consumeUnquotedIdentifier(u),v.push({type:P,value:I,start:_});else if(d[u[this._current]]!==void 0)v.push({type:d[u[this._current]],value:u[this._current],start:this._current}),this._current++;else if(w(u[this._current]))L=this._consumeNumber(u),v.push(L);else if(u[this._current]==="[")L=this._consumeLBracket(u),v.push(L);else if(u[this._current]==='"')_=this._current,I=this._consumeQuotedIdentifier(u),v.push({type:N,value:I,start:_});else if(u[this._current]==="'")_=this._current,I=this._consumeRawStringLiteral(u),v.push({type:l,value:I,start:_});else if(u[this._current]==="`"){var _=this._current,W=this._consumeLiteral(u);v.push({type:l,value:W,start:_})}else if(C[u[this._current]]!==void 0)v.push(this._consumeOperator(u));else if(p[u[this._current]]!==void 0)this._current++;else if(u[this._current]==="&")_=this._current,this._current++,u[this._current]==="&"?(this._current++,v.push({type:"And",value:"&&",start:_})):v.push({type:c,value:"&",start:_});else{if(u[this._current]!=="|")throw(W=new Error("Unknown character:"+u[this._current])).name="LexerError",W;_=this._current,this._current++,u[this._current]==="|"?(this._current++,v.push({type:"Or",value:"||",start:_})):v.push({type:t,value:"|",start:_})}return v},_consumeUnquotedIdentifier:function(u){var I,L=this._current;for(this._current++;this._current<u.length&&("a"<=(I=u[this._current])&&I<="z"||"A"<=I&&I<="Z"||"0"<=I&&I<="9"||I==="_");)this._current++;return u.slice(L,this._current)},_consumeQuotedIdentifier:function(u){for(var I=this._current,L=(this._current++,u.length);u[this._current]!=='"'&&this._current<L;){var v=this._current;u[v]!=="\\"||u[v+1]!=="\\"&&u[v+1]!=='"'?v++:v+=2,this._current=v}return this._current++,JSON.parse(u.slice(I,this._current))},_consumeRawStringLiteral:function(u){for(var I=this._current,L=(this._current++,u.length);u[this._current]!=="'"&&this._current<L;){var v=this._current;u[v]!=="\\"||u[v+1]!=="\\"&&u[v+1]!=="'"?v++:v+=2,this._current=v}return this._current++,u.slice(I+1,this._current-1).replace("\\'","'")},_consumeNumber:function(u){for(var I=this._current,L=(this._current++,u.length);w(u[this._current])&&this._current<L;)this._current++;var v=parseInt(u.slice(I,this._current));return{type:h,value:v,start:I}},_consumeLBracket:function(u){var I=this._current;return this._current++,u[this._current]==="?"?(this._current++,{type:n,value:"[?",start:I}):u[this._current]==="]"?(this._current++,{type:r,value:"[]",start:I}):{type:o,value:"[",start:I}},_consumeOperator:function(u){var I=this._current,L=u[I];return this._current++,L==="!"?u[this._current]==="="?(this._current++,{type:"NE",value:"!=",start:I}):{type:"Not",value:"!",start:I}:L==="<"?u[this._current]==="="?(this._current++,{type:"LTE",value:"<=",start:I}):{type:"LT",value:"<",start:I}:L===">"?u[this._current]==="="?(this._current++,{type:"GTE",value:">=",start:I}):{type:"GT",value:">",start:I}:L==="="&&u[this._current]==="="?(this._current++,{type:"EQ",value:"==",start:I}):void 0},_consumeLiteral:function(u){this._current++;for(var I=this._current,L=u.length;u[this._current]!=="`"&&this._current<L;){var v=this._current;u[v]!=="\\"||u[v+1]!=="\\"&&u[v+1]!=="`"?v++:v+=2,this._current=v}return I=(I=j(u.slice(I,this._current))).replace("\\`","`"),I=this._looksLikeJSON(I)?JSON.parse(I):JSON.parse('"'+I+'"'),this._current++,I},_looksLikeJSON:function(u){if(u==="")return!1;if(0<='[{"'.indexOf(u[0])||0<=["true","false","null"].indexOf(u))return!0;if(!(0<="-0123456789".indexOf(u[0])))return!1;try{return JSON.parse(u),!0}catch{return!1}}};var $={};function H(){}function B(u){this.runtime=u}function O(u){this._interpreter=u,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[0]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[0]}]},contains:{_func:this._functionContains,_signature:[{types:[2,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[2]},{types:[2]}]},floor:{_func:this._functionFloor,_signature:[{types:[0]}]},length:{_func:this._functionLength,_signature:[{types:[2,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[2]},{types:[2]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[2]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[2,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}$.EOF=0,$[P]=0,$[N]=0,$[A]=0,$[m]=0,$[T]=0,$[f]=0,$[h]=0,$[a]=0,$[c]=0,$.Pipe=1,$.Or=2,$.And=3,$.EQ=5,$.GT=5,$.LT=5,$.GTE=5,$.LTE=5,$.NE=5,$[r]=9,$.Star=20,$[n]=21,$.Dot=40,$.Not=45,$[s]=50,$[o]=55,$[i]=60,H.prototype={parse:function(L){this._loadTokens(L),this.index=0;var I,L=this.expression(0);if(this._lookahead(0)!=="EOF")throw I=this._lookaheadToken(0),(I=new Error("Unexpected token type: "+I.type+", value: "+I.value)).name="ParserError",I;return L},_loadTokens:function(u){var I=new x().tokenize(u);I.push({type:"EOF",value:"",start:u.length}),this.tokens=I},expression:function(u){for(var I=this._lookaheadToken(0),L=(this._advance(),this.nud(I)),v=this._lookahead(0);u<$[v];)this._advance(),L=this.led(v,L),v=this._lookahead(0);return L},_lookahead:function(u){return this.tokens[this.index+u].type},_lookaheadToken:function(u){return this.tokens[this.index+u]},_advance:function(){this.index++},nud:function(u){var I,L;switch(u.type){case l:return{type:"Literal",value:u.value};case P:return{type:"Field",name:u.value};case N:var v={type:"Field",name:u.value};if(this._lookahead(0)===i)throw new Error("Quoted identifier not allowed for function names.");return v;case"Not":return{type:"NotExpression",children:[I=this.expression($.Not)]};case e:return I=null,{type:"ValueProjection",children:[{type:"Identity"},I=this._lookahead(0)===A?{type:"Identity"}:this._parseProjectionRHS($.Star)]};case n:return this.led(u.type,{type:"Identity"});case s:return this._parseMultiselectHash();case r:return{type:"Projection",children:[{type:r,children:[{type:"Identity"}]},I=this._parseProjectionRHS($.Flatten)]};case o:return this._lookahead(0)===h||this._lookahead(0)===y?(I=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},I)):this._lookahead(0)===e&&this._lookahead(1)===A?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},I=this._parseProjectionRHS($.Star)]}):this._parseMultiselectList();case a:return{type:a};case c:return{type:"ExpressionReference",children:[L=this.expression($.Expref)]};case i:for(var _=[];this._lookahead(0)!==m;)this._lookahead(0)===a?(L={type:a},this._advance()):L=this.expression(0),_.push(L);return this._match(m),_[0];default:this._errorToken(u)}},led:function(u,I){var L;switch(u){case"Dot":var v=$.Dot;return this._lookahead(0)!==e?{type:"Subexpression",children:[I,L=this._parseDotRHS(v)]}:(this._advance(),{type:"ValueProjection",children:[I,L=this._parseProjectionRHS(v)]});case t:return L=this.expression($.Pipe),{type:t,children:[I,L]};case"Or":return{type:"OrExpression",children:[I,L=this.expression($.Or)]};case"And":return{type:"AndExpression",children:[I,L=this.expression($.And)]};case i:for(var _,v=I.name,W=[];this._lookahead(0)!==m;)this._lookahead(0)===a?(_={type:a},this._advance()):_=this.expression(0),this._lookahead(0)===T&&this._match(T),W.push(_);return this._match(m),{type:"Function",name:v,children:W};case n:return v=this.expression(0),this._match(A),{type:"FilterProjection",children:[I,L=this._lookahead(0)===r?{type:"Identity"}:this._parseProjectionRHS($.Filter),v]};case r:return{type:"Projection",children:[{type:r,children:[I]},this._parseProjectionRHS($.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(I,u);case o:return v=this._lookaheadToken(0),v.type===h||v.type===y?(L=this._parseIndexExpression(),this._projectIfSlice(I,L)):(this._match(e),this._match(A),{type:"Projection",children:[I,L=this._parseProjectionRHS($.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(u){var I;if(this._lookahead(0)!==u)throw I=this._lookaheadToken(0),(u=new Error("Expected "+u+", got: "+I.type)).name="ParserError",u;this._advance()},_errorToken:function(u){throw u=new Error("Invalid token ("+u.type+'): "'+u.value+'"'),u.name="ParserError",u},_parseIndexExpression:function(){var u;return this._lookahead(0)===y||this._lookahead(1)===y?this._parseSliceExpression():(u={type:"Index",value:this._lookaheadToken(0).value},this._advance(),this._match(A),u)},_projectIfSlice:function(u,I){return u={type:"IndexExpression",children:[u,I]},I.type==="Slice"?{type:"Projection",children:[u,this._parseProjectionRHS($.Star)]}:u},_parseSliceExpression:function(){for(var u,I=[null,null,null],L=0,v=this._lookahead(0);v!==A&&L<3;){if(v===y)L++;else{if(v!==h)throw u=this._lookahead(0),(u=new Error("Syntax error, unexpected token: "+u.value+"("+u.type+")")).name="Parsererror",u;I[L]=this._lookaheadToken(0).value}this._advance(),v=this._lookahead(0)}return this._match(A),{type:"Slice",children:I}},_parseComparator:function(u,I){return{type:"Comparator",name:I,children:[u,this.expression($[I])]}},_parseDotRHS:function(u){var I=this._lookahead(0);return 0<=[P,N,e].indexOf(I)?this.expression(u):I===o?(this._match(o),this._parseMultiselectList()):I===s?(this._match(s),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(u){var I,L;if($[this._lookahead(0)]<10)I={type:"Identity"};else if(this._lookahead(0)===o)I=this.expression(u);else if(this._lookahead(0)===n)I=this.expression(u);else{if(this._lookahead(0)!=="Dot")throw L=this._lookaheadToken(0),(L=new Error("Sytanx error, unexpected token: "+L.value+"("+L.type+")")).name="ParserError",L;this._match("Dot"),I=this._parseDotRHS(u)}return I},_parseMultiselectList:function(){for(var u=[];this._lookahead(0)!==A;){var I=this.expression(0);if(u.push(I),this._lookahead(0)===T&&(this._match(T),this._lookahead(0)===A))throw new Error("Unexpected token Rbracket")}return this._match(A),{type:"MultiSelectList",children:u}},_parseMultiselectHash:function(){for(var u,I,L=[],v=[P,N];;){if(u=this._lookaheadToken(0),v.indexOf(u.type)<0)throw new Error("Expecting an identifier token, got: "+u.type);if(u=u.value,this._advance(),this._match(y),I=this.expression(0),L.push({type:"KeyValuePair",name:u,value:I}),this._lookahead(0)===T)this._match(T);else if(this._lookahead(0)===f){this._match(f);break}}return{type:"MultiSelectHash",children:L}}},B.prototype={search:function(u,I){return this.visit(u,I)},visit:function(u,I){var L,v,_,W,F,J;switch(u.type){case"Field":return I!==null&&S(I)?(Q=I[u.name])===void 0?null:Q:null;case"Subexpression":for(G=this.visit(u.children[0],I),R=1;R<u.children.length;R++)if((G=this.visit(u.children[1],G))===null)return null;return G;case"IndexExpression":return F=this.visit(u.children[0],I),this.visit(u.children[1],F);case"Index":return U(I)?(G=I[Q=(Q=u.value)<0?I.length+Q:Q])===void 0?null:G:null;case"Slice":if(!U(I))return null;var Q=u.children.slice(0),Q=this.computeSliceParams(I.length,Q),X=Q[0],te=Q[1],E=Q[2],G=[];if(0<E)for(R=X;R<te;R+=E)G.push(I[R]);else for(R=X;te<R;R+=E)G.push(I[R]);return G;case"Projection":var V=this.visit(u.children[0],I);if(!U(V))return null;for(b=[],R=0;R<V.length;R++)(v=this.visit(u.children[1],V[R]))!==null&&b.push(v);return b;case"ValueProjection":if(!S(V=this.visit(u.children[0],I)))return null;for(var b=[],k=function(Ee){for(var be=Object.keys(Ee),Se=[],we=0;we<be.length;we++)Se.push(Ee[be[we]]);return Se}(V),R=0;R<k.length;R++)(v=this.visit(u.children[1],k[R]))!==null&&b.push(v);return b;case"FilterProjection":if(!U(V=this.visit(u.children[0],I)))return null;var D=[],Y=[];for(R=0;R<V.length;R++)K(L=this.visit(u.children[2],V[R]))||D.push(V[R]);for(var re=0;re<D.length;re++)(v=this.visit(u.children[1],D[re]))!==null&&Y.push(v);return Y;case"Comparator":switch(_=this.visit(u.children[0],I),W=this.visit(u.children[1],I),u.name){case"EQ":G=M(_,W);break;case"NE":G=!M(_,W);break;case"GT":G=W<_;break;case"GTE":G=W<=_;break;case"LT":G=_<W;break;case"LTE":G=_<=W;break;default:throw new Error("Unknown comparator: "+u.name)}return G;case r:var pe=this.visit(u.children[0],I);if(!U(pe))return null;var me=[];for(R=0;R<pe.length;R++)U(v=pe[R])?me.push.apply(me,v):me.push(v);return me;case"Identity":return I;case"MultiSelectList":if(I===null)return null;for(b=[],R=0;R<u.children.length;R++)b.push(this.visit(u.children[R],I));return b;case"MultiSelectHash":if(I===null)return null;for(b={},R=0;R<u.children.length;R++)b[(J=u.children[R]).name]=this.visit(J.value,I);return b;case"OrExpression":return L=K(L=this.visit(u.children[0],I))?this.visit(u.children[1],I):L;case"AndExpression":return K(_=this.visit(u.children[0],I))===!0?_:this.visit(u.children[1],I);case"NotExpression":return K(_=this.visit(u.children[0],I));case"Literal":return u.value;case t:return F=this.visit(u.children[0],I),this.visit(u.children[1],F);case a:return I;case"Function":var ye=[];for(R=0;R<u.children.length;R++)ye.push(this.visit(u.children[R],I));return this.runtime.callFunction(u.name,ye);case"ExpressionReference":return Q=u.children[0],Q.jmespathType=c,Q;default:throw new Error("Unknown node type: "+u.type)}},computeSliceParams:function(u,L){var W=L[0],F=L[1],L=L[2],v=[null,null,null];if(L===null)L=1;else if(L===0)throw(_=new Error("Invalid slice, step cannot be 0")).name="RuntimeError",_;var _=L<0,W=W===null?_?u-1:0:this.capSliceRange(u,W,L),F=F===null?_?-1:u:this.capSliceRange(u,F,L);return v[0]=W,v[1]=F,v[2]=L,v},capSliceRange:function(u,I,L){return I<0?(I+=u)<0&&(I=L<0?-1:0):u<=I&&(I=L<0?u-1:u),I}},O.prototype={callFunction:function(u,I){var L=this.functionTable[u];if(L===void 0)throw new Error("Unknown function: "+u+"()");return this._validateArgs(u,I,L._signature),L._func.call(this,I)},_validateArgs:function(u,I,L){var v;if(L[L.length-1].variadic){if(I.length<L.length)throw v=L.length===1?" argument":" arguments",new Error("ArgumentError: "+u+"() takes at least"+L.length+v+" but received "+I.length)}else if(I.length!==L.length)throw v=L.length===1?" argument":" arguments",new Error("ArgumentError: "+u+"() takes "+L.length+v+" but received "+I.length);for(var _=0;_<L.length;_++){for(var W,F=!1,J=L[_].types,Q=this._getTypeName(I[_]),X=0;X<J.length;X++)if(this._typeMatches(Q,J[X],I[_])){F=!0;break}if(!F)throw W=J.map(function(te){return z[te]}).join(","),new Error("TypeError: "+u+"() expected argument "+(_+1)+" to be type "+W+" but received type "+z[Q]+" instead.")}},_typeMatches:function(u,I,L){if(I===1)return!0;if(I!==9&&I!==8&&I!==3)return u===I;if(I===3)return u===3;if(u===3){var v;I===8?v=0:I===9&&(v=2);for(var _=0;_<L.length;_++)if(!this._typeMatches(this._getTypeName(L[_]),v,L[_]))return!1;return!0}},_getTypeName:function(u){switch(Object.prototype.toString.call(u)){case"[object String]":return 2;case"[object Number]":return 0;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return u.jmespathType===c?6:4}},_functionStartsWith:function(u){return u[0].lastIndexOf(u[1])===0},_functionEndsWith:function(L){var I=L[0],L=L[1];return I.indexOf(L,I.length-L.length)!==-1},_functionReverse:function(u){var I;if(this._getTypeName(u[0])!==2)return(I=u[0].slice(0)).reverse(),I;for(var L=u[0],v="",_=L.length-1;0<=_;_--)v+=L[_];return v},_functionAbs:function(u){return Math.abs(u[0])},_functionCeil:function(u){return Math.ceil(u[0])},_functionAvg:function(u){for(var I=0,L=u[0],v=0;v<L.length;v++)I+=L[v];return I/L.length},_functionContains:function(u){return 0<=u[0].indexOf(u[1])},_functionFloor:function(u){return Math.floor(u[0])},_functionLength:function(u){return(S(u[0])?Object.keys(u[0]):u[0]).length},_functionMap:function(u){for(var I=[],L=this._interpreter,v=u[0],_=u[1],W=0;W<_.length;W++)I.push(L.visit(v,_[W]));return I},_functionMerge:function(u){for(var I={},L=0;L<u.length;L++){var v,_=u[L];for(v in _)I[v]=_[v]}return I},_functionMax:function(u){if(0<u[0].length){if(this._getTypeName(u[0][0])===0)return Math.max.apply(Math,u[0]);for(var I=u[0],L=I[0],v=1;v<I.length;v++)L.localeCompare(I[v])<0&&(L=I[v]);return L}return null},_functionMin:function(u){if(0<u[0].length){if(this._getTypeName(u[0][0])===0)return Math.min.apply(Math,u[0]);for(var I=u[0],L=I[0],v=1;v<I.length;v++)I[v].localeCompare(L)<0&&(L=I[v]);return L}return null},_functionSum:function(u){for(var I=0,L=u[0],v=0;v<L.length;v++)I+=L[v];return I},_functionType:function(u){switch(this._getTypeName(u[0])){case 0:return"number";case 2:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(u){return Object.keys(u[0])},_functionValues:function(u){for(var I=u[0],L=Object.keys(I),v=[],_=0;_<L.length;_++)v.push(I[L[_]]);return v},_functionJoin:function(u){var I=u[0];return u[1].join(I)},_functionToArray:function(u){return this._getTypeName(u[0])===3?u[0]:[u[0]]},_functionToString:function(u){return this._getTypeName(u[0])===2?u[0]:JSON.stringify(u[0])},_functionToNumber:function(u){var I=this._getTypeName(u[0]);return I===0?u[0]:I!==2||(I=+u[0],isNaN(I))?null:I},_functionNotNull:function(u){for(var I=0;I<u.length;I++)if(this._getTypeName(u[I])!==7)return u[I];return null},_functionSort:function(u){return u=u[0].slice(0),u.sort(),u},_functionSortBy:function(u){var I=u[0].slice(0);if(I.length!==0){var L=this._interpreter,v=u[1],_=this._getTypeName(L.visit(v,I[0]));if([0,2].indexOf(_)<0)throw new Error("TypeError");for(var W=this,F=[],J=0;J<I.length;J++)F.push([J,I[J]]);F.sort(function(X,te){var E=L.visit(v,X[1]),G=L.visit(v,te[1]);if(W._getTypeName(E)!==_)throw new Error("TypeError: expected "+_+", received "+W._getTypeName(E));if(W._getTypeName(G)!==_)throw new Error("TypeError: expected "+_+", received "+W._getTypeName(G));return G<E?1:E<G?-1:X[0]-te[0]});for(var Q=0;Q<F.length;Q++)I[Q]=F[Q][1]}return I},_functionMaxBy:function(u){for(var I,L,v=u[1],_=u[0],W=this.createKeyFunction(v,[0,2]),F=-1/0,J=0;J<_.length;J++)F<(L=W(_[J]))&&(F=L,I=_[J]);return I},_functionMinBy:function(u){for(var I,L,v=u[1],_=u[0],W=this.createKeyFunction(v,[0,2]),F=1/0,J=0;J<_.length;J++)(L=W(_[J]))<F&&(F=L,I=_[J]);return I},createKeyFunction:function(u,I){var L=this,v=this._interpreter;return function(F){var W,F=v.visit(u,F);if(I.indexOf(L._getTypeName(F))<0)throw W="TypeError: expected one of "+I+", received "+L._getTypeName(F),new Error(W);return F}}},Z.tokenize=function(u){return new x().tokenize(u)},Z.compile=function(u){return new H().parse(u)},Z.search=function(u,I){var L=new H,v=new B(_=new O),_=(_._interpreter=v,L.parse(I));return v.search(_,u)},Z.strictDeepEqual=M})(g)},500:function(le){var g=le.exports=function(U,S,M){typeof S=="function"&&(M=S,S={}),function K(j,z,P,N,A,m,T,y,f,h){if(N&&typeof N=="object"&&!Array.isArray(N)){for(var a in z(N,A,m,T,y,f,h),N){var c=N[a];if(Array.isArray(c)){if(a in g.arrayKeywords)for(var t=0;t<c.length;t++)K(j,z,P,c[t],A+"/"+a+"/"+t,m,A,a,N,t)}else if(a in g.propsKeywords){if(c&&typeof c=="object")for(var r in c)K(j,z,P,c[r],A+"/"+a+"/"+Z(r),m,A,a,N,r)}else(a in g.keywords||j.allKeys&&!(a in g.skipKeywords))&&K(j,z,P,c,A+"/"+a,m,A,a,N)}P(N,A,m,T,y,f,h)}}(S,typeof(M=S.cb||M)=="function"?M:M.pre||function(){},M.post||function(){},U,"",U)};function Z(U){return U.replace(/~/g,"~0").replace(/\//g,"~1")}g.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},g.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},g.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},g.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},7026:function(le,g){var Z={b:"\b",f:"\f",n:`
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},U="a".charCodeAt(),S=(g.parse=function(h,a,c){var t={},r=0,e=0,n=0,s=c&&c.bigint&&typeof BigInt!="undefined";return{data:o("",!0),pointers:t};function o(I,L){i(),x(I,"value");var v,_=C();switch(_){case"t":d("rue"),v=!0;break;case"f":d("alse"),v=!1;break;case"n":d("ull"),v=null;break;case'"':v=l();break;case"[":v=function(W){i();var F=[],J=0;if(C()!="]")for(p();;){F.push(o(W+"/"+J)),i();var Q=C();if(Q=="]")break;Q!=","&&O(),i(),J++}return F}(I);break;case"{":v=function(W){i();var F={};if(C()!="}")for(p();;){var X=H(),J=(C()!='"'&&O(),l()),Q=W+"/"+f(J),X=($(Q,"key",X),x(Q,"keyEnd"),i(),C()!=":"&&O(),i(),F[J]=o(Q),i(),C());if(X=="}")break;X!=","&&O(),i()}return F}(I);break;default:p(),0<="-0123456789".indexOf(_)?v=function(){var W="",F=!0;h[n]=="-"&&(W+=C()),W+=(h[n]=="0"?C:w)(),h[n]=="."&&(W+=C()+w(),F=!1),h[n]!="e"&&h[n]!="E"||(W+=C(),h[n]!="+"&&h[n]!="-"||(W+=C()),W+=w(),F=!1);var J=+W;return s&&F&&(J>Number.MAX_SAFE_INTEGER||J<Number.MIN_SAFE_INTEGER)?BigInt(W):J}():B()}return x(I,"valueEnd"),i(),L&&n<h.length&&B(),v}function i(){e:for(;n<h.length;){switch(h[n]){case" ":e++;break;case" ":e+=4;break;case"\r":e=0;break;case`
`:e=0,r++;break;default:break e}n++}}function l(){for(var I,L="";(I=C())!='"';)I=="\\"?(I=C())in Z?L+=Z[I]:I=="u"?L+=function(){for(var v=4,_=0;v--;){_<<=4;var W=C().toLowerCase();"a"<=W&&W<="f"?_+=W.charCodeAt()-U+10:"0"<=W&&W<="9"?_+=+W:O()}return String.fromCharCode(_)}():O():L+=I;return L}function d(I){for(var L=0;L<I.length;L++)C()!==I[L]&&O()}function C(){u();var I=h[n];return n++,e++,I}function p(){n--,e--}function w(){for(var I="";"0"<=h[n]&&h[n]<="9";)I+=C();if(I.length)return I;u(),B()}function x(I,L){$(I,L,H())}function $(I,L,v){t[I]=t[I]||{},t[I][L]=v}function H(){return{line:r,column:e,pos:n}}function B(){throw new SyntaxError("Unexpected token "+h[n]+" in JSON at position "+n)}function O(){p(),B()}function u(){if(n>=h.length)throw new SyntaxError("Unexpected end of JSON input")}},g.stringify=function(h,a,c){if(M(h)){var t=0;switch(typeof(e=typeof c=="object"?c.space:c)){case"number":var r=10<e?10:e<0?0:Math.floor(e),e=r&&B(r," "),n=r,s=r;break;case"string":e=e.slice(0,10);for(var o=s=n=0;o<e.length;o++){switch(e[o]){case" ":s++;break;case" ":s+=4;break;case"\r":s=0;break;case`
`:s=0,t++;break;default:throw new Error("whitespace characters not allowed in JSON")}n++}break;default:e=void 0}var i="",l={},d=0,C=0,p=0,w=c&&c.es6&&typeof Map=="function";return function O(u,I,L){switch(H(L,"value"),typeof u){case"number":case"bigint":case"boolean":x(""+u);break;case"string":x(m(u));break;case"object":u===null?x("null"):typeof u.toJSON=="function"?x(m(u.toJSON())):Array.isArray(u)?v():w?u.constructor.BYTES_PER_ELEMENT?v():u instanceof Map?W():u instanceof Set?W(!0):_():_()}H(L,"valueEnd");function v(){if(u.length){x("[");for(var F=I+1,J=0;J<u.length;J++){J&&x(","),$(F);var Q=M(u[J])?u[J]:null,X=L+"/"+J;O(Q,F,X)}$(I),x("]")}else x("[]")}function _(){var F=Object.keys(u);if(F.length){x("{");for(var J=I+1,Q=0;Q<F.length;Q++){var X,te=F[Q],E=u[te];M(E)&&(Q&&x(","),X=L+"/"+f(te),$(J),H(X,"key"),x(m(te)),H(X,"keyEnd"),x(":"),e&&x(" "),O(E,J,X))}$(I),x("}")}else x("{}")}function W(F){if(u.size){x("{");for(var J=I+1,Q=!0,X=u.entries(),te=X.next();!te.done;){var E,V=te.value,G=V[0],V=!!F||V[1];M(V)&&(Q||x(","),Q=!1,E=L+"/"+f(G),$(J),H(E,"key"),x(m(G)),H(E,"keyEnd"),x(":"),e&&x(" "),O(V,J,E)),te=X.next()}$(I),x("}")}else x("{}")}}(h,0,""),{json:i,pointers:l}}function x(O){C+=O.length,p+=O.length,i+=O}function $(O){if(e){for(i+=`
`+B(O,e),d++,C=0;O--;)t?(d+=t,C=s):C+=s,p+=n;p+=1}}function H(O,u){l[O]=l[O]||{},l[O][u]={line:d,column:C,pos:p}}function B(O,u){return Array(O+1).join(u)}},["number","bigint","boolean","string","object"]);function M(h){return 0<=S.indexOf(typeof h)}var K=/"|\\/g,j=/[\b]/g,z=/\f/g,P=/\n/g,N=/\r/g,A=/\t/g;function m(h){return'"'+(h=h.replace(K,"\\$&").replace(z,"\\f").replace(j,"\\b").replace(P,"\\n").replace(N,"\\r").replace(A,"\\t"))+'"'}var T=/~/g,y=/\//g;function f(h){return h.replace(T,"~0").replace(y,"~1")}},483:function(le,g){var Z,U;(function(){U=[],(U=typeof(Z=function(){function S(c){return typeof Node=="object"?c instanceof Node:c&&typeof c=="object"&&typeof c.nodeType=="number"}function M(c){return typeof c=="string"}function K(){var c=[];return{watch:c.push.bind(c),trigger:function(t,r){for(var e=!0,n={detail:r,preventDefault:function(){e=!1}},s=0;s<c.length;s++)c[s](t,n);return e}}}function j(c){return window.getComputedStyle(c).display==="none"}function z(c){this.elem=c}function P(c,t){return z.make(c("parent")).clazz("pico-overlay").clazz(c("overlayClass","")).stylize({display:"none",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).stylize(c("overlayStyles",{opacity:.5,background:"#000"})).onClick(function(){c("overlayClose",!0)&&t()})}z.make=function(c,t){typeof c=="string"&&(c=document.querySelector(c));var r=document.createElement(t||"div");return(c||document.body).appendChild(r),new z(r)},z.prototype={child:function(c){return z.make(this.elem,c)},stylize:function(c){c=c||{},typeof c.opacity!="undefined"&&(c.filter="alpha(opacity="+c.opacity*100+")");for(var t in c)c.hasOwnProperty(t)&&(this.elem.style[t]=c[t]);return this},clazz:function(c){return this.elem.className+=" "+c,this},html:function(c){return S(c)?this.elem.appendChild(c):this.elem.innerHTML=c,this},onClick:function(c){return this.elem.addEventListener("click",c),this},destroy:function(){this.elem.parentNode.removeChild(this.elem)},hide:function(){this.elem.style.display="none"},show:function(){this.elem.style.display="block"},attr:function(c,t){return t!==void 0&&this.elem.setAttribute(c,t),this},anyAncestor:function(c){for(var t=this.elem;t;){if(c(new z(t)))return!0;t=t.parentNode}return!1},isVisible:function(){return!j(this.elem)}};var N=1;function A(c,t){var r=c("width","auto");typeof r=="number"&&(r=""+r+"px");var e=c("modalId","pico-"+N++),n=z.make(c("parent")).clazz("pico-content").clazz(c("modalClass","")).stylize({display:"none",position:"fixed",zIndex:10001,left:"50%",top:"38.1966%",maxHeight:"90%",boxSizing:"border-box",width:r,"-ms-transform":"translate(-50%,-38.1966%)","-moz-transform":"translate(-50%,-38.1966%)","-webkit-transform":"translate(-50%,-38.1966%)","-o-transform":"translate(-50%,-38.1966%)",transform:"translate(-50%,-38.1966%)"}).stylize(c("modalStyles",{overflow:"auto",backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(c("content")).attr("id",e).attr("role","dialog").attr("aria-labelledby",c("ariaLabelledBy")).attr("aria-describedby",c("ariaDescribedBy",e)).onClick(function(s){var o=new z(s.target).anyAncestor(function(i){return/\bpico-close\b/.test(i.elem.className)});o&&t()});return n}function m(c,t){if(t("closeButton",!0))return c.child("button").html(t("closeHtml","&#xD7;")).clazz("pico-close").clazz(t("closeClass","")).stylize(t("closeStyles",{borderRadius:"2px",border:0,padding:0,cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})).attr("aria-label",t("close-label","Close"))}function T(c){return function(){return c().elem}}var y=K(),f=K();function h(c,t){function r(i,l){var d=i.msMatchesSelector||i.webkitMatchesSelector||i.matches;return d.call(i,l)}function e(i){return j(i)||r(i,":disabled")||i.hasAttribute("contenteditable")?!1:i.hasAttribute("tabindex")||r(i,"input,select,textarea,button,a[href],area[href],iframe")}function n(i){for(var l=i.getElementsByTagName("*"),d=0;d<l.length;d++)if(e(l[d]))return l[d]}function s(i){for(var l=i.getElementsByTagName("*"),d=l.length;d--;)if(e(l[d]))return l[d]}var o;c.beforeShow(function(){o=document.activeElement}),c.afterShow(function(){if(t()){var l=n(c.modalElem());l&&l.focus()}}),c.afterClose(function(){t()&&o&&o.focus(),o=null}),f.watch(function(l){if(t()&&c.isVisible()){var d=n(c.modalElem()),C=s(c.modalElem()),p=l.shiftKey?d:C;p===document.activeElement&&((l.shiftKey?C:d).focus(),l.preventDefault())}})}function a(c,t){var r,e=new z(document.body);c.beforeShow(function(){r=e.elem.style.overflow,t()&&e.stylize({overflow:"hidden"})}),c.afterClose(function(){e.stylize({overflow:r})})}return document.documentElement.addEventListener("keydown",function(t){var r=t.which||t.keyCode;r===27?y.trigger():r===9&&f.trigger(t)}),function(t){(M(t)||S(t))&&(t={content:t});var r=K(),e=K(),n=K(),s=K(),o=K();function i(O,u){var I=t[O];return typeof I=="function"&&(I=I(u)),I===void 0?u:I}var l=B.bind(window,"modal"),d=B.bind(window,"overlay"),C=B.bind(window,"close"),p;function w(O){d().hide(),l().hide(),o.trigger(p,O)}function x(O){s.trigger(p,O)&&w(O)}function $(O){return function(){return O.apply(this,arguments),p}}var H;function B(O,u){if(!H){var I=A(i,x);H={modal:I,overlay:P(i,x),close:m(I,i)},r.trigger(p,u)}return H[O]}return p={modalElem:T(l),closeElem:T(C),overlayElem:T(d),buildDom:$(B.bind(null,null)),isVisible:function(){return!!(H&&l&&l().isVisible())},show:function(O){return e.trigger(p,O)&&(d().show(),C(),l().show(),n.trigger(p,O)),this},close:$(x),forceClose:$(w),destroy:function(){l().destroy(),d().destroy(),d=l=C=void 0},options:function(O){Object.keys(O).map(function(u){t[u]=O[u]})},afterCreate:$(r.watch),beforeShow:$(e.watch),afterShow:$(n.watch),beforeClose:$(s.watch),afterClose:$(o.watch)},h(p,i.bind(null,"focus",!0)),a(p,i.bind(null,"bodyOverflow",!0)),y.watch(function(){i("escCloses",!0)&&p.isVisible()&&p.close()}),p}})=="function"?Z.apply(g,U):Z)!==void 0&&(le.exports=U)})()},7533:function(le,g){/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(Z){function U(){for(var se=arguments.length,q=Array(se),oe=0;oe<se;oe++)q[oe]=arguments[oe];if(q.length>1){q[0]=q[0].slice(0,-1);for(var de=q.length-1,ue=1;ue<de;++ue)q[ue]=q[ue].slice(1,-1);return q[de]=q[de].slice(1),q.join("")}else return q[0]}function S(se){return"(?:"+se+")"}function M(se){return se===void 0?"undefined":se===null?"null":Object.prototype.toString.call(se).split(" ").pop().split("]").shift().toLowerCase()}function K(se){return se.toUpperCase()}function j(se){return se!=null?se instanceof Array?se:typeof se.length!="number"||se.split||se.setInterval||se.call?[se]:Array.prototype.slice.call(se):[]}function z(se,q){var oe=se;if(q)for(var de in q)oe[de]=q[de];return oe}function P(se){var q="[A-Za-z]",oe="[0-9]",de=U(oe,"[A-Fa-f]"),ue=S(S("%[EFef]"+de+"%"+de+de+"%"+de+de)+"|"+S("%[89A-Fa-f]"+de+"%"+de+de)+"|"+S("%"+de+de)),$e="[\\:\\/\\?\\#\\[\\]\\@]",Be="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Ve=U($e,Be),Ze=se?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Je=se?"[\\uE000-\\uF8FF]":"[]",Fe=U(q,oe,"[\\-\\.\\_\\~]",Ze);S(q+U(q,oe,"[\\+\\-\\.]")+"*"),S(S(ue+"|"+U(Fe,Be,"[\\:]"))+"*");var je=S(S("25[0-5]")+"|"+S("2[0-4]"+oe)+"|"+S("1"+oe+oe)+"|"+S("0?[1-9]"+oe)+"|0?0?"+oe),qe=S(je+"\\."+je+"\\."+je+"\\."+je),Ge=S(de+"{1,4}"),Ye=S(S(Ge+"\\:"+Ge)+"|"+qe),et=S(S(Ge+"\\:")+"{6}"+Ye),Ue=S("\\:\\:"+S(Ge+"\\:")+"{5}"+Ye),Ct=S(S(Ge)+"?\\:\\:"+S(Ge+"\\:")+"{4}"+Ye),ht=S(S(S(Ge+"\\:")+"{0,1}"+Ge)+"?\\:\\:"+S(Ge+"\\:")+"{3}"+Ye),dt=S(S(S(Ge+"\\:")+"{0,2}"+Ge)+"?\\:\\:"+S(Ge+"\\:")+"{2}"+Ye),At=S(S(S(Ge+"\\:")+"{0,3}"+Ge)+"?\\:\\:"+Ge+"\\:"+Ye),yt=S(S(S(Ge+"\\:")+"{0,4}"+Ge)+"?\\:\\:"+Ye),at=S(S(S(Ge+"\\:")+"{0,5}"+Ge)+"?\\:\\:"+Ge),ut=S(S(S(Ge+"\\:")+"{0,6}"+Ge)+"?\\:\\:"),It=S([et,Ue,Ct,ht,dt,At,yt,at,ut].join("|")),mt=S(S(Fe+"|"+ue)+"+");S("[vV]"+de+"+\\."+U(Fe,Be,"[\\:]")+"+"),S(S(ue+"|"+U(Fe,Be))+"*");var St=S(ue+"|"+U(Fe,Be,"[\\:\\@]"));return S(S(ue+"|"+U(Fe,Be,"[\\@]"))+"+"),S(S(St+"|"+U("[\\/\\?]",Je))+"*"),{NOT_SCHEME:new RegExp(U("[^]",q,oe,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(U("[^\\%\\:]",Fe,Be),"g"),NOT_HOST:new RegExp(U("[^\\%\\[\\]\\:]",Fe,Be),"g"),NOT_PATH:new RegExp(U("[^\\%\\/\\:\\@]",Fe,Be),"g"),NOT_PATH_NOSCHEME:new RegExp(U("[^\\%\\/\\@]",Fe,Be),"g"),NOT_QUERY:new RegExp(U("[^\\%]",Fe,Be,"[\\:\\@\\/\\?]",Je),"g"),NOT_FRAGMENT:new RegExp(U("[^\\%]",Fe,Be,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(U("[^]",Fe,Be),"g"),UNRESERVED:new RegExp(Fe,"g"),OTHER_CHARS:new RegExp(U("[^\\%]",Fe,Ve),"g"),PCT_ENCODED:new RegExp(ue,"g"),IPV4ADDRESS:new RegExp("^("+qe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+It+")"+S(S("\\%25|\\%(?!"+de+"{2})")+"("+mt+")")+"?\\]?$")}}var N=P(!1),A=P(!0),m=function(){function se(q,oe){var de=[],ue=!0,$e=!1,Be=void 0;try{for(var Ve=q[Symbol.iterator](),Ze;!(ue=(Ze=Ve.next()).done)&&(de.push(Ze.value),!(oe&&de.length===oe));ue=!0);}catch(Je){$e=!0,Be=Je}finally{try{!ue&&Ve.return&&Ve.return()}finally{if($e)throw Be}}return de}return function(q,oe){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return se(q,oe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(se){if(Array.isArray(se)){for(var q=0,oe=Array(se.length);q<se.length;q++)oe[q]=se[q];return oe}else return Array.from(se)},y=2147483647,f=36,h=1,a=26,c=38,t=700,r=72,e=128,n="-",s=/^xn--/,o=/[^\0-\x7E]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=f-h,C=Math.floor,p=String.fromCharCode;function w(se){throw new RangeError(l[se])}function x(se,q){for(var oe=[],de=se.length;de--;)oe[de]=q(se[de]);return oe}function $(se,q){var oe=se.split("@"),de="";oe.length>1&&(de=oe[0]+"@",se=oe[1]),se=se.replace(i,".");var ue=se.split("."),$e=x(ue,q).join(".");return de+$e}function H(se){for(var q=[],oe=0,de=se.length;oe<de;){var ue=se.charCodeAt(oe++);if(ue>=55296&&ue<=56319&&oe<de){var $e=se.charCodeAt(oe++);($e&64512)==56320?q.push(((ue&1023)<<10)+($e&1023)+65536):(q.push(ue),oe--)}else q.push(ue)}return q}var B=function(q){return q-48<10?q-22:q-65<26?q-65:q-97<26?q-97:f},O=function(q,oe){return q+22+75*(q<26)-((oe!=0)<<5)},u=function(q,oe,de){var ue=0;for(q=de?C(q/t):q>>1,q+=C(q/oe);q>d*a>>1;ue+=f)q=C(q/d);return C(ue+(d+1)*q/(q+c))},I=function(q){var oe=[],de=q.length,ue=0,$e=e,Be=r,Ve=q.lastIndexOf(n);Ve<0&&(Ve=0);for(var Ze=0;Ze<Ve;++Ze)q.charCodeAt(Ze)>=128&&w("not-basic"),oe.push(q.charCodeAt(Ze));for(var Je=Ve>0?Ve+1:0;Je<de;){for(var Fe=ue,je=1,qe=f;;qe+=f){Je>=de&&w("invalid-input");var Ge=B(q.charCodeAt(Je++));(Ge>=f||Ge>C((y-ue)/je))&&w("overflow"),ue+=Ge*je;var Ye=qe<=Be?h:qe>=Be+a?a:qe-Be;if(Ge<Ye)break;var et=f-Ye;je>C(y/et)&&w("overflow"),je*=et}var Ue=oe.length+1;Be=u(ue-Fe,Ue,Fe==0),C(ue/Ue)>y-$e&&w("overflow"),$e+=C(ue/Ue),ue%=Ue,oe.splice(ue++,0,$e)}return String.fromCodePoint.apply(String,oe)},L=function(q){var oe=[];q=H(q);var de=q.length,ue=e,$e=0,Be=r,Ve=!0,Ze=!1,Je=void 0;try{for(var Fe=q[Symbol.iterator](),je;!(Ve=(je=Fe.next()).done);Ve=!0){var qe=je.value;qe<128&&oe.push(p(qe))}}catch(xt){Ze=!0,Je=xt}finally{try{!Ve&&Fe.return&&Fe.return()}finally{if(Ze)throw Je}}var Ge=oe.length,Ye=Ge;for(Ge&&oe.push(n);Ye<de;){var et=y,Ue=!0,Ct=!1,ht=void 0;try{for(var dt=q[Symbol.iterator](),At;!(Ue=(At=dt.next()).done);Ue=!0){var yt=At.value;yt>=ue&&yt<et&&(et=yt)}}catch(xt){Ct=!0,ht=xt}finally{try{!Ue&&dt.return&&dt.return()}finally{if(Ct)throw ht}}var at=Ye+1;et-ue>C((y-$e)/at)&&w("overflow"),$e+=(et-ue)*at,ue=et;var ut=!0,It=!1,mt=void 0;try{for(var St=q[Symbol.iterator](),Nt;!(ut=(Nt=St.next()).done);ut=!0){var Bt=Nt.value;if(Bt<ue&&++$e>y&&w("overflow"),Bt==ue){for(var Et=$e,_t=f;;_t+=f){var Tt=_t<=Be?h:_t>=Be+a?a:_t-Be;if(Et<Tt)break;var Mt=Et-Tt,Wt=f-Tt;oe.push(p(O(Tt+Mt%Wt,0))),Et=C(Mt/Wt)}oe.push(p(O(Et,0))),Be=u($e,at,Ye==Ge),$e=0,++Ye}}}catch(xt){It=!0,mt=xt}finally{try{!ut&&St.return&&St.return()}finally{if(It)throw mt}}++$e,++ue}return oe.join("")},v={version:"2.1.0",ucs2:{decode:H,encode:function(q){return String.fromCodePoint.apply(String,T(q))}},decode:I,encode:L,toASCII:function(q){return $(q,function(oe){return o.test(oe)?"xn--"+L(oe):oe})},toUnicode:function(q){return $(q,function(oe){return s.test(oe)?I(oe.slice(4).toLowerCase()):oe})}},_={};function W(se){var q=se.charCodeAt(0),oe=void 0;return q<16?oe="%0"+q.toString(16).toUpperCase():q<128?oe="%"+q.toString(16).toUpperCase():q<2048?oe="%"+(q>>6|192).toString(16).toUpperCase()+"%"+(q&63|128).toString(16).toUpperCase():oe="%"+(q>>12|224).toString(16).toUpperCase()+"%"+(q>>6&63|128).toString(16).toUpperCase()+"%"+(q&63|128).toString(16).toUpperCase(),oe}function F(se){for(var q="",oe=0,de=se.length;oe<de;){var ue=parseInt(se.substr(oe+1,2),16);if(ue<128)q+=String.fromCharCode(ue),oe+=3;else if(ue>=194&&ue<224){if(de-oe>=6){var $e=parseInt(se.substr(oe+4,2),16);q+=String.fromCharCode((ue&31)<<6|$e&63)}else q+=se.substr(oe,6);oe+=6}else if(ue>=224){if(de-oe>=9){var Be=parseInt(se.substr(oe+4,2),16),Ve=parseInt(se.substr(oe+7,2),16);q+=String.fromCharCode((ue&15)<<12|(Be&63)<<6|Ve&63)}else q+=se.substr(oe,9);oe+=9}else q+=se.substr(oe,3),oe+=3}return q}function J(se,q){function oe(de){var ue=F(de);return ue.match(q.UNRESERVED)?ue:de}return se.scheme&&(se.scheme=String(se.scheme).replace(q.PCT_ENCODED,oe).toLowerCase().replace(q.NOT_SCHEME,"")),se.userinfo!==void 0&&(se.userinfo=String(se.userinfo).replace(q.PCT_ENCODED,oe).replace(q.NOT_USERINFO,W).replace(q.PCT_ENCODED,K)),se.host!==void 0&&(se.host=String(se.host).replace(q.PCT_ENCODED,oe).toLowerCase().replace(q.NOT_HOST,W).replace(q.PCT_ENCODED,K)),se.path!==void 0&&(se.path=String(se.path).replace(q.PCT_ENCODED,oe).replace(se.scheme?q.NOT_PATH:q.NOT_PATH_NOSCHEME,W).replace(q.PCT_ENCODED,K)),se.query!==void 0&&(se.query=String(se.query).replace(q.PCT_ENCODED,oe).replace(q.NOT_QUERY,W).replace(q.PCT_ENCODED,K)),se.fragment!==void 0&&(se.fragment=String(se.fragment).replace(q.PCT_ENCODED,oe).replace(q.NOT_FRAGMENT,W).replace(q.PCT_ENCODED,K)),se}function Q(se){return se.replace(/^0*(.*)/,"$1")||"0"}function X(se,q){var oe=se.match(q.IPV4ADDRESS)||[],de=m(oe,2),ue=de[1];return ue?ue.split(".").map(Q).join("."):se}function te(se,q){var oe=se.match(q.IPV6ADDRESS)||[],de=m(oe,3),ue=de[1],$e=de[2];if(ue){for(var Be=ue.toLowerCase().split("::").reverse(),Ve=m(Be,2),Ze=Ve[0],Je=Ve[1],Fe=Je?Je.split(":").map(Q):[],je=Ze.split(":").map(Q),qe=q.IPV4ADDRESS.test(je[je.length-1]),Ge=qe?7:8,Ye=je.length-Ge,et=Array(Ge),Ue=0;Ue<Ge;++Ue)et[Ue]=Fe[Ue]||je[Ye+Ue]||"";qe&&(et[Ge-1]=X(et[Ge-1],q));var Ct=et.reduce(function(at,ut,It){if(!ut||ut==="0"){var mt=at[at.length-1];mt&&mt.index+mt.length===It?mt.length++:at.push({index:It,length:1})}return at},[]),ht=Ct.sort(function(at,ut){return ut.length-at.length})[0],dt=void 0;if(ht&&ht.length>1){var At=et.slice(0,ht.index),yt=et.slice(ht.index+ht.length);dt=At.join(":")+"::"+yt.join(":")}else dt=et.join(":");return $e&&(dt+="%"+$e),dt}else return se}var E=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G="".match(/(){0}/)[1]===void 0;function V(se){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe={},de=q.iri!==!1?A:N;q.reference==="suffix"&&(se=(q.scheme?q.scheme+":":"")+"//"+se);var ue=se.match(E);if(ue){G?(oe.scheme=ue[1],oe.userinfo=ue[3],oe.host=ue[4],oe.port=parseInt(ue[5],10),oe.path=ue[6]||"",oe.query=ue[7],oe.fragment=ue[8],isNaN(oe.port)&&(oe.port=ue[5])):(oe.scheme=ue[1]||void 0,oe.userinfo=se.indexOf("@")!==-1?ue[3]:void 0,oe.host=se.indexOf("//")!==-1?ue[4]:void 0,oe.port=parseInt(ue[5],10),oe.path=ue[6]||"",oe.query=se.indexOf("?")!==-1?ue[7]:void 0,oe.fragment=se.indexOf("#")!==-1?ue[8]:void 0,isNaN(oe.port)&&(oe.port=se.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ue[4]:void 0)),oe.host&&(oe.host=te(X(oe.host,de),de)),oe.scheme===void 0&&oe.userinfo===void 0&&oe.host===void 0&&oe.port===void 0&&!oe.path&&oe.query===void 0?oe.reference="same-document":oe.scheme===void 0?oe.reference="relative":oe.fragment===void 0?oe.reference="absolute":oe.reference="uri",q.reference&&q.reference!=="suffix"&&q.reference!==oe.reference&&(oe.error=oe.error||"URI is not a "+q.reference+" reference.");var $e=_[(q.scheme||oe.scheme||"").toLowerCase()];if(!q.unicodeSupport&&(!$e||!$e.unicodeSupport)){if(oe.host&&(q.domainHost||$e&&$e.domainHost))try{oe.host=v.toASCII(oe.host.replace(de.PCT_ENCODED,F).toLowerCase())}catch(Be){oe.error=oe.error||"Host's domain name can not be converted to ASCII via punycode: "+Be}J(oe,N)}else J(oe,de);$e&&$e.parse&&$e.parse(oe,q)}else oe.error=oe.error||"URI can not be parsed.";return oe}function b(se,q){var oe=q.iri!==!1?A:N,de=[];return se.userinfo!==void 0&&(de.push(se.userinfo),de.push("@")),se.host!==void 0&&de.push(te(X(String(se.host),oe),oe).replace(oe.IPV6ADDRESS,function(ue,$e,Be){return"["+$e+(Be?"%25"+Be:"")+"]"})),(typeof se.port=="number"||typeof se.port=="string")&&(de.push(":"),de.push(String(se.port))),de.length?de.join(""):void 0}var k=/^\.\.?\//,R=/^\/\.(\/|$)/,D=/^\/\.\.(\/|$)/,Y=/^\/?(?:.|\n)*?(?=\/|$)/;function re(se){for(var q=[];se.length;)if(se.match(k))se=se.replace(k,"");else if(se.match(R))se=se.replace(R,"/");else if(se.match(D))se=se.replace(D,"/"),q.pop();else if(se==="."||se==="..")se="";else{var oe=se.match(Y);if(oe){var de=oe[0];se=se.slice(de.length),q.push(de)}else throw new Error("Unexpected dot segment condition")}return q.join("")}function pe(se){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=q.iri?A:N,de=[],ue=_[(q.scheme||se.scheme||"").toLowerCase()];if(ue&&ue.serialize&&ue.serialize(se,q),se.host&&!oe.IPV6ADDRESS.test(se.host)){if(q.domainHost||ue&&ue.domainHost)try{se.host=q.iri?v.toUnicode(se.host):v.toASCII(se.host.replace(oe.PCT_ENCODED,F).toLowerCase())}catch(Ve){se.error=se.error||"Host's domain name can not be converted to "+(q.iri?"Unicode":"ASCII")+" via punycode: "+Ve}}J(se,oe),q.reference!=="suffix"&&se.scheme&&(de.push(se.scheme),de.push(":"));var $e=b(se,q);if($e!==void 0&&(q.reference!=="suffix"&&de.push("//"),de.push($e),se.path&&se.path.charAt(0)!=="/"&&de.push("/")),se.path!==void 0){var Be=se.path;!q.absolutePath&&(!ue||!ue.absolutePath)&&(Be=re(Be)),$e===void 0&&(Be=Be.replace(/^\/\//,"/%2F")),de.push(Be)}return se.query!==void 0&&(de.push("?"),de.push(se.query)),se.fragment!==void 0&&(de.push("#"),de.push(se.fragment)),de.join("")}function me(se,q){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},de=arguments[3],ue={};return de||(se=V(pe(se,oe),oe),q=V(pe(q,oe),oe)),oe=oe||{},!oe.tolerant&&q.scheme?(ue.scheme=q.scheme,ue.userinfo=q.userinfo,ue.host=q.host,ue.port=q.port,ue.path=re(q.path||""),ue.query=q.query):(q.userinfo!==void 0||q.host!==void 0||q.port!==void 0?(ue.userinfo=q.userinfo,ue.host=q.host,ue.port=q.port,ue.path=re(q.path||""),ue.query=q.query):(q.path?(q.path.charAt(0)==="/"?ue.path=re(q.path):((se.userinfo!==void 0||se.host!==void 0||se.port!==void 0)&&!se.path?ue.path="/"+q.path:se.path?ue.path=se.path.slice(0,se.path.lastIndexOf("/")+1)+q.path:ue.path=q.path,ue.path=re(ue.path)),ue.query=q.query):(ue.path=se.path,q.query!==void 0?ue.query=q.query:ue.query=se.query),ue.userinfo=se.userinfo,ue.host=se.host,ue.port=se.port),ue.scheme=se.scheme),ue.fragment=q.fragment,ue}function ye(se,q,oe){var de=z({scheme:"null"},oe);return pe(me(V(se,de),V(q,de),de,!0),de)}function Ee(se,q){return typeof se=="string"?se=pe(V(se,q),q):M(se)==="object"&&(se=V(pe(se,q),q)),se}function be(se,q,oe){return typeof se=="string"?se=pe(V(se,oe),oe):M(se)==="object"&&(se=pe(se,oe)),typeof q=="string"?q=pe(V(q,oe),oe):M(q)==="object"&&(q=pe(q,oe)),se===q}function Se(se,q){return se&&se.toString().replace(!q||!q.iri?N.ESCAPE:A.ESCAPE,W)}function we(se,q){return se&&se.toString().replace(!q||!q.iri?N.PCT_ENCODED:A.PCT_ENCODED,F)}var Ne={scheme:"http",domainHost:!0,parse:function(q,oe){return q.host||(q.error=q.error||"HTTP URIs must have a host."),q},serialize:function(q,oe){var de=String(q.scheme).toLowerCase()==="https";return(q.port===(de?443:80)||q.port==="")&&(q.port=void 0),q.path||(q.path="/"),q}},Pe={scheme:"https",domainHost:Ne.domainHost,parse:Ne.parse,serialize:Ne.serialize};function Te(se){return typeof se.secure=="boolean"?se.secure:String(se.scheme).toLowerCase()==="wss"}var ce={scheme:"ws",domainHost:!0,parse:function(q,oe){var de=q;return de.secure=Te(de),de.resourceName=(de.path||"/")+(de.query?"?"+de.query:""),de.path=void 0,de.query=void 0,de},serialize:function(q,oe){if((q.port===(Te(q)?443:80)||q.port==="")&&(q.port=void 0),typeof q.secure=="boolean"&&(q.scheme=q.secure?"wss":"ws",q.secure=void 0),q.resourceName){var de=q.resourceName.split("?"),ue=m(de,2),$e=ue[0],Be=ue[1];q.path=$e&&$e!=="/"?$e:void 0,q.query=Be,q.resourceName=void 0}return q.fragment=void 0,q}},fe={scheme:"wss",domainHost:ce.domainHost,parse:ce.parse,serialize:ce.serialize},Ae={},Ie="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ne="[0-9A-Fa-f]",ie=S(S("%[EFef]"+ne+"%"+ne+ne+"%"+ne+ne)+"|"+S("%[89A-Fa-f]"+ne+"%"+ne+ne)+"|"+S("%"+ne+ne)),ge="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",xe=U("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Me="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",He=new RegExp(Ie,"g"),ee=new RegExp(ie,"g"),ae=new RegExp(U("[^]",ge,"[\\.]",'[\\"]',xe),"g"),he=new RegExp(U("[^]",Ie,Me),"g"),Ce=he;function Le(se){var q=F(se);return q.match(He)?q:se}var Re={scheme:"mailto",parse:function(q,oe){var de=q,ue=de.to=de.path?de.path.split(","):[];if(de.path=void 0,de.query){for(var $e=!1,Be={},Ve=de.query.split("&"),Ze=0,Je=Ve.length;Ze<Je;++Ze){var Fe=Ve[Ze].split("=");switch(Fe[0]){case"to":for(var je=Fe[1].split(","),qe=0,Ge=je.length;qe<Ge;++qe)ue.push(je[qe]);break;case"subject":de.subject=we(Fe[1],oe);break;case"body":de.body=we(Fe[1],oe);break;default:$e=!0,Be[we(Fe[0],oe)]=we(Fe[1],oe);break}}$e&&(de.headers=Be)}de.query=void 0;for(var Ye=0,et=ue.length;Ye<et;++Ye){var Ue=ue[Ye].split("@");if(Ue[0]=we(Ue[0]),oe.unicodeSupport)Ue[1]=we(Ue[1],oe).toLowerCase();else try{Ue[1]=v.toASCII(we(Ue[1],oe).toLowerCase())}catch(Ct){de.error=de.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ct}ue[Ye]=Ue.join("@")}return de},serialize:function(q,oe){var de=q,ue=j(q.to);if(ue){for(var $e=0,Be=ue.length;$e<Be;++$e){var Ve=String(ue[$e]),Ze=Ve.lastIndexOf("@"),Je=Ve.slice(0,Ze).replace(ee,Le).replace(ee,K).replace(ae,W),Fe=Ve.slice(Ze+1);try{Fe=oe.iri?v.toUnicode(Fe):v.toASCII(we(Fe,oe).toLowerCase())}catch(Ye){de.error=de.error||"Email address's domain name can not be converted to "+(oe.iri?"Unicode":"ASCII")+" via punycode: "+Ye}ue[$e]=Je+"@"+Fe}de.path=ue.join(",")}var je=q.headers=q.headers||{};q.subject&&(je.subject=q.subject),q.body&&(je.body=q.body);var qe=[];for(var Ge in je)je[Ge]!==Ae[Ge]&&qe.push(Ge.replace(ee,Le).replace(ee,K).replace(he,W)+"="+je[Ge].replace(ee,Le).replace(ee,K).replace(Ce,W));return qe.length&&(de.query=qe.join("&")),de}},We=/^([^\:]+)\:(.*)/,Ke={scheme:"urn",parse:function(q,oe){var de=q.path&&q.path.match(We),ue=q;if(de){var $e=oe.scheme||ue.scheme||"urn",Be=de[1].toLowerCase(),Ve=de[2],Ze=$e+":"+(oe.nid||Be),Je=_[Ze];ue.nid=Be,ue.nss=Ve,ue.path=void 0,Je&&(ue=Je.parse(ue,oe))}else ue.error=ue.error||"URN can not be parsed.";return ue},serialize:function(q,oe){var de=oe.scheme||q.scheme||"urn",ue=q.nid,$e=de+":"+(oe.nid||ue),Be=_[$e];Be&&(q=Be.serialize(q,oe));var Ve=q,Ze=q.nss;return Ve.path=(ue||oe.nid)+":"+Ze,Ve}},tt=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,rt={scheme:"urn:uuid",parse:function(q,oe){var de=q;return de.uuid=de.nss,de.nss=void 0,!oe.tolerant&&(!de.uuid||!de.uuid.match(tt))&&(de.error=de.error||"UUID is not valid."),de},serialize:function(q,oe){var de=q;return de.nss=(q.uuid||"").toLowerCase(),de}};_[Ne.scheme]=Ne,_[Pe.scheme]=Pe,_[ce.scheme]=ce,_[fe.scheme]=fe,_[Re.scheme]=Re,_[Ke.scheme]=Ke,_[rt.scheme]=rt,Z.SCHEMES=_,Z.pctEncChar=W,Z.pctDecChars=F,Z.parse=V,Z.removeDotSegments=re,Z.serialize=pe,Z.resolveComponents=me,Z.resolve=ye,Z.normalize=Ee,Z.equal=be,Z.escapeComponent=Se,Z.unescapeComponent=we,Object.defineProperty(Z,"__esModule",{value:!0})})(g)},4049:function(le){le.exports=function(){var g=function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")},Z=function(){function r(e,n){for(var s=0;s<n.length;s++){var o=n[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,n,s){return n&&r(e.prototype,n),s&&r(e,s),e}}(),U=function(){function r(e,n){var s=[],o=!0,i=!1,l=void 0;try{for(var d=e[Symbol.iterator](),C;!(o=(C=d.next()).done)&&(s.push(C.value),!(n&&s.length===n));o=!0);}catch(p){i=!0,l=p}finally{try{!o&&d.return&&d.return()}finally{if(i)throw l}}return s}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=(String.prototype.startsWith=String.prototype.startsWith||function(r){return this.indexOf(r)===0},String.prototype.padStart=String.prototype.padStart||function(r,e){for(var n=this;n.length<r;)n=e+n;return n},{cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"});function M(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?r.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):r.toString();return n||"0"}var K=function(){function r(e,n,s,o){g(this,r);var i=this;function l(C){if(C.startsWith("hsl")){var p=C.match(/([\-\d\.e]+)/g).map(Number),w=U(p,4),x=w[0],$=w[1],H=w[2],B=w[3];B===void 0&&(B=1),x/=360,$/=100,H/=100,i.hsla=[x,$,H,B]}else if(C.startsWith("rgb")){var O=C.match(/([\-\d\.e]+)/g).map(Number),u=U(O,4),I=u[0],L=u[1],v=u[2],_=u[3];_===void 0&&(_=1),i.rgba=[I,L,v,_]}else C.startsWith("#")?i.rgba=r.hexToRgb(C):i.rgba=r.nameToRgb(C)||r.hexToRgb(C)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(s===void 0){var d=e&&""+e;d&&l(d.toLowerCase())}else this.rgba=[e,n,s,o===void 0?1:o]}return Z(r,[{key:"printRGB",value:function(n){var s=n?this.rgba:this.rgba.slice(0,3),o=s.map(function(i,l){return M(i,l===3?3:0)});return n?"rgba("+o+")":"rgb("+o+")"}},{key:"printHSL",value:function(n){var s=[360,100,100,1],o=["","%","%",""],i=n?this.hsla:this.hsla.slice(0,3),l=i.map(function(d,C){return M(d*s[C],C===3?3:1)+o[C]});return n?"hsla("+l+")":"hsl("+l+")"}},{key:"printHex",value:function(n){var s=this.hex;return n?s:s.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=r.hslToRgb(this._hsla)},set:function(n){n.length===3&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=r.rgbToHsl(this._rgba)},set:function(n){n.length===3&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba,s=n.map(function(o,i){return i<3?o.toString(16):Math.round(o*255).toString(16)});return"#"+s.map(function(o){return o.padStart(2,"0")}).join("")},set:function(n){this.rgba=r.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var s=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!s.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var o=s.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(i){return parseInt(i,16)});return o[3]=o[3]/255,o}},{key:"nameToRgb",value:function(n){var s=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),o=S[s];return o===void 0?o:r.hexToRgb(o.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var s=U(n,4),o=s[0],i=s[1],l=s[2],d=s[3];o/=255,i/=255,l/=255;var C=Math.max(o,i,l),p=Math.min(o,i,l),w=void 0,x=void 0,$=(C+p)/2;if(C===p)w=x=0;else{var H=C-p;switch(x=$>.5?H/(2-C-p):H/(C+p),C){case o:w=(i-l)/H+(i<l?6:0);break;case i:w=(l-o)/H+2;break;case l:w=(o-i)/H+4;break}w/=6}return[w,x,$,d]}},{key:"hslToRgb",value:function(n){var s=U(n,4),o=s[0],i=s[1],l=s[2],d=s[3],C=void 0,p=void 0,w=void 0;if(i===0)C=p=w=l;else{var x=function(u,I,L){return L<0&&(L+=1),L>1&&(L-=1),L<.16666666666666666?u+(I-u)*6*L:L<.5?I:L<.6666666666666666?u+(I-u)*(.6666666666666666-L)*6:u},$=l<.5?l*(1+i):l+i-l*i,H=2*l-$;C=x(H,$,o+1/3),p=x(H,$,o),w=x(H,$,o-1/3)}var B=[C*255,p*255,w*255].map(Math.round);return B[3]=d,B}}]),r}(),j=function(){function r(){g(this,r),this._events=[]}return Z(r,[{key:"add",value:function(n,s,o){n.addEventListener(s,o,!1),this._events.push({target:n,type:s,handler:o})}},{key:"remove",value:function(n,s,o){this._events=this._events.filter(function(i){var l=!0;return n&&n!==i.target&&(l=!1),s&&s!==i.type&&(l=!1),o&&o!==i.handler&&(l=!1),l&&r._doRemove(i.target,i.type,i.handler),!l})}},{key:"destroy",value:function(){this._events.forEach(function(n){return r._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,s,o){n.removeEventListener(s,o,!1)}}]),r}();function z(r){var e=document.createElement("div");return e.innerHTML=r,e.firstElementChild}function P(r,e,n){var s=!1;function o(C,p,w){return Math.max(p,Math.min(C,w))}function i(C,p,w){if(w&&(s=!0),!!s){C.preventDefault();var x=e.getBoundingClientRect(),$=x.width,H=x.height,B=p.clientX,O=p.clientY,u=o(B-x.left,0,$),I=o(O-x.top,0,H);n(u/$,I/H)}}function l(C,p){var w=C.buttons===void 0?C.which:C.buttons;w===1?i(C,C,p):s=!1}function d(C,p){C.touches.length===1?i(C,C.touches[0],p):s=!1}r.add(e,"mousedown",function(C){l(C,!0)}),r.add(e,"touchstart",function(C){d(C,!0)}),r.add(window,"mousemove",l),r.add(e,"touchmove",d),r.add(window,"mouseup",function(C){s=!1}),r.add(e,"touchend",function(C){s=!1}),r.add(e,"touchcancel",function(C){s=!1})}var N=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,A=360,m="keydown",T="mousedown",y="focusin";function f(r,e){return(e||document).querySelector(r)}function h(r){r.preventDefault(),r.stopPropagation()}function a(r,e,n,s,o){r.add(e,m,function(i){n.indexOf(i.key)>=0&&(o&&h(i),s(i))})}var c=function(){function r(e){g(this,r),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new j,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return Z(r,[{key:"setOptions",value:function(n){var s=this;if(!n)return;var o=this.settings;function i(p,w,x){for(var $ in p)x&&x.indexOf($)>=0||(w[$]=p[$])}if(n instanceof HTMLElement)o.parent=n;else{o.parent&&n.parent&&o.parent!==n.parent&&(this._events.remove(o.parent),this._popupInited=!1),i(n,o),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var l=n.color||n.colour;l&&this._setColor(l)}var d=o.parent;if(d&&o.popup&&!this._popupInited){var C=function(w){return s.openHandler(w)};this._events.add(d,"click",C),a(this._events,d,[" ","Spacebar","Enter"],C),this._popupInited=!0}else n.parent&&!o.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var s=n&&n.type===m?this._domEdit:this.domElement;setTimeout(function(){return s.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var s=n&&n.type,o=!1;if(!n)o=!0;else if(s===T||s===y){var i=(this.__containedEvent||0)+100;n.timeStamp>i&&(o=!0)}else h(n),o=!0;o&&this.hide()&&(this.settings.parent.style.pointerEvents="",s!==T&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,s){this.closeHandler(),this.setOptions(n),s&&this.openHandler()}},{key:"setColor",value:function(n,s){this._setColor(n,{silent:s})}},{key:"_setColor",value:function(n,s){if(typeof n=="string"&&(n=n.trim()),!!n){s=s||{};var o=void 0;try{o=new K(n)}catch(l){if(s.failSilently)return;throw l}if(!this.settings.alpha){var i=o.hsla;i[3]=1,o.hsla=i}this.colour=this.color=o,this._setHSLA(null,null,null,null,s)}}},{key:"setColour",value:function(n,s){this.setColor(n,s)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var s=this._toggleDOM(!0);return this._setPosition(),s}var o=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',i=z(o);return this.domElement=i,this._domH=f(".picker_hue",i),this._domSL=f(".picker_sl",i),this._domA=f(".picker_alpha",i),this._domEdit=f(".picker_editor input",i),this._domSample=f(".picker_sample",i),this._domOkay=f(".picker_done button",i),this._domCancel=f(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup(function(){return i.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,s=this,o=this.domElement,i=this._events;function l(p,w,x){i.add(p,w,x)}l(o,"click",function(p){return p.preventDefault()}),P(i,this._domH,function(p,w){return s._setHSLA(p)}),P(i,this._domSL,function(p,w){return s._setHSLA(null,p,1-w)}),this.settings.alpha&&P(i,this._domA,function(p,w){return s._setHSLA(null,null,null,1-w)});var d=this._domEdit;l(d,"input",function(p){s._setColor(this.value,{fromEditor:!0,failSilently:!0})}),l(d,"focus",function(p){var w=this;w.selectionStart===w.selectionEnd&&w.select()}),this._ifPopup(function(){var p=function($){return n.closeHandler($)};l(window,T,p),l(window,y,p),a(i,o,["Esc","Escape"],p);var w=function($){n.__containedEvent=$.timeStamp};l(o,T,w),l(o,y,w),l(n._domCancel,"click",p)});var C=function(w){n._ifPopup(function(){return n.closeHandler(w)}),n.onDone&&n.onDone(n.colour)};l(this._domOkay,"click",C),a(i,o,["Enter"],C)}},{key:"_setPosition",value:function(){var n=this.settings.parent,s=this.domElement;n!==s.parentNode&&n.appendChild(s),this._ifPopup(function(o){getComputedStyle(n).position==="static"&&(n.style.position="relative");var i=o===!0?"popup_right":"popup_"+o;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(l){l===i?s.classList.add(l):s.classList.remove(l)}),s.classList.add(i)})}},{key:"_setHSLA",value:function(n,s,o,i,l){l=l||{};var d=this.colour,C=d.hsla;[n,s,o,i].forEach(function(p,w){(p||p===0)&&(C[w]=p)}),d.hsla=C,this._updateUI(l),this.onChange&&!l.silent&&this.onChange(d)}},{key:"_updateUI",value:function(n){if(!this.domElement)return;n=n||{};var s=this.colour,o=s.hsla,i="hsl("+o[0]*A+", 100%, 50%)",l=s.hslString,d=s.hslaString,C=this._domH,p=this._domSL,w=this._domA,x=f(".picker_selector",C),$=f(".picker_selector",p),H=f(".picker_selector",w);function B(F,J,Q){J.style.left=Q*100+"%"}function O(F,J,Q){J.style.top=Q*100+"%"}B(C,x,o[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,B(p,$,o[1]),O(p,$,1-o[2]),p.style.color=l,O(w,H,1-o[3]);var u=l,I=u.replace("hsl","hsla").replace(")",", 0)"),L="linear-gradient("+[u,I]+")";if(this._domA.style.background=L+", "+N,!n.fromEditor){var v=this.settings.editorFormat,_=this.settings.alpha,W=void 0;switch(v){case"rgb":W=s.printRGB(_);break;case"hsl":W=s.printHSL(_);break;default:W=s.printHex(_)}this._domEdit.value=W}this._domSample.style.color=d}},{key:"_ifPopup",value:function(n,s){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):s&&s()}},{key:"_toggleDOM",value:function(n){var s=this.domElement;if(!s)return!1;var o=n?"":"none",i=s.style.display!==o;return i&&(s.style.display=o),i}}]),r}(),t=document.createElement("style");return t.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(t),c.StyleElement=t,c}()},1262:function(le,g,Z){function U(ne){return(U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ie){return typeof ie}:function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie})(ne)}function S(ne){var ie=j();return function(){var ge,xe=P(ne),xe=(ge=ie?(ge=P(this).constructor,Reflect.construct(xe,arguments,ge)):xe.apply(this,arguments),this);if(ge&&(U(ge)==="object"||typeof ge=="function"))return ge;if(ge!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(xe!==void 0)return xe;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function M(ne){var ie=typeof Map=="function"?new Map:void 0;return function(ge){if(ge===null||Function.toString.call(ge).indexOf("[native code]")===-1)return ge;if(typeof ge!="function")throw new TypeError("Super expression must either be null or a function");if(ie!==void 0){if(ie.has(ge))return ie.get(ge);ie.set(ge,xe)}function xe(){return K(ge,arguments,P(this).constructor)}return xe.prototype=Object.create(ge.prototype,{constructor:{value:xe,enumerable:!1,writable:!0,configurable:!0}}),z(xe,ge)}(ne)}function K(ne,ie,ge){return(K=j()?Reflect.construct.bind():function(xe,Me,He){var ee=[null];return ee.push.apply(ee,Me),Me=new(Function.bind.apply(xe,ee)),He&&z(Me,He.prototype),Me}).apply(null,arguments)}function j(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z(ne,ie){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ge,xe){return ge.__proto__=xe,ge})(ne,ie)}function P(ne){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ie){return ie.__proto__||Object.getPrototypeOf(ie)})(ne)}Z.d(g,{K:function(){return Ie}});var N=function(ne){var ie=xe;if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(ne&&ne.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),Object.defineProperty(ie,"prototype",{writable:!1}),ne&&z(ie,ne);var ge=S(xe);function xe(Me,He){if(this instanceof xe)return(Me=ge.call(this,Me+" at position "+He)).position=He,Me;throw new TypeError("Cannot call a class as a function")}return ie=xe,Object.defineProperty(ie,"prototype",{writable:!1}),ie}(M(Error)),A=92,m=47,T=42,y=123,f=125,h=91,a=93,c=40,t=41,r=32,e=10,n=9,s=13,o=8,i=12,l=34,d=43,C=45,p=39,w=48,x=49,$=57,H=44,B=46,O=58,u=59,I=65,L=97,v=69,_=101,W=70,F=102,J=160,Q=8192,X=8202,te=8239,E=8287,G=12288,V=8220,b=8221,k=8216,R=8217,D=96,Y=180;function re(ne){return w<=ne&&ne<=$||I<=ne&&ne<=W||L<=ne&&ne<=F}function pe(ne){return w<=ne&&ne<=$}var me=/^[,:[\]{}()\n]$/;function ye(ne){return Ee.test(ne)||ne&&Se(ne.charCodeAt(0))}var Ee=/^[[{\w-]$/;function be(ne){return ne===r||ne===e||ne===n||ne===s}function Se(ne){return we(ne)||Pe(ne)}function we(ne){return ne===l||ne===V||ne===b}function Ne(ne){return ne===l}function Pe(ne){return ne===p||ne===k||ne===R||ne===D||ne===Y}function Te(ne,ie,ge){return ge=2<arguments.length&&ge!==void 0&&ge,ie=ne.lastIndexOf(ie),ie!==-1?ne.substring(0,ie)+(ge?"":ne.substring(ie+1)):ne}function ce(ne,ie){var ge=ne.length;if(!be(ne.charCodeAt(ge-1)))return ne+ie;for(;be(ne.charCodeAt(ge-1));)ge--;return ne.substring(0,ge)+ie+ne.substring(ge)}var fe={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Ae={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
`,r:"\r",t:" "};function Ie(ne){var ie=0,ge="";if(!ee())throw new N("Unexpected end of json string",ne.length);var xe=Ce(H);if(xe&&ae(),ye(ne[ie])&&/[,\n][ \t\r]*$/.test(ge)){xe||(ge=ce(ge,","));for(var Me=!0,He=!0;He;)Me?Me=!1:Ce(H)||(ge=ce(ge,",")),He=ee();He||(ge=Te(ge,",")),ge=`[
`.concat(ge,`
]`)}else xe&&(ge=Te(ge,","));if(ie>=ne.length)return ge;throw new N("Unexpected character "+JSON.stringify(ne[ie]),ie);function ee(){ae();var q=function(){if(ne.charCodeAt(ie)!==y)return!1;ge+="{",ie++,ae();for(var oe=!0;ie<ne.length&&ne.charCodeAt(ie)!==f;){if(oe?oe=!1:(Ce(H)||(ge=ce(ge,",")),ae()),!(Re()||Ke())){ne.charCodeAt(ie)===f||ne.charCodeAt(ie)===y||ne.charCodeAt(ie)===a||ne.charCodeAt(ie)===h||ne[ie]===void 0?ge=Te(ge,","):function(){throw new N("Object key expected",ie)}();break}ae();var de=Ce(O);de||(ye(ne[ie])?ge=ce(ge,":"):se()),ee()||(de?function(){throw new N("Object value expected",ie)}:se)()}return ne.charCodeAt(ie)===f?(ge+="}",ie++):ge=ce(ge,"}"),!0}()||function(){if(ne.charCodeAt(ie)!==h)return!1;ge+="[",ie++,ae();for(var oe=!0;ie<ne.length&&ne.charCodeAt(ie)!==a;)if(oe?oe=!1:Ce(H)||(ge=ce(ge,",")),!ee()){ge=Te(ge,",");break}return ne.charCodeAt(ie)===a?(ge+="]",ie++):ge=ce(ge,"]"),!0}()||Re()||function(){var oe=ie;if(ne.charCodeAt(ie)===C&&(ie++,rt(oe)))return!0;if(ne.charCodeAt(ie)===w)ie++;else if(function(de){return x<=de&&de<=$}(ne.charCodeAt(ie)))for(ie++;pe(ne.charCodeAt(ie));)ie++;if(ne.charCodeAt(ie)===B){if(ie++,rt(oe))return!0;for(;pe(ne.charCodeAt(ie));)ie++}if(ne.charCodeAt(ie)===_||ne.charCodeAt(ie)===v){if(ie++,ne.charCodeAt(ie)!==C&&ne.charCodeAt(ie)!==d||ie++,rt(oe))return!0;for(;pe(ne.charCodeAt(ie));)ie++}return oe<ie?(ge+=ne.slice(oe,ie),!0):!1}()||We("true","true")||We("false","false")||We("null","null")||We("True","true")||We("False","false")||We("None","null")||Ke();return ae(),q}function ae(){for(he();function(){if(ne.charCodeAt(ie)===m&&ne.charCodeAt(ie+1)===T){for(;ie<ne.length&&!function(q,oe){return q[oe]==="*"&&q[oe+1]==="/"}(ne,ie);)ie++;ie+=2}else{if(ne.charCodeAt(ie)!==m||ne.charCodeAt(ie+1)!==m)return!1;for(;ie<ne.length&&ne.charCodeAt(ie)!==e;)ie++}return!0}()&&he(););}function he(){for(var q,oe,de="";(q=be(ne.charCodeAt(ie)))||(oe=ne.charCodeAt(ie))===J||Q<=oe&&oe<=X||oe===te||oe===E||oe===G;)de+=q?ne[ie]:" ",ie++;return 0<de.length&&(ge+=de,!0)}function Ce(q){return ne.charCodeAt(ie)===q&&(ge+=ne[ie],ie++,!0)}function Le(){return q=A,ne.charCodeAt(ie)===q&&(ie++,!0);var q}function Re(){var q,oe=ne.charCodeAt(ie)===A;if(oe&&(ie++,oe=!0),Se(ne.charCodeAt(ie))){var de=Pe(ne.charCodeAt(ie))?Pe:Ne(ne.charCodeAt(ie))?Ne:we;for(ge+='"',ie++;ie<ne.length&&!de(ne.charCodeAt(ie));){if(ne.charCodeAt(ie)===A){var ue=ne[ie+1];if(Ae[ue]!==void 0)ge+=ne.slice(ie,ie+2),ie+=2;else if(ue==="u"){if(!(re(ne.charCodeAt(ie+2))&&re(ne.charCodeAt(ie+3))&&re(ne.charCodeAt(ie+4))&&re(ne.charCodeAt(ie+5)))){Be=$e=void 0;for(var $e=ie,Be=$e+2;/\w/.test(ne[Be]);)Be++;throw $e=ne.slice($e,Be),new N('Invalid unicode character "'.concat($e,'"'),ie)}ge+=ne.slice(ie,ie+6),ie+=6}else ge+=ue,ie+=2}else{if($e=ne[ie],ue=ne.charCodeAt(ie),ue===l&&ne.charCodeAt(ie-1)!==A)ge+="\\"+$e;else if((q=ue)===e||q===s||q===n||q===o||q===i)ge+=fe[$e];else{if(!(32<=(q=ue)&&q<=1114111))throw new N("Invalid character "+JSON.stringify($e),ie);ge+=$e}ie++}oe&&Le()}for(Se(ne.charCodeAt(ie))?(ne.charCodeAt(ie),ge+='"',ie++):ge+='"',ae();ne.charCodeAt(ie)===d;){ie++,ae();var Ve=(ge=Te(ge,'"',!0)).length;Re(),ge=function(Ze,Je,Fe){return Ze.substring(0,Je)+Ze.substring(Je+Fe)}(ge,Ve,1)}return!0}return!1}function We(q,oe){return ne.slice(ie,ie+q.length)===q&&(ge+=oe,ie+=q.length,!0)}function Ke(){for(var q,oe=ie;ie<ne.length&&(q=ne[ie],!(me.test(q)||q&&Se(q.charCodeAt(0))));)ie++;if(oe<ie){if(ne.charCodeAt(ie)===c)ie++,ee(),ne.charCodeAt(ie)===t&&(ie++,ne.charCodeAt(ie)===u)&&ie++;else{for(;be(ne.charCodeAt(ie-1))&&0<ie;)ie--;oe=ne.slice(oe,ie),ge+=JSON.stringify(oe)}return!0}}function tt(q){if(!pe(ne.charCodeAt(ie)))throw q=ne.slice(q,ie),new N("Invalid number '".concat(q,"', expecting a digit ").concat(ne[ie]?"but got '".concat(ne[ie],"'"):"but reached end of input"),2)}function rt(q){if(ie>=ne.length)return ge+=ne.slice(q,ie)+"0",1;tt(q)}function se(){throw new N("Colon expected",ie)}}},894:function(le){le.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},7171:function(le){le.exports=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}')},6273:function(le){le.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},6680:function(le){le.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},lt={},De.amdD=function(){throw new Error("define cannot be used indirect")},De.n=function(le){var g=le&&le.__esModule?function(){return le.default}:function(){return le};return De.d(g,{a:g}),g},De.d=function(le,g){for(var Z in g)De.o(g,Z)&&!De.o(le,Z)&&Object.defineProperty(le,Z,{enumerable:!0,get:g[Z]})},De.o=function(le,g){return Object.prototype.hasOwnProperty.call(le,g)},De.r=function(le){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(le,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(le,"__esModule",{value:!0})},De.nmd=function(le){return le.paths=[],le.children||(le.children=[]),le},De(3161);function De(le){var g=lt[le];return g!==void 0||(g=lt[le]={id:le,loaded:!1,exports:{}},st[le].call(g.exports,g,g.exports,De),g.loaded=!0),g.exports}var st,lt})})(Ft);var dn=sn(Ft.exports);const un={editor:null,name:"json-editor-vue",internalChange:!1,props:{modelValue:Object,options:Object,currentMode:{type:String,default:"code"},modeList:{type:Array,default:()=>["tree","code","form","text","view"]},language:{type:String,default:"en"}},data(){return{json:this.modelValue,expandedModes:["tree","view","form"],isFullScreen:!1,hasLogo:!0,showFullScreen:!1}},watch:{modelValue:{immediate:!0,deep:!0,handler(Xe){this.internalChange||(this.setEditorContent(Xe),this.$nextTick(()=>{this.expandAll()}))}}},mounted(){this.init();const Xe=document.querySelector(".jsoneditor-menu .jsoneditor-poweredBy");this.hasLogo=Xe&&window.getComputedStyle(Xe).display!=="none",this.showFullScreen=!0},unmounted(){var Xe;(Xe=this.editor)==null||Xe.destroy(),this.editor=null},methods:{toggleFullScreen(){this.isFullScreen=!this.isFullScreen,this.$nextTick(()=>{const Xe=new Event("resize");window.dispatchEvent(Xe)})},init(){const{currentMode:Xe,modeList:Qe,options:De}=this,st=()=>{const K=z=>{this.json=z,this.$emit("update:modelValue",z),this.$emit("change",z),this.internalChange=!0,this.$nextTick(()=>{this.internalChange=!1})};if(!this.editor.getText()){K({});return}try{const z=this.editor.get();K(z)}catch{}},lt=()=>{this.expandAll()},le=(K,j,z)=>{this.$emit("textSelectionChange",this.editor,K,j,z)},g=(K,j)=>{this.$emit("selectionChange",this.editor,K,j)},Z=(K,j,z)=>{this.$emit("colorPicker",this.editor,K,j,z)},U=({target:K})=>{this.$emit("focus",this.editor,K)},S=async({target:K})=>{this.$emit("blur",this.editor,K)},M={...De,indentation:2,language:this.language,mode:Xe,modes:Qe,onChange:st,onModeChange:lt,onTextSelectionChange:le,onSelectionChange:g,onColorPicker:Z,onFocus:U,onBlur:S};this.editor=new dn(this.$refs.jsonEditorVue,M,this.json)},expandAll(){var Xe,Qe;this.expandedModes.includes((Xe=this.editor)==null?void 0:Xe.getMode())&&((Qe=this.editor)==null||Qe.expandAll())},setEditorContent(Xe){var Qe;(Qe=this.editor)==null||Qe.set(Xe)}}},gn={ref:"jsonEditorVue",class:"json-editor-vue"};function pn(Xe,Qe,De,st,lt,le){return ze(),ot("div",{class:Ht(["container",{"full-screen-container":lt.isFullScreen}])},[Oe("div",gn,null,512),Oe("div",{class:Ht(["full-screen",{show:lt.showFullScreen,right:!lt.hasLogo}]),onClick:Qe[0]||(Qe[0]=(...g)=>le.toggleFullScreen&&le.toggleFullScreen(...g))},null,2)],2)}var bt=Pt(un,[["render",pn],["__scopeId","data-v-d51cd76c"]]);bt.install=function(Qe){Qe.component(bt.name,bt)};typeof window!="undefined"&&window.Vue&&window.Vue.component(bt.name,bt);const vt=Xe=>(on("data-v-70a74aad"),Xe=Xe(),rn(),Xe),mn=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u540D\u79F0",-1)),fn=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u7C7B\u578B",-1)),Cn=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u5185\u5BB9",-1)),vn={key:1,class:"config_image_wrapper"},yn={class:"config_image_item_wrapper","m-1":""},In={key:0},bn={class:"config_image_cover_wrapper"},An=["src"],wn={class:"config_image_wrapper"},Sn={class:"config_image_cover_wrapper"},xn=["onClick"],kn=["onClick"],En=["src"],_n=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u5907\u6CE8",-1)),Tn=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u540D\u79F0",-1)),Rn=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u7C7B\u578B",-1)),$n=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u5185\u5BB9",-1)),Ln={key:1,class:"config_image_wrapper"},Nn={class:"config_image_item_wrapper","m-1":""},Bn={key:0},Mn={class:"config_image_cover_wrapper"},Wn=["src"],Hn={class:"config_image_wrapper"},Gn=["onClick"],Pn={class:"config_image_cover_wrapper"},Fn=["onClick"],Vn=["onClick"],On=["src"],Zn=vt(()=>Oe("div",{class:"form_tag_wrapper"},"\u5907\u6CE8",-1)),Vt={__name:"config",setup(Xe){Ot(()=>{st()});const Qe=ft([]),De=ft([]),st=async()=>{const o=await Zt();kt(o,()=>{De.value=o.data.list})},lt=["","\u6587\u5B57","\u56FE\u7247","\u6587\u5B57\u6570\u7EC4","\u56FE\u7247\u6570\u7EC4","JSON"],le=[{type:"selection",multiple:!1},{type:"expand",renderExpand:o=>{switch(o.type){case 1:return pt("div",{class:["config_text_wrapper"]},{default:()=>o.value});case 2:return pt("div",{class:["config_image_wrapper"]},[pt("div",{class:["config_image_item_wrapper"]},[pt("img",{src:wt(o.value_turn)},{default:()=>{}})])]);case 3:return pt("div",{},o.value_turn.map(i=>pt("div",{class:["config_text_wrapper"]},{default:()=>i})));case 4:return pt("div",{class:["config_image_wrapper"]},o.value_turn.map(i=>pt("div",{class:["config_image_item_wrapper","m-1"]},[pt("img",{src:wt(i)},{default:()=>{}})])));case 5:return pt(ct,{type:"textarea",disabled:!0,autosize:{minRows:8},value:JSON.stringify(o.value_turn,null,4)},{default:()=>o.value})}}},{title:"\u540D\u79F0",key:"label"},{title:"\u7C7B\u578B",key:"type",render(o){return lt[o.type]}},{title:"\u5907\u6CE8",key:"remark"}],g=["","","",[],[],{}],Z=ft(!1),U={label:"",value:"",value_edit:"",value_push:"",type:1,remark:""},S=ft(JSON.parse(JSON.stringify(U))),M=async()=>{const o=await Dt({label:S.value.label,value:[3,4,5].indexOf(S.value.type)!==-1?JSON.stringify(S.value.value_edit):S.value.value_edit,type:S.value.type,remark:S.value.remark});kt(o,()=>{window.$message().success(o.message),Z.value=!1,S.value=JSON.parse(JSON.stringify(U)),st()})},K=()=>{S.value=JSON.parse(JSON.stringify(U)),Z.value=!0},j=o=>{Z.value?(S.value.value_edit=JSON.parse(JSON.stringify(g[o])),S.value.value_push="",S.value.type=o):(a.value.value_edit=JSON.parse(JSON.stringify(g[o])),a.value.value_push="",a.value.type=o)},z=()=>{if(Z.value){const o=JSON.parse(JSON.stringify(S.value.value_push));S.value.value_push="",S.value.value_edit.push(o)}else{const o=JSON.parse(JSON.stringify(a.value.value_push));a.value.value_push="",a.value.value_edit.push(o)}},P=o=>{Z.value?S.value.value_edit.splice(o,1):a.value.value_edit.splice(o,1)},N=ft(null),A=o=>{N.value=o},m=ft(-2),T=async o=>{const i=o.target.files[0];N.value.value=null;const l=await Kt(i),d=await jt(l);kt(d,()=>{let C=d.data.url;Z.value?m.value===-2?S.value.value_edit=C:m.value===-1?S.value.value_edit.push(C):S.value.value_edit[m.value]=C:m.value===-2?a.value.value_edit=C:m.value===-1?a.value.value_edit.push(C):a.value.value_edit[m.value]=C})},y=o=>{m.value=o,N.value.click()},f=ft(!1),h={id:0,label:"",value:"",value_edit:"",value_push:"",type:1,remark:""},a=ft(JSON.parse(JSON.stringify(h))),c=async()=>{const o=await zt({config_id:a.value.id,label:a.value.label,value:[3,4,5].indexOf(a.value.type)!==-1?JSON.stringify(a.value.value_edit):a.value.value_edit,type:a.value.type,remark:a.value.remark});kt(o,()=>{window.$message().success(o.message),f.value=!1,a.value=JSON.parse(JSON.stringify(h)),st()})},t=()=>{if(Qe.value.length!==1)return window.$message().error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u914D\u7F6E");a.value=JSON.parse(JSON.stringify(h));for(let o=0;o<De.value.length;o++)if(Qe.value[0]===De.value[o].id){a.value={id:De.value[o].id,label:De.value[o].label,value:De.value[o].value,value_edit:De.value[o].value_turn,value_push:"",type:De.value[o].type,remark:De.value[o].remark},f.value=!0;return}},r=o=>{Z.value?o===-2?S.value.value_edit="":S.value.value_edit.splice(o,1):o===-2?a.value.value_edit="":a.value.value_edit.splice(o,1)},e=ft(!1),n=()=>{if(Qe.value.length!==1)return window.$message().error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u914D\u7F6E");e.value=!0},s=async()=>{const o=await Xt(Qe.value[0]);kt(o,()=>{window.$message().success(o.message),e.value=!1,Qe.value=[],st()})};return(o,i)=>{const l=Jt,d=Yt,C=Ut,p=Qt,w=qt,x=en,$=tn,H=an,B=ln,O=hn,u=cn,I=nn;return ze(),ot("div",null,[ve(x,{show:ke(e),"onUpdate:show":i[2]||(i[2]=L=>Rt(e)?e.value=L:null),preset:"card",style:{width:"400px"},title:"\u5220\u9664\u786E\u8BA4","auto-focus":!1,bordered:!1},{default:_e(()=>[Oe("div",null,[ve(C,{title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"alarm"})]),_:1})]),_:1}),ve(C,{"mt-2":"",title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"alarm"})]),_:1})]),_:1}),ve(C,{"mt-2":"",title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"alarm"})]),_:1})]),_:1}),ve(w,{"mt-2":"",justify:"center"},{default:_e(()=>[ve(p,{onClick:i[0]||(i[0]=L=>s()),type:"info"},{default:_e(()=>[nt("\u786E\u5B9A")]),_:1}),ve(p,{onClick:i[1]||(i[1]=L=>e.value=!1)},{default:_e(()=>[nt("\u53D6\u6D88")]),_:1})]),_:1})])]),_:1},8,["show"]),ve(x,{show:ke(f),"onUpdate:show":i[14]||(i[14]=L=>Rt(f)?f.value=L:null),preset:"card",style:{width:"1000px"},title:"\u4FEE\u6539","auto-focus":!1,bordered:!1},{default:_e(()=>[Oe("div",null,[ve(w,{align:"center"},{default:_e(()=>[ve($,null,{default:_e(()=>[mn]),_:1}),ve(ke(ct),{class:"form_input_wrapper",value:ke(a).label,"onUpdate:value":i[3]||(i[3]=L=>ke(a).label=L)},null,8,["value"])]),_:1}),ve(w,{"mt-2":"",align:"center"},{default:_e(()=>[ve($,null,{default:_e(()=>[fn]),_:1}),ve(B,{value:ke(a).type,"onUpdate:value":[i[4]||(i[4]=L=>ke(a).type=L),j],name:"type_radio"},{default:_e(()=>[ve(w,null,{default:_e(()=>[ve(H,{value:1},{default:_e(()=>[nt("\u6587\u5B57")]),_:1}),ve(H,{value:2},{default:_e(()=>[nt("\u56FE\u7247")]),_:1}),ve(H,{value:3},{default:_e(()=>[nt("\u6587\u5B57\u6570\u7EC4")]),_:1}),ve(H,{value:4},{default:_e(()=>[nt("\u56FE\u7247\u6570\u7EC4")]),_:1}),ve(H,{value:5},{default:_e(()=>[nt("JSON")]),_:1})]),_:1})]),_:1},8,["value"])]),_:1}),ve(w,{"mt-2":""},{default:_e(()=>[ve($,{"mt-1":""},{default:_e(()=>[Cn]),_:1}),ke(a).type===1?(ze(),gt(ke(ct),{key:0,class:"form_input_wrapper",value:ke(a).value_edit,"onUpdate:value":i[5]||(i[5]=L=>ke(a).value_edit=L)},null,8,["value"])):it("",!0),ke(a).type===2?(ze(),ot("div",vn,[Oe("div",yn,[ke(a).value_edit?it("",!0):(ze(),ot("span",In,"\u6682\u65E0\u56FE\u7247")),Oe("div",bn,[Oe("div",{class:"config_image_cover_upload_wrapper","cursor-pointer":"",onClick:i[6]||(i[6]=L=>y(-2))},[ve(l,{type:"upload-three"})]),ke(a).value_edit?(ze(),ot("div",{key:0,"cursor-pointer":"",class:"config_image_cover_delete_wrapper",onClick:i[7]||(i[7]=L=>r(-2))},[ve(l,{type:"delete-one"})])):it("",!0)]),ke(a).value_edit?(ze(),ot("img",{key:1,src:ke(wt)(ke(a).value_edit),alt:""},null,8,An)):it("",!0)])])):it("",!0),ke(a).type===3?(ze(),gt(O,{key:2,style:{"max-height":"500px"}},{default:_e(()=>[(ze(!0),ot($t,null,Lt(ke(a).value_edit,(L,v)=>(ze(),gt(w,{"mb-2":"",key:v,align:"center"},{default:_e(()=>[ve(ke(ct),{class:"form_input_wrapper",value:ke(a).value_edit[v],"onUpdate:value":_=>ke(a).value_edit[v]=_},null,8,["value","onUpdate:value"]),ve(p,{onClick:_=>P(v),quaternary:"",circle:"",type:"error"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"minus"})]),_:1})]),_:2},1032,["onClick"])]),_:2},1024))),128)),ve(w,{align:"center"},{default:_e(()=>[ve(ke(ct),{class:"form_input_wrapper",value:ke(a).value_push,"onUpdate:value":i[8]||(i[8]=L=>ke(a).value_push=L)},null,8,["value"]),ve(p,{onClick:i[9]||(i[9]=L=>z()),quaternary:"",circle:"",type:"info"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"plus"})]),_:1})]),_:1})]),_:1})]),_:1})):it("",!0),ke(a).type===4?(ze(),gt(O,{key:3,style:{"max-height":"500px"}},{default:_e(()=>[Oe("div",wn,[(ze(!0),ot($t,null,Lt(ke(a).value_edit,(L,v)=>(ze(),ot("div",{key:v,class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},[Oe("div",Sn,[Oe("div",{class:"config_image_cover_upload_wrapper",onClick:_=>y(v)},[ve(l,{type:"upload-three"})],8,xn),Oe("div",{class:"config_image_cover_delete_wrapper",onClick:_=>r(v)},[ve(l,{type:"delete-one"})],8,kn)]),Oe("img",{src:ke(wt)(L),alt:""},null,8,En)]))),128)),Oe("div",{onClick:i[10]||(i[10]=L=>y(-1)),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},"\u4E0A\u4F20\u56FE\u7247")])]),_:1})):it("",!0),ke(a).type===5?(ze(),gt(ke(bt),{key:4,style:{width:"840px",height:"500px"},modelValue:ke(a).value_edit,"onUpdate:modelValue":i[11]||(i[11]=L=>ke(a).value_edit=L),language:"zh-CN",modeList:[]},null,8,["modelValue"])):it("",!0)]),_:1}),ve(w,{"mt-2":"",align:"center"},{default:_e(()=>[ve($,null,{default:_e(()=>[_n]),_:1}),ve(ke(ct),{class:"form_input_wrapper",value:ke(a).remark,"onUpdate:value":i[12]||(i[12]=L=>ke(a).remark=L)},null,8,["value"])]),_:1}),ve(w,{"mt-2":""},{default:_e(()=>[ve(p,{onClick:i[13]||(i[13]=L=>c()),type:"info"},{default:_e(()=>[nt("\u786E\u5B9A")]),_:1})]),_:1})])]),_:1},8,["show"]),ve(x,{show:ke(Z),"onUpdate:show":i[26]||(i[26]=L=>Rt(Z)?Z.value=L:null),preset:"card",style:{width:"1000px"},title:"\u65B0\u5EFA","auto-focus":!1,bordered:!1},{default:_e(()=>[Oe("div",null,[ve(w,{align:"center"},{default:_e(()=>[ve($,null,{default:_e(()=>[Tn]),_:1}),ve(ke(ct),{class:"form_input_wrapper",value:ke(S).label,"onUpdate:value":i[15]||(i[15]=L=>ke(S).label=L)},null,8,["value"])]),_:1}),ve(w,{"mt-2":"",align:"center"},{default:_e(()=>[ve($,null,{default:_e(()=>[Rn]),_:1}),ve(B,{value:ke(S).type,"onUpdate:value":[i[16]||(i[16]=L=>ke(S).type=L),j],name:"type_radio"},{default:_e(()=>[ve(w,null,{default:_e(()=>[ve(H,{value:1},{default:_e(()=>[nt("\u6587\u5B57")]),_:1}),ve(H,{value:2},{default:_e(()=>[nt("\u56FE\u7247")]),_:1}),ve(H,{value:3},{default:_e(()=>[nt("\u6587\u5B57\u6570\u7EC4")]),_:1}),ve(H,{value:4},{default:_e(()=>[nt("\u56FE\u7247\u6570\u7EC4")]),_:1}),ve(H,{value:5},{default:_e(()=>[nt("JSON")]),_:1})]),_:1})]),_:1},8,["value"])]),_:1}),ve(w,{"mt-2":""},{default:_e(()=>[ve($,{"mt-1":""},{default:_e(()=>[$n]),_:1}),ke(S).type===1?(ze(),gt(ke(ct),{key:0,class:"form_input_wrapper",value:ke(S).value_edit,"onUpdate:value":i[17]||(i[17]=L=>ke(S).value_edit=L)},null,8,["value"])):it("",!0),ke(S).type===2?(ze(),ot("div",Ln,[Oe("div",Nn,[ke(S).value_edit?it("",!0):(ze(),ot("span",Bn,"\u6682\u65E0\u56FE\u7247")),Oe("div",Mn,[Oe("div",{class:"config_image_cover_upload_wrapper","cursor-pointer":"",onClick:i[18]||(i[18]=L=>y(-2))},[ve(l,{type:"upload-three"})]),ke(S).value_edit?(ze(),ot("div",{key:0,"cursor-pointer":"",class:"config_image_cover_delete_wrapper",onClick:i[19]||(i[19]=L=>r(-2))},[ve(l,{type:"delete-one"})])):it("",!0)]),ke(S).value_edit?(ze(),ot("img",{key:1,src:ke(wt)(ke(S).value_edit),alt:""},null,8,Wn)):it("",!0)])])):it("",!0),ke(S).type===3?(ze(),gt(O,{key:2,style:{"max-height":"500px"}},{default:_e(()=>[(ze(!0),ot($t,null,Lt(ke(S).value_edit,(L,v)=>(ze(),gt(w,{"mb-2":"",key:v,align:"center"},{default:_e(()=>[ve(ke(ct),{class:"form_input_wrapper",value:ke(S).value_edit[v],"onUpdate:value":_=>ke(S).value_edit[v]=_},null,8,["value","onUpdate:value"]),ve(p,{onClick:_=>P(v),quaternary:"",circle:"",type:"error"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"minus"})]),_:1})]),_:2},1032,["onClick"])]),_:2},1024))),128)),ve(w,{align:"center"},{default:_e(()=>[ve(ke(ct),{class:"form_input_wrapper",value:ke(S).value_push,"onUpdate:value":i[20]||(i[20]=L=>ke(S).value_push=L)},null,8,["value"]),ve(p,{onClick:i[21]||(i[21]=L=>z()),quaternary:"",circle:"",type:"info"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"plus"})]),_:1})]),_:1})]),_:1})]),_:1})):it("",!0),ke(S).type===4?(ze(),gt(O,{key:3,style:{"max-height":"500px"}},{default:_e(()=>[Oe("div",Hn,[(ze(!0),ot($t,null,Lt(ke(S).value_edit,(L,v)=>(ze(),ot("div",{key:v,onClick:_=>y(v),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},[Oe("div",Pn,[Oe("div",{class:"config_image_cover_upload_wrapper",onClick:_=>y(v)},[ve(l,{type:"upload-three"})],8,Fn),Oe("div",{class:"config_image_cover_delete_wrapper",onClick:_=>r(v)},[ve(l,{type:"delete-one"})],8,Vn)]),Oe("img",{src:ke(wt)(L),alt:""},null,8,On)],8,Gn))),128)),Oe("div",{onClick:i[22]||(i[22]=L=>y(-1)),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},"\u4E0A\u4F20\u56FE\u7247")])]),_:1})):it("",!0),ke(S).type===5?(ze(),gt(ke(bt),{key:4,style:{width:"840px",height:"500px"},modelValue:ke(S).value_edit,"onUpdate:modelValue":i[23]||(i[23]=L=>ke(S).value_edit=L),language:"zh-CN",modeList:[]},null,8,["modelValue"])):it("",!0)]),_:1}),ve(w,{"mt-2":"",align:"center"},{default:_e(()=>[ve($,null,{default:_e(()=>[Zn]),_:1}),ve(ke(ct),{class:"form_input_wrapper",value:ke(S).remark,"onUpdate:value":i[24]||(i[24]=L=>ke(S).remark=L)},null,8,["value"])]),_:1}),ve(w,{"mt-2":""},{default:_e(()=>[ve(p,{onClick:i[25]||(i[25]=L=>M()),type:"info"},{default:_e(()=>[nt("\u786E\u5B9A")]),_:1})]),_:1})])]),_:1},8,["show"]),Oe("input",{class:"upload_input_wrapper",accept:"image/*",onChange:T,type:"file",ref:A},null,32),ve(I,{title:"\u540E\u53F0\u914D\u7F6E"},{default:_e(()=>[Oe("div",null,[ve(w,null,{default:_e(()=>[ve(p,{onClick:i[27]||(i[27]=L=>K()),type:"success"},{default:_e(()=>[nt("\u65B0\u5EFA")]),_:1}),ve(p,{onClick:i[28]||(i[28]=L=>n()),type:"error"},{default:_e(()=>[nt("\u5220\u9664")]),_:1}),ve(p,{onClick:i[29]||(i[29]=L=>t()),type:"info"},{default:_e(()=>[nt("\u4FEE\u6539")]),_:1})]),_:1}),ve(C,{"mt-2":"",title:"\u5728\u4FEE\u6539\u548C\u5220\u9664\u524D\uFF0C\u8BF7\u786E\u4FDD\u60A8\u5DF2\u7ECF\u5145\u5206\u7406\u89E3\u8BE5\u914D\u7F6E\u7684\u542B\u4E49\u53CA\u7528\u6CD5\uFF0C\u76F2\u76EE\u4FEE\u6539\u6216\u5220\u9664\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:_e(()=>[ve(d,null,{default:_e(()=>[ve(l,{type:"alarm"})]),_:1})]),_:1}),ve(u,{"mt-2":"","checked-row-keys":ke(Qe),"onUpdate:checkedRowKeys":i[30]||(i[30]=L=>Rt(Qe)?Qe.value=L:null),columns:le,"row-key":L=>L.id,data:ke(De)},null,8,["checked-row-keys","row-key","data"])])]),_:1})])}}};typeof Gt=="function"&&Gt(Vt);var ei=Pt(Vt,[["__scopeId","data-v-70a74aad"]]);export{ei as default};