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.
1229 lines
955 KiB
JavaScript
1229 lines
955 KiB
JavaScript
import{_ as Mt,o as Ze,c as it,h as Pe,bA as Pt,e as Zt,f as mt,dN as Ot,$ as St,a as me,w as be,i as qe,j as ye,k as Tt,b as dt,bu as tt,cN as bt,F as $t,l as Lt,d as Ft,m as ut,dO as Dt,cS as Kt,cM as jt,dp as zt,dP as Xt,y as Yt,z as Jt,cH as Ut,s as Qt,v as qt,x as ei,N as ti,B as ii,bD as ni,bE as oi}from"./index.3c4f55c3.js";import{g as ri}from"./_commonjsHelpers.b273fa3f.js";import{_ as at}from"./Input.55d24dc2.js";import{a as si,b as ai,_ as li}from"./DataTable.2c2d13a1.js";import{_ as ci}from"./Scrollbar.8f14e661.js";import"./Suffix.a0cffb13.js";import"./Checkbox.ab3986eb.js";import"./FocusDetector.c9a22081.js";import"./Select.de1bebee.js";import"./Forward.2564511a.js";var Ht={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-2022 Jos de Jong, http://jsoneditoronline.org
|
|
*
|
|
* @author Jos de Jong, <wjosdejong@gmail.com>
|
|
* @version 9.9.2
|
|
* @date 2022-09-20
|
|
*/(function(je,Xe){(function(He,ot){je.exports=ot()})(self,function(){return ot={897:function(ie,g,H){H.d(g,{x:function(){return D}});var X=H(2602),x=H(9791),N=H(7907);function O(P,V){for(var L=0;L<V.length;L++){var C=V[L];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(P,C.key,C)}}var D=function(){function P(C,S){if(!(this instanceof P))throw new TypeError("Cannot call a class as a function");this.dom={};var A=this,c=this.dom,S=(this.anchor=void 0,this.items=C,this.eventListeners={},this.selection=void 0,this.onClose=S?S.close:void 0,this.limitHeight=!!S&&S.limitHeight,document.createElement("div")),p=(S.className="jsoneditor-contextmenu-root",c.root=S,document.createElement("div")),S=(p.className="jsoneditor-contextmenu",c.menu=p,S.appendChild(p),document.createElement("ul")),p=(S.className="jsoneditor-menu",p.appendChild(S),c.list=S,c.items=[],document.createElement("button")),c=(p.type="button",c.focusButton=p,document.createElement("li"));c.style.overflow="hidden",c.style.height="0",c.appendChild(p),S.appendChild(c),function s(n,i,t){t.forEach(function(e){var r,a,o,l,d,y;e.type==="separator"?((d=document.createElement("div")).className="jsoneditor-separator",(a=document.createElement("li")).appendChild(d),n.appendChild(a)):(r={},d=document.createElement("li"),n.appendChild(d),(a=document.createElement("button")).type="button",a.className=e.className,r.button=a,e.title&&(a.title=e.title),e.click&&(a.onclick=function(I){I.preventDefault(),A.hide(),e.click()}),d.appendChild(a),e.submenu?((l=document.createElement("div")).className="jsoneditor-icon",a.appendChild(l),(l=document.createElement("div")).className="jsoneditor-text"+(e.click?"":" jsoneditor-right-margin"),l.appendChild(document.createTextNode(e.text)),a.appendChild(l),(o=e.click?(a.className+=" jsoneditor-default",(l=document.createElement("button")).type="button",(r.buttonExpand=l).className="jsoneditor-expand",(y=document.createElement("div")).className="jsoneditor-expand",l.appendChild(y),d.appendChild(l),e.submenuTitle&&(l.title=e.submenuTitle),l):((y=document.createElement("div")).className="jsoneditor-expand",a.appendChild(y),a)).onclick=function(I){I.preventDefault(),A._onExpandItem(r),o.focus()},r.subItems=l=[],y=document.createElement("ul"),(r.ul=y).className="jsoneditor-menu",y.style.height="0",d.appendChild(y),s(y,l,e.submenu)):((d=document.createElement("div")).className="jsoneditor-icon",a.appendChild(d),(y=document.createElement("div")).className="jsoneditor-text",y.appendChild(document.createTextNode((0,N.Iu)(e.text))),a.appendChild(y)),i.push(r))})}(S,this.dom.items,C),this.maxHeight=0,C.forEach(function(s){s=24*(C.length+(s.submenu?s.submenu.length:0)),A.maxHeight=Math.max(A.maxHeight,s)})}var V,L;return V=P,(L=[{key:"_getVisibleButtons",value:function(){var C=[],m=this;return this.dom.items.forEach(function(A){C.push(A.button),A.buttonExpand&&C.push(A.buttonExpand),A.subItems&&A===m.expandedItem&&A.subItems.forEach(function(S){C.push(S.button),S.buttonExpand&&C.push(S.buttonExpand)})}),C}},{key:"show",value:function(C,i,A){this.hide();var S=!0,c=C.parentNode,p=C.getBoundingClientRect(),c=c.getBoundingClientRect(),s=i.getBoundingClientRect(),n=this,i=(this.dom.absoluteAnchor=(0,X.w)(C,i,function(){n.hide()}),p.bottom+this.maxHeight<s.bottom||p.top-this.maxHeight>s.top&&(S=!1),A?0:p.top-c.top);S?(A=C.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=i+A+"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&&(c=S?s.bottom-p.bottom-10:p.top-s.top-10,this.dom.list.style.maxHeight=c+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,x.getSelection)(),this.anchor=C,setTimeout(function(){n.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(C){var m,A=this,S=C===this.expandedItem,p=this.expandedItem;p&&(p.ul.style.height="0",p.ul.style.padding="",setTimeout(function(){A.expandedItem!==p&&(p.ul.style.display="",x.removeClassName)(p.ul.parentNode,"jsoneditor-selected")},300),this.expandedItem=void 0),S||((m=C.ul).style.display="block",m.clientHeight,setTimeout(function(){if(A.expandedItem===C){for(var c=0,s=0;s<m.childNodes.length;s++)c+=m.childNodes[s].clientHeight;m.style.height=c+"px",m.style.padding="5px 10px"}},0),(0,x.addClassName)(m.parentNode,"jsoneditor-selected"),this.expandedItem=C)}},{key:"_onKeyDown",value:function(C){var m,A,S,p,c=C.target,s=C.which,n=!1;s===27?(this.selection&&(0,x.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),n=!0):s===9?C.shiftKey?(A=(m=this._getVisibleButtons()).indexOf(c))===0&&(m[m.length-1].focus(),n=!0):(A=(m=this._getVisibleButtons()).indexOf(c))===m.length-1&&(m[0].focus(),n=!0):s===37?(c.className==="jsoneditor-expand"&&(A=(m=this._getVisibleButtons()).indexOf(c),(S=m[A-1])&&S.focus()),n=!0):s===38?(A=(m=this._getVisibleButtons()).indexOf(c),(S=(S=(S=m[A-1])&&S.className==="jsoneditor-expand"?m[A-2]:S)||m[m.length-1])&&S.focus(),n=!0):s===39?(A=(m=this._getVisibleButtons()).indexOf(c),(p=m[A+1])&&p.className==="jsoneditor-expand"&&p.focus(),n=!0):s===40&&(A=(m=this._getVisibleButtons()).indexOf(c),(p=(p=(p=m[A+1])&&p.className==="jsoneditor-expand"?m[A+2]:p)||m[0])&&(p.focus(),n=!0),n=!0),n&&(C.stopPropagation(),C.preventDefault())}}])&&O(V.prototype,L),Object.defineProperty(V,"prototype",{writable:!1}),P}();D.visibleMenu=void 0},6436:function(ie,g,H){function X(N,O){for(var D=0;D<O.length;D++){var P=O[D];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(N,P.key,P)}}H.d(g,{Q:function(){return x}});var x=function(){function N(V){if(!(this instanceof N))throw new TypeError("Cannot call a class as a function");this.errorTableVisible=V.errorTableVisible,this.onToggleVisibility=V.onToggleVisibility,this.onFocusLine=V.onFocusLine||function(){},this.onChangeHeight=V.onChangeHeight,this.dom={};var V=document.createElement("div"),L=(V.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=V,document.createElement("div")),V=(L.style.display="none",L.className="jsoneditor-additional-errors fadein",L.textContent="Scroll for more \u25BF",this.dom.additionalErrorsIndication=L,V.appendChild(L),document.createElement("span")),L=(V.className="jsoneditor-validation-error-icon",V.style.display="none",this.dom.validationErrorIcon=V,document.createElement("span"));L.className="jsoneditor-validation-error-count",L.style.display="none",this.dom.validationErrorCount=L,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}var O,D;return O=N,(D=[{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,V){var L,C,m=this,A=(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?((A=document.createElement("div")).className="jsoneditor-validation-errors",(C=document.createElement("table")).className="jsoneditor-text-errors",A.appendChild(C),L=document.createElement("tbody"),C.appendChild(L),P.forEach(function(S){isNaN(S.line)?S.dataPath&&(c=V.find(function(i){return i.path===S.dataPath}))&&(p=c.line+1):p=S.line;var p,c=document.createElement("tr"),s=(c.className=isNaN(p)?"":"jump-to-line",S.type==="error"?c.className+=" parse-error":c.className+=" validation-error",document.createElement("td")),n=document.createElement("button"),n=(n.className="jsoneditor-schema-error",s.appendChild(n),c.appendChild(s),document.createElement("td"));n.style="white-space: nowrap;",n.textContent=isNaN(p)?"":"Ln "+p,c.appendChild(n),typeof S=="string"?((s=document.createElement("td")).colSpan=2,(n=document.createElement("pre")).appendChild(document.createTextNode(S)),s.appendChild(n),c.appendChild(s)):((n=document.createElement("td")).appendChild(document.createTextNode(S.dataPath||"")),c.appendChild(n),s=document.createElement("td"),(n=document.createElement("pre")).appendChild(document.createTextNode(S.message.replace(/<br>/gi,`
|
|
`))),s.appendChild(n),c.appendChild(s)),c.onclick=function(){m.onFocusLine(p)},L.appendChild(c)}),this.dom.validationErrors=A,this.dom.validationErrorsContainer.appendChild(A),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(){m.dom.additionalErrorsIndication.style.display=0<m.dom.validationErrorsContainer.clientHeight&&m.dom.validationErrorsContainer.scrollTop===0?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0,C=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0),this.onChangeHeight(C)):this.onChangeHeight(0),P.filter(function(S){return S.type!=="error"}).length);0<A?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=A,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=A+" schema validation error(s) found",this.dom.validationErrorIcon.onclick=this.toggleTableVisibility.bind(this)):(this.dom.validationErrorCount.style.display="none",this.dom.validationErrorIcon.style.display="none"),P.some(function(S){return S.type==="error"})?(C=P[0].line,this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(C)?"parse error - check that the json is valid":"parse error on line "+C,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)):this.dom.parseErrorIndication.style.display="none"}}])&&X(O.prototype,D),Object.defineProperty(O,"prototype",{writable:!1}),N}()},2474:function(ie,g,H){function X(N,O){for(var D=0;D<O.length;D++){var P=O[D];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(N,P.key,P)}}H.d(g,{R:function(){return x}});var x=function(){function N(P){if(!(this instanceof N))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(V){V.which!==9&&V.keyCode!==9||this._onEvent(V)}.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 O,D;return O=N,(D=[{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))}}])&&X(O.prototype,D),Object.defineProperty(O,"prototype",{writable:!1}),N}()},3161:function(ie,g,H){var X=H(8170),x=H(8037),N=H(8038).treeModeMixins,O=H(8458).textModeMixins,D=H(341).previewModeMixins,A=H(9791),P=A.clear,V=A.extend,L=A.getInnerText,C=A.getInternetExplorerVersion,m=A.parse,A=H(2744).tryRequireAjv,S=H(2558).showTransformModal,p=H(6210).showSortModal,c=A();function s(n,i,t){if(!(this instanceof s))throw new Error('JSONEditor constructor called without "new".');var e=C();if(e!==-1&&e<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");i&&(i.error&&(console.warn('Option "error" has been renamed to "onError"'),i.onError=i.error,delete i.error),i.change&&(console.warn('Option "change" has been renamed to "onChange"'),i.onChange=i.change,delete i.change),i.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),i.onEditable=i.editable,delete i.editable),i.onChangeJSON&&(i.mode==="text"||i.mode==="code"||i.modes&&(i.modes.indexOf("text")!==-1||i.modes.indexOf("code")!==-1))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),i&&Object.keys(i).forEach(function(r){s.VALID_OPTIONS.indexOf(r)===-1&&console.warn('Unknown option "'+r+'". This option will be ignored')})),arguments.length&&this._create(n,i,t)}typeof Promise=="undefined"&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),s.modes={},s.prototype.DEBOUNCE_INTERVAL=150,s.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"],s.prototype._create=function(n,i,t){this.container=n,this.options=i||{},this.json=t||{},n=this.options.mode||this.options.modes&&this.options.modes[0]||"tree",this.setMode(n)},s.prototype.destroy=function(){},s.prototype.set=function(n){this.json=n},s.prototype.get=function(){return this.json},s.prototype.setText=function(n){this.json=m(n)},s.prototype.getText=function(){return JSON.stringify(this.json)},s.prototype.setName=function(n){this.options||(this.options={}),this.options.name=n},s.prototype.getName=function(){return this.options&&this.options.name},s.prototype.setMode=function(n){if(n!==this.options.mode||!this.create){var i=this.container,t=V({},this.options),e=t.mode,r=(t.mode=n,s.modes[n]);if(!r)throw new Error('Unknown mode "'+t.mode+'"');var a=r.data==="text",o=this.getName(),l=this[a?"getText":"get"]();if(this.destroy(),P(this),V(this,r.mixin),this.create(i,t),this.setName(o),this[a?"setText":"set"](l),typeof r.load=="function")try{r.load.call(this)}catch(d){console.error(d)}if(typeof t.onModeChange=="function"&&n!==e)try{t.onModeChange(n,e)}catch(d){console.error(d)}}},s.prototype.getMode=function(){return this.options.mode},s.prototype._onError=function(n){this.options&&typeof this.options.onError=="function"?this.options.onError(n):window.alert(n.toString())},s.prototype.setSchema=function(n,i){if(n){var t;try{this.options.ajv?t=this.options.ajv:((t=c({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(H(7171)),t.addMetaSchema(H(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(t){if(i){for(var e in i)t.removeSchema(e),i[e]&&t.addSchema(i[e],e);this.options.schemaRefs=i}this.validateSchema=t.compile(n),this.options.schema=n,this.options.schemaRefs=i,this.validate()}}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate();this.refresh(),typeof this._onSchemaChange=="function"&&this._onSchemaChange(n,i)},s.prototype.validate=function(){},s.prototype.refresh=function(){},(s.registerMode=function(n){var i;if(Array.isArray(n))for(r=0;r<n.length;r++)s.registerMode(n[r]);else{if(!("mode"in n))throw new Error('Property "mode" missing');if(!("mixin"in n))throw new Error('Property "mixin" missing');if(!("data"in n))throw new Error('Property "data" missing');var t=n.mode;if(t in s.modes)throw new Error('Mode "'+t+'" already registered');if(typeof n.mixin.create!="function")throw new Error('Required function "create" missing on mixin');for(var e=["setMode","registerMode","modes"],r=0;r<e.length;r++)if((i=e[r])in n.mixin)throw new Error('Reserved property "'+i+'" not allowed in mixin');s.modes[t]=n}})(N),s.registerMode(O),s.registerMode(D),s.ace=X,s.Ajv=c,s.VanillaPicker=x,s.showTransformModal=S,s.showSortModal=p,s.getInnerText=L,ie.exports=s.default=s},6617:function(ie,g,H){H.d(g,{x:function(){return O}});var X=H(897),x=H(7907);function N(D,P){for(var V=0;V<P.length;V++){var L=P[V];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(D,L.key,L)}}var O=function(){function D(L,C,m,A){if(!(this instanceof D))throw new TypeError("Cannot call a class as a function");for(var S={code:{text:(0,x.Iu)("modeCodeText"),title:(0,x.Iu)("modeCodeTitle"),click:function(){A("code")}},form:{text:(0,x.Iu)("modeFormText"),title:(0,x.Iu)("modeFormTitle"),click:function(){A("form")}},text:{text:(0,x.Iu)("modeTextText"),title:(0,x.Iu)("modeTextTitle"),click:function(){A("text")}},tree:{text:(0,x.Iu)("modeTreeText"),title:(0,x.Iu)("modeTreeTitle"),click:function(){A("tree")}},view:{text:(0,x.Iu)("modeViewText"),title:(0,x.Iu)("modeViewTitle"),click:function(){A("view")}},preview:{text:(0,x.Iu)("modePreviewText"),title:(0,x.Iu)("modePreviewTitle"),click:function(){A("preview")}}},p=[],c=0;c<C.length;c++){var s=C[c],n=S[s];if(!n)throw new Error('Unknown mode "'+s+'"');n.className="jsoneditor-type-modes"+(m===s?" jsoneditor-selected":""),p.push(n)}var t=S[m];if(!t)throw new Error('Unknown mode "'+m+'"');var t=t.text,i=document.createElement("button"),t=(i.type="button",i.className="jsoneditor-modes jsoneditor-separator",i.textContent=t+" \u25BE",i.title=(0,x.Iu)("modeEditorTitle"),i.onclick=function(){new X.x(p).show(i,L)},document.createElement("div"));t.className="jsoneditor-modes",t.style.position="relative",t.appendChild(i),L.appendChild(t),this.dom={container:L,box:i,frame:t}}var P,V;return P=D,(V=[{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}}])&&N(P.prototype,V),Object.defineProperty(P,"prototype",{writable:!1}),D}()},8170:function(ie,g,H){var X;if(window.ace)X=window.ace;else try{X=H(6225),H(4091),H(3330),H(4317);var x=H(7923);X.config.setModuleUrl("ace/mode/json_worker",x)}catch{}ie.exports=X},4864:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(ie,g,H){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
|
|
}`,ie("../lib/dom").importCssString(g.cssText,g.cssClass)})},6589:function(ie,g){(H={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(X,x,N,O,D,P,V){var L=P.length-1;switch(D){case 1:this.$=X.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(X);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=P[L-1];case 13:this.$={};break;case 14:this.$=P[L-1];break;case 15:this.$=[P[L-2],P[L]];break;case 16:this.$={},this.$[P[L][0]]=P[L][1];break;case 17:this.$=P[L-2],P[L-2][P[L][0]]=P[L][1];break;case 18:this.$=[];break;case 19:this.$=P[L-1];break;case 20:this.$=[P[L]];break;case 21:this.$=P[L-2],P[L-2].push(P[L])}},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(X,x){throw new Error(X)},parse:function(X){var x=this,N=[0],O=[null],D=[],P=this.table,V="",L=0,C=0,m=0,A=(this.lexer.setInput(X),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.lexer.yylloc===void 0&&(this.lexer.yylloc={}),this.lexer.yylloc);function S(){var d=x.lexer.lex()||1;return d=typeof d!="number"&&x.symbols_[d]||d}D.push(A),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);for(var p,c,s,n,i,t,e,r,a,o={};;){if(s=N[N.length-1],(n=this.defaultActions[s]||(p==null&&(p=S()),P[s]&&P[s][p]))===void 0||!n.length||!n[0]){if(!m){for(i in r=[],P[s])this.terminals_[i]&&2<i&&r.push("'"+this.terminals_[i]+"'");var l="",l=this.lexer.showPosition?"Parse error on line "+(L+1)+`:
|
|
`+this.lexer.showPosition()+`
|
|
Expecting `+r.join(", ")+", got '"+this.terminals_[p]+"'":"Parse error on line "+(L+1)+": Unexpected "+(p==1?"end of input":"'"+(this.terminals_[p]||p)+"'");this.parseError(l,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:A,expected:r})}if(m==3){if(p==1)throw new Error(l||"Parsing halted.");C=this.lexer.yyleng,V=this.lexer.yytext,L=this.lexer.yylineno,A=this.lexer.yylloc,p=S()}for(;!(2 .toString()in P[s]);){if(s==0)throw new Error(l||"Parsing halted.");a=1,N.length=N.length-2*a,O.length=O.length-a,D.length=D.length-a,s=N[N.length-1]}c=p,p=2,n=P[s=N[N.length-1]]&&P[s][2],m=3}if(n[0]instanceof Array&&1<n.length)throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+p);switch(n[0]){case 1:N.push(p),O.push(this.lexer.yytext),D.push(this.lexer.yylloc),N.push(n[1]),p=null,c?(p=c,c=null):(C=this.lexer.yyleng,V=this.lexer.yytext,L=this.lexer.yylineno,A=this.lexer.yylloc,0<m&&m--);break;case 2:if(t=this.productions_[n[1]][1],o.$=O[O.length-t],o._$={first_line:D[D.length-(t||1)].first_line,last_line:D[D.length-1].last_line,first_column:D[D.length-(t||1)].first_column,last_column:D[D.length-1].last_column},(e=this.performAction.call(o,V,C,L,this.yy,n[1],O,D))!==void 0)return e;t&&(N=N.slice(0,-1*t*2),O=O.slice(0,-1*t),D=D.slice(0,-1*t)),N.push(this.productions_[n[1]][0]),O.push(o.$),D.push(o._$),e=P[N[N.length-2]][N[N.length-1]],N.push(e);break;case 3:return!0}}return!0}}).lexer={EOF:1,parseError:function(X,x){if(!this.yy.parseError)throw new Error(X);this.yy.parseError(X,x)},setInput:function(X){return this._input=X,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 X=this._input[0];return this.yytext+=X,this.yyleng++,this.match+=X,this.matched+=X,X.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),X},unput:function(X){return this._input=X+this._input,this},more:function(){return this._more=!0,this},less:function(X){this._input=this.match.slice(X)+this._input},pastInput:function(){var X=this.matched.substr(0,this.matched.length-this.match.length);return(20<X.length?"...":"")+X.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var X=this.match;return X.length<20&&(X+=this._input.substr(0,20-X.length)),(X.substr(0,20)+(20<X.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var X=this.pastInput(),x=new Array(X.length+1).join("-");return X+this.upcomingInput()+`
|
|
`+x+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var X,x,N,O,D=this._currentRules(),P=0;P<D.length&&(!(x=this._input.match(this.rules[D[P]]))||X&&!(x[0].length>X[0].length)||(X=x,N=P,this.options.flex));P++);return X?((O=X[0].match(/\n.*/g))&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-1:this.yylloc.last_column+X[0].length},this.yytext+=X[0],this.match+=X[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(X[0].length),this.matched+=X[0],O=this.performAction.call(this,this.yy,this,D[N],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),O||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 X=this.next();return X!==void 0?X:this.lex()},begin:function(X){this.conditionStack.push(X)},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(X){this.begin(X)},options:{},performAction:function(X,x,N,O){switch(N){case 0:break;case 1:return 6;case 2:return x.yytext=x.yytext.substr(1,x.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 H;g.parser=H,g.parse=H.parse.bind(H)},3879:function(ie){function g(){}g.prototype={on:function(L,C){this._events=this._events||{},this._events[L]=this._events[L]||[],this._events[L].push(C)},off:function(L,C){this._events=this._events||{},L in this._events&&this._events[L].splice(this._events[L].indexOf(C),1)},emit:function(L){if(this._events=this._events||{},L in this._events)for(var C=0;C<this._events[L].length;C++)this._events[L][C].apply(this,Array.prototype.slice.call(arguments,1))}},g.mixin=function(L){for(var C=["on","off","emit"],m=0;m<C.length;m++)typeof L=="function"?L.prototype[C[m]]=g.prototype[C[m]]:L[C[m]]=g.prototype[C[m]];return L};var H={escapeRegExp:function(L){var C=/[\\^$.*+?()[\]{}|]/g,m=new RegExp(C.source);return L&&m.test(L)?L.replace(C,"\\$&"):L},extend:function(L,C){for(var m in C){var A;C.hasOwnProperty(m)&&((A=C[m])&&Object.prototype.toString.call(A)==="[object Object]"?(L[m]=L[m]||{},H.extend(L[m],A)):L[m]=A)}return L},each:function(L,C,m){if(Object.prototype.toString.call(L)==="[object Object]")for(var A in L)Object.prototype.hasOwnProperty.call(L,A)&&C.call(m,A,L[A],L);else for(var S=0,p=L.length;S<p;S++)C.call(m,S,L[S],L)},createElement:function(L,C){var m,A=document.createElement(L);if(C&&Object.prototype.toString.call(C)==="[object Object]")for(m in C)m in A?A[m]=C[m]:m==="html"?A.innerHTML=C[m]:A.setAttribute(m,C[m]);return A},hasClass:function(L,C){if(L)return L.classList?L.classList.contains(C):!!L.className&&!!L.className.match(new RegExp("(\\s|^)"+C+"(\\s|$)"))},addClass:function(L,C){H.hasClass(L,C)||(L.classList?L.classList.add(C):L.className=L.className.trim()+" "+C)},removeClass:function(L,C){H.hasClass(L,C)&&(L.classList?L.classList.remove(C):L.className=L.className.replace(new RegExp("(^|\\s)"+C.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(L,C){return L&&L!==document.body&&(C(L)?L:H.closest(L.parentNode,C))},isInt:function(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L},debounce:function(L,C,m){var A;return function(){var S=this,p=arguments,c=m&&!A;clearTimeout(A),A=setTimeout(function(){A=null,m||L.apply(S,p)},C),c&&L.apply(S,p)}},rect:function(A,p){var m=window,A=A.getBoundingClientRect(),S=p?m.pageXOffset:0,p=p?m.pageYOffset:0;return{bottom:A.bottom+p,height:A.height,left:A.left+S,right:A.right+S,top:A.top+p,width:A.width}},includes:function(L,C){return-1<L.indexOf(C)},startsWith:function(L,C){return L.substr(0,C.length)===C},truncate:function(L){for(;L.firstChild;)L.removeChild(L.firstChild)}};function X(L,C){return L.hasOwnProperty(C)&&(L[C]===!0||L[C].length)}function x(L,C,m){L.parentNode?L.parentNode.parentNode||C.appendChild(L.parentNode):C.appendChild(L),H.removeClass(L,"excluded"),m||(L.textContent=L.textContent)}function N(){var L,C;this.items.length&&(L=document.createDocumentFragment(),this.config.pagination?(C=this.pages.slice(0,this.pageIndex),H.each(C,function(m,A){H.each(A,function(S,p){x(p,L,this.customOption)},this)},this)):H.each(this.items,function(m,A){x(A,L,this.customOption)},this),L.childElementCount&&(H.removeClass(this.items[this.navIndex],"active"),this.navIndex=(L.querySelector(".selectr-option.selected")||L.querySelector(".selectr-option")).idx,H.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(L))}function O(L,C){C=C||L;var m={class:"selectr-option",role:"treeitem","aria-selected":!1};return this.customOption?m.html=this.config.renderOption(C):m.textContent=L.textContent,(C=H.createElement("li",m)).idx=L.idx,this.items.push(C),L.defaultSelected&&this.defaultSelected.push(L.idx),L.disabled&&(C.disabled=!0,H.addClass(C,"disabled")),C}function D(){var L,C=this.tree,m=C.scrollTop;C.scrollHeight-C.offsetHeight<=m&&this.pageIndex<this.pages.length&&(L=document.createDocumentFragment(),H.each(this.pages[this.pageIndex],function(A,S){x(S,L,this.customOption)},this),C.appendChild(L),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length}))}function P(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&H.removeClass(this.inputContainer,"active"),H.hasClass(this.container,"notice")&&(H.removeClass(this.container,"notice"),H.addClass(this.container,"open"),this.input.focus()),H.each(this.items,function(L,C){H.removeClass(C,"excluded"),this.customOption||(C.textContent=C.textContent)},this))}function V(L,C){if(!L)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if(typeof(this.el=L)=="string"&&(this.el=document.querySelector(L)),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(C)}V.prototype.render=function(L){var C;this.rendered||((this.el.selectr=this).config=H.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..."}},L),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=X(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,X(this.config,"width")&&(H.isInt(this.config.width)?this.width=this.config.width+"px":this.config.width==="auto"?this.width="100%":H.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=H.createElement("div",{class:"selectr-container"}),this.config.customClass&&H.addClass(this.container,this.config.customClass),this.mobileDevice?H.addClass(this.container,"selectr-mobile"):H.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?H.addClass(this.el,"selectr-visible"):H.addClass(this.el,"selectr-hidden"),this.selected=H.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:0,"aria-expanded":!1}),this.label=H.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var m=H.createElement("div",{class:"selectr-options-container"});if(this.tree=H.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=H.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple?(H.addClass(this.label,"selectr-tags"),H.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=H.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),H.addClass(this.container,"clearable")),this.config.taggable){var A=H.createElement("li",{class:"input-tag"});if(this.input=H.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),A.appendChild(this.input),this.label.appendChild(A),H.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators){this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators);for(var S=[],p=0;p<this.tagSeperators.length;p++)S.push(H.escapeRegExp(this.tagSeperators[p]));this.tagSeperatorsRegex=new RegExp(S.join("|"),"i")}else this.tagSeperatorsRegex=new RegExp(",","i")}this.config.searchable&&(this.input=H.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=H.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=H.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 c,s,n,i=!1,t=0;this.el.children.length&&H.each(this.el.children,function(r,a){a.nodeName==="OPTGROUP"?(i=H.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+a.label+"</li>"}),H.each(a.children,function(o,l){l.idx=t,i.appendChild(O.call(this,l,i)),t++},this)):(a.idx=t,O.call(this,a),t++)},this),this.config.data&&Array.isArray(this.config.data)&&(c=!(this.data=[]),i=!1,t=0,H.each(this.config.data,function(r,a){X(a,"children")?(c=H.createElement("optgroup",{label:a.text}),i=H.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+a.text+"</li>"}),H.each(a.children,function(o,l){(s=new Option(l.text,l.value,!1,l.hasOwnProperty("selected")&&l.selected===!0)).disabled=X(l,"disabled"),this.options.push(s),c.appendChild(s),s.idx=t,i.appendChild(O.call(this,s,l)),this.data[t]=l,t++},this),this.el.appendChild(c)):((s=new Option(a.text,a.value,!1,a.hasOwnProperty("selected")&&a.selected===!0)).disabled=X(a,"disabled"),this.options.push(s),s.idx=t,O.call(this,s,a),this.data[t]=a,t++)},this)),this.setSelected(!0);for(var e=this.navIndex=0;e<this.items.length;e++)if(n=this.items[e],!H.hasClass(n,"disabled")){H.addClass(n,"active"),this.navIndex=e;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(m),this.placeEl=H.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=H.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex),C=this,setTimeout(function(){C.emit("selectr.init")},20))},V.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},V.prototype.getSelectedProperties=function(L){var C=this.getSelected();return[].slice.call(C).map(function(m){return m[L]}).filter(function(m){return m!=null})},V.prototype.detectEventPassiveOption=function(){var L=!1;try{var C=Object.defineProperty({},"passive",{get:function(){L=!0}});window.addEventListener("test",null,C)}catch{}return L},V.prototype.bindEvents=function(){var L,C=this;this.events={},this.events.dismiss=function(m){m=m.target,this.container.contains(m)||!this.opened&&!H.hasClass(this.container,"notice")||this.close()}.bind(this),this.events.navigate=function(m){if(m=m||window.event,this.items.length&&this.opened&&H.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 A,S=this.items[this.navIndex],p=this.navIndex;switch(m.which){case 38:(A=0)<this.navIndex&&this.navIndex--;break;case 40:this.navIndex<this.items.length-(A=1)&&this.navIndex++}for(this.navigating=!0;H.hasClass(this.items[this.navIndex],"disabled")||H.hasClass(this.items[this.navIndex],"excluded");){if(!(0<this.navIndex&&this.navIndex<this.items.length-1)){this.navIndex=p;break}if(A?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=H.rect(this.items[this.navIndex]),A?(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&&D.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)),S&&H.removeClass(S,"active"),H.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===C.el&&C.toggle()},!!this.supportsEventPassiveOption&&{passive:!0}),this.container.addEventListener("click",function(m){m.target===C.el&&C.toggle()}),this.el.addEventListener("change",function(m){m.__selfTriggered||(C.el.multiple?(m=C.getSelectedProperties("idx"),m=function(A,S){for(var p,c=[],s=A.slice(0),n=0;n<S.length;n++)-1<(p=s.indexOf(S[n]))?s.splice(p,1):c.push(S[n]);return[c,s]}(C.selectedIndexes,m),H.each(m[0],function(A,S){C.select(S)},C),H.each(m[1],function(A,S){C.deselect(S)},C)):-1<C.el.selectedIndex&&C.select(C.el.selectedIndex))})),this.config.nativeDropdown&&this.container.addEventListener("keydown",function(m){m.key==="Enter"&&C.selected===document.activeElement&&(C.toggle(),setTimeout(function(){C.el.focus()},200))}),this.selected.addEventListener("click",function(m){C.disabled||C.toggle(),m.preventDefault()}),this.config.nativeKeyboard&&(L="",this.selected.addEventListener("keydown",function(m){var A;C.disabled||C.selected!==document.activeElement||m.altKey||m.ctrlKey||m.metaKey||(m.key===" "||!C.opened&&-1<["Enter","ArrowUp","ArrowDown"].indexOf(m.key)?(C.toggle(),m.preventDefault(),m.stopPropagation()):m.key.length<=2&&String[String.fromCodePoint?"fromCodePoint":"fromCharCode"](m.key[String.codePointAt?"codePointAt":"charCodeAt"](0))===m.key&&(C.config.multiple?(C.open(),C.config.searchable&&(C.input.value=m.key,C.input.focus(),C.search(null,!0))):(L+=m.key,(A=C.search(L,!0))&&A.length&&(C.clear(),C.setValue(A[0].value)),setTimeout(function(){L=""},1e3)),m.preventDefault(),m.stopPropagation()))}),this.container.addEventListener("keyup",function(m){C.opened&&m.key==="Escape"&&(C.close(),m.stopPropagation(),C.selected.focus())})),this.label.addEventListener("click",function(m){H.hasClass(m.target,"selectr-tag-remove")&&C.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 A=H.closest(m.target,function(S){return S&&H.hasClass(S,"selectr-option")});A&&!H.hasClass(A,"disabled")&&(H.hasClass(A,"selected")?(C.el.multiple||!C.el.multiple&&C.config.allowDeselect)&&C.deselect(A.idx):C.select(A.idx),C.opened&&!C.el.multiple&&C.close()),m.preventDefault(),m.stopPropagation()}),this.tree.addEventListener("mouseover",function(m){!H.hasClass(m.target,"selectr-option")||H.hasClass(m.target,"disabled")||(H.removeClass(C.items[C.navIndex],"active"),H.addClass(m.target,"active"),C.navIndex=[].slice.call(C.items).indexOf(m.target))}),this.config.searchable&&(this.input.addEventListener("focus",function(m){C.searching=!0}),this.input.addEventListener("blur",function(m){C.searching=!1}),this.input.addEventListener("keyup",function(m){C.search(),C.config.taggable||(this.value.length?H.addClass(this.parentNode,"active"):H.removeClass(this.parentNode,"active"))}),this.inputClear.addEventListener("click",function(m){C.input.value=null,P.call(C),C.tree.childElementCount||N.call(C)})),this.config.taggable&&this.input.addEventListener("keyup",function(m){var A,S;C.search(),C.config.taggable&&this.value.length&&(A=this.value.trim()).length&&(m.which===13||C.tagSeperatorsRegex.test(A))&&(m=A.replace(C.tagSeperatorsRegex,""),(S=(m=(m=H.escapeRegExp(m)).trim()).length?C.add({value:m,textContent:m,selected:!0},!0):S)?(C.close(),P.call(C)):(this.value="",C.setMessage(C.config.messages.tagDuplicate)))}),this.update=H.debounce(function(){C.opened&&C.config.closeOnScroll&&C.close(),C.width&&(C.container.style.width=C.width),C.invert()},50),this.requiresPagination&&(this.paginateItems=H.debounce(function(){D.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)}))},V.prototype.setSelected=function(L){var C;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),H.each(this.options,function(m,A){A.selected&&A.defaultSelected&&this.select(A.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),C=0,H.each(this.config.data,function(m,A){X(A,"children")?H.each(A.children,function(S,p){p.hasOwnProperty("selected")&&p.selected===!0&&this.select(C),C++},this):(A.hasOwnProperty("selected")&&A.selected===!0&&this.select(C),C++)},this))},V.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),this.originalType==="select-one"&&(this.el.multiple=!1),this.config.data&&(this.el.innerHTML=""),H.removeClass(this.el,"selectr-hidden"),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1,delete this.el.selectr)},V.prototype.change=function(L){var C=this.items[L],m=this.options[L];m.disabled||(m.selected&&H.hasClass(C,"selected")?this.deselect(L):this.select(L),this.opened&&!this.el.multiple&&this.close())},V.prototype.select=function(L){var C=this.items[L],m=[].slice.call(this.el.options),A=this.options[L];if(this.el.multiple){if(H.includes(this.selectedIndexes,L))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(A.value),this.selectedIndexes.push(L),function(p){var c,s=this,n=document.createDocumentFragment(),i=this.options[p.idx],t=this.data?this.data[p.idx]:i,e={class:"selectr-tag"},t=(this.customSelected?e.html=this.config.renderSelection(t):e.textContent=i.textContent,H.createElement("li",e)),e=H.createElement("button",{class:"selectr-tag-remove",type:"button"});t.appendChild(e),t.idx=p.idx,t.tag=i.value,this.tags.push(t),this.config.sortSelected?(e=this.tags.slice(),c=function(r,a){r.replace(/(\d+)|(\D+)/g,function(o,l,d){a.push([l||1/0,d||""])})},e.sort(function(r,a){var o,l,d=[],y=[];for(s.config.sortSelected===!0?(o=r.tag,l=a.tag):s.config.sortSelected==="text"&&(o=r.textContent,l=a.textContent),c(o,d),c(l,y);d.length&&y.length;){var h=d.shift(),I=y.shift(),h=h[0]-I[0]||h[1].localeCompare(I[1]);if(h)return h}return d.length-y.length}),H.each(e,function(r,a){n.appendChild(a)}),this.label.innerHTML=""):n.appendChild(t),this.config.taggable?this.label.insertBefore(n,this.input.parentNode):this.label.appendChild(n)}.call(this,C)}else{var S=this.data?this.data[L]:A;this.customSelected?this.label.innerHTML=this.config.renderSelection(S):this.label.textContent=A.textContent,this.selectedValue=A.value,this.selectedIndex=L,H.each(this.options,function(p,c){var s=this.items[p];p!==L&&(s&&H.removeClass(s,"selected"),c.selected=!1,c.removeAttribute("selected"))},this)}H.includes(m,A)||this.el.add(A),C.setAttribute("aria-selected",!0),H.addClass(C,"selected"),H.addClass(this.container,"has-selected"),A.selected=!0,A.setAttribute("selected",""),this.emit("selectr.change",A),this.emit("selectr.select",A),"createEvent"in document?((S=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),S.__selfTriggered=!0,this.el.dispatchEvent(S)):this.el.fireEvent("onchange")},V.prototype.deselect=function(L,C){var m=this.items[L],A=this.options[L];if(this.el.multiple){var S=this.selectedIndexes.indexOf(L),S=(this.selectedIndexes.splice(S,1),this.selectedValues.indexOf(A.value));this.selectedValues.splice(S,1),function(p){var c=!1;H.each(this.tags,function(s,n){n.idx===p.idx&&(c=n)},this),c&&(this.label.removeChild(c),this.tags.splice(this.tags.indexOf(c),1))}.call(this,m),this.tags.length||H.removeClass(this.container,"has-selected")}else{if(!C&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.innerHTML="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,H.removeClass(this.container,"has-selected")}this.items[L].setAttribute("aria-selected",!1),H.removeClass(this.items[L],"selected"),A.selected=!1,A.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",A),"createEvent"in document?((S=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),S.__selfTriggered=!0,this.el.dispatchEvent(S)):this.el.fireEvent("onchange")},V.prototype.setValue=function(L){var C=Array.isArray(L);if(C||(L=L.toString().trim()),!this.el.multiple&&C)return!1;H.each(this.options,function(m,A){(C&&-1<L.indexOf(A.value)||A.value===L)&&this.change(A.idx)},this)},V.prototype.getValue=function(L,C){var m,A;return this.el.multiple?L?this.selectedIndexes.length&&(A={values:[]},H.each(this.selectedIndexes,function(S,p){p=this.options[p],A.values[S]={value:p.value,text:p.textContent}},this)):A=this.selectedValues.slice():A=L?{value:(m=this.options[this.selectedIndex]).value,text:m.textContent}:this.selectedValue,A=L&&C?JSON.stringify(A):A},V.prototype.add=function(L,C){if(L){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(L))H.each(L,function(S,p){this.add(p,C)},this);else if(Object.prototype.toString.call(L)==="[object Object]"){if(C){var m=!1;if(H.each(this.options,function(S,p){p.value.toLowerCase()===L.value.toLowerCase()&&(m=!0)}),m)return!1}var A=H.createElement("option",L);return this.data.push(L),this.mobileDevice&&this.el.add(A),this.options.push(A),A.idx=0<this.options.length?this.options.length-1:0,O.call(this,A),L.selected&&this.select(A.idx),this.setPlaceholder(),A}return this.config.pagination&&this.paginate(),!0}},V.prototype.remove=function(L){var C,m=[];Array.isArray(L)?H.each(L,function(A,S){H.isInt(S)?m.push(this.getOptionByIndex(S)):typeof S=="string"&&m.push(this.getOptionByValue(S))},this):H.isInt(L)?m.push(this.getOptionByIndex(L)):typeof L=="string"&&m.push(this.getOptionByValue(L)),m.length&&(H.each(m,function(A,S){C=S.idx,this.el.remove(S),this.options.splice(C,1),S=this.items[C].parentNode,S&&S.removeChild(this.items[C]),this.items.splice(C,1),H.each(this.options,function(p,c){c.idx=p,this.items[p].idx=p},this)},this),this.setPlaceholder(),this.config.pagination&&this.paginate())},V.prototype.removeAll=function(){this.clear(!0),H.each(this.el.options,function(L,C){this.el.remove(C)},this),H.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},V.prototype.search=function(L,C){var m,A,S,p,c;if(!this.navigating)return m=!1,L||(L=this.input.value,m=!0,this.removeMessage(),H.truncate(this.tree)),A=[],S=document.createDocumentFragment(),0<(L=L.trim().toLowerCase()).length?(p=C?H.startsWith:H.includes,H.each(this.options,function(s,n){var i,t,e,r,a=this.items[n.idx];p(n.textContent.trim().toLowerCase(),L)&&!n.disabled?(A.push({text:n.textContent,value:n.value}),m&&(x(a,S,this.customOption),H.removeClass(a,"excluded"),this.customOption||(i=L,e=(n=n).textContent,i=new RegExp(i,"ig"),(r=i.exec(e))&&(n.innerHTML="",(t=document.createElement("span")).classList.add("selectr-match"),t.textContent=r[0],n.appendChild(document.createTextNode(e.substring(0,r.index))),n.appendChild(t),n.appendChild(document.createTextNode(e.substring(i.lastIndex))))))):m&&H.addClass(a,"excluded")},this),m&&(S.childElementCount?(C=this.items[this.navIndex],c=S.querySelector(".selectr-option:not(.excluded)"),this.noResults=!1,H.removeClass(C,"active"),this.navIndex=c.idx,H.addClass(c,"active")):this.config.taggable||(this.noResults=!0,this.setMessage(this.config.messages.noResults)),this.tree.appendChild(S))):N.call(this),A},V.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},V.prototype.open=function(){var L=this;if(!this.options.length)return!1;this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(H.addClass(this.container,"native-open"),this.config.data&&H.each(this.options,function(C,m){this.el.add(m)},this)):(H.addClass(this.container,"open"),N.call(this),this.invert(),this.tree.scrollTop=0,H.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(){L.input.focus(),L.input.tabIndex=0},10))},V.prototype.close=function(){var L;this.opened&&this.emit("selectr.close"),this.opened=!1,this.navigating=!1,this.mobileDevice||this.config.nativeDropdown?H.removeClass(this.container,"native-open"):(L=H.hasClass(this.container,"notice"),this.config.searchable&&!L&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),L&&(H.removeClass(this.container,"notice"),this.notice.textContent=""),H.removeClass(this.container,"open"),H.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),H.truncate(this.tree),P.call(this))},V.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&H.each(this.tags,function(L,C){C.lastElementChild.tabIndex=0}),H.removeClass(this.container,"selectr-disabled")},V.prototype.disable=function(L){L||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&H.each(this.tags,function(C,m){m.lastElementChild.tabIndex=-1}),this.disabled=!0,H.addClass(this.container,"selectr-disabled")},V.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),H.each(this.defaultSelected,function(L,C){this.select(C)},this),this.emit("selectr.reset"))},V.prototype.clear=function(L,C){var m;this.el.multiple?this.selectedIndexes.length&&(m=this.selectedIndexes.slice(),C?this.deselect(m.slice(-1)[0]):H.each(m,function(A,S){this.deselect(S)},this)):-1<this.selectedIndex&&this.deselect(this.selectedIndex,L),this.emit("selectr.clear")},V.prototype.serialise=function(L){var C=[];return H.each(this.options,function(m,A){var S={value:A.value,text:A.textContent};A.selected&&(S.selected=!0),A.disabled&&(S.disabled=!0),C[m]=S}),L?JSON.stringify(C):C},V.prototype.serialize=function(L){return this.serialise(L)},V.prototype.setPlaceholder=function(L){L=L||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(L=this.config.messages.noOptions),this.placeEl.innerHTML=L},V.prototype.paginate=function(){var L;if(this.items.length)return(L=this).pages=this.items.map(function(C,m){return m%L.config.pagination==0?L.items.slice(m,m+L.config.pagination):null}).filter(function(C){return C}),this.pages},V.prototype.setMessage=function(L,C){C&&this.close(),H.addClass(this.container,"notice"),this.notice.textContent=L},V.prototype.removeMessage=function(){H.removeClass(this.container,"notice"),this.notice.innerHTML=""},V.prototype.invert=function(){var L=H.rect(this.selected),C=this.tree.parentNode.offsetHeight,m=window.innerHeight;L.top+L.height+C>m?(H.addClass(this.container,"inverted"),this.isInverted=!0):(H.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=H.rect(this.tree)},V.prototype.getOptionByIndex=function(L){return this.options[L]},V.prototype.getOptionByValue=function(L){for(var C=!1,m=0,A=this.options.length;m<A;m++)if(this.options[m].value.trim()===L.toString().trim()){C=this.options[m];break}return C},ie.exports=V},4188:function(ie,g,H){H.d(g,{EX:function(){return x},WF:function(){return N},oW:function(){return O},qD:function(){return X}});var X=document.body,x=10485760,N=2e4,O=2147483648},2602:function(ie,g,H){H.d(g,{w:function(){return x}});var X=H(9791);function x(N,O,D){var P,V=3<arguments.length&&arguments[3]!==void 0&&arguments[3],L=typeof(m=N).getRootNode=="function"?m.getRootNode():window,C={},m=N.getBoundingClientRect(),A=O.getBoundingClientRect(),S=document.createElement("div");function p(){if(S&&S.parentNode){for(var s in S.parentNode.removeChild(S),C)n=s,Object.prototype.hasOwnProperty.call(C,n)&&((n=C[s])&&(0,X.removeEventListener)(L,s,n),delete C[s]);typeof D=="function"&&D(N)}var n}function c(s){(s=s.target)===S||(0,X.isChildOf)(s,S)||p()}return S.className="jsoneditor-anchor",S.style.position="absolute",S.style.left=m.left-A.left+"px",S.style.top=m.top-A.top+"px",S.style.width=m.width-2+"px",S.style.height=m.height-2+"px",S.style.boxSizing="border-box",O.appendChild(S),C.mousedown=(0,X.addEventListener)(L,"mousedown",c),C.mousewheel=(0,X.addEventListener)(L,"mousewheel",c),V&&(P=null,S.onmouseover=function(){clearTimeout(P),P=null},S.onmouseout=function(){P=P||setTimeout(p,200)}),S.destroy=p,S}},7923:function(ie){ie.exports="data:application/javascript;base64,Im5vIHVzZSBzdHJpY3QiOwohKGZ1bmN0aW9uKHdpbmRvdykgewppZiAodHlwZW9mIHdpbmRvdy53aW5kb3cgIT0gInVuZGVmaW5lZCIgJiYgd2luZG93LmRvY3VtZW50KQogICAgcmV0dXJuOwppZiAod2luZG93LnJlcXVpcmUgJiYgd2luZG93LmRlZmluZSkKICAgIHJldHVybjsKCmlmICghd2luZG93LmNvbnNvbGUpIHsKICAgIHdpbmRvdy5jb25zb2xlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG1zZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApOwogICAgICAgIHBvc3RNZXNzYWdlKHt0eXBlOiAibG9nIiwgZGF0YTogbXNnc30pOwogICAgfTsKICAgIHdpbmRvdy5jb25zb2xlLmVycm9yID0KICAgIHdpbmRvdy5jb25zb2xlLndhcm4gPSAKICAgIHdpbmRvdy5jb25zb2xlLmxvZyA9CiAgICB3aW5kb3cuY29uc29sZS50cmFjZSA9IHdpbmRvdy5jb25zb2xlOwp9CndpbmRvdy53aW5kb3cgPSB3aW5kb3c7CndpbmRvdy5hY2UgPSB3aW5kb3c7Cgp3aW5kb3cub25lcnJvciA9IGZ1bmN0aW9uKG1lc3NhZ2UsIGZpbGUsIGxpbmUsIGNvbCwgZXJyKSB7CiAgICBwb3N0TWVzc2FnZSh7dHlwZTogImVycm9yIiwgZGF0YTogewogICAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsCiAgICAgICAgZGF0YTogZXJyICYmIGVyci5kYXRhLAogICAgICAgIGZpbGU6IGZpbGUsCiAgICAgICAgbGluZTogbGluZSwgCiAgICAgICAgY29sOiBjb2wsCiAgICAgICAgc3RhY2s6IGVyciAmJiBlcnIuc3RhY2sKICAgIH19KTsKfTsKCndpbmRvdy5ub3JtYWxpemVNb2R1bGUgPSBmdW5jdGlvbihwYXJlbnRJZCwgbW9kdWxlTmFtZSkgewogICAgLy8gbm9ybWFsaXplIHBsdWdpbiByZXF1aXJlcwogICAgaWYgKG1vZHVsZU5hbWUuaW5kZXhPZigiISIpICE9PSAtMSkgewogICAgICAgIHZhciBjaHVua3MgPSBtb2R1bGVOYW1lLnNwbGl0KCIhIik7CiAgICAgICAgcmV0dXJuIHdpbmRvdy5ub3JtYWxpemVNb2R1bGUocGFyZW50SWQsIGNodW5rc1swXSkgKyAiISIgKyB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBjaHVua3NbMV0pOwogICAgfQogICAgLy8gbm9ybWFsaXplIHJlbGF0aXZlIHJlcXVpcmVzCiAgICBpZiAobW9kdWxlTmFtZS5jaGFyQXQoMCkgPT0gIi4iKSB7CiAgICAgICAgdmFyIGJhc2UgPSBwYXJlbnRJZC5zcGxpdCgiLyIpLnNsaWNlKDAsIC0xKS5qb2luKCIvIik7CiAgICAgICAgbW9kdWxlTmFtZSA9IChiYXNlID8gYmFzZSArICIvIiA6ICIiKSArIG1vZHVsZU5hbWU7CiAgICAgICAgCiAgICAgICAgd2hpbGUgKG1vZHVsZU5hbWUuaW5kZXhPZigiLiIpICE9PSAtMSAmJiBwcmV2aW91cyAhPSBtb2R1bGVOYW1lKSB7CiAgICAgICAgICAgIHZhciBwcmV2aW91cyA9IG1vZHVsZU5hbWU7CiAgICAgICAgICAgIG1vZHVsZU5hbWUgPSBtb2R1bGVOYW1lLnJlcGxhY2UoL15cLlwvLywgIiIpLnJlcGxhY2UoL1wvXC5cLy8sICIvIikucmVwbGFjZSgvW15cL10rXC9cLlwuXC8vLCAiIik7CiAgICAgICAgfQogICAgfQogICAgCiAgICByZXR1cm4gbW9kdWxlTmFtZTsKfTsKCndpbmRvdy5yZXF1aXJlID0gZnVuY3Rpb24gcmVxdWlyZShwYXJlbnRJZCwgaWQpIHsKICAgIGlmICghaWQpIHsKICAgICAgICBpZCA9IHBhcmVudElkOwogICAgICAgIHBhcmVudElkID0gbnVsbDsKICAgIH0KICAgIGlmICghaWQuY2hhckF0KQogICAgICAgIHRocm93IG5ldyBFcnJvcigid29ya2VyLmpzIHJlcXVpcmUoKSBhY2NlcHRzIG9ubHkgKHBhcmVudElkLCBpZCkgYXMgYXJndW1lbnRzIik7CgogICAgaWQgPSB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBpZCk7CgogICAgdmFyIG1vZHVsZSA9IHdpbmRvdy5yZXF1aXJlLm1vZHVsZXNbaWRdOwogICAgaWYgKG1vZHVsZSkgewogICAgICAgIGlmICghbW9kdWxlLmluaXRpYWxpemVkKSB7CiAgICAgICAgICAgIG1vZHVsZS5pbml0aWFsaXplZCA9IHRydWU7CiAgICAgICAgICAgIG1vZHVsZS5leHBvcnRzID0gbW9kdWxlLmZhY3RvcnkoKS5leHBvcnRzOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbW9kdWxlLmV4cG9ydHM7CiAgICB9CiAgIAogICAgaWYgKCF3aW5kb3cucmVxdWlyZS50bG5zKQogICAgICAgIHJldHVybiBjb25zb2xlLmxvZygidW5hYmxlIHRvIGxvYWQgIiArIGlkKTsKICAgIAogICAgdmFyIHBhdGggPSByZXNvbHZlTW9kdWxlSWQoaWQsIHdpbmRvdy5yZXF1aXJlLnRsbnMpOwogICAgaWYgKHBhdGguc2xpY2UoLTMpICE9ICIuanMiKSBwYXRoICs9ICIuanMiOwogICAgCiAgICB3aW5kb3cucmVxdWlyZS5pZCA9IGlkOwogICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7fTsgLy8gcHJldmVudCBpbmZpbml0ZSBsb29wIG9uIGJyb2tlbiBtb2R1bGVzCiAgICBpbXBvcnRTY3JpcHRzKHBhdGgpOwogICAgcmV0dXJuIHdpbmRvdy5yZXF1aXJlKHBhcmVudElkLCBpZCk7Cn07CmZ1bmN0aW9uIHJlc29sdmVNb2R1bGVJZChpZCwgcGF0aHMpIHsKICAgIHZhciB0ZXN0UGF0aCA9IGlkLCB0YWlsID0gIiI7CiAgICB3aGlsZSAodGVzdFBhdGgpIHsKICAgICAgICB2YXIgYWxpYXMgPSBwYXRoc1t0ZXN0UGF0aF07CiAgICAgICAgaWYgKHR5cGVvZiBhbGlhcyA9PSAic3RyaW5nIikgewogICAgICAgICAgICByZXR1cm4gYWxpYXMgKyB0YWlsOwogICAgICAgIH0gZWxzZSBpZiAoYWxpYXMpIHsKICAgICAgICAgICAgcmV0dXJuICBhbGlhcy5sb2NhdGlvbi5yZXBsYWNlKC9cLyokLywgIi8iKSArICh0YWlsIHx8IGFsaWFzLm1haW4gfHwgYWxpYXMubmFtZSk7CiAgICAgICAgfSBlbHNlIGlmIChhbGlhcyA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KICAgICAgICB2YXIgaSA9IHRlc3RQYXRoLmxhc3RJbmRleE9mKCIvIik7CiAgICAgICAgaWYgKGkgPT09IC0xKSBicmVhazsKICAgICAgICB0YWlsID0gdGVzdFBhdGguc3Vic3RyKGkpICsgdGFpbDsKICAgICAgICB0ZXN0UGF0aCA9IHRlc3RQYXRoLnNsaWNlKDAsIGkpOwogICAgfQogICAgcmV0dXJuIGlkOwp9CndpbmRvdy5yZXF1aXJlLm1vZHVsZXMgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9OwoKd2luZG93LmRlZmluZSA9IGZ1bmN0aW9uKGlkLCBkZXBzLCBmYWN0b3J5KSB7CiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAyKSB7CiAgICAgICAgZmFjdG9yeSA9IGRlcHM7CiAgICAgICAgaWYgKHR5cGVvZiBpZCAhPSAic3RyaW5nIikgewogICAgICAgICAgICBkZXBzID0gaWQ7CiAgICAgICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICAgICAgfQogICAgfSBlbHNlIGlmIChhcmd1bWVudHMubGVuZ3RoID09IDEpIHsKICAgICAgICBmYWN0b3J5ID0gaWQ7CiAgICAgICAgZGVwcyA9IFtdOwogICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICB9CiAgICAKICAgIGlmICh0eXBlb2YgZmFjdG9yeSAhPSAiZnVuY3Rpb24iKSB7CiAgICAgICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7CiAgICAgICAgICAgIGV4cG9ydHM6IGZhY3RvcnksCiAgICAgICAgICAgIGluaXRpYWxpemVkOiB0cnVlCiAgICAgICAgfTsKICAgICAgICByZXR1cm47CiAgICB9CgogICAgaWYgKCFkZXBzLmxlbmd0aCkKICAgICAgICAvLyBJZiB0aGVyZSBpcyBubyBkZXBlbmRlbmNpZXMsIHdlIGluamVjdCAicmVxdWlyZSIsICJleHBvcnRzIiBhbmQKICAgICAgICAvLyAibW9kdWxlIiBhcyBkZXBlbmRlbmNpZXMsIHRvIHByb3ZpZGUgQ29tbW9uSlMgY29tcGF0aWJpbGl0eS4KICAgICAgICBkZXBzID0gWyJyZXF1aXJlIiwgImV4cG9ydHMiLCAibW9kdWxlIl07CgogICAgdmFyIHJlcSA9IGZ1bmN0aW9uKGNoaWxkSWQpIHsKICAgICAgICByZXR1cm4gd2luZG93LnJlcXVpcmUoaWQsIGNoaWxkSWQpOwogICAgfTsKCiAgICB3aW5kb3cucmVxdWlyZS5tb2R1bGVzW2lkXSA9IHsKICAgICAgICBleHBvcnRzOiB7fSwKICAgICAgICBmYWN0b3J5OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdmFyIG1vZHVsZSA9IHRoaXM7CiAgICAgICAgICAgIHZhciByZXR1cm5FeHBvcnRzID0gZmFjdG9yeS5hcHBseSh0aGlzLCBkZXBzLnNsaWNlKDAsIGZhY3RvcnkubGVuZ3RoKS5tYXAoZnVuY3Rpb24oZGVwKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKGRlcCkgewogICAgICAgICAgICAgICAgICAgIC8vIEJlY2F1c2UgInJlcXVpcmUiLCAiZXhwb3J0cyIgYW5kICJtb2R1bGUiIGFyZW4ndCBhY3R1YWwKICAgICAgICAgICAgICAgICAgICAvLyBkZXBlbmRlbmNpZXMsIHdlIG11c3QgaGFuZGxlIHRoZW0gc2VwZXJhdGVseS4KICAgICAgICAgICAgICAgICAgICBjYXNlICJyZXF1aXJlIjogcmV0dXJuIHJlcTsKICAgICAgICAgICAgICAgICAgICBjYXNlICJleHBvcnRzIjogcmV0dXJuIG1vZHVsZS5leHBvcnRzOwogICAgICAgICAgICAgICAgICAgIGNhc2UgIm1vZHVsZSI6ICByZXR1cm4gbW9kdWxlOwogICAgICAgICAgICAgICAgICAgIC8vIEJ1dCBmb3IgYWxsIG90aGVyIGRlcGVuZGVuY2llcywgd2UgY2FuIGp1c3QgZ28gYWhlYWQgYW5kCiAgICAgICAgICAgICAgICAgICAgLy8gcmVxdWlyZSB0aGVtLgogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICAgICAgICByZXR1cm4gcmVxKGRlcCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgaWYgKHJldHVybkV4cG9ydHMpCiAgICAgICAgICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IHJldHVybkV4cG9ydHM7CiAgICAgICAgICAgIHJldHVybiBtb2R1bGU7CiAgICAgICAgfQogICAgfTsKfTsKd2luZG93LmRlZmluZS5hbWQgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9Owp3aW5kb3cuaW5pdEJhc2VVcmxzICA9IGZ1bmN0aW9uIGluaXRCYXNlVXJscyh0b3BMZXZlbE5hbWVzcGFjZXMpIHsKICAgIGZvciAodmFyIGkgaW4gdG9wTGV2ZWxOYW1lc3BhY2VzKQogICAgICAgIHRoaXMucmVxdWlyZS50bG5zW2ldID0gdG9wTGV2ZWxOYW1lc3BhY2VzW2ldOwp9OwoKd2luZG93LmluaXRTZW5kZXIgPSBmdW5jdGlvbiBpbml0U2VuZGVyKCkgewoKICAgIHZhciBFdmVudEVtaXR0ZXIgPSB3aW5kb3cucmVxdWlyZSgiYWNlL2xpYi9ldmVudF9lbWl0dGVyIikuRXZlbnRFbWl0dGVyOwogICAgdmFyIG9vcCA9IHdpbmRvdy5yZXF1aXJlKCJhY2UvbGliL29vcCIpOwogICAgCiAgICB2YXIgU2VuZGVyID0gZnVuY3Rpb24oKSB7fTsKICAgIAogICAgKGZ1bmN0aW9uKCkgewogICAgICAgIAogICAgICAgIG9vcC5pbXBsZW1lbnQodGhpcywgRXZlbnRFbWl0dGVyKTsKICAgICAgICAgICAgICAgIAogICAgICAgIHRoaXMuY2FsbGJhY2sgPSBmdW5jdGlvbihkYXRhLCBjYWxsYmFja0lkKSB7CiAgICAgICAgICAgIHBvc3RNZXNzYWdlKHsKICAgICAgICAgICAgICAgIHR5cGU6ICJjYWxsIiwKICAgICAgICAgICAgICAgIGlkOiBjYWxsYmFja0lkLAogICAgICAgICAgICAgICAgZGF0YTogZGF0YQogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgCiAgICAgICAgdGhpcy5lbWl0ID0gZnVuY3Rpb24obmFtZSwgZGF0YSkgewogICAgICAgICAgICBwb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICB0eXBlOiAiZXZlbnQiLAogICAgICAgICAgICAgICAgbmFtZTogbmFtZSwKICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICAKICAgIH0pLmNhbGwoU2VuZGVyLnByb3RvdHlwZSk7CiAgICAKICAgIHJldHVybiBuZXcgU2VuZGVyKCk7Cn07Cgp2YXIgbWFpbiA9IHdpbmRvdy5tYWluID0gbnVsbDsKdmFyIHNlbmRlciA9IHdpbmRvdy5zZW5kZXIgPSBudWxsOwoKd2luZG93Lm9ubWVzc2FnZSA9IGZ1bmN0aW9uKGUpIHsKICAgIHZhciBtc2cgPSBlLmRhdGE7CiAgICBpZiAobXNnLmV2ZW50ICYmIHNlbmRlcikgewogICAgICAgIHNlbmRlci5fc2lnbmFsKG1zZy5ldmVudCwgbXNnLmRhdGEpOwogICAgfQogICAgZWxzZSBpZiAobXNnLmNvbW1hbmQpIHsKICAgICAgICBpZiAobWFpblttc2cuY29tbWFuZF0pCiAgICAgICAgICAgIG1haW5bbXNnLmNvbW1hbmRdLmFwcGx5KG1haW4sIG1zZy5hcmdzKTsKICAgICAgICBlbHNlIGlmICh3aW5kb3dbbXNnLmNvbW1hbmRdKQogICAgICAgICAgICB3aW5kb3dbbXNnLmNvbW1hbmRdLmFwcGx5KHdpbmRvdywgbXNnLmFyZ3MpOwogICAgICAgIGVsc2UKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJVbmtub3duIGNvbW1hbmQ6IiArIG1zZy5jb21tYW5kKTsKICAgIH0KICAgIGVsc2UgaWYgKG1zZy5pbml0KSB7CiAgICAgICAgd2luZG93LmluaXRCYXNlVXJscyhtc2cudGxucyk7CiAgICAgICAgc2VuZGVyID0gd2luZG93LnNlbmRlciA9IHdpbmRvdy5pbml0U2VuZGVyKCk7CiAgICAgICAgdmFyIGNsYXp6ID0gdGhpcy5yZXF1aXJlKG1zZy5tb2R1bGUpW21zZy5jbGFzc25hbWVdOwogICAgICAgIG1haW4gPSB3aW5kb3cubWFpbiA9IG5ldyBjbGF6eihzZW5kZXIpOwogICAgfQp9Owp9KSh0aGlzKTsKCmFjZS5kZWZpbmUoImFjZS9saWIvb29wIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CmV4cG9ydHMuaW5oZXJpdHMgPSBmdW5jdGlvbiAoY3Rvciwgc3VwZXJDdG9yKSB7CiAgICBjdG9yLnN1cGVyXyA9IHN1cGVyQ3RvcjsKICAgIGN0b3IucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShzdXBlckN0b3IucHJvdG90eXBlLCB7CiAgICAgICAgY29uc3RydWN0b3I6IHsKICAgICAgICAgICAgdmFsdWU6IGN0b3IsCiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLAogICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSwKICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgfQogICAgfSk7Cn07CmV4cG9ydHMubWl4aW4gPSBmdW5jdGlvbiAob2JqLCBtaXhpbikgewogICAgZm9yICh2YXIga2V5IGluIG1peGluKSB7CiAgICAgICAgb2JqW2tleV0gPSBtaXhpbltrZXldOwogICAgfQogICAgcmV0dXJuIG9iajsKfTsKZXhwb3J0cy5pbXBsZW1lbnQgPSBmdW5jdGlvbiAocHJvdG8sIG1peGluKSB7CiAgICBleHBvcnRzLm1peGluKHByb3RvLCBtaXhpbik7Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9hcHBseV9kZWx0YSIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwpmdW5jdGlvbiB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsIGVycm9yVGV4dCkgewogICAgY29uc29sZS5sb2coIkludmFsaWQgRGVsdGE6IiwgZGVsdGEpOwogICAgdGhyb3cgIkludmFsaWQgRGVsdGE6ICIgKyBlcnJvclRleHQ7Cn0KZnVuY3Rpb24gcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBwb3NpdGlvbikgewogICAgcmV0dXJuIHBvc2l0aW9uLnJvdyA+PSAwICYmIHBvc2l0aW9uLnJvdyA8IGRvY0xpbmVzLmxlbmd0aCAmJgogICAgICAgIHBvc2l0aW9uLmNvbHVtbiA+PSAwICYmIHBvc2l0aW9uLmNvbHVtbiA8PSBkb2NMaW5lc1twb3NpdGlvbi5yb3ddLmxlbmd0aDsKfQpmdW5jdGlvbiB2YWxpZGF0ZURlbHRhKGRvY0xpbmVzLCBkZWx0YSkgewogICAgaWYgKGRlbHRhLmFjdGlvbiAhPSAiaW5zZXJ0IiAmJiBkZWx0YS5hY3Rpb24gIT0gInJlbW92ZSIpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuYWN0aW9uIG11c3QgYmUgJ2luc2VydCcgb3IgJ3JlbW92ZSciKTsKICAgIGlmICghKGRlbHRhLmxpbmVzIGluc3RhbmNlb2YgQXJyYXkpKQogICAgICAgIHRocm93RGVsdGFFcnJvcihkZWx0YSwgImRlbHRhLmxpbmVzIG11c3QgYmUgYW4gQXJyYXkiKTsKICAgIGlmICghZGVsdGEuc3RhcnQgfHwgIWRlbHRhLmVuZCkKICAgICAgICB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsICJkZWx0YS5zdGFydC9lbmQgbXVzdCBiZSBhbiBwcmVzZW50Iik7CiAgICB2YXIgc3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIGlmICghcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBkZWx0YS5zdGFydCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuc3RhcnQgbXVzdCBiZSBjb250YWluZWQgaW4gZG9jdW1lbnQiKTsKICAgIHZhciBlbmQgPSBkZWx0YS5lbmQ7CiAgICBpZiAoZGVsdGEuYWN0aW9uID09ICJyZW1vdmUiICYmICFwb3NpdGlvbkluRG9jdW1lbnQoZG9jTGluZXMsIGVuZCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuZW5kIG11c3QgY29udGFpbmVkIGluIGRvY3VtZW50IGZvciAncmVtb3ZlJyBhY3Rpb25zIik7CiAgICB2YXIgbnVtUmFuZ2VSb3dzID0gZW5kLnJvdyAtIHN0YXJ0LnJvdzsKICAgIHZhciBudW1SYW5nZUxhc3RMaW5lQ2hhcnMgPSAoZW5kLmNvbHVtbiAtIChudW1SYW5nZVJvd3MgPT0gMCA/IHN0YXJ0LmNvbHVtbiA6IDApKTsKICAgIGlmIChudW1SYW5nZVJvd3MgIT0gZGVsdGEubGluZXMubGVuZ3RoIC0gMSB8fCBkZWx0YS5saW5lc1tudW1SYW5nZVJvd3NdLmxlbmd0aCAhPSBudW1SYW5nZUxhc3RMaW5lQ2hhcnMpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEucmFuZ2UgbXVzdCBtYXRjaCBkZWx0YSBsaW5lcyIpOwp9CmV4cG9ydHMuYXBwbHlEZWx0YSA9IGZ1bmN0aW9uIChkb2NMaW5lcywgZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7CiAgICB2YXIgc3RhcnRDb2x1bW4gPSBkZWx0YS5zdGFydC5jb2x1bW47CiAgICB2YXIgbGluZSA9IGRvY0xpbmVzW3Jvd10gfHwgIiI7CiAgICBzd2l0Y2ggKGRlbHRhLmFjdGlvbikgewogICAgICAgIGNhc2UgImluc2VydCI6CiAgICAgICAgICAgIHZhciBsaW5lcyA9IGRlbHRhLmxpbmVzOwogICAgICAgICAgICBpZiAobGluZXMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3ddID0gbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZGVsdGEubGluZXNbMF0gKyBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IFtyb3csIDFdLmNvbmNhdChkZWx0YS5saW5lcyk7CiAgICAgICAgICAgICAgICBkb2NMaW5lcy5zcGxpY2UuYXBwbHkoZG9jTGluZXMsIGFyZ3MpOwogICAgICAgICAgICAgICAgZG9jTGluZXNbcm93XSA9IGxpbmUuc3Vic3RyaW5nKDAsIHN0YXJ0Q29sdW1uKSArIGRvY0xpbmVzW3Jvd107CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3cgKyBkZWx0YS5saW5lcy5sZW5ndGggLSAxXSArPSBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAicmVtb3ZlIjoKICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IGRlbHRhLmVuZC5jb2x1bW47CiAgICAgICAgICAgIHZhciBlbmRSb3cgPSBkZWx0YS5lbmQucm93OwogICAgICAgICAgICBpZiAocm93ID09PSBlbmRSb3cpIHsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBsaW5lLnN1YnN0cmluZyhlbmRDb2x1bW4pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZG9jTGluZXMuc3BsaWNlKHJvdywgZW5kUm93IC0gcm93ICsgMSwgbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbZW5kUm93XS5zdWJzdHJpbmcoZW5kQ29sdW1uKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICB9Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9saWIvZXZlbnRfZW1pdHRlciIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwp2YXIgRXZlbnRFbWl0dGVyID0ge307CnZhciBzdG9wUHJvcGFnYXRpb24gPSBmdW5jdGlvbiAoKSB7IHRoaXMucHJvcGFnYXRpb25TdG9wcGVkID0gdHJ1ZTsgfTsKdmFyIHByZXZlbnREZWZhdWx0ID0gZnVuY3Rpb24gKCkgeyB0aGlzLmRlZmF1bHRQcmV2ZW50ZWQgPSB0cnVlOyB9OwpFdmVudEVtaXR0ZXIuX2VtaXQgPQogICAgRXZlbnRFbWl0dGVyLl9kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50TmFtZSwgZSkgewogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwgKHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB7fSk7CiAgICAgICAgdGhpcy5fZGVmYXVsdEhhbmRsZXJzIHx8ICh0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB7fSk7CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXSB8fCBbXTsKICAgICAgICB2YXIgZGVmYXVsdEhhbmRsZXIgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycy5sZW5ndGggJiYgIWRlZmF1bHRIYW5kbGVyKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKHR5cGVvZiBlICE9ICJvYmplY3QiIHx8ICFlKQogICAgICAgICAgICBlID0ge307CiAgICAgICAgaWYgKCFlLnR5cGUpCiAgICAgICAgICAgIGUudHlwZSA9IGV2ZW50TmFtZTsKICAgICAgICBpZiAoIWUuc3RvcFByb3BhZ2F0aW9uKQogICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbiA9IHN0b3BQcm9wYWdhdGlvbjsKICAgICAgICBpZiAoIWUucHJldmVudERlZmF1bHQpCiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQgPSBwcmV2ZW50RGVmYXVsdDsKICAgICAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3RlbmVycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBsaXN0ZW5lcnNbaV0oZSwgdGhpcyk7CiAgICAgICAgICAgIGlmIChlLnByb3BhZ2F0aW9uU3RvcHBlZCkKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBpZiAoZGVmYXVsdEhhbmRsZXIgJiYgIWUuZGVmYXVsdFByZXZlbnRlZCkKICAgICAgICAgICAgcmV0dXJuIGRlZmF1bHRIYW5kbGVyKGUsIHRoaXMpOwogICAgfTsKRXZlbnRFbWl0dGVyLl9zaWduYWwgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBlKSB7CiAgICB2YXIgbGlzdGVuZXJzID0gKHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge30pW2V2ZW50TmFtZV07CiAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICByZXR1cm47CiAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdGVuZXJzLmxlbmd0aDsgaSsrKQogICAgICAgIGxpc3RlbmVyc1tpXShlLCB0aGlzKTsKfTsKRXZlbnRFbWl0dGVyLm9uY2UgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIF9zZWxmID0gdGhpczsKICAgIHRoaXMub24oZXZlbnROYW1lLCBmdW5jdGlvbiBuZXdDYWxsYmFjaygpIHsKICAgICAgICBfc2VsZi5vZmYoZXZlbnROYW1lLCBuZXdDYWxsYmFjayk7CiAgICAgICAgY2FsbGJhY2suYXBwbHkobnVsbCwgYXJndW1lbnRzKTsKICAgIH0pOwogICAgaWYgKCFjYWxsYmFjaykgewogICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSkgewogICAgICAgICAgICBjYWxsYmFjayA9IHJlc29sdmU7CiAgICAgICAgfSk7CiAgICB9Cn07CkV2ZW50RW1pdHRlci5zZXREZWZhdWx0SGFuZGxlciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICB2YXIgaGFuZGxlcnMgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnM7CiAgICBpZiAoIWhhbmRsZXJzKQogICAgICAgIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzID0geyBfZGlzYWJsZWRfOiB7fSB9OwogICAgaWYgKGhhbmRsZXJzW2V2ZW50TmFtZV0pIHsKICAgICAgICB2YXIgb2xkID0gaGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICAgICAgaWYgKCFkaXNhYmxlZCkKICAgICAgICAgICAgaGFuZGxlcnMuX2Rpc2FibGVkX1tldmVudE5hbWVdID0gZGlzYWJsZWQgPSBbXTsKICAgICAgICBkaXNhYmxlZC5wdXNoKG9sZCk7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQogICAgaGFuZGxlcnNbZXZlbnROYW1lXSA9IGNhbGxiYWNrOwp9OwpFdmVudEVtaXR0ZXIucmVtb3ZlRGVmYXVsdEhhbmRsZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzOwogICAgaWYgKCFoYW5kbGVycykKICAgICAgICByZXR1cm47CiAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICBpZiAoaGFuZGxlcnNbZXZlbnROYW1lXSA9PSBjYWxsYmFjaykgewogICAgICAgIGlmIChkaXNhYmxlZCkKICAgICAgICAgICAgdGhpcy5zZXREZWZhdWx0SGFuZGxlcihldmVudE5hbWUsIGRpc2FibGVkLnBvcCgpKTsKICAgIH0KICAgIGVsc2UgaWYgKGRpc2FibGVkKSB7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQp9OwpFdmVudEVtaXR0ZXIub24gPQogICAgRXZlbnRFbWl0dGVyLmFkZEV2ZW50TGlzdGVuZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaywgY2FwdHVyaW5nKSB7CiAgICAgICAgdGhpcy5fZXZlbnRSZWdpc3RyeSA9IHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge307CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdID0gW107CiAgICAgICAgaWYgKGxpc3RlbmVycy5pbmRleE9mKGNhbGxiYWNrKSA9PSAtMSkKICAgICAgICAgICAgbGlzdGVuZXJzW2NhcHR1cmluZyA/ICJ1bnNoaWZ0IiA6ICJwdXNoIl0oY2FsbGJhY2spOwogICAgICAgIHJldHVybiBjYWxsYmFjazsKICAgIH07CkV2ZW50RW1pdHRlci5vZmYgPQogICAgRXZlbnRFbWl0dGVyLnJlbW92ZUxpc3RlbmVyID0KICAgICAgICBFdmVudEVtaXR0ZXIucmVtb3ZlRXZlbnRMaXN0ZW5lciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5IHx8IHt9OwogICAgICAgICAgICB2YXIgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdOwogICAgICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdmFyIGluZGV4ID0gbGlzdGVuZXJzLmluZGV4T2YoY2FsbGJhY2spOwogICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xKQogICAgICAgICAgICAgICAgbGlzdGVuZXJzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgfTsKRXZlbnRFbWl0dGVyLnJlbW92ZUFsbExpc3RlbmVycyA9IGZ1bmN0aW9uIChldmVudE5hbWUpIHsKICAgIGlmICghZXZlbnROYW1lKQogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZXZlbnRSZWdpc3RyeSkKICAgICAgICB0aGlzLl9ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZGVmYXVsdEhhbmRsZXJzKQogICAgICAgIHRoaXMuX2RlZmF1bHRIYW5kbGVyc1tldmVudE5hbWVdID0gdW5kZWZpbmVkOwp9OwpleHBvcnRzLkV2ZW50RW1pdHRlciA9IEV2ZW50RW1pdHRlcjsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL3JhbmdlIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBjb21wYXJlUG9pbnRzID0gZnVuY3Rpb24gKHAxLCBwMikgewogICAgcmV0dXJuIHAxLnJvdyAtIHAyLnJvdyB8fCBwMS5jb2x1bW4gLSBwMi5jb2x1bW47Cn07CnZhciBSYW5nZSA9IGZ1bmN0aW9uIChzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgZW5kQ29sdW1uKSB7CiAgICB0aGlzLnN0YXJ0ID0gewogICAgICAgIHJvdzogc3RhcnRSb3csCiAgICAgICAgY29sdW1uOiBzdGFydENvbHVtbgogICAgfTsKICAgIHRoaXMuZW5kID0gewogICAgICAgIHJvdzogZW5kUm93LAogICAgICAgIGNvbHVtbjogZW5kQ29sdW1uCiAgICB9Owp9OwooZnVuY3Rpb24gKCkgewogICAgdGhpcy5pc0VxdWFsID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuc3RhcnQucm93ID09PSByYW5nZS5zdGFydC5yb3cgJiYKICAgICAgICAgICAgdGhpcy5lbmQucm93ID09PSByYW5nZS5lbmQucm93ICYmCiAgICAgICAgICAgIHRoaXMuc3RhcnQuY29sdW1uID09PSByYW5nZS5zdGFydC5jb2x1bW4gJiYKICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uID09PSByYW5nZS5lbmQuY29sdW1uOwogICAgfTsKICAgIHRoaXMudG9TdHJpbmcgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuICgiUmFuZ2U6IFsiICsgdGhpcy5zdGFydC5yb3cgKyAiLyIgKyB0aGlzLnN0YXJ0LmNvbHVtbiArCiAgICAgICAgICAgICJdIC0+IFsiICsgdGhpcy5lbmQucm93ICsgIi8iICsgdGhpcy5lbmQuY29sdW1uICsgIl0iKTsKICAgIH07CiAgICB0aGlzLmNvbnRhaW5zID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMDsKICAgIH07CiAgICB0aGlzLmNvbXBhcmVSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAsIGVuZCA9IHJhbmdlLmVuZCwgc3RhcnQgPSByYW5nZS5zdGFydDsKICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoZW5kLnJvdywgZW5kLmNvbHVtbik7CiAgICAgICAgaWYgKGNtcCA9PSAxKSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoY21wID09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKSB7CiAgICAgICAgICAgIHJldHVybiAtMjsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDQyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jb21wYXJlUG9pbnQgPSBmdW5jdGlvbiAocCkgewogICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocC5yb3csIHAuY29sdW1uKTsKICAgIH07CiAgICB0aGlzLmNvbnRhaW5zUmFuZ2UgPSBmdW5jdGlvbiAocmFuZ2UpIHsKICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlUG9pbnQocmFuZ2Uuc3RhcnQpID09IDAgJiYgdGhpcy5jb21wYXJlUG9pbnQocmFuZ2UuZW5kKSA9PSAwOwogICAgfTsKICAgIHRoaXMuaW50ZXJzZWN0cyA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmVSYW5nZShyYW5nZSk7CiAgICAgICAgcmV0dXJuIChjbXAgPT0gLTEgfHwgY21wID09IDAgfHwgY21wID09IDEpOwogICAgfTsKICAgIHRoaXMuaXNFbmQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4gdGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uOwogICAgfTsKICAgIHRoaXMuaXNTdGFydCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uOwogICAgfTsKICAgIHRoaXMuc2V0U3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93LnJvdzsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93OwogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5zZXRFbmQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSByb3cuY29sdW1uOwogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPSByb3cucm93OwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgdGhpcy5lbmQucm93ID0gcm93OwogICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSBjb2x1bW47CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuaW5zaWRlID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMCkgewogICAgICAgICAgICBpZiAodGhpcy5pc0VuZChyb3csIGNvbHVtbikgfHwgdGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIHRoaXMuaW5zaWRlU3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzRW5kKHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIHRoaXMuaW5zaWRlRW5kID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMCkgewogICAgICAgICAgICBpZiAodGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIHRoaXMuY29tcGFyZSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICghdGhpcy5pc011bHRpTGluZSgpKSB7CiAgICAgICAgICAgIGlmIChyb3cgPT09IHRoaXMuc3RhcnQucm93KSB7CiAgICAgICAgICAgICAgICByZXR1cm4gY29sdW1uIDwgdGhpcy5zdGFydC5jb2x1bW4gPyAtMSA6IChjb2x1bW4gPiB0aGlzLmVuZC5jb2x1bW4gPyAxIDogMCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuc3RhcnQucm93KQogICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgaWYgKHJvdyA+IHRoaXMuZW5kLnJvdykKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09PSByb3cpCiAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPj0gdGhpcy5zdGFydC5jb2x1bW4gPyAwIDogLTE7CiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PT0gcm93KQogICAgICAgICAgICByZXR1cm4gY29sdW1uIDw9IHRoaXMuZW5kLmNvbHVtbiA/IDAgOiAxOwogICAgICAgIHJldHVybiAwOwogICAgfTsKICAgIHRoaXMuY29tcGFyZVN0YXJ0ID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuY29tcGFyZUVuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jb21wYXJlSW5zaWRlID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PSByb3cgJiYgdGhpcy5lbmQuY29sdW1uID09IGNvbHVtbikgewogICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAodGhpcy5zdGFydC5yb3cgPT0gcm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09IGNvbHVtbikgewogICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5jbGlwUm93cyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPiBsYXN0Um93KQogICAgICAgICAgICB2YXIgZW5kID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdykKICAgICAgICAgICAgdmFyIGVuZCA9IHsgcm93OiBmaXJzdFJvdywgY29sdW1uOiAwIH07CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID4gbGFzdFJvdykKICAgICAgICAgICAgdmFyIHN0YXJ0ID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA8IGZpcnN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7IHJvdzogZmlyc3RSb3csIGNvbHVtbjogMCB9OwogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHN0YXJ0IHx8IHRoaXMuc3RhcnQsIGVuZCB8fCB0aGlzLmVuZCk7CiAgICB9OwogICAgdGhpcy5leHRlbmQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICB2YXIgY21wID0gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTsKICAgICAgICBpZiAoY21wID09IDApCiAgICAgICAgICAgIHJldHVybiB0aGlzOwogICAgICAgIGVsc2UgaWYgKGNtcCA9PSAtMSkKICAgICAgICAgICAgdmFyIHN0YXJ0ID0geyByb3c6IHJvdywgY29sdW1uOiBjb2x1bW4gfTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHZhciBlbmQgPSB7IHJvdzogcm93LCBjb2x1bW46IGNvbHVtbiB9OwogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHN0YXJ0IHx8IHRoaXMuc3RhcnQsIGVuZCB8fCB0aGlzLmVuZCk7CiAgICB9OwogICAgdGhpcy5pc0VtcHR5ID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiAodGhpcy5zdGFydC5yb3cgPT09IHRoaXMuZW5kLnJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PT0gdGhpcy5lbmQuY29sdW1uKTsKICAgIH07CiAgICB0aGlzLmlzTXVsdGlMaW5lID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiAodGhpcy5zdGFydC5yb3cgIT09IHRoaXMuZW5kLnJvdyk7CiAgICB9OwogICAgdGhpcy5jbG9uZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyh0aGlzLnN0YXJ0LCB0aGlzLmVuZCk7CiAgICB9OwogICAgdGhpcy5jb2xsYXBzZVJvd3MgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgaWYgKHRoaXMuZW5kLmNvbHVtbiA9PSAwKQogICAgICAgICAgICByZXR1cm4gbmV3IFJhbmdlKHRoaXMuc3RhcnQucm93LCAwLCBNYXRoLm1heCh0aGlzLnN0YXJ0LnJvdywgdGhpcy5lbmQucm93IC0gMSksIDApOwogICAgICAgIGVsc2UKICAgICAgICAgICAgcmV0dXJuIG5ldyBSYW5nZSh0aGlzLnN0YXJ0LnJvdywgMCwgdGhpcy5lbmQucm93LCAwKTsKICAgIH07CiAgICB0aGlzLnRvU2NyZWVuUmFuZ2UgPSBmdW5jdGlvbiAoc2Vzc2lvbikgewogICAgICAgIHZhciBzY3JlZW5Qb3NTdGFydCA9IHNlc3Npb24uZG9jdW1lbnRUb1NjcmVlblBvc2l0aW9uKHRoaXMuc3RhcnQpOwogICAgICAgIHZhciBzY3JlZW5Qb3NFbmQgPSBzZXNzaW9uLmRvY3VtZW50VG9TY3JlZW5Qb3NpdGlvbih0aGlzLmVuZCk7CiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzY3JlZW5Qb3NTdGFydC5yb3csIHNjcmVlblBvc1N0YXJ0LmNvbHVtbiwgc2NyZWVuUG9zRW5kLnJvdywgc2NyZWVuUG9zRW5kLmNvbHVtbik7CiAgICB9OwogICAgdGhpcy5tb3ZlQnkgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICB0aGlzLnN0YXJ0LnJvdyArPSByb3c7CiAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gKz0gY29sdW1uOwogICAgICAgIHRoaXMuZW5kLnJvdyArPSByb3c7CiAgICAgICAgdGhpcy5lbmQuY29sdW1uICs9IGNvbHVtbjsKICAgIH07Cn0pLmNhbGwoUmFuZ2UucHJvdG90eXBlKTsKUmFuZ2UuZnJvbVBvaW50cyA9IGZ1bmN0aW9uIChzdGFydCwgZW5kKSB7CiAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uLCBlbmQucm93LCBlbmQuY29sdW1uKTsKfTsKUmFuZ2UuY29tcGFyZVBvaW50cyA9IGNvbXBhcmVQb2ludHM7ClJhbmdlLmNvbXBhcmVQb2ludHMgPSBmdW5jdGlvbiAocDEsIHAyKSB7CiAgICByZXR1cm4gcDEucm93IC0gcDIucm93IHx8IHAxLmNvbHVtbiAtIHAyLmNvbHVtbjsKfTsKZXhwb3J0cy5SYW5nZSA9IFJhbmdlOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvYW5jaG9yIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBvb3AgPSByZXF1aXJlKCIuL2xpYi9vb3AiKTsKdmFyIEV2ZW50RW1pdHRlciA9IHJlcXVpcmUoIi4vbGliL2V2ZW50X2VtaXR0ZXIiKS5FdmVudEVtaXR0ZXI7CnZhciBBbmNob3IgPSBleHBvcnRzLkFuY2hvciA9IGZ1bmN0aW9uIChkb2MsIHJvdywgY29sdW1uKSB7CiAgICB0aGlzLiRvbkNoYW5nZSA9IHRoaXMub25DaGFuZ2UuYmluZCh0aGlzKTsKICAgIHRoaXMuYXR0YWNoKGRvYyk7CiAgICBpZiAodHlwZW9mIGNvbHVtbiA9PSAidW5kZWZpbmVkIikKICAgICAgICB0aGlzLnNldFBvc2l0aW9uKHJvdy5yb3csIHJvdy5jb2x1bW4pOwogICAgZWxzZQogICAgICAgIHRoaXMuc2V0UG9zaXRpb24ocm93LCBjb2x1bW4pOwp9OwooZnVuY3Rpb24gKCkgewogICAgb29wLmltcGxlbWVudCh0aGlzLCBFdmVudEVtaXR0ZXIpOwogICAgdGhpcy5nZXRQb3NpdGlvbiA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGhpcy4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudCh0aGlzLnJvdywgdGhpcy5jb2x1bW4pOwogICAgfTsKICAgIHRoaXMuZ2V0RG9jdW1lbnQgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZG9jdW1lbnQ7CiAgICB9OwogICAgdGhpcy4kaW5zZXJ0UmlnaHQgPSBmYWxzZTsKICAgIHRoaXMub25DaGFuZ2UgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICBpZiAoZGVsdGEuc3RhcnQucm93ID09IGRlbHRhLmVuZC5yb3cgJiYgZGVsdGEuc3RhcnQucm93ICE9IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKGRlbHRhLnN0YXJ0LnJvdyA+IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIHBvaW50ID0gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHsgcm93OiB0aGlzLnJvdywgY29sdW1uOiB0aGlzLmNvbHVtbiB9LCB0aGlzLiRpbnNlcnRSaWdodCk7CiAgICAgICAgdGhpcy5zZXRQb3NpdGlvbihwb2ludC5yb3csIHBvaW50LmNvbHVtbiwgdHJ1ZSk7CiAgICB9OwogICAgZnVuY3Rpb24gJHBvaW50c0luT3JkZXIocG9pbnQxLCBwb2ludDIsIGVxdWFsUG9pbnRzSW5PcmRlcikgewogICAgICAgIHZhciBiQ29sSXNBZnRlciA9IGVxdWFsUG9pbnRzSW5PcmRlciA/IHBvaW50MS5jb2x1bW4gPD0gcG9pbnQyLmNvbHVtbiA6IHBvaW50MS5jb2x1bW4gPCBwb2ludDIuY29sdW1uOwogICAgICAgIHJldHVybiAocG9pbnQxLnJvdyA8IHBvaW50Mi5yb3cpIHx8IChwb2ludDEucm93ID09IHBvaW50Mi5yb3cgJiYgYkNvbElzQWZ0ZXIpOwogICAgfQogICAgZnVuY3Rpb24gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHBvaW50LCBtb3ZlSWZFcXVhbCkgewogICAgICAgIHZhciBkZWx0YUlzSW5zZXJ0ID0gZGVsdGEuYWN0aW9uID09ICJpbnNlcnQiOwogICAgICAgIHZhciBkZWx0YVJvd1NoaWZ0ID0gKGRlbHRhSXNJbnNlcnQgPyAxIDogLTEpICogKGRlbHRhLmVuZC5yb3cgLSBkZWx0YS5zdGFydC5yb3cpOwogICAgICAgIHZhciBkZWx0YUNvbFNoaWZ0ID0gKGRlbHRhSXNJbnNlcnQgPyAxIDogLTEpICogKGRlbHRhLmVuZC5jb2x1bW4gLSBkZWx0YS5zdGFydC5jb2x1bW4pOwogICAgICAgIHZhciBkZWx0YVN0YXJ0ID0gZGVsdGEuc3RhcnQ7CiAgICAgICAgdmFyIGRlbHRhRW5kID0gZGVsdGFJc0luc2VydCA/IGRlbHRhU3RhcnQgOiBkZWx0YS5lbmQ7IC8vIENvbGxhcHNlIGluc2VydCByYW5nZS4KICAgICAgICBpZiAoJHBvaW50c0luT3JkZXIocG9pbnQsIGRlbHRhU3RhcnQsIG1vdmVJZkVxdWFsKSkgewogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgcm93OiBwb2ludC5yb3csCiAgICAgICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbgogICAgICAgICAgICB9OwogICAgICAgIH0KICAgICAgICBpZiAoJHBvaW50c0luT3JkZXIoZGVsdGFFbmQsIHBvaW50LCAhbW92ZUlmRXF1YWwpKSB7CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICByb3c6IHBvaW50LnJvdyArIGRlbHRhUm93U2hpZnQsCiAgICAgICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbiArIChwb2ludC5yb3cgPT0gZGVsdGFFbmQucm93ID8gZGVsdGFDb2xTaGlmdCA6IDApCiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHJvdzogZGVsdGFTdGFydC5yb3csCiAgICAgICAgICAgIGNvbHVtbjogZGVsdGFTdGFydC5jb2x1bW4KICAgICAgICB9OwogICAgfQogICAgdGhpcy5zZXRQb3NpdGlvbiA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbiwgbm9DbGlwKSB7CiAgICAgICAgdmFyIHBvczsKICAgICAgICBpZiAobm9DbGlwKSB7CiAgICAgICAgICAgIHBvcyA9IHsKICAgICAgICAgICAgICAgIHJvdzogcm93LAogICAgICAgICAgICAgICAgY29sdW1uOiBjb2x1bW4KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBvcyA9IHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5yb3cgPT0gcG9zLnJvdyAmJiB0aGlzLmNvbHVtbiA9PSBwb3MuY29sdW1uKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIG9sZCA9IHsKICAgICAgICAgICAgcm93OiB0aGlzLnJvdywKICAgICAgICAgICAgY29sdW1uOiB0aGlzLmNvbHVtbgogICAgICAgIH07CiAgICAgICAgdGhpcy5yb3cgPSBwb3Mucm93OwogICAgICAgIHRoaXMuY29sdW1uID0gcG9zLmNvbHVtbjsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZSIsIHsKICAgICAgICAgICAgb2xkOiBvbGQsCiAgICAgICAgICAgIHZhbHVlOiBwb3MKICAgICAgICB9KTsKICAgIH07CiAgICB0aGlzLmRldGFjaCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9mZigiY2hhbmdlIiwgdGhpcy4kb25DaGFuZ2UpOwogICAgfTsKICAgIHRoaXMuYXR0YWNoID0gZnVuY3Rpb24gKGRvYykgewogICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2MgfHwgdGhpcy5kb2N1bWVudDsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9uKCJjaGFuZ2UiLCB0aGlzLiRvbkNoYW5nZSk7CiAgICB9OwogICAgdGhpcy4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBwb3MgPSB7fTsKICAgICAgICBpZiAocm93ID49IHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgcG9zLnJvdyA9IE1hdGgubWF4KDAsIHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA8IDApIHsKICAgICAgICAgICAgcG9zLnJvdyA9IDA7CiAgICAgICAgICAgIHBvcy5jb2x1bW4gPSAwOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcG9zLnJvdyA9IHJvdzsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IE1hdGgubWluKHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGgsIE1hdGgubWF4KDAsIGNvbHVtbikpOwogICAgICAgIH0KICAgICAgICBpZiAoY29sdW1uIDwgMCkKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IDA7CiAgICAgICAgcmV0dXJuIHBvczsKICAgIH07Cn0pLmNhbGwoQW5jaG9yLnByb3RvdHlwZSk7Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9kb2N1bWVudCIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwp2YXIgb29wID0gcmVxdWlyZSgiLi9saWIvb29wIik7CnZhciBhcHBseURlbHRhID0gcmVxdWlyZSgiLi9hcHBseV9kZWx0YSIpLmFwcGx5RGVsdGE7CnZhciBFdmVudEVtaXR0ZXIgPSByZXF1aXJlKCIuL2xpYi9ldmVudF9lbWl0dGVyIikuRXZlbnRFbWl0dGVyOwp2YXIgUmFuZ2UgPSByZXF1aXJlKCIuL3JhbmdlIikuUmFuZ2U7CnZhciBBbmNob3IgPSByZXF1aXJlKCIuL2FuY2hvciIpLkFuY2hvcjsKdmFyIERvY3VtZW50ID0gZnVuY3Rpb24gKHRleHRPckxpbmVzKSB7CiAgICB0aGlzLiRsaW5lcyA9IFsiIl07CiAgICBpZiAodGV4dE9yTGluZXMubGVuZ3RoID09PSAwKSB7CiAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgfQogICAgZWxzZSBpZiAoQXJyYXkuaXNBcnJheSh0ZXh0T3JMaW5lcykpIHsKICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiAwLCBjb2x1bW46IDAgfSwgdGV4dE9yTGluZXMpOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0T3JMaW5lcyk7CiAgICB9Cn07CihmdW5jdGlvbiAoKSB7CiAgICBvb3AuaW1wbGVtZW50KHRoaXMsIEV2ZW50RW1pdHRlcik7CiAgICB0aGlzLnNldFZhbHVlID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICB2YXIgbGVuID0gdGhpcy5nZXRMZW5ndGgoKSAtIDE7CiAgICAgICAgdGhpcy5yZW1vdmUobmV3IFJhbmdlKDAsIDAsIGxlbiwgdGhpcy5nZXRMaW5lKGxlbikubGVuZ3RoKSk7CiAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0KTsKICAgIH07CiAgICB0aGlzLmdldFZhbHVlID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLmdldEFsbExpbmVzKCkuam9pbih0aGlzLmdldE5ld0xpbmVDaGFyYWN0ZXIoKSk7CiAgICB9OwogICAgdGhpcy5jcmVhdGVBbmNob3IgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4gbmV3IEFuY2hvcih0aGlzLCByb3csIGNvbHVtbik7CiAgICB9OwogICAgaWYgKCJhYWEiLnNwbGl0KC9hLykubGVuZ3RoID09PSAwKSB7CiAgICAgICAgdGhpcy4kc3BsaXQgPSBmdW5jdGlvbiAodGV4dCkgewogICAgICAgICAgICByZXR1cm4gdGV4dC5yZXBsYWNlKC9cclxufFxyL2csICJcbiIpLnNwbGl0KCJcbiIpOwogICAgICAgIH07CiAgICB9CiAgICBlbHNlIHsKICAgICAgICB0aGlzLiRzcGxpdCA9IGZ1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgICAgIHJldHVybiB0ZXh0LnNwbGl0KC9cclxufFxyfFxuLyk7CiAgICAgICAgfTsKICAgIH0KICAgIHRoaXMuJGRldGVjdE5ld0xpbmUgPSBmdW5jdGlvbiAodGV4dCkgewogICAgICAgIHZhciBtYXRjaCA9IHRleHQubWF0Y2goL14uKj8oXHJcbnxccnxcbikvbSk7CiAgICAgICAgdGhpcy4kYXV0b05ld0xpbmUgPSBtYXRjaCA/IG1hdGNoWzFdIDogIlxuIjsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZU5ld0xpbmVNb2RlIik7CiAgICB9OwogICAgdGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyID0gZnVuY3Rpb24gKCkgewogICAgICAgIHN3aXRjaCAodGhpcy4kbmV3TGluZU1vZGUpIHsKICAgICAgICAgICAgY2FzZSAid2luZG93cyI6CiAgICAgICAgICAgICAgICByZXR1cm4gIlxyXG4iOwogICAgICAgICAgICBjYXNlICJ1bml4IjoKICAgICAgICAgICAgICAgIHJldHVybiAiXG4iOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuJGF1dG9OZXdMaW5lIHx8ICJcbiI7CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuJGF1dG9OZXdMaW5lID0gIiI7CiAgICB0aGlzLiRuZXdMaW5lTW9kZSA9ICJhdXRvIjsKICAgIHRoaXMuc2V0TmV3TGluZU1vZGUgPSBmdW5jdGlvbiAobmV3TGluZU1vZGUpIHsKICAgICAgICBpZiAodGhpcy4kbmV3TGluZU1vZGUgPT09IG5ld0xpbmVNb2RlKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdGhpcy4kbmV3TGluZU1vZGUgPSBuZXdMaW5lTW9kZTsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZU5ld0xpbmVNb2RlIik7CiAgICB9OwogICAgdGhpcy5nZXROZXdMaW5lTW9kZSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGhpcy4kbmV3TGluZU1vZGU7CiAgICB9OwogICAgdGhpcy5pc05ld0xpbmUgPSBmdW5jdGlvbiAodGV4dCkgewogICAgICAgIHJldHVybiAodGV4dCA9PSAiXHJcbiIgfHwgdGV4dCA9PSAiXHIiIHx8IHRleHQgPT0gIlxuIik7CiAgICB9OwogICAgdGhpcy5nZXRMaW5lID0gZnVuY3Rpb24gKHJvdykgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lc1tyb3ddIHx8ICIiOwogICAgfTsKICAgIHRoaXMuZ2V0TGluZXMgPSBmdW5jdGlvbiAoZmlyc3RSb3csIGxhc3RSb3cpIHsKICAgICAgICByZXR1cm4gdGhpcy4kbGluZXMuc2xpY2UoZmlyc3RSb3csIGxhc3RSb3cgKyAxKTsKICAgIH07CiAgICB0aGlzLmdldEFsbExpbmVzID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLmdldExpbmVzKDAsIHRoaXMuZ2V0TGVuZ3RoKCkpOwogICAgfTsKICAgIHRoaXMuZ2V0TGVuZ3RoID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lcy5sZW5ndGg7CiAgICB9OwogICAgdGhpcy5nZXRUZXh0UmFuZ2UgPSBmdW5jdGlvbiAocmFuZ2UpIHsKICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHJhbmdlKS5qb2luKHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpKTsKICAgIH07CiAgICB0aGlzLmdldExpbmVzRm9yUmFuZ2UgPSBmdW5jdGlvbiAocmFuZ2UpIHsKICAgICAgICB2YXIgbGluZXM7CiAgICAgICAgaWYgKHJhbmdlLnN0YXJ0LnJvdyA9PT0gcmFuZ2UuZW5kLnJvdykgewogICAgICAgICAgICBsaW5lcyA9IFt0aGlzLmdldExpbmUocmFuZ2Uuc3RhcnQucm93KS5zdWJzdHJpbmcocmFuZ2Uuc3RhcnQuY29sdW1uLCByYW5nZS5lbmQuY29sdW1uKV07CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBsaW5lcyA9IHRoaXMuZ2V0TGluZXMocmFuZ2Uuc3RhcnQucm93LCByYW5nZS5lbmQucm93KTsKICAgICAgICAgICAgbGluZXNbMF0gPSAobGluZXNbMF0gfHwgIiIpLnN1YnN0cmluZyhyYW5nZS5zdGFydC5jb2x1bW4pOwogICAgICAgICAgICB2YXIgbCA9IGxpbmVzLmxlbmd0aCAtIDE7CiAgICAgICAgICAgIGlmIChyYW5nZS5lbmQucm93IC0gcmFuZ2Uuc3RhcnQucm93ID09IGwpCiAgICAgICAgICAgICAgICBsaW5lc1tsXSA9IGxpbmVzW2xdLnN1YnN0cmluZygwLCByYW5nZS5lbmQuY29sdW1uKTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGxpbmVzOwogICAgfTsKICAgIHRoaXMuaW5zZXJ0TGluZXMgPSBmdW5jdGlvbiAocm93LCBsaW5lcykgewogICAgICAgIGNvbnNvbGUud2FybigiVXNlIG9mIGRvY3VtZW50Lmluc2VydExpbmVzIGlzIGRlcHJlY2F0ZWQuIFVzZSB0aGUgaW5zZXJ0RnVsbExpbmVzIG1ldGhvZCBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydEZ1bGxMaW5lcyhyb3csIGxpbmVzKTsKICAgIH07CiAgICB0aGlzLnJlbW92ZUxpbmVzID0gZnVuY3Rpb24gKGZpcnN0Um93LCBsYXN0Um93KSB7CiAgICAgICAgY29uc29sZS53YXJuKCJVc2Ugb2YgZG9jdW1lbnQucmVtb3ZlTGluZXMgaXMgZGVwcmVjYXRlZC4gVXNlIHRoZSByZW1vdmVGdWxsTGluZXMgbWV0aG9kIGluc3RlYWQuIik7CiAgICAgICAgcmV0dXJuIHRoaXMucmVtb3ZlRnVsbExpbmVzKGZpcnN0Um93LCBsYXN0Um93KTsKICAgIH07CiAgICB0aGlzLmluc2VydE5ld0xpbmUgPSBmdW5jdGlvbiAocG9zaXRpb24pIHsKICAgICAgICBjb25zb2xlLndhcm4oIlVzZSBvZiBkb2N1bWVudC5pbnNlcnROZXdMaW5lIGlzIGRlcHJlY2F0ZWQuIFVzZSBpbnNlcnRNZXJnZWRMaW5lcyhwb3NpdGlvbiwgWycnLCAnJ10pIGluc3RlYWQuIik7CiAgICAgICAgcmV0dXJuIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIFsiIiwgIiJdKTsKICAgIH07CiAgICB0aGlzLmluc2VydCA9IGZ1bmN0aW9uIChwb3NpdGlvbiwgdGV4dCkgewogICAgICAgIGlmICh0aGlzLmdldExlbmd0aCgpIDw9IDEpCiAgICAgICAgICAgIHRoaXMuJGRldGVjdE5ld0xpbmUodGV4dCk7CiAgICAgICAgcmV0dXJuIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIHRoaXMuJHNwbGl0KHRleHQpKTsKICAgIH07CiAgICB0aGlzLmluc2VydEluTGluZSA9IGZ1bmN0aW9uIChwb3NpdGlvbiwgdGV4dCkgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhwb3NpdGlvbi5yb3csIHBvc2l0aW9uLmNvbHVtbik7CiAgICAgICAgdmFyIGVuZCA9IHRoaXMucG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uICsgdGV4dC5sZW5ndGgpOwogICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKICAgICAgICAgICAgZW5kOiBlbmQsCiAgICAgICAgICAgIGFjdGlvbjogImluc2VydCIsCiAgICAgICAgICAgIGxpbmVzOiBbdGV4dF0KICAgICAgICB9LCB0cnVlKTsKICAgICAgICByZXR1cm4gdGhpcy5jbG9uZVBvcyhlbmQpOwogICAgfTsKICAgIHRoaXMuY2xpcHBlZFBvcyA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBsZW5ndGggPSB0aGlzLmdldExlbmd0aCgpOwogICAgICAgIGlmIChyb3cgPT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICByb3cgPSBsZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA8IDApIHsKICAgICAgICAgICAgcm93ID0gMDsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAocm93ID49IGxlbmd0aCkgewogICAgICAgICAgICByb3cgPSBsZW5ndGggLSAxOwogICAgICAgICAgICBjb2x1bW4gPSB1bmRlZmluZWQ7CiAgICAgICAgfQogICAgICAgIHZhciBsaW5lID0gdGhpcy5nZXRMaW5lKHJvdyk7CiAgICAgICAgaWYgKGNvbHVtbiA9PSB1bmRlZmluZWQpCiAgICAgICAgICAgIGNvbHVtbiA9IGxpbmUubGVuZ3RoOwogICAgICAgIGNvbHVtbiA9IE1hdGgubWluKE1hdGgubWF4KGNvbHVtbiwgMCksIGxpbmUubGVuZ3RoKTsKICAgICAgICByZXR1cm4geyByb3c6IHJvdywgY29sdW1uOiBjb2x1bW4gfTsKICAgIH07CiAgICB0aGlzLmNsb25lUG9zID0gZnVuY3Rpb24gKHBvcykgewogICAgICAgIHJldHVybiB7IHJvdzogcG9zLnJvdywgY29sdW1uOiBwb3MuY29sdW1uIH07CiAgICB9OwogICAgdGhpcy5wb3MgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4geyByb3c6IHJvdywgY29sdW1uOiBjb2x1bW4gfTsKICAgIH07CiAgICB0aGlzLiRjbGlwUG9zaXRpb24gPSBmdW5jdGlvbiAocG9zaXRpb24pIHsKICAgICAgICB2YXIgbGVuZ3RoID0gdGhpcy5nZXRMZW5ndGgoKTsKICAgICAgICBpZiAocG9zaXRpb24ucm93ID49IGxlbmd0aCkgewogICAgICAgICAgICBwb3NpdGlvbi5yb3cgPSBNYXRoLm1heCgwLCBsZW5ndGggLSAxKTsKICAgICAgICAgICAgcG9zaXRpb24uY29sdW1uID0gdGhpcy5nZXRMaW5lKGxlbmd0aCAtIDEpLmxlbmd0aDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBvc2l0aW9uLnJvdyA9IE1hdGgubWF4KDAsIHBvc2l0aW9uLnJvdyk7CiAgICAgICAgICAgIHBvc2l0aW9uLmNvbHVtbiA9IE1hdGgubWluKE1hdGgubWF4KHBvc2l0aW9uLmNvbHVtbiwgMCksIHRoaXMuZ2V0TGluZShwb3NpdGlvbi5yb3cpLmxlbmd0aCk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBwb3NpdGlvbjsKICAgIH07CiAgICB0aGlzLmluc2VydEZ1bGxMaW5lcyA9IGZ1bmN0aW9uIChyb3csIGxpbmVzKSB7CiAgICAgICAgcm93ID0gTWF0aC5taW4oTWF0aC5tYXgocm93LCAwKSwgdGhpcy5nZXRMZW5ndGgoKSk7CiAgICAgICAgdmFyIGNvbHVtbiA9IDA7CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgbGluZXMgPSBsaW5lcy5jb25jYXQoWyIiXSk7CiAgICAgICAgICAgIGNvbHVtbiA9IDA7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBsaW5lcyA9IFsiIl0uY29uY2F0KGxpbmVzKTsKICAgICAgICAgICAgcm93LS07CiAgICAgICAgICAgIGNvbHVtbiA9IHRoaXMuJGxpbmVzW3Jvd10ubGVuZ3RoOwogICAgICAgIH0KICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH0sIGxpbmVzKTsKICAgIH07CiAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzID0gZnVuY3Rpb24gKHBvc2l0aW9uLCBsaW5lcykgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhwb3NpdGlvbi5yb3csIHBvc2l0aW9uLmNvbHVtbik7CiAgICAgICAgdmFyIGVuZCA9IHsKICAgICAgICAgICAgcm93OiBzdGFydC5yb3cgKyBsaW5lcy5sZW5ndGggLSAxLAogICAgICAgICAgICBjb2x1bW46IChsaW5lcy5sZW5ndGggPT0gMSA/IHN0YXJ0LmNvbHVtbiA6IDApICsgbGluZXNbbGluZXMubGVuZ3RoIC0gMV0ubGVuZ3RoCiAgICAgICAgfTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJpbnNlcnQiLAogICAgICAgICAgICBsaW5lczogbGluZXMKICAgICAgICB9KTsKICAgICAgICByZXR1cm4gdGhpcy5jbG9uZVBvcyhlbmQpOwogICAgfTsKICAgIHRoaXMucmVtb3ZlID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHJhbmdlLnN0YXJ0LnJvdywgcmFuZ2Uuc3RhcnQuY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJhbmdlLmVuZC5yb3csIHJhbmdlLmVuZC5jb2x1bW4pOwogICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKICAgICAgICAgICAgZW5kOiBlbmQsCiAgICAgICAgICAgIGFjdGlvbjogInJlbW92ZSIsCiAgICAgICAgICAgIGxpbmVzOiB0aGlzLmdldExpbmVzRm9yUmFuZ2UoeyBzdGFydDogc3RhcnQsIGVuZDogZW5kIH0pCiAgICAgICAgfSk7CiAgICAgICAgcmV0dXJuIHRoaXMuY2xvbmVQb3Moc3RhcnQpOwogICAgfTsKICAgIHRoaXMucmVtb3ZlSW5MaW5lID0gZnVuY3Rpb24gKHJvdywgc3RhcnRDb2x1bW4sIGVuZENvbHVtbikgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyb3csIHN0YXJ0Q29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJvdywgZW5kQ29sdW1uKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHsgc3RhcnQ6IHN0YXJ0LCBlbmQ6IGVuZCB9KQogICAgICAgIH0sIHRydWUpOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICB0aGlzLnJlbW92ZUZ1bGxMaW5lcyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIGZpcnN0Um93ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgZmlyc3RSb3cpLCB0aGlzLmdldExlbmd0aCgpIC0gMSk7CiAgICAgICAgbGFzdFJvdyA9IE1hdGgubWluKE1hdGgubWF4KDAsIGxhc3RSb3cpLCB0aGlzLmdldExlbmd0aCgpIC0gMSk7CiAgICAgICAgdmFyIGRlbGV0ZUZpcnN0TmV3TGluZSA9IGxhc3RSb3cgPT0gdGhpcy5nZXRMZW5ndGgoKSAtIDEgJiYgZmlyc3RSb3cgPiAwOwogICAgICAgIHZhciBkZWxldGVMYXN0TmV3TGluZSA9IGxhc3RSb3cgPCB0aGlzLmdldExlbmd0aCgpIC0gMTsKICAgICAgICB2YXIgc3RhcnRSb3cgPSAoZGVsZXRlRmlyc3ROZXdMaW5lID8gZmlyc3RSb3cgLSAxIDogZmlyc3RSb3cpOwogICAgICAgIHZhciBzdGFydENvbCA9IChkZWxldGVGaXJzdE5ld0xpbmUgPyB0aGlzLmdldExpbmUoc3RhcnRSb3cpLmxlbmd0aCA6IDApOwogICAgICAgIHZhciBlbmRSb3cgPSAoZGVsZXRlTGFzdE5ld0xpbmUgPyBsYXN0Um93ICsgMSA6IGxhc3RSb3cpOwogICAgICAgIHZhciBlbmRDb2wgPSAoZGVsZXRlTGFzdE5ld0xpbmUgPyAwIDogdGhpcy5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTsKICAgICAgICB2YXIgcmFuZ2UgPSBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sLCBlbmRSb3csIGVuZENvbCk7CiAgICAgICAgdmFyIGRlbGV0ZWRMaW5lcyA9IHRoaXMuJGxpbmVzLnNsaWNlKGZpcnN0Um93LCBsYXN0Um93ICsgMSk7CiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHJhbmdlLnN0YXJ0LAogICAgICAgICAgICBlbmQ6IHJhbmdlLmVuZCwKICAgICAgICAgICAgYWN0aW9uOiAicmVtb3ZlIiwKICAgICAgICAgICAgbGluZXM6IHRoaXMuZ2V0TGluZXNGb3JSYW5nZShyYW5nZSkKICAgICAgICB9KTsKICAgICAgICByZXR1cm4gZGVsZXRlZExpbmVzOwogICAgfTsKICAgIHRoaXMucmVtb3ZlTmV3TGluZSA9IGZ1bmN0aW9uIChyb3cpIHsKICAgICAgICBpZiAocm93IDwgdGhpcy5nZXRMZW5ndGgoKSAtIDEgJiYgcm93ID49IDApIHsKICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgICAgIHN0YXJ0OiB0aGlzLnBvcyhyb3csIHRoaXMuZ2V0TGluZShyb3cpLmxlbmd0aCksCiAgICAgICAgICAgICAgICBlbmQ6IHRoaXMucG9zKHJvdyArIDEsIDApLAogICAgICAgICAgICAgICAgYWN0aW9uOiAicmVtb3ZlIiwKICAgICAgICAgICAgICAgIGxpbmVzOiBbIiIsICIiXQogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9OwogICAgdGhpcy5yZXBsYWNlID0gZnVuY3Rpb24gKHJhbmdlLCB0ZXh0KSB7CiAgICAgICAgaWYgKCEocmFuZ2UgaW5zdGFuY2VvZiBSYW5nZSkpCiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhyYW5nZS5zdGFydCwgcmFuZ2UuZW5kKTsKICAgICAgICBpZiAodGV4dC5sZW5ndGggPT09IDAgJiYgcmFuZ2UuaXNFbXB0eSgpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2Uuc3RhcnQ7CiAgICAgICAgaWYgKHRleHQgPT0gdGhpcy5nZXRUZXh0UmFuZ2UocmFuZ2UpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2UuZW5kOwogICAgICAgIHRoaXMucmVtb3ZlKHJhbmdlKTsKICAgICAgICB2YXIgZW5kOwogICAgICAgIGlmICh0ZXh0KSB7CiAgICAgICAgICAgIGVuZCA9IHRoaXMuaW5zZXJ0KHJhbmdlLnN0YXJ0LCB0ZXh0KTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGVuZCA9IHJhbmdlLnN0YXJ0OwogICAgICAgIH0KICAgICAgICByZXR1cm4gZW5kOwogICAgfTsKICAgIHRoaXMuYXBwbHlEZWx0YXMgPSBmdW5jdGlvbiAoZGVsdGFzKSB7CiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBkZWx0YXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhc1tpXSk7CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMucmV2ZXJ0RGVsdGFzID0gZnVuY3Rpb24gKGRlbHRhcykgewogICAgICAgIGZvciAodmFyIGkgPSBkZWx0YXMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHsKICAgICAgICAgICAgdGhpcy5yZXZlcnREZWx0YShkZWx0YXNbaV0pOwogICAgICAgIH0KICAgIH07CiAgICB0aGlzLmFwcGx5RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgICAgICB2YXIgaXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICAgICAgaWYgKGlzSW5zZXJ0ID8gZGVsdGEubGluZXMubGVuZ3RoIDw9IDEgJiYgIWRlbHRhLmxpbmVzWzBdCiAgICAgICAgICAgIDogIVJhbmdlLmNvbXBhcmVQb2ludHMoZGVsdGEuc3RhcnQsIGRlbHRhLmVuZCkpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZiAoaXNJbnNlcnQgJiYgZGVsdGEubGluZXMubGVuZ3RoID4gMjAwMDApIHsKICAgICAgICAgICAgdGhpcy4kc3BsaXRBbmRhcHBseUxhcmdlRGVsdGEoZGVsdGEsIDIwMDAwKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGFwcGx5RGVsdGEodGhpcy4kbGluZXMsIGRlbHRhLCBkb05vdFZhbGlkYXRlKTsKICAgICAgICAgICAgdGhpcy5fc2lnbmFsKCJjaGFuZ2UiLCBkZWx0YSk7CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuJHNhZmVBcHBseURlbHRhID0gZnVuY3Rpb24gKGRlbHRhKSB7CiAgICAgICAgdmFyIGRvY0xlbmd0aCA9IHRoaXMuJGxpbmVzLmxlbmd0aDsKICAgICAgICBpZiAoZGVsdGEuYWN0aW9uID09ICJyZW1vdmUiICYmIGRlbHRhLnN0YXJ0LnJvdyA8IGRvY0xlbmd0aCAmJiBkZWx0YS5lbmQucm93IDwgZG9jTGVuZ3RoCiAgICAgICAgICAgIHx8IGRlbHRhLmFjdGlvbiA9PSAiaW5zZXJ0IiAmJiBkZWx0YS5zdGFydC5yb3cgPD0gZG9jTGVuZ3RoKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YShkZWx0YSk7CiAgICAgICAgfQogICAgfTsKICAgIHRoaXMuJHNwbGl0QW5kYXBwbHlMYXJnZURlbHRhID0gZnVuY3Rpb24gKGRlbHRhLCBNQVgpIHsKICAgICAgICB2YXIgbGluZXMgPSBkZWx0YS5saW5lczsKICAgICAgICB2YXIgbCA9IGxpbmVzLmxlbmd0aCAtIE1BWCArIDE7CiAgICAgICAgdmFyIHJvdyA9IGRlbHRhLnN0YXJ0LnJvdzsKICAgICAgICB2YXIgY29sdW1uID0gZGVsdGEuc3RhcnQuY29sdW1uOwogICAgICAgIGZvciAodmFyIGZyb20gPSAwLCB0byA9IDA7IGZyb20gPCBsOyBmcm9tID0gdG8pIHsKICAgICAgICAgICAgdG8gKz0gTUFYIC0gMTsKICAgICAgICAgICAgdmFyIGNodW5rID0gbGluZXMuc2xpY2UoZnJvbSwgdG8pOwogICAgICAgICAgICBjaHVuay5wdXNoKCIiKTsKICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgICAgIHN0YXJ0OiB0aGlzLnBvcyhyb3cgKyBmcm9tLCBjb2x1bW4pLAogICAgICAgICAgICAgICAgZW5kOiB0aGlzLnBvcyhyb3cgKyB0bywgY29sdW1uID0gMCksCiAgICAgICAgICAgICAgICBhY3Rpb246IGRlbHRhLmFjdGlvbiwKICAgICAgICAgICAgICAgIGxpbmVzOiBjaHVuawogICAgICAgICAgICB9LCB0cnVlKTsKICAgICAgICB9CiAgICAgICAgZGVsdGEubGluZXMgPSBsaW5lcy5zbGljZShmcm9tKTsKICAgICAgICBkZWx0YS5zdGFydC5yb3cgPSByb3cgKyBmcm9tOwogICAgICAgIGRlbHRhLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoZGVsdGEsIHRydWUpOwogICAgfTsKICAgIHRoaXMucmV2ZXJ0RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICB0aGlzLiRzYWZlQXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiB0aGlzLmNsb25lUG9zKGRlbHRhLnN0YXJ0KSwKICAgICAgICAgICAgZW5kOiB0aGlzLmNsb25lUG9zKGRlbHRhLmVuZCksCiAgICAgICAgICAgIGFjdGlvbjogKGRlbHRhLmFjdGlvbiA9PSAiaW5zZXJ0IiA/ICJyZW1vdmUiIDogImluc2VydCIpLAogICAgICAgICAgICBsaW5lczogZGVsdGEubGluZXMuc2xpY2UoKQogICAgICAgIH0pOwogICAgfTsKICAgIHRoaXMuaW5kZXhUb1Bvc2l0aW9uID0gZnVuY3Rpb24gKGluZGV4LCBzdGFydFJvdykgewogICAgICAgIHZhciBsaW5lcyA9IHRoaXMuJGxpbmVzIHx8IHRoaXMuZ2V0QWxsTGluZXMoKTsKICAgICAgICB2YXIgbmV3bGluZUxlbmd0aCA9IHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpLmxlbmd0aDsKICAgICAgICBmb3IgKHZhciBpID0gc3RhcnRSb3cgfHwgMCwgbCA9IGxpbmVzLmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgICAgICBpbmRleCAtPSBsaW5lc1tpXS5sZW5ndGggKyBuZXdsaW5lTGVuZ3RoOwogICAgICAgICAgICBpZiAoaW5kZXggPCAwKQogICAgICAgICAgICAgICAgcmV0dXJuIHsgcm93OiBpLCBjb2x1bW46IGluZGV4ICsgbGluZXNbaV0ubGVuZ3RoICsgbmV3bGluZUxlbmd0aCB9OwogICAgICAgIH0KICAgICAgICByZXR1cm4geyByb3c6IGwgLSAxLCBjb2x1bW46IGluZGV4ICsgbGluZXNbbCAtIDFdLmxlbmd0aCArIG5ld2xpbmVMZW5ndGggfTsKICAgIH07CiAgICB0aGlzLnBvc2l0aW9uVG9JbmRleCA9IGZ1bmN0aW9uIChwb3MsIHN0YXJ0Um93KSB7CiAgICAgICAgdmFyIGxpbmVzID0gdGhpcy4kbGluZXMgfHwgdGhpcy5nZXRBbGxMaW5lcygpOwogICAgICAgIHZhciBuZXdsaW5lTGVuZ3RoID0gdGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkubGVuZ3RoOwogICAgICAgIHZhciBpbmRleCA9IDA7CiAgICAgICAgdmFyIHJvdyA9IE1hdGgubWluKHBvcy5yb3csIGxpbmVzLmxlbmd0aCk7CiAgICAgICAgZm9yICh2YXIgaSA9IHN0YXJ0Um93IHx8IDA7IGkgPCByb3c7ICsraSkKICAgICAgICAgICAgaW5kZXggKz0gbGluZXNbaV0ubGVuZ3RoICsgbmV3bGluZUxlbmd0aDsKICAgICAgICByZXR1cm4gaW5kZXggKyBwb3MuY29sdW1uOwogICAgfTsKfSkuY2FsbChEb2N1bWVudC5wcm90b3R5cGUpOwpleHBvcnRzLkRvY3VtZW50ID0gRG9jdW1lbnQ7Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9saWIvbGFuZyIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwpleHBvcnRzLmxhc3QgPSBmdW5jdGlvbiAoYSkgewogICAgcmV0dXJuIGFbYS5sZW5ndGggLSAxXTsKfTsKZXhwb3J0cy5zdHJpbmdSZXZlcnNlID0gZnVuY3Rpb24gKHN0cmluZykgewogICAgcmV0dXJuIHN0cmluZy5zcGxpdCgiIikucmV2ZXJzZSgpLmpvaW4oIiIpOwp9OwpleHBvcnRzLnN0cmluZ1JlcGVhdCA9IGZ1bmN0aW9uIChzdHJpbmcsIGNvdW50KSB7CiAgICB2YXIgcmVzdWx0ID0gJyc7CiAgICB3aGlsZSAoY291bnQgPiAwKSB7CiAgICAgICAgaWYgKGNvdW50ICYgMSkKICAgICAgICAgICAgcmVzdWx0ICs9IHN0cmluZzsKICAgICAgICBpZiAoY291bnQgPj49IDEpCiAgICAgICAgICAgIHN0cmluZyArPSBzdHJpbmc7CiAgICB9CiAgICByZXR1cm4gcmVzdWx0Owp9Owp2YXIgdHJpbUJlZ2luUmVnZXhwID0gL15cc1xzKi87CnZhciB0cmltRW5kUmVnZXhwID0gL1xzXHMqJC87CmV4cG9ydHMuc3RyaW5nVHJpbUxlZnQgPSBmdW5jdGlvbiAoc3RyaW5nKSB7CiAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UodHJpbUJlZ2luUmVnZXhwLCAnJyk7Cn07CmV4cG9ydHMuc3RyaW5nVHJpbVJpZ2h0ID0gZnVuY3Rpb24gKHN0cmluZykgewogICAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKHRyaW1FbmRSZWdleHAsICcnKTsKfTsKZXhwb3J0cy5jb3B5T2JqZWN0ID0gZnVuY3Rpb24gKG9iaikgewogICAgdmFyIGNvcHkgPSB7fTsKICAgIGZvciAodmFyIGtleSBpbiBvYmopIHsKICAgICAgICBjb3B5W2tleV0gPSBvYmpba2V5XTsKICAgIH0KICAgIHJldHVybiBjb3B5Owp9OwpleHBvcnRzLmNvcHlBcnJheSA9IGZ1bmN0aW9uIChhcnJheSkgewogICAgdmFyIGNvcHkgPSBbXTsKICAgIGZvciAodmFyIGkgPSAwLCBsID0gYXJyYXkubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgaWYgKGFycmF5W2ldICYmIHR5cGVvZiBhcnJheVtpXSA9PSAib2JqZWN0IikKICAgICAgICAgICAgY29weVtpXSA9IHRoaXMuY29weU9iamVjdChhcnJheVtpXSk7CiAgICAgICAgZWxzZQogICAgICAgICAgICBjb3B5W2ldID0gYXJyYXlbaV07CiAgICB9CiAgICByZXR1cm4gY29weTsKfTsKZXhwb3J0cy5kZWVwQ29weSA9IGZ1bmN0aW9uIGRlZXBDb3B5KG9iaikgewogICAgaWYgKHR5cGVvZiBvYmogIT09ICJvYmplY3QiIHx8ICFvYmopCiAgICAgICAgcmV0dXJuIG9iajsKICAgIHZhciBjb3B5OwogICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkgewogICAgICAgIGNvcHkgPSBbXTsKICAgICAgICBmb3IgKHZhciBrZXkgPSAwOyBrZXkgPCBvYmoubGVuZ3RoOyBrZXkrKykgewogICAgICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBjb3B5OwogICAgfQogICAgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvYmopICE9PSAiW29iamVjdCBPYmplY3RdIikKICAgICAgICByZXR1cm4gb2JqOwogICAgY29weSA9IHt9OwogICAgZm9yICh2YXIga2V5IGluIG9iaikKICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7CiAgICByZXR1cm4gY29weTsKfTsKZXhwb3J0cy5hcnJheVRvTWFwID0gZnVuY3Rpb24gKGFycikgewogICAgdmFyIG1hcCA9IHt9OwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsKICAgICAgICBtYXBbYXJyW2ldXSA9IDE7CiAgICB9CiAgICByZXR1cm4gbWFwOwp9OwpleHBvcnRzLmNyZWF0ZU1hcCA9IGZ1bmN0aW9uIChwcm9wcykgewogICAgdmFyIG1hcCA9IE9iamVjdC5jcmVhdGUobnVsbCk7CiAgICBmb3IgKHZhciBpIGluIHByb3BzKSB7CiAgICAgICAgbWFwW2ldID0gcHJvcHNbaV07CiAgICB9CiAgICByZXR1cm4gbWFwOwp9OwpleHBvcnRzLmFycmF5UmVtb3ZlID0gZnVuY3Rpb24gKGFycmF5LCB2YWx1ZSkgewogICAgZm9yICh2YXIgaSA9IDA7IGkgPD0gYXJyYXkubGVuZ3RoOyBpKyspIHsKICAgICAgICBpZiAodmFsdWUgPT09IGFycmF5W2ldKSB7CiAgICAgICAgICAgIGFycmF5LnNwbGljZShpLCAxKTsKICAgICAgICB9CiAgICB9Cn07CmV4cG9ydHMuZXNjYXBlUmVnRXhwID0gZnVuY3Rpb24gKHN0cikgewogICAgcmV0dXJuIHN0ci5yZXBsYWNlKC8oWy4qKz9eJHt9KCl8W1xdXC9cXF0pL2csICdcXCQxJyk7Cn07CmV4cG9ydHMuZXNjYXBlSFRNTCA9IGZ1bmN0aW9uIChzdHIpIHsKICAgIHJldHVybiAoIiIgKyBzdHIpLnJlcGxhY2UoLyYvZywgIiYjMzg7IikucmVwbGFjZSgvIi9nLCAiJiMzNDsiKS5yZXBsYWNlKC8nL2csICImIzM5OyIpLnJlcGxhY2UoLzwvZywgIiYjNjA7Iik7Cn07CmV4cG9ydHMuZ2V0TWF0Y2hPZmZzZXRzID0gZnVuY3Rpb24gKHN0cmluZywgcmVnRXhwKSB7CiAgICB2YXIgbWF0Y2hlcyA9IFtdOwogICAgc3RyaW5nLnJlcGxhY2UocmVnRXhwLCBmdW5jdGlvbiAoc3RyKSB7CiAgICAgICAgbWF0Y2hlcy5wdXNoKHsKICAgICAgICAgICAgb2Zmc2V0OiBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDJdLAogICAgICAgICAgICBsZW5ndGg6IHN0ci5sZW5ndGgKICAgICAgICB9KTsKICAgIH0pOwogICAgcmV0dXJuIG1hdGNoZXM7Cn07CmV4cG9ydHMuZGVmZXJyZWRDYWxsID0gZnVuY3Rpb24gKGZjbikgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aW1lciA9IG51bGw7CiAgICAgICAgZmNuKCk7CiAgICB9OwogICAgdmFyIGRlZmVycmVkID0gZnVuY3Rpb24gKHRpbWVvdXQpIHsKICAgICAgICBkZWZlcnJlZC5jYW5jZWwoKTsKICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoY2FsbGJhY2ssIHRpbWVvdXQgfHwgMCk7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKICAgIGRlZmVycmVkLnNjaGVkdWxlID0gZGVmZXJyZWQ7CiAgICBkZWZlcnJlZC5jYWxsID0gZnVuY3Rpb24gKCkgewogICAgICAgIHRoaXMuY2FuY2VsKCk7CiAgICAgICAgZmNuKCk7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKICAgIGRlZmVycmVkLmNhbmNlbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpOwogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICByZXR1cm4gZGVmZXJyZWQ7CiAgICB9OwogICAgZGVmZXJyZWQuaXNQZW5kaW5nID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aW1lcjsKICAgIH07CiAgICByZXR1cm4gZGVmZXJyZWQ7Cn07CmV4cG9ydHMuZGVsYXllZENhbGwgPSBmdW5jdGlvbiAoZmNuLCBkZWZhdWx0VGltZW91dCkgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aW1lciA9IG51bGw7CiAgICAgICAgZmNuKCk7CiAgICB9OwogICAgdmFyIF9zZWxmID0gZnVuY3Rpb24gKHRpbWVvdXQpIHsKICAgICAgICBpZiAodGltZXIgPT0gbnVsbCkKICAgICAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGNhbGxiYWNrLCB0aW1lb3V0IHx8IGRlZmF1bHRUaW1lb3V0KTsKICAgIH07CiAgICBfc2VsZi5kZWxheSA9IGZ1bmN0aW9uICh0aW1lb3V0KSB7CiAgICAgICAgdGltZXIgJiYgY2xlYXJUaW1lb3V0KHRpbWVyKTsKICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoY2FsbGJhY2ssIHRpbWVvdXQgfHwgZGVmYXVsdFRpbWVvdXQpOwogICAgfTsKICAgIF9zZWxmLnNjaGVkdWxlID0gX3NlbGY7CiAgICBfc2VsZi5jYWxsID0gZnVuY3Rpb24gKCkgewogICAgICAgIHRoaXMuY2FuY2VsKCk7CiAgICAgICAgZmNuKCk7CiAgICB9OwogICAgX3NlbGYuY2FuY2VsID0gZnVuY3Rpb24gKCkgewogICAgICAgIHRpbWVyICYmIGNsZWFyVGltZW91dCh0aW1lcik7CiAgICAgICAgdGltZXIgPSBudWxsOwogICAgfTsKICAgIF9zZWxmLmlzUGVuZGluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGltZXI7CiAgICB9OwogICAgcmV0dXJuIF9zZWxmOwp9OwoKfSk7CgphY2UuZGVmaW5lKCJhY2Uvd29ya2VyL21pcnJvciIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSkgewoidXNlIHN0cmljdCI7Cgp2YXIgRG9jdW1lbnQgPSByZXF1aXJlKCIuLi9kb2N1bWVudCIpLkRvY3VtZW50Owp2YXIgbGFuZyA9IHJlcXVpcmUoIi4uL2xpYi9sYW5nIik7CiAgICAKdmFyIE1pcnJvciA9IGV4cG9ydHMuTWlycm9yID0gZnVuY3Rpb24oc2VuZGVyKSB7CiAgICB0aGlzLnNlbmRlciA9IHNlbmRlcjsKICAgIHZhciBkb2MgPSB0aGlzLmRvYyA9IG5ldyBEb2N1bWVudCgiIik7CiAgICAKICAgIHZhciBkZWZlcnJlZFVwZGF0ZSA9IHRoaXMuZGVmZXJyZWRVcGRhdGUgPSBsYW5nLmRlbGF5ZWRDYWxsKHRoaXMub25VcGRhdGUuYmluZCh0aGlzKSk7CiAgICAKICAgIHZhciBfc2VsZiA9IHRoaXM7CiAgICBzZW5kZXIub24oImNoYW5nZSIsIGZ1bmN0aW9uKGUpIHsKICAgICAgICB2YXIgZGF0YSA9IGUuZGF0YTsKICAgICAgICBpZiAoZGF0YVswXS5zdGFydCkgewogICAgICAgICAgICBkb2MuYXBwbHlEZWx0YXMoZGF0YSk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBkYXRhLmxlbmd0aDsgaSArPSAyKSB7CiAgICAgICAgICAgICAgICB2YXIgZCwgZXJyOyAKICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGRhdGFbaSsxXSkpIHsKICAgICAgICAgICAgICAgICAgICBkID0ge2FjdGlvbjogImluc2VydCIsIHN0YXJ0OiBkYXRhW2ldLCBsaW5lczogZGF0YVtpKzFdfTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgZCA9IHthY3Rpb246ICJyZW1vdmUiLCBzdGFydDogZGF0YVtpXSwgZW5kOiBkYXRhW2krMV19OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBpZiAoKGQuYWN0aW9uID09ICJpbnNlcnQiID8gZC5zdGFydCA6IGQuZW5kKS5yb3cgPj0gZG9jLiRsaW5lcy5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgICBlcnIgPSBuZXcgRXJyb3IoIkludmFsaWQgZGVsdGEiKTsKICAgICAgICAgICAgICAgICAgICBlcnIuZGF0YSA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgcGF0aDogX3NlbGYuJHBhdGgsCiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVzTGVuZ3RoOiBkb2MuJGxpbmVzLmxlbmd0aCwKICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQ6IGQuc3RhcnQsCiAgICAgICAgICAgICAgICAgICAgICAgIGVuZDogZC5lbmQKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIHRocm93IGVycjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBkb2MuYXBwbHlEZWx0YShkLCB0cnVlKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoX3NlbGYuJHRpbWVvdXQpCiAgICAgICAgICAgIHJldHVybiBkZWZlcnJlZFVwZGF0ZS5zY2hlZHVsZShfc2VsZi4kdGltZW91dCk7CiAgICAgICAgX3NlbGYub25VcGRhdGUoKTsKICAgIH0pOwp9OwoKKGZ1bmN0aW9uKCkgewogICAgCiAgICB0aGlzLiR0aW1lb3V0ID0gNTAwOwogICAgCiAgICB0aGlzLnNldFRpbWVvdXQgPSBmdW5jdGlvbih0aW1lb3V0KSB7CiAgICAgICAgdGhpcy4kdGltZW91dCA9IHRpbWVvdXQ7CiAgICB9OwogICAgCiAgICB0aGlzLnNldFZhbHVlID0gZnVuY3Rpb24odmFsdWUpIHsKICAgICAgICB0aGlzLmRvYy5zZXRWYWx1ZSh2YWx1ZSk7CiAgICAgICAgdGhpcy5kZWZlcnJlZFVwZGF0ZS5zY2hlZHVsZSh0aGlzLiR0aW1lb3V0KTsKICAgIH07CiAgICAKICAgIHRoaXMuZ2V0VmFsdWUgPSBmdW5jdGlvbihjYWxsYmFja0lkKSB7CiAgICAgICAgdGhpcy5zZW5kZXIuY2FsbGJhY2sodGhpcy5kb2MuZ2V0VmFsdWUoKSwgY2FsbGJhY2tJZCk7CiAgICB9OwogICAgCiAgICB0aGlzLm9uVXBkYXRlID0gZnVuY3Rpb24oKSB7CiAgICB9OwogICAgCiAgICB0aGlzLmlzUGVuZGluZyA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiB0aGlzLmRlZmVycmVkVXBkYXRlLmlzUGVuZGluZygpOwogICAgfTsKICAgIAp9KS5jYWxsKE1pcnJvci5wcm90b3R5cGUpOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvbW9kZS9qc29uL2pzb25fcGFyc2UiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKICAgIHZhciBhdCwgICAgIC8vIFRoZSBpbmRleCBvZiB0aGUgY3VycmVudCBjaGFyYWN0ZXIKICAgICAgICBjaCwgICAgIC8vIFRoZSBjdXJyZW50IGNoYXJhY3RlcgogICAgICAgIGVzY2FwZWUgPSB7CiAgICAgICAgICAgICciJzogICciJywKICAgICAgICAgICAgJ1xcJzogJ1xcJywKICAgICAgICAgICAgJy8nOiAgJy8nLAogICAgICAgICAgICBiOiAgICAnXGInLAogICAgICAgICAgICBmOiAgICAnXGYnLAogICAgICAgICAgICBuOiAgICAnXG4nLAogICAgICAgICAgICByOiAgICAnXHInLAogICAgICAgICAgICB0OiAgICAnXHQnCiAgICAgICAgfSwKICAgICAgICB0ZXh0LAoKICAgICAgICBlcnJvciA9IGZ1bmN0aW9uIChtKSB7CgogICAgICAgICAgICB0aHJvdyB7CiAgICAgICAgICAgICAgICBuYW1lOiAgICAnU3ludGF4RXJyb3InLAogICAgICAgICAgICAgICAgbWVzc2FnZTogbSwKICAgICAgICAgICAgICAgIGF0OiAgICAgIGF0LAogICAgICAgICAgICAgICAgdGV4dDogICAgdGV4dAogICAgICAgICAgICB9OwogICAgICAgIH0sCgogICAgICAgIG5leHQgPSBmdW5jdGlvbiAoYykgewoKICAgICAgICAgICAgaWYgKGMgJiYgYyAhPT0gY2gpIHsKICAgICAgICAgICAgICAgIGVycm9yKCJFeHBlY3RlZCAnIiArIGMgKyAiJyBpbnN0ZWFkIG9mICciICsgY2ggKyAiJyIpOwogICAgICAgICAgICB9CgogICAgICAgICAgICBjaCA9IHRleHQuY2hhckF0KGF0KTsKICAgICAgICAgICAgYXQgKz0gMTsKICAgICAgICAgICAgcmV0dXJuIGNoOwogICAgICAgIH0sCgogICAgICAgIG51bWJlciA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBudW1iZXIsCiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnJzsKCiAgICAgICAgICAgIGlmIChjaCA9PT0gJy0nKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnLSc7CiAgICAgICAgICAgICAgICBuZXh0KCctJyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2hpbGUgKGNoID49ICcwJyAmJiBjaCA8PSAnOScpIHsKICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2ggPT09ICcuJykgewogICAgICAgICAgICAgICAgc3RyaW5nICs9ICcuJzsKICAgICAgICAgICAgICAgIHdoaWxlIChuZXh0KCkgJiYgY2ggPj0gJzAnICYmIGNoIDw9ICc5JykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY2ggPT09ICdlJyB8fCBjaCA9PT0gJ0UnKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICctJyB8fCBjaCA9PT0gJysnKSB7CiAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCA+PSAnMCcgJiYgY2ggPD0gJzknKSB7CiAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBudW1iZXIgPSArc3RyaW5nOwogICAgICAgICAgICBpZiAoaXNOYU4obnVtYmVyKSkgewogICAgICAgICAgICAgICAgZXJyb3IoIkJhZCBudW1iZXIiKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBzdHJpbmcgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB2YXIgaGV4LAogICAgICAgICAgICAgICAgaSwKICAgICAgICAgICAgICAgIHN0cmluZyA9ICcnLAogICAgICAgICAgICAgICAgdWZmZmY7CgogICAgICAgICAgICBpZiAoY2ggPT09ICciJykgewogICAgICAgICAgICAgICAgd2hpbGUgKG5leHQoKSkgewogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJyInKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0cmluZzsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnXFwnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoID09PSAndScpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVmZmZmID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCA0OyBpICs9IDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZXggPSBwYXJzZUludChuZXh0KCksIDE2KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzRmluaXRlKGhleCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVmZmZmID0gdWZmZmYgKiAxNiArIGhleDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKHVmZmZmKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZXNjYXBlZVtjaF0gPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gZXNjYXBlZVtjaF07CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT0gIlxuIiB8fCBjaCA9PSAiXHIiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBzdHJpbmciKTsKICAgICAgICB9LAoKICAgICAgICB3aGl0ZSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHdoaWxlIChjaCAmJiBjaCA8PSAnICcpIHsKICAgICAgICAgICAgICAgIG5leHQoKTsKICAgICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIHdvcmQgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICBzd2l0Y2ggKGNoKSB7CiAgICAgICAgICAgIGNhc2UgJ3QnOgogICAgICAgICAgICAgICAgbmV4dCgndCcpOwogICAgICAgICAgICAgICAgbmV4dCgncicpOwogICAgICAgICAgICAgICAgbmV4dCgndScpOwogICAgICAgICAgICAgICAgbmV4dCgnZScpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIGNhc2UgJ2YnOgogICAgICAgICAgICAgICAgbmV4dCgnZicpOwogICAgICAgICAgICAgICAgbmV4dCgnYScpOwogICAgICAgICAgICAgICAgbmV4dCgnbCcpOwogICAgICAgICAgICAgICAgbmV4dCgncycpOwogICAgICAgICAgICAgICAgbmV4dCgnZScpOwogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICBjYXNlICduJzoKICAgICAgICAgICAgICAgIG5leHQoJ24nKTsKICAgICAgICAgICAgICAgIG5leHQoJ3UnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIHJldHVybiBudWxsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJVbmV4cGVjdGVkICciICsgY2ggKyAiJyIpOwogICAgICAgIH0sCgogICAgICAgIHZhbHVlLCAgLy8gUGxhY2UgaG9sZGVyIGZvciB0aGUgdmFsdWUgZnVuY3Rpb24uCgogICAgICAgIGFycmF5ID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGFycmF5ID0gW107CgogICAgICAgICAgICBpZiAoY2ggPT09ICdbJykgewogICAgICAgICAgICAgICAgbmV4dCgnWycpOwogICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ10nKSB7CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnXScpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJheTsgICAvLyBlbXB0eSBhcnJheQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGNoKSB7CiAgICAgICAgICAgICAgICAgICAgYXJyYXkucHVzaCh2YWx1ZSgpKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ10nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoJ10nKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFycmF5OwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBuZXh0KCcsJyk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvcigiQmFkIGFycmF5Iik7CiAgICAgICAgfSwKCiAgICAgICAgb2JqZWN0ID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGtleSwKICAgICAgICAgICAgICAgIG9iamVjdCA9IHt9OwoKICAgICAgICAgICAgaWYgKGNoID09PSAneycpIHsKICAgICAgICAgICAgICAgIG5leHQoJ3snKTsKICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd9JykgewogICAgICAgICAgICAgICAgICAgIG5leHQoJ30nKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqZWN0OyAgIC8vIGVtcHR5IG9iamVjdAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGNoKSB7CiAgICAgICAgICAgICAgICAgICAga2V5ID0gc3RyaW5nKCk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBuZXh0KCc6Jyk7CiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVjdCwga2V5KSkgewogICAgICAgICAgICAgICAgICAgICAgICBlcnJvcignRHVwbGljYXRlIGtleSAiJyArIGtleSArICciJyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIG9iamVjdFtrZXldID0gdmFsdWUoKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ30nKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQoJ30nKTsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnLCcpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBvYmplY3QiKTsKICAgICAgICB9OwoKICAgIHZhbHVlID0gZnVuY3Rpb24gKCkgewoKICAgICAgICB3aGl0ZSgpOwogICAgICAgIHN3aXRjaCAoY2gpIHsKICAgICAgICBjYXNlICd7JzoKICAgICAgICAgICAgcmV0dXJuIG9iamVjdCgpOwogICAgICAgIGNhc2UgJ1snOgogICAgICAgICAgICByZXR1cm4gYXJyYXkoKTsKICAgICAgICBjYXNlICciJzoKICAgICAgICAgICAgcmV0dXJuIHN0cmluZygpOwogICAgICAgIGNhc2UgJy0nOgogICAgICAgICAgICByZXR1cm4gbnVtYmVyKCk7CiAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgcmV0dXJuIGNoID49ICcwJyAmJiBjaCA8PSAnOScgPyBudW1iZXIoKSA6IHdvcmQoKTsKICAgICAgICB9CiAgICB9OwoKICAgIHJldHVybiBmdW5jdGlvbiAoc291cmNlLCByZXZpdmVyKSB7CiAgICAgICAgdmFyIHJlc3VsdDsKCiAgICAgICAgdGV4dCA9IHNvdXJjZTsKICAgICAgICBhdCA9IDA7CiAgICAgICAgY2ggPSAnICc7CiAgICAgICAgcmVzdWx0ID0gdmFsdWUoKTsKICAgICAgICB3aGl0ZSgpOwogICAgICAgIGlmIChjaCkgewogICAgICAgICAgICBlcnJvcigiU3ludGF4IGVycm9yIik7CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gdHlwZW9mIHJldml2ZXIgPT09ICdmdW5jdGlvbicgPyBmdW5jdGlvbiB3YWxrKGhvbGRlciwga2V5KSB7CiAgICAgICAgICAgIHZhciBrLCB2LCB2YWx1ZSA9IGhvbGRlcltrZXldOwogICAgICAgICAgICBpZiAodmFsdWUgJiYgdHlwZW9mIHZhbHVlID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgZm9yIChrIGluIHZhbHVlKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5oYXNPd25Qcm9wZXJ0eS5jYWxsKHZhbHVlLCBrKSkgewogICAgICAgICAgICAgICAgICAgICAgICB2ID0gd2Fsayh2YWx1ZSwgayk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlW2tdID0gdjsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB2YWx1ZVtrXTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gcmV2aXZlci5jYWxsKGhvbGRlciwga2V5LCB2YWx1ZSk7CiAgICAgICAgfSh7Jyc6IHJlc3VsdH0sICcnKSA6IHJlc3VsdDsKICAgIH07Cn0pOwoKYWNlLmRlZmluZSgiYWNlL21vZGUvanNvbl93b3JrZXIiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKdmFyIG9vcCA9IHJlcXVpcmUoIi4uL2xpYi9vb3AiKTsKdmFyIE1pcnJvciA9IHJlcXVpcmUoIi4uL3dvcmtlci9taXJyb3IiKS5NaXJyb3I7CnZhciBwYXJzZSA9IHJlcXVpcmUoIi4vanNvbi9qc29uX3BhcnNlIik7Cgp2YXIgSnNvbldvcmtlciA9IGV4cG9ydHMuSnNvbldvcmtlciA9IGZ1bmN0aW9uKHNlbmRlcikgewogICAgTWlycm9yLmNhbGwodGhpcywgc2VuZGVyKTsKICAgIHRoaXMuc2V0VGltZW91dCgyMDApOwp9OwoKb29wLmluaGVyaXRzKEpzb25Xb3JrZXIsIE1pcnJvcik7CgooZnVuY3Rpb24oKSB7CgogICAgdGhpcy5vblVwZGF0ZSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHZhciB2YWx1ZSA9IHRoaXMuZG9jLmdldFZhbHVlKCk7CiAgICAgICAgdmFyIGVycm9ycyA9IFtdOwogICAgICAgIHRyeSB7CiAgICAgICAgICAgIGlmICh2YWx1ZSkKICAgICAgICAgICAgICAgIHBhcnNlKHZhbHVlKTsKICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgIHZhciBwb3MgPSB0aGlzLmRvYy5pbmRleFRvUG9zaXRpb24oZS5hdC0xKTsKICAgICAgICAgICAgZXJyb3JzLnB1c2goewogICAgICAgICAgICAgICAgcm93OiBwb3Mucm93LAogICAgICAgICAgICAgICAgY29sdW1uOiBwb3MuY29sdW1uLAogICAgICAgICAgICAgICAgdGV4dDogZS5tZXNzYWdlLAogICAgICAgICAgICAgICAgdHlwZTogImVycm9yIgogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAgICAgdGhpcy5zZW5kZXIuZW1pdCgiYW5ub3RhdGUiLCBlcnJvcnMpOwogICAgfTsKCn0pLmNhbGwoSnNvbldvcmtlci5wcm90b3R5cGUpOwoKfSk7Cg=="},7907:function(ie,g,H){H.d(g,{Iu:function(){return L},cC:function(){return V},m0:function(){return P}}),H(4987);var X={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"}},x=Object.keys(X),N="en",O=typeof navigator!="undefined"?navigator.language||navigator.userLanguage:void 0,D=x.find(function(C){return C===O})||N;function P(C){var m;C&&((m=x.find(function(A){return A===C}))?D=m:console.error("Language not found"))}function V(C){if(C)for(var m in C)(function(A){x.find(function(S){return S===A})||x.push(A),X[A]=Object.assign({},X[N],X[A],C[A])})(m)}function L(C,m,A){var S=X[A=A||D][C]||X[N][C]||C;if(m)for(var p in m)S=S.replace("${"+p+"}",m[p]);return S}},6056:function(ie,X,H){H.d(X,{J:function(){return D},r:function(){return O}});var X=H(5156),x=H.n(X),N=H(9791);function O(P,A){var L,C=A.sort,m=A.filter,A=A.projection,S="";return m?(L=m.field!=="@"?["0"].concat((0,N.parsePath)("."+m.field)):["0"],L=typeof(0,N.get)(P,L)=="string"?m.value:(0,N.parseString)(m.value),S+="[? "+m.field+" "+m.relation+" `"+JSON.stringify(L)+"`]"):S+=Array.isArray(P)?"[*]":"@",C&&(C.direction==="desc"?S+=" | reverse(sort_by(@, &"+C.field+"))":S+=" | sort_by(@, &"+C.field+")"),A&&(S[S.length-1]!=="]"&&(S+=" | [*]"),A.fields.length===1?S+="."+A.fields[0]:1<A.fields.length&&(S+=".{"+A.fields.map(function(p){var c=p.split(".");return c[c.length-1]+": "+p}).join(", ")+"}")),S}function D(P,V){return x().search(P,V)}},4987:function(){function ie(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&&ie(window.Element.prototype),window.CharacterData!==void 0&&ie(window.CharacterData.prototype),window.DocumentType!==void 0&&ie(window.DocumentType.prototype)),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(g){for(var H=0;H<this.length;H++){var X=this[H];if(g.call(this,X,H,this))return H}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(ie,c,p){p.r(c),p.d(c,{previewModeMixins:function(){return s}});var c=p(3860),X=p.n(c),x=p(4188),N=p(6436),O=p(2474);function D(n,i){for(var t=0;t<i.length;t++){var e=i[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}var P=function(){function n(e,r,a){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.onChange=e,this.calculateItemSize=r||function(){return 1},this.limit=a,this.items=[],this.index=-1}var i,t;return i=n,(t=[{key:"add",value:function(e){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(e),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var e=this.calculateItemSize,r=0;return this.items.forEach(function(a){r+=e(a)}),r}},{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()}}])&&D(i.prototype,t),Object.defineProperty(i,"prototype",{writable:!1}),n}(),V=p(7907),L=p(6056),C=p(6617),m=p(6210),A=p(2558),c=p(8458),S=p(9791),p=c.textModeMixins[0].mixin,c={create:function(e){var i=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},t=(i.statusBar===void 0&&(i.statusBar=!0),i.mainMenuBar=i.mainMenuBar!==!1,i.enableSort=i.enableSort!==!1,i.enableTransform=i.enableTransform!==!1,i.createQuery=i.createQuery||L.r,i.executeQuery=i.executeQuery||L.J,typeof(this.options=i).indentation=="number"?this.indentation=Number(i.indentation):this.indentation=2,(0,V.cC)(this.options.languages),(0,V.m0)(this.options.language),this.mode="preview",this),e=(this.container=e,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,S.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(r){r.preventDefault()},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null});this.frameFocusTracker=new O.R(e),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,S.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(e=document.createElement("button")).type="button",e.className="jsoneditor-format",e.title=(0,V.Iu)("formatTitle"),this.menu.appendChild(e),e.onclick=function(){t.executeWithBusyMessage(function(){try{t.format()}catch(r){t._onError(r)}},"formatting...")},(e=document.createElement("button")).type="button",e.className="jsoneditor-compact",e.title=(0,V.Iu)("compactTitle"),this.menu.appendChild(e),e.onclick=function(){t.executeWithBusyMessage(function(){try{t.compact()}catch(r){t._onError(r)}},"compacting...")},this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,V.Iu)("sortTitleShort"),e.onclick=function(){t._showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((e=document.createElement("button")).type="button",e.title=(0,V.Iu)("transformTitleShort"),e.className="jsoneditor-transform",e.onclick=function(){t._showTransformModal()},this.dom.transform=e,this.menu.appendChild(e)),(e=document.createElement("button")).type="button",e.className="jsoneditor-repair",e.title=(0,V.Iu)("repairTitle"),this.menu.appendChild(e),!(e.onclick=function(){t.json===void 0&&t.executeWithBusyMessage(function(){try{t.repair()}catch(r){t._onError(r)}},"repairing...")})!==this.options.history&&(this.history=new P(function(){t.dom.undo.disabled=!t.history.canUndo(),t.dom.redo.disabled=!t.history.canRedo()},function(r){return 2*r.text.length},x.oW),(e=document.createElement("button")).type="button",e.className="jsoneditor-undo jsoneditor-separator",e.title=(0,V.Iu)("undo"),e.onclick=function(){var r=t.history.undo();r&&t._applyHistory(r)},this.menu.appendChild(e),this.dom.undo=e,(e=document.createElement("button")).type="button",e.className="jsoneditor-redo",e.title=(0,V.Iu)("redo"),e.onclick=function(){var r=t.history.redo();r&&t._applyHistory(r)},this.menu.appendChild(e),this.dom.redo=e,this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new C.x(this.menu,this.options.modes,this.options.mode,function(r){try{t.setMode(r),t.modeSwitcher.focus()}catch(a){t._onError(a)}}))),this.errorTable=new N.Q({errorTableVisible:!0,onToggleVisibility:function(){t.validate()},onFocusLine:null,onChangeHeight:function(r){r=r+(t.dom.statusBar?t.dom.statusBar.clientHeight:0)+1,t.content.style.marginBottom=-r+"px",t.content.style.paddingBottom=r+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),i.statusBar&&((0,S.addClassName)(this.content,"has-status-bar"),e=document.createElement("div"),(this.dom.statusBar=e).className="jsoneditor-statusbar",this.frame.appendChild(e),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",e.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",e.appendChild(this.dom.arrayInfo),e.appendChild(this.errorTable.getErrorCounter()),e.appendChild(this.errorTable.getWarningIcon()),e.appendChild(this.errorTable.getErrorIcon())),this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var n=this.getText();this.dom.previewText.nodeValue=(0,S.limitCharacters)(n,x.WF),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,S.formatSize)(n.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(n){console.error("Error in onChange callback: ",n)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(n){console.error("Error in onChangeJSON callback: ",n)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(n){console.error("Error in onChangeText callback: ",n)}}},s=(c._showSortModal=function(){var n=this;this.executeWithBusyMessage(function(){var i=n.options.modalAnchor||x.qD,t=n.get();n._renderPreview(),(0,m.showSortModal)(i,t,function(e){n.executeWithBusyMessage(function(){var r,a,o;r=t,a=e,Array.isArray(r)&&(o=(0,S.sort)(r,a.path,a.direction),n.sortedBy=a,n._setAndFireOnChange(o)),(0,S.isObject)(r)&&(o=(0,S.sortObjectKeys)(r,a.direction),n.sortedBy=a,n._setAndFireOnChange(o))},"sorting...")},n.sortedBy)},"parsing...")},c._showTransformModal=function(){var n=this;this.executeWithBusyMessage(function(){var r=n.options,i=r.createQuery,t=r.executeQuery,e=r.modalAnchor,r=r.queryDescription,a=n.get();n._renderPreview(),(0,A.showTransformModal)({container:e||x.qD,json:a,queryDescription:r,createQuery:i,executeQuery:t,onTransform:function(o){n.executeWithBusyMessage(function(){var l=t(a,o);n._setAndFireOnChange(l)},"transforming...")}})},"parsing...")},c.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()},c.compact=function(){var n=this.get(),i=JSON.stringify(n);this._setTextAndFireOnChange(i,n)},c.format=function(){var n=this.get(),i=JSON.stringify(n,null,this.indentation);this._setTextAndFireOnChange(i,n)},c.repair=function(){var n=this.getText();try{var i=X()(n);this._setTextAndFireOnChange(i)}catch{}},c.focus=function(){this.dom.transform.focus()},c.set=function(n){this.history&&this.history.clear(),this._set(n)},c.update=function(n){this._set(n)},c._set=function(n){this.text=void 0,this.json=n,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},c._setAndFireOnChange=function(n){this._set(n),this._onChange()},c.get=function(){var n;return this.json===void 0&&(n=this.getText(),this.json=(0,S.parse)(n)),this.json},c.getText=function(){return this.text===void 0&&(this.text=JSON.stringify(this.json,null,this.indentation),this.options.escapeUnicode===!0&&(this.text=(0,S.escapeUnicodeChars)(this.text))),this.text},c.setText=function(n){this.history&&this.history.clear(),this._setText(n)},c.updateText=function(n){this.getText()!==n&&this._setText(n)},c._setText=function(n,i){var t;this.options.escapeUnicode===!0?this.text=(0,S.escapeUnicodeChars)(n):this.text=n,this.json=i,this._renderPreview(),this.json===void 0?(t=this).executeWithBusyMessage(function(){try{t.json=t.get(),t._renderPreview(),t._pushHistory()}catch{}},"parsing..."):this._pushHistory(),this._debouncedValidate()},c._setTextAndFireOnChange=function(n,i){this._setText(n,i),this._onChange()},c._applyHistory=function(n){this.json=n.json,this.text=n.text,this._renderPreview(),this._debouncedValidate()},c._pushHistory=function(){var n;this.history&&(n={text:this.text,json:this.json},this.history.add(n))},c.executeWithBusyMessage=function(n,i){var t;this.getText().length>x.EX?((0,S.addClassName)((t=this).frame,"busy"),t.dom.busyContent.innerText=i,setTimeout(function(){n(),(0,S.removeClassName)(t.frame,"busy"),t.dom.busyContent.innerText=""},100)):n()},c.validate=p.validate,c._renderErrors=p._renderErrors,[{mode:"preview",mixin:c,data:"json"}])},6210:function(ie,X,H){H.r(X),H.d(X,{showSortModal:function(){return D}});var X=H(483),x=H.n(X),N=H(7907),O=H(9791);function D(P,p,L,C){var m=Array.isArray(p)?(0,O.getChildPaths)(p):[""],A=C&&C.path&&(0,O.contains)(m,C.path)?C.path:m[0],S=C&&C.direction||"asc",p='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,N.Iu)("sort")+"</div><form><table><tbody><tr> <td>"+(0,N.Iu)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+(0,N.Iu)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+(0,N.Iu)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,N.Iu)("sortAscending")+'" title="'+(0,N.Iu)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,N.Iu)("sortDescending")+'" title="'+(0,N.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,N.Iu)("ok")+'" /></td></tr></tbody></table></form></div>';x()({parent:P,content:p,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(c){var s=c.modalElem().querySelector("form"),n=c.modalElem().querySelector("#ok"),i=c.modalElem().querySelector("#field"),t=c.modalElem().querySelector("#direction");function e(r){t.value=r,t.className="jsoneditor-button-group jsoneditor-button-group-value-"+t.value}m.forEach(function(r){var a,o=document.createElement("option");o.text=(a=r)===""?"@":a[0]==="."?a.slice(1):a,o.value=r,i.appendChild(o)}),i.value=A||m[0],e(S||"asc"),t.onclick=function(r){e(r.target.getAttribute("data-value"))},n.onclick=function(r){r.preventDefault(),r.stopPropagation(),c.close(),L({path:i.value,direction:t.value})},s&&(s.onsubmit=n.onclick)}).afterClose(function(c){c.destroy()}).show()}},2558:function(ie,x,H){H.r(x),H.d(x,{showTransformModal:function(){return A}});var x=H(483),X=H.n(x),x=H(3879),N=H.n(x),O=H(7907);function D(S){return(D=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})(S)}function P(S,p,c,s){if(typeof S=="boolean"||S instanceof Boolean||S===null||typeof S=="number"||S instanceof Number||typeof S=="string"||S instanceof String||S instanceof Date)return JSON.stringify(S);if(Array.isArray(S)){for(var n=S,i=p,t=c,e=s,r=i?t+i:void 0,a=i?`[
|
|
`:"[",o=0;o<n.length;o++){var l=n[o];if(i&&(a+=r),a+=l!==void 0&&typeof l!="function"?P(l,i,r,e):"null",o<n.length-1&&(a+=i?`,
|
|
`:","),a.length>e)return a+"..."}return a+=i?`
|
|
`+t+"]":"]"}if(S&&D(S)==="object"){var d,y=S,I=p,t=c,h=s,u=I?t+I:void 0,b=!0,w=I?`{
|
|
`:"{";if(typeof y.toJSON=="function")return P(y.toJSON(),I,t,h);for(d in y)if(function(B,E){return Object.prototype.hasOwnProperty.call(B,E)}(y,d)){var v=y[d];if(b?b=!1:w+=I?`,
|
|
`:",",(w=(w+=I?u+'"'+d+'": ':'"'+d+'":')+P(v,I,u,h)).length>h)return w+"..."}return w+=I?`
|
|
`+t+"}":"}"}}function V(S,p){for(var c="";0<p--;)c+=S;return c}var L=H(9791),C=H(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 A(r){var p=r.container,c=r.json,s=r.queryDescription,s=s===void 0?m:s,n=r.createQuery,i=r.executeQuery,t=r.onTransform,e=c,r='<label class="pico-modal-contents"><div class="pico-modal-header">'+(0,O.Iu)("transform")+"</div><p>"+s+'</p><div class="jsoneditor-jmespath-label">'+(0,O.Iu)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+(0,O.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="<"><</option> <option value="<="><=</option> <option value=">">></option> <option value=">=">>=</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,O.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,O.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,O.Iu)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+(0,O.Iu)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,O.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,O.Iu)("ok")+'" autofocus /></div></div>';X()({parent:p,content:r,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(a){var o=a.modalElem(),R=o.querySelector("#wizard"),l=o.querySelector("#ok"),d=o.querySelector("#filterField"),y=o.querySelector("#filterRelation"),I=o.querySelector("#filterValue"),h=o.querySelector("#sortField"),u=o.querySelector("#sortOrder"),b=o.querySelector("#selectFields"),w=o.querySelector("#query"),v=o.querySelector("#preview");Array.isArray(e)||(R.style.fontStyle="italic",R.textContent="(wizard not available for objects, only for arrays)"),(0,L.getChildPaths)(c).forEach(function(Z){var Z=F(Z),W=document.createElement("option"),W=(W.text=Z,W.value=Z,d.appendChild(W),document.createElement("option"));W.text=Z,W.value=Z,h.appendChild(W)});var R=(0,L.getChildPaths)(c,!0).filter(function(_){return _!==""}),R=(0<R.length?R.forEach(function(Z){var Z=F(Z),W=document.createElement("option");W.text=Z,W.value=Z,b.appendChild(W)}):(R=o.querySelector("#selectFieldsPart"))&&(R.style.display="none"),new(N())(d,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."})),B=new(N())(y,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),E=new(N())(h,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),T=new(N())(u,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),G=new(N())(b,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function F(_){return _===""?"@":_[0]==="."?_.slice(1):_}R.on("selectr.change",Y),B.on("selectr.change",Y),I.oninput=Y,E.on("selectr.change",Y),T.on("selectr.change",Y),G.on("selectr.change",Y),o.querySelector(".pico-modal-contents").onclick=function(_){_.target.nodeName!=="A"&&_.preventDefault()};var z=(0,L.debounce)(function(){try{var _=i(e,w.value);v.className="jsoneditor-transform-preview",v.value=(Z=_,W=2,f=C.WF,typeof W=="number"?10<W?k=V(" ",10):1<=W&&(k=V(" ",W)):typeof W=="string"&&W!==""&&(k=W),(W=P(Z,k,"",f)).length>f?(Z=W,(typeof(k=f)=="number"?Z.slice(0,k):Z)+"..."):W),l.disabled=!1}catch($){v.className="jsoneditor-transform-preview jsoneditor-error",v.value=$.toString(),l.disabled=!0}var Z,W,f,k},300);function K(_,Z){try{w.value=n(_,Z),l.disabled=!1,z()}catch(W){_='Error: an error happened when executing "createQuery": '+(W.message||W.toString()),w.value="",l.disabled=!0,v.className="jsoneditor-transform-preview jsoneditor-error",v.value=_}}function Y(){var _={};if(d.value&&y.value&&I.value&&(_.filter={field:d.value,relation:y.value,value:I.value}),h.value&&u.value&&(_.sort={field:h.value,direction:u.value}),b.value){for(var Z,W=[],f=0;f<b.options.length;f++)b.options[f].selected&&(Z=b.options[f].value,W.push(Z));_.projection={fields:W}}K(c,_)}w.oninput=z,l.onclick=function(_){_.preventDefault(),_.stopPropagation(),a.close(),t(w.value)},K(c,{}),setTimeout(function(){w.select(),w.focus(),w.selectionStart=3,w.selectionEnd=3})}).afterClose(function(a){a.destroy()}).show()}},8458:function(ie,i,H){H.r(i),H.d(i,{textModeMixins:function(){return r}});var i=H(3860),X=H.n(i),i=H(8170),x=H.n(i),N=H(4188),O=H(6436),D=H(2474),P=H(7907),V=H(6056),L=H(6617),C=H(6210),m=H(2558),A=H(9125),S=H(7026),p=H(9791);function c(a,o){for(var l=0;l<o.length;l++){var d=o[l];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}var s=function(){function a(d,y){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.schema=d,this.schemaRefs=y||{},this.suggestions={},this.suggestionsRefs={},this._buildSuggestions()}var o,l;return o=a,(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,y,I){I[d]=I[d]||{},I[d].refs=I[d].refs||[],I[d].refs=(0,p.uniqueMergeArrays)(I[d].refs,[y])}},{key:"_handleSchemaEntry",value:function(d,y,I){if(y)if(y.$ref)this._handleRef(d,y.$ref,I);else{var h=this._checkOfConditon(y);if(h)this._handleOfCondition(d,y[h],I);else switch(y.type){case"object":this._handleObject(d,y,I);break;case"string":case"number":case"integer":this._handlePrimitive(d,y,I);break;case"boolean":this._handleBoolean(d,y,I);break;case"array":this._handleArray(d,y,I)}}else console.error("SchemaTextCompleter: schema node is missing for path",d)}},{key:"_handleObject",value:function(d,y,I){var h,u=this;(0,p.isObject)(y.properties)&&(h=Object.keys(y.properties),I[d]=I[d]||{},I[d].props=I[d].props||[],I[d].props=(0,p.uniqueMergeArrays)(I[d].props,h),h.forEach(function(b){(0,p.asyncExec)(function(){u._handleSchemaEntry("".concat(d,"/").concat(b),y.properties[b],I)})}))}},{key:"_handlePrimitive",value:function(d,y,I){I[d]=I[d]||{},(0,p.isArray)(y.examples)&&(I[d].examples=I[d].examples||[],I[d].examples=(0,p.uniqueMergeArrays)(I[d].examples,y.examples)),(0,p.isArray)(y.enum)&&(I[d].enum=I[d].enum||[],I[d].enum=(0,p.uniqueMergeArrays)(I[d].enum,y.enum))}},{key:"_handleBoolean",value:function(d,y,I){I[d]||(I[d]={bool:[!0,!1]})}},{key:"_handleArray",value:function(d,y,I){var h=this;y.items&&(0,p.asyncExec)(function(){h._handleSchemaEntry("".concat(d,"/\\d+"),y.items,I)})}},{key:"_handleOfCondition",value:function(d,y,I){var h=this;y&&y.length&&y.forEach(function(u){(0,p.asyncExec)(function(){h._handleSchemaEntry(d,u,I)})})}},{key:"_checkOfConditon",value:function(d){if(d)return d.oneOf?"oneOf":d.anyOf?"anyOf":d.allOf?"allOf":void 0}},{key:"getCompletions",value:function(d,y,I,h,u){var b=this;try{var w=S.parse(y.getValue()).pointers||{},v=function(R){function B(G){var F,z={props:"property",enum:"enum",bool:"boolean",examples:"examples"};R&&(F=R[G])!=null&&F.length&&(E=E.concat(R[G].map(function(K){return{caption:K+"",meta:"schema [".concat(z[G],"]"),score:T++,value:K+""}})))}var E=[],T=0;B("props"),B("enum"),B("bool"),B("examples"),E.length&&u(null,E)};Object.keys(w).forEach(function(R){(0,p.asyncExec)(function(){function B(G,F,z){var K,Y=Object.keys(F).reduce(function(f,k){return new RegExp("^".concat(z).concat(k)).test(G)&&(!f||f.length<k.length)?k:f});if(typeof Y=="string"){if((K=F[Y])!=null&&(K=K.refs)!=null&&K.length){var _,Z={};for(_ in F[Y].refs){var W=F[Y].refs[_];b.suggestionsRefs[W]&&((W=B(G,b.suggestionsRefs[W],"".concat(z).concat(Y)))!=null&&W.enum&&(Z.enum=(0,p.uniqueMergeArrays)(Z.enum,W.enum)),W!=null&&W.examples&&(Z.examples=(0,p.uniqueMergeArrays)(Z.examples,W.examples)),W!=null&&W.bool&&(Z.bool=(0,p.uniqueMergeArrays)(Z.bool,W.bool)),W!=null&&W.props&&(Z.props=(0,p.uniqueMergeArrays)(Z.props,W.props)))}return Z}if(new RegExp("^".concat(z).concat(Y,"$")).test(G))return console.log("SchemaTextCompleter: Text suggestion match",{path:G,schemaPath:"".concat(z).concat(Y),suggestions:F[Y]}),F[Y]}}var E,T;((T=w[R].key)==null?void 0:T.line)===I.row&&I.column>=w[R].key.column&&I.column<=w[R].keyEnd.column&&(E=R.slice(0,R.lastIndexOf("/"))),(E=((T=w[R].value)==null?void 0:T.line)===I.row&&((T=w[R].value)==null?void 0:T.line)===((T=w[R].valueEnd)==null?void 0:T.line)&&I.column>=w[R].value.column&&I.column<=w[R].valueEnd.column?R:E)&&(T=B(E,b.suggestions,""),v(T))})})}catch{}}}])&&c(o.prototype,l),Object.defineProperty(o,"prototype",{writable:!1}),a}();function n(a){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(a)}var i={},t="ace/theme/jsoneditor";function e(){try{this.format()}catch{}}i.create=function(b){var o,l,d,y=this,I=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},h=(I.statusBar===void 0&&(I.statusBar=!0),I.mainMenuBar=I.mainMenuBar!==!1,I.enableSort=I.enableSort!==!1,I.enableTransform=I.enableTransform!==!1,I.createQuery=I.createQuery||V.r,I.executeQuery=I.executeQuery||V.J,typeof(this.options=I).indentation=="number"?this.indentation=Number(I.indentation):this.indentation=2,(0,P.cC)(this.options.languages),(0,P.m0)(this.options.language),I.ace||x()),u=(this.mode=I.mode==="code"?"code":"text",this.mode==="code"&&h===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=I.theme||t,this.theme===t&&h&&(0,A.O)(),I.onTextSelectionChange&&this.onTextSelectionChange(I.onTextSelectionChange),this),b=(this.container=b,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0,this._debouncedValidate=(0,p.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=b.clientWidth,this.height=b.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(w){w.preventDefault()},this.frame.onkeydown=function(w){u._onKeyDown(w)},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),b=(this.frameFocusTracker=new D.R(b),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,p.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(b=document.createElement("button")).type="button",b.className="jsoneditor-format",b.title=(0,P.Iu)("formatTitle"),this.menu.appendChild(b),b.onclick=function(){try{u.format(),u._onChange()}catch(w){u._onError(w)}},(b=document.createElement("button")).type="button",b.className="jsoneditor-compact",b.title=(0,P.Iu)("compactTitle"),this.menu.appendChild(b),b.onclick=function(){try{u.compact(),u._onChange()}catch(w){u._onError(w)}},this.options.enableSort&&((b=document.createElement("button")).type="button",b.className="jsoneditor-sort",b.title=(0,P.Iu)("sortTitleShort"),b.onclick=function(){u._showSortModal()},this.menu.appendChild(b)),this.options.enableTransform&&((b=document.createElement("button")).type="button",b.title=(0,P.Iu)("transformTitleShort"),b.className="jsoneditor-transform",b.onclick=function(){u._showTransformModal()},this.menu.appendChild(b)),(b=document.createElement("button")).type="button",b.className="jsoneditor-repair",b.title=(0,P.Iu)("repairTitle"),this.menu.appendChild(b),b.onclick=function(){try{u.repair(),u._onChange()}catch(w){u._onError(w)}},this.mode==="code"&&((b=document.createElement("button")).type="button",b.className="jsoneditor-undo jsoneditor-separator",b.title=(0,P.Iu)("undo"),b.onclick=function(){y.aceEditor.getSession().getUndoManager().undo()},this.menu.appendChild(b),this.dom.undo=b,(b=document.createElement("button")).type="button",b.className="jsoneditor-redo",b.title=(0,P.Iu)("redo"),b.onclick=function(){y.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(b),this.dom.redo=b),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new L.x(this.menu,this.options.modes,this.options.mode,function(w){try{u.setMode(w),u.modeSwitcher.focus()}catch(v){u._onError(v)}})),this.mode==="code"&&((o=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),o.href="https://ace.c9.io/",o.target="_blank",o.className="jsoneditor-poweredBy",o.onclick=function(){window.open(o.href,o.target,"noreferrer")},this.menu.appendChild(o))),this.options.onEditable&&n(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=(h=h.edit(this.editorDom)).getSession(),h.$blockScrolling=1/0,h.setTheme(this.theme),h.setOptions({readOnly:b}),h.setShowPrintMargin(!1),h.setFontSize("14px"),d.setMode("ace/mode/json"),d.setTabSize(this.indentation),d.setUseSoftTabs(!0),d.setUseWrapMode(!0),l=d.setAnnotations,d.setAnnotations=function(w){l.call(this,w&&w.length?w:u.annotations)},h.commands.bindKey("Ctrl-L",null),h.commands.bindKey("Command-L",null),h.commands.bindKey("Ctrl-\\",null),h.commands.bindKey("Command-\\",null),h.commands.bindKey("Ctrl-Shift-\\",null),h.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=h).on("change",this._onChange.bind(this)),h.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=b,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(),this.errorTable=new O.Q({errorTableVisible:this.mode==="text",onToggleVisibility:function(){u._validateAndCatch()},onFocusLine:function(w){u.isFocused=!0,isNaN(w)||u.setTextSelection({row:w,column:1},{row:w,column:1e3})},onChangeHeight:function(w){w=w+(u.dom.statusBar?u.dom.statusBar.clientHeight:0)+1,u.content.style.marginBottom=-w+"px",u.content.style.paddingBottom=w+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),I.statusBar&&((0,p.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},h=document.createElement("div"),(this.dom.statusBar=h).className="jsoneditor-statusbar",this.frame.appendChild(h),(b=document.createElement("span")).className="jsoneditor-curserinfo-label",b.innerText="Ln:",(d=document.createElement("span")).className="jsoneditor-curserinfo-val",d.innerText="1",h.appendChild(b),h.appendChild(d),(I=document.createElement("span")).className="jsoneditor-curserinfo-label",I.innerText="Col:",(b=document.createElement("span")).className="jsoneditor-curserinfo-val",b.innerText="1",h.appendChild(I),h.appendChild(b),this.curserInfoElements.colVal=b,this.curserInfoElements.lnVal=d,(I=document.createElement("span")).className="jsoneditor-curserinfo-label",I.innerText="characters selected",I.style.display="none",(b=document.createElement("span")).className="jsoneditor-curserinfo-count",b.innerText="0",b.style.display="none",this.curserInfoElements.countLabel=I,this.curserInfoElements.countVal=b,h.appendChild(b),h.appendChild(I),h.appendChild(this.errorTable.getErrorCounter()),h.appendChild(this.errorTable.getWarningIcon()),h.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},i._onSchemaChange=function(a,o){this.aceEditor&&(this.options.allowSchemaSuggestions&&a?(this.aceEditor.setOption("enableBasicAutocompletion",[new s(a,o)]),this.aceEditor.setOption("enableLiveAutocompletion",!0)):(this.aceEditor.setOption("enableBasicAutocompletion",void 0),this.aceEditor.setOption("enableLiveAutocompletion",!1)))},i._onChange=function(){var a=this;if(!this.onChangeDisabled){if(setTimeout(function(){a._updateHistoryButtons&&a._updateHistoryButtons()}),this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(o){console.error("Error in onChange callback: ",o)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(o){console.error("Error in onChangeText callback: ",o)}}},i._updateHistoryButtons=function(){var a;this.aceEditor&&this.dom.undo&&this.dom.redo&&(a=this.aceEditor.getSession().getUndoManager())&&a.hasUndo&&a.hasRedo&&(this.dom.undo.disabled=!a.hasUndo(),this.dom.redo.disabled=!a.hasRedo())},i._showSortModal=function(){try{var a=this,o=this.options.modalAnchor||N.qD,l=this.get();(0,C.showSortModal)(o,l,function(d){var y;Array.isArray(l)&&(y=(0,p.sort)(l,d.path,d.direction),a.sortedBy=d,a.update(y)),(0,p.isObject)(l)&&(y=(0,p.sortObjectKeys)(l,d.direction),a.sortedBy=d,a.update(y))},a.sortedBy)}catch(d){this._onError(d)}},i._showTransformModal=function(){var a=this;try{var o=this.options,l=o.modalAnchor,d=o.createQuery,y=o.executeQuery,I=o.queryDescription,h=this.get();(0,m.showTransformModal)({container:l||N.qD,json:h,queryDescription:I,createQuery:d,executeQuery:y,onTransform:function(u){u=y(h,u),a.update(u)}})}catch(u){this._onError(u)}},i._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},i._onKeyDown=function(a){var o=!1;(a.which||a.keyCode)===73&&a.ctrlKey&&(a.shiftKey?this.compact():this.format(),this._onChange(),o=!0),o&&(a.preventDefault(),a.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},i._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},i._onBlur=function(){var a=this;setTimeout(function(){a.isFocused||(a._updateCursorInfo(),a._emitSelectionChange()),a.isFocused=!1})},i._updateCursorInfo=function(){var a,o,l,d,y,I=this;function h(){I.curserInfoElements.countVal.innerText!==y&&(I.curserInfoElements.countVal.innerText=y,I.curserInfoElements.countVal.style.display=y?"inline":"none",I.curserInfoElements.countLabel.style.display=y?"inline":"none"),I.curserInfoElements.lnVal.innerText=l,I.curserInfoElements.colVal.innerText=d}this.textarea?setTimeout(function(){var u=(0,p.getInputSelection)(I.textarea);u.startIndex!==u.endIndex&&(y=u.endIndex-u.startIndex),d=(y&&I.cursorInfo&&I.cursorInfo.line===u.end.row&&I.cursorInfo.column===u.end.column?(l=u.start.row,u.start):(l=u.end.row,u.end)).column,I.cursorInfo={line:l,column:d,count:y},I.options.statusBar&&h()},0):this.aceEditor&&this.curserInfoElements&&(a=this.aceEditor.getCursorPosition(),o=this.aceEditor.getSelectedText(),l=a.row+1,d=a.column+1,y=o.length,I.cursorInfo={line:l,column:d,count:y},this.options.statusBar&&h())},i._emitSelectionChange=function(){var a;this._selectionChangedHandler&&(a=this.getTextSelection(),this._selectionChangedHandler(a.start,a.end,a.text))},i._refreshAnnotations=function(){var a,o=this.aceEditor&&this.aceEditor.getSession();o&&(a=o.getAnnotations().filter(function(l){return l.type==="error"}),o.setAnnotations(a))},i.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()},i.compact=function(){var a=this.get(),a=JSON.stringify(a);this.updateText(a)},i.format=function(){var a=this.get(),a=JSON.stringify(a,null,this.indentation);this.updateText(a)},i.repair=function(){var a=this.getText();try{var o=X()(a);this.updateText(o)}catch{}},i.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},i.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},i.set=function(a){this.setText(JSON.stringify(a,null,this.indentation))},i.update=function(a){this.updateText(JSON.stringify(a,null,this.indentation))},i.get=function(){var a=this.getText();return(0,p.parse)(a)},i.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},i._setText=function(y,o){var l,d=this,y=this.options.escapeUnicode===!0?(0,p.escapeUnicodeChars)(y):y;this.textarea&&(this.textarea.value=y),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(y,-1),this.onChangeDisabled=!1,o&&(l=this,setTimeout(function(){l.aceEditor&&l.aceEditor.session.getUndoManager().reset()})),setTimeout(function(){d._updateHistoryButtons&&d._updateHistoryButtons()})),this._debouncedValidate()},i.setText=function(a){this._setText(a,!0)},i.updateText=function(a){this.getText()!==a&&this._setText(a,!1)},i.validate=function(){var a,o=this,l=[],d=[];try{var y=this.get(),I=(this.validateSchema&&!this.validateSchema(y)&&(l=this.validateSchema.errors.map(function(u){return u.type="validation",(0,p.improveSchemaError)(u)})),this.validationSequence=(this.validationSequence||0)+1,this),h=this.validationSequence;return function(u,b){if(!b)return Promise.resolve([]);try{var w=b(u);return((0,p.isPromise)(w)?w:Promise.resolve(w)).then(function(v){return Array.isArray(v)?v.filter(function(R){var B=(0,p.isValidValidationError)(R);return B||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',R),B}).map(function(R){return{dataPath:(0,p.stringifyPath)(R.path),message:R.message,type:"customValidation"}}):[]})}catch(v){return Promise.reject(v)}}(y,this.options.onValidate).then(function(u){return h===I.validationSequence&&(u=l.concat(d).concat(u),I._renderErrors(u),typeof o.options.onValidationError=="function"&&(0,p.isValidationErrorChanged)(u,o.lastSchemaErrors)&&o.options.onValidationError.call(o,u),o.lastSchemaErrors=u),o.lastSchemaErrors})}catch(u){return this.getText()&&((y=/\w*line\s*(\d+)\w*/g.exec(u.message))&&(a=+y[1]),d=[{type:"error",message:u.message.replace(/\n/g,"<br>"),line:a}]),this._renderErrors(d),typeof this.options.onValidationError=="function"&&(0,p.isValidationErrorChanged)(d,this.lastSchemaErrors)&&this.options.onValidationError.call(this,d),this.lastSchemaErrors=d,Promise.resolve(this.lastSchemaErrors)}},i._validateAndCatch=function(){this.validate().catch(function(a){console.error("Error running validation:",a)})},i._renderErrors=function(a){var l=this.getText(),o=[],l=(a.reduce(function(d,y){return typeof y.dataPath=="string"&&d.indexOf(y.dataPath)===-1&&d.push(y.dataPath),d},o),(0,p.getPositionForPath)(l,o));this.aceEditor&&(this.annotations=l.map(function(d){var y=a.filter(function(h){return h.dataPath===d.path}),I=y.map(function(h){return h.message}).join(`
|
|
`);return I?{row:d.line,column:d.column,text:"Schema validation error"+(y.length!==1?"s":"")+`:
|
|
`+I,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(a,l),this.aceEditor&&this.aceEditor.resize(!1)},i.getTextSelection=function(){var a,o,l,d={};return this.textarea?(l=(0,p.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(),a=this.aceEditor.getSelectedText(),o=l.getRange(),(l=l.getSelectionLead()).row===o.end.row&&l.column===o.end.column?d=o:(d.start=o.end,d.end=o.start),{start:{row:d.start.row+1,column:d.start.column+1},end:{row:d.end.row+1,column:d.end.column+1},text:a}):void 0},i.onTextSelectionChange=function(a){typeof a=="function"&&(this._selectionChangedHandler=(0,p.debounce)(a,this.DEBOUNCE_INTERVAL))},i.setTextSelection=function(a,o){var l,d,y;a&&o&&(this.textarea?(l=(0,p.getIndexForPosition)(this.textarea,a.row,a.column),y=(0,p.getIndexForPosition)(this.textarea,o.row,o.column),-1<l&&-1<y&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(l,y)):this.textarea.createTextRange&&((d=this.textarea.createTextRange()).collapse(!0),d.moveEnd("character",y),d.moveStart("character",l),d.select()),y=(this.textarea.value.match(/\n/g)||[]).length+1,l=this.textarea.scrollHeight/y,d=a.row*l,this.textarea.scrollTop=d>this.textarea.clientHeight?d-this.textarea.clientHeight/2:0)):this.aceEditor&&(y={start:{row:a.row-1,column:a.column-1},end:{row:o.row-1,column:o.column-1}},this.aceEditor.selection.setRange(y),this.aceEditor.scrollToLine(a.row-1,!0)))};var r=[{mode:"text",mixin:i,data:"text",load:e},{mode:"code",mixin:i,data:"text",load:e}]},8038:function(ie,F,K){K.r(F),K.d(F,{treeModeMixins:function(){return Y}});var X={start:function(_,Z,W){return Z.indexOf(_)===0},contain:function(_,Z,W){return-1<Z.indexOf(_)}},x=K(897),N=K(2474);function O(_,Z){for(var W=0;W<Z.length;W++){var f=Z[W];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(_,f.key,f)}}var D=function(){function _(){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.locked=!1}var Z,W;return Z=_,(W=[{key:"highlight",value:function(f){this.locked||(this.node!==f&&(this.node&&this.node.setHighlight(!1),this.node=f,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var f;this.locked||(f=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){f.node.setHighlight(!1),f.node=void 0,f.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}}])&&O(Z.prototype,W),Object.defineProperty(Z,"prototype",{writable:!1}),_}(),P=K(7907),V=K(6056),L=K(6617),F=K(233),C=K.n(F),m=K(2602),A=K(9791),S=K(6210),p=K(2558),c=K(4188);function s(_){return function(Z){if(Array.isArray(Z))return e(Z)}(_)||function(Z){if(typeof Symbol!="undefined"&&Z[Symbol.iterator]!=null||Z["@@iterator"]!=null)return Array.from(Z)}(_)||t(_)||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(_,Z){return function(W){if(Array.isArray(W))return W}(_)||function(W,f){var k=W==null?null:typeof Symbol!="undefined"&&W[Symbol.iterator]||W["@@iterator"];if(k!=null){var $,M,j=[],Q=!0,te=!1;try{for(k=k.call(W);!(Q=($=k.next()).done)&&(j.push($.value),!f||j.length!==f);Q=!0);}catch(he){te=!0,M=he}finally{try{Q||k.return==null||k.return()}finally{if(te)throw M}}return j}}(_,Z)||t(_,Z)||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 i(_,Z){var W,f,k,$,M=typeof Symbol!="undefined"&&_[Symbol.iterator]||_["@@iterator"];if(M)return f=!(W=!0),{s:function(){M=M.call(_)},n:function(){var j=M.next();return W=j.done,j},e:function(j){f=!0,k=j},f:function(){try{W||M.return==null||M.return()}finally{if(f)throw k}}};if(Array.isArray(_)||(M=t(_))||Z&&_&&typeof _.length=="number")return M&&(_=M),$=0,{s:Z=function(){},n:function(){return $>=_.length?{done:!0}:{done:!1,value:_[$++]}},e:function(j){throw j},f:Z};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 t(_,Z){var W;if(_)return typeof _=="string"?e(_,Z):(W=(W=Object.prototype.toString.call(_).slice(8,-1))==="Object"&&_.constructor?_.constructor.name:W)==="Map"||W==="Set"?Array.from(_):W==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W)?e(_,Z):void 0}function e(_,Z){(Z==null||Z>_.length)&&(Z=_.length);for(var W=0,f=new Array(Z);W<Z;W++)f[W]=_[W];return f}function r(_){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z})(_)}function a(_,Z){for(var W=0;W<Z.length;W++){var f=Z[W];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(_,f.key,f)}}var o=function(){function _(f,k){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");this.editor=f,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,A.debounce)(this._onChangeValue.bind(this),_.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,A.debounce)(this._onChangeField.bind(this),_.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}var Z,W;return Z=_,(W=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:l}},{key:"_updateEditability",value:function(){var f,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"||(f=this.getValue.bind(this),typeof(k=this.editor.options.onEditable({field:this.field,get value(){return f()},path:this.getPath()}))=="boolean"?(this.editable.field=k,this.editable.value=k):r(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 f=this,k=[];f;){var $=f.getName();$!==void 0&&k.unshift($),f=f.parent}return k}},{key:"getInternalPath",value:function(){for(var f=this,k=[];f;)f.parent&&k.unshift(f.getIndex()),f=f.parent;return k}},{key:"getName",value:function(){return this.parent?this.parent.type!=="array"?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(f){if(f){if(f.length===0)return this;if(f.length&&this.childs&&this.childs.length){for(var k=0;k<this.childs.length;++k)if(""+f[0]==""+this.childs[k].getName())return this.childs[k].findNodeByPath(f.slice(1))}}}},{key:"findNodeByInternalPath",value:function(f){if(f){for(var M=this,k=0;k<f.length&&M;k++)var $=f[k],M=M.childs[$];return M}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(f){for(var k=(0,A.parsePath)(f),$=this;$&&0<k.length;)(function(){var M=k.shift();if(typeof M=="number"){if($.type!=="array")throw new Error("Cannot get child node at index "+M+": node is no array");$=$.childs[M]}else{if($.type!=="object")throw new Error("Cannot get child node "+M+": node is no object");$=$.childs.filter(function(j){return j.field===M})[0]}})();return $}},{key:"findParents",value:function(){for(var f=[],k=this.parent;k;)f.unshift(k),k=k.parent;return f}},{key:"setError",value:function(f,k){this.error=f,this.errorChild=k,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var f=this,k=this.fieldError||this.valueError||this.error,$=this.dom.tdError;if(k&&this.dom&&this.dom.tr){(0,A.addClassName)(this.dom.tr,"jsoneditor-validation-error"),$||($=document.createElement("td"),this.dom.tdError=$,this.dom.tdValue.parentNode.appendChild($));var M=document.createElement("button"),j=(M.type="button",M.className="jsoneditor-button jsoneditor-schema-error",function(){f.dom.popupAnchor&&f.dom.popupAnchor.destroy()}),Q=function(){delete f.dom.popupAnchor},te=function(Ce){var ue=f.editor.frame,Ce=(f.dom.popupAnchor=(0,m.w)(M,f.editor.getPopupAnchor(),Q,Ce),M.getBoundingClientRect()),ue=120<ue.getBoundingClientRect().width-Ce.x?"jsoneditor-above":"jsoneditor-left",Ce=document.createElement("div");Ce.className="jsoneditor-popover "+ue,Ce.appendChild(document.createTextNode(k.message)),f.dom.popupAnchor.appendChild(Ce)},he=(M.onmouseover=function(){f.dom.popupAnchor||te(!0)},M.onfocus=function(){j(),te(!1)},M.onblur=function(){j()},this.errorChild);for(he&&(M.onclick=function(){he.findParents().forEach(function(Ae){Ae.expand(!1)}),he.scrollTo(function(){he.focus()})});$.firstChild;)$.removeChild($.firstChild);$.appendChild(M)}else this.dom.tr&&(0,A.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),$&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){var f;return this.parent?(f=this.parent.childs.indexOf(this))!==-1?f:null:-1}},{key:"setParent",value:function(f){this.parent=f}},{key:"setField",value:function(f,k){this.field=f,this.previousField=f,this.fieldEditable=k===!0}},{key:"getField",value:function(){return this.field===void 0&&this._getDomField(),this.field}},{key:"setValue",value:function(f,k){var $,M,j,Q,te,he,Ae=this.childs;if(this.type=this._getType(f),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=[]),$=0;$<f.length;$++)(te=f[$])===void 0||te instanceof Function||($<this.childs.length?((j=this.childs[$]).fieldEditable=!1,j.index=$,j.setValue(te)):(j=new _(this.editor,{value:te}),Q=$<this.getMaxVisibleChilds(),this.appendChild(j,Q,!1)));for(M=this.childs.length;M>=f.length;M--)this.removeChild(this.childs[M],!1)}else if(this.type==="object"){for(this.childs||(this.childs=[]),M=this.childs.length-1;0<=M;M--)I(f,this.childs[M].field)||this.removeChild(this.childs[M],!1);for(var ue in $=0,f)I(f,ue)&&((te=f[ue])===void 0||te instanceof Function||((he=this.findChildByProperty(ue))?(he.setField(ue,!0),he.setValue(te)):(he=new _(this.editor,{field:ue,value:te}),ue=$<this.getMaxVisibleChilds(),this.appendChild(he,ue,!1))),$++);!(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=f;Array.isArray(Ae)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(f){var k,$,M,j,Q,te=this.childs;if(this.type=f.type,f.type==="array"){for(this.childs||(this.childs=[]),j=0;j<f.childs.length;j++)(k=f.childs[j])===void 0||k instanceof Function||(j<this.childs.length?(($=this.childs[j]).fieldEditable=!1,$.index=j,$.setInternalValue(k)):($=new _(this.editor,{internalValue:k}),M=j<this.getMaxVisibleChilds(),this.appendChild($,M,!1)));for(Q=this.childs.length;Q>=f.childs.length;Q--)this.removeChild(this.childs[Q],!1)}else if(f.type==="object"){for(this.childs||(this.childs=[]),j=0;j<f.childs.length;j++)(k=f.childs[j])===void 0||k instanceof Function||(j<this.childs.length?(delete($=this.childs[j]).index,$.setField(k.field,!0),$.setInternalValue(k.value)):($=new _(this.editor,{field:k.field,internalValue:k.value}),M=j<this.getMaxVisibleChilds(),this.appendChild($,M,!1)));for(Q=this.childs.length;Q>=f.childs.length;Q--)this.removeChild(this.childs[Q],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=f.value;Array.isArray(te)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var f;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(f=this._detachFromDom(),this.clearDom(),this._attachToDom(f)):this.clearDom()}},{key:"getValue",value:function(){var f,k;return this.type==="array"?(f=[],this.childs.forEach(function($){f.push($.getValue())}),f):this.type==="object"?(k={},this.childs.forEach(function($){k[$.getField()]=$.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(f){return f.getInternalValue()})}:this.type==="object"?{type:this.type,childs:this.childs.map(function(f){return{field:f.getField(),value:f.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 f=this.parent?this.parent.getNodePath():[];return f.push(this),f}},{key:"clone",value:function(){var f,k;return(f=new _(this.editor)).type=this.type,f.field=this.field,f.fieldInnerText=this.fieldInnerText,f.fieldEditable=this.fieldEditable,f.previousField=this.previousField,f.value=this.value,f.valueInnerText=this.valueInnerText,f.previousValue=this.previousValue,f.expanded=this.expanded,f.visibleChilds=this.visibleChilds,this.childs?(k=[],this.childs.forEach(function($){$=$.clone(),$.setParent(f),k.push($)}),f.childs=k):f.childs=void 0,f}},{key:"expand",value:function(f){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),f!==!1&&this.childs.forEach(function(k){k.expand(f)}),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(f){this.childs&&(this.hideChilds(),f!==!1&&this.childs.forEach(function(k){k.collapse(f)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var f=this.childs;if(f&&this.expanded){var f=this.dom.tr,k=f?f.parentNode:void 0;if(k){for(var $=this.getAppendDom(),M=($.parentNode||((j=f.nextSibling)?k.insertBefore($,j):k.appendChild($)),Math.min(this.childs.length,this.visibleChilds)),j=this._getNextTr(),Q=0;Q<M;Q++){var te=this.childs[Q];te.getDom().parentNode||k.insertBefore(te.getDom(),j),te.showChilds()}f=this.getShowMoreDom(),j=this._getNextTr(),f.parentNode||k.insertBefore(f,j),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(f){var k=this.dom.tr,$=k?k.parentNode:void 0;$&&$.removeChild(k),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(f)}},{key:"hideChilds",value:function(f){var k;this.childs&&this.expanded&&((k=this.getAppendDom()).parentNode&&k.parentNode.removeChild(k),this.childs.forEach(function($){$.hide()}),(k=this.getShowMoreDom()).parentNode&&k.parentNode.removeChild(k),f&&!f.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var f,k;this.dom.field&&this.editor&&this.editor.options&&typeof this.editor.options.onClassName=="function"&&this.dom.tree&&((0,A.removeAllClassNames)(this.dom.tree),f=this.getValue.bind(this),k=this.editor.options.onClassName({path:this.getPath(),field:this.field,get value(){return f()}})||"",(0,A.addClassName)(this.dom.tree,"jsoneditor-values "+k))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var f=0;f<this.childs.length;f++)this.childs[f].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var f=this.parent;f;)f.expanded||f.expand(),f=f.parent}},{key:"appendChild",value:function(f,k,$){var M,j;this._hasChilds()&&(f.setParent(this),f.fieldEditable=this.type==="object",this.type==="array"&&(f.index=this.childs.length),this.type==="object"&&f.field===void 0&&f.setField(""),this.childs.push(f),this.expanded&&k!==!1&&(k=f.getDom(),j=(M=this._getNextTr())?M.parentNode:void 0,M&&j&&j.insertBefore(k,M),f.showChilds(),this.visibleChilds++),$!==!1&&(this.updateDom({updateIndexes:!0}),f.updateDom({recurse:!0})))}},{key:"moveBefore",value:function(f,k,$){var M,j,Q;this._hasChilds()&&((M=this.dom.tr?this.dom.tr.parentNode:void 0)&&((j=document.createElement("tr")).style.height=M.clientHeight+"px",M.appendChild(j)),f.parent&&f.parent.removeChild(f),k instanceof h||!k?this.childs.length+1>this.visibleChilds?(Q=this.childs[this.visibleChilds-1],this.insertBefore(f,Q,$)):this.appendChild(f,!0,$):this.insertBefore(f,k,$),M&&j&&M.removeChild(j))}},{key:"insertBefore",value:function(f,k,$){if(this._hasChilds()){if(this.visibleChilds++,this.type==="object"&&f.field===void 0&&f.setField(""),k===this.append)f.setParent(this),f.fieldEditable=this.type==="object",this.childs.push(f);else{var M=this.childs.indexOf(k);if(M===-1)throw new Error("Node not found");f.setParent(this),f.fieldEditable=this.type==="object",this.childs.splice(M,0,f)}var j;this.expanded&&(M=f.getDom(),j=(k=k.getDom())?k.parentNode:void 0,k&&j&&j.insertBefore(M,k),f.showChilds(),this.showChilds()),$!==!1&&(this.updateDom({updateIndexes:!0}),f.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(f,k){this._hasChilds()&&(k=this.childs.indexOf(k),(k=this.childs[k+1])?this.insertBefore(f,k):this.appendChild(f))}},{key:"search",value:function(f,k){Array.isArray(k)||(k=[]);var $=f?f.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($)!==-1&&(this.searchField=!0,k.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach(function(M){M.search(f,k)}):this.value!==void 0&&k.length<=this.MAX_SEARCH_RESULTS&&(String(this.value).toLowerCase().indexOf($)!==-1&&(this.searchValue=!0,k.push({node:this,elem:"value"})),this._updateDomValue()),k}},{key:"scrollTo",value:function(f){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,f)}},{key:"expandPathToNode",value:function(){for(var f=this;f&&f.parent;){for(var k=f.parent.type==="array"?f.index:f.parent.childs.indexOf(f);f.parent.visibleChilds<k+1;)f.parent.visibleChilds+=this.getMaxVisibleChilds();f.parent.expand(!1),f=f.parent}}},{key:"focus",value:function(f){if(_.focusElement=f,this.dom.tr&&this.dom.tr.parentNode){var k=this.dom;switch(f){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,A.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,A.selectContentEditable)(k.value)):k.menu.focus();break;case"field":k.field&&this.fieldEditable?(k.field.focus(),(0,A.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,A.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,A.selectContentEditable)(k.value)):k.field&&this.fieldEditable?(k.field.focus(),(0,A.selectContentEditable)(k.field)):(this._hasChilds()?k.expand:k.menu).focus()}}}},{key:"containsNode",value:function(f){if(this===f)return!0;var k=this.childs;if(k){for(var $=0,M=k.length;$<M;$++)if(k[$].containsNode(f))return!0}return!1}},{key:"removeChild",value:function(f,k){if(this.childs){var $=this.childs.indexOf(f);if($!==-1)return $<this.visibleChilds&&this.expanded&&this.visibleChilds--,f.hide(),delete f.searchField,delete f.searchValue,(f=this.childs.splice($,1)[0]).parent=null,k!==!1&&this.updateDom({updateIndexes:!0}),f}}},{key:"_remove",value:function(f){this.removeChild(f)}},{key:"changeType",value:function(f){var k,$=this.type;$!==f&&(f!=="string"&&f!=="auto"||$!=="string"&&$!=="auto"?(k=this._detachFromDom(),this.clearDom(),(this.type=f)==="object"?(this.childs||(this.childs=[]),this.childs.forEach(function(M){M.clearDom(),delete M.index,M.fieldEditable=!0,M.field===void 0&&(M.field="")}),$!=="string"&&$!=="auto"||(this.expanded=!0)):f==="array"?(this.childs||(this.childs=[]),this.childs.forEach(function(M,j){M.clearDom(),M.fieldEditable=!1,M.index=j}),$!=="string"&&$!=="auto"||(this.expanded=!0)):this.expanded=!1,this._attachToDom(k)):this.type=f,f!=="auto"&&f!=="string"||(this.value=f==="string"?String(this.value):(0,A.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(f){var k;if(this.type==="array"){if(!Array.isArray(f)||this.childs.length!==f.length)return!1;for(k=0;k<this.childs.length;k++)if(!this.childs[k].deepEqual(f[k]))return!1}else if(this.type==="object"){if(r(f)!=="object"||!f)return!1;var $=Object.keys(f);if(this.childs.length!==$.length)return!1;for(k=0;k<$.length;k++){var M=this.childs[k];if(M.field!==$[k]||!M.deepEqual(f[M.field]))return!1}}else if(this.value!==f)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&this.type!=="array"&&this.type!=="object"&&(this.valueInnerText=(0,A.getInnerText)(this.dom.value),this.valueInnerText===""&&this.dom.value.innerHTML!==""&&(this.dom.value.textContent="")),this.valueInnerText!==void 0)try{var f,k;(k=this.type==="string"?this._unescapeHTML(this.valueInnerText):(f=this._unescapeHTML(this.valueInnerText),(0,A.parseString)(f)))!==this.value&&(this.value=k,this._debouncedOnChangeValue())}catch{this._setValueError((0,P.Iu)("cannotParseValueError"))}}},{key:"_setValueError",value:function(f){this.valueError={message:f},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(f){this.fieldError={message:f},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var f,k=this.editor.getDomSelection(),$=(k.range&&($=(0,A.textDiff)(String(this.value),String(this.previousValue)),k.range.startOffset=$.start,k.range.endOffset=$.end),this.editor.getDomSelection());$.range&&(f=(0,A.textDiff)(String(this.previousValue),String(this.value)),$.range.startOffset=f.start,$.range.endOffset=f.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:k,newSelection:$}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var f=this.editor.getDomSelection(),k=this.previousField||"",$=(f.range&&($=(0,A.textDiff)(this.field,k),f.range.startOffset=$.start,f.range.endOffset=$.end),this.editor.getDomSelection());$.range&&(k=(0,A.textDiff)(k,this.field),$.range.startOffset=k.start,$.range.endOffset=k.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:f,newSelection:$}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var f=this.dom.value;if(f){var k=["jsoneditor-value"],$=this.value,M=this.type==="auto"?(0,A.getType)($):this.type,j=M==="string"&&(0,A.isUrl)($);if(k.push("jsoneditor-"+M),j&&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"),f.className=k.join(" "),M==="array"||M==="object"?(k=this.childs?this.childs.length:0,f.title=this.type+" containing "+k+" items"):j&&this.editable.value?f.title=(0,P.Iu)("openUrl"):f.title="",M==="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||I(this.schema,"oneOf")||I(this.schema,"anyOf")||I(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 $=="string"&&(0,A.isValidColor)($)?(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,A.addClassName)(this.dom.value,"jsoneditor-color-value"),(this.editable.value?A.removeClassName:A.addClassName)(this.dom.color,"jsoneditor-color-readonly"),this.dom.color.style.backgroundColor=$):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)),j=null,j=typeof this.editor.options.timestampFormat=="function"?this.editor.options.timestampFormat({field:this.field,value:this.value,path:this.getPath()}):j){for(;this.dom.date.firstChild;)this.dom.date.removeChild(this.dom.date.firstChild);this.dom.date.appendChild(document.createTextNode(j))}else this.dom.date.textContent=new Date($).toISOString();this.dom.date.title=new Date($).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,A.stripFormatting)(f),this._updateDomDefault()}}},{key:"_updateEnumOptions",value:function(){if(this.enum&&this.dom.select){this.dom.select.innerHTML="";for(var f=0;f<this.enum.length;f++){var k=document.createElement("option");k.value=this.enum[f],k.textContent=this.enum[f],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,A.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var f,k=this.dom.field;k&&((f=(0,A.makeFieldTooltip)(this.schema,this.editor.options.language))&&(k.title=f),(String(this.field)===""&&this.parent&&this.parent.type!=="array"?A.addClassName:A.removeClassName)(k,"jsoneditor-empty"),(this.searchFieldActive?A.addClassName:A.removeClassName)(k,"jsoneditor-highlight-active"),(this.searchField?A.addClassName:A.removeClassName)(k,"jsoneditor-highlight"),(0,A.stripFormatting)(k))}},{key:"_getDomField",value:function(f){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,A.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),$=this.parent.getFieldNames(this);$.indexOf(k)!==-1?f?(k=(0,A.findUniqueName)(k,$))!==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 f;this.schema&&this.schema.default!==void 0&&!this._hasChilds()&&(f=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(f.title=(0,P.Iu)("default"),(0,A.addClassName)(f,"jsoneditor-is-default"),A.removeClassName):(f.removeAttribute("title"),(0,A.removeClassName)(f,"jsoneditor-is-default"),A.addClassName))(f,"jsoneditor-is-not-default")}},{key:"_showTimestampTag",value:function(){var f,k;return typeof this.value=="number"&&(typeof(f=this.editor.options.timestampTag)=="function"?typeof(k=f({field:this.field,value:this.value,path:this.getPath()}))=="boolean"?k:(0,A.isTimestamp)(this.field,this.value):f===!0&&(0,A.isTimestamp)(this.field,this.value))}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var f,k,$=this.dom;return $.tr||(this._updateEditability(),$.tr=document.createElement("tr"),($.tr.node=this).editor.options.mode==="tree"&&(k=document.createElement("td"),this.editable.field&&this.parent&&((f=document.createElement("button")).type="button",($.drag=f).className="jsoneditor-button jsoneditor-dragarea",f.title=(0,P.Iu)("drag"),k.appendChild(f)),$.tr.appendChild(k),f=document.createElement("td"),(k=document.createElement("button")).type="button",($.menu=k).className="jsoneditor-button jsoneditor-contextmenu-button",k.title=(0,P.Iu)("actionsMenu"),f.appendChild($.menu),$.tr.appendChild(f)),k=document.createElement("td"),$.tr.appendChild(k),$.tree=this._createDomTree(),k.appendChild($.tree),this.updateDom({updateIndexes:!0})),$.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(f){for(var k=this.parent;k;){if(k===f)return!0;k=k.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(f){this.dom.tr&&((f?A.addClassName:A.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(f),this.childs&&this.childs.forEach(function(k){k.setHighlight(f)}))}},{key:"setSelected",value:function(f,k){this.selected=f,this.dom.tr&&((f?A.addClassName:A.removeClassName)(this.dom.tr,"jsoneditor-selected"),(k?A.addClassName:A.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(f),this.showMore&&this.showMore.setSelected(f),this.childs&&this.childs.forEach(function($){$.setSelected(f)}))}},{key:"updateValue",value:function(f){this.value=f,this.previousValue=f,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(f){this.field=f,this.previousField=f,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(f){var k,$=this.dom.tree,$=($&&($.style.marginLeft=24*this.getLevel()+"px"),this.dom.field),$=($&&(this.fieldEditable?($.contentEditable=this.editable.field,$.spellcheck=!1,$.className="jsoneditor-field"):($.contentEditable=!1,$.className="jsoneditor-readonly"),k=this.index!==void 0?this.index:this.field!==void 0?this.field:(k=this.editor.options.schema?_._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!==$&&k!==this._unescapeHTML((0,A.getInnerText)($))&&($.innerHTML=k),this._updateSchema(),this._updateEnumOptions()),this.dom.value),$=($&&(this.type==="array"||this.type==="object"?this.updateNodeName():(k=this._escapeHTML(this.value),document.activeElement!==$&&k!==this._unescapeHTML((0,A.getInnerText)($))&&($.innerHTML=k))),this.dom.tr);$&&(this.type==="array"||this.type==="object"?((0,A.addClassName)($,"jsoneditor-expandable"),this.expanded?((0,A.addClassName)($,"jsoneditor-expanded"),(0,A.removeClassName)($,"jsoneditor-collapsed")):((0,A.addClassName)($,"jsoneditor-collapsed"),(0,A.removeClassName)($,"jsoneditor-expanded"))):((0,A.removeClassName)($,"jsoneditor-expandable"),(0,A.removeClassName)($,"jsoneditor-expanded"),(0,A.removeClassName)($,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),f&&f.updateIndexes===!0&&this._updateDomIndexes(),f&&f.recurse===!0&&this.childs&&this.childs.forEach(function(M){M.updateDom(f)}),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?_._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=_._findEnum(this.schema):delete this.enum)}},{key:"_updateDomIndexes",value:function(){var f=this.dom.value,k=this.childs;f&&k&&(this.type==="array"?k.forEach(function($,M){$.index=M,$=$.dom.field,$&&($.textContent=M)}):this.type==="object"&&k.forEach(function($){$.index!==void 0&&(delete $.index,$.field===void 0&&($.field=""))}))}},{key:"_createDomValue",value:function(){var f;return this.type==="array"?(f=document.createElement("div")).textContent="[...]":this.type==="object"?(f=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,A.isUrl)(this.value)?(f=document.createElement("a")).href=this.value:((f=document.createElement("div")).contentEditable=this.editable.value,f.spellcheck=!1),f.innerHTML=this._escapeHTML(this.value)),f}},{key:"_createDomExpandButton",value:function(){var f=document.createElement("button");return f.type="button",this._hasChilds()?(f.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",f.title=(0,P.Iu)("expandTitle")):(f.className="jsoneditor-button jsoneditor-invisible",f.title=""),f}},{key:"_createDomTree",value:function(){var f=this.dom,k=document.createElement("table"),M=document.createElement("tbody"),$=(k.style.borderCollapse="collapse",k.className="jsoneditor-values",k.appendChild(M),document.createElement("tr")),M=(M.appendChild($),document.createElement("td")),M=(M.className="jsoneditor-tree",$.appendChild(M),f.expand=this._createDomExpandButton(),M.appendChild(f.expand),f.tdExpand=M,document.createElement("td")),M=(M.className="jsoneditor-tree",$.appendChild(M),f.field=this._createDomField(),M.appendChild(f.field),f.tdField=M,document.createElement("td")),M=(M.className="jsoneditor-tree",$.appendChild(M),this.type!=="object"&&this.type!=="array"&&(M.appendChild(document.createTextNode(":")),M.className="jsoneditor-separator"),f.tdSeparator=M,document.createElement("td"));return M.className="jsoneditor-tree",$.appendChild(M),f.value=this._createDomValue(),M.appendChild(f.value),f.tdValue=M,k}},{key:"onEvent",value:function(f){var k,$=f.type,M=f.target||f.srcElement,j=this.dom,Q=this,te=this._hasChilds(),he=(M!==j.drag&&M!==j.menu||($==="mouseover"?this.editor.highlighter.highlight(this):$==="mouseout"&&this.editor.highlighter.unhighlight()),$==="click"&&M===j.menu&&((k=Q.editor.highlighter).highlight(Q),k.lock(),(0,A.addClassName)(j.menu,"jsoneditor-selected"),this.showContextMenu(j.menu,function(){(0,A.removeClassName)(j.menu,"jsoneditor-selected"),k.unlock(),k.unhighlight()})),$==="click"&&M===j.expand&&te&&(Ie=f.ctrlKey,this._onExpand(Ie)),$!=="click"||f.target!==Q.dom.tdColor&&f.target!==Q.dom.color||!this.editable.value||this._showColorPicker(),$==="change"&&M===j.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),$==="change"&&M===j.select&&(this.dom.value.innerHTML=this._escapeHTML(j.select.value),this._getDomValue(),this._updateDomValue()),j.value);if(M===he)switch($){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var Ae=this._escapeHTML(this.value);Ae!==this._unescapeHTML((0,A.getInnerText)(he))&&(he.innerHTML=Ae);break;case"input":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":f.ctrlKey&&this.editable.value&&(0,A.isUrl)(this.value)&&(f.preventDefault(),window.open(this.value,"_blank","noreferrer"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){Q._getDomValue(),Q._updateDomValue()},1)}var ue=j.field;if(M===ue)switch($){case"blur":this._getDomField(!0),this._updateDomField();var Ce=this._escapeHTML(this.field);Ce!==this._unescapeHTML((0,A.getInnerText)(ue))&&(ue.innerHTML=Ce);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(){Q._getDomField(),Q._updateDomField()},1)}var Ie=j.tree;Ie&&M===Ie.parentNode&&$==="click"&&!f.hasMoved&&((f.offsetX!==void 0?f.offsetX<24*(this.getLevel()+1):f.pageX<(0,A.getAbsoluteLeft)(j.tdSeparator))||te?ue&&((0,A.setEndOfContentEditable)(ue),ue.focus()):he&&!this.enum&&((0,A.setEndOfContentEditable)(he),he.focus())),(M!==j.tdExpand||te)&&M!==j.tdField&&M!==j.tdSeparator||$!=="click"||f.hasMoved||ue&&((0,A.setEndOfContentEditable)(ue),ue.focus()),$==="keydown"&&this.onKeyDown(f),typeof this.editor.options.onEvent=="function"&&this._onEvent(f)}},{key:"_onEvent",value:function(f){var $=f.target,k=$===this.dom.field,$=$===this.dom.value||$===this.dom.checkbox||$===this.dom.select;(k||$)&&(k={field:this.getField(),path:this.getPath()},$&&!this._hasChilds()&&(k.value=this.getValue()),this.editor.options.onEvent(k,f))}},{key:"onKeyDown",value:function(f){var k,$,M,j,Q,te,he,Ae,ue,Ce,Ie,we,Te,$e,ke=f.which||f.keyCode,de=f.target||f.srcElement,Le=f.ctrlKey,ae=f.shiftKey,ge=f.altKey,le=!1,ce=this.editor.options.mode==="tree",fe=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],ve=fe[0],Ee=fe[fe.length-1];ke===13?de===this.dom.value?this.editable.value&&!f.ctrlKey||(0,A.isUrl)(this.value)&&(window.open(this.value,"_blank","noreferrer"),le=!0):de===this.dom.expand&&this._hasChilds()&&(Te=f.ctrlKey,this._onExpand(Te),de.focus(),le=!0):ke===68?Le&&ce&&(_.onDuplicate(fe),le=!0):ke===69?Le&&(this._onExpand(ae),de.focus(),le=!0):ke===77&&ce?Le&&(this.showContextMenu(de),le=!0):ke===46&&ce?Le&&(_.onRemove(fe),le=!0):ke===45&&ce?Le&&!ae?(this._onInsertBefore(),le=!0):Le&&ae&&(this._onInsertAfter(),le=!0):ke===35?ge&&((Te=this._lastNode())&&Te.focus(_.focusElement||this._getElementName(de)),le=!0):ke===36?ge&&((Te=this._firstNode())&&Te.focus(_.focusElement||this._getElementName(de)),le=!0):ke===37?ge&&!ae?((Te=this._previousElement(de))&&this.focus(this._getElementName(Te)),le=!0):ge&&ae&&ce&&(Te=Ee.expanded?(Te=Ee.getAppendDom())?Te.nextSibling:void 0:Ee.getDom().nextSibling)&&(Ie=_.getNodeFromTarget(Te),Te=Te.nextSibling,we=_.getNodeFromTarget(Te),Ie&&Ie instanceof h&&Ee.parent.childs.length!==1&&we&&we.parent&&($=this.editor.getDomSelection(),M=(j=ve.parent).childs[Ee.getIndex()+1]||j.append,Q=ve.getIndex(),te=we.getIndex(),he=j.getInternalPath(),Ae=we.parent.getInternalPath(),fe.forEach(function(Fe){we.parent.moveBefore(Fe,we)}),this.focus(_.focusElement||this._getElementName(de)),this.editor._onAction("moveNodes",{count:fe.length,fieldNames:fe.map(y),oldParentPath:j.getInternalPath(),newParentPath:ve.parent.getInternalPath(),oldIndex:M.getIndex(),newIndex:ve.getIndex(),oldIndexRedo:Q,newIndexRedo:te,oldParentPathRedo:he,newParentPathRedo:Ae,oldSelection:$,newSelection:this.editor.getDomSelection()}))):ke===38?ge&&!ae?((k=this._previousNode())&&(this.editor.deselect(!0),k.focus(_.focusElement||this._getElementName(de))),le=!0):!ge&&Le&&ae&&ce?((k=this._previousNode())&&((Ce=this.editor.multiselection).start=Ce.start||this,Ce.end=k,ue=this.editor._findTopLevelNodes(Ce.start,Ce.end),this.editor.select(ue),k.focus("field")),le=!0):ge&&ae&&ce&&((k=ve._previousNode())&&k.parent&&($=this.editor.getDomSelection(),M=(j=ve.parent).childs[Ee.getIndex()+1]||j.append,Q=ve.getIndex(),te=k.getIndex(),he=j.getInternalPath(),Ae=k.parent.getInternalPath(),fe.forEach(function(Fe){k.parent.moveBefore(Fe,k)}),this.focus(_.focusElement||this._getElementName(de)),this.editor._onAction("moveNodes",{count:fe.length,fieldNames:fe.map(y),oldParentPath:j.getInternalPath(),newParentPath:ve.parent.getInternalPath(),oldIndex:M.getIndex(),newIndex:ve.getIndex(),oldIndexRedo:Q,newIndexRedo:te,oldParentPathRedo:he,newParentPathRedo:Ae,oldSelection:$,newSelection:this.editor.getDomSelection()})),le=!0):ke===39?ge&&!ae?((Te=this._nextElement(de))&&this.focus(this._getElementName(Te)),le=!0):ge&&ae&&ce&&(Te=ve.getDom().previousSibling)&&(k=_.getNodeFromTarget(Te))&&k.parent&&!k.isVisible()&&($=this.editor.getDomSelection(),M=(j=ve.parent).childs[Ee.getIndex()+1]||j.append,Q=ve.getIndex(),te=k.getIndex(),he=j.getInternalPath(),Ae=k.parent.getInternalPath(),fe.forEach(function(Fe){k.parent.moveBefore(Fe,k)}),this.focus(_.focusElement||this._getElementName(de)),this.editor._onAction("moveNodes",{count:fe.length,fieldNames:fe.map(y),oldParentPath:j.getInternalPath(),newParentPath:ve.parent.getInternalPath(),oldIndex:M.getIndex(),newIndex:ve.getIndex(),oldIndexRedo:Q,newIndexRedo:te,oldParentPathRedo:he,newParentPathRedo:Ae,oldSelection:$,newSelection:this.editor.getDomSelection()})):ke===40&&(ge&&!ae?((Ie=this._nextNode())&&(this.editor.deselect(!0),Ie.focus(_.focusElement||this._getElementName(de))),le=!0):!ge&&Le&&ae&&ce?((Ie=this._nextNode())&&((Ce=this.editor.multiselection).start=Ce.start||this,Ce.end=Ie,ue=this.editor._findTopLevelNodes(Ce.start,Ce.end),this.editor.select(ue),Ie.focus("field")),le=!0):ge&&ae&&ce&&(($e=(Ie=(Ie=(Ie=Ee.expanded?Ee.append?Ee.append._nextNode():void 0:Ee._nextNode())&&!Ie.isVisible()?Ie.parent.showMore:Ie)&&Ie instanceof h?Ee:Ie)&&(Ie._nextNode()||Ie.parent.append))&&$e.parent&&($=this.editor.getDomSelection(),M=(j=ve.parent).childs[Ee.getIndex()+1]||j.append,Q=ve.getIndex(),te=$e.getIndex(),he=j.getInternalPath(),Ae=$e.parent.getInternalPath(),fe.forEach(function(Fe){$e.parent.moveBefore(Fe,$e)}),this.focus(_.focusElement||this._getElementName(de)),this.editor._onAction("moveNodes",{count:fe.length,fieldNames:fe.map(y),oldParentPath:j.getInternalPath(),newParentPath:ve.parent.getInternalPath(),oldParentPathRedo:he,newParentPathRedo:Ae,oldIndexRedo:Q,newIndexRedo:te,oldIndex:M.getIndex(),newIndex:ve.getIndex(),oldSelection:$,newSelection:this.editor.getDomSelection()})),le=!0)),le&&(f.preventDefault(),f.stopPropagation())}},{key:"_onExpand",value:function(f){var k,$,M;f&&(M=($=(k=this.dom.tr.parentNode).parentNode).scrollTop,$.removeChild(k)),this.expanded?this.collapse(f):this.expand(f),f&&($.appendChild(k),$.scrollTop=M),typeof this.editor.options.onExpand=="function"&&this.editor.options.onExpand({path:this.getPath(),isExpand:this.expanded,recursive:f})}},{key:"_showColorPicker",value:function(){var f,k;typeof this.editor.options.onColorPicker=="function"&&this.dom.color&&((f=this)._deleteDomColor(),f.updateDom(),k=(0,m.w)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(k,this.value,function($){typeof $=="string"&&$!==f.value&&(f._deleteDomColor(),f.value=$,f.updateDom(),f._debouncedOnChangeValue())}))}},{key:"getFieldNames",value:function(f){return this.type==="object"?this.childs.filter(function(k){return k!==f}).map(function(k){return k.field}):[]}},{key:"_onInsertBefore",value:function(j,Q,te){var M=this.editor.getDomSelection(),j=new _(this.editor,{field:j!==void 0?j:"",value:Q!==void 0?Q:"",type:te}),Q=(j.expand(!0),this.getInternalPath()),te=(this.parent.insertBefore(j,this),this.editor.highlighter.unhighlight(),j.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertBeforeNodes",{nodes:[j],paths:[j.getInternalPath()],beforePath:Q,parentPath:this.parent.getInternalPath(),oldSelection:M,newSelection:te})}},{key:"_onInsertAfter",value:function(j,Q,$){var M=this.editor.getDomSelection(),j=new _(this.editor,{field:j!==void 0?j:"",value:Q!==void 0?Q:"",type:$}),Q=(j.expand(!0),this.parent.insertAfter(j,this),this.editor.highlighter.unhighlight(),j.focus("field"),this.editor.getDomSelection());this.editor._onAction("insertAfterNodes",{nodes:[j],paths:[j.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:M,newSelection:Q})}},{key:"_onAppend",value:function(j,Q,$){var M=this.editor.getDomSelection(),j=new _(this.editor,{field:j!==void 0?j:"",value:Q!==void 0?Q:"",type:$}),Q=(j.expand(!0),this.parent.appendChild(j),this.editor.highlighter.unhighlight(),j.focus("field"),this.editor.getDomSelection());this.editor._onAction("appendNodes",{nodes:[j],paths:[j.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:M,newSelection:Q})}},{key:"_onChangeType",value:function(f){var k,$,M=this.type;f!==M&&(k=this.editor.getDomSelection(),this.changeType(f),$=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:M,newType:f,oldSelection:k,newSelection:$}))}},{key:"sort",value:function(f,k){var $,M,j=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];typeof f=="string"&&(f=(0,A.parsePath)(f)),this._hasChilds()&&(this.hideChilds(),$=this.childs,this.childs=this.childs.concat(),M=k==="desc"?-1:1,this.type==="object"?this.childs.sort(function(Q,te){return M*C()(Q.field,te.field)}):this.childs.sort(function(he,Ae){var he=he.getNestedChild(f),Ae=Ae.getNestedChild(f);return he?Ae?(he=he.value,Ae=Ae.value,typeof he!="string"&&typeof Ae!="string"?Ae<he?M:he<Ae?-M:0:M*C()(he,Ae)):-M:M}),this._updateDomIndexes(),this.showChilds(),j===!0&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:$,newChilds:this.childs}))}},{key:"update",value:function(f){var k=this.getInternalValue();this.setValue(f),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var f=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:f,nextTr:k}}},{key:"_attachToDom",value:function(f){f.table&&(f.nextTr?f.table.insertBefore(this.getDom(),f.nextTr):f.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(f){if(this._hasChilds()){this.hideChilds();try{var k=this.getInternalValue(),$=this.getValue(),M=this.editor.options.executeQuery($,f),j=(this.setValue(M),this.getInternalValue());this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:j}),this.showChilds()}catch(Q){this.showChilds(),this.editor._onError(Q)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var f=this.editor.node.getInternalValue(),k=(this.editor._setRoot(this),this.editor.node.getInternalValue());this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:f,newValue:k})}catch($){this.editor._onError($)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(f){for(var k=0,$=this;$&&k<f.length;)$=$.findChildByProperty(f[k]),k++;return $}},{key:"findChildByProperty",value:function(f){if(this.type==="object")return this.childs.find(function(k){return k.field===f})}},{key:"getAppendDom",value:function(){return this.append||(this.append=new h(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new b(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var f=this.parent.childs.indexOf(this);return this.parent.childs[f+1]||this.parent.append}},{key:"_previousNode",value:function(){var f=null,k=this.getDom();if(k&&k.parentNode)for(var $=k;$=$.previousSibling,f=_.getNodeFromTarget($),$&&f&&f instanceof h&&!f.isVisible(););return f}},{key:"_nextNode",value:function(){var f=null,k=this.getDom();if(k&&k.parentNode)for(var $=k;$=$.nextSibling,f=_.getNodeFromTarget($),$&&f&&f instanceof h&&!f.isVisible(););return f}},{key:"_firstNode",value:function(){var f=null,k=this.getDom();return k&&k.parentNode&&(k=k.parentNode.firstChild,f=_.getNodeFromTarget(k)),f}},{key:"_lastNode",value:function(){var f=null,k=this.getDom();if(k&&k.parentNode)for(var $=k.parentNode.lastChild,f=_.getNodeFromTarget($);$&&f&&!f.isVisible();)$=$.previousSibling,f=_.getNodeFromTarget($);return f}},{key:"_previousElement",value:function(f){var k=this.dom;switch(f){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(f){var k=this.dom;switch(f){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(f){var k=this;return Object.keys(this.dom).find(function($){return k.dom[$]===f})}},{key:"_hasChilds",value:function(){return this.type==="array"||this.type==="object"}},{key:"addTemplates",value:function(f,k){var $=this,M=$.editor.options.templates;M!=null&&(M.length&&f.push({type:"separator"}),M.forEach(function(j){f.push({text:j.text,className:j.className||"jsoneditor-type-object",title:j.title,click:(k?function(Q,te){$._onAppend(Q,te)}:function(Q,te){$._onInsertBefore(Q,te)}).bind(this,j.field,j.value)})}))}},{key:"showContextMenu",value:function(f,k){var $,M=this,j=[];this.editable.value&&j.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(){M._onChangeType("auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array"+(this.type==="array"?" jsoneditor-selected":""),title:(0,P.Iu)("arrayType"),click:function(){M._onChangeType("array")}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object"+(this.type==="object"?" jsoneditor-selected":""),title:(0,P.Iu)("objectType"),click:function(){M._onChangeType("object")}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string"+(this.type==="string"?" jsoneditor-selected":""),title:(0,P.Iu)("stringType"),click:function(){M._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&j.push({text:(0,P.Iu)("sort"),title:(0,P.Iu)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){M.showSortModal()}}),this.editor.options.enableTransform&&j.push({text:(0,P.Iu)("transform"),title:(0,P.Iu)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){M.showTransformModal()}}),this.parent&&j.push({text:(0,P.Iu)("extract"),title:(0,P.Iu)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){M.extract()}})),this.parent&&this.parent._hasChilds()&&(j.length&&j.push({type:"separator"}),$=M.parent.childs,M===$[$.length-1]&&($=[{text:(0,P.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,P.Iu)("autoType"),click:function(){M._onAppend("","","auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array",title:(0,P.Iu)("arrayType"),click:function(){M._onAppend("",[])}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object",title:(0,P.Iu)("objectType"),click:function(){M._onAppend("",{})}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string",title:(0,P.Iu)("stringType"),click:function(){M._onAppend("","","string")}}],M.addTemplates($,!0),j.push({text:(0,P.Iu)("appendText"),title:(0,P.Iu)("appendTitle"),submenuTitle:(0,P.Iu)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){M._onAppend("","","auto")},submenu:$})),$=[{text:(0,P.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,P.Iu)("autoType"),click:function(){M._onInsertBefore("","","auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array",title:(0,P.Iu)("arrayType"),click:function(){M._onInsertBefore("",[])}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object",title:(0,P.Iu)("objectType"),click:function(){M._onInsertBefore("",{})}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string",title:(0,P.Iu)("stringType"),click:function(){M._onInsertBefore("","","string")}}],M.addTemplates($,!1),j.push({text:(0,P.Iu)("insert"),title:(0,P.Iu)("insertTitle"),submenuTitle:(0,P.Iu)("insertSub"),className:"jsoneditor-insert",click:function(){M._onInsertBefore("","","auto")},submenu:$}),this.editable.field&&(j.push({text:(0,P.Iu)("duplicateText"),title:(0,P.Iu)("duplicateField"),className:"jsoneditor-duplicate",click:function(){_.onDuplicate(M)}}),j.push({text:(0,P.Iu)("removeText"),title:(0,P.Iu)("removeField"),className:"jsoneditor-remove",click:function(){_.onRemove(M)}}))),this.editor.options.onCreateMenu&&($=M.getPath(),j=this.editor.options.onCreateMenu(j,{type:"single",path:$,paths:[$]})),new x.x(j,{close:k}).show(f,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var f=this,k=this.editor.options.modalAnchor||c.qD,$=this.getValue();(0,S.showSortModal)(k,$,function(M){var j=M.path,j=(0,A.parsePath)(j);f.sortedBy=M,f.sort(j,M.direction)},f.sortedBy)}},{key:"showTransformModal",value:function(){var f=this,j=this.editor.options,k=j.modalAnchor,$=j.createQuery,M=j.executeQuery,j=j.queryDescription,Q=this.getValue();(0,p.showTransformModal)({container:k||c.qD,json:Q,queryDescription:j,createQuery:$,executeQuery:M,onTransform:function(te){f.transform(te)}})}},{key:"_getType",value:function(f){return f instanceof Array?"array":f instanceof Object?"object":typeof f=="string"&&typeof(0,A.parseString)(f)!="string"?"string":"auto"}},{key:"_escapeHTML",value:function(f){return typeof f!="string"?String(f):(f=String(f).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/^ /," ").replace(/ $/," "),f=(f=JSON.stringify(f)).substring(1,f.length-1),this.editor.options.escapeUnicode===!0?(0,A.escapeUnicodeChars)(f):f)}},{key:"_unescapeHTML",value:function(f){return f='"'+this._escapeJSON(f)+'"',(0,A.parse)(f).replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ").replace(/&/g,"&")}},{key:"_escapeJSON",value:function(f){for(var k="",$=0;$<f.length;){var M=f.charAt($);M===`
|
|
`?k+="\\n":M==="\\"?(k+=M,$++,(M=f.charAt($))!==""&&'"\\/bfnrtu'.indexOf(M)!==-1||(k+="\\"),k+=M):k+=M==='"'?'\\"':M,$++}return k}},{key:"updateNodeName",value:function(){var f=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),$=this.editor.options.onNodeName({path:this.getPath(),size:f,type:this.type,get value(){return k()}})}catch(M){console.error("Error in onNodeName callback: ",M)}this.dom.value.textContent=this.type==="object"?"{"+($||f)+"}":"["+($||f)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),this.childs!=="undefined"))for(var f in this.childs)this.childs[f].recursivelyUpdateNodeName()}}])&&a(Z.prototype,W),Object.defineProperty(Z,"prototype",{writable:!1}),_}(),l=(o.prototype.DEBOUNCE_INTERVAL=150,o.prototype.MAX_SEARCH_RESULTS=999,100);function d(_){return _.getInternalPath()}function y(_){return _.getField()}function I(_,Z){return Object.prototype.hasOwnProperty.call(_,Z)}o.focusElement=void 0,o.select=function(_){setTimeout(function(){(0,A.selectContentEditable)(_)},0)},o.onDragStart=function(_,Z){if(!Array.isArray(_))return o.onDragStart([_],Z);var W,f,k,$,M;_.length!==0&&(W=_[0],f=_[_.length-1],k=W.parent,M=o.getNodeFromTarget(Z.target),$=W.editor,M=(0,A.getAbsoluteTop)(M.dom.tr)-(0,A.getAbsoluteTop)(W.dom.tr),$.mousemove||($.mousemove=(0,A.addEventListener)(Z.view,"mousemove",function(j){o.onDrag(_,j)})),$.mouseup||($.mouseup=(0,A.addEventListener)(Z.view,"mouseup",function(j){o.onDragEnd(_,j)})),$.highlighter.lock(),$.drag={oldCursor:document.body.style.cursor,oldSelection:$.getDomSelection(),oldPaths:_.map(d),oldParent:k,oldNextNode:k.childs[f.getIndex()+1]||k.append,oldParentPathRedo:k.getInternalPath(),oldIndexRedo:W.getIndex(),mouseX:Z.pageX,offsetY:M,level:W.getLevel()},document.body.style.cursor="move",Z.preventDefault())},o.onDrag=function(_,Z){if(!Array.isArray(_))return o.onDrag([_],Z);if(_.length!==0){var W,f,k,$,M,j=_[0].editor,Q=Z.pageY-j.drag.offsetY,te=Z.pageX,he=!1,Ae=_[0],ue=Ae.dom.tr,Ce=(0,A.getAbsoluteTop)(ue),Ie=ue.offsetHeight;if(Q<Ce){for(ke=ue;ke=ke.previousSibling,de=o.getNodeFromTarget(ke),k=ke?(0,A.getAbsoluteTop)(ke):0,ke&&Q<k;);(de=de&&!de.parent?void 0:de)||(ke=(ue=ue.parentNode.firstChild)?ue.nextSibling:void 0,(de=o.getNodeFromTarget(ke))===Ae&&(de=void 0)),!(de=de&&de.isVisible()&&(k=(ke=de.dom.tr)?(0,A.getAbsoluteTop)(ke):0)+Ie<Q?void 0:de)||j.options.limitDragging!==!1&&de.parent!==_[0].parent||(_.forEach(function(ae){de.parent.moveBefore(ae,de)}),he=!0)}else{var we=_[_.length-1];if(Ie=(ue=we.expanded&&we.append?we.append.getDom():we.dom.tr)?ue.nextSibling:void 0){for($=(0,A.getAbsoluteTop)(Ie),W=Ie;f=o.getNodeFromTarget(W),W&&(M=W.nextSibling?(0,A.getAbsoluteTop)(W.nextSibling):0,M=W?M-$:0,f&&f.parent.childs.length===_.length&&f.parent.childs[_.length-1]===we&&(Ce+=27),W=W.nextSibling),W&&Ce+M<Q;);if(f&&f.parent){for(var Ie=te-j.drag.mouseX,Ie=Math.round(Ie/24/2),Te=j.drag.level+Ie,$e=f.getLevel(),ke=f.dom.tr&&f.dom.tr.previousSibling;$e<Te&&ke;){var de=o.getNodeFromTarget(ke),Le=_.some(function(ge){return ge===de||de.isDescendantOf(ge)});if(!Le){if(!(de instanceof h)||(Le=de.parent.childs,Le.length===_.length&&Le[_.length-1]===we))break;$e=(f=o.getNodeFromTarget(ke)).getLevel()}ke=ke.previousSibling}(f=f instanceof h&&!f.isVisible()&&f.parent.showMore.isVisible()?f._nextNode():f)&&(j.options.limitDragging===!1||f.parent===_[0].parent)&&f.dom.tr&&f.dom.tr!==ue.nextSibling&&(_.forEach(function(ae){f.parent.moveBefore(ae,f)}),he=!0)}}}he&&(j.drag.mouseX=te,j.drag.level=Ae.getLevel()),j.startAutoScroll(Q),Z.preventDefault()}},o.onDragEnd=function(_,Z){if(!Array.isArray(_))return o.onDrag([_],Z);var W,f,k,$,M,j,Q,te,he;_.length!==0&&(j=_[0],W=j.editor,j&&j.dom.menu&&j.dom.menu.focus(),f=W.drag.oldParent.getInternalPath(),k=j.parent.getInternalPath(),$=W.drag.oldParent===j.parent,M=W.drag.oldNextNode.getIndex(),j=j.getIndex(),Q=W.drag.oldParentPathRedo,te=W.drag.oldIndexRedo,he=$&&te<j?j+_.length:j,$&&te===j||W._onAction("moveNodes",{count:_.length,fieldNames:_.map(y),oldParentPath:f,newParentPath:k,oldIndex:M,newIndex:j,oldIndexRedo:te,newIndexRedo:he,oldParentPathRedo:Q,newParentPathRedo:null,oldSelection:W.drag.oldSelection,newSelection:W.getDomSelection()}),document.body.style.cursor=W.drag.oldCursor,W.highlighter.unlock(),_.forEach(function(Ae){Ae.updateDom(),Z.target!==Ae.dom.drag&&Z.target!==Ae.dom.menu&&W.highlighter.unhighlight()}),delete W.drag,W.mousemove&&((0,A.removeEventListener)(Z.view,"mousemove",W.mousemove),delete W.mousemove),W.mouseup&&((0,A.removeEventListener)(Z.view,"mouseup",W.mouseup),delete W.mouseup),W.stopAutoScroll(),Z.preventDefault())},o._findEnum=function(_){return _.enum?_.enum:(_=_.oneOf||_.anyOf||_.allOf,_&&(_=_.filter(function(Z){return Z.enum}),0<_.length)?_[0].enum:null)},o._findSchema=function(_,Z,W){for(var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:_,k=W.slice(1,W.length),$=W[0],M=[f],j=0,Q=[f.oneOf,f.anyOf,f.allOf];j<Q.length;j++){var te=Q[j];Array.isArray(te)&&(M=M.concat(te))}var he,Ae=i(M);try{for(Ae.s();!(he=Ae.n()).done;){if("$ref"in(f=he.value)&&typeof f.$ref=="string"){var ue,Ce=f.$ref;if(Ce in Z)f=Z[Ce];else{if(!Ce.startsWith("#/")){if(((ue=Ce.match(/#\//g))==null?void 0:ue.length)===1){var Ie,we,Te,$e=n(Ce.split("#/"),2),ke=$e[0],de=$e[1];if(ke in Z)return Ie=Z[ke],we={$ref:"#/".concat(de)},(Te=[]).push($),0<k.length&&Te.push.apply(Te,s(k)),o._findSchema(Ie,Z,Te,we)}throw Error("Unable to resolve reference ".concat(Ce))}var Le,ae=Ce.substring(2).split("/"),f=_,ge=i(ae);try{for(ge.s();!(Le=ge.n()).done;){var le=Le.value;if(!(le in f))throw Error("Unable to resolve reference ".concat(Ce));f=f[le]}}catch(ve){ge.e(ve)}finally{ge.f()}}}if($===void 0)return f;if(typeof $=="string"){if(r(f.properties)==="object"&&f.properties!==null&&$ in f.properties)return f=f.properties[$],o._findSchema(_,Z,k,f);if(r(f.patternProperties)==="object"&&f.patternProperties!==null){for(var ce in f.patternProperties)if($.match(ce))return f=f.patternProperties[ce],o._findSchema(_,Z,k,f)}if(r(f.additionalProperties)==="object")return f=f.additionalProperties,o._findSchema(_,Z,k,f)}else if(typeof $=="number"&&r(f.items)==="object"&&f.items!==null)return f=f.items,o._findSchema(_,Z,k,f)}}catch(fe){Ae.e(fe)}finally{Ae.f()}return null},o.onRemove=function(_){if(!Array.isArray(_))return o.onRemove([_]);var Z,W,f,k,$,M;_&&0<_.length&&(Z=(f=_[0]).parent,W=f.editor,f=f.getIndex(),W.highlighter.unhighlight(),k=W.getDomSelection(),o.blurNodes(_),$=W.getDomSelection(),M=_.map(d),_.forEach(function(j){j.parent._remove(j)}),W._onAction("removeNodes",{nodes:_,paths:M,parentPath:Z.getInternalPath(),index:f,oldSelection:k,newSelection:$}))},o.onDuplicate=function(_){if(!Array.isArray(_))return o.onDuplicate([_]);var Z,W,f,k,$,M,j;_&&0<_.length&&(Z=_[_.length-1],W=Z.parent,(f=Z.editor).deselect(f.multiselection.nodes),k=f.getDomSelection(),$=Z,M=_.map(function(Q){var te,he=Q.clone();return Q.parent.type==="object"&&(te=Q.parent.getFieldNames(),he.field=(0,A.findUniqueName)(Q.field,te)),W.insertAfter(he,$),$=he}),_.length===1?M[0].parent.type==="object"?(M[0].dom.field.innerHTML=_[0]._escapeHTML(_[0].field),M[0].focus("field")):M[0].focus():f.select(M),j=f.getDomSelection(),f._onAction("duplicateNodes",{paths:_.map(d),clonePaths:M.map(d),afterPath:Z.getInternalPath(),parentPath:W.getInternalPath(),oldSelection:k,newSelection:j}))},o.getNodeFromTarget=function(_){for(;_;){if(_.node)return _.node;_=_.parentNode}},o.targetIsColorPicker=function(_){var Z=o.getNodeFromTarget(_);if(Z)for(var W=_&&_.parentNode;W;){if(W===Z.dom.color)return!0;W=W.parentNode}return!1},o.blurNodes=function(_){var Z,W;Array.isArray(_)?(Z=(W=_[0]).parent,W=W.getIndex(),(Z.childs[W+_.length]?Z.childs[W+_.length]:Z.childs[W-1]||Z).focus()):o.blurNodes([_])},(u.prototype=new o).getDom=function(){var _=this.dom;if(_.tr)return _.tr;this._updateEditability();var Z=document.createElement("tr"),W=(Z.className="jsoneditor-append",Z.node=this,_.tr=Z,this.editor.options.mode==="tree"&&(_.tdDrag=document.createElement("td"),f=document.createElement("td"),_.tdMenu=f,(W=document.createElement("button")).type="button",W.className="jsoneditor-button jsoneditor-contextmenu-button",W.title="Click to open the actions menu (Ctrl+M)",_.menu=W,f.appendChild(_.menu)),document.createElement("td")),f=document.createElement("div");return f.appendChild(document.createTextNode("("+(0,P.Iu)("empty")+")")),f.className="jsoneditor-readonly",W.appendChild(f),_.td=W,_.text=f,this.updateDom(),Z},u.prototype.getPath=function(){return null},u.prototype.getIndex=function(){return null},u.prototype.updateDom=function(_){var Z=this.dom,W=Z.td,f=(W&&(W.style.paddingLeft=24*this.getLevel()+26+"px"),Z.text),f=(f&&(f.firstChild.nodeValue="("+(0,P.Iu)("empty")+" "+this.parent.type+")"),Z.tr);this.isVisible()?Z.tr.firstChild||(Z.tdDrag&&f.appendChild(Z.tdDrag),Z.tdMenu&&f.appendChild(Z.tdMenu),f.appendChild(W)):Z.tr.firstChild&&(Z.tdDrag&&f.removeChild(Z.tdDrag),Z.tdMenu&&f.removeChild(Z.tdMenu),f.removeChild(W))},u.prototype.isVisible=function(){return this.parent.childs.length===0},u.prototype.showContextMenu=function(_,Z){var W,f=this,k=[{text:(0,P.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,P.Iu)("autoType"),click:function(){f._onAppend("","","auto")}},{text:(0,P.Iu)("array"),className:"jsoneditor-type-array",title:(0,P.Iu)("arrayType"),click:function(){f._onAppend("",[])}},{text:(0,P.Iu)("object"),className:"jsoneditor-type-object",title:(0,P.Iu)("objectType"),click:function(){f._onAppend("",{})}},{text:(0,P.Iu)("string"),className:"jsoneditor-type-string",title:(0,P.Iu)("stringType"),click:function(){f._onAppend("","","string")}}],k=(f.addTemplates(k,!0),[{text:(0,P.Iu)("appendText"),title:(0,P.Iu)("appendTitleAuto"),submenuTitle:(0,P.Iu)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){f._onAppend("","","auto")},submenu:k}]);this.editor.options.onCreateMenu&&(W=f.parent.getPath(),k=this.editor.options.onCreateMenu(k,{type:"append",path:W,paths:[W]})),new x.x(k,{close:Z}).show(_,this.editor.getPopupAnchor())},u.prototype.onEvent=function(_){var Z,W=_.type,f=_.target||_.srcElement,k=this.dom;f===k.menu&&(W==="mouseover"?this.editor.highlighter.highlight(this.parent):W==="mouseout"&&this.editor.highlighter.unhighlight()),W==="click"&&f===k.menu&&((Z=this.editor.highlighter).highlight(this.parent),Z.lock(),(0,A.addClassName)(k.menu,"jsoneditor-selected"),this.showContextMenu(k.menu,function(){(0,A.removeClassName)(k.menu,"jsoneditor-selected"),Z.unlock(),Z.unhighlight()})),W==="keydown"&&this.onKeyDown(_)};var h=u;function u(_){this.editor=_,this.dom={}}(w.prototype=new o).getDom=function(){var _,Z,W,f,k,$;return this.dom.tr||(this._updateEditability(),this.dom.tr||(Z=(_=this).parent,(k=document.createElement("a")).appendChild(document.createTextNode((0,P.Iu)("showMore"))),k.href="#",k.onclick=function(M){return Z.visibleChilds=Math.floor(Z.visibleChilds/Z.getMaxVisibleChilds()+1)*Z.getMaxVisibleChilds(),_.updateDom(),Z.showChilds(),M.preventDefault(),!1},($=document.createElement("a")).appendChild(document.createTextNode((0,P.Iu)("showAll"))),$.href="#",$.onclick=function(M){return Z.visibleChilds=1/0,_.updateDom(),Z.showChilds(),M.preventDefault(),!1},W=document.createElement("div"),f=document.createTextNode(this._getShowMoreText()),W.className="jsoneditor-show-more",W.appendChild(f),W.appendChild(k),W.appendChild(document.createTextNode(". ")),W.appendChild($),W.appendChild(document.createTextNode(". ")),(k=document.createElement("td")).appendChild(W),$=document.createElement("tr"),this.editor.options.mode==="tree"&&($.appendChild(document.createElement("td")),$.appendChild(document.createElement("td"))),$.appendChild(k),$.className="jsoneditor-show-more",this.dom.tr=$,this.dom.moreContents=W,this.dom.moreText=f),this.updateDom()),this.dom.tr},w.prototype.updateDom=function(_){var Z;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(Z=this.parent._getNextTr())&&Z.parentNode.insertBefore(this.dom.tr,Z),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)},w.prototype._getShowMoreText=function(){return(0,P.Iu)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},w.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},w.prototype.onEvent=function(_){_.type==="keydown"&&this.onKeyDown(_)};var b=w;function w(_,Z){this.editor=_,this.parent=Z,this.dom={}}function v(_,Z){for(var W=0;W<Z.length;W++){var f=Z[W];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(_,f.key,f)}}var R=function(){function _(f){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");function k($){return f.node.findNodeByInternalPath($)}this.editor=f,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function($){k($.parentPath).childs[$.index].updateField($.oldValue)},redo:function($){k($.parentPath).childs[$.index].updateField($.newValue)}},editValue:{undo:function($){k($.path).updateValue($.oldValue)},redo:function($){k($.path).updateValue($.newValue)}},changeType:{undo:function($){k($.path).changeType($.oldType)},redo:function($){k($.path).changeType($.newType)}},appendNodes:{undo:function($){var M=k($.parentPath);$.paths.map(k).forEach(function(j){M.removeChild(j)})},redo:function($){var M=k($.parentPath);$.nodes.forEach(function(j){M.appendChild(j)})}},insertBeforeNodes:{undo:function($){var M=k($.parentPath);$.paths.map(k).forEach(function(j){M.removeChild(j)})},redo:function($){var M=k($.parentPath),j=k($.beforePath);$.nodes.forEach(function(Q){M.insertBefore(Q,j)})}},insertAfterNodes:{undo:function($){var M=k($.parentPath);$.paths.map(k).forEach(function(j){M.removeChild(j)})},redo:function($){var M=k($.parentPath),j=k($.afterPath);$.nodes.forEach(function(Q){M.insertAfter(Q,j),j=Q})}},removeNodes:{undo:function($){var M=k($.parentPath),j=M.childs[$.index]||M.append;$.nodes.forEach(function(Q){M.insertBefore(Q,j)})},redo:function($){var M=k($.parentPath);$.paths.map(k).forEach(function(j){M.removeChild(j)})}},duplicateNodes:{undo:function($){var M=k($.parentPath);$.clonePaths.map(k).forEach(function(j){M.removeChild(j)})},redo:function($){var M=k($.parentPath),j=k($.afterPath);$.paths.map(k).forEach(function(Q){var te,he=Q.clone();M.type==="object"&&(te=M.getFieldNames(),he.field=(0,A.findUniqueName)(Q.field,te)),M.insertAfter(he,j),j=he})}},moveNodes:{undo:function($){var M=k($.oldParentPath),j=k($.newParentPath),Q=M.childs[$.oldIndex]||M.append;j.childs.slice($.newIndex,$.newIndex+$.count).forEach(function(te,he){te.field=$.fieldNames[he],M.moveBefore(te,Q)}),$.newParentPathRedo===null&&($.newParentPathRedo=j.getInternalPath())},redo:function($){var M=k($.oldParentPathRedo),j=k($.newParentPathRedo),Q=j.childs[$.newIndexRedo]||j.append;M.childs.slice($.oldIndexRedo,$.oldIndexRedo+$.count).forEach(function(te,he){te.field=$.fieldNames[he],j.moveBefore(te,Q)})}},sort:{undo:function($){var M=k($.path);M.hideChilds(),M.childs=$.oldChilds,M.updateDom({updateIndexes:!0}),M.showChilds()},redo:function($){var M=k($.path);M.hideChilds(),M.childs=$.newChilds,M.updateDom({updateIndexes:!0}),M.showChilds()}},transform:{undo:function($){k($.path).setInternalValue($.oldValue)},redo:function($){k($.path).setInternalValue($.newValue)}}}}var Z,W;return Z=_,(W=[{key:"onChange",value:function(){}},{key:"add",value:function(f,k){this.index++,this.history[this.index]={action:f,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 f=this.history[this.index];if(f){var k=this.actions[f.action];if(k&&k.undo){if(k.undo(f.params),f.params.oldSelection)try{this.editor.setDomSelection(f.params.oldSelection)}catch($){console.error($)}}else console.error(new Error('unknown action "'+f.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var f=this.history[this.index];if(f){var k=this.actions[f.action];if(k&&k.redo){if(k.redo(f.params),f.params.newSelection)try{this.editor.setDomSelection(f.params.newSelection)}catch($){console.error($)}}else console.error(new Error('unknown action "'+f.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&v(Z.prototype,W),Object.defineProperty(Z,"prototype",{writable:!1}),_}();function B(_,Z){for(var W=0;W<Z.length;W++){var f=Z[W];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(_,f.key,f)}}var E=function(){function _(Q,M){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");var $=this,Q=(this.editor=Q,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=M,document.createElement("div")),M=((this.dom.wrapper=Q).className="jsoneditor-search",M.appendChild(Q),document.createElement("div")),M=((this.dom.results=M).className="jsoneditor-results",Q.appendChild(M),document.createElement("div")),Q=((this.dom.input=M).className="jsoneditor-frame",M.title=(0,P.Iu)("searchTitle"),Q.appendChild(M),document.createElement("button")),j=(Q.type="button",Q.className="jsoneditor-refresh",M.appendChild(Q),document.createElement("input")),Q=(j.type="text",(this.dom.search=j).oninput=function(te){$._onDelayedSearch(te)},j.onchange=function(te){$._onSearch()},j.onkeydown=function(te){$._onKeyDown(te)},j.onkeyup=function(te){$._onKeyUp(te)},Q.onclick=function(te){j.select()},M.appendChild(j),document.createElement("button")),Q=(Q.type="button",Q.title=(0,P.Iu)("searchNextResultTitle"),Q.className="jsoneditor-next",Q.onclick=function(){$.next()},M.appendChild(Q),document.createElement("button"));Q.type="button",Q.title=(0,P.Iu)("searchPreviousResultTitle"),Q.className="jsoneditor-previous",Q.onclick=function(){$.previous()},M.appendChild(Q)}var Z,W;return Z=_,(W=[{key:"next",value:function(f){var k;this.results&&((k=this.resultIndex!==null?this.resultIndex+1:0)>this.results.length-1&&(k=0),this._setActiveResult(k,f))}},{key:"previous",value:function(f){var k,$;this.results&&(k=this.results.length-1,$=this.resultIndex!==null?this.resultIndex-1:k,this._setActiveResult($=$<0?k:$,f))}},{key:"_setActiveResult",value:function(f,k){var $,M,j;this.activeResult&&($=this.activeResult.node,this.activeResult.elem==="field"?delete $.searchFieldActive:delete $.searchValueActive,$.updateDom()),this.results&&this.results[f]?(this.resultIndex=f,M=this.results[this.resultIndex].node,(j=this.results[this.resultIndex].elem)==="field"?M.searchFieldActive=!0:M.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],M.updateDom(),M.scrollTo(function(){k&&M.focus(j)})):(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(f){this._clearDelay();var k=this;this.timeout=setTimeout(function($){k._onSearch()},this.delay)}},{key:"_onSearch",value:function(f){this._clearDelay();var k=this.dom.search.value,k=0<k.length?k:void 0;if(k!==this.lastText||f){this.lastText=k,this.results=this.editor.search(k);var f=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0,$=0;if(this.activeResult){for(var M=0;M<this.results.length;M++)if(this.results[M].node===this.activeResult.node){$=M;break}}this._setActiveResult($,!1),k!==void 0?(k=this.results.length,this.dom.results.textContent=k===0?"no\xA0results":k===1?"1\xA0result":f<k?f+"+\xA0results":k+"\xA0results"):this.dom.results.textContent=""}}},{key:"_onKeyDown",value:function(f){var k=f.which;k===27?(this.dom.search.value="",this._onSearch(),f.preventDefault(),f.stopPropagation()):k===13&&(f.ctrlKey?this._onSearch(!0):f.shiftKey?this.previous():this.next(),f.preventDefault(),f.stopPropagation())}},{key:"_onKeyUp",value:function(f){var k=f.keyCode;k!==27&&k!==13&&this._onDelayedSearch(f)}},{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()}}])&&B(Z.prototype,W),Object.defineProperty(Z,"prototype",{writable:!1}),_}();function T(_,Z){for(var W=0;W<Z.length;W++){var f=Z[W];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(_,f.key,f)}}var G=function(){function _(f,k){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function");f&&(this.root=k,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,f.appendChild(this.path),this.reset())}var Z,W;return Z=_,(W=[{key:"reset",value:function(){this.path.textContent=(0,P.Iu)("selectNode")}},{key:"setPath",value:function(f){var k=this;this.path.textContent="",f&&f.length&&f.forEach(function($,M){var j,Q=document.createElement("span");Q.className="jsoneditor-treepath-element",Q.innerText=$.name,Q.onclick=function(te){this.selectionCallback&&this.selectionCallback(te)}.bind(k,$),k.path.appendChild(Q),$.children.length&&((j=document.createElement("span")).className="jsoneditor-treepath-seperator",j.textContent="\u25BA",j.onclick=function(){k.contentMenuClicked=!0;var te=[];$.children.forEach(function(he){te.push({text:he.name,className:"jsoneditor-type-modes"+(f[M+1]+1&&f[M+1].name===he.name?" jsoneditor-selected":""),click:function(Ae,ue){this.contextMenuCallback&&this.contextMenuCallback(Ae,ue)}.bind(k,$,he.name)})}),new x.x(te,{limitHeight:!0}).show(j,k.root,!0)},k.path.appendChild(j)),M===f.length-1&&(Q=(j||Q).getBoundingClientRect().right,k.path.offsetWidth<Q&&(k.path.scrollLeft=Q),k.path.scrollLeft&&((Q=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",Q.title="show all path",Q.textContent="...",Q.onclick=function(te){(k.contentMenuClicked=!1,A.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,A.removeClassName)(k.path,"show-all"),k.path.onblur=void 0,k.path.style.width="",k.setPath(te))}}.bind(k,f),k.path.insertBefore(Q,k.path.firstChild)))})}},{key:"onSectionSelected",value:function(f){typeof f=="function"&&(this.selectionCallback=f)}},{key:"onContextMenuItemSelected",value:function(f){typeof f=="function"&&(this.contextMenuCallback=f)}}])&&T(Z.prototype,W),Object.defineProperty(Z,"prototype",{writable:!1}),_}(),F=K(8037),z=K.n(F),K={},Y=(K.create=function(_,Z){if(!_)throw new Error("No container element provided.");function W(le){var ce,fe;document.createRange?((ce=document.createRange()).selectNodeContents(le),ce.collapse(!1),(fe=window.getSelection()).removeAllRanges(),fe.addRange(ce)):document.selection&&((ce=document.body.createTextRange()).moveToElementText(le),ce.collapse(!1),ce.select())}function f(le){return Q===void 0&&((Q=document.createElement("span")).style.visibility="hidden",Q.style.position="fixed",Q.style.outline="0",Q.style.margin="0",Q.style.padding="0",Q.style.border="0",Q.style.left="0",Q.style.whiteSpace="pre",Q.style.fontSize=he,Q.style.fontFamily=Ae,Q.style.fontWeight="normal",document.body.appendChild(Q)),Q.textContent=le,Q.getBoundingClientRect().right}function k(){this.style.backgroundColor="#ddd"}function $(){this.style.backgroundColor=""}function M(){ke.hide(),ke.onmouseselection(this.__hint,ke.rs)}var j,Q,te,he,Ae,ue,Ce,Ie,we,Te,$e,ke,de,Le,ae,ge;this.container=_,this.dom={},this.highlighter=new D,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(Z),Z.autocomplete&&(this.autocomplete=((j=(j=Z.autocomplete)||{}).filter=j.filter||"start",j.trigger=j.trigger||"keydown",j.confirmKeys=j.confirmKeys||[39,35,9],j.caseSensitive=j.caseSensitive||!1,Ae=he="",(ue=document.createElement("div")).style.position="relative",ue.style.outline="0",ue.style.border="0",ue.style.margin="0",ue.style.padding="0",(Ce=document.createElement("div")).className="autocomplete dropdown",Ce.style.position="absolute",Ce.style.visibility="hidden",Ie=Ce,we=[],$e=-1,Le=ke={rs:de={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:Te=0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:ue,show:function(le,ce,fe){var ve=this;this.startFrom=ce,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),he===""&&(he=window.getComputedStyle(le).getPropertyValue("font-size")),Ae===""&&(Ae=window.getComputedStyle(le).getPropertyValue("font-family")),Ce.style.marginLeft="0",Ce.style.marginTop=le.getBoundingClientRect().height+"px",this.options=fe.map(String),this.element!==le&&(this.element=le,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=le.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){ve.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",ae),this.element.addEventListener("keydown",ae,!1),this.element.removeEventListener("blur",ge),this.element.addEventListener("blur",ge,!1)),ue.appendChild(this.elementHint),ue.appendChild(Ce),le.parentElement.appendChild(ue),this.repaint(le)},setText:function(le){this.element.innerText=le},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,Le.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(ce){var ce=(ce=ce.innerText).replace(`
|
|
`,""),fe=this.options.length,ve=ce.substring(this.startFrom);te=ce.substring(0,this.startFrom);for(var Ee=0;Ee<fe;Ee++){var Fe=this.options[Ee];if(!j.caseSensitive&&Fe.toLowerCase().indexOf(ve.toLowerCase())===0||j.caseSensitive&&Fe.indexOf(ve)===0){this.elementHint.innerText=te+ve+Fe.substring(ve.length),this.elementHint.realInnerText=te+Fe;break}}Ce.style.left=f(te)+"px",Le.refresh(ve,this.options),this.elementHint.style.width=f(this.elementHint.innerText)+10+"px",Ce.style.visibility!=="hidden"&&(this.elementHint.style.width=f(this.elementHint.innerText)+Ce.clientWidth+"px")}},hide:function(){Ie.style.visibility="hidden"},refresh:function(le,ce){Ie.style.visibility="hidden",Te=0,Ie.textContent="";var ve=window.innerHeight||document.documentElement.clientHeight,Fe=Ie.parentNode.getBoundingClientRect(),fe=Fe.top-6,ve=ve-Fe.bottom-6,Ee=(we=[],typeof j.filter=="function"?j.filter:X[j.filter]),Fe=Ee?ce.filter(function(Qe){return Ee(j.caseSensitive?le:le.toLowerCase(),j.caseSensitive?Qe:Qe.toLowerCase(),j)}):[];(we=Fe.map(function(Qe){var Me=document.createElement("div"),nt=(Me.className="item",Me.onmouseover=k,Me.onmouseout=$,Me.onmousedown=M,Me.__hint=Qe,Me.textContent="",Me.appendChild(document.createTextNode(Qe.substring(0,le.length))),document.createElement("b"));return nt.appendChild(document.createTextNode(Qe.substring(le.length))),Me.appendChild(nt),Ie.appendChild(Me),Me})).length===0||we.length===1&&(le.toLowerCase()===we[0].__hint.toLowerCase()&&!j.caseSensitive||le===we[0].__hint&&j.caseSensitive)||we.length<2||(ke.highlight(0),3*ve<fe?(Ie.style.maxHeight=fe+"px",Ie.style.top="",Ie.style.bottom="100%"):(Ie.style.top="100%",Ie.style.bottom="",Ie.style.maxHeight=ve+"px"),Ie.style.visibility="visible")},highlight:function(le){$e!==-1&&we[$e]&&(we[$e].className="item"),we[le].className="item hover",$e=le},move:function(le){return Ie.style.visibility==="hidden"?"":(Te+le!==-1&&Te+le!==we.length&&(Te+=le,ke.highlight(Te)),we[Te].__hint)},onmouseselection:function(){}},ae=function(le){var ce=(le=le||window.event).keyCode;if(this.elementHint!=null&&ce!==33&&ce!==34)if(ce===27)de.hideDropDown(),de.element.focus(),le.preventDefault(),le.stopPropagation();else{var fe,ve=(ve=this.element.innerText).replace(`
|
|
`,"");if(0<=j.confirmKeys.indexOf(ce))ce===9&&this.elementHint.innerText.length===0&&de.onTab(),0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,de.hideDropDown(),W(this.element),ce===9&&(de.element.focus(),le.preventDefault(),le.stopPropagation()));else if(ce===13)if(this.elementHint.innerText.length===0)de.onEnter();else{var Ee=Ce.style.visibility==="hidden";if(Le.hide(),Ee)return de.hideDropDown(),de.element.focus(),void de.onEnter();this.element.innerText=this.elementHint.realInnerText,de.hideDropDown(),W(this.element),le.preventDefault(),le.stopPropagation()}else ce===40?(Ee=ve.substring(this.startFrom),(fe=Le.move(1))===""&&de.onArrowDown(),this.elementHint.innerText=te+Ee+fe.substring(Ee.length),this.elementHint.realInnerText=te+fe,le.preventDefault(),le.stopPropagation()):ce===38&&(Ee=ve.substring(this.startFrom),(fe=Le.move(-1))===""&&de.onArrowUp(),this.elementHint.innerText=te+Ee+fe.substring(Ee.length),this.elementHint.realInnerText=te+fe,le.preventDefault(),le.stopPropagation())}}.bind(de),ge=function(le){de.hideDropDown()},Le.onmouseselection=function(le,ce){ce.element.innerText=ce.elementHint.innerText=te+le,ce.hideDropDown(),window.setTimeout(function(){ce.element.focus(),W(ce.element)},1)},de)),this.options.history&&this.options.mode!=="view"&&(this.history=new R(this)),this._createFrame(),this._createTable()},K.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()},K._setOptions=function(_){var Z=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(W,f,k){var $;z()?($=W.getBoundingClientRect().top,$=(0,A.getWindow)(W).innerHeight-$<300&&300<$,new(z())({parent:W,color:f,popup:$?"top":"bottom",onDone:function(M){M=M.rgba[3]===1?M.hex.substr(0,7):M.hex,k(M)}}).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:V.r,executeQuery:V.J,onEvent:null,enableSort:!0,enableTransform:!0},_&&(Object.keys(_).forEach(function(W){Z.options[W]=_[W]}),_.limitDragging==null&&_.schema!=null&&(this.options.limitDragging=!0)),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,A.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),_.onSelectionChange&&this.onSelectionChange(_.onSelectionChange),(0,P.cC)(this.options.languages),(0,P.m0)(this.options.language)},K.set=function(_){_ instanceof Function||_===void 0?this.clear():(this.content.removeChild(this.table),_={field:this.options.name,value:_},_=new o(this,_),this._setRoot(_),this._validateAndCatch(),this.node.expand(!1),this.content.appendChild(this.table)),this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},K.update=function(_){var Z,W;this.node.deepEqual(_)||(Z=this.getSelection(),this.onChangeDisabled=!0,this.node.update(_),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),Z&&Z.start&&Z.end&&(_=this.node.findNodeByPath(Z.start.path),W=this.node.findNodeByPath(Z.end.path),_&&W)?this.setSelection(Z.start,Z.end):this.setSelection({},{}))},K.get=function(){if(this.node)return this.node.getValue()},K.getText=function(){return JSON.stringify(this.get())},K.setText=function(_){try{this.set((0,A.parse)(_))}catch{_=(0,A.tryJsonRepair)(_),this.set((0,A.parse)(_))}},K.updateText=function(_){try{this.update((0,A.parse)(_))}catch{_=(0,A.tryJsonRepair)(_),this.update((0,A.parse)(_))}},K.setName=function(_){this.options.name=_,this.node&&this.node.updateField(this.options.name)},K.getName=function(){return this.options.name},K.focus=function(){var _=this.scrollableContent.querySelector("[contenteditable=true]");_?_.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(_=this.frame.querySelector("button"))&&_.focus()},K.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},K._setRoot=function(_){this.clear(),(this.node=_).setParent(null),_.setField(this.getName(),!1),delete _.index,this.tbody.appendChild(_.getDom())},K.search=function(_){var Z;return this.node?(this.content.removeChild(this.table),Z=this.node.search(_),this.content.appendChild(this.table)):Z=[],Z},K.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},K.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},K.expand=function(_){var Z;!_||(Z=this.node?this.node.findNodeByPath(_.path):null)&&(_.isExpand?Z.expand(_.recursive):Z.collapse(_.recursive))},K._onAction=function(_,Z){this.history&&this.history.add(_,Z),this._onChange()},K._onChange=function(){if(!this.onChangeDisabled){var _;if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath&&((_=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0)?this._updateTreePath(_.getNodePath()):this.treePath.reset()),this.options.onChange)try{this.options.onChange()}catch(Z){console.error("Error in onChange callback: ",Z)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(Z){console.error("Error in onChangeJSON callback: ",Z)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(Z){console.error("Error in onChangeText callback: ",Z)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(Z){console.error("Error in onNodeName callback: ",Z)}}},K.validate=function(){var _=this,Z=this.node;if(Z){var W=Z.getValue(),f=[];this.validateSchema&&!this.validateSchema(W)&&(f=this.validateSchema.errors.map(function(M){return(0,A.improveSchemaError)(M)}).map(function(M){return{node:Z.findNode(M.dataPath),error:M,type:"validation"}}).filter(function(M){return M.node!=null}));try{this.validationSequence++;var k=this,$=this.validationSequence;return this._validateCustom(W).then(function(M){return $===k.validationSequence&&(M=[].concat(f,M||[]),k._renderValidationErrors(M),typeof _.options.onValidationError=="function"&&(0,A.isValidationErrorChanged)(M,_.lastSchemaErrors)&&_.options.onValidationError.call(_,M),_.lastSchemaErrors=M),_.lastSchemaErrors})}catch(M){return Promise.reject(M)}}},K._validateAndCatch=function(){this.validate().catch(function(_){console.error("Error running validation:",_)})},K._renderValidationErrors=function(_){this.errorNodes&&this.errorNodes.forEach(function(W){W.setError(null)});var Z=_.reduce(function(W,f){return f.node.findParents().filter(function(k){return!W.some(function($){return $[0]===k})}).map(function(k){return[k,f.node]}).concat(W)},[]);this.errorNodes=Z.map(function(W){return{node:W[0],child:W[1],error:{message:W[0].type==="object"?(0,P.Iu)("containsInvalidProperties"):(0,P.Iu)("containsInvalidItems")}}}).concat(_).map(function(W){return W.node.setError(W.error,W.child),W.node})},K._validateCustom=function(_){try{var Z,W;if(this.options.onValidate)return Z=this.node,W=this.options.onValidate(_),((0,A.isPromise)(W)?W:Promise.resolve(W)).then(function(f){return Array.isArray(f)?f.filter(function(k){var $=(0,A.isValidValidationError)(k);return $||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',k),$}).map(function(k){var $;try{$=k&&k.path?Z.findNodeByPath(k.path):null}catch{}return $||console.warn("Ignoring validation error: node not found. Path:",k.path,"Error:",k),{node:$,error:k,type:"customValidation"}}).filter(function(k){return k&&k.node&&k.error&&k.error.message}):null})}catch(f){return Promise.reject(f)}return Promise.resolve(null)},K.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},K.startAutoScroll=function(_){var Z=this,W=this.scrollableContent,f=(0,A.getAbsoluteTop)(W),k=W.clientHeight,$=f+k;_<f+24&&0<W.scrollTop?this.autoScrollStep=(f+24-_)/3:$-24<_&&k+W.scrollTop<W.scrollHeight?this.autoScrollStep=($-24-_)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){Z.autoScrollStep?W.scrollTop-=Z.autoScrollStep:Z.stopAutoScroll()},50)):this.stopAutoScroll()},K.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},K.setDomSelection=function(_){var Z,W,f;_&&("scrollTop"in _&&this.scrollableContent&&(this.scrollableContent.scrollTop=_.scrollTop),_.paths?(Z=this,W=_.paths.map(function(k){return Z.node.findNodeByInternalPath(k)}),this.select(W)):(f=(W=_.path?this.node.findNodeByInternalPath(_.path):null)&&_.domName?W.dom[_.domName]:null,_.range&&f?(_=Object.assign({},_.range,{container:f}),(0,A.setSelectionOffset)(_)):W&&W.focus()))},K.getDomSelection=function(){var _=o.getNodeFromTarget(this.focusTarget),Z=this.focusTarget,W=_?Object.keys(_.dom).find(function(k){return _.dom[k]===Z}):null,f=(0,A.getSelectionOffset)();return(f=(f=f&&f.container.nodeName!=="DIV"?null:f)&&f.container!==Z?null:f)&&delete f.container,{path:_?_.getInternalPath():null,domName:W,range:f,paths:0<this.multiselection.length?this.multiselection.nodes.map(function(k){return k.getInternalPath()}):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},K.scrollTo=function(_,Z){var W,f,k,$,M=this.scrollableContent;M?((W=this).animateTimeout&&(clearTimeout(W.animateTimeout),delete W.animateTimeout),W.animateCallback&&(W.animateCallback(!1),delete W.animateCallback),f=M.clientHeight,k=M.scrollHeight-f,$=Math.min(Math.max(_-f/4,0),k),function j(){var Q=M.scrollTop,Q=$-Q;3<Math.abs(Q)?(M.scrollTop+=Q/3,W.animateCallback=Z,W.animateTimeout=setTimeout(j,50)):(Z&&Z(!0),M.scrollTop=$,delete W.animateTimeout,delete W.animateCallback)}()):Z&&Z(!1)},K._createFrame=function(){var _=this,Z=(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 W(j){Z._onEvent&&Z._onEvent(j)}var f,k,$,M={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new N.R(M),this.frame.onclick=function(j){var Q=j.target;W(j),Q.nodeName==="BUTTON"&&j.preventDefault()},this.frame.oninput=W,this.frame.onchange=W,this.frame.onkeydown=W,this.frame.onkeyup=W,this.frame.oncut=W,this.frame.onpaste=W,this.frame.onmousedown=W,this.frame.onmouseup=W,this.frame.onmouseover=W,this.frame.onmouseout=W,(0,A.addEventListener)(this.frame,"focus",W,!0),(0,A.addEventListener)(this.frame,"blur",W,!0),this.frame.onfocusin=W,this.frame.onfocusout=W,this.options.mainMenuBar&&((0,A.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(M=document.createElement("button")).type="button",M.className="jsoneditor-expand-all",M.title=(0,P.Iu)("expandAll"),M.onclick=function(){Z.expandAll(),typeof _.options.onExpand=="function"&&_.options.onExpand({path:[],isExpand:!0,recursive:!0})},this.menu.appendChild(M),(M=document.createElement("button")).type="button",M.title=(0,P.Iu)("collapseAll"),M.className="jsoneditor-collapse-all",M.onclick=function(){Z.collapseAll(),typeof _.options.onExpand=="function"&&_.options.onExpand({path:[],isExpand:!1,recursive:!0})},this.menu.appendChild(M),this.options.enableSort&&((M=document.createElement("button")).type="button",M.className="jsoneditor-sort",M.title=(0,P.Iu)("sortTitleShort"),M.onclick=function(){Z.node.showSortModal()},this.menu.appendChild(M)),this.options.enableTransform&&((M=document.createElement("button")).type="button",M.title=(0,P.Iu)("transformTitleShort"),M.className="jsoneditor-transform",M.onclick=function(){Z.node.showTransformModal()},this.menu.appendChild(M)),this.history&&((f=document.createElement("button")).type="button",f.className="jsoneditor-undo jsoneditor-separator",f.title=(0,P.Iu)("undo"),f.onclick=function(){Z._onUndo()},this.menu.appendChild(f),this.dom.undo=f,(k=document.createElement("button")).type="button",k.className="jsoneditor-redo",k.title=(0,P.Iu)("redo"),k.onclick=function(){Z._onRedo()},this.menu.appendChild(k),this.dom.redo=k,this.history.onChange=function(){f.disabled=!Z.history.canUndo(),k.disabled=!Z.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&(($=this).modeSwitcher=new L.x(this.menu,this.options.modes,this.options.mode,function(j){try{$.setMode(j),$.modeSwitcher.focus()}catch(Q){$._onError(Q)}})),this.options.search&&(this.searchBox=new E(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 G(this.navBar,this.getPopupAnchor()),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},K._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},K._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},K._onEvent=function(_){if(!o.targetIsColorPicker(_.target)){var Z,W=o.getNodeFromTarget(_.target);if(_.type==="keydown"&&this._onKeyDown(_),W&&_.type==="focus"&&(this.focusTarget=_.target,this.options.autocomplete&&this.options.autocomplete.trigger==="focus"&&this._showAutoComplete(_.target)),_.type==="mousedown"&&this._startDragDistance(_),_.type!=="mousemove"&&_.type!=="mouseup"&&_.type!=="click"||this._updateDragDistance(_),W&&this.options&&this.options.navigationBar&&W&&(_.type==="keydown"||_.type==="mousedown")&&(Z=this,setTimeout(function(){Z._updateTreePath(W.getNodePath())})),W&&W.selected){if(_.type==="click"){if(_.target===W.dom.menu)return void this.showContextMenu(_.target);_.hasMoved||this.deselect()}_.type==="mousedown"&&o.onDragStart(this.multiselection.nodes,_)}else _.type==="mousedown"&&(0,A.hasParentNode)(_.target,this.content)&&(this.deselect(),W&&_.target===W.dom.drag?o.onDragStart(W,_):W&&(_.target===W.dom.field||_.target===W.dom.value||_.target===W.dom.select)||this._onMultiSelectStart(_));W&&W.onEvent(_)}},K._updateTreePath=function(_){var Z;function W(f){return f.parent?f.parent.type==="array"?f.index:f.field:f.field||f.type}_&&_.length?((0,A.removeClassName)(this.navBar,"nav-bar-empty"),Z=[],_.forEach(function(f){var k={name:W(f),node:f,children:[]};f.childs&&f.childs.length&&f.childs.forEach(function($){k.children.push({name:W($),node:$})}),Z.push(k)}),this.treePath.setPath(Z)):(0,A.addClassName)(this.navBar,"nav-bar-empty")},K._onTreePathSectionSelected=function(_){_&&_.node&&(_.node.expandTo(),_.node.focus())},K._onTreePathMenuItemSelected=function(_,Z){_&&_.children.length&&(_=_.children.find(function(W){return W.name===Z}))&&_.node&&(this._updateTreePath(_.node.getNodePath()),_.node.expandTo(),_.node.focus())},K._startDragDistance=function(_){this.dragDistanceEvent={initialTarget:_.target,initialPageX:_.pageX,initialPageY:_.pageY,dragDistance:0,hasMoved:!1}},K._updateDragDistance=function(_){this.dragDistanceEvent||this._startDragDistance(_);var Z=_.pageX-this.dragDistanceEvent.initialPageX,W=_.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(Z*Z+W*W),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,_.dragDistance=this.dragDistanceEvent.dragDistance,_.hasMoved=this.dragDistanceEvent.hasMoved,_.dragDistance},K._onMultiSelectStart=function(_){var Z,W=o.getNodeFromTarget(_.target);this.options.mode==="tree"&&this.options.onEditable===void 0&&(this.multiselection={start:W||null,end:null,nodes:[]},this._startDragDistance(_),(Z=this).mousemove||(this.mousemove=(0,A.addEventListener)(_.view,"mousemove",function(f){Z._onMultiSelect(f)})),this.mouseup||(this.mouseup=(0,A.addEventListener)(_.view,"mouseup",function(f){Z._onMultiSelectEnd(f)})),_.preventDefault())},K._onMultiSelect=function(_){var Z;_.preventDefault(),this._updateDragDistance(_),_.hasMoved&&((_=o.getNodeFromTarget(_.target))&&(this.multiselection.start==null&&(this.multiselection.start=_),this.multiselection.end=_),this.deselect(),_=this.multiselection.start,Z=this.multiselection.end||this.multiselection.start,_&&Z&&(this.multiselection.nodes=this._findTopLevelNodes(_,Z),this.multiselection.nodes&&this.multiselection.nodes.length&&(_=this.multiselection.nodes[0],this.multiselection.start===_||this.multiselection.start.isDescendantOf(_)?this.multiselection.direction="down":this.multiselection.direction="up"),this.select(this.multiselection.nodes)))},K._onMultiSelectEnd=function(_){var Z=this.multiselection.nodes[0];Z&&Z.dom.menu&&Z.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,A.removeEventListener)(_.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,A.removeEventListener)(_.view,"mouseup",this.mouseup),delete this.mouseup)},K.deselect=function(_){var Z=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach(function(W){W.setSelected(!1)}),this.multiselection.nodes=[],_&&(this.multiselection.start=null,this.multiselection.end=null),Z&&this._selectionChangedHandler&&this._selectionChangedHandler()},K.select=function(_){if(!Array.isArray(_))return this.select([_]);var Z;_&&(this.deselect(),this.multiselection.nodes=_.slice(0),Z=_[0],_.forEach(function(W){W.expandPathToNode(),W.setSelected(!0,W===Z)}),this._selectionChangedHandler&&(_=this.getSelection(),this._selectionChangedHandler(_.start,_.end)))},K._findTopLevelNodes=function(M,j){for(var W=M.getNodePath(),f=j.getNodePath(),k=0;k<W.length&&W[k]===f[k];)k++;var $,M=W[k-1],j=W[k],Q=f[k];return j&&Q||(M.parent?M=(Q=j=M).parent:(j=M.childs[0],Q=M.childs[M.childs.length-1])),M&&j&&Q?(j=M.childs.indexOf(j),Q=M.childs.indexOf(Q),$=Math.min(j,Q),j=Math.max(j,Q),M.childs.slice($,j+1)):[]},K._showAutoComplete=function(_){var Z,W=o.getNodeFromTarget(_),f="";0<=_.className.indexOf("jsoneditor-value")&&(f="value"),(f=0<=_.className.indexOf("jsoneditor-field")?"field":f)!==""&&(Z=this,setTimeout(function(){var k;!W||!(Z.options.autocomplete.trigger==="focus"||0<_.innerText.length)||(k=Z.options.autocomplete.getOptions(_.innerText,W.getPath(),f,W.editor))===null?Z.autocomplete.hideDropDown():typeof k.then=="function"?k.then(function($){$===null?Z.autocomplete.hideDropDown():$.options?Z.autocomplete.show(_,$.startFrom,$.options):Z.autocomplete.show(_,0,$)}).catch(function($){console.error($)}):k.options?Z.autocomplete.show(_,k.startFrom,k.options):Z.autocomplete.show(_,0,k)},50))},K._onKeyDown=function(_){var Z,W=_.which||_.keyCode,f=_.altKey,k=_.ctrlKey,$=_.metaKey,M=_.shiftKey,j=!1,Q=this.focusTarget;W===9&&(Z=this,setTimeout(function(){Z.focusTarget!==Q&&(0,A.selectContentEditable)(Z.focusTarget)},0)),this.searchBox&&(k&&W===70?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),j=!0):(W===114||k&&W===71)&&(M?this.searchBox.previous(!0):this.searchBox.next(!0),j=!0)),this.history&&(k&&!M&&W===90?(this._onUndo(),j=!0):k&&M&&W===90&&(this._onRedo(),j=!0)),!this.options.autocomplete||j||k||f||$||_.key.length!==1&&W!==8&&W!==46||(j=!1,this._showAutoComplete(_.target)),j&&(_.preventDefault(),_.stopPropagation())},K._createTable=function(){var _;this.options.navigationBar&&(0,A.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"&&((_=document.createElement("col")).width="24px",this.colgroupContent.appendChild(_)),(_=document.createElement("col")).width="24px",this.colgroupContent.appendChild(_),_=document.createElement("col"),this.colgroupContent.appendChild(_),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(this.contentOuter)},K.showContextMenu=function(_,Z){var W,f=[],k=this.multiselection.nodes.slice();f.push({text:(0,P.Iu)("duplicateText"),title:(0,P.Iu)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){o.onDuplicate(k)}}),f.push({text:(0,P.Iu)("remove"),title:(0,P.Iu)("removeTitle"),className:"jsoneditor-remove",click:function(){o.onRemove(k)}}),this.options.onCreateMenu&&(W=k.map(function($){return $.getPath()}),f=this.options.onCreateMenu(f,{type:"multiple",path:W[0],paths:W})),new x.x(f,{close:Z}).show(_,this.getPopupAnchor())},K.getPopupAnchor=function(){return this.options.popupAnchor||this.frame},K.getSelection=function(){var _,Z,W={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(_=this.multiselection.nodes[0],Z=this.multiselection.nodes[this.multiselection.nodes.length-1],this.multiselection.direction==="down"?(W.start=_.serialize(),W.end=Z.serialize()):(W.start=Z.serialize(),W.end=_.serialize())),W},K.onSelectionChange=function(_){typeof _=="function"&&(this._selectionChangedHandler=(0,A.debounce)(_,this.DEBOUNCE_INTERVAL))},K.setSelection=function(_,Z){_&&_.dom&&_.range&&(console.warn("setSelection/getSelection usage for text selection is deprecated and should not be used, see documentation for supported selection options"),this.setDomSelection(_)),_=this._getNodeInstancesByRange(_,Z),_.forEach(function(W){W.expandTo()}),this.select(_)},K._getNodeInstancesByRange=function(_,Z){_&&_.path&&(W=this.node.findNodeByPath(_.path),Z&&Z.path&&(f=this.node.findNodeByPath(Z.path)));var W,f,k=[];if(W instanceof o)if(f instanceof o&&f!==W)if(W.parent===f.parent){Z=W.getIndex()<f.getIndex()?(_=W,f):(_=f,W);var $=_;for(k.push($);$=$.nextSibling(),k.push($),$&&$!==Z;);}else k=this._findTopLevelNodes(W,f);else k.push(W);return k},K.getNodesByRange=function(W,Z){var W=this._getNodeInstancesByRange(W,Z),f=[];return W.forEach(function(k){f.push(k.serialize())}),f},[{mode:"tree",mixin:K,data:"json"},{mode:"view",mixin:K,data:"json"},{mode:"form",mixin:K,data:"json"}])},2744:function(ie,g,H){g.tryRequireAjv=function(){try{return H(8903)}catch{}}},9125:function(ie,g,H){g.O=function(){try{H(4864)}catch(X){console.error(X)}}},9791:function(ie,x,H){H.r(x),H.d(x,{addClassName:function(){return y},addEventListener:function(){return _},asyncExec:function(){return nt},clear:function(){return i},compileJSONPointer:function(){return Ie},contains:function(){return Fe},debounce:function(){return te},escapeUnicodeChars:function(){return c},extend:function(){return n},findUniqueName:function(){return de},formatSize:function(){return fe},get:function(){return ke},getAbsoluteLeft:function(){return l},getAbsoluteTop:function(){return d},getChildPaths:function(){return Le},getColorCSS:function(){return we},getIndexForPosition:function(){return ue},getInnerText:function(){return T},getInputSelection:function(){return Ae},getInternetExplorerVersion:function(){return z},getPositionForPath:function(){return Ce},getSelection:function(){return v},getSelectionOffset:function(){return B},getType:function(){return t},getWindow:function(){return o},hasParentNode:function(){return F},improveSchemaError:function(){return $},insideRect:function(){return Q},isArray:function(){return a},isChildOf:function(){return W},isFirefox:function(){return Y},isObject:function(){return Ee},isPromise:function(){return M},isTimestamp:function(){return ce},isUrl:function(){return r},isValidColor:function(){return Te},isValidValidationError:function(){return j},isValidationErrorChanged:function(){return Qe},limitCharacters:function(){return ve},makeFieldTooltip:function(){return $e},parse:function(){return S},parsePath:function(){return f},parseString:function(){return le},removeAllClassNames:function(){return I},removeClassName:function(){return h},removeEventListener:function(){return Z},removeReturnsAndSurroundingWhitespace:function(){return G},selectContentEditable:function(){return w},setEndOfContentEditable:function(){return b},setSelection:function(){return R},setSelectionOffset:function(){return E},sort:function(){return ae},sortObjectKeys:function(){return ge},stringifyPath:function(){return k},stripFormatting:function(){return u},textDiff:function(){return he},tryJsonRepair:function(){return p},uniqueMergeArrays:function(){return Me},validate:function(){return s}}),H(4987);var x=H(233),X=H.n(x),x=H(3860),N=H.n(x),O=H(6589),D=H(7026),P=H(7907);function V(J){return function(ne){if(Array.isArray(ne))return L(ne)}(J)||function(ne){if(typeof Symbol!="undefined"&&ne[Symbol.iterator]!=null||ne["@@iterator"]!=null)return Array.from(ne)}(J)||function(ne,oe){var pe;if(ne)return typeof ne=="string"?L(ne,oe):(pe=(pe=Object.prototype.toString.call(ne).slice(8,-1))==="Object"&&ne.constructor?ne.constructor.name:pe)==="Map"||pe==="Set"?Array.from(ne):pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pe)?L(ne,oe):void 0}(J)||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 L(J,ne){(ne==null||ne>J.length)&&(ne=J.length);for(var oe=0,pe=new Array(ne);oe<ne;oe++)pe[oe]=J[oe];return pe}function C(J){return(C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne})(J)}var m=1e4,A=9466848e5;function S(J){try{return JSON.parse(J)}catch(ne){throw s(J),ne}}function p(J){try{return N()(J)}catch{return J}}function c(J){return J.replace(/[\u007F-\uFFFF]/g,function(ne){return"\\u"+("0000"+ne.charCodeAt(0).toString(16)).slice(-4)})}function s(J){(O!==void 0?O:JSON).parse(J)}function n(J,ne){for(var oe in ne)kt(ne,oe)&&(J[oe]=ne[oe]);return J}function i(J){for(var ne in J)kt(J,ne)&&delete J[ne];return J}function t(J){return J===null?"null":J===void 0?"undefined":J instanceof Number||typeof J=="number"?"number":J instanceof String||typeof J=="string"?"string":J instanceof Boolean||typeof J=="boolean"?"boolean":J instanceof RegExp?"regexp":a(J)?"array":"object"}var e=/^https?:\/\/\S+$/;function r(J){return(typeof J=="string"||J instanceof String)&&e.test(J)}function a(J){return Object.prototype.toString.call(J)==="[object Array]"}function o(J){return J.ownerDocument.defaultView}function l(J){return J.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function d(J){return J.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function y(J,ne){var oe=J.className.split(" ");oe.indexOf(ne)===-1&&(oe.push(ne),J.className=oe.join(" "))}function I(J){J.className=""}function h(J,pe){var oe=J.className.split(" "),pe=oe.indexOf(pe);pe!==-1&&(oe.splice(pe,1),J.className=oe.join(" "))}function u(J){for(var ne=J.childNodes,oe=0,pe=ne.length;oe<pe;oe++){var Se=ne[oe],xe=(Se.style&&Se.removeAttribute("style"),Se.attributes);if(xe)for(var Ge=xe.length-1;0<=Ge;Ge--){var ze=xe[Ge];ze.specified===!0&&Se.removeAttribute(ze.name)}u(Se)}}function b(J){var ne;document.createRange&&((ne=document.createRange()).selectNodeContents(J),ne.collapse(!1),(J=window.getSelection()).removeAllRanges(),J.addRange(ne))}function w(J){var ne;J&&J.nodeName==="DIV"&&window.getSelection&&document.createRange&&((ne=document.createRange()).selectNodeContents(J),(J=window.getSelection()).removeAllRanges(),J.addRange(ne))}function v(){if(window.getSelection){var J=window.getSelection();if(J.getRangeAt&&J.rangeCount)return J.getRangeAt(0)}return null}function R(J){var ne;J&&window.getSelection&&((ne=window.getSelection()).removeAllRanges(),ne.addRange(J))}function B(){var J=v();return J&&"startOffset"in J&&"endOffset"in J&&J.startContainer&&J.startContainer===J.endContainer?{startOffset:J.startOffset,endOffset:J.endOffset,container:J.startContainer.parentNode}:null}function E(J){var ne;document.createRange&&window.getSelection&&window.getSelection()&&(ne=document.createRange(),J.container.firstChild||J.container.appendChild(document.createTextNode("")),ne.setStart(J.container.firstChild,J.startOffset),ne.setEnd(J.container.firstChild,J.endOffset),R(ne))}function T(J,ne){var oe;if(ne===void 0&&(ne={_text:"",flush:function(){var gt=this._text;return this._text="",gt},set:function(gt){this._text=gt}}),J.nodeValue)return(oe=G(J.nodeValue))!==""?ne.flush()+oe:"";if(J.hasChildNodes()){for(var pe=J.childNodes,Se="",xe=0,Ge=pe.length;xe<Ge;xe++){var ze,et=pe[xe];et.nodeName==="DIV"||et.nodeName==="P"?((ze=(ze=pe[xe-1])?ze.nodeName:void 0)&&ze!=="DIV"&&ze!=="P"&&ze!=="BR"&&(Se!==""&&(Se+=`
|
|
`),ne.flush()),Se+=T(et,ne),ne.set(`
|
|
`)):et.nodeName==="BR"?(Se+=ne.flush(),ne.set(`
|
|
`)):Se+=T(et,ne)}return Se}return""}function G(J){return J.replace(/(\b|^)\s*(\b|$)/g,function(ne){return/\n/.exec(ne)?"":ne})}function F(J,ne){for(var oe=J?J.parentNode:void 0;oe;){if(oe===ne)return!0;oe=oe.parentNode}return!1}function z(){var J;return K===-1&&(J=-1,typeof navigator!="undefined"&&navigator.appName==="Microsoft Internet Explorer"&&/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)!=null&&(J=parseFloat(RegExp.$1)),K=J),K}var K=-1;function Y(){return typeof navigator!="undefined"&&navigator.userAgent.indexOf("Firefox")!==-1}function _(J,ne,oe,pe){return J.addEventListener?(pe===void 0&&(pe=!1),ne==="mousewheel"&&Y()&&(ne="DOMMouseScroll"),J.addEventListener(ne,oe,pe),oe):J.attachEvent?(J.attachEvent("on"+ne,pe=function(){return oe.call(J,window.event)}),pe):void 0}function Z(J,ne,oe,pe){J.removeEventListener?(pe===void 0&&(pe=!1),ne==="mousewheel"&&Y()&&(ne="DOMMouseScroll"),J.removeEventListener(ne,oe,pe)):J.detachEvent&&J.detachEvent("on"+ne,oe)}function W(J,ne){for(var oe=J.parentNode;oe;){if(oe===ne)return!0;oe=oe.parentNode}return!1}function f(J){var ne=[],oe=0;function pe(xe){for(var Ge="";J[oe]!==void 0&&J[oe]!==xe;)Ge+=J[oe],oe++;if(J[oe]!==xe)throw new Error("Invalid JSON path: unexpected end, character "+xe+" expected");return Ge}for(;J[oe]!==void 0;)if(J[oe]===".")oe++,ne.push(function(){for(var xe="";J[oe]!==void 0&&/[\w$]/.test(J[oe]);)xe+=J[oe],oe++;if(xe==="")throw new Error("Invalid JSON path: property name expected at index "+oe);return xe}());else{if(J[oe]!=="[")throw new Error('Invalid JSON path: unexpected character "'+J[oe]+'" at index '+oe);if(J[++oe]==="'"||J[oe]==='"'){var Se=J[oe];if(oe++,ne.push(pe(Se)),J[oe]!==Se)throw new Error("Invalid JSON path: closing quote ' expected at index "+oe);oe++}else{if(Se=pe("]").trim(),Se.length===0)throw new Error("Invalid JSON path: array value expected at index "+oe);Se=Se==="*"?Se:JSON.parse(Se),ne.push(Se)}if(J[oe]!=="]")throw new Error("Invalid JSON path: closing bracket ] expected at index "+oe);oe++}return ne}function k(J){return J.map(function(ne){return typeof ne=="number"?"["+ne+"]":typeof ne=="string"&&ne.match(/^[A-Za-z0-9_$]+$/)?"."+ne:'["'+ne+'"]'}).join("")}function $(J){var ne,oe;return J.keyword==="enum"&&Array.isArray(J.schema)&&(oe=J.schema)&&(5<(oe=oe.map(function(pe){return JSON.stringify(pe)})).length&&(ne=["("+(oe.length-5)+" more...)"],(oe=oe.slice(0,5)).push(ne)),J.message="should be equal to one of: "+oe.join(", ")),J.keyword==="additionalProperties"&&(J.message="should NOT have additional property: "+J.params.additionalProperty),J}function M(J){return J&&typeof J.then=="function"&&typeof J.catch=="function"}function j(J){return C(J)==="object"&&Array.isArray(J.path)&&typeof J.message=="string"}function Q(J,ne,oe){return oe=oe!==void 0?oe:0,ne.left-oe>=J.left&&ne.right+oe<=J.right&&ne.top-oe>=J.top&&ne.bottom+oe<=J.bottom}function te(J,ne,oe){var pe;return function(){var Se=this,xe=arguments,Ge=oe&&!pe;clearTimeout(pe),pe=setTimeout(function(){pe=null,oe||J.apply(Se,xe)},ne),Ge&&J.apply(Se,xe)}}function he(J,ne){for(var oe=ne.length,pe=0,Se=J.length,xe=ne.length;ne.charAt(pe)===J.charAt(pe)&&pe<oe;)pe++;for(;ne.charAt(xe-1)===J.charAt(Se-1)&&pe<xe&&0<Se;)xe--,Se--;return{start:pe,end:xe}}function Ae(J){var ne,oe,pe,Se,xe=0,Ge=0;return typeof J.selectionStart=="number"&&typeof J.selectionEnd=="number"?(xe=J.selectionStart,Ge=J.selectionEnd):(Se=document.selection.createRange())&&Se.parentElement()===J&&(pe=J.value.length,ne=J.value.replace(/\r\n/g,`
|
|
`),(oe=J.createTextRange()).moveToBookmark(Se.getBookmark()),(Se=J.createTextRange()).collapse(!1),-1<oe.compareEndPoints("StartToEnd",Se)?xe=Ge=pe:(xe=-oe.moveStart("character",-pe),xe+=ne.slice(0,xe).split(`
|
|
`).length-1,-1<oe.compareEndPoints("EndToEnd",Se)?Ge=pe:(Ge=-oe.moveEnd("character",-pe),Ge+=ne.slice(0,Ge).split(`
|
|
`).length-1))),{startIndex:xe,endIndex:Ge,start:ze(xe),end:ze(Ge)};function ze(et){return et=J.value.substring(0,et),{row:(et.match(/\n/g)||[]).length+1,column:et.length-et.lastIndexOf(`
|
|
`)}}}function ue(pe,ne,oe){var pe=pe.value||"";return 0<ne&&0<oe?(pe=pe.split(`
|
|
`,ne),ne=Math.min(pe.length,ne),oe=Math.min(pe[ne-1].length,oe-1),oe=ne===1?oe:oe+1,pe.slice(0,ne-1).join(`
|
|
`).length+oe):-1}function Ce(J,ne){var oe,pe=[];if(ne&&ne.length){try{oe=D.parse(J)}catch{return pe}ne.forEach(function(Se){var xe=Ie(f(Se)),xe=oe.pointers[xe];xe&&pe.push({path:Se,line:xe.key?xe.key.line:xe.value?xe.value.line:0,column:xe.key?xe.key.column:xe.value?xe.value.column:0})})}return pe}function Ie(J){return J.map(function(ne){return"/"+String(ne).replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function we(J){var ne=document.createElement("div");return ne.style.color=J,ne.style.color.split(/\s+/).join("").toLowerCase()||null}function Te(J){return!!we(J)}function $e(J,ne){var oe;return J?(oe="",J.title&&(oe+=J.title),J.description&&(0<oe.length&&(oe+=`
|
|
`),oe+=J.description),J.default&&(0<oe.length&&(oe+=`
|
|
|
|
`),oe=(oe+=(0,P.Iu)("default",void 0,ne)+`
|
|
`)+JSON.stringify(J.default,null,2)),Array.isArray(J.examples)&&0<J.examples.length&&(0<oe.length&&(oe+=`
|
|
|
|
`),oe+=(0,P.Iu)("examples",void 0,ne)+`
|
|
`,J.examples.forEach(function(pe,Se){oe+=JSON.stringify(pe,null,2),Se!==J.examples.length-1&&(oe+=`
|
|
`)})),oe):""}function ke(J,ne){for(var oe=J,pe=0;pe<ne.length&&oe!=null;pe++)oe=oe[ne[pe]];return oe}function de(J,ne){for(var oe=J.replace(/ \(copy( \d+)?\)$/,""),pe=oe,Se=1;ne.indexOf(pe)!==-1;)pe=oe+" ("+("copy"+(1<Se?" "+Se:""))+")",Se++;return pe}function Le(J,ne){var oe={};if(Array.isArray(J))for(var pe=Math.min(J.length,m),Se=0;Se<pe;Se++)(function xe(Ge,ze,et,gt){(Array.isArray(Ge)||Ee(Ge))&&!gt||(ze[et||""]=!0),Ee(Ge)&&Object.keys(Ge).forEach(function(q){xe(Ge[q],ze,et+"."+q,gt)})})(J[Se],oe,"",ne);else oe[""]=!0;return Object.keys(oe).sort()}function ae(J,xe,oe){var pe=xe&&xe!=="."?f(xe):[],Se=oe==="desc"?-1:1,xe=J.slice();return xe.sort(function(Ge,ze){return Ge=ke(Ge,pe),ze=ke(ze,pe),Se*(ze<Ge?1:Ge<ze?-1:0)}),xe}function ge(J,pe){var oe=pe==="desc"?-1:1,pe=Object.keys(J).sort(function(xe,Ge){return oe*X()(xe,Ge)}),Se={};return pe.forEach(function(xe){Se[xe]=J[xe]}),Se}function le(J){var ne,oe;return J===""?"":(ne=J.toLowerCase())==="null"?null:ne==="true"||ne!=="false"&&(ne=Number(J),oe=parseFloat(J),isNaN(ne)||isNaN(oe)?J:ne)}function ce(J,ne){return typeof ne=="number"&&A<ne&&isFinite(ne)&&Math.floor(ne)===ne&&!isNaN(new Date(ne).valueOf())}function fe(J){return J<900?J.toFixed()+" B":(J=J/1e3)<900?J.toFixed(1)+" KB":(J=J/1e3)<900?J.toFixed(1)+" MB":(J=J/1e3)<900?J.toFixed(1)+" GB":(J/1e3).toFixed(1)+" TB"}function ve(J,ne){return J.length<=ne?J:J.slice(0,ne)+"..."}function Ee(J){return C(J)==="object"&&J!==null&&!Array.isArray(J)}function Fe(J,ne){return J.indexOf(ne)!==-1}function Qe(J,ne){if(ne||J){if(ne&&!J||!ne&&J||ne.length!==J.length)return!0;for(var oe=0;oe<J.length;++oe){var pe=function(Se){if(!(J[Se].type==="error"?ne.find(function(xe){return xe.line===J[Se].line}):ne.find(function(xe){return xe.dataPath===J[Se].dataPath&&xe.schemaPath===J[Se].schemaPath})))return{v:!0}}(oe);if(C(pe)==="object")return pe.v}}return!1}function Me(J,ne){return J=J!=null&&J.length?J:[],ne=ne!=null&&ne.length?ne:[],V(new Set(J.concat(ne)))}function nt(J){setTimeout(J)}function kt(J,ne){return Object.prototype.hasOwnProperty.call(J,ne)}},8037:function(ie,g,H){var X;if(window.Picker)X=window.Picker;else try{X=H(4049)}catch{}ie.exports=X},6225:function(ie,g,H){function X(C,m){var A,S;return m=L(C,m),(C=D.modules[m])||(typeof(C=D.payloads[m])=="function"&&(A={id:m,uri:"",exports:S={},packaged:!0},S=C(function(p,c){return P(m,p,c)},S,A)||A.exports,D.modules[m]=S,delete D.payloads[m]),C=D.modules[m]=S||C),C}var x,N,O,D,P,V,L;ie=H.nmd(ie),(O=function(){return this}())||typeof window=="undefined"||(O=window),(D=function(C,m,A){typeof C!="string"?D.original?D.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(arguments.length==2&&(A=m),D.modules[C]||(D.payloads[C]=A,D.modules[C]=null))}).modules={},D.payloads={},P=function(C,m,A){if(typeof m=="string"){var S=X(C,m);if(S!=null)return A&&A(),S}else if(Object.prototype.toString.call(m)==="[object Array]"){for(var p=[],c=0,s=m.length;c<s;++c){var n=X(C,m[c]);if(n==null&&V.original)return;p.push(n)}return A&&A.apply(null,p)||!0}},V=function(C,m){var A=P("",C,m);return A==null&&V.original?V.original.apply(this,arguments):A},L=function(C,m){var A;if(m.indexOf("!")!==-1)return A=m.split("!"),L(C,A[0])+"!"+L(C,A[1]);if(m.charAt(0)==".")for(m=C.split("/").slice(0,-1).join("/")+"/"+m;m.indexOf(".")!==-1&&S!=m;){var S=m;m=m.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return m},N=O,(x="ace")&&(O[x]||(O[x]={}),N=O[x]),N.define&&N.define.packaged||(D.original=N.define,N.define=D,N.define.packaged=!0),N.require&&N.require.packaged||(V.original=N.require,N.require=V,N.require.packaged=!0),ace.define("ace/lib/es6-shim",["require","exports","module"],function(C,m,A){function S(p,c,s){Object.defineProperty(p,c,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||S(String.prototype,"startsWith",function(p,c){return this.lastIndexOf(p,c=c||0)===c}),String.prototype.endsWith||S(String.prototype,"endsWith",function(p,c){return(c===void 0||c>this.length)&&(c=this.length),c-=p.length,p=this.indexOf(p,c),p!==-1&&p===c}),String.prototype.repeat||S(String.prototype,"repeat",function(p){for(var c="",s=this;0<p;)1&p&&(c+=s),(p>>=1)&&(s+=s);return c}),String.prototype.includes||S(String.prototype,"includes",function(p,c){return this.indexOf(p,c)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(p),s=1;s<arguments.length;s++){var n=arguments[s];n!=null&&Object.keys(n).forEach(function(i){c[i]=n[i]})}return c}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(c){return p[c]})}),Array.prototype.find||S(Array.prototype,"find",function(p){for(var c=this.length,s=arguments[1],n=0;n<c;n++){var i=this[n];if(p.call(s,i,n,this))return i}}),Array.prototype.findIndex||S(Array.prototype,"findIndex",function(p){for(var c=this.length,s=arguments[1],n=0;n<c;n++){var i=this[n];if(p.call(s,i,n,this))return n}}),Array.prototype.includes||S(Array.prototype,"includes",function(p,c){return this.indexOf(p,c)!=-1}),Array.prototype.fill||S(Array.prototype,"fill",function(p){for(var c=this.length>>>0,n=arguments[1]>>0,s=n<0?Math.max(c+n,0):Math.min(n,c),n=arguments[2],n=n===void 0?c:n>>0,i=n<0?Math.max(c+n,0):Math.min(n,c);s<i;)this[s]=p,s++;return this}),Array.of||S(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(C,m,A){C("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(C,m,A){m.last=function(c){return c[c.length-1]},m.stringReverse=function(c){return c.split("").reverse().join("")},m.stringRepeat=function(c,s){for(var n="";0<s;)1&s&&(n+=c),(s>>=1)&&(c+=c);return n};var S=/^\s\s*/,p=/\s\s*$/;m.stringTrimLeft=function(c){return c.replace(S,"")},m.stringTrimRight=function(c){return c.replace(p,"")},m.copyObject=function(c){var s,n={};for(s in c)n[s]=c[s];return n},m.copyArray=function(c){for(var s=[],n=0,i=c.length;n<i;n++)c[n]&&typeof c[n]=="object"?s[n]=this.copyObject(c[n]):s[n]=c[n];return s},m.deepCopy=function c(s){if(typeof s!="object"||!s)return s;if(Array.isArray(s))for(var n=[],i=0;i<s.length;i++)n[i]=c(s[i]);else{if(Object.prototype.toString.call(s)!=="[object Object]")return s;for(var i in n={},s)n[i]=c(s[i])}return n},m.arrayToMap=function(c){for(var s={},n=0;n<c.length;n++)s[c[n]]=1;return s},m.createMap=function(c){var s,n=Object.create(null);for(s in c)n[s]=c[s];return n},m.arrayRemove=function(c,s){for(var n=0;n<=c.length;n++)s===c[n]&&c.splice(n,1)},m.escapeRegExp=function(c){return c.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},m.escapeHTML=function(c){return(""+c).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},m.getMatchOffsets=function(c,s){var n=[];return c.replace(s,function(i){n.push({offset:arguments[arguments.length-2],length:i.length})}),n},m.deferredCall=function(c){function s(){i=null,c()}function n(t){return n.cancel(),i=setTimeout(s,t||0),n}var i=null;return(n.schedule=n).call=function(){return this.cancel(),c(),n},n.cancel=function(){return clearTimeout(i),i=null,n},n.isPending=function(){return i},n},m.delayedCall=function(c,s){function n(){t=null,c()}function i(e){t==null&&(t=setTimeout(n,e||s))}var t=null;return i.delay=function(e){t&&clearTimeout(t),t=setTimeout(n,e||s)},(i.schedule=i).call=function(){this.cancel(),c()},i.cancel=function(){t&&clearTimeout(t),t=null},i.isPending=function(){return t},i}}),ace.define("ace/lib/oop",["require","exports","module"],function(C,m,A){m.inherits=function(S,p){S.super_=p,S.prototype=Object.create(p.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}})},m.mixin=function(S,p){for(var c in p)S[c]=p[c];return S},m.implement=function(S,p){m.mixin(S,p)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(C,m,A){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 c=typeof navigator=="object"?navigator:{},S=(/mac|win|linux/i.exec(c.platform)||["other"])[0].toLowerCase(),p=c.userAgent||"",c=c.appName||"";m.isWin=S=="win",m.isMac=S=="mac",m.isLinux=S=="linux",m.isIE=c=="Microsoft Internet Explorer"||0<=c.indexOf("MSAppHost")?parseFloat((p.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((p.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),m.isOldIE=m.isIE&&m.isIE<9,m.isGecko=m.isMozilla=p.match(/ Gecko\/\d+/),m.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",m.isWebKit=parseFloat(p.split("WebKit/")[1])||void 0,m.isChrome=parseFloat(p.split(" Chrome/")[1])||void 0,m.isEdge=parseFloat(p.split(" Edge/")[1])||void 0,m.isAIR=0<=p.indexOf("AdobeAIR"),m.isAndroid=0<=p.indexOf("Android"),m.isChromeOS=0<=p.indexOf(" CrOS "),m.isIOS=/iPad|iPhone|iPod/.test(p)&&!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(c,m,A){var S,p,c=c("./useragent"),s=(m.buildDom=function t(e,r,a){if(typeof e=="string"&&e)return h=document.createTextNode(e),r&&r.appendChild(h),h;if(!Array.isArray(e))return e&&e.appendChild&&r&&r.appendChild(e),e;if(typeof e[0]!="string"||!e[0]){for(var o=[],l=0;l<e.length;l++){var d=t(e[l],r,a);d&&o.push(d)}return o}for(var y=document.createElement(e[0]),I=e[1],h=1,l=h=I&&typeof I=="object"&&!Array.isArray(I)?2:h;l<e.length;l++)t(e[l],y,a);return h==2&&Object.keys(I).forEach(function(u){var b=I[u];u==="class"?y.className=Array.isArray(b)?b.join(" "):b:typeof b=="function"||u=="value"||u[0]=="$"?y[u]=b:u==="ref"?a&&(a[b]=y):u==="style"?typeof b=="string"&&(y.style.cssText=b):b!=null&&y.setAttribute(u,b)}),r&&r.appendChild(y),y},m.getDocumentHead=function(t){return(t=t||document).head||t.getElementsByTagName("head")[0]||t.documentElement},m.createElement=function(t,e){return document.createElementNS?document.createElementNS(e||"http://www.w3.org/1999/xhtml",t):document.createElement(t)},m.removeChildren=function(t){t.innerHTML=""},m.createTextNode=function(t,e){return(e?e.ownerDocument:document).createTextNode(t)},m.createFragment=function(t){return(t?t.ownerDocument:document).createDocumentFragment()},m.hasCssClass=function(t,e){return(t.className+"").split(/\s+/g).indexOf(e)!==-1},m.addCssClass=function(t,e){m.hasCssClass(t,e)||(t.className+=" "+e)},m.removeCssClass=function(t,e){for(var r=t.className.split(/\s+/g);;){var a=r.indexOf(e);if(a==-1)break;r.splice(a,1)}t.className=r.join(" ")},m.toggleCssClass=function(t,e){for(var r=t.className.split(/\s+/g),a=!0;;){var o=r.indexOf(e);if(o==-1)break;a=!1,r.splice(o,1)}return a&&r.push(e),t.className=r.join(" "),a},m.setCssClass=function(t,e,r){r?m.addCssClass(t,e):m.removeCssClass(t,e)},m.hasCssString=function(t,e){var r,a=0;if(r=(e=e||document).querySelectorAll("style")){for(;a<r.length;)if(r[a++].id===t)return!0}},m.removeElementById=function(t,e){(e=e||document).getElementById(t)&&e.getElementById(t).remove()},[]);function n(){var t=s;s=null,t&&t.forEach(function(e){i(e[0],e[1])})}function i(t,e,r){if(typeof document!="undefined"){if(s){if(r)n();else if(r===!1)return s.push([t,e])}if(!S){var a=r,r=(a=r&&r.getRootNode&&(a=r.getRootNode())&&a!=r?a:document).ownerDocument||a;if(e&&m.hasCssString(e,a))return null;e&&(t+=`
|
|
/*# sourceURL=ace/css/`+e+" */");var o=m.createElement("style");o.appendChild(r.createTextNode(t)),e&&(o.id=e),(a=a==r?m.getDocumentHead(r):a).insertBefore(o,a.firstChild)}}}m.useStrictCSP=function(t){(S=t)==0?n():s=s||[]},m.importCssString=i,m.importCssStylsheet=function(t,e){m.buildDom(["link",{rel:"stylesheet",href:t}],m.getDocumentHead(e))},m.scrollbarWidth=function(a){var e=m.createElement("ace_inner"),r=(e.style.width="100%",e.style.minWidth="0px",e.style.height="200px",e.style.display="block",m.createElement("ace_outer")),l=r.style,a=(l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",r.appendChild(e),a.documentElement),o=(a.appendChild(r),e.offsetWidth),l=(l.overflow="scroll",e.offsetWidth);return o==l&&(l=r.clientWidth),a.removeChild(r),o-l},m.computedStyle=function(t,e){return window.getComputedStyle(t,"")||{}},m.setStyle=function(t,e,r){t[e]!==r&&(t[e]=r)},m.HAS_CSS_ANIMATION=!1,m.HAS_CSS_TRANSFORMS=!1,m.HI_DPI=!c.isWin||typeof window!="undefined"&&1.5<=window.devicePixelRatio,c.isChromeOS&&(m.HI_DPI=!1),typeof document!="undefined"&&(p=document.createElement("div"),m.HI_DPI&&p.style.transform!==void 0&&(m.HAS_CSS_TRANSFORMS=!0),c.isEdge||p.style.animationName===void 0||(m.HAS_CSS_ANIMATION=!0),p=null),m.HAS_CSS_TRANSFORMS?m.translate=function(t,e,r){t.style.transform="translate("+Math.round(e)+"px, "+Math.round(r)+"px)"}:m.translate=function(t,e,r){t.style.top=Math.round(r)+"px",t.style.left=Math.round(e)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(C,m,A){var S=C("./dom");m.get=function(p,c){var s=new XMLHttpRequest;s.open("GET",p,!0),s.onreadystatechange=function(){s.readyState===4&&c(s.responseText)},s.send(null)},m.loadScript=function(p,c){var s=S.getDocumentHead(),n=document.createElement("script");n.src=p,s.appendChild(n),n.onload=n.onreadystatechange=function(i,t){!t&&n.readyState&&n.readyState!="loaded"&&n.readyState!="complete"||(n=n.onload=n.onreadystatechange=null,t||c())}},m.qualifyURL=function(p){var c=document.createElement("a");return c.href=p,c.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(C,m,A){function S(){this.propagationStopped=!0}function p(){this.defaultPrevented=!0}var c={};c._emit=c._dispatchEvent=function(s,n){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[s]||[],t=this._defaultHandlers[s];if(i.length||t){(n=typeof n=="object"&&n?n:{}).type||(n.type=s),n.stopPropagation||(n.stopPropagation=S),n.preventDefault||(n.preventDefault=p);for(var i=i.slice(),e=0;e<i.length&&(i[e](n,this),!n.propagationStopped);e++);return t&&!n.defaultPrevented?t(n,this):void 0}},c._signal=function(s,n){if(i=(this._eventRegistry||{})[s])for(var i=i.slice(),t=0;t<i.length;t++)i[t](n,this)},c.once=function(s,n){var i=this;if(this.on(s,function t(){i.off(s,t),n.apply(null,arguments)}),!n)return new Promise(function(t){n=t})},c.setDefaultHandler=function(s,n){var i,t,e=this._defaultHandlers;(e=e||(this._defaultHandlers={_disabled_:{}}))[s]&&(t=e[s],(i=e._disabled_[s])||(e._disabled_[s]=i=[]),i.push(t),(t=i.indexOf(n))!=-1&&i.splice(t,1)),e[s]=n},c.removeDefaultHandler=function(s,n){var i,t=this._defaultHandlers;t&&(i=t._disabled_[s],t[s]==n?i&&this.setDefaultHandler(s,i.pop()):i&&(t=i.indexOf(n))!=-1&&i.splice(t,1))},c.on=c.addEventListener=function(s,n,i){this._eventRegistry=this._eventRegistry||{};var t=this._eventRegistry[s];return(t=t||(this._eventRegistry[s]=[])).indexOf(n)==-1&&t[i?"unshift":"push"](n),n},c.off=c.removeListener=c.removeEventListener=function(s,n){this._eventRegistry=this._eventRegistry||{},s=this._eventRegistry[s],!s||(n=s.indexOf(n))!==-1&&s.splice(n,1)},c.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},m.EventEmitter=c}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(C,m,A){var S=C("./oop"),p=C("./event_emitter").EventEmitter,c={setOptions:function(t){Object.keys(t).forEach(function(e){this.setOption(e,t[e])},this)},getOptions:function(t){var e,r={};return t?Array.isArray(t)||(r=t,t=Object.keys(r)):(e=this.$options,t=Object.keys(e).filter(function(a){return!e[a].hidden})),t.forEach(function(a){r[a]=this.getOption(a)},this),r},setOption:function(t,e){var r;if(this["$"+t]!==e)return(r=this.$options[t])?r.forwardTo?this[r.forwardTo]&&this[r.forwardTo].setOption(t,e):(r.handlesSet||(this["$"+t]=e),void(r&&r.set&&r.set.call(this,e))):s('misspelled option "'+t+'"')},getOption:function(t){var e=this.$options[t];return e?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].getOption(t):e&&e.get?e.get.call(this):this["$"+t]:s('misspelled option "'+t+'"')}};function s(t){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}function n(t,e){var r=new Error(t);r.data=e,typeof console=="object"&&console.error&&console.error(r),setTimeout(function(){throw r})}function i(){this.$defaultOptions={}}(function(){S.implement(this,p),this.defineOptions=function(t,e,r){return t.$options||(this.$defaultOptions[e]=t.$options={}),Object.keys(r).forEach(function(a){var o=r[a];(o=typeof o=="string"?{forwardTo:o}:o).name||(o.name=a),"initialValue"in(t.$options[o.name]=o)&&(t["$"+o.name]=o.initialValue)}),S.implement(t,c),this},this.resetOptions=function(t){Object.keys(t.$options).forEach(function(e){var r=t.$options[e];"value"in r&&t.setOption(e,r.value)})},this.setDefaultValue=function(t,e,r){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][e])break;if(!this.$defaultOptions[t][e])return!1}var a=this.$defaultOptions[t]||(this.$defaultOptions[t]={});a[e]&&(a.forwardTo?this.setDefaultValue(a.forwardTo,e,r):a[e].value=r)},this.setDefaultValues=function(t,e){Object.keys(e).forEach(function(r){this.setDefaultValue(t,r,e[r])},this)},this.warn=s,this.reportError=n}).call(i.prototype),m.AppConfig=i}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(C,m,A){A.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(C,m,A){m.isDark=!1,m.cssClass="ace-tm",m.cssText=C("./textmate.css"),m.$id="ace/theme/textmate",C("../lib/dom").importCssString(m.cssText,m.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(C,m,A){var S=C("./lib/lang"),p=(C("./lib/oop"),C("./lib/net")),c=C("./lib/dom"),s=C("./lib/app_config").AppConfig,n=(A.exports=m=new s,{packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null}),i=(m.get=function(e){if(n.hasOwnProperty(e))return n[e];throw new Error("Unknown config key: "+e)},m.set=function(e,r){if(n.hasOwnProperty(e))n[e]=r;else if(this.setDefaultValue("",e,r)==0)throw new Error("Unknown config key: "+e);e=="useStrictCSP"&&c.useStrictCSP(r)},m.all=function(){return S.copyObject(n)},m.$modes={},m.moduleUrl=function(e,r){var a,o,l;return n.$moduleUrls[e]||(e=e.split("/"),a=(r=r||e[e.length-2]||"")=="snippets"?"/":"-",o=e[e.length-1],r=="worker"&&a=="-"&&(l=new RegExp("^"+r+"[\\-_]|[\\-_]"+r+"$","g"),o=o.replace(l,"")),(!o||o==r)&&1<e.length&&(o=e[e.length-2]),(l=n[r+"Path"])==null?l=n.basePath:a=="/"&&(r=a=""),l&&l.slice(-1)!="/"&&(l+="/"),l+r+a+o+this.get("suffix"))},m.setModuleUrl=function(e,r){return n.$moduleUrls[e]=r},function(e,r){return e=="ace/theme/textmate"?r(null,C("./theme/textmate")):console.error("loader is not configured")}),t=(m.setLoader=function(e){i=e},m.$loading={},m.loadModule=function(e,r){var a,o;Array.isArray(e)&&(o=e[0],e=e[1]);try{a=C(e)}catch{}if(a&&!m.$loading[e])return r&&r(a);if(m.$loading[e]||(m.$loading[e]=[]),m.$loading[e].push(r),!(1<m.$loading[e].length)){let l=function(){i(e,function(d,y){m._emit("load.module",{name:e,module:y});var I=m.$loading[e];m.$loading[e]=null,I.forEach(function(h){h&&h(y)})})};if(!m.get("packaged"))return l();p.loadScript(m.moduleUrl(e,o),l),t()}},function(){n.basePath||n.workerPath||n.modePath||n.themePath||Object.keys(n.$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"),t=function(){})});m.version="1.10.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(C,m,A){C("./lib/fixoldbrowsers");var S=C("./config"),p=(S.setLoader(function(s,n){C([s],function(i){n(null,i)})}),function(){return this||typeof window!="undefined"&&window}());function c(s){if(p&&p.document){S.set("packaged",s||C.packaged||A.packaged||p.define&&H.amdD.packaged);for(var n,i={},t="",s=document.currentScript||document._currentScript,e=(s&&s.ownerDocument||document).getElementsByTagName("script"),r=0;r<e.length;r++){var a=e[r],o=a.src||a.getAttribute("src");if(o){for(var l=a.attributes,d=0,y=l.length;d<y;d++){var I=l[d];I.name.indexOf("data-ace-")===0&&(i[I.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(u,b){return b.toUpperCase()})]=I.value)}a=o.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/),a&&(t=a[1])}}for(n in t&&(i.base=i.base||t,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base,i)i[n]!==void 0&&S.set(n,i[n])}}A.exports=function(s){S.init=c,s.require=C,s.define=H.amdD},c(!0)}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(C,m,A){var S=C("./oop"),p=function(){var c,s,n={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(s in n.FUNCTION_KEYS)c=n.FUNCTION_KEYS[s].toLowerCase(),n[c]=parseInt(s,10);for(s in n.PRINTABLE_KEYS)c=n.PRINTABLE_KEYS[s].toLowerCase(),n[c]=parseInt(s,10);S.mixin(n,n.MODIFIER_KEYS),S.mixin(n,n.PRINTABLE_KEYS),S.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-";for(var i=["cmd","ctrl","alt","shift"],t=Math.pow(2,i.length);t--;)n.KEY_MODS[t]=i.filter(function(e){return t&n.KEY_MODS[e]}).join("-")+"-";return n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();S.mixin(m,p),m.keyCodeToString=function(c){var s=p[c];return(s=typeof s!="string"?String.fromCharCode(c):s).toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(C,m,A){var S,p=C("./keys"),c=C("./useragent"),s=null,n=0;function i(){if(S==null){S=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){S={passive:!1}}})}catch{}}return S}function t(y,I,h){this.elem=y,this.type=I,this.callback=h}t.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};function e(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)}var r,a=m.addListener=function(y,I,h,u){y.addEventListener(I,h,i()),u&&u.$toDestroy.push(new t(y,I,h))},o=m.removeListener=function(y,I,h){y.removeEventListener(I,h,i())};m.stopEvent=function(y){return m.stopPropagation(y),m.preventDefault(y),!1},m.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},m.preventDefault=function(y){y.preventDefault&&y.preventDefault()},m.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||c.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},m.capture=function(y,I,h){var u=y&&y.ownerDocument||document;function b(w){I&&I(w),h&&h(w),o(u,"mousemove",I),o(u,"mouseup",b),o(u,"dragstart",b)}return a(u,"mousemove",I),a(u,"mouseup",b),a(u,"dragstart",b),b},m.addMouseWheelListener=function(y,I,h){a(y,"wheel",function(u){var b=u.deltaX||0,w=u.deltaY||0;switch(u.deltaMode){case u.DOM_DELTA_PIXEL:u.wheelX=.15*b,u.wheelY=.15*w;break;case u.DOM_DELTA_LINE:u.wheelX=15*b,u.wheelY=15*w;break;case u.DOM_DELTA_PAGE:u.wheelX=150*b,u.wheelY=150*w}I(u)},h)},m.addMultiMouseDownListener=function(y,I,h,u,b){var w,v,R,B=0,E={2:"dblclick",3:"tripleclick",4:"quadclick"};function T(G){var F;if(m.getButton(G)!==0?B=0:1<G.detail&&!(4<++B)||(B=1),c.isIE&&(F=5<Math.abs(G.clientX-w)||5<Math.abs(G.clientY-v),R&&!F||(B=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},I[B-1]||600),B==1&&(w=G.clientX,v=G.clientY)),G._clicks=B,h[u]("mousedown",G),4<B)B=0;else if(1<B)return h[u](E[B],G)}(y=Array.isArray(y)?y:[y]).forEach(function(G){a(G,"mousedown",T,b)})};function l(y,I,h){var u=e(I);if(!c.isMac&&s){if(I.getModifierState&&(I.getModifierState("OS")||I.getModifierState("Win"))&&(u|=8),s.altGr){if((3&u)==3)return;s.altGr=0}h!==18&&h!==17||(b="location"in I?I.location:I.keyLocation,h===17&&b===1?s[h]==1&&(n=I.timeStamp):h===18&&u===3&&b===2&&I.timeStamp-n<50&&(s.altGr=!0))}if(h in p.MODIFIER_KEYS&&(h=-1),!u&&h===13){var b="location"in I?I.location:I.keyLocation;if(b===3&&(y(I,u,-h),I.defaultPrevented))return}if(c.isChromeOS&&8&u){if(y(I,u,h),I.defaultPrevented)return;u&=-9}return!!(u||h in p.FUNCTION_KEYS||h in p.PRINTABLE_KEYS)&&y(I,u,h)}function d(){s=Object.create(null)}m.getModifierString=function(y){return p.KEY_MODS[e(y)]},m.addCommandKeyListener=function(y,I,h){var u,b;c.isOldGecko||c.isOpera&&!("KeyboardEvent"in window)?(u=null,a(y,"keydown",function(w){u=w.keyCode},h),a(y,"keypress",function(w){return l(I,w,u)},h)):(b=null,a(y,"keydown",function(w){s[w.keyCode]=(s[w.keyCode]||0)+1;var v=l(I,w,w.keyCode);return b=w.defaultPrevented,v},h),a(y,"keypress",function(w){b&&(w.ctrlKey||w.altKey||w.shiftKey||w.metaKey)&&(m.stopEvent(w),b=null)},h),a(y,"keyup",function(w){s[w.keyCode]=null},h),s||(d(),a(window,"focus",d)))},typeof window=="object"&&window.postMessage&&!c.isOldIE&&(r=1,m.nextTick=function(y,I){I=I||window;function h(b){b.data==u&&(m.stopPropagation(b),o(I,"message",h),y())}var u="zero-timeout-message-"+r++;a(I,"message",h),I.postMessage(u,"*")}),m.$idleBlocked=!1,m.onIdle=function(y,I){return setTimeout(function h(){m.$idleBlocked?setTimeout(h,100):y()},I)},m.$idleBlockId=null,m.blockIdle=function(y){m.$idleBlockId&&clearTimeout(m.$idleBlockId),m.$idleBlocked=!0,m.$idleBlockId=setTimeout(function(){m.$idleBlocked=!1},y||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(y){setTimeout(y,17)}}),ace.define("ace/range",["require","exports","module"],function(C,m,A){function S(p,c,s,n){this.start={row:p,column:c},this.end={row:s,column:n}}(function(){this.isEqual=function(p){return this.start.row===p.start.row&&this.end.row===p.end.row&&this.start.column===p.start.column&&this.end.column===p.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(p,c){return this.compare(p,c)==0},this.compareRange=function(c){var s=c.end,c=c.start,s=this.compare(s.row,s.column);return s==1?(s=this.compare(c.row,c.column))==1?2:s==0?1:0:s==-1?-2:(s=this.compare(c.row,c.column))==-1?-1:s==1?42:0},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(p){return this.comparePoint(p.start)==0&&this.comparePoint(p.end)==0},this.intersects=function(p){return p=this.compareRange(p),p==-1||p==0||p==1},this.isEnd=function(p,c){return this.end.row==p&&this.end.column==c},this.isStart=function(p,c){return this.start.row==p&&this.start.column==c},this.setStart=function(p,c){typeof p=="object"?(this.start.column=p.column,this.start.row=p.row):(this.start.row=p,this.start.column=c)},this.setEnd=function(p,c){typeof p=="object"?(this.end.column=p.column,this.end.row=p.row):(this.end.row=p,this.end.column=c)},this.inside=function(p,c){return this.compare(p,c)==0&&!this.isEnd(p,c)&&!this.isStart(p,c)},this.insideStart=function(p,c){return this.compare(p,c)==0&&!this.isEnd(p,c)},this.insideEnd=function(p,c){return this.compare(p,c)==0&&!this.isStart(p,c)},this.compare=function(p,c){return this.isMultiLine()||p!==this.start.row?p<this.start.row?-1:p>this.end.row?1:this.start.row===p?c>=this.start.column?0:-1:this.end.row!==p||c<=this.end.column?0:1:c<this.start.column?-1:c>this.end.column?1:0},this.compareStart=function(p,c){return this.start.row==p&&this.start.column==c?-1:this.compare(p,c)},this.compareEnd=function(p,c){return this.end.row==p&&this.end.column==c?1:this.compare(p,c)},this.compareInside=function(p,c){return this.end.row==p&&this.end.column==c?1:this.start.row==p&&this.start.column==c?-1:this.compare(p,c)},this.clipRows=function(p,c){var s,n;return this.end.row>c?s={row:c+1,column:0}:this.end.row<p&&(s={row:p,column:0}),this.start.row>c?n={row:c+1,column:0}:this.start.row<p&&(n={row:p,column:0}),S.fromPoints(n||this.start,s||this.end)},this.extend=function(p,c){var s,n,i=this.compare(p,c);return i==0?this:(i==-1?s={row:p,column:c}:n={row:p,column:c},S.fromPoints(s||this.start,n||this.end))},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return S.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new S(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new S(this.start.row,0,this.end.row,0)},this.toScreenRange=function(s){var c=s.documentToScreenPosition(this.start),s=s.documentToScreenPosition(this.end);return new S(c.row,c.column,s.row,s.column)},this.moveBy=function(p,c){this.start.row+=p,this.start.column+=c,this.end.row+=p,this.end.column+=c}}).call(S.prototype),S.fromPoints=function(p,c){return new S(p.row,p.column,c.row,c.column)},S.comparePoints=function(p,c){return p.row-c.row||p.column-c.column},S.comparePoints=function(p,c){return p.row-c.row||p.column-c.column},m.Range=S}),ace.define("ace/clipboard",["require","exports","module"],function(C,m,A){var S;A.exports={lineMode:!1,pasteCancelled:function(){return!!(S&&S>Date.now()-50)||(S=!1)},cancel:function(){S=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(C,m,A){var S=C("../lib/event"),p=C("../lib/useragent"),c=C("../lib/dom"),s=C("../lib/lang"),n=C("../clipboard"),i=p.isChrome<18,t=p.isIE,e=63<p.isChrome,r=C("../lib/keys"),a=r.KEY_MODS,o=p.isIOS,l=o?/\s/:/\n/,d=p.isMobile;m.TextInput=function(y,I){var h=c.createElement("textarea"),u=(h.className="ace_text-input",h.setAttribute("wrap","off"),h.setAttribute("autocorrect","off"),h.setAttribute("autocapitalize","off"),h.setAttribute("spellcheck",!1),h.style.opacity="0",y.insertBefore(h,y.firstChild),!1),b=!1,w=!1,v=!1,R="",B=(d||(h.style.fontSize="1px"),!1),E=!1,T="",G=0,F=0,z=0;try{var K=document.activeElement===h}catch{}S.addListener(h,"blur",function(ae){E||(I.onBlur(ae),K=!1)},I),S.addListener(h,"focus",function(ae){if(!E){if(K=!0,p.isEdge)try{if(!document.hasFocus())return}catch{}I.onFocus(ae),p.isEdge?setTimeout(W):W()}},I),this.$focusScroll=!1,this.focus=function(){if(R||e||this.$focusScroll=="browser")return h.focus({preventScroll:!0});var ae=h.style.top;h.style.position="fixed",h.style.top="0px";try{var ge=h.getBoundingClientRect().top!=0}catch{return}var le=[];if(ge)for(var ce=h.parentElement;ce&&ce.nodeType==1;)le.push(ce),ce.setAttribute("ace_nocontext",!0),ce=!ce.parentElement&&ce.getRootNode?ce.getRootNode().host:ce.parentElement;h.focus({preventScroll:!0}),ge&&le.forEach(function(fe){fe.removeAttribute("ace_nocontext")}),setTimeout(function(){h.style.position="",h.style.top=="0px"&&(h.style.top=ae)},0)},this.blur=function(){h.blur()},this.isFocused=function(){return K},I.on("beforeEndOperation",function(){var ae=I.curOp,ge=ae&&ae.command&&ae.command.name;ge!="insertstring"&&(ge=ge&&(ae.docChanged||ae.selectionChanged),w&&ge&&(T=h.value="",Ae()),W())});function Y(ae){te(ae,!0)}function _(ae){te(ae,!1)}function Z(ae){var ge=Q(ae);n.pasteCancelled()||(typeof ge=="string"?(ge&&I.onPaste(ge,ae),p.isIE&&setTimeout(W),S.preventDefault(ae)):(h.value="",b=!0))}var W=o?function(ae){var ge;!K||u&&!ae||v||((ge=`
|
|
ab`+(ae=ae||"")+`cde fg
|
|
`)!=h.value&&(h.value=T=ge),ge=4+(ae.length||(I.selection.isEmpty()?0:1)),G==4&&F==ge||h.setSelectionRange(4,ge),G=4,F=ge)}:function(){if(!w&&!v&&(K||$)){w=!0;var ae,ge,le=0,ce=0,fe="",ve=(I.session&&(ve=(ae=I.selection).getRange(),ae=ae.cursor.row,le=ve.start.column,ce=ve.end.column,fe=I.session.getLine(ae),ve.start.row!=ae?(ge=I.session.getLine(ae-1),le=ve.start.row<ae-1?0:le,ce+=ge.length+1,fe=ge+`
|
|
`+fe):ve.end.row!=ae?(ge=I.session.getLine(ae+1),ce=ve.end.row>ae+1?ge.length:ce,ce+=fe.length+1,fe=fe+`
|
|
`+ge):d&&0<ae&&(fe=`
|
|
`+fe,ce+=1,le+=1),400<fe.length&&(le<400&&ce<400?fe=fe.slice(0,400):(fe=`
|
|
`,le==ce?le=ce=0:(le=0,ce=1)))),fe+`
|
|
|
|
`);if(ve!=T&&(h.value=T=ve,G=F=ve.length),$&&(G=h.selectionStart,F=h.selectionEnd),F!=ce||G!=le||h.selectionEnd!=F)try{h.setSelectionRange(le,ce),G=le,F=ce}catch{}w=!1}},f=(this.resetSelection=W,K&&I.onFocus(),function(ae){return ae.selectionStart===0&&ae.selectionEnd>=T.length&&ae.value===T&&T&&ae.selectionEnd!==F}),k=null,$=(this.setInputHandler=function(ae){k=ae},!(this.getInputHandler=function(){return k})),M=function(ae,ge){if($=$&&!1,b)return W(),ae&&I.onPaste(ae),b=!1,"";for(var le=h.selectionStart,ce=h.selectionEnd,fe=G,ve=T.length-F,Ee=ae,Fe=ae.length-le,Qe=ae.length-ce,Me=0;0<fe&&T[Me]==ae[Me];)Me++,fe--;for(Ee=Ee.slice(Me),Me=1;0<ve&&T.length-Me>G-1&&T[T.length-Me]==ae[ae.length-Me];)Me++,ve--;Fe-=Me-1,Qe-=Me-1;var nt=Ee.length-Me+1;return nt<0&&(fe=-nt,nt=0),Ee=Ee.slice(0,nt),ge||Ee||Fe||fe||ve||Qe?(nt=!(v=!0),p.isAndroid&&Ee==". "&&(Ee=" ",nt=!0),Ee&&!fe&&!ve&&!Fe&&!Qe||B?I.onTextInput(Ee):I.onTextInput(Ee,{extendLeft:fe,extendRight:ve,restoreStart:Fe,restoreEnd:Qe}),v=!1,T=ae,G=le,F=ce,z=Qe,nt?`
|
|
`:Ee):""},j=function(ge){if(w)return he();if(ge&&ge.inputType){if(ge.inputType=="historyUndo")return I.execCommand("undo");if(ge.inputType=="historyRedo")return I.execCommand("redo")}var ge=h.value,le=M(ge,!0);(500<ge.length||l.test(le)||d&&G<1&&G==F)&&W()},Q=function(ae,ge,le){var ce=ae.clipboardData||window.clipboardData;if(ce&&!i){var fe=t||le?"Text":"text/plain";try{return ge?ce.setData(fe,ge)!==!1:ce.getData(fe)}catch(ve){if(!le)return Q(ve,ge,!0)}}},te=function(ae,ge){var le=I.getCopyText();if(!le)return S.preventDefault(ae);Q(ae,le)?(o&&(W(le),u=le,setTimeout(function(){u=!1},10)),ge?I.onCut():I.onCopy(),S.preventDefault(ae)):(u=!0,h.value=le,h.select(),setTimeout(function(){u=!1,W(),ge?I.onCut():I.onCopy()}))},he=(S.addCommandKeyListener(h,I.onCommandKey.bind(I),I),S.addListener(h,"select",function(ae){w||(u?u=!1:f(h)?(I.selectAll(),W()):d&&h.selectionStart!=G&&W())},I),S.addListener(h,"input",j,I),S.addListener(h,"cut",Y,I),S.addListener(h,"copy",_,I),S.addListener(h,"paste",Z,I),"oncut"in h&&"oncopy"in h&&"onpaste"in h||S.addListener(y,"keydown",function(ae){if((!p.isMac||ae.metaKey)&&ae.ctrlKey)switch(ae.keyCode){case 67:_(ae);break;case 86:Z(ae);break;case 88:Y(ae)}},I),function(){var ae;if(w&&I.onCompositionUpdate&&!I.$readOnly)return B?ue():void(w.useTextareaForIME?I.onCompositionUpdate(h.value):(ae=h.value,M(ae),w.markerRange&&(w.context&&(w.markerRange.start.column=w.selectionStart=w.context.compositionStartOffset),w.markerRange.end.column=w.markerRange.start.column+F-w.selectionStart+z)))}),Ae=function(ae){I.onCompositionEnd&&!I.$readOnly&&(w=!1,I.onCompositionEnd(),I.off("mousedown",ue),ae&&j())};function ue(){E=!0,h.blur(),h.focus(),E=!1}var Ce,Ie=s.delayedCall(he,50).schedule.bind(null,null);function we(){clearTimeout(Ce),Ce=setTimeout(function(){R&&(h.style.cssText=R,R=""),I.renderer.$isMousePressed=!1,I.renderer.$keepTextAreaAtCursor&&I.renderer.$moveTextAreaToCursor()},0)}S.addListener(h,"compositionstart",function(ae){w||!I.onCompositionStart||I.$readOnly||(w={},B||(ae.data&&(w.useTextareaForIME=!1),setTimeout(he,0),I._signal("compositionStart"),I.on("mousedown",ue),(ae=I.getSelectionRange()).end.row=ae.start.row,ae.end.column=ae.start.column,w.markerRange=ae,w.selectionStart=G,I.onCompositionStart(w),w.useTextareaForIME?(T=h.value="",F=G=0):(h.msGetInputContext&&(w.context=h.msGetInputContext()),h.getInputContext&&(w.context=h.getInputContext()))))},I),S.addListener(h,"compositionupdate",he,I),S.addListener(h,"keyup",function(ae){ae.keyCode==27&&h.value.length<h.selectionStart&&(w||(T=h.value),G=F=-1,W()),Ie()},I),S.addListener(h,"keydown",Ie,I),S.addListener(h,"compositionend",Ae,I),this.getElement=function(){return h},this.setCommandMode=function(ae){B=ae,h.readOnly=!1},this.setReadOnly=function(ae){B||(h.readOnly=ae)},this.setCopyWithEmptySelection=function(ae){},this.onContextMenu=function(ae){$=!0,W(),I._emit("nativecontextmenu",{target:I,domEvent:ae}),this.moveToMouse(ae,!0)},this.moveToMouse=function(ae,ce){R=R||h.style.cssText,h.style.cssText=(ce?"z-index:100000;":"")+(p.isIE?"opacity:0.1;":"")+"text-indent: -"+(G+F)*I.renderer.characterWidth*.5+"px;";function le(Qe){c.translate(h,Qe.clientX-Ee-2,Math.min(Qe.clientY-ve-2,Fe))}var ce=I.container.getBoundingClientRect(),fe=c.computedStyle(I.container),ve=ce.top+(parseInt(fe.borderTopWidth)||0),Ee=ce.left+(parseInt(ce.borderLeftWidth)||0),Fe=ce.bottom-ve-h.clientHeight-2;le(ae),ae.type=="mousedown"&&(I.renderer.$isMousePressed=!0,clearTimeout(Ce),p.isWin&&S.capture(I.container,le,we))},this.onContextMenuClose=we;function Te(ae){I.textInput.onContextMenu(ae),we()}if(S.addListener(h,"mouseup",Te,I),S.addListener(h,"mousedown",function(ae){ae.preventDefault(),we()},I),S.addListener(I.renderer.scroller,"contextmenu",Te,I),S.addListener(h,"contextmenu",Te,I),o){let ae=function(ge){var le,ce,fe,ve;document.activeElement!==ke||Le||w||$e.$mouseHandler.isMousePressed||u||(le=ke.selectionStart,ce=ke.selectionEnd,fe=null,(ve=0)==le?fe=r.up:le==1?fe=r.home:F<ce&&T[ce]==`
|
|
`?fe=r.end:le<G&&T[le-1]==" "?(fe=r.left,ve=a.option):le<G||le==G&&F!=G&&le==ce?fe=r.left:F<ce&&2<T.slice(0,ce).split(`
|
|
`).length?fe=r.down:F<ce&&T[ce-1]==" "?(fe=r.right,ve=a.option):(F<ce||ce==F&&F!=G&&le==ce)&&(fe=r.right),le!==ce&&(ve|=a.shift),fe&&(!$e.onCommandKey({},ve,fe)&&$e.commands&&(fe=r.keyCodeToString(fe),(ve=$e.commands.findKeyCommand(ve,fe))&&$e.execCommand(ve)),G=le,F=ce,W("")))};var $e=I,ke=h,de=null,Le=!1;ke.addEventListener("keydown",function(ge){de&&clearTimeout(de),Le=!0},!0),ke.addEventListener("keyup",function(ge){de=setTimeout(function(){Le=!1},100)},!0),document.addEventListener("selectionchange",ae),$e.on("destroy",function(){document.removeEventListener("selectionchange",ae)})}this.destroy=function(){h.parentElement&&h.parentElement.removeChild(h)}},m.$setUserAgentForTests=function(y,I){d=y,o=I}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(C,m,A){var S=C("../lib/useragent");function p(s){s.$clickSelection=null;var n=s.editor;n.setDefaultHandler("mousedown",this.onMouseDown.bind(s)),n.setDefaultHandler("dblclick",this.onDoubleClick.bind(s)),n.setDefaultHandler("tripleclick",this.onTripleClick.bind(s)),n.setDefaultHandler("quadclick",this.onQuadClick.bind(s)),n.setDefaultHandler("mousewheel",this.onMouseWheel.bind(s)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(i){s[i]=this[i]},this),s.selectByLines=this.extendSelectionBy.bind(s,"getLineRange"),s.selectByWords=this.extendSelectionBy.bind(s,"getWordRange")}function c(s,n){return(s.start.row==s.end.row?2*n.column-s.start.column-s.end.column:s.start.row!=s.end.row-1||s.start.column||s.end.column?2*n.row-s.start.row-s.end.row:n.column-4)<0?{cursor:s.start,anchor:s.end}:{cursor:s.end,anchor:s.start}}(function(){this.onMouseDown=function(s){var n=s.inSelection(),i=s.getDocumentPosition(),t=(this.mousedownEvent=s,this.editor),e=s.getButton();if(e!==0)!t.getSelectionRange().isEmpty()&&e!=1||t.selection.moveToPosition(i),e==2&&(t.textInput.onContextMenu(s.domEvent),S.isMozilla||s.preventDefault());else{if(this.mousedownEvent.time=Date.now(),!n||t.isFocused()||(t.focus(),!this.$focusTimeout||this.$clickSelection||t.inMultiSelectMode))return this.captureMouse(s),this.startSelect(i,1<s.domEvent._clicks),s.preventDefault();this.setState("focusWait"),this.captureMouse(s)}},this.startSelect=function(s,n){s=s||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(s):n||i.selection.moveToPosition(s),n||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var s,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(s=(s=this.$clickSelection.comparePoint(i))==-1?this.$clickSelection.end:s==1?this.$clickSelection.start:(i=(s=c(this.$clickSelection,i)).cursor,s.anchor),n.selection.setSelectionAnchor(s.row,s.column)),n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var n,i,t,e=this.editor,r=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[a](r.row,r.column);this.$clickSelection&&(i=this.$clickSelection.comparePoint(a.start),n=this.$clickSelection.comparePoint(a.end),i==-1&&n<=0?(t=this.$clickSelection.end,a.end.row==r.row&&a.end.column==r.column||(r=a.start)):n==1&&0<=i?(t=this.$clickSelection.start,a.start.row==r.row&&a.start.column==r.column||(r=a.end)):t=i==-1&&n==1?(r=a.end,a.start):(r=(i=c(this.$clickSelection,r)).cursor,i.anchor),e.selection.setSelectionAnchor(t.row,t.column)),e.selection.selectToPosition(r),e.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){t=this.mousedownEvent.x,s=this.mousedownEvent.y,i=this.x,n=this.y;var s,n,i=Math.sqrt(Math.pow(i-t,2)+Math.pow(n-s,2)),t=Date.now();(0<i||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(n){var n=n.getDocumentPosition(),i=this.editor,t=i.session.getBracketRange(n);t?(t.isEmpty()&&(t.start.column--,t.end.column++),this.setState("select")):(t=i.selection.getWordRange(n.row,n.column),this.setState("selectByWords")),this.$clickSelection=t,this.select()},this.onTripleClick=function(n){var n=n.getDocumentPosition(),i=this.editor,t=(this.setState("selectByLines"),i.getSelectionRange());t.isMultiLine()&&t.contains(n.row,n.column)?(this.$clickSelection=i.selection.getLineRange(t.start.row),this.$clickSelection.end=i.selection.getLineRange(t.end.row).end):this.$clickSelection=i.selection.getLineRange(n.row),this.select()},this.onQuadClick=function(s){var n=this.editor;n.selectAll(),this.$clickSelection=n.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(s){var n,i,t,e,r,a,o;if(!s.getAccelKey())return s.getShiftKey()&&s.wheelY&&!s.wheelX&&(s.wheelX=s.wheelY,s.wheelY=0),n=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),i=this.$lastScroll,e=(o=(t=s.domEvent.timeStamp)-i.t)?s.wheelX/o:i.vx,r=o?s.wheelY/o:i.vy,o<550&&(e=(e+i.vx)/2,r=(r+i.vy)/2),o=!1,1<=(a=Math.abs(e/r))&&n.renderer.isScrollableBy(s.wheelX*s.speed,0)&&(o=!0),(o=a<=1&&n.renderer.isScrollableBy(0,s.wheelY*s.speed)?!0:o)?i.allowed=t:t-i.allowed<550&&(Math.abs(e)<=1.5*Math.abs(i.vx)&&Math.abs(r)<=1.5*Math.abs(i.vy)?(o=!0,i.allowed=t):i.allowed=0),i.t=t,i.vx=e,i.vy=r,o?(n.renderer.scrollBy(s.wheelX*s.speed,s.wheelY*s.speed),s.stop()):void 0}}).call(p.prototype),m.DefaultHandlers=p}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(C,m,A){C("./lib/oop");var S=C("./lib/dom"),p="ace_tooltip";function c(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}(function(){this.$init=function(){return this.$element=S.createElement("div"),this.$element.className=p,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(s){this.getElement().textContent=s},this.setHtml=function(s){this.getElement().innerHTML=s},this.setPosition=function(s,n){this.getElement().style.left=s+"px",this.getElement().style.top=n+"px"},this.setClassName=function(s){S.addCssClass(this.getElement(),s)},this.show=function(s,n,i){s!=null&&this.setText(s),n!=null&&i!=null&&this.setPosition(n,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=p,this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(c.prototype),m.Tooltip=c}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(C,m,A){var S=C("../lib/dom"),p=C("../lib/oop"),c=C("../lib/event"),s=C("../tooltip").Tooltip;function n(i){s.call(this,i)}p.inherits(n,s),function(){this.setPosition=function(i,t){var e=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,a=this.getWidth(),o=this.getHeight();e<(i+=15)+a&&(i-=i+a-e),r<(t+=15)+o&&(t-=20+o),s.prototype.setPosition.call(this,i,t)}}.call(n.prototype),m.GutterHandler=function(i){var t,e,r,a=i.editor,o=a.renderer.$gutterLayer,l=new n(a.container);function d(){t=t&&clearTimeout(t),r&&(l.hide(),r=null,a._signal("hideGutterTooltip",l),a.off("mousewheel",d))}function y(I){l.setPosition(I.x,I.y)}i.editor.setDefaultHandler("guttermousedown",function(I){if(a.isFocused()&&I.getButton()==0){var h=o.getRegion(I);if(h!="foldWidgets"){var h=I.getDocumentPosition().row,u=a.session.selection;if(I.getShiftKey())u.selectTo(h,0);else{if(I.domEvent.detail==2)return a.selectAll(),I.preventDefault();i.$clickSelection=a.selection.getLineRange(h)}return i.setState("selectByLines"),i.captureMouse(I),I.preventDefault()}}}),i.editor.setDefaultHandler("guttermousemove",function(I){var h=I.domEvent.target||I.domEvent.srcElement;if(S.hasCssClass(h,"ace_fold-widget"))return d();r&&i.$tooltipFollowsMouse&&y(I),e=I,t=t||setTimeout(function(){if(t=null,e&&!i.isMousePressed){var u=e.getDocumentPosition().row,b=o.$annotations[u];if(b){if(u==a.session.getLength()){var u=a.renderer.pixelToScreenCoordinates(0,e.y).row,w=e.$pos;if(u>a.session.documentToScreenRow(w.row,w.column))return void d()}r!=b&&(r=b.text.join("<br/>"),l.setHtml(r),(u=b.className)&&l.setClassName(u.trim()),l.show(),a._signal("showGutterTooltip",l),a.on("mousewheel",d),i.$tooltipFollowsMouse?y(e):(w=e.domEvent.target.getBoundingClientRect(),(b=l.getElement().style).left=w.right+"px",b.top=w.bottom+"px"))}else d()}else d()},50)}),c.addListener(a.renderer.$gutter,"mouseout",function(I){e=null,r&&!t&&(t=setTimeout(function(){t=null,d()},50))},a),a.on("changeSession",d)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(c,m,A){var S=c("../lib/event"),p=c("../lib/useragent"),c=m.MouseEvent=function(s,n){this.domEvent=s,this.editor=n,this.x=this.clientX=s.clientX,this.y=this.clientY=s.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){S.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){S.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){var s,n;return this.$inSelection===null&&((s=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(n=this.getDocumentPosition(),this.$inSelection=s.contains(n.row,n.column))),this.$inSelection},this.getButton=function(){return S.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=p.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(c.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(C,m,A){var S=C("../lib/dom"),p=C("../lib/event"),c=C("../lib/useragent");function s(i){var t,e,r,a,o,l,d,y,I,h,u,b=i.editor,w=S.createElement("div"),v=(w.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",w.textContent="\xA0",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(Y){i[Y]=this[Y]},this),b.on("mousedown",this.onMouseDown.bind(i)),b.container),R=0;function B(){var Y,_,Z,W,f,k,$,M,j=l;l=b.renderer.screenToTextCoordinates(e,r),Z=l,_=j,W=Date.now(),Y=!_||Z.row!=_.row,_=!_||Z.column!=_.column,!h||Y||_?(b.moveCursorToPosition(Z),h=W,u={x:e,y:r}):5<n(u.x,u.y,e,r)?h=null:200<=W-h&&(b.renderer.scrollCursorIntoView(),h=null),Y=l,_=j,Z=Date.now(),W=b.renderer.layerConfig.lineHeight,j=b.renderer.layerConfig.characterWidth,f=b.renderer.scroller.getBoundingClientRect(),f={x:{left:e-f.left,right:f.right-e},y:{top:r-f.top,bottom:f.bottom-r}},k=Math.min(f.x.left,f.x.right),$=Math.min(f.y.top,f.y.bottom),M={row:Y.row,column:Y.column},k/j<=2&&(M.column+=f.x.left<f.x.right?-3:2),$/W<=1&&(M.row+=f.y.top<f.y.bottom?-1:1),k=Y.row!=M.row,j=Y.column!=M.column,$=!_||Y.row!=_.row,k||j&&!$?I?200<=Z-I&&b.renderer.scrollCursorIntoView(M):I=Z:I=null}function E(){o=b.selection.toOrientedRange(),t=b.session.addMarker(o,"ace_selection",b.getSelectionStyle()),b.clearSelection(),b.isFocused()&&b.renderer.$cursorLayer.setBlinking(!1),clearInterval(a),B(),a=setInterval(B,20),R=0,p.addListener(document,"mousemove",F)}function T(){clearInterval(a),b.session.removeMarker(t),t=null,b.selection.fromOrientedRange(o),b.isFocused()&&!y&&b.$resetCursorStyle(),R=0,h=I=l=o=null,p.removeListener(document,"mousemove",F)}this.onDragStart=function(Y){var _;if(this.cancelDrag||!v.draggable)return _=this,setTimeout(function(){_.startSelect(),_.captureMouse(Y)},0),Y.preventDefault();o=b.getSelectionRange();var Z=Y.dataTransfer;Z.effectAllowed=b.getReadOnly()?"copy":"copyMove",b.container.appendChild(w),Z.setDragImage&&Z.setDragImage(w,0,0),setTimeout(function(){b.container.removeChild(w)}),Z.clearData(),Z.setData("Text",b.session.getTextRange()),y=!0,this.setState("drag")},this.onDragEnd=function(Y){v.draggable=!1,y=!1,this.setState(null),b.getReadOnly()||(Y=Y.dataTransfer.dropEffect,d||Y!="move"||b.session.remove(b.getSelectionRange()),b.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(Y){if(!b.getReadOnly()&&z(Y.dataTransfer))return e=Y.clientX,r=Y.clientY,t||E(),R++,Y.dataTransfer.dropEffect=d=K(Y),p.preventDefault(Y)},this.onDragOver=function(Y){if(!b.getReadOnly()&&z(Y.dataTransfer))return e=Y.clientX,r=Y.clientY,t||(E(),R++),G!==null&&(G=null),Y.dataTransfer.dropEffect=d=K(Y),p.preventDefault(Y)},this.onDragLeave=function(Y){if(--R<=0&&t)return T(),d=null,p.preventDefault(Y)},this.onDrop=function(Y){if(l){var _=Y.dataTransfer;if(y)switch(d){case"move":o=o.contains(l.row,l.column)?{start:l,end:l}:b.moveText(o,l);break;case"copy":o=b.moveText(o,l,!0)}else _=_.getData("Text"),o={start:l,end:b.session.insert(l,_)},b.focus(),d=null;return T(),p.preventDefault(Y)}},p.addListener(v,"dragstart",this.onDragStart.bind(i),b),p.addListener(v,"dragend",this.onDragEnd.bind(i),b),p.addListener(v,"dragenter",this.onDragEnter.bind(i),b),p.addListener(v,"dragover",this.onDragOver.bind(i),b),p.addListener(v,"dragleave",this.onDragLeave.bind(i),b),p.addListener(v,"drop",this.onDrop.bind(i),b);var G=null;function F(){G==null&&(G=setTimeout(function(){G!=null&&t&&T()},20))}function z(Y){return Y=Y.types,!Y||Array.prototype.some.call(Y,function(_){return _=="text/plain"||_=="Text"})}function K(Y){var _=["copy","copymove","all","uninitialized"],Z=c.isMac?Y.altKey:Y.ctrlKey,W="uninitialized";try{W=Y.dataTransfer.effectAllowed.toLowerCase()}catch{}var f="none";return Z&&0<=_.indexOf(W)?f="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(W)?f="move":0<=_.indexOf(W)&&(f="copy"),f}}function n(i,t,e,r){return Math.sqrt(Math.pow(e-i,2)+Math.pow(r-t,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(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,t=(i.container.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging"),c.isWin?"default":"move");i.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(i){var t=this.editor.container;c.isIE&&this.state=="dragReady"&&3<n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&t.dragDrop(),this.state==="dragWait"&&0<n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(i){var t,e,r;this.$dragEnabled&&(this.mousedownEvent=i,t=this.editor,e=i.inSelection(),r=i.getButton(),(i.domEvent.detail||1)!==1||r!==0||!e||i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(r=i.domEvent.target||i.domEvent.srcElement)&&(r.unselectable="on"),t.getDragDelay()?(c.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0))}}).call(s.prototype),m.DragdropHandler=s}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(C,m,A){var S=C("./mouse_event").MouseEvent,p=C("../lib/event"),c=C("../lib/dom");m.addTouchListeners=function(s,n){var i,t,e,r,a,o,l,d,y,I="scroll",h=0,u=0,b=0,w=0;function v(){function T(z){var K,Y=z.target.getAttribute("action");Y!="more"&&F?(Y=="paste"?G.readText().then(function(_){n.execCommand(Y,_)}):Y&&(Y!="cut"&&Y!="copy"||(G?G.writeText(n.getCopyText()):document.execCommand("copy")),n.execCommand(Y)),y.firstChild.style.display="none",F=!1,Y!="openCommandPallete"&&n.focus()):(F=!F,z=n.getCopyText(),K=n.session.getUndoManager().hasUndo(),y.replaceChild(c.buildDom(F?["span",!z&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],z&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],z&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],G&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],K&&["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"]),y.firstChild))}var G=window.navigator&&window.navigator.clipboard,F=!1;y=c.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(z){I="menu",z.stopPropagation(),z.preventDefault(),n.textInput.focus()},ontouchend:function(z){z.stopPropagation(),z.preventDefault(),T(z)},onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],n.container)}function R(){y||v();var T=n.selection.cursor,T=n.renderer.textToScreenCoordinates(T.row,T.column),G=n.renderer.textToScreenCoordinates(0,0).pageX,F=n.renderer.scrollLeft,z=n.container.getBoundingClientRect();y.style.top=T.pageY-z.top-3+"px",T.pageX-z.left<z.width-70?(y.style.left="",y.style.right="10px"):(y.style.right="",y.style.left=G+F-z.left+"px"),y.style.display="",y.firstChild.style.display="none",n.on("input",B)}function B(T){y&&(y.style.display="none"),n.off("input",B)}function E(){a=null,clearTimeout(a);var T=n.selection.getRange(),G=T.contains(l.row,l.column);!T.isEmpty()&&G||(n.selection.moveToPosition(l),n.selection.selectWord()),I="wait",R()}p.addListener(s,"contextmenu",function(T){d&&n.textInput.getElement().focus()},n),p.addListener(s,"touchstart",function(T){var G=T.touches;if(a||1<G.length)clearTimeout(a),a=null,e=-1,I="zoom";else{d=n.$mouseHandler.isMousePressed=!0;var F=n.renderer.layerConfig.lineHeight,z=n.renderer.layerConfig.lineHeight,K=T.timeStamp,Y=(r=K,G[0]),_=Y.clientX,Y=Y.clientY,_=(Math.abs(i-_)+Math.abs(t-Y)>F&&(e=-1),i=T.clientX=_,t=T.clientY=Y,b=w=0,new S(T,n));if(l=_.getDocumentPosition(),K-e<500&&G.length==1&&!h)u++,T.preventDefault(),T.button=0,a=null,clearTimeout(a),n.selection.moveToPosition(l),(Y=2<=u?n.selection.getLineRange(l.row):n.session.getBracketRange(l))&&!Y.isEmpty()?n.selection.setRange(Y):n.selection.selectWord(),I="wait";else{u=0;var _=n.selection.cursor,G=n.selection.isEmpty()?_:n.selection.anchor,Y=n.renderer.$cursorLayer.getPixelPosition(_,!0),_=n.renderer.$cursorLayer.getPixelPosition(G,!0),G=n.renderer.scroller.getBoundingClientRect(),Z=n.renderer.layerConfig.offset,W=n.renderer.scrollLeft,f=function(j,Q){return(j/=z)*j+(Q=Q/F-.75)*Q};if(T.clientX<G.left)return void(I="zoom");Y=f(T.clientX-G.left-Y.left+W,T.clientY-G.top-Y.top+Z),f=f(T.clientX-G.left-_.left+W,T.clientY-G.top-_.top+Z),Y<3.5&&f<3.5&&(I=f<Y?"cursor":"anchor"),I=f<3.5?"anchor":Y<3.5?"cursor":"scroll",a=setTimeout(E,450)}e=K}},n),p.addListener(s,"touchend",function(T){d=n.$mouseHandler.isMousePressed=!1,o&&clearInterval(o),I=="zoom"?(I="",h=0):(a?(n.selection.moveToPosition(l),h=0,R):I=="scroll"?(h+=60,o=setInterval(function(){h--<=0&&(clearInterval(o),o=null),Math.abs(b)<.01&&(b=0),Math.abs(w)<.01&&(w=0),h<20&&(b*=.9),h<20&&(w*=.9);var G=n.session.getScrollTop();n.renderer.scrollBy(10*b,10*w),G==n.session.getScrollTop()&&(h=0)},10),B):R)(),clearTimeout(a),a=null},n),p.addListener(s,"touchmove",function(T){a&&(clearTimeout(a),a=null);var G=T.touches;if(!(1<G.length||I=="zoom")){var G=G[0],F=i-G.clientX,z=t-G.clientY;if(I=="wait"){if(!(4<F*F+z*z))return T.preventDefault();I="cursor"}i=G.clientX,t=G.clientY,T.clientX=G.clientX,T.clientY=G.clientY;var G=T.timeStamp,K=G-r;r=G,I=="scroll"?((G=new S(T,n)).speed=1,G.wheelX=F,G.wheelY=z,10*Math.abs(F)<Math.abs(z)&&(F=0),10*Math.abs(z)<Math.abs(F)&&(z=0),K!=0&&(b=F/K,w=z/K),n._emit("mousewheel",G),G.propagationStopped||(b=w=0)):(F=new S(T,n).getDocumentPosition(),I=="cursor"?n.selection.moveCursorToPosition(F):I=="anchor"&&n.selection.setSelectionAnchor(F.row,F.column),n.renderer.scrollCursorIntoView(F),T.preventDefault())}},n)}}),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(r,m,A){function S(a){function o(I){document.hasFocus&&document.hasFocus()&&(a.isFocused()||document.activeElement!=(a.textInput&&a.textInput.getElement()))||window.focus(),a.focus(),setTimeout(function(){a.isFocused()||a.focus()})}var l=this,d=(this.editor=a,new s(this),new n(this),new t(this),a.renderer.getMouseEventTarget()),y=(p.addListener(d,"click",this.onMouseEvent.bind(this,"click"),a),p.addListener(d,"mousemove",this.onMouseMove.bind(this,"mousemove"),a),p.addMultiMouseDownListener([d,a.renderer.scrollBarV&&a.renderer.scrollBarV.inner,a.renderer.scrollBarH&&a.renderer.scrollBarH.inner,a.textInput&&a.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",a),p.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"),a),e(a.container,a),a.renderer.$gutter);p.addListener(y,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),a),p.addListener(y,"click",this.onMouseEvent.bind(this,"gutterclick"),a),p.addListener(y,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),a),p.addListener(y,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),a),p.addListener(d,"mousedown",o,a),p.addListener(y,"mousedown",o,a),c.isIE&&a.renderer.scrollBarV&&(p.addListener(a.renderer.scrollBarV.element,"mousedown",o,a),p.addListener(a.renderer.scrollBarH.element,"mousedown",o,a)),a.on("mousemove",function(I){var h,u;l.state||l.$dragDelay||!l.$dragEnabled||(I=a.renderer.screenToTextCoordinates(I.x,I.y),h=a.session.selection.getRange(),u=a.renderer,!h.isEmpty()&&h.insideStart(I.row,I.column)?u.setCursorStyle("default"):u.setCursorStyle(""))},a)}var p=r("../lib/event"),c=r("../lib/useragent"),s=r("./default_handlers").DefaultHandlers,n=r("./default_gutter_handler").GutterHandler,i=r("./mouse_event").MouseEvent,t=r("./dragdrop_handler").DragdropHandler,e=r("./touch_handler").addTouchListeners,r=r("../config");(function(){this.onMouseEvent=function(a,o){this.editor.session&&this.editor._emit(a,new i(o,this.editor))},this.onMouseMove=function(a,o){var l=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;l&&l.length&&this.editor._emit(a,new i(o,this.editor))},this.onMouseWheel=function(a,o){var l=new i(o,this.editor);l.speed=2*this.$scrollSpeed,l.wheelX=o.wheelX,l.wheelY=o.wheelY,this.editor._emit(a,l)},this.setState=function(a){this.state=a},this.captureMouse=function(a,o){this.x=a.x,this.y=a.y,this.isMousePressed=!0;function l(v){if(v){if(c.isWebKit&&!v.which&&u.releaseMouse)return u.releaseMouse();u.x=v.clientX,u.y=v.clientY,o&&o(v),u.mouseEvent=new i(v,u.editor),u.$mouseMoved=!0}}function d(v){I.off("beforeEndOperation",b),clearInterval(w),I.session&&y(),u[u.state+"End"]&&u[u.state+"End"](v),u.state="",u.isMousePressed=h.$isMousePressed=!1,h.$keepTextAreaAtCursor&&h.$moveTextAreaToCursor(),u.$onCaptureMouseMove=u.releaseMouse=null,v&&u.onMouseEvent("mouseup",v),I.endOperation()}function y(){u[u.state]&&u[u.state](),u.$mouseMoved=!1}var I=this.editor,h=this.editor.renderer,u=(h.$isMousePressed=!0,this);if(c.isOldIE&&a.domEvent.type=="dblclick")return setTimeout(function(){d(a)});var b=function(v){u.releaseMouse&&I.curOp.command.name&&I.curOp.selectionChanged&&(u[u.state+"End"]&&u[u.state+"End"](),u.state="",u.releaseMouse())},w=(I.on("beforeEndOperation",b),I.startOperation({command:{name:"mouse"}}),u.$onCaptureMouseMove=l,u.releaseMouse=p.capture(this.editor.container,l,d),setInterval(y,20))},this.releaseMouse=null,this.cancelContextMenu=function(){var a=function(o){o&&o.domEvent&&o.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",a),o&&o.domEvent&&p.stopEvent(o.domEvent))}.bind(this);setTimeout(a,10),this.editor.on("nativecontextmenu",a)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(S.prototype),r.defineOptions(S.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:c.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),m.MouseHandler=S}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(C,m,A){var S=C("../lib/dom");m.FoldHandler=function(p){p.on("click",function(c){var n=c.getDocumentPosition(),s=p.session,n=s.getFoldAt(n.row,n.column,1),n=(n&&(c.getAccelKey()?s.removeFold(n):s.expandFold(n),c.stop()),c.domEvent&&c.domEvent.target);n&&S.hasCssClass(n,"ace_inline_button")&&S.hasCssClass(n,"ace_toggle_wrap")&&(s.setOption("wrap",!s.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(c){var s,n;p.renderer.$gutterLayer.getRegion(c)=="foldWidgets"&&(s=c.getDocumentPosition().row,(n=p.session).foldWidgets&&n.foldWidgets[s]&&p.session.onFoldWidgetClick(s,c),p.isFocused()||p.focus(),c.stop())}),p.on("gutterdblclick",function(c){var s,n,i;p.renderer.$gutterLayer.getRegion(c)=="foldWidgets"&&(i=c.getDocumentPosition().row,(n=(n=(s=p.session).getParentFoldRangeData(i,!0)).range||n.firstRange)&&(i=n.start.row,(i=s.getFoldAt(i,s.getLine(i).length,1))?s.removeFold(i):(s.addFold("...",n),p.renderer.scrollCursorIntoView({row:n.start.row,column:0}))),c.stop())})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(C,m,A){function S(s){this.$editor=s,this.$data={editor:s},this.$handlers=[],this.setDefaultHandler(s.commands)}var p=C("../lib/keys"),c=C("../lib/event");(function(){this.setDefaultHandler=function(s){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=s,this.addKeyboardHandler(s,0)},this.setKeyboardHandler=function(s){var n=this.$handlers;if(n[n.length-1]!=s){for(;n[n.length-1]&&n[n.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(n[n.length-1]);this.addKeyboardHandler(s,1)}},this.addKeyboardHandler=function(s,n){var i;s&&(typeof s!="function"||s.handleKeyboard||(s.handleKeyboard=s),(i=this.$handlers.indexOf(s))!=-1&&this.$handlers.splice(i,1),n==null?this.$handlers.push(s):this.$handlers.splice(n,0,s),i==-1&&s.attach&&s.attach(this.$editor))},this.removeKeyboardHandler=function(s){var n=this.$handlers.indexOf(s);return n!=-1&&(this.$handlers.splice(n,1),s.detach&&s.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var s=this.$data,n=s.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(n,s)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(s,n,i,t){for(var e,r=!1,a=this.$editor.commands,o=this.$handlers.length;o--&&!((e=this.$handlers[o].handleKeyboard(this.$data,s,n,i,t))&&e.command&&((r=e.command=="null"||a.exec(e.command,this.$editor,e.args,t))&&t&&s!=-1&&e.passEvent!=1&&e.command.passEvent!=1&&c.stopEvent(t),r)););return r||s!=-1||(e={command:"insertstring"},r=a.exec("insertstring",this.$editor,n)),r&&this.$editor._signal&&this.$editor._signal("keyboardActivity",e),r},this.onCommandKey=function(s,n,i){var t=p.keyCodeToString(i);return this.$callKeyboardHandlers(n,t,i,s)},this.onTextInput=function(s){return this.$callKeyboardHandlers(-1,s)}}).call(S.prototype),m.KeyBinding=S}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(C,m,A){var S=0,p=0,c=!1,s=!1,n=!1,i=[[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]],t=[[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,r=1,a=2,o=3,l=4,d=5,y=6,I=7,h=8,u=9,b=10,w=11,v=12,R=13,B=14,E=15,T=16,G=17,F=18,z=[F,F,F,F,F,F,F,F,F,y,d,y,h,d,F,F,F,F,F,F,F,F,F,F,F,F,F,F,d,d,d,y,h,l,l,w,w,w,l,l,l,l,l,b,u,b,u,u,a,a,a,a,a,a,a,a,a,a,u,l,l,l,l,l,l,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,l,l,l,l,l,l,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,l,l,l,l,F,F,F,F,F,F,d,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,u,l,w,w,w,w,l,l,l,l,e,l,l,F,l,l,w,w,a,a,l,e,l,l,l,a,e,l,l,l,l,l],K=[h,h,h,h,h,h,h,h,h,h,h,F,F,F,e,r,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,h,d,R,B,E,T,G,u,w,w,w,w,w,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,u,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,h];function Y(W,f,k,$){var M,j,Q,te=S?t:i,he=0,Ae=-1,ue=null,Ce=null,Ie=[];if(!$)for(ue=0,$=[];ue<k;ue++)$[ue]=Z(W[ue]);for(p=S,n=s=c=!1,Ce=0;Ce<k;Ce++){if(Q=he,Ie[Ce]=M=function(Te,$e,ke,de){var Le,ae,ge,le=$e[de];switch(le){case e:case r:c=!1;case l:case o:return le;case a:return c?o:a;case I:return c=!0,r;case h:return l;case u:return de<1||de+1>=$e.length||(Le=ke[de-1])!=a&&Le!=o||(ce=$e[de+1])!=a&&ce!=o?l:(ce=c?o:ce)==Le?ce:l;case b:return(Le=0<de?ke[de-1]:d)==a&&de+1<$e.length&&$e[de+1]==a?a:l;case w:if(0<de&&ke[de-1]==a)return a;if(c)return l;for(ge=de+1,ae=$e.length;ge<ae&&$e[ge]==w;)ge++;return ge<ae&&$e[ge]==a?a:l;case v:for(ae=$e.length,ge=de+1;ge<ae&&$e[ge]==v;)ge++;if(ge<ae){var ce=Te[de],ce=1425<=ce&&ce<=2303||ce==64286;if(Le=$e[ge],ce&&(Le==r||Le==I))return r}return de<1||(Le=$e[de-1])==d?l:ke[de-1];case d:return s=!(c=!1),S;case y:return n=!0,l;case R:case B:case T:case G:case E:c=!1;case F:return l}}(W,$,Ie,Ce),Q=240&(he=te[Q][M]),he&=15,f[Ce]=j=te[he][5],0<Q){if(Q==16)for(ue=Ae;ue<Ce;ue++)f[ue]=1;Ae=-1}if(te[he][6])Ae==-1&&(Ae=Ce);else if(-1<Ae){for(ue=Ae;ue<Ce;ue++)f[ue]=j;Ae=-1}$[Ce]==d&&(f[Ce]=0),p|=j}if(n){for(ue=0;ue<k;ue++)if($[ue]==y){f[ue]=S;for(var we=ue-1;0<=we&&$[we]==h;we--)f[we]=S}}}function _(W,f,k){if(!(p<W))if(W!=1||S!=1||s)for(var $,M,j,Q,te=k.length,he=0;he<te;){if(f[he]>=W){for($=he+1;$<te&&f[$]>=W;)$++;for(M=he,j=$-1;M<j;M++,j--)Q=k[M],k[M]=k[j],k[j]=Q;he=$}he++}else k.reverse()}function Z(W){var f=W.charCodeAt(0),k=f>>8;return k==0?191<f?e:z[f]:k==5?/[\u0591-\u05f4]/.test(W)?r:e:k==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?v:/[\u0660-\u0669\u066b-\u066c]/.test(W)?o:f==1642?w:/[\u06f0-\u06f9]/.test(W)?a:I:k==32&&f<=8287?K[255&f]:k==254&&65136<=f?I:l}m.L=e,m.R=r,m.EN=a,m.ON_R=3,m.AN=4,m.R_H=5,m.B=6,m.RLE=7,m.DOT="\xB7",m.doBidiReorder=function(W,f,k){if(W.length<2)return{};var $=W.split(""),M=new Array($.length),j=new Array($.length),Q=[];S=k?1:0,Y($,Q,$.length,f);for(var te=0;te<M.length;M[te]=te,te++);for(_(2,Q,M),_(1,Q,M),te=0;te<M.length-1;te++)f[te]===o?Q[te]=m.AN:Q[te]===r&&(f[te]>I&&f[te]<R||f[te]===l||f[te]===F)?Q[te]=m.ON_R:0<te&&$[te-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test($[te])&&(Q[te-1]=Q[te]=m.R_H,te++);for($[$.length-1]===m.DOT&&(Q[$.length-1]=m.B),$[0]==="\u202B"&&(Q[0]=m.RLE),te=0;te<M.length;te++)j[te]=Q[M[te]];return{logicalFromVisual:M,bidiLevels:j}},m.hasBidiCharacters=function(W,f){for(var k=!1,$=0;$<W.length;$++)f[$]=Z(W.charAt($)),k||f[$]!=r&&f[$]!=I&&f[$]!=o||(k=!0);return k},m.getVisualFromLogicalIdx=function(W,f){for(var k=0;k<f.logicalFromVisual.length;k++)if(f.logicalFromVisual[k]==W)return k;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(C,m,A){function S(n){this.session=n,this.bidiMap={},this.currentRow=null,this.bidiUtil=p,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=s.test(n.getValue())}var p=C("./lib/bidiutil"),c=C("./lib/lang"),s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;(function(){this.isBidiRow=function(n,i,t){return!!this.seenBidi&&(n!==this.currentRow&&(this.currentRow=n,this.updateRowLine(i,t),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(n){this.seenBidi?this.currentRow=null:n.action=="insert"&&s.test(n.lines.join(`
|
|
`))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var n=0,i=this.session.$screenRowCache;return n=i.length&&0<=(i=this.session.$getRowCacheIndex(i,this.currentRow))?this.session.$docRowCache[i]:n},this.getSplitIndex=function(){var n=0,i=this.session.$screenRowCache;if(i.length)for(var t,e=this.session.$getRowCacheIndex(i,this.currentRow);0<this.currentRow-n&&(t=this.session.$getRowCacheIndex(i,this.currentRow-n-1))===e;)e=t,n++;else n=this.currentRow;return n},this.updateRowLine=function(n,i){var t,e=(n=n===void 0?this.getDocumentRow():n)===this.session.getLength()-1?this.EOF:this.EOL,r=(this.wrapIndent=0,this.line=this.session.getLine(n),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode?(n=this.session.$wrapData[n])&&(0<(i=i===void 0?this.getSplitIndex():i)&&n.length?(this.wrapIndent=n.indent,this.wrapOffset=this.wrapIndent*this.charWidths[p.L],this.line=i<n.length?this.line.substring(n[i-1],n[i]):this.line.substring(n[n.length-1])):this.line=this.line.substring(0,n[i]),i==n.length&&(this.line+=this.showInvisibles?e:p.DOT)):this.line+=this.showInvisibles?e:p.DOT,this.session),a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(o,l){return o===" "||r.isFullWidth(o.charCodeAt(0))?(t=o===" "?r.getScreenTabSize(l+a):2,a+=t-1,c.stringRepeat(p.DOT,t)):o}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==p.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var n=[];p.hasBidiCharacters(this.line,n)||this.isRtlDir?this.bidiMap=p.doBidiReorder(this.line,n,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(n){var i;this.characterWidth!==n.$characterSize.width&&(this.fontMetrics=n,i=this.characterWidth=n.$characterSize.width,n=n.$measureCharWidth("\u05D4"),this.charWidths[p.L]=this.charWidths[p.EN]=this.charWidths[p.ON_R]=i,this.charWidths[p.R]=this.charWidths[p.AN]=n,this.charWidths[p.R_H]=.45*n,this.charWidths[p.B]=this.charWidths[p.RLE]=0,this.currentRow=null)},this.setShowInvisibles=function(n){this.showInvisibles=n,this.currentRow=null},this.setEolChar=function(n){this.EOL=n},this.setContentWidth=function(n){this.contentWidth=n},this.isRtlLine=function(n){return!!this.$isRtl||(n!=null?this.session.getLine(n).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(n,i){for(var t=n.getCursorPosition(),e=n.selection.getSelectionAnchor().row;e<=t.row;e++)i||n.session.getLine(e).charAt(0)!==n.session.$bidiHandler.RLE?i&&n.session.getLine(e).charAt(0)!==n.session.$bidiHandler.RLE&&n.session.doc.insert({column:0,row:e},n.session.$bidiHandler.RLE):n.session.doc.removeInLine(e,0,1)},this.getPosLeft=function(n){n-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,t=i<n?this.session.getOverwrite()?n:n-1:i,e=p.getVisualFromLogicalIdx(t,this.bidiMap),r=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&n<=i&&r[e]%2!=0&&e++;for(var o=0;o<e;o++)a+=this.charWidths[r[o]];return!this.session.getOverwrite()&&i<n&&r[e]%2==0&&(a+=this.charWidths[r[e]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},this.getSelections=function(n,i){var t,e=this.bidiMap,r=e.bidiLevels,a=[],o=0,l=Math.min(n,i)-this.wrapIndent,d=Math.max(n,i)-this.wrapIndent,y=!1,I=!1,h=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var u,b=0;b<r.length;b++)u=e.logicalFromVisual[b],t=r[b],(y=l<=u&&u<d)&&!I?h=o:!y&&I&&a.push({left:h,width:o-h}),o+=this.charWidths[t],I=y;if(y&&b===r.length&&a.push({left:h,width:o-h}),this.isRtlDir)for(var w=0;w<a.length;w++)a[w].left+=this.rtlLineOffset;return a},this.offsetToCol=function(t){this.isRtlDir&&(t-=this.rtlLineOffset);var i=0,t=Math.max(t,0),e=0,r=0,a=this.bidiMap.bidiLevels,o=this.charWidths[a[r]];for(this.wrapIndent&&(t-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e+o/2<t;){if(e+=o,r===a.length-1){o=0;break}o=this.charWidths[a[++r]]}return(i=0<r&&a[r-1]%2!=0&&a[r]%2==0?(t<e&&r--,this.bidiMap.logicalFromVisual[r]):0<r&&a[r-1]%2==0&&a[r]%2!=0?1+(e<t?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===a.length-1&&o===0&&a[r-1]%2==0||!this.isRtlDir&&r===0&&a[r]%2!=0?1+this.bidiMap.logicalFromVisual[r]:(0<r&&a[r-1]%2!=0&&o!==0&&r--,this.bidiMap.logicalFromVisual[r]))===0&&this.isRtlDir&&i++,i+this.wrapIndent}}).call(S.prototype),m.BidiHandler=S}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(C,m,A){function S(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")})}var p=C("./lib/oop"),c=C("./lib/lang"),s=C("./lib/event_emitter").EventEmitter,n=C("./range").Range;(function(){p.implement(this,s),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.setSelectionAnchor=function(i,t){this.$isEmpty=!1,this.anchor.setPosition(i,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var i=this.anchor,t=this.lead;return i.row>t.row||i.row==t.row&&i.column>t.column},this.getRange=function(){var i=this.anchor,t=this.lead;return this.$isEmpty?n.fromPoints(t,t):this.isBackwards()?n.fromPoints(t,i):n.fromPoints(i,t)},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(i,r){var e=r?i.end:i.start,r=r?i.start:i.end;this.$setSelection(e.row,e.column,r.row,r.column)},this.$setSelection=function(i,t,e,r){var a,o;this.$silent||(a=this.$isEmpty,o=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,t),this.cursor.setPosition(e,r),this.$isEmpty=!n.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||a!=this.$isEmpty||o)&&this._emit("changeSelection"))},this.$moveSelection=function(i){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),i.call(this)},this.selectTo=function(i,t){this.$moveSelection(function(){this.moveCursorTo(i,t)})},this.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},this.moveTo=function(i,t){this.clearSelection(),this.moveCursorTo(i,t)},this.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},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(i,t){var e;return t===void 0&&(i=(e=i||this.lead).row,t=e.column),this.session.getWordRange(i,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var i=this.getCursor(),i=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(i)},this.getLineRange=function(e,t){var e=typeof e=="number"?e:this.lead.row,r=this.session.getFoldLine(e),r=r?(e=r.start.row,r.end.row):e;return t===!0?new n(e,0,r,this.session.getLine(r).length):new n(e,0,r+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(i,t,e){var r=i.column,a=i.column+t;return e<0&&(r=i.column-t,a=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(r,a).split(" ").length-1==t},this.moveCursorLeft=function(){var i,t=this.lead.getPosition();(i=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(i.start.row,i.start.column):t.column===0?0<t.row&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length):(i=this.session.getTabSize(),this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1))},this.moveCursorRight=function(){var i,t=this.lead.getPosition();(i=this.session.getFoldAt(t.row,t.column,1))?this.moveCursorTo(i.end.row,i.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):(i=this.session.getTabSize(),t=this.lead,this.wouldMoveIntoSoftTab(t,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1))},this.moveCursorLineStart=function(){var e=this.lead.row,i=this.lead.column,t=this.session.documentToScreenRow(e,i),t=this.session.screenToDocumentPosition(t,0),e=this.session.getDisplayLine(e,null,t.row,t.column).match(/^\s*/);e[0].length==i||this.session.$useEmacsStyleLineStart||(t.column+=e[0].length),this.moveCursorToPosition(t)},this.moveCursorLineEnd=function(){var i,t=this.lead,t=this.session.getDocumentLastRowColumnPosition(t.row,t.column);this.lead.column==t.column&&(i=this.session.getLine(t.row),t.column==i.length&&0<(i=i.search(/\s+$/))&&(t.column=i)),this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,t=this.doc.getLine(i).length;this.moveCursorTo(i,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var i=this.lead.row,t=this.lead.column,e=this.doc.getLine(i),r=e.substring(t),a=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.getFoldAt(i,t,1));a?this.moveCursorTo(a.end.row,a.end.column):(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=e.substring(t)),t>=e.length?(this.moveCursorTo(i,e.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight()):(this.session.tokenRe.exec(r)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,t)))},this.moveCursorLongWordLeft=function(){var i,t=this.lead.row,e=this.lead.column;(i=this.session.getFoldAt(t,e,-1))?this.moveCursorTo(i.start.row,i.start.column):((i=this.session.getFoldStringAt(t,e,-1))==null&&(i=this.doc.getLine(t).substring(0,e)),i=c.stringReverse(i),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(e-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),e<=0?(this.moveCursorTo(t,0),this.moveCursorLeft(),0<t&&this.moveCursorWordLeft()):(this.session.tokenRe.exec(i)&&(e-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)))},this.$shortWordEndIndex=function(i){var t,e=0,r=/\s/,a=this.session.tokenRe;if(a.lastIndex=0,this.session.tokenRe.exec(i))e=this.session.tokenRe.lastIndex;else{for(;(t=i[e])&&r.test(t);)e++;if(e<1){for(a.lastIndex=0;(t=i[e])&&!a.test(t);)if(a.lastIndex=0,e++,r.test(t)){if(2<e){e--;break}for(;(t=i[e])&&r.test(t);)e++;if(2<e)break}}}return a.lastIndex=0,e},this.moveCursorShortWordRight=function(){var i=this.lead.row,t=this.lead.column,e=this.doc.getLine(i),r=e.substring(t),a=this.session.getFoldAt(i,t,1);if(a)return this.moveCursorTo(a.end.row,a.end.column);if(t==e.length){for(var o=this.doc.getLength();r=this.doc.getLine(++i),i<o&&/^\s*$/.test(r););/^\s+/.test(r)||(r=""),t=0}a=this.$shortWordEndIndex(r),this.moveCursorTo(i,t+a)},this.moveCursorShortWordLeft=function(){var i=this.lead.row,t=this.lead.column;if(r=this.session.getFoldAt(i,t,-1))return this.moveCursorTo(r.start.row,r.start.column);var e=this.session.getLine(i).substring(0,t);if(t===0){for(;e=this.doc.getLine(--i),0<i&&/^\s*$/.test(e););t=e.length,/\s+$/.test(e)||(e="")}var r=c.stringReverse(e),r=this.$shortWordEndIndex(r);return this.moveCursorTo(i,t-r)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(i,t){var e,r=this.session.documentToScreenPosition(this.lead.row,this.lead.column),a=(t===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(a=this.session.lineWidgets[this.lead.row],i<0?i-=a.rowsAbove||0:0<i&&(i+=a.rowCount-(a.rowsAbove||0))),this.session.screenToDocumentPosition(r.row+i,r.column,e));i!==0&&t===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+t,t===0)},this.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},this.moveCursorTo=function(i,t,e){var r=this.session.getFoldAt(i,t,1),r=(r&&(i=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(i));/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==i&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(i,t),this.$keepDesiredColumnOnChange=!1,e||(this.$desiredColumn=null)},this.moveCursorToScreen=function(i,t,e){i=this.session.screenToDocumentPosition(i,t),this.moveCursorTo(i.row,i.column,e)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(i){var t=this.getRange();return i?(i.start.column=t.start.column,i.start.row=t.start.row,i.end.column=t.end.column,i.end.row=t.end.row):i=t,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},this.getRangeOfMovements=function(i){var t=this.getCursor();try{i(this);var e=this.getCursor();return n.fromPoints(t,e)}catch{return n.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){var i;return this.rangeCount?i=this.ranges.map(function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e}):(i=this.getRange()).isBackwards=this.isBackwards(),i},this.fromJSON=function(i){if(i.start==null){if(this.rangeList&&1<i.length){this.toSingleRange(i[0]);for(var t=i.length;t--;){var e=n.fromPoints(i[t].start,i[t].end);i[t].isBackwards&&(e.cursor=e.start),this.addRange(e,!0)}return}i=i[0]}this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},this.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(i[t]))return!1;return!0}}).call(S.prototype),m.Selection=S}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(C,m,A){function S(s){for(var n in this.states=s,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[n],t=[],e=0,r=this.matchMappings[n]={defaultToken:"text"},a="g",o=[],l=0;l<i.length;l++){var d,y,I=i[l];I.defaultToken&&(r.defaultToken=I.defaultToken),I.caseInsensitive&&a.indexOf("i")===-1&&(a+="i"),I.unicode&&a.indexOf("u")===-1&&(a+="u"),I.regex!=null&&(I.regex instanceof RegExp&&(I.regex=I.regex.toString().slice(1,-1)),d=I.regex,y=new RegExp("(?:("+d+")|(.))").exec("a").length-2,Array.isArray(I.token)?I.token.length==1||y==1?I.token=I.token[0]:y-1!=I.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:I,groupCount:y-1}),I.token=I.token[0]):(I.tokenArray=I.token,I.token=null,I.onMatch=this.$arrayTokens):typeof I.token!="function"||I.onMatch||(I.onMatch=1<y?this.$applyToken:I.token),1<y&&(d=/\\\d/.test(I.regex)?I.regex.replace(/\\([0-9]+)/g,function(h,u){return"\\"+(parseInt(u,10)+e+1)}):(y=1,this.removeCapturingGroups(I.regex)),I.splitRegex||typeof I.token=="string"||o.push(I)),r[e]=l,e+=y,t.push(d),I.onMatch||(I.onMatch=null))}t.length||(r[0]=0,t.push("$")),o.forEach(function(h){h.splitRegex=this.createSplitterRegexp(h.regex,a)},this),this.regExps[n]=new RegExp("("+t.join(")|(")+")|($)",a)}}var p=C("./config"),c=2e3;(function(){this.$setMaxTokenCount=function(s){c=0|s},this.$applyToken=function(s){var n=this.splitRegex.exec(s).slice(1),i=this.token.apply(this,n);if(typeof i=="string")return[{type:i,value:s}];for(var t=[],e=0,r=i.length;e<r;e++)n[e]&&(t[t.length]={type:i[e],value:n[e]});return t},this.$arrayTokens=function(s){if(!s)return[];var n=this.splitRegex.exec(s);if(!n)return"text";for(var i=[],t=this.tokenArray,e=0,r=t.length;e<r;e++)n[e+1]&&(i[i.length]={type:t[e],value:n[e+1]});return i},this.removeCapturingGroups=function(s){return s.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(n,i){return i?"(?:":n})},this.createSplitterRegexp=function(s,n){var i,t,e;return s.indexOf("(?=")!=-1&&(i=0,t=!1,e={},s.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(r,a,o,l,d,y){return t?t=d!="]":d?t=!0:l?(i==e.stack&&(e.end=y+1,e.stack=-1),i--):o&&(i++,o.length!=1&&(e.stack=i,e.start=y)),r}),e.end!=null&&/^\)*$/.test(s.substr(e.end))&&(s=s.substring(0,e.start)+s.substr(e.end))),(s=s.charAt(0)!="^"?"^"+s:s).charAt(s.length-1)!="$"&&(s+="$"),new RegExp(s,(n||"").replace("g",""))},this.getLineTokens=function(s,n){n&&typeof n!="string"?(n=(i=n.slice(0))[0])==="#tmp"&&(i.shift(),n=i.shift()):i=[];for(var i,t,e=n||"start",r=(r=this.states[e])||this.states[e="start"],a=this.matchMappings[e],o=this.regExps[e],l=[],d=o.lastIndex=0,y=0,I={type:null,value:""};t=o.exec(s);){var h,u=a.defaultToken,b=null,w=t[0],v=o.lastIndex;v-w.length>d&&(h=s.substring(d,v-w.length),I.type==u?I.value+=h:(I.type&&l.push(I),I={type:u,value:h}));for(var R=0;R<t.length-2;R++)if(t[R+1]!==void 0){u=(b=r[a[R]]).onMatch?b.onMatch(w,e,i,s):b.token,b.next&&(e=typeof b.next=="string"?b.next:b.next(e,i),(r=this.states[e])||(this.reportError("state doesn't exist",e),r=this.states[e="start"]),a=this.matchMappings[e],(o=this.regExps[e]).lastIndex=d=v),b.consumeLineEnd&&(d=v);break}if(w){if(typeof u=="string")b&&b.merge===!1||I.type!==u?(I.type&&l.push(I),I={type:u,value:w}):I.value+=w;else if(u)for(I.type&&l.push(I),I={type:null,value:""},R=0;R<u.length;R++)l.push(u[R])}if(d==s.length)break;if(d=v,y++>c){for(y>2*s.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:s});d<s.length;)I.type&&l.push(I),I={value:s.substring(d,d+=500),type:"overflow"};e="start",i=[];break}}return I.type&&l.push(I),1<i.length&&i[0]!==e&&i.unshift("#tmp",e),{tokens:l,state:i.length?i:e}},this.reportError=p.reportError}).call(S.prototype),m.Tokenizer=S}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(C,m,A){function S(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}var p=C("../lib/lang");(function(){this.addRules=function(n,i){if(i)for(var t in n){for(var e=n[t],r=0;r<e.length;r++){var a=e[r];(a.next||a.onMatch)&&(typeof a.next=="string"&&a.next.indexOf(i)!==0&&(a.next=i+a.next),a.nextState&&a.nextState.indexOf(i)!==0&&(a.nextState=i+a.nextState))}this.$rules[i+t]=e}else for(var t in n)this.$rules[t]=n[t]},this.getRules=function(){return this.$rules},this.embedRules=function(n,i,t,e,r){if(n=typeof n=="function"?new n().getRules():n,e)for(var a=0;a<e.length;a++)e[a]=i+e[a];else for(var o in e=[],n)e.push(i+o);if(this.addRules(n,i),t)for(var l=Array.prototype[r?"push":"unshift"],a=0;a<e.length;a++)l.apply(this.$rules[e[a]],p.deepCopy(t));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};function c(n,i){return n=="start"&&!i.length||i.unshift(this.nextState,n),this.nextState}function s(n,i){return i.shift(),i.shift()||"start"}this.normalizeRules=function(){var n=0,i=this.$rules;Object.keys(i).forEach(function t(e){var r=i[e];r.processed=!0;for(var a=0;a<r.length;a++){var o=r[a],l=null,d=(Array.isArray(o)&&(l=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(d&&Array.isArray(d)?((I=o.stateName)||(typeof(I=o.token)!="string"&&(I=I[0]||""),i[I]&&(I+=n++)),i[I]=d,t(o.next=I)):d=="pop"&&(o.next=s),o.push&&(o.nextState=o.next||o.push,o.next=c,delete o.push),o.rules)for(var y in o.rules)i[y]?i[y].push&&i[y].push.apply(i[y],o.rules[y]):i[y]=o.rules[y];var I=typeof o=="string"?o:o.include;(l=I?Array.isArray(I)?I.map(function(h){return i[h]}):i[I]:l)&&(d=[a,1].concat(l),o.noEscape&&(d=d.filter(function(h){return!h.next})),r.splice.apply(r,d),a--),o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}},this)},this.createKeywordMapper=function(n,i,t,e){var r=Object.create(null);return this.$keywordList=[],Object.keys(n).forEach(function(a){for(var o=n[a].split(e||"|"),l=o.length;l--;){var d=o[l];this.$keywordList.push(d),t&&(d=d.toLowerCase()),r[d]=a}},this),n=null,t?function(a){return r[a.toLowerCase()]||i}:function(a){return r[a]||i}},this.getKeywords=function(){return this.$keywords}}).call(S.prototype),m.TextHighlightRules=S}),ace.define("ace/mode/behaviour",["require","exports","module"],function(C,m,A){function S(){this.$behaviours={}}(function(){this.add=function(p,c,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][c]=s},this.addBehaviours=function(p){for(var c in p)for(var s in p[c])this.add(c,s,p[c][s])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,c){p=(typeof p=="function"?new p:p).getBehaviours(c),this.addBehaviours(p)},this.getBehaviours=function(p){if(p){for(var c={},s=0;s<p.length;s++)this.$behaviours[p[s]]&&(c[p[s]]=this.$behaviours[p[s]]);return c}return this.$behaviours}}).call(S.prototype),m.Behaviour=S}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(C,m,A){function S(c,s,n){this.$session=c,this.$row=s,this.$rowTokens=c.getTokens(s),c=c.getTokenAt(s,n),this.$tokenIndex=c?c.index:-1}var p=C("./range").Range;(function(){this.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]},this.stepForward=function(){var c;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,c=c||this.$session.getLength(),this.$row>=c)return this.$row=c-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var c=this.$rowTokens,s=this.$tokenIndex,n=c[s].start;if(n===void 0)for(n=0;0<s;)n+=c[--s].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var c=this.$rowTokens[this.$tokenIndex],s=this.getCurrentTokenColumn();return new p(this.$row,s,this.$row,s+c.value.length)}}).call(S.prototype),m.TokenIterator=S}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(C,m,A){function S(d){var y=-1;if(d.multiSelect&&(y=d.selection.index,o.rangeCount!=d.multiSelect.rangeCount&&(o={rangeCount:d.multiSelect.rangeCount})),o[y])return s=o[y];s=o[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function p(d,y,I,h){var u=d.end.row-d.start.row;return{text:I+y+h,selection:[0,d.start.column+1,u,d.end.column+(u?0:1)]}}function c(d){this.add("braces","insertion",function(y,I,h,u,b){var w=h.getCursorPosition(),v=u.doc.getLine(w.row);if(b=="{")return S(h),B=h.getSelectionRange(),(E=u.doc.getTextRange(B))!==""&&E!=="{"&&h.getWrapBehavioursEnabled()?p(B,E,"{","}"):c.isSaneInsertion(h,u)?/[\]\}\)]/.test(v[w.column])||h.inMultiSelectMode||d&&d.braces?(c.recordAutoInsert(h,u,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(h,u,"{"),{text:"{",selection:[1,1]}):void 0;if(b=="}"){S(h);var R=v.substring(w.column,w.column+1);if(R=="}"&&u.$findOpeningBracket("}",{column:w.column+1,row:w.row})!==null&&c.isAutoInsertedClosing(w,v,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if(b==`
|
|
`||b==`\r
|
|
`){S(h);var B="";if(c.isMaybeInsertedClosing(w,v)&&(B=e.stringRepeat("}",s.maybeInsertedBrackets),c.clearMaybeInsertedClosing()),(R=v.substring(w.column,w.column+1))==="}"){var E=u.findMatchingBracket({row:w.row,column:w.column+1},"}");if(!E)return null;var T=this.$getIndent(u.getLine(E.row))}else{if(!B)return void c.clearMaybeInsertedClosing();T=this.$getIndent(v)}return b=T+u.getTabString(),{text:`
|
|
`+b+`
|
|
`+T+B,selection:[1,b.length,1,b.length]}}c.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(y,I,h,u,b){var w=u.doc.getTextRange(b);if(!b.isMultiLine()&&w=="{"){if(S(h),u.doc.getLine(b.start.row).substring(b.end.column,b.end.column+1)=="}")return b.end.column++,b;s.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,I,h,u,b){if(b=="(")return S(h),w=h.getSelectionRange(),(v=u.doc.getTextRange(w))!==""&&h.getWrapBehavioursEnabled()?p(w,v,"(",")"):c.isSaneInsertion(h,u)?(c.recordAutoInsert(h,u,")"),{text:"()",selection:[1,1]}):void 0;if(b==")"){S(h);var w=h.getCursorPosition(),v=u.doc.getLine(w.row),h=v.substring(w.column,w.column+1);if(h==")"&&u.$findOpeningBracket(")",{column:w.column+1,row:w.row})!==null&&c.isAutoInsertedClosing(w,v,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(y,I,h,u,b){var w=u.doc.getTextRange(b);if(!b.isMultiLine()&&w=="("&&(S(h),u.doc.getLine(b.start.row).substring(b.start.column+1,b.start.column+2)==")"))return b.end.column++,b}),this.add("brackets","insertion",function(y,I,h,u,b){if(b=="[")return S(h),w=h.getSelectionRange(),(v=u.doc.getTextRange(w))!==""&&h.getWrapBehavioursEnabled()?p(w,v,"[","]"):c.isSaneInsertion(h,u)?(c.recordAutoInsert(h,u,"]"),{text:"[]",selection:[1,1]}):void 0;if(b=="]"){S(h);var w=h.getCursorPosition(),v=u.doc.getLine(w.row),h=v.substring(w.column,w.column+1);if(h=="]"&&u.$findOpeningBracket("]",{column:w.column+1,row:w.row})!==null&&c.isAutoInsertedClosing(w,v,b))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(y,I,h,u,b){var w=u.doc.getTextRange(b);if(!b.isMultiLine()&&w=="["&&(S(h),u.doc.getLine(b.start.row).substring(b.start.column+1,b.start.column+2)=="]"))return b.end.column++,b}),this.add("string_dquotes","insertion",function(y,I,h,u,b){var w=u.$mode.$quotes||l;if(b.length==1&&w[b]&&(!this.lineCommentStart||this.lineCommentStart.indexOf(b)==-1)){S(h);var v=h.getSelectionRange(),R=u.doc.getTextRange(v);if(!(R===""||R.length==1&&w[R])&&h.getWrapBehavioursEnabled())return p(v,R,b,b);if(!R){var w=h.getCursorPosition(),v=u.doc.getLine(w.row),R=v.substring(w.column-1,w.column),h=v.substring(w.column,w.column+1),T=u.getTokenAt(w.row,w.column),B=u.getTokenAt(w.row,w.column+1);if(R=="\\"&&T&&/escape/.test(T.type))return null;var E,T=T&&/string|escape/.test(T.type),G=!B||/string|escape/.test(B.type);if(h==b)(E=T!==G)&&/string\.end/.test(B.type)&&(E=!1);else{if(T&&!G||T&&G||(B=u.$mode.tokenRe,T=(B.lastIndex=0,B.test(R)),G=(B.lastIndex=0,B.test(R)),T||G)||h&&!/[\s;,.})\]\\]/.test(h)||(u=v[w.column-2],R==b&&(u==b||B.test(u))))return null;E=!0}return{text:E?b+b:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,I,h,u,b){var w=u.$mode.$quotes||l,v=u.doc.getTextRange(b);if(!b.isMultiLine()&&w.hasOwnProperty(v)&&(S(h),u.doc.getLine(b.start.row).substring(b.start.column+1,b.start.column+2)==v))return b.end.column++,b})}var s,n=C("../../lib/oop"),i=C("../behaviour").Behaviour,t=C("../../token_iterator").TokenIterator,e=C("../../lib/lang"),r=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o={},l={'"':'"',"'":"'"};c.isSaneInsertion=function(d,y){var I=d.getCursorPosition(),h=new t(y,I.row,I.column);if(!this.$matchTokenType(h.getCurrentToken()||"text",r)){if(/[)}\]]/.test(d.session.getLine(I.row)[I.column]))return!0;if(d=new t(y,I.row,I.column+1),!this.$matchTokenType(d.getCurrentToken()||"text",r))return!1}return h.stepForward(),h.getCurrentTokenRow()!==I.row||this.$matchTokenType(h.getCurrentToken()||"text",a)},c.$matchTokenType=function(d,y){return-1<y.indexOf(d.type||d)},c.recordAutoInsert=function(d,y,I){d=d.getCursorPosition(),y=y.doc.getLine(d.row),this.isAutoInsertedClosing(d,y,s.autoInsertedLineEnd[0])||(s.autoInsertedBrackets=0),s.autoInsertedRow=d.row,s.autoInsertedLineEnd=I+y.substr(d.column),s.autoInsertedBrackets++},c.recordMaybeInsert=function(d,y,I){d=d.getCursorPosition(),y=y.doc.getLine(d.row),this.isMaybeInsertedClosing(d,y)||(s.maybeInsertedBrackets=0),s.maybeInsertedRow=d.row,s.maybeInsertedLineStart=y.substr(0,d.column)+I,s.maybeInsertedLineEnd=y.substr(d.column),s.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(d,y,I){return 0<s.autoInsertedBrackets&&d.row===s.autoInsertedRow&&I===s.autoInsertedLineEnd[0]&&y.substr(d.column)===s.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(d,y){return 0<s.maybeInsertedBrackets&&d.row===s.maybeInsertedRow&&y.substr(d.column)===s.maybeInsertedLineEnd&&y.substr(0,d.column)==s.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){s.autoInsertedLineEnd=s.autoInsertedLineEnd.substr(1),s.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){s&&(s.maybeInsertedBrackets=0,s.maybeInsertedRow=-1)},n.inherits(c,i),m.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(C,m,A){for(var S=[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],p=0,c=[],s=0;s<S.length;s+=2)c.push(p+=S[s]),S[s+1]&&c.push(45,p+=S[s+1]);m.wordChars=String.fromCharCode.apply(null,c)}),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(C,m,A){function S(){this.HighlightRules=s}var p=C("../config"),c=C("../tokenizer").Tokenizer,s=C("./text_highlight_rules").TextHighlightRules,n=C("./behaviour/cstyle").CstyleBehaviour,i=C("../unicode"),t=C("../lib/lang"),e=C("../token_iterator").TokenIterator,r=C("../range").Range;(function(){this.$defaultBehaviour=new n,this.tokenRe=new RegExp("^["+i.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+i.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new c(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,o,l,d){var y=o.doc,I=!0,h=!0,u=1/0,b=o.getTabSize(),w=!1;if(this.lineCommentStart){G=Array.isArray(this.lineCommentStart)?(z=this.lineCommentStart.map(t.escapeRegExp).join("|"),this.lineCommentStart[0]):(z=t.escapeRegExp(this.lineCommentStart),this.lineCommentStart),z=new RegExp("^(\\s*)(?:"+z+") ?"),w=o.getUseSoftTabs();var v=function(Z,W){var f,k,$=Z.match(z);$&&(f=$[1].length,k=$[0].length,T(Z,f,k)||$[0][k-1]!=" "||k--,y.removeInLine(W,f,k))},R=G+" ",B=function(Z,W){I&&!/\S/.test(Z)||(T(Z,u,u)?y.insertInLine({row:W,column:u},R):y.insertInLine({row:W,column:u},G))},E=function(Z,W){return z.test(Z)},T=function(Z,W,f){for(var k=0;W--&&Z.charAt(W)==" ";)k++;if(k%b!=0)return!1;for(k=0;Z.charAt(f++)==" ";)k++;return 2<b?k%b!=b-1:k%b==0}}else{if(!this.blockComment)return!1;var G=this.blockComment.start,F=this.blockComment.end,z=new RegExp("^(\\s*)(?:"+t.escapeRegExp(G)+")"),K=new RegExp("(?:"+t.escapeRegExp(F)+")\\s*$"),B=function(k,$){E(k,$)||I&&!/\S/.test(k)||(y.insertInLine({row:$,column:k.length},F),y.insertInLine({row:$,column:u},G))},v=function(k,$){var M;(M=k.match(K))&&y.removeInLine($,k.length-M[0].length,k.length),(M=k.match(z))&&y.removeInLine($,M[1].length,M[0].length)},E=function(k,$){if(z.test(k))return!0;for(var M=o.getTokens($),j=0;j<M.length;j++)if(M[j].type==="comment")return!0}}function Y(Z){for(var W=l;W<=d;W++)Z(y.getLine(W),W)}var _=1/0;Y(function(Z,W){var f=Z.search(/\S/);f!==-1?(f<u&&(u=f),h&&!E(Z,W)&&(h=!1)):_>Z.length&&(_=Z.length)}),u==1/0&&(u=_,h=I=!1),w&&u%b!=0&&(u=Math.floor(u/b)*b),Y(h?v:B)},this.toggleBlockComment=function(a,o,l,d){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var I,h,u=(B=new e(o,d.row,d.column)).getCurrentToken(),b=(o.selection,o.selection.toOrientedRange());if(u&&/comment/.test(u.type)){for(;u&&/comment/.test(u.type);){if((E=u.value.indexOf(y.start))!=-1){var w=B.getCurrentTokenRow(),v=B.getCurrentTokenColumn()+E,R=new r(w,v,w,v+y.start.length);break}u=B.stepBackward()}for(var B,E,u=(B=new e(o,d.row,d.column)).getCurrentToken();u&&/comment/.test(u.type);){if((E=u.value.indexOf(y.end))!=-1){var w=B.getCurrentTokenRow(),v=B.getCurrentTokenColumn()+E,T=new r(w,v,w,v+y.end.length);break}u=B.stepForward()}T&&o.remove(T),R&&(o.remove(R),I=R.start.row,h=-y.start.length)}else h=y.start.length,I=l.start.row,o.insert(l.end,y.end),o.insert(l.start,y.start);b.start.row==I&&(b.start.column+=h),b.end.row==I&&(b.end.column+=h),o.selection.fromOrientedRange(b)}},this.getNextLineIndent=function(a,o,l){return this.$getIndent(o)},this.checkOutdent=function(a,o,l){return!1},this.autoOutdent=function(a,o,l){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(a){return null},this.createModeDelegates=function(a){for(var o in this.$embeds=[],this.$modes={},a){var l,d,y;a[o]&&(d=(l=a[o]).prototype.$id,(y=p.$modes[d])||(p.$modes[d]=y=new l),p.$modes[o]||(p.$modes[o]=y),this.$embeds.push(o),this.$modes[o]=y)}for(var I=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],o=0;o<I.length;o++)(function(u){var b=I[o],w=u[b];u[I[o]]=function(){return this.$delegator(b,arguments,w)}})(this)},this.$delegator=function(a,o,l){var d=o[0]||"start";if(typeof d!="string"){if(Array.isArray(d[2])){var y=d[2][d[2].length-1];if(h=this.$modes[y])return h[a].apply(h,[d[1]].concat([].slice.call(o,1)))}d=d[0]||"start"}for(var I=0;I<this.$embeds.length;I++)if(this.$modes[this.$embeds[I]]){var h,u=d.split(this.$embeds[I]);if(!u[0]&&u[1])return o[0]=u[1],(h=this.$modes[this.$embeds[I]])[a].apply(h,o)}return y=l.apply(this,o),l?y:void 0},this.transformAction=function(a,o,l,d,y){if(this.$behaviour){var I,h=this.$behaviour.getBehaviours();for(I in h)if(h[I][o]){var u=h[I][o].apply(this,arguments);if(u)return u}}},this.getKeywords=function(a){if(!this.completionKeywords){var o=this.$tokenizer.rules,l=[];for(h in o)for(var d=o[h],y=0,I=d.length;y<I;y++)if(typeof d[y].token=="string")/keyword|support|storage/.test(d[y].token)&&l.push(d[y].regex);else if(typeof d[y].token=="object")for(var h,u=0,b=d[y].token.length;u<b;u++)/keyword|support|storage/.test(d[y].token[u])&&(h=d[y].regex.match(/\(.+?\)/g)[u],l.push(h.substr(1,h.length-2)));this.completionKeywords=l}return a?l.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(a,o,l,d){return(this.$keywordList||this.$createKeywordList()).map(function(y){return{name:y,value:y,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(S.prototype),m.Mode=S}),ace.define("ace/apply_delta",["require","exports","module"],function(C,m,A){m.applyDelta=function(S,p,c){var s=p.start.row,n=p.start.column,i=S[s]||"";switch(p.action){case"insert":p.lines.length===1?S[s]=i.substring(0,n)+p.lines[0]+i.substring(n):(t=[s,1].concat(p.lines),S.splice.apply(S,t),S[s]=i.substring(0,n)+S[s],S[s+p.lines.length-1]+=i.substring(n));break;case"remove":var t=p.end.column,e=p.end.row;s===e?S[s]=i.substring(0,n)+i.substring(t):S.splice(s,e-s+1,i.substring(0,n)+S[e].substring(t))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(c,m,A){var S=c("./lib/oop"),p=c("./lib/event_emitter").EventEmitter,c=m.Anchor=function(s,n,i){this.$onChange=this.onChange.bind(this),this.attach(s),i===void 0?this.setPosition(n.row,n.column):this.setPosition(n,i)};(function(){function s(n,i,t){return t=t?n.column<=i.column:n.column<i.column,n.row<i.row||n.row==i.row&&t}S.implement(this,p),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(n){n.start.row==n.end.row&&n.start.row!=this.row||n.start.row>this.row||(n=function(i,t,e){var l=i.action=="insert",r=(l?1:-1)*(i.end.row-i.start.row),a=(l?1:-1)*(i.end.column-i.start.column),o=i.start,l=l?o:i.end;return s(t,o,e)?{row:t.row,column:t.column}:s(l,t,!e)?{row:t.row+r,column:t.column+(t.row==l.row?a:0)}:{row:o.row,column:o.column}}(n,{row:this.row,column:this.column},this.$insertRight),this.setPosition(n.row,n.column,!0))},this.setPosition=function(n,i,t){t=t?{row:n,column:i}:this.$clipPositionToDocument(n,i),this.row==t.row&&this.column==t.column||(n={row:this.row,column:this.column},this.row=t.row,this.column=t.column,this._signal("change",{old:n,value:t}))},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(n,i){var t={};return n>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):n<0?(t.row=0,t.column=0):(t.row=n,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,i))),i<0&&(t.column=0),t}}).call(c.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(C,m,A){function S(t){this.$lines=[""],t.length===0?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)}var p=C("./lib/oop"),c=C("./apply_delta").applyDelta,s=C("./lib/event_emitter").EventEmitter,n=C("./range").Range,i=C("./anchor").Anchor;(function(){p.implement(this,s),this.setValue=function(t){var e=this.getLength()-1;this.remove(new n(0,0,e,this.getLine(e).length)),this.insert({row:0,column:0},t)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(t,e){return new i(this,t,e)},"aaa".split(/a/).length===0?this.$split=function(t){return t.replace(/\r\n|\r/g,`
|
|
`).split(`
|
|
`)}:this.$split=function(t){return t.split(/\r\n|\r|\n/)},this.$detectNewLine=function(t){t=t.match(/^.*?(\r\n|\r|\n)/m),this.$autoNewLine=t?t[1]:`
|
|
`,this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
`;case"unix":return`
|
|
`;default:return this.$autoNewLine||`
|
|
`}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(t){return t==`\r
|
|
`||t=="\r"||t==`
|
|
`},this.getLine=function(t){return this.$lines[t]||""},this.getLines=function(t,e){return this.$lines.slice(t,e+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},this.getLinesForRange=function(t){var e,r;return t.start.row===t.end.row?e=[this.getLine(t.start.row).substring(t.start.column,t.end.column)]:((e=this.getLines(t.start.row,t.end.row))[0]=(e[0]||"").substring(t.start.column),r=e.length-1,t.end.row-t.start.row==r&&(e[r]=e[r].substring(0,t.end.column))),e},this.insertLines=function(t,e){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,e)},this.removeLines=function(t,e){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,e)},this.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},this.insert=function(t,e){return this.getLength()<=1&&this.$detectNewLine(e),this.insertMergedLines(t,this.$split(e))},this.insertInLine=function(a,e){var r=this.clippedPos(a.row,a.column),a=this.pos(a.row,a.column+e.length);return this.applyDelta({start:r,end:a,action:"insert",lines:[e]},!0),this.clonePos(a)},this.clippedPos=function(t,e){var r=this.getLength(),r=(t===void 0?t=r:t<0?t=0:r<=t&&(t=r-1,e=void 0),this.getLine(t));return e==null&&(e=r.length),{row:t,column:e=Math.min(Math.max(e,0),r.length)}},this.clonePos=function(t){return{row:t.row,column:t.column}},this.pos=function(t,e){return{row:t,column:e}},this.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},this.insertFullLines=function(t,e){var r=0,r=(t=Math.min(Math.max(t,0),this.getLength()))<this.getLength()?(e=e.concat([""]),0):(e=[""].concat(e),this.$lines[--t].length);this.insertMergedLines({row:t,column:r},e)},this.insertMergedLines=function(r,e){var r=this.clippedPos(r.row,r.column),a={row:r.row+e.length-1,column:(e.length==1?r.column:0)+e[e.length-1].length};return this.applyDelta({start:r,end:a,action:"insert",lines:e}),this.clonePos(a)},this.remove=function(r){var e=this.clippedPos(r.start.row,r.start.column),r=this.clippedPos(r.end.row,r.end.column);return this.applyDelta({start:e,end:r,action:"remove",lines:this.getLinesForRange({start:e,end:r})}),this.clonePos(e)},this.removeInLine=function(t,e,r){return e=this.clippedPos(t,e),t=this.clippedPos(t,r),this.applyDelta({start:e,end:t,action:"remove",lines:this.getLinesForRange({start:e,end:t})},!0),this.clonePos(e)},this.removeFullLines=function(t,e){t=Math.min(Math.max(0,t),this.getLength()-1);var l=(e=Math.min(Math.max(0,e),this.getLength()-1))==this.getLength()-1&&0<t,a=e<this.getLength()-1,o=l?t-1:t,l=l?this.getLine(o).length:0,r=a?e+1:e,a=a?0:this.getLine(r).length,o=new n(o,l,r,a),l=this.$lines.slice(t,e+1);return this.applyDelta({start:o.start,end:o.end,action:"remove",lines:this.getLinesForRange(o)}),l},this.removeNewLine=function(t){t<this.getLength()-1&&0<=t&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},this.replace=function(t,e){return t instanceof n||(t=n.fromPoints(t.start,t.end)),e.length===0&&t.isEmpty()?t.start:e==this.getTextRange(t)?t.end:(this.remove(t),e?this.insert(t.start,e):t.start)},this.applyDeltas=function(t){for(var e=0;e<t.length;e++)this.applyDelta(t[e])},this.revertDeltas=function(t){for(var e=t.length-1;0<=e;e--)this.revertDelta(t[e])},this.applyDelta=function(t,e){var r=t.action=="insert";(r?t.lines.length<=1&&!t.lines[0]:!n.comparePoints(t.start,t.end))||(r&&2e4<t.lines.length?this.$splitAndapplyLargeDelta(t,2e4):(c(this.$lines,t,e),this._signal("change",t)))},this.$safeApplyDelta=function(t){var e=this.$lines.length;(t.action=="remove"&&t.start.row<e&&t.end.row<e||t.action=="insert"&&t.start.row<=e)&&this.applyDelta(t)},this.$splitAndapplyLargeDelta=function(t,e){for(var r=t.lines,a=r.length-e+1,o=t.start.row,l=t.start.column,d=0,y=0;d<a;d=y){y+=e-1;var I=r.slice(d,y);I.push(""),this.applyDelta({start:this.pos(o+d,l),end:this.pos(o+y,l=0),action:t.action,lines:I},!0)}t.lines=r.slice(d),t.start.row=o+d,t.start.column=l,this.applyDelta(t,!0)},this.revertDelta=function(t){this.$safeApplyDelta({start:this.clonePos(t.start),end:this.clonePos(t.end),action:t.action=="insert"?"remove":"insert",lines:t.lines.slice()})},this.indexToPosition=function(t,e){for(var r=this.$lines||this.getAllLines(),a=this.getNewLineCharacter().length,o=e||0,l=r.length;o<l;o++)if((t-=r[o].length+a)<0)return{row:o,column:t+r[o].length+a};return{row:l-1,column:t+r[l-1].length+a}},this.positionToIndex=function(t,e){for(var r=this.$lines||this.getAllLines(),a=this.getNewLineCharacter().length,o=0,l=Math.min(t.row,r.length),d=e||0;d<l;++d)o+=r[d].length+a;return o+t.column}}).call(S.prototype),m.Document=S}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(C,m,A){function S(s,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=s;var i=this;this.$worker=function(){if(i.running){for(var t=new Date,e=i.currentLine,r=-1,a=i.doc,o=e;i.lines[e];)e++;var l=a.getLength(),d=0;for(i.running=!1;e<l;){for(i.$tokenizeRow(e),r=e;e++,i.lines[e];);if(++d%5==0&&20<new Date-t){i.running=setTimeout(i.$worker,20);break}}i.currentLine=e,o<=(r=r==-1?e:r)&&i.fireUpdateEvent(o,r)}}}var p=C("./lib/oop"),c=C("./lib/event_emitter").EventEmitter;(function(){p.implement(this,c),this.setTokenizer=function(s){this.tokenizer=s,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(s){this.doc=s,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(s,n){this._signal("update",{data:{first:s,last:n}})},this.start=function(s){this.currentLine=Math.min(s||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)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(s){var n=s.start.row,i=s.end.row-n;i==0?this.lines[n]=null:s.action=="remove"?(this.lines.splice(n,1+i,null),this.states.splice(n,1+i,null)):((s=Array(1+i)).unshift(n,1),this.lines.splice.apply(this.lines,s),this.states.splice.apply(this.states,s)),this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(s){return this.lines[s]||this.$tokenizeRow(s)},this.getState=function(s){return this.currentLine==s&&this.$tokenizeRow(s),this.states[s]||"start"},this.$tokenizeRow=function(s){var i=this.doc.getLine(s),n=this.states[s-1],i=this.tokenizer.getLineTokens(i,n,s);return this.states[s]+""!=i.state+""?(this.states[s]=i.state,this.lines[s+1]=null,this.currentLine>s+1&&(this.currentLine=s+1)):this.currentLine==s&&(this.currentLine=s+1),this.lines[s]=i.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(S.prototype),m.BackgroundTokenizer=S}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(C,m,A){function S(s,n,i){this.setRegexp(s),this.clazz=n,this.type=i||"text"}var p=C("./lib/lang"),c=(C("./lib/oop"),C("./range").Range);(function(){this.MAX_RANGES=500,this.setRegexp=function(s){this.regExp+""!=s+""&&(this.regExp=s,this.cache=[])},this.update=function(s,n,i,t){if(this.regExp)for(var e=t.firstRow,r=t.lastRow,a={},o=e;o<=r;o++){var l=this.cache[o];l==null&&(l=(l=(l=p.getMatchOffsets(i.getLine(o),this.regExp)).length>this.MAX_RANGES?l.slice(0,this.MAX_RANGES):l).map(function(h){return new c(o,h.offset,o,h.offset+h.length)}),this.cache[o]=l.length?l:"");for(var d=l.length;d--;){var y=l[d].toScreenRange(i),I=y.toString();a[I]||(a[I]=!0,n.drawSingleLineMarker(s,y,this.clazz,t))}}}}).call(S.prototype),m.SearchHighlight=S}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(C,m,A){var S=C("../range").Range;function p(c,s){this.foldData=c,Array.isArray(s)?this.folds=s:s=this.folds=[s],c=s[s.length-1],this.range=new S(s[0].start.row,s[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(n){n.setFoldLine(this)},this)}(function(){this.shiftRow=function(c){this.start.row+=c,this.end.row+=c,this.folds.forEach(function(s){s.start.row+=c,s.end.row+=c})},this.addFold=function(c){if(c.sameRow){if(c.start.row<this.startRow||c.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(c),this.folds.sort(function(s,n){return-s.range.compareEnd(n.start.row,n.start.column)}),0<this.range.compareEnd(c.start.row,c.start.column)?(this.end.row=c.end.row,this.end.column=c.end.column):this.range.compareStart(c.end.row,c.end.column)<0&&(this.start.row=c.start.row,this.start.column=c.start.column)}else if(c.start.row==this.end.row)this.folds.push(c),this.end.row=c.end.row,this.end.column=c.end.column;else{if(c.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(c),this.start.row=c.start.row,this.start.column=c.start.column}c.foldLine=this},this.containsRow=function(c){return c>=this.start.row&&c<=this.end.row},this.walk=function(c,s,n){var i,t,e=0,r=this.folds,a=!0;s==null&&(s=this.end.row,n=this.end.column);for(var o=0;o<r.length;o++){if((t=(i=r[o]).range.compareStart(s,n))==-1)return void c(null,s,n,e,a);if(!c(null,i.start.row,i.start.column,e,a)&&c(i.placeholder,i.start.row,i.start.column,e)||t===0)return;a=!i.sameRow,e=i.end.column}c(null,s,n,e,a)},this.getNextFoldTo=function(c,s){for(var n,i,t=0;t<this.folds.length;t++){if((i=(n=this.folds[t]).range.compareEnd(c,s))==-1)return{fold:n,kind:"after"};if(i===0)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(c,s,n){var i,t=this.getNextFoldTo(c,s);if(t){if(i=t.fold,t.kind=="inside"&&i.start.column!=s&&i.start.row!=c)window.console&&window.console.log(c,s,i);else if(i.start.row==c){var e,r=(e=this.folds).indexOf(i);for(r===0&&(this.start.column+=n);r<e.length;r++){if((i=e[r]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},this.split=function(t,s){var n,i,t=this.getNextFoldTo(t,s);return t&&t.kind!="inside"?(s=t.fold,t=this.folds,n=this.foldData,s=t.indexOf(s),i=t[s-1],this.end.row=i.end.row,this.end.column=i.end.column,i=new p(n,t=t.splice(s,t.length-s)),n.splice(n.indexOf(this)+1,0,i),i):null},this.merge=function(c){for(var s=c.folds,n=0;n<s.length;n++)this.addFold(s[n]);var i=this.foldData;i.splice(i.indexOf(c),1)},this.toString=function(){var c=[this.range.toString()+": ["];return this.folds.forEach(function(s){c.push(" "+s.toString())}),c.push("]"),c.join(`
|
|
`)},this.idxToPosition=function(c){for(var s=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((c-=i.start.column-s)<0)return{row:i.start.row,column:i.start.column+c};if((c-=i.placeholder.length)<0)return i.start;s=i.end.column}return{row:this.end.row,column:this.end.column+c}}}).call(p.prototype),m.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(C,m,A){function S(){this.ranges=[],this.$bias=1}var p=C("./range").Range.comparePoints;(function(){this.comparePoints=p,this.pointIndex=function(c,s,n){for(var i=this.ranges,t=n||0;t<i.length;t++){var e=i[t],r=p(c,e.end);if(!(0<r))return e=p(c,e.start),r===0?s&&e!==0?-t-2:t:0<e||e===0&&!s?t:-t-1}return-t-1},this.add=function(c){var n=!c.isEmpty(),s=this.pointIndex(c.start,n),n=this.pointIndex(c.end,n,s=s<0?-s-1:s);return n<0?n=-n-1:n++,this.ranges.splice(s,n-s,c)},this.addList=function(c){for(var s=[],n=c.length;n--;)s.push.apply(s,this.add(c[n]));return s},this.substractPoint=function(c){if(c=this.pointIndex(c),0<=c)return this.ranges.splice(c,1)},this.merge=function(){for(var c=[],s=this.ranges,n=(s=s.sort(function(r,a){return p(r.start,a.start)}))[0],i=1;i<s.length;i++){var t=n,n=s[i],e=p(t.end,n.start);e<0||(e!=0||t.isEmpty()||n.isEmpty())&&(p(t.end,n.end)<0&&(t.end.row=n.end.row,t.end.column=n.end.column),s.splice(i,1),c.push(n),n=t,i--)}return this.ranges=s,c},this.contains=function(c,s){return 0<=this.pointIndex({row:c,column:s})},this.containsPoint=function(c){return 0<=this.pointIndex(c)},this.rangeAtPoint=function(c){if(c=this.pointIndex(c),0<=c)return this.ranges[c]},this.clipRows=function(c,s){var n=this.ranges;if(n[0].start.row>s||n[n.length-1].start.row<c)return[];for(var c=this.pointIndex({row:c,column:0}),i=this.pointIndex({row:s,column:0},c=c<0?-c-1:c),t=(i<0&&(i=-i-1),[]),e=c;e<i;e++)t.push(n[e]);return t},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(c){for(var s=c.start,n=c.end,i=s.row,t=n.row,e=this.ranges,r=0,a=e.length;r<a&&!((d=e[r]).end.row>=i);r++);if(c.action=="insert")for(var o=t-i,l=-s.column+n.column;r<a&&!((d=e[r]).start.row>i);r++)d.start.row==i&&d.start.column>=s.column&&(d.start.column==s.column&&this.$bias<=0||(d.start.column+=l,d.start.row+=o)),d.end.row==i&&d.end.column>=s.column&&(d.end.column==s.column&&this.$bias<0||(d.end.column==s.column&&0<l&&r<a-1&&d.end.column>d.start.column&&d.end.column==e[r+1].start.column&&(d.end.column-=l),d.end.column+=l,d.end.row+=o));else for(var d,o=i-t,l=s.column-n.column;r<a&&!((d=e[r]).start.row>t);r++)d.end.row<t&&(i<d.end.row||i==d.end.row&&s.column<d.end.column)?(d.end.row=i,d.end.column=s.column):d.end.row==t?d.end.column<=n.column?(o||d.end.column>s.column)&&(d.end.column=s.column,d.end.row=s.row):(d.end.column+=l,d.end.row+=o):d.end.row>t&&(d.end.row+=o),d.start.row<t&&(i<d.start.row||i==d.start.row&&s.column<d.start.column)?(d.start.row=i,d.start.column=s.column):d.start.row==t?d.start.column<=n.column?(o||d.start.column>s.column)&&(d.start.column=s.column,d.start.row=s.row):(d.start.column+=l,d.start.row+=o):d.start.row>t&&(d.start.row+=o);if(o!=0&&r<a)for(;r<a;r++)(d=e[r]).start.row+=o,d.end.row+=o}}).call(S.prototype),m.RangeList=S}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],function(p,m,A){var S=p("../range_list").RangeList,p=p("../lib/oop"),c=m.Fold=function(i,t){this.foldLine=null,this.placeholder=t,this.range=i,this.start=i.start,this.end=i.end,this.sameRow=i.start.row==i.end.row,this.subFolds=this.ranges=[]};function s(i,t){i.row-=t.row,i.row==0&&(i.column-=t.column)}function n(i,t){i.row==0&&(i.column+=t.column),i.row+=t.row}p.inherits(c,S),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(t){t.setFoldLine(i)})},this.clone=function(){var i=this.range.clone(),t=new c(i,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(i){if(!this.range.isEqual(i)){o=i,l=this.start,s(o.start,l),s(o.end,l);for(var t=i.start.row,e=i.start.column,r=0,a=-1;r<this.subFolds.length&&(a=this.subFolds[r].range.compare(t,e))==1;r++);var o=this.subFolds[r],l=0;if(a==0){if(o.range.containsRange(i))return o.addSubFold(i);l=1}for(var t=i.range.end.row,e=i.range.end.column,d=r,a=-1;d<this.subFolds.length&&(a=this.subFolds[d].range.compare(t,e))==1;d++);a==0&&d++;for(var y=this.subFolds.splice(r,d-r,i),I=a==0?y.length-1:y.length,h=l;h<I;h++)i.addSubFold(y[h]);return i.setFoldLine(this.foldLine),i}},this.restoreRange=function(i){return i=i,t=this.start,n(i.start,t),void n(i.end,t);var t}}.call(c.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(C,m,A){var S=C("../range").Range,p=C("./fold_line").FoldLine,c=C("./fold").Fold,s=C("../token_iterator").TokenIterator;m.Folding=function(){this.getFoldAt=function(n,i,t){var e=this.getFoldLine(n);if(!e)return null;for(var r=e.folds,a=0;a<r.length;a++){var o=r[a].range;if(o.contains(n,i)&&(t!=1||!o.isEnd(n,i)||o.isEmpty())&&(t!=-1||!o.isStart(n,i)||o.isEmpty()))return r[a]}},this.getFoldsInRange=function(n){var i=n.start,t=n.end,e=this.$foldData,r=[];i.column+=1,--t.column;for(var a=0;a<e.length;a++){var o=e[a].range.compareRange(n);if(o!=2){if(o==-2)break;for(var l=e[a].folds,d=0;d<l.length;d++){var y=l[d];if((o=y.range.compareRange(n))==-2)break;if(o!=2){if(o==42)break;r.push(y)}}}}return--i.column,t.column+=1,r},this.getFoldsInRangeList=function(n){var i;return Array.isArray(n)?(i=[],n.forEach(function(t){i=i.concat(this.getFoldsInRange(t))},this)):i=this.getFoldsInRange(n),i},this.getAllFolds=function(){for(var n=[],i=this.$foldData,t=0;t<i.length;t++)for(var e=0;e<i[t].folds.length;e++)n.push(i[t].folds[e]);return n},this.getFoldStringAt=function(n,i,t,e){if(!(e=e||this.getFoldLine(n)))return null;for(var r,a={end:{column:0}},o=0;o<e.folds.length;o++){var l,d=(l=e.folds[o]).range.compareEnd(n,i);if(d==-1){r=this.getLine(l.start.row).substring(a.end.column,l.start.column);break}if(d===0)return null;a=l}return r=r||this.getLine(l.start.row).substring(a.end.column),t==-1?r.substring(0,i-a.end.column):t==1?r.substring(i-a.end.column):r},this.getFoldLine=function(n,i){var t=this.$foldData,e=0;for((e=i?t.indexOf(i):e)==-1&&(e=0);e<t.length;e++){var r=t[e];if(r.start.row<=n&&r.end.row>=n)return r;if(r.end.row>n)return null}return null},this.getNextFoldLine=function(n,i){var t=this.$foldData,e=0;for((e=i?t.indexOf(i):e)==-1&&(e=0);e<t.length;e++){var r=t[e];if(r.end.row>=n)return r}return null},this.getFoldedRowCount=function(n,i){for(var t=this.$foldData,e=i-n+1,r=0;r<t.length;r++){var o=t[r],a=o.end.row,o=o.start.row;if(i<=a){o<i&&(n<=o?e-=i-o:e=0);break}n<=a&&(e-=n<=o?a-o:a-n+1)}return e},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort(function(i,t){return i.start.row-t.start.row}),n},this.addFold=function(o,d){var t,e=this.$foldData,r=!1,a=(o instanceof c?t=o:(t=new c(d,o)).collapseChildren=d.collapseChildren,this.$clipRangeToDocument(t.range),t.start.row),o=t.start.column,l=t.end.row,d=t.end.column,y=this.getFoldAt(a,o,1),I=this.getFoldAt(l,d,-1);if(y&&I==y)return y.addSubFold(t);y&&!y.range.isStart(a,o)&&this.removeFold(y),I&&!I.range.isEnd(l,d)&&this.removeFold(I),o=this.getFoldsInRange(t.range),0<o.length&&(this.removeFolds(o),t.collapseChildren||o.forEach(function(w){t.addSubFold(w)}));for(var h=0;h<e.length;h++){var u=e[h];if(l==u.start.row){u.addFold(t),r=!0;break}if(a==u.end.row){if(u.addFold(t),r=!0,!t.sameRow){var b=e[h+1];if(b&&b.start.row==l){u.merge(b);break}}break}if(l<=u.start.row)break}return r||(u=this.$addFoldLine(new p(this.$foldData,t))),this.$useWrapMode?this.$updateWrapData(u.start.row,u.start.row):this.$updateRowLengthCache(u.start.row,u.start.row),this.$modified=!0,this._signal("changeFold",{data:t,action:"add"}),t},this.addFolds=function(n){n.forEach(function(i){this.addFold(i)},this)},this.removeFold=function(n){var i=n.foldLine,t=i.start.row,e=i.end.row,r=this.$foldData,a=i.folds;a.length==1?r.splice(r.indexOf(i),1):i.range.isEnd(n.end.row,n.end.column)?(a.pop(),i.end.row=a[a.length-1].end.row,i.end.column=a[a.length-1].end.column):i.range.isStart(n.start.row,n.start.column)?(a.shift(),i.start.row=a[0].start.row,i.start.column=a[0].start.column):n.sameRow?a.splice(a.indexOf(n),1):((a=(r=i.split(n.start.row,n.start.column)).folds).shift(),r.start.row=a[0].start.row,r.start.column=a[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:n,action:"remove"})},this.removeFolds=function(n){for(var i=[],t=0;t<n.length;t++)i.push(n[t]);i.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(n){this.removeFold(n),n.subFolds.forEach(function(i){n.restoreRange(i),this.addFold(i)},this),0<n.collapseChildren&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1),n.subFolds=[]},this.expandFolds=function(n){n.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(n,i){var t;if(n==null)t=new S(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof n=="number")t=new S(n,0,n,this.getLine(n).length);else if("row"in n)t=S.fromPoints(n,n);else{if(Array.isArray(n))return e=[],n.forEach(function(r){e=e.concat(this.unfold(r))},this),e;t=n}for(var e,n=e=this.getFoldsInRangeList(t);e.length==1&&S.comparePoints(e[0].start,t.start)<0&&0<S.comparePoints(e[0].end,t.end);)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(i!=0?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(n,i){return!!this.getFoldLine(n,i)},this.getRowFoldEnd=function(n,i){return i=this.getFoldLine(n,i),i?i.end.row:n},this.getRowFoldStart=function(n,i){return i=this.getFoldLine(n,i),i?i.start.row:n},this.getFoldDisplayLine=function(n,i,t,e,r){e==null&&(e=n.start.row),r==null&&(r=0),i==null&&(i=n.end.row),t==null&&(t=this.getLine(i).length);var a=this.doc,o="";return n.walk(function(l,d,y,I){if(!(d<e)){if(d==e){if(y<r)return;I=Math.max(r,I)}o+=l!=null?l:a.getLine(d).substring(I,y)}},i,t),o},this.getDisplayLine=function(n,i,t,e){var r=this.getFoldLine(n);return r?this.getFoldDisplayLine(r,n,i,t,e):(r=this.doc.getLine(n)).substring(e||0,i||r.length)},this.$cloneFoldData=function(){var n=[];return n=this.$foldData.map(function(i){return i=i.folds.map(function(t){return t.clone()}),new p(n,i)})},this.toggleFold=function(n){var i=this.selection.getRange();if(i.isEmpty()){var t,e=i.start;if(t=this.getFoldAt(e.row,e.column))return void this.expandFold(t);(r=this.findMatchingBracket(e))?i.comparePoint(r)==1?i.end=r:(i.start=r,i.start.column++,i.end.column--):(r=this.findMatchingBracket({row:e.row,column:e.column+1}))?(i.comparePoint(r)==1?i.end=r:i.start=r,i.start.column++):i=this.getCommentFoldRange(e.row,e.column)||i}else{var r=this.getFoldsInRange(i);if(n&&r.length)return void this.expandFolds(r);r.length==1&&(t=r[0])}if((t=t||this.getFoldAt(i.start.row,i.start.column))&&t.range.toString()==i.toString())this.expandFold(t);else{if(e="...",!i.isMultiLine()){if((e=this.getTextRange(i)).length<4)return;e=e.trim().substring(0,2)+".."}this.addFold(e,i)}},this.getCommentFoldRange=function(n,i,t){var e=new s(this,n,i),r=e.getCurrentToken(),a=r&&r.type;if(r&&/^comment|string/.test(a)){(a=a.match(/comment|string/)[0])=="comment"&&(a+="|doc-start");var o=new RegExp(a),a=new S;if(t!=1){for(;(r=e.stepBackward())&&o.test(r.type););e.stepForward()}if(a.start.row=e.getCurrentTokenRow(),a.start.column=e.getCurrentTokenColumn()+2,e=new s(this,n,i),t!=-1){var l=-1;do if(r=e.stepForward(),l==-1){var d=this.getState(e.$row);o.test(d)||(l=e.$row)}else if(e.$row>l)break;while(r&&o.test(r.type));r=e.stepBackward()}else r=e.getCurrentToken();return a.end.row=e.getCurrentTokenRow(),a.end.column=e.getCurrentTokenColumn()+r.value.length-2,a}},this.foldAll=function(n,i,t,e){t==null&&(t=1e5);var r=this.foldWidgets;if(r){i=i||this.getLength();for(var a,o=n=n||0;o<i;o++)r[o]==null&&(r[o]=this.getFoldWidget(o)),r[o]!="start"||e&&!e(o)||(a=this.getFoldWidgetRange(o))&&a.isMultiLine()&&a.end.row<=i&&a.start.row>=n&&(o=a.end.row,a.collapseChildren=t,this.addFold("...",a))}},this.foldToLevel=function(n){for(this.foldAll();0<n--;)this.unfold(null,!1)},this.foldAllComments=function(){var n=this;this.foldAll(null,null,null,function(i){for(var t=n.getTokens(i),e=0;e<t.length;e++){var r=t[e];if(r.type!="text"||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(n){if(!this.$foldStyles[n])throw new Error("invalid fold style: "+n+"["+Object.keys(this.$foldStyles).join(", ")+"]");this.$foldStyle!=n&&((this.$foldStyle=n)=="manual"&&this.unfold(),n=this.$foldMode,this.$setFolding(null),this.$setFolding(n))},this.$setFolding=function(n){this.$foldMode!=n&&(this.$foldMode=n,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),n&&this.$foldStyle!="manual"?(this.foldWidgets=[],this.getFoldWidget=n.getFoldWidget.bind(n,this,this.$foldStyle),this.getFoldWidgetRange=n.getFoldWidgetRange.bind(n,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(n,i){var t=this.foldWidgets;if(!t||i&&t[n])return{};for(var e=n-1;0<=e;){var r=t[e];if((r=r==null?t[e]=this.getFoldWidget(e):r)=="start"){var a=this.getFoldWidgetRange(e),o=o||a;if(a&&a.end.row>=n)break}e--}return{range:e!==-1&&a,firstRange:o}},this.onFoldWidgetClick=function(n,i){var t={children:(i=i.domEvent).shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey};this.$toggleFoldWidget(n,t)||(n=i.target||i.srcElement)&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")},this.$toggleFoldWidget=function(n,i){var t,e,r,a;if(this.getFoldWidget)return t=this.getFoldWidget(n),e=this.getLine(n),(e=this.getFoldAt(n,(t=t==="end"?-1:1)==-1?0:e.length,t))?(i.children||i.all?this.removeFold(e):this.expandFold(e),e):(t=this.getFoldWidgetRange(n,!0))&&!t.isMultiLine()&&(e=this.getFoldAt(t.start.row,t.start.column,1))&&t.isEqual(e.range)?(this.removeFold(e),e):(i.siblings?((e=this.getParentFoldRangeData(n)).range&&(r=e.range.start.row+1,a=e.range.end.row),this.foldAll(r,a,i.all?1e4:0)):i.children?(a=t?t.end.row:this.getLength(),this.foldAll(n+1,a,i.all?1e4:0)):t&&(i.all&&(t.collapseChildren=1e4),this.addFold("...",t)),t)},this.toggleFoldWidget=function(n){var i,t=this.selection.getCursor().row;t=this.getRowFoldStart(t),this.$toggleFoldWidget(t,{})||(i=(i=this.getParentFoldRangeData(t,!0)).range||i.firstRange)&&(t=i.start.row,(t=this.getFoldAt(t,this.getLine(t).length,1))?this.removeFold(t):this.addFold("...",i))},this.updateFoldWidgets=function(n){var i=n.start.row,t=n.end.row-i;t==0?this.foldWidgets[i]=null:n.action=="remove"?this.foldWidgets.splice(i,1+t,null):((n=Array(1+t)).unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,n))},this.tokenizerUpdateFoldWidgets=function(n){n=n.data,n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(C,m,A){var S=C("../token_iterator").TokenIterator,p=C("../range").Range;m.BracketMatch=function(){this.findMatchingBracket=function(c,s){return c.column!=0&&(s=s||this.getLine(c.row).charAt(c.column-1))!=""&&(s=s.match(/([\(\[\{])|([\)\]\}])/))?s[1]?this.$findClosingBracket(s[1],c):this.$findOpeningBracket(s[2],c):null},this.getBracketRange=function(c){var s,n,i=this.getLine(c.row),t=!0,e=i.charAt(c.column-1),r=e&&e.match(/([\(\[\{])|([\)\]\}])/);if(r||(e=i.charAt(c.column),c={row:c.row,column:c.column+1},r=e&&e.match(/([\(\[\{])|([\)\]\}])/),t=!1),!r)return null;if(r[1]){if(!(n=this.$findClosingBracket(r[1],c)))return null;s=p.fromPoints(c,n),t||(s.end.column++,s.start.column--),s.cursor=s.end}else{if(!(n=this.$findOpeningBracket(r[2],c)))return null;s=p.fromPoints(n,c),t||(s.start.column++,s.end.column--),s.cursor=s.start}return s},this.getMatchingBracketRanges=function(c){var s=this.getLine(c.row),n=s.charAt(c.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);return i||(n=s.charAt(c.column),c={row:c.row,column:c.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),i?(s=new p(c.row,c.column-1,c.row,c.column),(n=i[1]?this.$findClosingBracket(i[1],c):this.$findOpeningBracket(i[2],c))?[s,new p(n.row,n.column,n.row,n.column+1)]:[s]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(c,s,n){var i=this.$brackets[c],t=1,e=new S(this,s.row,s.column),r=e.getCurrentToken();if(r=r||e.stepForward()){n=n||new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+");for(var a=s.column-e.getCurrentTokenColumn()-2,o=r.value;;){for(;0<=a;){var l=o.charAt(a);if(l==i){if(--t==0)return{row:e.getCurrentTokenRow(),column:a+e.getCurrentTokenColumn()}}else l==c&&(t+=1);--a}for(;(r=e.stepBackward())&&!n.test(r.type););if(r==null)break;a=(o=r.value).length-1}return null}},this.$findClosingBracket=function(c,s,n){var i=this.$brackets[c],t=1,e=new S(this,s.row,s.column),r=e.getCurrentToken();if(r=r||e.stepForward()){n=n||new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+");for(var a=s.column-e.getCurrentTokenColumn();;){for(var o=r.value,l=o.length;a<l;){var d=o.charAt(a);if(d==i){if(--t==0)return{row:e.getCurrentTokenRow(),column:a+e.getCurrentTokenColumn()}}else d==c&&(t+=1);a+=1}for(;(r=e.stepForward())&&!n.test(r.type););if(r==null)break;a=0}return null}}}}),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(C,m,A){function S(d,y){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++S.$uid,this.$foldData.toString=function(){return this.join(`
|
|
`)},this.bgTokenizer=new o(new e().getTokenizer(),this);var I=this;this.bgTokenizer.on("update",function(h){I._signal("tokenizerUpdate",h)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),typeof d=="object"&&d.getLine||(d=new a(d)),this.setDocument(d),this.selection=new t(this),this.$bidiHandler=new s(this),n.resetOptions(this),this.setMode(y),n._signal("session",this),this.destroyed=!1}var p=C("./lib/oop"),c=C("./lib/lang"),s=C("./bidihandler").BidiHandler,n=C("./config"),i=C("./lib/event_emitter").EventEmitter,t=C("./selection").Selection,e=C("./mode/text").Mode,r=C("./range").Range,a=C("./document").Document,o=C("./background_tokenizer").BackgroundTokenizer,l=C("./search_highlight").SearchHighlight;S.$uid=0,function(){p.implement(this,i),this.setDocument=function(h){this.doc&&this.doc.off("change",this.$onChange),(this.doc=h).on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(h){var u;h?(u=this.$docRowCache.length,(h=this.$getRowCacheIndex(this.$docRowCache,h)+1)<u&&(this.$docRowCache.splice(h,u),this.$screenRowCache.splice(h,u))):(this.$docRowCache=[],this.$screenRowCache=[])},this.$getRowCacheIndex=function(h,u){for(var b=0,w=h.length-1;b<=w;){var v=b+w>>1,R=h[v];if(R<u)b=1+v;else{if(!(u<R))return v;w=v-1}}return b-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},this.onChangeFold=function(h){h=h.data,this.$resetRowCache(h.start.row)},this.onChange=function(h){this.$modified=!0,this.$bidiHandler.onChange(h),this.$resetRowCache(h.start.row);var u=this.$updateInternalDataOnChange(h);!this.$fromUndo&&this.$undoManager&&(u&&u.length&&(this.$undoManager.add({action:"removeFolds",folds:u},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(h,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(h),this._signal("change",h)},this.setValue=function(h){this.doc.setValue(h),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(h){return this.bgTokenizer.getState(h)},this.getTokens=function(h){return this.bgTokenizer.getTokens(h)},this.getTokenAt=function(h,u){var b=this.bgTokenizer.getTokens(h),v=0;if(u==null)var w=b.length-1,v=this.getLine(h).length;else for(w=0;w<b.length&&!(u<=(v+=b[w].value.length));w++);return(h=b[w])?(h.index=w,h.start=v-h.value.length,h):null},this.setUndoManager=function(h){var u;this.$undoManager=h,this.$informUndoManager&&this.$informUndoManager.cancel(),h?(h.addSession(u=this),this.$syncInformUndoManager=function(){u.$informUndoManager.cancel(),u.mergeUndoDeltas=!1},this.$informUndoManager=c.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?c.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(h){this.setOption("useSoftTabs",h)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(h){this.setOption("tabSize",h)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(h){return this.$useSoftTabs&&h.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(h){this.setOption("navigateWithinSoftTabs",h)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(h){this.setOption("overwrite",h)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(h,u){this.$decorations[h]||(this.$decorations[h]=""),this.$decorations[h]+=" "+u,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(h,u){this.$decorations[h]=(this.$decorations[h]||"").replace(" "+u,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(h){this.$breakpoints=[];for(var u=0;u<h.length;u++)this.$breakpoints[h[u]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(h,u){(u=u===void 0?"ace_breakpoint":u)?this.$breakpoints[h]=u:delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(h){delete this.$breakpoints[h],this._signal("changeBreakpoint",{})},this.addMarker=function(R,u,b,w){var v=this.$markerId++,R={range:R,type:b||"line",renderer:typeof b=="function"?b:null,clazz:u,inFront:!!w,id:v};return w?(this.$frontMarkers[v]=R,this._signal("changeFrontMarker")):(this.$backMarkers[v]=R,this._signal("changeBackMarker")),v},this.addDynamicMarker=function(h,u){var b;if(h.update)return b=this.$markerId++,h.id=b,h.inFront=!!u,u?(this.$frontMarkers[b]=h,this._signal("changeFrontMarker")):(this.$backMarkers[b]=h,this._signal("changeBackMarker")),h},this.removeMarker=function(h){var u=this.$frontMarkers[h]||this.$backMarkers[h];u&&(delete(u.inFront?this.$frontMarkers:this.$backMarkers)[h],this._signal(u.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(h){return h?this.$frontMarkers:this.$backMarkers},this.highlight=function(h){var u;this.$searchHighlight||(u=new l(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(u)),this.$searchHighlight.setRegexp(h)},this.highlightLines=function(h,u,b,w){return typeof u!="number"&&(b=u,u=h),b=b||"ace_step",h=new r(h,0,u,1/0),h.id=this.addMarker(h,b,"fullLine",w),h},this.setAnnotations=function(h){this.$annotations=h,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(h){h=h.match(/^.*?(\r?\n)/m),this.$autoNewLine=h?h[1]:`
|
|
`},this.getWordRange=function(h,u){var b,w=this.getLine(h),v=!1,R=(b=(v=(v=0<u?!!w.charAt(u-1).match(this.tokenRe):v)||!!w.charAt(u).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(w.slice(u-1,u+1))?/\s/:this.nonTokenRe,u);if(0<R){for(;0<=--R&&w.charAt(R).match(b););R++}for(var B=u;B<w.length&&w.charAt(B).match(b);)B++;return new r(h,R,h,B)},this.getAWordRange=function(h,u){for(var b=this.getWordRange(h,u),w=this.getLine(b.end.row);w.charAt(b.end.column).match(/[ \t]/);)b.end.column+=1;return b},this.setNewLineMode=function(h){this.doc.setNewLineMode(h)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(h){this.setOption("useWorker",h)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(h){var u=h.data;this.bgTokenizer.start(u.first),this._signal("tokenizerUpdate",h)},this.$modes=n.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(h,u){if(h&&typeof h=="object"){if(h.getTokenizer)return this.$onChangeMode(h);var b=h,w=b.path}else w=h||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new e),this.$modes[w]&&!b?(this.$onChangeMode(this.$modes[w]),u&&u()):(this.$modeId=w,n.loadModule(["mode",w],function(v){if(this.$modeId!==w)return u&&u();this.$modes[w]&&!b?this.$onChangeMode(this.$modes[w]):v&&v.Mode&&(v=new v.Mode(b),b||((this.$modes[w]=v).$id=w),this.$onChangeMode(v)),u&&u()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0))},this.$onChangeMode=function(h,u){var b,w,v;u||(this.$modeId=h.$id),this.$mode!==h&&(b=this.$mode,this.$mode=h,this.$stopWorker(),this.$useWorker&&this.$startWorker(),(w=h.getTokenizer()).on!==void 0&&(v=this.onReloadTokenizer.bind(this),w.on("update",v)),this.bgTokenizer.setTokenizer(w),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=h.tokenRe,this.nonTokenRe=h.nonTokenRe,u||(h.attachToSession&&h.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(h.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:b,mode:h})))},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(h){n.warn("Could not load worker",h),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(h){this.$scrollTop===h||isNaN(h)||(this.$scrollTop=h,this._signal("changeScrollTop",h))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(h){this.$scrollLeft===h||isNaN(h)||(this.$scrollLeft=h,this._signal("changeScrollLeft",h))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){var h;return this.lineWidgetsWidth!=null?this.lineWidgetsWidth:(h=0,this.lineWidgets.forEach(function(u){u&&u.screenWidth>h&&(h=u.screenWidth)}),this.lineWidgetWidth=h)},this.$computeWidth=function(h){if(this.$modified||h){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var u=this.doc.getAllLines(),b=this.$rowLengthCache,w=0,v=0,R=this.$foldData[v],B=R?R.start.row:1/0,E=u.length,T=0;T<E;T++){if(B<T){if(E<=(T=R.end.row+1))break;B=(R=this.$foldData[v++])?R.start.row:1/0}b[T]==null&&(b[T]=this.$getStringScreenWidth(u[T])[0]),b[T]>w&&(w=b[T])}this.screenWidth=w}},this.getLine=function(h){return this.doc.getLine(h)},this.getLines=function(h,u){return this.doc.getLines(h,u)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(h){return this.doc.getTextRange(h||this.selection.getRange())},this.insert=function(h,u){return this.doc.insert(h,u)},this.remove=function(h){return this.doc.remove(h)},this.removeFullLines=function(h,u){return this.doc.removeFullLines(h,u)},this.undoChanges=function(h,u){if(h.length){this.$fromUndo=!0;for(var b=h.length-1;b!=-1;b--){var w=h[b];w.action=="insert"||w.action=="remove"?this.doc.revertDelta(w):w.folds&&this.addFolds(w.folds)}!u&&this.$undoSelect&&(h.selectionBefore?this.selection.fromJSON(h.selectionBefore):this.selection.setRange(this.$getUndoSelection(h,!0))),this.$fromUndo=!1}},this.redoChanges=function(h,u){if(h.length){this.$fromUndo=!0;for(var b=0;b<h.length;b++){var w=h[b];w.action!="insert"&&w.action!="remove"||this.doc.$safeApplyDelta(w)}!u&&this.$undoSelect&&(h.selectionAfter?this.selection.fromJSON(h.selectionAfter):this.selection.setRange(this.$getUndoSelection(h,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(h){this.$undoSelect=h},this.$getUndoSelection=function(h,u){function b(E){return u?E.action!=="insert":E.action==="insert"}for(var w,v,R=0;R<h.length;R++){var B=h[R];B.start&&(w?b(B)?(v=B.start,w.compare(v.row,v.column)==-1&&w.setStart(v),v=B.end,w.compare(v.row,v.column)==1&&w.setEnd(v)):(v=B.start,w.compare(v.row,v.column)==-1&&(w=r.fromPoints(B.start,B.start))):w=b(B)?r.fromPoints(B.start,B.end):r.fromPoints(B.start,B.start))}return w},this.replace=function(h,u){return this.doc.replace(h,u)},this.moveText=function(h,T,b){var w,v,R,B=this.getTextRange(h),E=this.getFoldsInRange(h),T=r.fromPoints(T,T);return b||(this.remove(h),v=h.start.row-h.end.row,(R=v?-h.end.column:h.start.column-h.end.column)&&(T.start.row==h.end.row&&T.start.column>h.end.column&&(T.start.column+=R),T.end.row==h.end.row&&T.end.column>h.end.column&&(T.end.column+=R)),v&&T.start.row>=h.end.row&&(T.start.row+=v,T.end.row+=v)),T.end=this.insert(T.start,B),E.length&&(w=h.start,b=T.start,v=b.row-w.row,R=b.column-w.column,this.addFolds(E.map(function(G){return(G=G.clone()).start.row==w.row&&(G.start.column+=R),G.end.row==w.row&&(G.end.column+=R),G.start.row+=v,G.end.row+=v,G}))),T},this.indentRows=function(h,u,b){b=b.replace(/\t/g,this.getTabString());for(var w=h;w<=u;w++)this.doc.insertInLine({row:w,column:0},b)},this.outdentRows=function(h){for(var u=h.collapseRows(),b=new r(0,0,0,0),w=this.getTabSize(),v=u.start.row;v<=u.end.row;++v){var R=this.getLine(v);b.start.row=v,b.end.row=v;for(var B=0;B<w&&R.charAt(B)==" ";++B);B<w&&R.charAt(B)==" "?(b.start.column=B,b.end.column=B+1):(b.start.column=0,b.end.column=B),this.remove(b)}},this.$moveLines=function(h,u,R){if(h=this.getRowFoldStart(h),u=this.getRowFoldEnd(u),R<0){if((v=this.getRowFoldStart(h+R))<0)return 0;var w=v-h}else if(0<R){if((v=this.getRowFoldEnd(u+R))>this.doc.getLength()-1)return 0;w=v-u}else h=this.$clipRowToDocument(h),w=(u=this.$clipRowToDocument(u))-h+1;var v=new r(h,0,u,Number.MAX_VALUE),v=this.getFoldsInRange(v).map(function(B){return(B=B.clone()).start.row+=w,B.end.row+=w,B}),R=R==0?this.doc.getLines(h,u):this.doc.removeFullLines(h,u);return this.doc.insertFullLines(h+w,R),v.length&&this.addFolds(v),w},this.moveLinesUp=function(h,u){return this.$moveLines(h,u,-1)},this.moveLinesDown=function(h,u){return this.$moveLines(h,u,1)},this.duplicateLines=function(h,u){return this.$moveLines(h,u,0)},this.$clipRowToDocument=function(h){return Math.max(0,Math.min(h,this.doc.getLength()-1))},this.$clipColumnToRow=function(h,u){return u<0?0:Math.min(this.doc.getLine(h).length,u)},this.$clipPositionToDocument=function(h,u){var b;return u=Math.max(0,u),u=h<0?h=0:(b=this.doc.getLength())<=h?this.doc.getLine(h=b-1).length:Math.min(this.doc.getLine(h).length,u),{row:h,column:u}},this.$clipRangeToDocument=function(h){h.start.row<0?(h.start.row=0,h.start.column=0):h.start.column=this.$clipColumnToRow(h.start.row,h.start.column);var u=this.doc.getLength()-1;return h.end.row>u?(h.end.row=u,h.end.column=this.doc.getLine(u).length):h.end.column=this.$clipColumnToRow(h.end.row,h.end.column),h},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(h){h!=this.$useWrapMode&&(this.$useWrapMode=h,this.$modified=!0,this.$resetRowCache(0),h&&(h=this.getLength(),this.$wrapData=Array(h),this.$updateWrapData(0,h-1)),this._signal("changeWrapMode"))},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(h,u){this.$wrapLimitRange.min===h&&this.$wrapLimitRange.max===u||(this.$wrapLimitRange={min:h,max:u},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(h,w){var b=this.$wrapLimitRange,w=(b.max<0&&(b={min:w,max:w}),this.$constrainWrapLimit(h,b.min,b.max));return w!=this.$wrapLimit&&1<w&&(this.$wrapLimit=w,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(h,u,b){return u&&(h=Math.max(u,h)),h=b?Math.min(b,h):h},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(h){this.setWrapLimitRange(h,h)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(h){var u=this.$useWrapMode,b=h.action,w=h.start,v=h.end,R=w.row,B=v.row,E=B-R,T=null;if(this.$updating=!0,E!=0)if(b==="remove"){this[u?"$wrapData":"$rowLengthCache"].splice(R,E);var G=this.$foldData,T=this.getFoldsInRange(h);this.removeFolds(T);var F=0;for((Y=this.getFoldLine(v.row))&&(Y.addRemoveChars(v.row,v.column,w.column-v.column),Y.shiftRow(-E),(z=this.getFoldLine(R))&&z!==Y&&(z.merge(Y),Y=z),F=G.indexOf(Y)+1);F<G.length;F++)(Y=G[F]).start.row>=v.row&&Y.shiftRow(-E);B=R}else{var z=Array(E),K=(z.unshift(R,0),u?this.$wrapData:this.$rowLengthCache),G=(K.splice.apply(K,z),this.$foldData),F=0;for((Y=this.getFoldLine(R))&&((K=Y.range.compareInside(w.row,w.column))==0?(Y=Y.split(w.row,w.column))&&(Y.shiftRow(E),Y.addRemoveChars(B,0,v.column-w.column)):K==-1&&(Y.addRemoveChars(R,0,v.column-w.column),Y.shiftRow(E)),F=G.indexOf(Y)+1);F<G.length;F++)(Y=G[F]).start.row>=R&&Y.shiftRow(E)}else{var Y,E=Math.abs(h.start.column-h.end.column);b==="remove"&&(T=this.getFoldsInRange(h),this.removeFolds(T),E=-E),(Y=this.getFoldLine(R))&&Y.addRemoveChars(R,w.column,E)}return u&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,u?this.$updateWrapData(R,B):this.$updateRowLengthCache(R,B),T},this.$updateRowLengthCache=function(h,u,b){this.$rowLengthCache[h]=null,this.$rowLengthCache[u]=null},this.$updateWrapData=function(h,u){var b,w,v=this.doc.getAllLines(),R=this.getTabSize(),B=this.$wrapData,E=this.$wrapLimit,T=h;for(u=Math.min(u,v.length-1);T<=u;)(w=this.getFoldLine(T,w))?(b=[],w.walk(function(G,F,z,K){var Y;if(G!=null){(Y=this.$getDisplayTokens(G,b.length))[0]=d;for(var _=1;_<Y.length;_++)Y[_]=y}else Y=this.$getDisplayTokens(v[F].substring(K,z),b.length);b=b.concat(Y)}.bind(this),w.end.row,v[w.end.row].length+1),B[w.start.row]=this.$computeWrapSplits(b,E,R),T=w.end.row+1):(b=this.$getDisplayTokens(v[T]),B[T]=this.$computeWrapSplits(b,E,R),T++)};var d=3,y=4;function I(h){return!(h<4352)&&(4352<=h&&h<=4447||4515<=h&&h<=4519||4602<=h&&h<=4607||9001<=h&&h<=9002||11904<=h&&h<=11929||11931<=h&&h<=12019||12032<=h&&h<=12245||12272<=h&&h<=12283||12288<=h&&h<=12350||12353<=h&&h<=12438||12441<=h&&h<=12543||12549<=h&&h<=12589||12593<=h&&h<=12686||12688<=h&&h<=12730||12736<=h&&h<=12771||12784<=h&&h<=12830||12832<=h&&h<=12871||12880<=h&&h<=13054||13056<=h&&h<=19903||19968<=h&&h<=42124||42128<=h&&h<=42182||43360<=h&&h<=43388||44032<=h&&h<=55203||55216<=h&&h<=55238||55243<=h&&h<=55291||63744<=h&&h<=64255||65040<=h&&h<=65049||65072<=h&&h<=65106||65108<=h&&h<=65126||65128<=h&&h<=65131||65281<=h&&h<=65376||65504<=h&&h<=65510)}this.$computeWrapSplits=function(h,u,b){if(h.length==0)return[];var w=[],v=h.length,R=0,B=0,E=this.$wrapAsCode,T=this.$indentedSoftWrap,G=u<=Math.max(2*b,8)||T===!1?0:Math.floor(u/2);function F(_){for(var Z=_-R,W=R;W<_;W++){var f=h[W];f!==12&&f!==2||--Z}w.length||(z=function(){var k=0;if(G===0)return k;if(T)for(var $=0;$<h.length;$++){var M=h[$];if(M==10)k+=1;else if(M==11)k+=b;else if(M!=12)break}return E&&T!==!1&&(k+=b),Math.min(k,G)}(),w.indent=z),B+=Z,w.push(B),R=_}for(var z=0;u-z<v-R;){var K=R+u-z;if(10<=h[K-1]&&10<=h[K])F(K);else if(h[K]==d||h[K]==y){for(;K!=R-1&&h[K]!=d;K--);if(!(R<K)){for(K=R+u;K<h.length&&h[K]==y;K++);if(K==h.length)break}F(K)}else{for(var Y=Math.max(K-(u-(u>>2)),R-1);Y<K&&h[K]<d;)K--;if(E){for(;Y<K&&h[K]<d;)K--;for(;Y<K&&h[K]==9;)K--}else for(;Y<K&&h[K]<10;)K--;Y<K?F(++K):(h[K=R+u]==2&&K--,F(K-z))}}return w},this.$getDisplayTokens=function(h,u){var b,w=[];u=u||0;for(var v=0;v<h.length;v++){var R=h.charCodeAt(v);if(R==9){b=this.getScreenTabSize(w.length+u),w.push(11);for(var B=1;B<b;B++)w.push(12)}else R==32?w.push(10):39<R&&R<48||57<R&&R<64?w.push(9):4352<=R&&I(R)?w.push(1,2):w.push(1)}return w},this.$getStringScreenWidth=function(h,u,b){if(u==0)return[0,0];var w,v;for(u==null&&(u=1/0),b=b||0,v=0;v<h.length&&((w=h.charCodeAt(v))==9?b+=this.getScreenTabSize(b):4352<=w&&I(w)?b+=2:b+=1,!(u<b));v++);return[b,v]},this.lineWidgets=null,this.getRowLength=function(h){var u=1;return this.lineWidgets&&(u+=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0),this.$useWrapMode&&this.$wrapData[h]?this.$wrapData[h].length+u:u},this.getRowLineCount=function(h){return this.$useWrapMode&&this.$wrapData[h]?this.$wrapData[h].length+1:1},this.getRowWrapIndent=function(h){var u;return this.$useWrapMode&&(h=this.screenToDocumentPosition(h,Number.MAX_VALUE),(u=this.$wrapData[h.row]).length&&u[0]<h.column)?u.indent:0},this.getScreenLastRowColumn=function(h){return h=this.screenToDocumentPosition(h,Number.MAX_VALUE),this.documentToScreenColumn(h.row,h.column)},this.getDocumentLastRowColumn=function(h,u){return h=this.documentToScreenRow(h,u),this.getScreenLastRowColumn(h)},this.getDocumentLastRowColumnPosition=function(h,u){return h=this.documentToScreenRow(h,u),this.screenToDocumentPosition(h,Number.MAX_VALUE/10)},this.getRowSplitData=function(h){if(this.$useWrapMode)return this.$wrapData[h]},this.getScreenTabSize=function(h){return this.$tabSize-(h%this.$tabSize|0)},this.screenToDocumentRow=function(h,u){return this.screenToDocumentPosition(h,u).row},this.screenToDocumentColumn=function(h,u){return this.screenToDocumentPosition(h,u).column},this.screenToDocumentPosition=function(h,u,b){if(h<0)return{row:0,column:0};for(var w,v,R,B=0,E=0,T=0,G=0,F=this.$screenRowCache,z=this.$getRowCacheIndex(F,h),K=F.length,Y=(R=K&&0<=z?(T=F[z],B=this.$docRowCache[z],h>F[K-1]):!K,this.getLength()-1),_=this.getNextFoldLine(B),Z=_?_.start.row:1/0;T<=h&&!(h<T+(G=this.getRowLength(B))||Y<=B);)T+=G,Z<++B&&(B=_.end.row+1,Z=(_=this.getNextFoldLine(B,_))?_.start.row:1/0),R&&(this.$docRowCache.push(B),this.$screenRowCache.push(T));if(_&&_.start.row<=B)w=this.getFoldDisplayLine(_),B=_.start.row;else{if(T+G<=h||Y<B)return{row:Y,column:this.getLine(Y).length};w=this.getLine(B),_=null}return z=0,F=Math.floor(h-T),this.$useWrapMode&&(K=this.$wrapData[B])&&(v=K[F],0<F&&K.length&&(z=K.indent,E=K[F-1]||K[K.length-1],w=w.substring(E))),b!==void 0&&this.$bidiHandler.isBidiRow(T+F,B,F)&&(u=this.$bidiHandler.offsetToCol(b)),E+=this.$getStringScreenWidth(w,u-z)[1],this.$useWrapMode&&v<=E&&(E=v-1),_?_.idxToPosition(E):{row:B,column:E}},this.documentToScreenPosition=function(h,u){var z=u===void 0?this.$clipPositionToDocument(h.row,h.column):this.$clipPositionToDocument(h,u),b=(h=z.row,u=z.column,0),z=null;(B=this.getFoldAt(h,u,1))&&(h=B.start.row,u=B.start.column);for(var w,v,R=0,B=this.$docRowCache,K=this.$getRowCacheIndex(B,h),E=B.length,T=(v=E&&0<=K?(R=B[K],b=this.$screenRowCache[K],h>B[E-1]):!E,this.getNextFoldLine(R)),G=T?T.start.row:1/0;R<h;){if(G<=R){if(h<(w=T.end.row+1))break;G=(T=this.getNextFoldLine(w,T))?T.start.row:1/0}else w=R+1;b+=this.getRowLength(R),R=w,v&&(this.$docRowCache.push(R),this.$screenRowCache.push(b))}var F="",z=T&&G<=R?(F=this.getFoldDisplayLine(T,h,u),T.start.row):(F=this.getLine(h).substring(0,u),h),K=0;if(this.$useWrapMode){var Y=this.$wrapData[z];if(Y){for(var _=0;F.length>=Y[_];)b++,_++;F=F.substring(Y[_-1]||0,F.length),K=0<_?Y.indent:0}}return this.lineWidgets&&this.lineWidgets[R]&&this.lineWidgets[R].rowsAbove&&(b+=this.lineWidgets[R].rowsAbove),{row:b,column:K+this.$getStringScreenWidth(F)[0]}},this.documentToScreenColumn=function(h,u){return this.documentToScreenPosition(h,u).column},this.documentToScreenRow=function(h,u){return this.documentToScreenPosition(h,u).row},this.getScreenLength=function(){var h=0,u=null;if(this.$useWrapMode)for(var b=this.$wrapData.length,w=0,v=0,R=(u=this.$foldData[v++])?u.start.row:1/0;w<b;){var B=this.$wrapData[w];h+=B?B.length+1:1,R<++w&&(w=u.end.row+1,R=(u=this.$foldData[v++])?u.start.row:1/0)}else for(var h=this.getLength(),E=this.$foldData,v=0;v<E.length;v++)h-=(u=E[v]).end.row-u.start.row;return this.lineWidgets&&(h+=this.$getWidgetScreenLength()),h},this.$setFontMetrics=function(h){this.$enableVarChar&&(this.$getStringScreenWidth=function(u,b,w){if(b===0)return[0,0];var v,R;for(b=b||1/0,w=w||0,R=0;R<u.length&&!(b<(w+=(v=u.charAt(R))===" "?this.getScreenTabSize(w):h.getCharacterWidth(v)));R++);return[w,R]})},this.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()},this.isFullWidth=I}.call(S.prototype),C("./edit_session/folding").Folding.call(S.prototype),C("./edit_session/bracket_match").BracketMatch.call(S.prototype),n.defineOptions(S.prototype,"session",{wrap:{set:function(d){d&&d!="off"?d=="free"?d=!0:d=="printMargin"?d=-1:typeof d=="string"&&(d=parseInt(d,10)||!1):d=!1,this.$wrap!=d&&((this.$wrap=d)?(this.setWrapLimitRange(d=typeof d=="number"?d:null,d),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(d){(d=d=="auto"?this.$mode.type!="text":d!="text")!=this.$wrapAsCode&&(this.$wrapAsCode=d,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(d){this.$useWorker=d,this.$stopWorker(),d&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(d){0<(d=parseInt(d))&&this.$tabSize!==d&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=d,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(d){this.setFoldStyle(d)},handlesSet:!0},overwrite:{set:function(d){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(d){this.doc.setNewLineMode(d)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(d){this.setMode(d)},get:function(){return this.$modeId},handlesSet:!0}}),m.EditSession=S}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(C,m,A){function S(){this.$options={}}var p=C("./lib/lang"),c=C("./lib/oop"),s=C("./range").Range;(function(){this.set=function(n){return c.mixin(this.$options,n),this},this.getOptions=function(){return p.copyObject(this.$options)},this.setOptions=function(n){this.$options=n},this.find=function(e){var i,t=this.$options,e=this.$matchIterator(e,t);return!!e&&(i=null,e.forEach(function(r,a,o,l){return i=new s(r,a,o,l),!(a==l&&t.start&&t.start.start&&t.skipCurrent!=0&&i.isEqual(t.start))||(i=null,!1)}),i)},this.findAll=function(n){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var t=i.range,e=t?n.getLines(t.start.row,t.end.row):n.doc.getAllLines(),r=[],a=i.re;if(i.$isMultiLine){var o,l=a.length,d=e.length-l;e:for(var y=a.offset||0;y<=d;y++){for(var I=0;I<l;I++)if(e[y+I].search(a[I])==-1)continue e;var h=e[y],u=e[y+l-1],h=h.length-h.match(a[0])[0].length,u=u.match(a[l-1])[0].length;o&&o.end.row===y&&o.end.column>h||(r.push(o=new s(y,h,y+l-1,u)),2<l&&(y=y+l-2))}}else for(var b=0;b<e.length;b++)for(var w=p.getMatchOffsets(e[b],a),I=0;I<w.length;I++){var v=w[I];r.push(new s(b,v.offset,b,v.offset+v.length))}if(t){for(var R=t.start.column,B=t.start.column,b=0,I=r.length-1;b<I&&r[b].start.column<R&&r[b].start.row==t.start.row;)b++;for(;b<I&&r[I].end.column>B&&r[I].end.row==t.end.row;)I--;for(r=r.slice(b,I+1),b=0,I=r.length;b<I;b++)r[b].start.row+=t.start.row,r[b].end.row+=t.start.row}return r},this.replace=function(n,i){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return i;if(e){var r=e.exec(n);if(!r||r[0].length!=n.length)return null;if(i=n.replace(e,i),t.preserveCase){i=i.split("");for(var a=Math.min(n.length,n.length);a--;){var o=n[a];o&&o.toLowerCase()!=o?i[a]=i[a].toUpperCase():i[a]=i[a].toLowerCase()}i=i.join("")}return i}},this.$assembleRegExp=function(n,i){if(n.needle instanceof RegExp)return n.re=n.needle;var t,e=n.needle;if(!n.needle)return n.re=!1;function r(l){return/\w/.test(l)||t.regExp?"\\b":""}n.regExp||(e=p.escapeRegExp(e)),n.wholeWord&&(t=n,e=r((a=e)[0])+a+r(a[a.length-1]));var a=n.caseSensitive?"gm":"gmi";if(n.$isMultiLine=!i&&/[\n\r]/.test(e),n.$isMultiLine)return n.re=this.$assembleMultilineRegExp(e,a);try{var o=new RegExp(e,a)}catch{o=!1}return n.re=o},this.$assembleMultilineRegExp=function(n,i){for(var t=n.replace(/\r\n|\r|\n/g,`$
|
|
^`).split(`
|
|
`),e=[],r=0;r<t.length;r++)try{e.push(new RegExp(t[r],i))}catch{return!1}return e},this.$matchIterator=function(n,i){var t,e,r,a,o,l,d,y,I=this.$assembleRegExp(i);return!!I&&(t=i.backwards==1,e=i.skipCurrent!=0,r=i.range,(a=(a=i.start)||(r?r[t?"end":"start"]:n.selection.getRange())).start&&(a=a[e!=t?"end":"start"]),o=r?r.start.row:0,l=r?r.end.row:n.getLength()-1,y=i.$isMultiLine?(d=I.length,function(h,u,b){var w=t?h-d+1:h;if(!(w<0||w+d>n.getLength())){var v=n.getLine(w),h=v.search(I[0]);if(!(!t&&h<u||h===-1)){for(var R=1;R<d;R++)if((v=n.getLine(w+R)).search(I[R])==-1)return;var B=v.match(I[d-1])[0].length;if(!(t&&u<B))return!!b(w,h,w+d-1,B)||void 0}}}):t?function(h,u,b){var w,v=n.getLine(h),R=[];for(I.lastIndex=0;w=I.exec(v);){var B=w[0].length,E=w.index;if(!B){if(E>=v.length)break;I.lastIndex=E+=1}if(w.index+B>u)break;R.push(w.index,B)}for(var T=R.length-1;0<=T;T-=2){var G=R[T-1];if(b(h,G,h,G+(B=R[T])))return!0}}:function(h,u,b){var w=n.getLine(h);for(I.lastIndex=u;v=I.exec(w);){var v,R=v[0].length;if(b(h,v=v.index,h,v+R))return!0;if(!R&&(I.lastIndex=v+=1,v>=w.length))return!1}},{forEach:t?function(h){var u=a.row;if(!y(u,a.column,h)){for(u--;o<=u;u--)if(y(u,Number.MAX_VALUE,h))return;if(i.wrap!=0){for(u=l,o=a.row;o<=u;u--)if(y(u,Number.MAX_VALUE,h))return}}}:function(h){var u=a.row;if(!y(u,a.column,h)){for(u+=1;u<=l;u++)if(y(u,0,h))return;if(i.wrap!=0){for(u=o,l=a.row;u<=l;u++)if(y(u,0,h))return}}}})}}).call(S.prototype),m.Search=S}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(C,m,A){var S=C("../lib/keys"),p=C("../lib/useragent"),c=S.KEY_MODS;function s(i,t){this.platform=t||(p.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=!0}function n(i,t){s.call(this,i,t),this.$singleCommand=!1}n.prototype=s.prototype,function(){function i(t){return typeof t=="object"&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),(this.commands[t.name]=t).bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t,e){var r,a=t&&(typeof t=="string"?t:t.name),o=(t=this.commands[a],e||delete this.commands[a],this.commandKeyBinding);for(r in o){var l,d=o[r];d==t?delete o[r]:Array.isArray(d)&&(l=d.indexOf(t))!=-1&&(d.splice(l,1),d.length==1&&(o[r]=d[0]))}},this.bindKey=function(t,e,r){if(typeof t=="object"&&t&&(r==null&&(r=t.position),t=t[this.platform]),t)return typeof e=="function"?this.addCommand({exec:e,bindKey:t,name:e.name||t}):void t.split("|").forEach(function(d){var o="",l=(d.indexOf(" ")!=-1&&(d=(l=d.split(/\s+/)).pop(),l.forEach(function(y){y=this.parseKeys(y),y=c[y.hashId]+y.key,o+=(o?" ":"")+y,this._addCommandToBinding(o,"chainKeys")},this),o+=" "),this.parseKeys(d)),d=c[l.hashId]+l.key;this._addCommandToBinding(o+d,e,r)},this)},this._addCommandToBinding=function(t,e,r){var a=this.commandKeyBinding;if(e)if(!a[t]||this.$singleCommand)a[t]=e;else{Array.isArray(a[t])?(l=a[t].indexOf(e))!=-1&&a[t].splice(l,1):a[t]=[a[t]],typeof r!="number"&&(r=i(e));for(var o=a[t],l=0;l<o.length&&!(r<i(o[l]));l++);o.splice(l,0,e)}else delete a[t]},this.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var r=t[e];if(r){if(typeof r=="string")return this.bindKey(r,e);typeof(r=typeof r=="function"?{exec:r}:r)=="object"&&(r.name||(r.name=e),this.addCommand(r))}},this)},this.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},this.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},this._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},this.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(y){return y}),r=e.pop(),a=S[r];if(S.FUNCTION_KEYS[a])r=S.FUNCTION_KEYS[a].toLowerCase();else{if(!e.length)return{key:r,hashId:-1};if(e.length==1&&e[0]=="shift")return{key:r.toUpperCase(),hashId:-1}}for(var o=0,l=e.length;l--;){var d=S.KEY_MODS[e[l]];if(d==null)return typeof console!="undefined"&&console.error("invalid modifier "+e[l]+" in "+t),!1;o|=d}return{key:r,hashId:o}},this.findKeyCommand=function(t,e){return t=c[t]+e,this.commandKeyBinding[t]},this.handleKeyboard=function(t,e,r,a){var o,l;if(!(a<0))return o=c[e]+r,l=this.commandKeyBinding[o],t.$keyChain&&(t.$keyChain+=" "+o,l=this.commandKeyBinding[t.$keyChain]||l),!l||l!="chainKeys"&&l[l.length-1]!="chainKeys"?(t.$keyChain&&(e&&e!=4||r.length!=1?(e==-1||0<a)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-o.length-1)),{command:l}):(t.$keyChain=t.$keyChain||o,{command:"null"})},this.getStatusText=function(t,e){return e.$keyChain||""}}.call(s.prototype),m.HashHandler=s,m.MultiHashHandler=n}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(C,m,A){function S(n,i){c.call(this,i,n),this.byName=this.commands,this.setDefaultHandler("exec",function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)})}var p=C("../lib/oop"),c=C("../keyboard/hash_handler").MultiHashHandler,s=C("../lib/event_emitter").EventEmitter;p.inherits(S,c),function(){p.implement(this,s),this.exec=function(n,i,t){if(Array.isArray(n)){for(var e=n.length;e--;)if(this.exec(n[e],i,t))return!0;return!1}var r;return!!(n=typeof n=="string"?this.commands[n]:n)&&!(i&&i.$readOnly&&!n.readOnly)&&!(this.$checkCommandState!=0&&n.isAvailable&&!n.isAvailable(i))&&((r={editor:i,command:n,args:t}).returnValue=this._emit("exec",r),this._signal("afterExec",r),r.returnValue!==!1)},this.toggleRecording=function(n){if(!this.$inReplay)return n&&n._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(i){this.macro.push([i.command,i.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(n){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,n):this.exec(i[0],n,i[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(n){return n.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i=i[1]?i:i[0]})}}.call(S.prototype),m.CommandManager=S}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(C,m,A){var S=C("../lib/lang"),p=C("../config"),c=C("../range").Range;function s(i,t){return{win:i,mac:t}}m.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(i){p.loadModule("ace/ext/settings_menu",function(t){t.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(i){p.loadModule("./ext/error_marker",function(t){t.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(i){p.loadModule("./ext/error_marker",function(t){t.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(i,t){typeof t!="number"||isNaN(t)||i.gotoLine(t),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(i){p.loadModule("ace/ext/searchbox",function(t){t.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(i){i.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(i,t){i.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(i){i.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(i){i.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(i,t){i.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(i,t){i.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(i,t){i.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var t=i.$copyWithEmptySelection&&i.selection.isEmpty()?i.selection.getLineRange():i.selection.getRange();i._emit("cut",t),t.isEmpty()||i.session.remove(t),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,t){i.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(i){p.loadModule("ace/ext/searchbox",function(t){t.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(i){if(!i.selection.isEmpty())return!1;i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(i){var t=i.selection.getRange();t.start.column=0,i.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(i){var t=i.selection.getRange();t.end.column=Number.MAX_VALUE,i.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,t){i.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,t){i.insert(S.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(i){i.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var t=i.selection.getRange();t.start.column=t.end.column=0,t.end.row++,i.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(i){for(var r=i.selection.isBackwards(),t=r?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),e=r?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),r=i.session.doc.getLine(t.row).length,a=i.session.doc.getTextRange(i.selection.getRange()).replace(/\n\s*/," ").length,o=i.session.doc.getLine(t.row),l=t.row+1;l<=e.row+1;l++){var d=S.stringTrimLeft(S.stringTrimRight(i.session.doc.getLine(l)));o+=d=d.length!==0?" "+d:d}e.row+1<i.session.doc.getLength()-1&&(o+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new c(t.row,0,e.row+2,0),o),0<a?(i.selection.moveCursorTo(t.row,t.column),i.selection.selectTo(t.row,t.column+a)):(r=i.session.doc.getLine(t.row).length>r?r+1:r,i.selection.moveCursorTo(t.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(i){var t=i.session.doc.getLength()-1,e=i.session.doc.getLine(t).length,r=i.selection.rangeList.ranges,a=[];r.length<1&&(r=[i.selection.getRange()]);for(var o=0;o<r.length;o++)o!=r.length-1||r[o].end.row===t&&r[o].end.column===e||a.push(new c(r[o].end.row,r[o].end.column,t,e)),o===0?r[o].start.row===0&&r[o].start.column===0||a.push(new c(0,0,r[o].start.row,r[o].start.column)):a.push(new c(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));for(i.exitMultiSelectMode(),i.clearSelection(),o=0;o<a.length;o++)i.selection.addRange(a[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
|
|
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var t=i.getCursorPosition();i.selection.moveTo(t.row-1,Number.MAX_VALUE),i.insert(`
|
|
`),t.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:s("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var n=1;n<9;n++)m.commands.push({name:"foldToLevel"+n,description:"Fold To Level "+n,level:n,exec:function(i){i.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),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/clipboard"],function(C,m,A){function S(v,R,B){this.$toDestroy=[];var E=v.getContainerElement();this.container=E,this.renderer=v,this.id="editor"+ ++S.$uid,this.commands=new y(n.isMac?"mac":"win",I),typeof document=="object"&&(this.textInput=new i(v.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new t(this),new e(this)),this.keyBinding=new r(this),this.$search=new o().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(T,G){G._$emitInputEvent.schedule(31)}),this.setSession(R||B&&B.session||new a("")),h.resetOptions(this),B&&this.setOptions(B),h._signal("editor",this)}var p=C("./lib/oop"),c=C("./lib/dom"),s=C("./lib/lang"),n=C("./lib/useragent"),i=C("./keyboard/textinput").TextInput,t=C("./mouse/mouse_handler").MouseHandler,e=C("./mouse/fold_handler").FoldHandler,r=C("./keyboard/keybinding").KeyBinding,a=C("./edit_session").EditSession,o=C("./search").Search,l=C("./range").Range,d=C("./lib/event_emitter").EventEmitter,y=C("./commands/command_manager").CommandManager,I=C("./commands/default_commands").commands,h=C("./config"),u=C("./token_iterator").TokenIterator,b=C("./clipboard"),w=(S.$uid=0,function(){p.implement(this,d),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.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)},this.curOp=null,this.prevOp={},this.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()},this.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,R=v&&v.scrollIntoView;if(R){switch(R){case"center-animate":R="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var B=this.selection.getRange(),E=this.renderer.layerConfig;(B.start.row>=E.lastRow||B.end.row<=E.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}R=="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}}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(v){var R,B,E,T;this.$mergeUndoDeltas&&(R=this.prevOp,B=this.$mergeableCommands,E=R.command&&v.command.name==R.command.name,v.command.name=="insertstring"?(T=v.args,this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),E=E&&this.mergeNextCommand&&(!/\s/.test(T)||/\s/.test(R.args)),this.mergeNextCommand=!0):E=E&&B.indexOf(v.command.name)!==-1,(E=this.$mergeUndoDeltas!="always"&&2e3<Date.now()-this.sequenceStartTime?!1:E)?this.session.mergeUndoDeltas=!0:B.indexOf(v.command.name)!==-1&&(this.sequenceStartTime=Date.now()))},this.setKeyboardHandler=function(v,R){var B;v&&typeof v=="string"&&v!="ace"?(this.$keybindingId=v,B=this,h.loadModule(["keybinding",v],function(E){B.$keybindingId==v&&B.keyBinding.setKeyboardHandler(E&&E.handler),R&&R()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(v),R&&R())},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(v){var R,B;this.session!=v&&(this.curOp&&this.endOperation(),this.curOp={},(R=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),(B=this.session.getSelection()).off("changeCursor",this.$onCursorChange),B.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:R}),this.curOp=null,R&&R._signal("changeEditor",{oldEditor:this}),v&&v._signal("changeEditor",{editor:this}),v&&!v.destroyed&&v.bgTokenizer.scheduleStart())},this.getSession=function(){return this.session},this.setValue=function(v,R){return this.session.doc.setValue(v),R?R==1?this.navigateFileEnd():R==-1&&this.navigateFileStart():this.selectAll(),v},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(v){this.renderer.onResize(v)},this.setTheme=function(v,R){this.renderer.setTheme(v,R)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(v){this.renderer.setStyle(v)},this.unsetStyle=function(v){this.renderer.unsetStyle(v)},this.getFontSize=function(){return this.getOption("fontSize")||c.computedStyle(this.container).fontSize},this.setFontSize=function(v){this.setOption("fontSize",v)},this.$highlightBrackets=function(){var v;this.$highlightPending||((v=this).$highlightPending=!0,setTimeout(function(){v.$highlightPending=!1;var R,B,E=v.session;E&&!E.destroyed&&(E.$bracketHighlight&&(E.$bracketHighlight.markerIds.forEach(function(T){E.removeMarker(T)}),E.$bracketHighlight=null),(R=!(R=E.getMatchingBracketRanges(v.getCursorPosition()))&&E.$mode.getMatching?E.$mode.getMatching(v.session):R)&&(B="ace_bracket",Array.isArray(R)?R.length==1&&(B="ace_error_bracket"):R=[R],R.length==2&&(l.comparePoints(R[0].end,R[1].start)==0?R=[l.fromPoints(R[0].start,R[1].end)]:l.comparePoints(R[0].start,R[1].end)==0&&(R=[l.fromPoints(R[1].start,R[0].end)])),E.$bracketHighlight={ranges:R,markerIds:R.map(function(T){return E.addMarker(T,B,"text")})}),v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide())},50))},this.$highlightTags=function(){var v;this.$highlightTagPending||((v=this).$highlightTagPending=!0,setTimeout(function(){v.$highlightTagPending=!1;var R=v.session;if(R&&!R.destroyed){var B=v.getCursorPosition(),E=new u(v.session,B.row,B.column),T=E.getCurrentToken();if(T&&/\b(?:tag-open|tag-name)/.test(T.type)){if(T.type.indexOf("tag-open")===-1||(T=E.stepForward())){var G,F=T.value,z=T.value,K=0,Y=E.stepBackward();if(Y.value==="<")for(;Y=T,(T=E.stepForward())&&(T.type.indexOf("tag-name")!==-1?F===(z=T.value)&&(Y.value==="<"?K++:Y.value==="</"&&K--):F===z&&T.value==="/>"&&K--),T&&0<=K;);else{do if(T=Y,Y=E.stepBackward(),T){if(T.type.indexOf("tag-name")!==-1)F===T.value&&(Y.value==="<"?K++:Y.value==="</"&&K--);else if(T.value==="/>"){for(var _=0,Z=Y;Z;){if(Z.type.indexOf("tag-name")!==-1&&Z.value===F){K--;break}if(Z.value==="<")break;Z=E.stepBackward(),_++}for(var W=0;W<_;W++)E.stepForward()}}while(Y&&K<=0);E.stepForward()}T?(B=E.getCurrentTokenRow(),G=E.getCurrentTokenColumn(),B=new l(B,G,B,G+T.value.length),G=R.$backMarkers[R.$tagHighlight],R.$tagHighlight&&G!=null&&B.compareRange(G.range)!==0&&(R.removeMarker(R.$tagHighlight),R.$tagHighlight=null),R.$tagHighlight||(R.$tagHighlight=R.addMarker(B,"ace_bracket","text"))):(R.removeMarker(R.$tagHighlight),R.$tagHighlight=null)}}else R.removeMarker(R.$tagHighlight),R.$tagHighlight=null}},50))},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(v){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",v))},this.onBlur=function(v){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",v))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(v){var R=this.session.$useWrapMode,B=v.start.row==v.end.row?v.end.row:1/0;this.renderer.updateLines(v.start.row,B,R),this._signal("change",v),this.$cursorChange()},this.onTokenizerUpdate=function(v){v=v.data,this.renderer.updateLines(v.first,v.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var v,R,B=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)),B.$highlightLineMarker&&!v?(B.removeMarker(B.$highlightLineMarker.id),B.$highlightLineMarker=null):!B.$highlightLineMarker&&v?((R=new l(v.row,v.column,v.row,1/0)).id=B.addMarker(R,"ace_active-line","screenLine"),B.$highlightLineMarker=R):v&&(B.$highlightLineMarker.start.row=v.row,B.$highlightLineMarker.end.row=v.row,B.$highlightLineMarker.start.column=v.column,B._signal("changeBackMarker"))},this.onSelectionChange=function(v){var R,B,E=this.session,E=(E.$selectionMarker&&E.removeMarker(E.$selectionMarker),E.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(R=this.selection.getRange(),B=this.getSelectionStyle(),E.$selectionMarker=E.addMarker(R,"ace_selection",B)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(E),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var v=this.session,R=this.getSelectionRange();if(!R.isEmpty()&&!R.isMultiLine()){var B=R.start.column,E=R.end.column,v=v.getLine(R.start.row),R=v.substring(B,E);if(!(5e3<R.length)&&/[\w\d]/.test(R)&&(R=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:R}),v=v.substring(B-1,E+1),R.test(v)))return R}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(v){this.renderer.updateText(),this._emit("changeMode",v)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var v=this.getSelectedText(),R=this.session.doc.getNewLineCharacter(),B=!1;if(!v&&this.$copyWithEmptySelection)for(var B=!0,E=this.selection.getAllRanges(),T=0;T<E.length;T++){var G=E[T];T&&E[T-1].start.row==G.start.row||(v+=this.session.getLine(G.start.row)+R)}var F={text:v};return this._signal("copy",F),b.lineMode=!!B&&F.text,F.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(v,R){this.commands.exec("paste",this,{text:v,event:R})},this.$handlePaste=function(B){this._signal("paste",B=typeof B=="string"?{text:B}:B);var R=B.text,B=R===b.lineMode,E=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?E.insert({row:this.selection.lead.row,column:0},R):this.insert(R);else if(B)this.selection.rangeList.ranges.forEach(function(K){E.insert({row:K.start.row,column:0},R)});else{var T=R.split(/\r\n|\r|\n/),G=this.selection.rangeList.ranges,B=!(T.length!=2||T[0]&&T[1]);if(T.length!=G.length||B)return this.commands.exec("insertstring",this,R);for(var F=G.length;F--;){var z=G[F];z.isEmpty()||E.remove(z),E.insert(z.start,T[F])}}},this.execCommand=function(v,R){return this.commands.exec(v,this,R)},this.insert=function(v,z){var B,E=this.session,T=E.getMode(),G=this.getCursorPosition(),F=(!this.getBehavioursEnabled()||z||(B=T.transformAction(E.getState(G.row),"insertion",this,E,v))&&(v===B.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),v=B.text),v==" "&&(v=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&v.indexOf(`
|
|
`)==-1&&((F=new l.fromPoints(G,G)).end.column+=v.length,this.session.remove(F)):(F=this.getSelectionRange(),G=this.session.remove(F),this.clearSelection()),v!=`
|
|
`&&v!=`\r
|
|
`||(K=E.getLine(G.row),G.column>K.search(/\S|$/)&&(z=K.substr(G.column).search(/\S|$/),E.doc.removeInLine(G.row,G.column,G.column+z))),this.clearSelection(),G.column),z=E.getState(G.row),K=E.getLine(G.row),Y=T.checkOutdent(z,K,v);E.insert(G,v),B&&B.selection&&(B.selection.length==2?this.selection.setSelectionRange(new l(G.row,F+B.selection[0],G.row,F+B.selection[1])):this.selection.setSelectionRange(new l(G.row+B.selection[0],B.selection[1],G.row+B.selection[2],B.selection[3]))),this.$enableAutoIndent&&(E.getDocument().isNewLine(v)&&(F=T.getNextLineIndent(z,K.slice(0,G.column),E.getTabString()),E.insert({row:G.row+1,column:0},F)),Y&&T.autoOutdent(z,E,G.row))},this.autoIndent=function(){for(var v,R,B,E,T,G=this.session,F=G.getMode(),z=(B=this.selection.isEmpty()?(R=0,G.doc.getLength()-1):(R=(v=this.getSelectionRange()).start.row,v.end.row),""),K="",Y=G.getTabString(),_=R;_<=B;_++)0<_&&(z=G.getState(_-1),E=G.getLine(_-1),K=F.getNextLineIndent(z,E,Y)),E=G.getLine(_),K!==(T=F.$getIndent(E))&&(0<T.length&&(T=new l(_,0,_,T.length),G.remove(T)),0<K.length&&G.insert({row:_,column:0},K)),F.autoOutdent(z,G,_)},this.onTextInput=function(v,R){if(!R)return this.keyBinding.onTextInput(v);this.startOperation({command:{name:"insertstring"}}),v=this.applyComposition.bind(this,v,R),this.selection.rangeCount?this.forEachSelection(v):v(),this.endOperation()},this.applyComposition=function(v,R){var B;(R.extendLeft||R.extendRight)&&((B=this.selection.getRange()).start.column-=R.extendLeft,B.end.column+=R.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),v||B.isEmpty()||this.remove()),!v&&this.selection.isEmpty()||this.insert(v,!0),(R.restoreStart||R.restoreEnd)&&((B=this.selection.getRange()).start.column-=R.restoreStart,B.end.column-=R.restoreEnd,this.selection.setRange(B))},this.onCommandKey=function(v,R,B){return this.keyBinding.onCommandKey(v,R,B)},this.setOverwrite=function(v){this.session.setOverwrite(v)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(v){this.setOption("scrollSpeed",v)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(v){this.setOption("dragDelay",v)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(v){this.setOption("selectionStyle",v)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(v){this.setOption("highlightActiveLine",v)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(v){this.setOption("highlightSelectedWord",v)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(v){this.renderer.setAnimatedScroll(v)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(v){this.renderer.setShowInvisibles(v)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(v){this.renderer.setDisplayIndentGuides(v)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(v){this.renderer.setHighlightIndentGuides(v)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(v){this.renderer.setShowPrintMargin(v)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(v){this.renderer.setPrintMarginColumn(v)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(v){this.setOption("readOnly",v)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(v){this.setOption("behavioursEnabled",v)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(v){this.setOption("wrapBehavioursEnabled",v)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(v){this.setOption("showFoldWidgets",v)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(T){this.selection.isEmpty()&&(T=="left"?this.selection.selectLeft():this.selection.selectRight());var R,B,E,T=this.getSelectionRange();this.getBehavioursEnabled()&&(B=(R=this.session).getState(T.start.row),B=R.getMode().transformAction(B,"deletion",this,R,T),T.end.column===0&&(E=R.getTextRange(T))[E.length-1]==`
|
|
`&&(E=R.getLine(T.end.row),/^\s+$/.test(E)&&(T.end.column=E.length)),B&&(T=B)),this.session.remove(T),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.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()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var v=this.getCursorPosition();this.insert(`
|
|
`),this.moveCursorToPosition(v)},this.transposeLetters=function(){var v,R,B,E;!this.selection.isEmpty()||(R=(v=this.getCursorPosition()).column)!==0&&(E=R<(E=this.session.getLine(v.row)).length?(B=E.charAt(R)+E.charAt(R-1),new l(v.row,R-1,v.row,R+1)):(B=E.charAt(R-1)+E.charAt(R-2),new l(v.row,R-2,v.row,R)),this.session.replace(E,B),this.session.selection.moveToPosition(E.end))},this.toLowerCase=function(){var v=this.getSelectionRange(),R=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),B=this.session.getTextRange(R);this.session.replace(R,B.toLowerCase()),this.selection.setSelectionRange(v)},this.toUpperCase=function(){var v=this.getSelectionRange(),R=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),B=this.session.getTextRange(R);this.session.replace(R,B.toUpperCase()),this.selection.setSelectionRange(v)},this.indent=function(){var v=this.session,R=this.getSelectionRange();if(!(R.start.row<R.end.row)){if(R.start.column<R.end.column){var B,G=v.getTextRange(R);if(!/^\s+$/.test(G))return B=this.$getSelectedRows(),void v.indentRows(B.first,B.last," ")}var E=v.getLine(R.start.row),G=R.start,T=v.getTabSize(),G=v.documentToScreenColumn(G.row,G.column);if(this.session.getUseSoftTabs())var F=T-G%T,z=s.stringRepeat(" ",F);else{for(F=G%T;E[R.start.column-1]==" "&&F;)R.start.column--,F--;this.selection.setSelectionRange(R),z=" "}return this.insert(z)}B=this.$getSelectedRows(),v.indentRows(B.first,B.last," ")},this.blockIndent=function(){var v=this.$getSelectedRows();this.session.indentRows(v.first,v.last," ")},this.blockOutdent=function(){var v=this.session.getSelection();this.session.outdentRows(v.getRange())},this.sortLines=function(){for(var v=this.$getSelectedRows(),R=this.session,B=[],E=v.first;E<=v.last;E++)B.push(R.getLine(E));B.sort(function(F,z){return F.toLowerCase()<z.toLowerCase()?-1:F.toLowerCase()>z.toLowerCase()?1:0});for(var T=new l(0,0,0,0),E=v.first;E<=v.last;E++){var G=R.getLine(E);T.start.row=E,T.end.row=E,T.end.column=G.length,R.replace(T,B[E-v.first])}},this.toggleCommentLines=function(){var v=this.session.getState(this.getCursorPosition().row),R=this.$getSelectedRows();this.session.getMode().toggleCommentLines(v,this.session,R.first,R.last)},this.toggleBlockComment=function(){var v=this.getCursorPosition(),R=this.session.getState(v.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(R,this.session,B,v)},this.getNumberAt=function(v,R){for(var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g,E=(B.lastIndex=0,this.session.getLine(v));B.lastIndex<R;){var T=B.exec(E);if(T.index<=R&&T.index+T[0].length>=R)return{value:T[0],start:T.index,end:T.index+T[0].length}}return null},this.modifyNumber=function(v){var R,B,E,T=this.selection.getCursor().row,G=this.selection.getCursor().column,F=new l(T,G-1,T,G),F=this.session.getTextRange(F);!isNaN(parseFloat(F))&&isFinite(F)?(F=this.getNumberAt(T,G))&&(E=0<=F.value.indexOf(".")?F.start+F.value.indexOf(".")+1:F.end,R=F.start+F.value.length-E,B=parseFloat(F.value),B*=Math.pow(10,R),E!==F.end&&G<E?v*=Math.pow(10,F.end-G-1):v*=Math.pow(10,F.end-G),E=(B=(B+=v)/Math.pow(10,R)).toFixed(R),v=new l(T,F.start,T,F.end),this.session.replace(v,E),this.moveCursorTo(T,Math.max(F.start+1,G+E.length-F.value.length))):this.toggleWord()},this.$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"],["&&","||"],["==","!="]],this.toggleWord=function(){for(var v,R=this.selection.getCursor().row,B=this.selection.getCursor().column,E=(this.selection.selectWord(),this.getSelectedText()),T=this.selection.getWordRange().start.column,G=E.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),F=B-T-1,z=(F<0&&(F=0),0),K=this,Y=(E.match(/[A-Za-z0-9_]+/)&&G.forEach(function($,M){v=z+$.length,z<=F&&F<=v&&(E=$,K.selection.clearSelection(),K.moveCursorTo(R,z+T),K.selection.selectTo(R,v+T)),z=v}),this.$toggleWordPairs),_=0;_<Y.length;_++)for(var Z=Y[_],W=0;W<=1;W++){var f=+!W,k=E.match(new RegExp("^\\s?_?("+s.escapeRegExp(Z[W])+")\\s?$","i"));k&&E.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(k[1])+")($|\\s)","g"))&&(k=E.replace(new RegExp(s.escapeRegExp(Z[W]),"i"),function($){var M=Z[f];return $.toUpperCase()==$?M=M.toUpperCase():$.charAt(0).toUpperCase()==$.charAt(0)&&(M=M.substr(0,0)+Z[f].charAt(0).toUpperCase()+M.substr(1)),M}),this.insert(k))}},this.removeLines=function(){var v=this.$getSelectedRows();this.session.removeFullLines(v.first,v.last),this.clearSelection()},this.duplicateSelection=function(){var v,R=this.selection,B=this.session,E=R.getRange(),T=R.isBackwards();E.isEmpty()?(v=E.start.row,B.duplicateLines(v,v)):(v=T?E.start:E.end,B=B.insert(v,B.getTextRange(E),!1),E.start=v,E.end=B,R.setSelectionRange(E,T))},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(v,R,B){return this.session.moveText(v,R,B)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(v,R){var B=this.selection;if(!B.inMultiSelectMode||this.inVirtualSelectionMode){var E=B.toOrientedRange(),T=this.$getSelectedRows(E),G=this.session.$moveLines(T.first,T.last,R?0:v);E.moveBy(G=R&&v==-1?0:G,0),B.fromOrientedRange(E)}else{for(var F=B.rangeList.ranges,z=(B.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),K=0,Y=F.length,_=0;_<Y;_++){for(var Z=_,W=(F[_].moveBy(z,0),(T=this.$getSelectedRows(F[_])).first),f=T.last;++_<Y;){K&&F[_].moveBy(K,0);var k=this.$getSelectedRows(F[_]);if(R&&k.first!=f||!R&&k.first>f+1)break;f=k.last}for(_--,z=this.session.$moveLines(W,f,R?0:v),R&&v==-1&&(Z=_+1);Z<=_;)F[Z].moveBy(z,0),Z++;K+=z=R?z:0}B.fromOrientedRange(B.ranges[0]),B.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(v){return v=(v||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(v.start.row),last:this.session.getRowFoldEnd(v.end.row)}},this.onCompositionStart=function(v){this.renderer.showComposition(v)},this.onCompositionUpdate=function(v){this.renderer.setCompositionText(v)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(v){return v>=this.getFirstVisibleRow()&&v<=this.getLastVisibleRow()},this.isRowFullyVisible=function(v){return v>=this.renderer.getFirstFullyVisibleRow()&&v<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(G,R){var B=this.renderer,E=this.renderer.layerConfig,T=G*Math.floor(E.height/E.lineHeight),G=(R===!0?this.selection.$moveSelection(function(){this.moveCursorBy(T,0)}):R===!1&&(this.selection.moveCursorBy(T,0),this.selection.clearSelection()),B.scrollTop);B.scrollBy(0,T*E.lineHeight),R!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(G)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(v){this.renderer.scrollToRow(v)},this.scrollToLine=function(v,R,B,E){this.renderer.scrollToLine(v,R,B,E)},this.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)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(v,R){this.selection.moveCursorTo(v,R)},this.moveCursorToPosition=function(v){this.selection.moveCursorToPosition(v)},this.jumpToMatching=function(v,R){var B=this.getCursorPosition(),E=new u(this.session,B.row,B.column),T=E.getCurrentToken(),G=T||E.stepForward();if(G){var F,z,K,Y=!1,_={},Z=B.column-G.start,W={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do if(G.value.match(/[{}()\[\]]/g)){for(;Z<G.value.length&&!Y;Z++)if(W[G.value[Z]])switch(z=W[G.value[Z]]+"."+G.type.replace("rparen","lparen"),isNaN(_[z])&&(_[z]=0),G.value[Z]){case"(":case"[":case"{":_[z]++;break;case")":case"]":case"}":_[z]--,_[z]===-1&&(F="bracket",Y=!0)}}else G.type.indexOf("tag-name")!==-1&&(isNaN(_[G.value])&&(_[G.value]=0),T.value==="<"?_[G.value]++:T.value==="</"&&_[G.value]--,_[G.value]===-1&&(F="tag",Y=!0));while(Y||(T=G,G=E.stepForward(),Z=0),G&&!Y);if(F){if(F==="bracket")(f=this.session.getBracketRange(B))||(K=(f=new l(E.getCurrentTokenRow(),E.getCurrentTokenColumn()+Z-1,E.getCurrentTokenRow(),E.getCurrentTokenColumn()+Z-1)).start,(R||K.row===B.row&&Math.abs(K.column-B.column)<2)&&(f=this.session.getBracketRange(K)));else if(F==="tag"){if(!G||G.type.indexOf("tag-name")===-1)return;var f,k=G.value;if((f=new l(E.getCurrentTokenRow(),E.getCurrentTokenColumn()-2,E.getCurrentTokenRow(),E.getCurrentTokenColumn()-2)).compare(B.row,B.column)===0)for(Y=!1;G=T,(T=E.stepBackward())&&(T.type.indexOf("tag-close")!==-1&&f.setEnd(E.getCurrentTokenRow(),E.getCurrentTokenColumn()+1),G.value===k&&G.type.indexOf("tag-name")!==-1&&(T.value==="<"?_[k]++:T.value==="</"&&_[k]--,_[k]===0&&(Y=!0))),T&&!Y;);G&&G.type.indexOf("tag-name")&&(K=f.start).row==B.row&&Math.abs(K.column-B.column)<2&&(K=f.end)}(K=f&&f.cursor||K)&&(v?f&&R?this.selection.setRange(f):f&&f.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(K.row,K.column):this.selection.moveTo(K.row,K.column))}}},this.gotoLine=function(v,R,B){this.selection.clearSelection(),this.session.unfold({row:v-1,column:R||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(v-1,R||0),this.isRowFullyVisible(v-1)||this.scrollToLine(v-1,!0,B)},this.navigateTo=function(v,R){this.selection.moveTo(v,R)},this.navigateUp=function(v){var R;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return R=this.selection.anchor.getPosition(),this.moveCursorToPosition(R);this.selection.clearSelection(),this.selection.moveCursorBy(-v||-1,0)},this.navigateDown=function(v){var R;if(this.selection.isMultiLine()&&this.selection.isBackwards())return R=this.selection.anchor.getPosition(),this.moveCursorToPosition(R);this.selection.clearSelection(),this.selection.moveCursorBy(v||1,0)},this.navigateLeft=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorLeft();else{var R=this.getSelectionRange().start;this.moveCursorToPosition(R)}this.clearSelection()},this.navigateRight=function(v){if(this.selection.isEmpty())for(v=v||1;v--;)this.selection.moveCursorRight();else{var R=this.getSelectionRange().end;this.moveCursorToPosition(R)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(v,B){B&&this.$search.set(B);var B=this.$search.find(this.session),E=0;return B&&(this.$tryReplace(B,v)&&(E=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),E},this.replaceAll=function(v,R){R&&this.$search.set(R);var B=this.$search.findAll(this.session),E=0;if(B.length){R=this.getSelectionRange(),this.selection.moveTo(0,0);for(var T=B.length-1;0<=T;--T)this.$tryReplace(B[T],v)&&E++;this.selection.setSelectionRange(R)}return E},this.$tryReplace=function(v,R){var B=this.session.getTextRange(v);return(R=this.$search.replace(B,R))!==null?(v.end=this.session.replace(v,R),v):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(T,R,B){R=R||{},typeof T=="string"||T instanceof RegExp?R.needle=T:typeof T=="object"&&p.mixin(R,T);var E=this.selection.getRange(),T=(R.needle==null&&((T=this.session.getTextRange(E)||this.$search.$options.needle)||(E=this.session.getWordRange(E.start.row,E.start.column),T=this.session.getTextRange(E)),this.$search.set({needle:T})),this.$search.set(R),R.start||this.$search.set({start:E}),this.$search.find(this.session));return R.preventScroll?T:T?(this.revealRange(T,B),T):(R.backwards?E.start=E.end:E.end=E.start,void this.selection.setRange(E))},this.findNext=function(v,R){this.find({skipCurrent:!0,backwards:!1},v,R)},this.findPrevious=function(v,R){this.find(v,{skipCurrent:!0,backwards:!0},R)},this.revealRange=function(v,R){this.session.unfold(v),this.selection.setSelectionRange(v);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(v.start,v.end,.5),R!==!1&&this.renderer.animateScrolling(B)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.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()},this.setAutoScrollEditorIntoView=function(v){var R,B,E,T,G,F,z;v&&(E=!1,(B=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(T=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(T,this.container.firstChild),G=this.on("changeSelection",function(){E=!0}),F=this.renderer.on("beforeRender",function(){E&&(R=B.renderer.container.getBoundingClientRect())}),z=this.renderer.on("afterRender",function(){var K,Y,_;E&&R&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())&&(K=(Y=B.renderer).$cursorLayer.$pixelPos,Y=Y.layerConfig,_=K.top-Y.offset,(E=0<=K.top&&_+R.top<0||!(K.top<Y.height&&K.top+R.top+Y.lineHeight>window.innerHeight)&&null)!=null&&(T.style.top=_+"px",T.style.left=K.left+"px",T.style.height=Y.lineHeight+"px",T.scrollIntoView(E)),E=R=null)}),this.setAutoScrollEditorIntoView=function(K){K||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",G),this.renderer.off("afterRender",z),this.renderer.off("beforeRender",F))})},this.$resetCursorStyle=function(){var v=this.$cursorStyle||"ace",R=this.renderer.$cursorLayer;R&&(R.setSmoothBlinking(/smooth/.test(v)),R.isBlinking=!this.$readOnly&&v!="wide",c.setCssClass(R.element,"ace_slim-cursors",/slim/.test(v)))},this.prompt=function(v,R,B){var E=this;h.loadModule("./ext/prompt",function(T){T.prompt(E,v,R,B)})}}.call(S.prototype),h.defineOptions(S.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?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(v){this.$showLineNumbers&&v?w.attach(this):w.detach(this)}},placeholder:{set:function(v){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var R=this.session&&(this.renderer.$composition||this.getValue());R&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),c.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):R||this.renderer.placeholderNode?!R&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),c.addCssClass(this.container,"ace_hasPlaceholder"),(R=c.createElement("div")).className="ace_placeholder",R.textContent=this.$placeholder||"",this.renderer.placeholderNode=R,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},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",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"}),{getText:function(v,R){return(Math.abs(v.selection.lead.row-R)||R+1+(R<9?"\xB7":""))+""},getWidth:function(v,R,B){return Math.max(R.toString().length,(B.lastRow+1).toString().length,2)*B.characterWidth},update:function(v,R){R.renderer.$loop.schedule(R.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=S}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(C,m,A){function S(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}(function(){this.addSession=function(o){this.$session=o},this.add=function(o,l,d){this.$fromUndo||o!=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),o.id=this.$rev=++this.$maxRev),o.action!="remove"&&o.action!="insert"||(this.$lastDelta=o),this.lastDeltas.push(o))},this.addSelection=function(o,l){this.selections.push({value:o,rev:l||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(o,l){l==null&&(l=this.$rev+1);for(var d=this.$undoStack,y=d.length;y--;){var I=d[y][0];if(I.id<=o)break;I.id<l&&(I.ignore=!0)}this.lastDeltas=null},this.getSelection=function(o,l){for(var d=this.selections,y=d.length;y--;){var I=d[y];if(I.rev<o)return I=l?d[y+1]:I}},this.getRevision=function(){return this.$rev},this.getDeltas=function(o,l){l==null&&(l=this.$rev+1);for(var d=this.$undoStack,y=null,I=0,h=d.length;h--;){var u=d[h][0];if(u.id<l&&!y&&(y=h+1),u.id<=o){I=h+1;break}}return d.slice(I,y)},this.getChangedRanges=function(o,l){l==null&&this.$rev},this.getChangedLines=function(o,l){l==null&&this.$rev},this.undo=function(o,l){this.lastDeltas=null;var d,y=this.$undoStack;if(function(I,h){for(var u=h;u--;){var b=I[u];if(b&&!b[0].ignore){for(;u<h-1;){var w=function(v,R){for(var B=v.length;B--;)for(var E=0;E<R.length;E++)if(!t(v[B],R[E])){for(;B<v.length;){for(;E--;)t(R[E],v[B]);E=R.length,B++}return[v,R]}return v.selectionBefore=R.selectionBefore=v.selectionAfter=R.selectionAfter=null,[R,v]}(I[u],I[u+1]);I[u]=w[0],I[u+1]=w[1],u++}return 1}}}(y,y.length))return o=o||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,d=null,(y=y.pop())&&(d=o.undoChanges(y,l),this.$redoStack.push(y),this.$syncRev()),this.$fromUndo=!1,d},this.redo=function(o,l){if(this.lastDeltas=null,o=o||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var T=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),d=this.$redoStack,y=T,I=0;I<y.length;I++)for(var h=y[I],u=0;u<h.length;u++){b=void 0,w=void 0,v=void 0,R=void 0,B=void 0,E=void 0;var b=d,w=h[u];w=function(z){return{start:s(z.start),end:s(z.end),action:z.action,lines:z.lines.slice()}}(w);for(var v=b.length;v--;){for(var R=b[v],B=0;B<R.length;B++){var E=function(z,K){var Y,_,Z=z.action=="insert",W=K.action=="insert";if(Z&&W)c(z.start,K.start)<0?e(K,z,1):e(z,K,1);else if(Z&&!W)0<=c(z.start,K.end)?e(z,K,-1):(c(z.start,K.start)<=0||e(z,p.fromPoints(K.start,z.start),-1),e(K,z,1));else if(!Z&&W)0<=c(K.start,z.end)?e(K,z,-1):(c(K.start,z.start)<=0||e(K,p.fromPoints(z.start,K.start),-1),e(z,K,1));else if(!Z&&!W)if(0<=c(K.start,z.end))e(K,z,-1);else{if(!(c(K.end,z.start)<=0))return c(z.start,K.start)<0&&(z=a(Y=z,K.start)),0<c(z.end,K.end)&&(_=a(z,K.end)),r(K.end,z.start,z.end,-1),_&&!Y&&(z.lines=_.lines,z.start=_.start,z.end=_.end,_=z),[K,Y,_].filter(Boolean);e(z,K,-1)}return[K,z]}(R[B],w);w=E[0],E.length!=2&&(E[2]?(R.splice(B+1,1,E[1],E[2]),B++):E[1]||(R.splice(B,1),B--))}R.length||b.splice(v,1)}}this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(F){F[0].id=++this.$maxRev},this)}var T=this.$redoStack.pop(),G=null;return T&&(G=o.redoChanges(T,l),this.$undoStack.push(T),this.$syncRev()),this.$fromUndo=!1,G},this.$syncRev=function(){var o=this.$undoStack,o=o[o.length-1],o=o&&o[0].id||0;this.$redoStackBaseRev=o,this.$rev=o},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return 0<this.$undoStack.length},this.canRedo=function(){return 0<this.$redoStack.length},this.bookmark=function(o){o==null&&(o=this.$rev),this.mark=o},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(o){return o?n(o):n(this.$undoStack)+`
|
|
---
|
|
`+n(this.$redoStack)}}).call(S.prototype);var p=C("./range").Range,c=p.comparePoints;p.comparePoints;function s(o){return{row:o.row,column:o.column}}function n(o){var l;return o=o||this,Array.isArray(o)?o.map(n).join(`
|
|
`):(l="",o.action?(l=o.action=="insert"?"+":"-",l+="["+o.lines+"]"):o.value&&(l=Array.isArray(o.value)?o.value.map(i).join(`
|
|
`):i(o.value)),o.start&&(l+=i(o)),(o.id||o.rev)&&(l+=" ("+(o.id||o.rev)+")"),l)}function i(o){return o.start.row+":"+o.start.column+"=>"+o.end.row+":"+o.end.column}function t(o,l){var d=o.action=="insert",y=l.action=="insert";if(d&&y)if(0<=c(l.start,o.end))e(l,o,-1);else{if(!(c(l.start,o.start)<=0))return;e(o,l,1)}else if(d&&!y)if(0<=c(l.start,o.end))e(l,o,-1);else{if(!(c(l.end,o.start)<=0))return;e(o,l,-1)}else if(!d&&y)if(0<=c(l.start,o.start))e(l,o,1);else{if(!(c(l.start,o.start)<=0))return;e(o,l,1)}else if(!d&&!y)if(0<=c(l.start,o.start))e(l,o,1);else{if(!(c(l.end,o.start)<=0))return;e(o,l,-1)}return 1}function e(o,l,d){r(o.start,l.start,l.end,d),r(o.end,l.start,l.end,d)}function r(o,l,d,y){o.row==(y==1?l:d).row&&(o.column+=y*(d.column-l.column)),o.row+=y*(d.row-l.row)}function a(o,l){var d=o.lines,y=o.end,h=(o.end=s(l),o.end.row-o.start.row),I=d.splice(h,d.length),h=h?l.column:l.column-o.start.column;return d.push(I[0].substring(0,h)),I[0]=I[0].substr(h),{start:s(l),end:y,lines:I,action:o.action}}m.UndoManager=S}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(C,m,A){function S(c,s){this.element=c,this.canvasHeight=s||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}var p=C("../lib/dom");(function(){this.moveContainer=function(c){p.translate(this.element,0,-(c.firstRowScreen*c.lineHeight%this.canvasHeight)-c.offset*this.$offsetCoefficient)},this.pageChanged=function(c,s){return Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)!==Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)},this.computeLineTop=function(c,s,n){var i=s.firstRowScreen*s.lineHeight,i=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(c,0)*s.lineHeight-i*this.canvasHeight},this.computeLineHeight=function(c,s,n){return s.lineHeight*n.getRowLineCount(c)},this.getLength=function(){return this.cells.length},this.get=function(c){return this.cells[c]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(c){if(Array.isArray(c)){this.cells.push.apply(this.cells,c);for(var s=p.createFragment(this.element),n=0;n<c.length;n++)s.appendChild(c[n].element);this.element.appendChild(s)}else this.cells.push(c),this.element.appendChild(c.element)},this.unshift=function(c){if(Array.isArray(c)){this.cells.unshift.apply(this.cells,c);for(var s=p.createFragment(this.element),n=0;n<c.length;n++)s.appendChild(c[n].element);this.element.firstChild?this.element.insertBefore(s,this.element.firstChild):this.element.appendChild(s)}else this.cells.unshift(c),this.element.insertAdjacentElement("afterbegin",c.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(c){c&&(c.element.remove(),this.cellCache.push(c))},this.createCell=function(c,s,n,i){var t,e=this.cellCache.pop();return e||(t=p.createElement("div"),i&&i(t),this.element.appendChild(t),e={element:t,text:"",row:c}),e.row=c,e}}).call(S.prototype),m.Lines=S}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],function(C,m,A){function S(e){this.element=p.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new i(this.element),this.$lines.$offsetCoefficient=1}var p=C("../lib/dom"),c=C("../lib/oop"),s=C("../lib/lang"),n=C("../lib/event_emitter").EventEmitter,i=C("./lines").Lines;function t(e){var r=document.createTextNode(""),r=(e.appendChild(r),p.createElement("span"));return e.appendChild(r),e}(function(){c.implement(this,n),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=e)&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,r){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,r)},this.removeGutterDecoration=function(e,r){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,r)},this.setAnnotations=function(e){this.$annotations=[];for(var r=0;r<e.length;r++){var l=e[r],o=l.row,a=(a=this.$annotations[o])||(this.$annotations[o]={text:[]}),o=(o=l.text)?s.escapeHTML(o):l.html||"",o=(a.text.indexOf(o)===-1&&a.text.push(o),l.type),l=l.className;l?a.className=l:o=="error"?a.className=" ace_error":o=="warning"&&a.className!=" ace_error"?a.className=" ace_warning":o!="info"||a.className||(a.className=" ace_info")}},this.$updateAnnotations=function(e){var r,a;this.$annotations.length&&(r=e.start.row,(a=e.end.row-r)!=0&&(e.action=="remove"?this.$annotations.splice(r,1+a,null):((e=new Array(1+a)).unshift(r,1),this.$annotations.splice.apply(this.$annotations,e))))},this.update=function(e){this.config=e;for(var r=this.session,a=e.firstRow,o=Math.min(e.lastRow+e.gutterOffset,r.getLength()-1),l=(this.oldLastRow=o,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow(),r.getNextFoldLine(a)),d=l?l.start.row:1/0,y=null,I=-1,h=a;;){if(d<h&&(h=l.end.row+1,d=(l=r.getNextFoldLine(h,l))?l.start.row:1/0),o<h){for(;this.$lines.getLength()>I+1;)this.$lines.pop();break}(y=this.$lines.get(++I))?y.row=h:(y=this.$lines.createCell(h,e,this.session,t),this.$lines.push(y)),this.$renderCell(y,e,l,h),h++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var r=this.session,l=r.gutterRenderer||this.$renderer,o=r.$firstLineNumber,a=this.$lines.last()?this.$lines.last().text:"",o=((this.$fixedWidth||r.$useWrapMode)&&(a=r.getLength()+o-1),l?l.getWidth(r,a,e):a.toString().length*e.characterWidth),l=this.$padding||this.$computePadding();(o+=l.left+l.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},this.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row&&(this.$cursorRow=e.row))},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var r=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<r.length;a++){var o=r[a];if(o.row>=this.$cursorRow){if(o.row>this.$cursorRow){var l=this.session.getFoldLine(this.$cursorRow);if(!(0<a&&l&&l.start.row==r[a-1].row))break;o=r[a-1]}o.element.className="ace_gutter-active-line "+o.element.className,this.$cursorCell=o;break}}}}},this.scrollLines=function(e){var r=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(r,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),o=this.oldLastRow;if(this.oldLastRow=a,!r||o<e.firstRow)return this.update(e);if(a<r.firstRow)return this.update(e);if(r.firstRow<e.firstRow)for(var l=this.session.getFoldedRowCount(r.firstRow,e.firstRow-1);0<l;l--)this.$lines.shift();if(a<o)for(l=this.session.getFoldedRowCount(a+1,o);0<l;l--)this.$lines.pop();e.firstRow<r.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,r.firstRow-1)),o<a&&this.$lines.push(this.$renderLines(e,o+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,r,a){for(var o=[],l=r,d=this.session.getNextFoldLine(l),y=d?d.start.row:1/0;y<l&&(l=d.end.row+1,y=(d=this.session.getNextFoldLine(l,d))?d.start.row:1/0),!(a<l);){var I=this.$lines.createCell(l,e,this.session,t);this.$renderCell(I,e,d,l),o.push(I),l++}return o},this.$renderCell=function(e,r,a,o){var l,d=e.element,y=this.session,I=d.childNodes[0],h=d.childNodes[1],u=y.$firstLineNumber,b=y.$breakpoints,E=y.$decorations,w=y.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&y.foldWidgets,R=a?a.start.row:Number.MAX_VALUE,B="ace_gutter-cell ",E=(this.$highlightGutterLine&&(o==this.$cursorRow||a&&o<this.$cursorRow&&R<=o&&this.$cursorRow<=a.end.row)&&(B+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),b[o]&&(B+=b[o]),E[o]&&(B+=E[o]),this.$annotations[o]&&(B+=this.$annotations[o].className),d.className!=B&&(d.className=B),!v||(l=v[o])==null&&(l=v[o]=y.getFoldWidget(o)),l?(B="ace_fold-widget ace_"+l,l=="start"&&o==R&&o<a.end.row?B+=" ace_closed":B+=" ace_open",h.className!=B&&(h.className=B),b=r.lineHeight+"px",p.setStyle(h.style,"height",b),p.setStyle(h.style,"display","inline-block")):h&&p.setStyle(h.style,"display","none"),(w?w.getText(y,o):o+u).toString());return E!==I.data&&(I.data=E),p.setStyle(e.element.style,"height",this.$lines.computeLineHeight(o,r,y)+"px"),p.setStyle(e.element.style,"top",this.$lines.computeLineTop(o,r,y)+"px"),e.text=E,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?p.addCssClass(this.element,"ace_folding-enabled"):p.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){var e;return this.element.firstChild?(e=p.computedStyle(this.element.firstChild),this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding):{left:0,right:0}},this.getRegion=function(e){var r=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();return e.x<r.left+a.left?"markers":this.$showFoldWidgets&&e.x>a.right-r.right?"foldWidgets":void 0}}).call(S.prototype),m.Gutter=S}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(C,m,A){function S(s){this.element=c.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}var p=C("../range").Range,c=C("../lib/dom");(function(){this.$padding=0,this.setPadding=function(s){this.$padding=s},this.setSession=function(s){this.session=s},this.setMarkers=function(s){this.markers=s},this.elt=function(s,n){var i=this.i!=-1&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=n,i.className=s},this.update=function(s){if(s){var n,i;for(i in this.config=s,this.i=0,this.markers){var t,e,r,a=this.markers[i];a.range?(r=a.range.clipRows(s.firstRow,s.lastRow)).isEmpty()||(r=r.toScreenRange(this.session),a.renderer?(t=this.$getTop(r.start.row,s),e=this.$padding+r.start.column*s.characterWidth,a.renderer(n,r,e,t,s)):a.type=="fullLine"?this.drawFullLineMarker(n,r,a.clazz,s):a.type=="screenLine"?this.drawScreenLineMarker(n,r,a.clazz,s):r.isMultiLine()?a.type=="text"?this.drawTextMarker(n,r,a.clazz,s):this.drawMultiLineMarker(n,r,a.clazz,s):this.drawSingleLineMarker(n,r,a.clazz+" ace_start ace_br15",s)):a.update(n,this,this.session,s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(s,n){return(s-n.firstRowScreen)*n.lineHeight},this.drawTextMarker=function(s,n,i,t,e){for(var r,a=this.session,o=n.start.row,l=n.end.row,d=o,y=0,I=a.getScreenLastRowColumn(d),h=new p(d,n.start.column,d,y);d<=l;d++)h.start.row=h.end.row=d,h.start.column=d==o?n.start.column:a.getRowWrapIndent(d),h.end.column=I,r=y,y=I,I=d+1<l?a.getScreenLastRowColumn(d+1):d==l?0:n.end.column,this.drawSingleLineMarker(s,h,i+(d==o?" ace_start":"")+" ace_br"+((d==o||d==o+1&&n.start.column?1:0)|(r<y?2:0)|(I<y?4:0)|(d==l?8:0)),t,d==l?0:1,e)},this.drawMultiLineMarker=function(s,n,i,t,e){var r,a=this.$padding,o=t.lineHeight,l=this.$getTop(n.start.row,t),d=a+n.start.column*t.characterWidth;e=e||"",this.session.$bidiHandler.isBidiRow(n.start.row)?((r=n.clone()).end.row=r.start.row,r.end.column=this.session.getLine(r.start.row).length,this.drawBidiSingleLineMarker(s,r,i+" ace_br1 ace_start",t,null,e)):this.elt(i+" ace_br1 ace_start","height:"+o+"px;right:0;top:"+l+"px;left:"+d+"px;"+(e||"")),this.session.$bidiHandler.isBidiRow(n.end.row)?((r=n.clone()).start.row=r.end.row,r.start.column=0,this.drawBidiSingleLineMarker(s,r,i+" ace_br12",t,null,e)):(l=this.$getTop(n.end.row,t),d=n.end.column*t.characterWidth,this.elt(i+" ace_br12","height:"+o+"px;width:"+d+"px;top:"+l+"px;left:"+a+"px;"+(e||""))),(o=(n.end.row-n.start.row-1)*t.lineHeight)<=0||(l=this.$getTop(n.start.row+1,t),s=(n.start.column?1:0)|(n.end.column?0:8),this.elt(i+(s?" ace_br"+s:""),"height:"+o+"px;right:0;top:"+l+"px;left:"+a+"px;"+(e||"")))},this.drawSingleLineMarker=function(a,d,i,t,o,r){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(a,d,i,t,o,r);var a=t.lineHeight,o=(d.end.column+(o||0)-d.start.column)*t.characterWidth,l=this.$getTop(d.start.row,t),d=this.$padding+d.start.column*t.characterWidth;this.elt(i,"height:"+a+"px;width:"+o+"px;top:"+l+"px;left:"+d+"px;"+(r||""))},this.drawBidiSingleLineMarker=function(s,n,i,t,e,r){var a=t.lineHeight,o=this.$getTop(n.start.row,t),l=this.$padding;this.session.$bidiHandler.getSelections(n.start.column,n.end.column).forEach(function(d){this.elt(i,"height:"+a+"px;width:"+d.width+(e||0)+"px;top:"+o+"px;left:"+(l+d.left)+"px;"+(r||""))},this)},this.drawFullLineMarker=function(s,n,i,t,e){var r=this.$getTop(n.start.row,t),a=t.lineHeight;n.start.row!=n.end.row&&(a+=this.$getTop(n.end.row,t)-r),this.elt(i,"height:"+a+"px;top:"+r+"px;left:0;right:0;"+(e||""))},this.drawScreenLineMarker=function(s,n,i,t,e){n=this.$getTop(n.start.row,t),t=t.lineHeight,this.elt(i,"height:"+t+"px;top:"+n+"px;left:0;right:0;"+(e||""))}}).call(S.prototype),m.Marker=S}),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,A){function S(t){this.dom=c,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new n(this.element)}var p=C("../lib/oop"),c=C("../lib/dom"),s=C("../lib/lang"),n=C("./lines").Lines,i=C("../lib/event_emitter").EventEmitter;(function(){p.implement(this,i),this.EOF_CHAR="\xB6",this.EOL_CHAR_LF="\xAC",this.EOL_CHAR_CRLF="\xA4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xB7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var t=this.session.doc,t=t.getNewLineCharacter()==`
|
|
`&&t.getNewLineMode()!="windows"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(t){(this.session=t)&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(t){return this.showInvisibles!=t&&(typeof(this.showInvisibles=t)=="string"?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(t){return this.$highlightIndentGuides!==t&&(this.$highlightIndentGuides=t)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){for(var t,e,r,a,o,l,d=this.session.getTabSize(),y=(this.tabSize=d,this.$tabStrings=[0]),I=1;I<d+1;I++)this.showTabs?((l=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",l.textContent=s.stringRepeat(this.TAB_CHAR,I),y.push(l)):y.push(this.dom.createTextNode(s.stringRepeat(" ",I),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,t="ace_indent-guide",e=this.showSpaces?" ace_invisible ace_invisible_space":"",r=this.showSpaces?s.stringRepeat(this.SPACE_CHAR,this.tabSize):s.stringRepeat(" ",this.tabSize),a=this.showTabs?" ace_invisible ace_invisible_tab":"",o=this.showTabs?s.stringRepeat(this.TAB_CHAR,this.tabSize):r,(l=this.dom.createElement("span")).className=t+e,l.textContent=r,this.$tabStrings[" "]=l,(l=this.dom.createElement("span")).className=t+a,l.textContent=o,this.$tabStrings[" "]=l)},this.updateLines=function(t,e,r){if(this.config.lastRow!=t.lastRow||this.config.firstRow!=t.firstRow)return this.update(t);this.config=t;for(var a=Math.max(e,t.firstRow),o=Math.min(r,t.lastRow),l=this.element.childNodes,d=0,y=t.firstRow;y<a;y++){if(I=this.session.getFoldLine(y)){if(I.containsRow(a)){a=I.start.row;break}y=I.end.row}d++}for(var I,h=!1,y=a,u=(I=this.session.getNextFoldLine(y))?I.start.row:1/0;u<y&&(y=I.end.row+1,u=(I=this.session.getNextFoldLine(y,I))?I.start.row:1/0),!(o<y);){var b,w=l[d++];w&&(this.dom.removeChildren(w),this.$renderLine(w,y,y==u&&I),h&&(w.style.top=this.$lines.computeLineTop(y,t,this.session)+"px"),b=t.lineHeight*this.session.getRowLength(y)+"px",w.style.height!=b&&(h=!0,w.style.height=b)),y++}if(h)for(;d<this.$lines.cells.length;){var v=this.$lines.cells[d++];v.element.style.top=this.$lines.computeLineTop(v.row,t,this.session)+"px"}},this.scrollLines=function(t){var e=this.config;if(this.config=t,this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var r=t.lastRow,a=e?e.lastRow:-1;if(!e||a<t.firstRow)return this.update(t);if(r<e.firstRow)return this.update(t);if(!e||e.lastRow<t.firstRow)return this.update(t);if(t.lastRow<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var o=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);0<o;o--)this.$lines.shift();if(e.lastRow>t.lastRow)for(o=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);0<o;o--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLinesFragment(t,t.firstRow,e.firstRow-1)),t.lastRow>e.lastRow&&this.$lines.push(this.$renderLinesFragment(t,e.lastRow+1,t.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(t,e,r){for(var a=[],o=e,l=this.session.getNextFoldLine(o),d=l?l.start.row:1/0;d<o&&(o=l.end.row+1,d=(l=this.session.getNextFoldLine(o,l))?l.start.row:1/0),!(r<o);){var y=this.$lines.createCell(o,t,this.session),I=y.element;this.dom.removeChildren(I),c.setStyle(I.style,"height",this.$lines.computeLineHeight(o,t,this.session)+"px"),c.setStyle(I.style,"top",this.$lines.computeLineTop(o,t,this.session)+"px"),this.$renderLine(I,o,o==d&&l),this.$useLineGroups()?I.className="ace_line_group":I.className="ace_line",a.push(y),o++}return a},this.update=function(t){this.$lines.moveContainer(t);for(var e=(this.config=t).firstRow,r=t.lastRow,a=this.$lines;a.getLength();)a.pop();a.push(this.$renderLinesFragment(t,e,r))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(t,e,r,a){for(var o,l,d=this,y=/(\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,I=this.dom.createFragment(this.element),h=0;o=y.exec(a);){var u,b,w=o[1],v=o[2],R=o[3],B=o[4],E=o[5];!d.showSpaces&&v||(u=h!=o.index?a.slice(h,o.index):"",h=o.index+o[0].length,u&&I.appendChild(this.dom.createTextNode(u,this.element)),w?(u=d.session.getScreenTabSize(e+o.index),I.appendChild(d.$tabStrings[u].cloneNode(!0)),e+=u-1):v?d.showSpaces?((b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",b.textContent=s.stringRepeat(d.SPACE_CHAR,v.length),I.appendChild(b)):I.appendChild(this.com.createTextNode(v,this.element)):R?((b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",b.textContent=s.stringRepeat(d.SPACE_CHAR,R.length),I.appendChild(b)):B?(e+=1,(b=this.dom.createElement("span")).style.width=2*d.config.characterWidth+"px",b.className=d.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=d.showSpaces?d.SPACE_CHAR:B,I.appendChild(b)):E&&(e+=1,(b=this.dom.createElement("span")).style.width=2*d.config.characterWidth+"px",b.className="ace_cjk",b.textContent=E,I.appendChild(b)))}return I.appendChild(this.dom.createTextNode(h?a.slice(h):a,this.element)),this.$textToken[r.type]?t.appendChild(I):(l="ace_"+r.type.replace(/\./g," ace_"),b=this.dom.createElement("span"),r.type=="fold"&&(b.style.width=r.value.length*this.config.characterWidth+"px"),b.className=l,b.appendChild(I),t.appendChild(b)),e+a.length},this.renderIndentGuide=function(t,e,r){var a=e.search(this.$indentGuideRe);if(!(a<=0||r<=a)){if(e[0]==" "){for(var o=(a-=a%this.tabSize)/this.tabSize,l=0;l<o;l++)t.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(a)}if(e[0]==" "){for(l=0;l<a;l++)t.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(a)}this.$highlightIndentGuide()}return e},this.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var t=this.session.doc.$lines,e=this.session.selection.getCursor(),r=/^\s*/.exec(this.session.doc.getLine(e.row))[0].length,a=Math.floor(r/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:a,start:e.row},this.session.$bracketHighlight){for(var o=this.session.$bracketHighlight.ranges,l=0;l<o.length;l++)if(e.row!==o[l].start.row){this.$highlightIndentGuideMarker.end=o[l].start.row,e.row>o[l].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&t[e.row]!==""&&e.column===t[e.row].length)for(this.$highlightIndentGuideMarker.dir=1,l=e.row+1;l<t.length;l++){var d=t[l],y=/^\s*/.exec(d)[0].length;if(d!==""&&(this.$highlightIndentGuideMarker.end=l,y<=r))break}this.$renderHighlightIndentGuide()}},this.$clearActiveIndentGuide=function(){for(var t=this.$lines.cells,e=0;e<t.length;e++){var r=t[e].element.childNodes;if(0<r.length){for(var a=0;a<r.length;a++)if(r[a].classList&&r[a].classList.contains("ace_indent-guide-active")){r[a].classList.remove("ace_indent-guide-active");break}}}},this.$setIndentGuideActive=function(t,e){this.session.doc.getLine(t.row)!==""&&(t=t.element.childNodes)&&t[e-1]&&t[e-1].classList&&t[e-1].classList.add("ace_indent-guide-active")},this.$renderHighlightIndentGuide=function(){if(this.$lines){var t=this.$lines.cells,e=(this.$clearActiveIndentGuide(),this.$highlightIndentGuideMarker.indentLevel);if(e!==0){if(this.$highlightIndentGuideMarker.dir===1)for(var r=0;r<t.length;r++){var a=t[r];if(this.$highlightIndentGuideMarker.end&&a.row>=this.$highlightIndentGuideMarker.start+1){if(a.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(a,e)}}else for(r=t.length-1;0<=r;r--)if(a=t[r],this.$highlightIndentGuideMarker.end&&a.row<this.$highlightIndentGuideMarker.start){if(a.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(a,e)}}}},this.$createLineElement=function(t){var e=this.dom.createElement("div");return e.className="ace_line",e.style.height=this.config.lineHeight+"px",e},this.$renderWrappedLine=function(t,e,r){var a=0,o=0,l=r[0],d=0,y=this.$createLineElement();t.appendChild(y);for(var I=0;I<e.length;I++){var h=e[I],u=h.value;if(I==0&&this.displayIndentGuides){if(a=u.length,!(u=this.renderIndentGuide(y,u,l)))continue;a-=u.length}if(a+u.length<l)d=this.$renderToken(y,d,h,u),a+=u.length;else{for(;a+u.length>=l;)d=this.$renderToken(y,d,h,u.substring(0,l-a)),u=u.substring(l-a),a=l,y=this.$createLineElement(),t.appendChild(y),y.appendChild(this.dom.createTextNode(s.stringRepeat("\xA0",r.indent),this.element)),d=0,l=r[++o]||Number.MAX_VALUE;u.length!=0&&(a+=u.length,d=this.$renderToken(y,d,h,u))}}r[r.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(y,d,null,"",!0)},this.$renderSimpleLine=function(t,e){for(var r=0,a=0;a<e.length;a++){var o=e[a],l=o.value;if(a!=0||!this.displayIndentGuides||(l=this.renderIndentGuide(t,l))){if(r+l.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,r,o,l);r=this.$renderToken(t,r,o,l)}}},this.$renderOverflowMessage=function(t,e,r,a,o){r&&this.$renderToken(t,e,r,a.slice(0,this.MAX_LINE_LENGTH-e)),r=this.dom.createElement("span"),r.className="ace_inline_button ace_keyword ace_toggle_wrap",r.textContent=o?"<hide>":"<click to see more...>",t.appendChild(r)},this.$renderLine=function(t,e,r){var a,o,l=t;(a=(r=r||r==0?r:this.session.getFoldLine(e))?this.$getFoldLineTokens(e,r):this.session.getTokens(e)).length?(o=this.session.getRowSplitData(e))&&o.length?(this.$renderWrappedLine(t,a,o),l=t.lastChild):(l=t,this.$useLineGroups()&&(l=this.$createLineElement(),t.appendChild(l)),this.$renderSimpleLine(l,a)):this.$useLineGroups()&&(l=this.$createLineElement(),t.appendChild(l)),this.showEOL&&l&&(r&&(e=r.end.row),(o=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",o.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,l.appendChild(o))},this.$getFoldLineTokens=function(t,e){var r=this.session,a=[],o=r.getTokens(t);return e.walk(function(l,d,y,I,h){if(l!=null)a.push({type:"fold",value:l});else if((o=h?r.getTokens(d):o).length){for(var u,b=o,w=I,v=y,R=0,B=0;B+b[R].value.length<w;)if(B+=b[R].value.length,++R==b.length)return;for(B!=w&&((u=b[R].value.substring(w-B)).length>v-w&&(u=u.substring(0,v-w)),a.push({type:b[R].type,value:u}),B=w+u.length,R+=1);B<v&&R<b.length;)(u=b[R].value).length+B>v?a.push({type:b[R].type,value:u.substring(0,v-B)}):a.push(b[R]),B+=u.length,R+=1}},e.end.row,this.session.getLine(e.end.row).length),a},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(S.prototype),m.Text=S}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(C,m,A){function S(c){this.element=p.createElement("div"),this.element.className="ace_layer ace_cursor-layer",c.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),p.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}var p=C("../lib/dom");(function(){this.$updateOpacity=function(c){for(var s=this.cursors,n=s.length;n--;)p.setStyle(s[n].style,"opacity",c?"":"0")},this.$startCssAnimation=function(){for(var c=this.cursors,s=c.length;s--;)c[s].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&p.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,p.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(c){this.$padding=c},this.setSession=function(c){this.session=c},this.setBlinking=function(c){c!=this.isBlinking&&(this.isBlinking=c,this.restartTimer())},this.setBlinkInterval=function(c){c!=this.blinkInterval&&(this.blinkInterval=c,this.restartTimer())},this.setSmoothBlinking=function(c){c!=this.smoothBlinking&&(this.smoothBlinking=c,p.setCssClass(this.element,"ace_smooth-blinking",c),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var c=p.createElement("div");return c.className="ace_cursor",this.element.appendChild(c),this.cursors.push(c),c},this.removeCursor=function(){var c;if(1<this.cursors.length)return(c=this.cursors.pop()).parentNode.removeChild(c),c},this.hideCursor=function(){this.isVisible=!1,p.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,p.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var c,s=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,p.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&p.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),p.HAS_CSS_ANIMATION?this.$startCssAnimation():(c=function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){s(!0),c()},this.blinkInterval),c())):this.$stopCssAnimation()},this.getPixelPosition=function(c,s){if(!this.config||!this.session)return{left:0,top:0};c=c||this.session.selection.getCursor();var n=this.session.documentToScreenPosition(c);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,c.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(s?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(c,s){return 0<=c.top&&c.top<s.maxHeight},this.update=function(c){this.config=c;for(var s=this.session.$selectionMarkers,i=0,n=0,i=0,t=(s=s!==void 0&&s.length!==0?s:[{cursor:null}]).length;i<t;i++){var e,r,a=this.getPixelPosition(s[i].cursor,!0);(a.top>c.height+c.offset||a.top<0)&&1<i||(r=(e=this.cursors[n++]||this.addCursor()).style,this.drawCursor?this.drawCursor(e,a,c,s[i],this.session):this.isCursorInView(a,c)?(p.setStyle(r,"display","block"),p.translate(e,a.left,a.top),p.setStyle(r,"width",Math.round(c.characterWidth)+"px"),p.setStyle(r,"height",c.lineHeight+"px")):p.setStyle(r,"display","none"))}for(;this.cursors.length>n;)this.removeCursor();var o=this.session.getOverwrite();this.$setOverwrite(o),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(c){c!=this.overwrite&&((this.overwrite=c)?p.addCssClass(this.element,"ace_overwrite-cursors"):p.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(S.prototype),m.Cursor=S}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(C,m,A){function S(e){this.element=n.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=n.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,i.addListener(this.element,"scroll",this.onScroll.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)}function p(e,r){S.call(this,e),this.scrollTop=0,this.scrollHeight=0,r.$scrollbarWidth=this.width=n.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0}function c(e,r){S.call(this,e),this.scrollLeft=0,this.height=r.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"}var s=C("./lib/oop"),n=C("./lib/dom"),i=C("./lib/event"),t=C("./lib/event_emitter").EventEmitter;(function(){s.implement(this,t),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(S.prototype),s.inherits(p,S),function(){this.classSuffix="-v",this.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,this.coeff!=1&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):this.coeff!=1&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(p.prototype),s.inherits(c,S),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),m.ScrollBar=p,m.ScrollBarV=p,m.ScrollBarH=c,m.VScrollBar=p,m.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(C,m,A){function S(c,s){this.onRender=c,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=s||window;var n=this;this._flush=function(i){n.pending=!1;var t=n.changes;t&&(p.blockIdle(100),n.changes=0,n.onRender(t)),n.changes?n.$recursionLimit--<0||n.schedule():n.$recursionLimit=2}}var p=C("./lib/event");(function(){this.schedule=function(c){this.changes=this.changes|c,this.changes&&!this.pending&&(p.nextFrame(this._flush),this.pending=!0)},this.clear=function(c){var s=this.changes;return this.changes=0,s}}).call(S.prototype),m.RenderLoop=S}),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(e,m,A){var S=e("../lib/oop"),p=e("../lib/dom"),c=e("../lib/lang"),s=e("../lib/event"),n=e("../lib/useragent"),i=e("../lib/event_emitter").EventEmitter,t=typeof ResizeObserver=="function",e=m.FontMetrics=function(r){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),r.appendChild(this.el),this.$measureNode.textContent=c.stringRepeat("X",256),this.$characterSize={width:0,height:0},t?this.$addObserver():this.checkForSizeChanges()};(function(){S.implement(this,i),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(r,a){r.width=r.height="auto",r.left=r.top="0px",r.visibility="hidden",r.position="absolute",r.whiteSpace="pre",n.isIE<8?r["font-family"]="inherit":r.font="inherit",r.overflow=a?"hidden":"visible"},this.checkForSizeChanges=function(r){var a;!(r=r===void 0?this.$measureSizes():r)||this.$characterSize.width===r.width&&this.$characterSize.height===r.height||(this.$measureNode.style.fontWeight="bold",a=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=r,this.charSizes=Object.create(null),this.allowBoldFonts=a&&a.width===r.width&&a.height===r.height,this._emit("changeCharacterSize",{data:r}))},this.$addObserver=function(){var r=this;this.$observer=new window.ResizeObserver(function(a){r.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){var r;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(r=this).$pollSizeChangesTimer=s.onIdle(function a(){r.checkForSizeChanges(),s.onIdle(a,500)},500)},this.setPolling=function(r){r?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(r){return r={height:(r||this.$measureNode).clientHeight,width:(r||this.$measureNode).clientWidth/256},r.width===0||r.height===0?null:r},this.$measureCharWidth=function(r){return this.$main.textContent=c.stringRepeat(r,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(r){var a=this.charSizes[r];return a=a===void 0?this.charSizes[r]=this.$measureCharWidth(r)/this.$characterSize.width:a},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function r(a){return a&&a.parentElement?(window.getComputedStyle(a).zoom||1)*r(a.parentElement):1},this.$initTransformMeasureNodes=function(){function r(a,o){return["div",{style:"position: absolute;top:"+a+"px;left:"+o+"px;"}]}this.els=p.buildDom([r(0,0),r(200,0),r(0,200),r(200,200)],this.el)},this.transformCoordinates=function(r,a){function o(R,B,E){var T=R[1]*B[0]-R[0]*B[1];return[(-B[1]*E[0]+B[0]*E[1])/T,(+R[1]*E[0]-R[0]*E[1])/T]}function l(R,B){return[R[0]-B[0],R[1]-B[1]]}function d(R,B){return[R[0]+B[0],R[1]+B[1]]}function y(R,B){return[R*B[0],R*B[1]]}function I(R){return R=R.getBoundingClientRect(),[R.left,R.top]}r=r&&y(1/this.$getZoom(this.el),r),this.els||this.$initTransformMeasureNodes();var h,u=I(this.els[0]),w=I(this.els[1]),v=I(this.els[2]),b=I(this.els[3]),b=o(l(b,w),l(b,v),l(d(w,v),d(b,u))),w=y(1+b[0],l(w,u)),v=y(1+b[1],l(v,u));return a?(h=b[0]*a[0]/200+b[1]*a[1]/200+1,a=d(y(a[0],w),y(a[1],v)),d(y(1/h/200,a),u)):(h=l(r,u),a=o(l(w,y(b[0],h)),l(v,y(b[1],h)),h),y(200,a))}}).call(e.prototype)}),ace.define("ace/css/editor.css",["require","exports","module"],function(C,m,A){A.exports=`/*
|
|
styles = []
|
|
for (var i = 1; i < 16; i++) {
|
|
styles.push(".ace_br" + i + "{" + (
|
|
["top-left", "top-right", "bottom-right", "bottom-left"]
|
|
).map(function(x, j) {
|
|
return i & (1<<j) ? "border-" + x + "-radius: 3px;" : ""
|
|
}).filter(Boolean).join(" ") + "}")
|
|
}
|
|
styles.join("\\n")
|
|
*/
|
|
.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', 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_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 {
|
|
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
}
|
|
|
|
.ace_gutter-cell {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding-left: 19px;
|
|
padding-right: 6px;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_error {
|
|
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 {
|
|
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-position: 2px center;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_info {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
background-position: 2px center;
|
|
}
|
|
.ace_dark .ace_gutter-cell.ace_info {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
}
|
|
|
|
.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 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;
|
|
will-change: transform;
|
|
}
|
|
.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: #FFF;
|
|
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
|
|
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_folding-enabled > .ace_gutter-cell {
|
|
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.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/lib/useragent"],function(C,m,A){function S(v,b){var w=this,v=(this.container=v||c.createElement("div"),c.addCssClass(this.container,"ace_editor"),c.HI_DPI&&c.addCssClass(this.container,"ace_hidpi"),this.setTheme(b),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=c.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=c.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=c.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new n(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content),this.$textLayer=new t(this.content));this.canvas=v.element,this.$markerFront=new i(this.content),this.$cursorLayer=new e(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new a(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.on("scroll",function(R){w.$scrollAnimation||w.session.setScrollTop(R.data-w.scrollMargin.top)}),this.scrollBarH.on("scroll",function(R){w.$scrollAnimation||w.session.setScrollLeft(R.data-w.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new l(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(R){w.updateCharacterSize(),w.onResize(!0,w.gutterWidth,w.$size.width,w.$size.height),w._signal("changeCharacterSize",R)}),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=!I.isIOS,this.$loop=new o(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)}var p=C("./lib/oop"),c=C("./lib/dom"),s=C("./config"),n=C("./layer/gutter").Gutter,i=C("./layer/marker").Marker,t=C("./layer/text").Text,e=C("./layer/cursor").Cursor,r=C("./scrollbar").HScrollBar,a=C("./scrollbar").VScrollBar,o=C("./renderloop").RenderLoop,l=C("./layer/font_metrics").FontMetrics,d=C("./lib/event_emitter").EventEmitter,y=C("./css/editor.css"),I=C("./lib/useragent"),h=I.isIE;c.importCssString(y,"ace_editor.css",!1),function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,p.implement(this,d),this.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(),c.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(u){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=u)&&this.scrollMargin.top&&u.getScrollTop()<=0&&u.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(u),this.$markerBack.setSession(u),this.$markerFront.setSession(u),this.$gutterLayer.setSession(u),this.$textLayer.setSession(u),u&&(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))},this.updateLines=function(u,b,w){if(b===void 0&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>u&&(this.$changedLines.firstRow=u),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:u,lastRow:b},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!w)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(u){u?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(u,b,w,v){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=u?1:0;var R=this.container,R=(v=v||R.clientHeight||R.scrollHeight,w=w||R.clientWidth||R.scrollWidth,this.$updateCachedSize(u,b,w,v));if(!this.$size.scrollerHeight||!w&&!v)return this.resizing=0;u&&(this.$gutterLayer.$padding=null),u?this.$renderChanges(R|this.$changes,!0):this.$loop.schedule(R|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(u,b,w,v){v-=this.$extraHeight||0;var R=0,B=this.$size,E={width:B.width,height:B.height,scrollerHeight:B.scrollerHeight,scrollerWidth:B.scrollerWidth};return v&&(u||B.height!=v)&&(B.height=v,R|=this.CHANGE_SIZE,B.scrollerHeight=B.height,this.$horizScroll&&(B.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",R|=this.CHANGE_SCROLL),w&&(u||B.width!=w)&&(R|=this.CHANGE_SIZE,B.width=w,b==null&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,c.setStyle(this.scrollBarH.element.style,"left",b+"px"),c.setStyle(this.scroller.style,"left",b+this.margin.left+"px"),B.scrollerWidth=Math.max(0,w-b-this.scrollBarV.getWidth()-this.margin.h),c.setStyle(this.$gutter.style,"left",this.margin.left+"px"),b=this.scrollBarV.getWidth()+"px",c.setStyle(this.scrollBarH.element.style,"right",b),c.setStyle(this.scroller.style,"right",b),c.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||u)&&(R|=this.CHANGE_FULL)),B.$dirty=!w||!v,R&&this._signal("resize",E),R},this.onGutterResize=function(u){u=this.$showGutter?u:0,u!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,u,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var u=this.$size.scrollerWidth-2*this.$padding,u=Math.floor(u/this.characterWidth);return this.session.adjustWrapLimit(u,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(u){this.setOption("animatedScroll",u)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(u){this.setOption("showInvisibles",u),this.session.$bidiHandler.setShowInvisibles(u)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(u){this.setOption("displayIndentGuides",u)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(u){this.setOption("highlightIndentGuides",u)},this.setShowPrintMargin=function(u){this.setOption("showPrintMargin",u)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(u){this.setOption("printMarginColumn",u)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(u){return this.setOption("showGutter",u)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u)},this.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){var u;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((u=c.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=c.createElement("div"),this.$printMarginEl.className="ace_print-margin",u.appendChild(this.$printMarginEl),this.content.insertBefore(u,this.content.firstChild)),(u=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",u.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit())},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){var u,b,w,v,R,B,E;this.$isMousePressed||(u=this.textarea.style,B=this.$composition,this.$keepTextAreaAtCursor||B?(w=this.$cursorLayer.$pixelPos)&&(B&&B.markerRange&&(w=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0)),E=this.layerConfig,b=w.top,w=w.left,b-=E.offset,v=B&&B.useTextareaForIME?this.lineHeight:h?0:1,b<0||b>E.height-v?c.translate(this.textarea,0,0):(E=1,R=this.$size.height-v,B?B.useTextareaForIME?(B=this.textarea.value,E=this.characterWidth*this.session.$getStringScreenWidth(B)[0]):b+=this.lineHeight+2:b+=this.lineHeight,(w-=this.scrollLeft)>this.$size.scrollerWidth-E&&(w=this.$size.scrollerWidth-E),w+=this.gutterWidth+this.margin.left,c.setStyle(u,"height",v+"px"),c.setStyle(u,"width",E+"px"),c.translate(this.textarea,Math.min(w,this.$size.scrollerWidth-E),Math.min(b,R)))):c.translate(this.textarea,-100,0))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var u=this.layerConfig,b=u.lastRow;return this.session.documentToScreenRow(b,0)*u.lineHeight-this.session.getScrollTop()>u.height-u.lineHeight?b-1:b},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(u){this.$padding=u,this.$textLayer.setPadding(u),this.$cursorLayer.setPadding(u),this.$markerFront.setPadding(u),this.$markerBack.setPadding(u),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(u,b,w,v){var R=this.scrollMargin;R.top=0|u,R.bottom=0|b,R.right=0|v,R.left=0|w,R.v=R.top+R.bottom,R.h=R.left+R.right,R.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-R.top),this.updateFull()},this.setMargin=function(u,b,w,v){var R=this.margin;R.top=0|u,R.bottom=0|b,R.right=0|v,R.left=0|w,R.v=R.top+R.bottom,R.h=R.left+R.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(u){this.setOption("hScrollBarAlwaysVisible",u)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(u){this.setOption("vScrollBarAlwaysVisible",u)},this.$updateScrollBarV=function(){var u=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(u-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>u-b&&(u=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(u+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(u,b){if(this.$changes&&(u|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(u||b)){if(this.$size.$dirty)return this.$changes|=u,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",u),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var w,v,b=this.layerConfig;(u&this.CHANGE_FULL||u&this.CHANGE_SIZE||u&this.CHANGE_TEXT||u&this.CHANGE_LINES||u&this.CHANGE_SCROLL||u&this.CHANGE_H_SCROLL)&&(u|=this.$computeLayerConfig()|this.$loop.clear(),b.firstRow!=this.layerConfig.firstRow&&b.firstRowScreen==this.layerConfig.firstRowScreen&&0<(w=this.scrollTop+(b.firstRow-this.layerConfig.firstRow)*this.lineHeight)&&(this.scrollTop=w,u=(u|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),b=this.layerConfig,this.$updateScrollBarV(),u&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),c.translate(this.content,-this.scrollLeft,-b.offset),w=b.width+2*this.$padding+"px",v=b.minHeight+"px",c.setStyle(this.content.style,"width",w),c.setStyle(this.content.style,"height",v)),u&this.CHANGE_H_SCROLL&&(c.translate(this.content,-this.scrollLeft,-b.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),u&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(b),this.$showGutter&&this.$gutterLayer.update(b),this.$markerBack.update(b),this.$markerFront.update(b),this.$cursorLayer.update(b),this.$moveTextAreaToCursor()):u&this.CHANGE_SCROLL?(this.$changedLines=null,u&this.CHANGE_TEXT||u&this.CHANGE_LINES?this.$textLayer.update(b):this.$textLayer.scrollLines(b),this.$showGutter&&(u&this.CHANGE_GUTTER||u&this.CHANGE_LINES?this.$gutterLayer.update(b):this.$gutterLayer.scrollLines(b)),this.$markerBack.update(b),this.$markerFront.update(b),this.$cursorLayer.update(b),this.$moveTextAreaToCursor()):(u&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(b),this.$showGutter&&this.$gutterLayer.update(b)):u&this.CHANGE_LINES?(this.$updateLines()||u&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(b):u&this.CHANGE_TEXT||u&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(b):u&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(b),u&this.CHANGE_CURSOR&&(this.$cursorLayer.update(b),this.$moveTextAreaToCursor()),u&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(b),u&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(b)),this._signal("afterRender",u)}else this.$changes|=u},this.$autosize=function(){var u=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,w=Math.min(b,Math.max((this.$minLines||1)*this.lineHeight,u))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(w+=this.scrollBarH.getHeight()),b=!((w=this.$maxPixelHeight&&w>this.$maxPixelHeight?this.$maxPixelHeight:w)<=2*this.lineHeight)&&b<u,w==this.desiredHeight&&this.$size.height==this.desiredHeight&&b==this.$vScroll||(b!=this.$vScroll&&(this.$vScroll=b,this.scrollBarV.setVisible(b)),u=this.container.clientWidth,this.container.style.height=w+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,w),this.desiredHeight=w,this._signal("autosize"))},this.$computeLayerConfig=function(){var u,Y=this.session,b=this.$size,z=b.height<=2*this.lineHeight,w=this.session.getScreenLength()*this.lineHeight,v=this.$getLongestLine(),G=!z&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-v-2*this.$padding<0),R=this.$horizScroll!==G,G=(R&&(this.$horizScroll=G,this.scrollBarH.setVisible(G)),this.$vScroll),B=(this.$maxLines&&1<this.lineHeight&&this.$autosize(),b.scrollerHeight+this.lineHeight),E=!this.$maxLines&&this.$scrollPastEnd?(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,T=(w+=E,this.scrollMargin),z=(this.session.setScrollTop(Math.max(-T.top,Math.min(this.scrollTop,w-b.scrollerHeight+T.bottom))),this.session.setScrollLeft(Math.max(-T.left,Math.min(this.scrollLeft,v+2*this.$padding-b.scrollerWidth+T.right))),!z&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-w+E<0||this.scrollTop>T.top)),E=G!==z,T=(E&&(this.$vScroll=z,this.scrollBarV.setVisible(z)),this.scrollTop%this.lineHeight),G=Math.ceil(B/this.lineHeight)-1,G=(z=Math.max(0,Math.round((this.scrollTop-T)/this.lineHeight)))+G,F=this.lineHeight,z=Y.screenToDocumentRow(z,0),K=Y.getFoldLine(z),Y=(K&&(z=K.start.row),K=Y.documentToScreenRow(z,0),u=Y.getRowLength(z)*F,G=Math.min(Y.screenToDocumentRow(G,0),Y.getLength()-1),B=b.scrollerHeight+Y.getRowLength(G)*F+u,T=this.scrollTop-K*F,0);return this.layerConfig.width==v&&!R||(Y=this.CHANGE_H_SCROLL),(R||E)&&(Y|=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),E&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:z,firstRowScreen:K,lastRow:G,lineHeight:F,characterWidth:this.characterWidth,minHeight:B,maxHeight:w,offset:T,gutterOffset:F?Math.max(0,Math.ceil((T+b.height-b.scrollerHeight)/F)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),Y},this.$updateLines=function(){if(this.$changedLines){var u=this.$changedLines.firstRow,b=this.$changedLines.lastRow,w=(this.$changedLines=null,this.layerConfig);if(!(u>w.lastRow+1||b<w.firstRow)){if(b!==1/0)return this.$textLayer.updateLines(w,u,b),!0;this.$showGutter&&this.$gutterLayer.update(w),this.$textLayer.update(w)}}},this.$getLongestLine=function(){var u=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(u+=1),this.$textLayer&&u>this.$textLayer.MAX_LINE_LENGTH&&(u=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(u*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(u,b){this.$gutterLayer.addGutterDecoration(u,b)},this.removeGutterDecoration=function(u,b){this.$gutterLayer.removeGutterDecoration(u,b)},this.updateBreakpoints=function(u){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(u){this.$gutterLayer.setAnnotations(u),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(u,b,w){this.scrollCursorIntoView(u,w),this.scrollCursorIntoView(b,w)},this.scrollCursorIntoView=function(u,b,w){var v,R,B;this.$size.scrollerHeight!==0&&(v=(u=this.$cursorLayer.getPixelPosition(u)).left,u=u.top,B=w&&w.top||0,w=w&&w.bottom||0,u<(R=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+B?(b&&R+B>u+this.lineHeight&&(u-=b*this.$size.scrollerHeight),u===0&&(u=-this.scrollMargin.top),this.session.setScrollTop(u)):R+this.$size.scrollerHeight-w<u+this.lineHeight&&(b&&R+this.$size.scrollerHeight-w<u-this.lineHeight&&(u+=b*this.$size.scrollerHeight),this.session.setScrollTop(u+this.lineHeight+w-this.$size.scrollerHeight)),v<(B=this.scrollLeft)?(v<this.$padding+2*this.layerConfig.characterWidth&&(v=-this.scrollMargin.left),this.session.setScrollLeft(v)):B+this.$size.scrollerWidth<v+this.characterWidth?this.session.setScrollLeft(Math.round(v+this.characterWidth-this.$size.scrollerWidth)):B<=this.$padding&&v-B<this.characterWidth&&this.session.setScrollLeft(0))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(u){this.session.setScrollTop(u*this.lineHeight)},this.alignCursor=function(v,b){var v=this.$cursorLayer.getPixelPosition(v=typeof v=="number"?{row:v,column:0}:v),w=this.$size.scrollerHeight-this.lineHeight,v=v.top-w*(b||0);return this.session.setScrollTop(v),v},this.STEPS=8,this.$calcSteps=function(u,b){for(var w,v,E=0,R=this.STEPS,B=[],E=0;E<R;++E)B.push((w=E/this.STEPS,(b-(v=u))*(Math.pow(w-1,3)+1)+v));return B},this.scrollToLine=function(u,b,w,v){u=this.$cursorLayer.getPixelPosition({row:u,column:0}).top,b&&(u-=this.$size.scrollerHeight/2),b=this.scrollTop,this.session.setScrollTop(u),w!==!1&&this.animateScrolling(b,v)},this.animateScrolling=function(u,b){var w=this.scrollTop;if(this.$animatedScroll){var v=this;if(u!=w){if(this.$scrollAnimation){var R=this.$scrollAnimation.steps;if(R.length&&(u=R[0])==w)return}var B=v.$calcSteps(u,w);this.$scrollAnimation={from:u,to:w,steps:B},clearInterval(this.$timer),v.session.setScrollTop(B.shift()),v.session.$scrollTop=w,this.$timer=setInterval(function(){if(!v.session)return clearInterval(v.$timer);B.length?(v.session.setScrollTop(B.shift()),v.session.$scrollTop=w):w!=null?(v.session.$scrollTop=-1,v.session.setScrollTop(w),w=null):(v.$timer=clearInterval(v.$timer),v.$scrollAnimation=null,b&&b())},10)}}},this.scrollToY=function(u){this.scrollTop!==u&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=u)},this.scrollToX=function(u){this.scrollLeft!==u&&(this.scrollLeft=u),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(u,b){this.session.setScrollTop(b),this.session.setScrollLeft(u)},this.scrollBy=function(u,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),u&&this.session.setScrollLeft(this.session.getScrollLeft()+u)},this.isScrollableBy=function(u,b){return b<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<b&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||u<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<u&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(v,R){this.$hasCssTransforms?(B={top:0,left:0},v=(w=this.$fontMetrics.transformCoordinates([v,R]))[1]-this.gutterWidth-this.margin.left,R=w[0]):B=this.scroller.getBoundingClientRect();var w=v+this.scrollLeft-B.left-this.$padding,v=w/this.characterWidth,R=Math.floor((R+this.scrollTop-B.top)/this.lineHeight),B=this.$blockCursor?Math.floor(v):Math.round(v);return{row:R,column:B,side:0<v-B?1:-1,offsetX:w}},this.screenToTextCoordinates=function(R,B){this.$hasCssTransforms?(w={top:0,left:0},R=(v=this.$fontMetrics.transformCoordinates([R,B]))[1]-this.gutterWidth-this.margin.left,B=v[0]):w=this.scroller.getBoundingClientRect();var w,v=R+this.scrollLeft-w.left-this.$padding,R=v/this.characterWidth,R=this.$blockCursor?Math.floor(R):Math.round(R),B=Math.floor((B+this.scrollTop-w.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(R,0),v)},this.textToScreenCoordinates=function(v,R){var w=this.scroller.getBoundingClientRect(),R=this.session.documentToScreenPosition(v,R),v=this.$padding+(this.session.$bidiHandler.isBidiRow(R.row,v)?this.session.$bidiHandler.getPosLeft(R.column):Math.round(R.column*this.characterWidth)),R=R.row*this.lineHeight;return{pageX:w.left+v-this.scrollLeft,pageY:w.top+R-this.scrollTop}},this.visualizeFocus=function(){c.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){c.removeCssClass(this.container,"ace_focus")},this.showComposition=function(u){(this.$composition=u).cssText||(u.cssText=this.textarea.style.cssText),u.useTextareaForIME==null&&(u.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(c.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):u.markerId=this.session.addMarker(u.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(u){var b=this.session.selection.cursor;this.addToken(u,"composition_placeholder",b.row,b.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){var u;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),c.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,u=this.session.selection.cursor,this.removeExtraToken(u.row,u.column),this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(u,b,w,v){var R=this.session,B=(R.bgTokenizer.lines[w]=null,{type:b,value:u}),E=R.getTokens(w);if(v==null)E.push(B);else for(var T=0,G=0;G<E.length;G++){var F=E[G];if(v<=(T+=F.value.length)){var K=F.value.length-(T-v),z=F.value.slice(0,K),K=F.value.slice(K);E.splice(G,1,{type:F.type,value:z},B,{type:F.type,value:K});break}}this.updateLines(w,w)},this.removeExtraToken=function(u,b){this.updateLines(u,u)},this.setTheme=function(u,b){var w,v=this;function R(B){if(v.$themeId!=u)return b&&b();if(!B||!B.cssClass)throw new Error("couldn't load module "+u+" or it didn't call define");B.$id&&(v.$themeId=B.$id),c.importCssString(B.cssText,B.cssClass,v.container),v.theme&&c.removeCssClass(v.container,v.theme.cssClass);var E="padding"in B?B.padding:"padding"in(v.theme||{})?4:v.$padding;v.$padding&&E!=v.$padding&&v.setPadding(E),v.$theme=B.cssClass,v.theme=B,c.addCssClass(v.container,B.cssClass),c.setCssClass(v.container,"ace_dark",B.isDark),v.$size&&(v.$size.width=0,v.$updateSizeAsync()),v._dispatchEvent("themeLoaded",{theme:B}),b&&b()}this.$themeId=u,v._dispatchEvent("themeChange",{theme:u}),u&&typeof u!="string"?R(u):(w=u||this.$options.theme.initialValue,s.loadModule(["theme",w],R))},this.getTheme=function(){return this.$themeId},this.setStyle=function(u,b){c.setCssClass(this.container,u,b!==!1)},this.unsetStyle=function(u){c.removeCssClass(this.container,u)},this.setCursorStyle=function(u){c.setStyle(this.scroller.style,"cursor",u)},this.setMouseCursor=function(u){c.setStyle(this.scroller.style,"cursor",u)},this.attachToShadowRoot=function(){c.importCssString(y,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}.call(S.prototype),s.defineOptions(S.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(u){this.$textLayer.setShowInvisibles(u)&&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(u){typeof u=="number"&&(this.$printMarginColumn=u),this.$showPrintMargin=!!u,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(u){this.$gutter.style.display=u?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(u){c.setCssClass(this.$gutter,"ace_fade-fold-widgets",u)},initialValue:!1},showFoldWidgets:{set:function(u){this.$gutterLayer.setShowFoldWidgets(u),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(u){this.$textLayer.setDisplayIndentGuides(u)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(u){this.$textLayer.setHighlightIndentGuides(u)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(u){this.$gutterLayer.setHighlightGutterLine(u),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(u){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(u){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(u){typeof u=="number"&&(u+="px"),this.container.style.fontSize=u,this.updateFontSize()},initialValue:12},fontFamily:{set:function(u){this.container.style.fontFamily=u,this.updateFontSize()}},maxLines:{set:function(u){this.updateFull()}},minLines:{set:function(u){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(u){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(u){this.$scrollPastEnd!=(u=+u||0)&&(this.$scrollPastEnd=u,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(u){this.$gutterLayer.$fixedWidth=!!u,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(u){this.setTheme(u)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!I.isMobile&&!I.isIE}}),m.VirtualRenderer=S}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(C,m,A){var S=C("../lib/oop"),p=C("../lib/net"),c=C("../lib/event_emitter").EventEmitter,s=C("../config");function n(t){var e;return typeof Worker=="undefined"?{postMessage:function(){},terminate:function(){}}:s.get("loadWorkerFromBlob")?(e=function(r){r="importScripts('"+p.qualifyURL(r)+"');";try{return new Blob([r],{type:"application/javascript"})}catch{var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return a.append(r),a.getBlob("application/javascript")}}(t),e=(window.URL||window.webkitURL).createObjectURL(e),new Worker(e)):new Worker(t)}function i(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,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(){S.implement(this,c),this.$createWorkerFromOldConfig=function(t,e,r,a,o){var l,d;return C.nameToUrl&&!C.toUrl&&(C.toUrl=C.nameToUrl),s.get("packaged")||!C.toUrl?a=a||s.moduleUrl(e,"worker"):(l=this.$normalizePath,a=a||l(C.toUrl("ace/worker/worker.js",null,"_")),d={},t.forEach(function(y){d[y]=l(C.toUrl(y,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=n(a),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:d,module:e,classname:r}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var r=this.callbacks[e.id];r&&(r(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(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return p.qualifyURL(t)},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(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,r){var a;r&&(a=this.callbackId++,this.callbacks[a]=r,e.push(a)),this.send(t,e)},this.emit=function(t,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:t,data:{data:e.data}})}catch(r){console.error(r.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,50<t.length&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(i.prototype),m.UIWorkerClient=function(t,e,r){var a=null,o=!1,l=Object.create(c),d=[],y=new i({messageBuffer:d,terminate:function(){},postMessage:function(h){d.push(h),a&&(o?setTimeout(I):I())}}),I=(y.setEmitSync=function(h){o=h},function(){var h=d.shift();h.command?a[h.command].apply(a,h.args):h.event&&l._signal(h.event,h.data)});return l.postMessage=function(h){y.onMessage({data:h})},l.callback=function(h,u){this.postMessage({type:"call",id:u,data:h})},l.emit=function(h,u){this.postMessage({type:"event",name:h,data:u})},s.loadModule(["worker",e],function(h){for(a=new h[r](l);d.length;)I()}),y},m.WorkerClient=i,m.createWorker=n}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(C,m,A){function S(n,l,t,e,r,a){var o=this,l=(this.length=l,this.session=n,this.doc=n.getDocument(),this.mainClass=r,this.othersClass=a,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=e,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=t,n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=l.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}var p=C("./range").Range,c=C("./lib/event_emitter").EventEmitter,s=C("./lib/oop");(function(){s.implement(this,c),this.setup=function(){var n=this,i=this.doc,t=this.session,e=(this.selectionBefore=t.selection.toJSON(),t.selection.inMultiSelectMode&&t.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column),this.pos);e.$insertRight=!0,e.detach(),e.markerId=t.addMarker(new p(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(r){r=i.createAnchor(r.row,r.column),r.$insertRight=!0,r.detach(),n.others.push(r)}),t.setUndoSelect(!1)},this.showOtherMarkers=function(){var n,i;this.othersActive||(n=this.session,(i=this).othersActive=!0,this.others.forEach(function(t){t.markerId=n.addMarker(new p(t.row,t.column,t.row,t.column+i.length),i.othersClass,null,!1)}))},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},this.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var i=n;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var t=n.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,e=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,r=i.start.column-this.pos.column;if(this.updateAnchors(n),e&&(this.length+=t),e&&!this.session.$fromUndo){if(n.action==="insert")for(var a=this.others.length-1;0<=a;a--){var o={row:(l=this.others[a]).row,column:l.column+r};this.doc.insertMergedLines(o,n.lines)}else if(n.action==="remove")for(a=this.others.length-1;0<=a;a--){var l,o={row:(l=this.others[a]).row,column:l.column+r};this.doc.remove(new p(o.row,o.column,o.row,o.column-t))}}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(n){this.pos.onChange(n);for(var i=this.others.length;i--;)this.others[i].onChange(n);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var n=this,i=this.session,t=function(r,a){i.removeMarker(r.markerId),r.markerId=i.addMarker(new p(r.row,r.column,r.row,r.column+n.length),a,null,!1)};t(this.pos,this.mainClass);for(var e=this.others.length;e--;)t(this.others[e],this.othersClass)}},this.onCursorChange=function(n){var i;!this.$updating&&this.session&&((i=this.session.selection.getCursor()).row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n)))},this.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},this.cancel=function(){if(this.$undoStackDepth!==-1){for(var n=this.session.getUndoManager(),i=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,t=0;t<i;t++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(S.prototype),m.PlaceHolder=S}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(C,m,A){var S=C("../lib/event"),p=C("../lib/useragent");function c(s,n){return s.row==n.row&&s.column==n.column}m.onMouseDown=function(s){var n=s.domEvent,i=n.altKey,t=n.shiftKey,e=n.ctrlKey,r=s.getAccelKey(),a=s.getButton();if(e&&p.isMac&&(a=n.button),s.editor.inMultiSelectMode&&a==2)s.editor.textInput.onContextMenu(s.domEvent);else if(e||i||r){if(a===0){var o,l,d,y,I,h,u,b,w=s.editor,v=w.selection,R=w.inMultiSelectMode,B=s.getDocumentPosition(),E=v.getCursor(),E=s.inSelection()||v.isEmpty()&&c(B,E),T=s.x,G=s.y,F=w.session,z=w.renderer.pixelToScreenCoordinates(T,G),K=z;if(w.$mouseHandler.$enableJumpToDef)e&&i||r&&i?o=t?"block":"add":i&&w.$blockSelectEnabled&&(o="block");else if(r&&!i){if(o="add",!R&&t)return}else i&&w.$blockSelectEnabled&&(o="block");if(o&&p.isMac&&n.ctrlKey&&w.$mouseHandler.cancelContextMenu(),o=="add")!R&&E||(R||(l=v.toOrientedRange(),w.addSelectionMarker(l)),d=v.rangeList.rangeAtPoint(B),w.inVirtualSelectionMode=!0,t&&(d=null,l=v.ranges[0]||l,w.removeSelectionMarker(l)),w.once("mouseup",function(){var Y=v.toOrientedRange();d&&Y.isEmpty()&&c(d.cursor,Y.cursor)?v.substractPoint(Y.cursor):(t?v.substractPoint(l.cursor):l&&(w.removeSelectionMarker(l),v.addRange(l)),v.addRange(Y)),w.inVirtualSelectionMode=!1}));else if(o=="block")return s.stop(),w.inVirtualSelectionMode=!0,I=[],h=function(){var Y=w.renderer.pixelToScreenCoordinates(T,G),_=F.screenToDocumentPosition(Y.row,Y.column,Y.offsetX);c(K,Y)&&c(_,v.lead)||(K=Y,w.selection.moveToPosition(_),w.renderer.scrollCursorIntoView(),w.removeSelectionMarkers(I),I=v.rectangularRangeBlock(K,z),w.$mouseHandler.$clickSelection&&I.length==1&&I[0].isEmpty()&&(I[0]=w.$mouseHandler.$clickSelection.clone()),I.forEach(w.addSelectionMarker,w),w.updateSelectionMarkers())},R&&!r?v.toSingleRange():!R&&r&&(y=v.toOrientedRange(),w.addSelectionMarker(y)),t?z=F.documentToScreenPosition(v.lead):v.moveToPosition(B),K={row:-1,column:-1},u=h,S.capture(w.container,function(Y){T=Y.clientX,G=Y.clientY},function(Y){h(),clearInterval(b),w.removeSelectionMarkers(I),I.length||(I=[v.toOrientedRange()]),y&&(w.removeSelectionMarker(y),v.toSingleRange(y));for(var _=0;_<I.length;_++)v.addRange(I[_]);w.inVirtualSelectionMode=!1,w.$mouseHandler.$clickSelection=null}),b=setInterval(function(){u()},20),s.preventDefault()}}else a===0&&s.editor.inMultiSelectMode&&s.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(C,m,A){m.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(S){S.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(S){S.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(S){S.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(S){S.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(S){S.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(S){S.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(S){S.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(S){S.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(S){1<S.multiSelect.rangeCount?S.multiSelect.joinSelections():S.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(S){S.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(S){S.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(S){S.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(S){S.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(S){return S&&S.inMultiSelectMode}}],C=C("../keyboard/hash_handler").HashHandler,m.keyboardHandler=new C(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(C,m,A){var S=C("./range_list").RangeList,p=C("./range").Range,c=C("./selection").Selection,s=C("./mouse/multi_select_handler").onMouseDown,n=C("./lib/event"),i=C("./lib/lang"),t=C("./commands/multi_select_commands");m.commands=t.defaultCommands.concat(t.multiSelectCommands);var e=new(C("./search")).Search,r=C("./edit_session").EditSession,r=(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(r.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(o,l){if(o){if(!this.inMultiSelectMode&&this.rangeCount===0){var d=this.toOrientedRange();if(this.rangeList.add(d),this.rangeList.add(o),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),l||this.fromOrientedRange(o);this.rangeList.removeAll(),this.rangeList.add(d),this.$onAddRange(d)}return o.cursor||(o.cursor=o.end),d=this.rangeList.add(o),this.$onAddRange(o),d.length&&this.$onRemoveRange(d),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),l||this.fromOrientedRange(o)}},this.toSingleRange=function(o){o=o||this.ranges[0];var l=this.rangeList.removeAll();l.length&&this.$onRemoveRange(l),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 l;this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode&&(l=this.rangeList.ranges.pop(),o.push(l),this.rangeCount=0);for(var d=o.length;d--;){var y=this.ranges.indexOf(o[d]);this.ranges.splice(y,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)),(l=l||this.ranges[0])&&!l.isEqual(this.getRange())&&this.fromOrientedRange(l)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new S,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()],l=[],d=0;d<o.length;d++){var y=o[d],I=y.start.row,h=y.end.row;if(I===h)l.push(y.clone());else{for(l.push(new p(I,y.start.column,I,this.session.getLine(I).length));++I<h;)l.push(this.getLineRange(I,!0));l.push(new p(h,0,h,y.end.column))}d!=0||this.isBackwards()||(l=l.reverse())}for(this.toSingleRange(),d=l.length;d--;)this.addRange(l[d])},this.joinSelections=function(){var l=this.rangeList.ranges,o=l[l.length-1],l=p.fromPoints(l[0].start,o.end);this.toSingleRange(),this.setSelectionRange(l,o.cursor==o.start)},this.toggleBlockSelection=function(){var o,l;1<this.rangeCount?(l=(o=this.rangeList.ranges)[o.length-1],o=p.fromPoints(o[0].start,l.end),this.toSingleRange(),this.setSelectionRange(o,l.cursor==l.start)):(o=this.session.documentToScreenPosition(this.cursor),l=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(o,l).forEach(this.addRange,this))},this.rectangularRangeBlock=function(o,l,d){var y,I,h,u,b,w,v,R=[],B=o.column<l.column,E=(u=(B?(y=o.column,I=l.column,h=o.offsetX,l):(y=l.column,I=o.column,h=l.offsetX,o)).offsetX,o.row<l.row);w=(E?(b=o.row,l):(b=l.row,o)).row,y<0&&(y=0),(b=b<0?0:b)==w&&(d=!0);for(var T,G,F=b;F<=w;F++){var z=p.fromPoints(this.session.screenToDocumentPosition(F,y,h),this.session.screenToDocumentPosition(F,I,u));if(z.isEmpty()){if(v&&(T=z.end,G=v,T.row==G.row&&T.column==G.column))break;v=z.end}z.cursor=B?z.start:z.end,R.push(z)}if(E&&R.reverse(),!d){for(var K=R.length-1;R[K].isEmpty()&&0<K;)K--;if(0<K)for(var Y=0;R[Y].isEmpty();)Y++;for(var _=K;Y<=_;_--)R[_].isEmpty()&&R.splice(_,1)}return R}}.call(c.prototype),C("./editor").Editor);function a(o){var l,d;function y(I){d&&(l.renderer.setMouseCursor(""),d=!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",s),o.commands.addCommands(t.defaultCommands),(l=o).textInput&&(o=l.textInput.getElement(),d=!1,n.addListener(o,"keydown",function(I){I=I.keyCode==18&&!(I.ctrlKey||I.shiftKey||I.metaKey),l.$blockSelectEnabled&&I?d||(l.renderer.setMouseCursor("crosshair"),d=!0):d&&y()},l),n.addListener(o,"keyup",y,l),n.addListener(o,"blur",y,l)))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(o){o.cursor||(o.cursor=o.end);var l=this.getSelectionStyle();return o.marker=this.session.addMarker(o,"ace_selection",l),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 l=this.session.$selectionMarkers,d=o.length;d--;){var y=o[d];y.marker&&(this.session.removeMarker(y.marker),(y=l.indexOf(y))!=-1&&l.splice(y,1))}this.session.selectionMarkerCount=l.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(t.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(t.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(o){var l,d=o.command,y=o.editor;if(y.multiSelect)return d.multiSelectAction?l=d.multiSelectAction=="forEach"?y.forEachSelection(d,o.args):d.multiSelectAction=="forEachLine"?y.forEachSelection(d,o.args,!0):d.multiSelectAction=="single"?(y.exitMultiSelectMode(),d.exec(y,o.args||{})):d.multiSelectAction(y,o.args||{}):(l=d.exec(y,o.args||{}),y.multiSelect.addRange(y.multiSelect.toOrientedRange()),y.multiSelect.mergeOverlappingRanges()),l},this.forEachSelection=function(o,l,d){if(!this.inVirtualSelectionMode){var y,w=d&&d.keepOrder,I=d==1||d&&d.$byLines,h=this.session,d=this.selection,u=d.rangeList,b=(w?d:u).ranges;if(!b.length)return o.exec?o.exec(this,l||{}):o(this,l||{});var w=d._eventRegistry,v=(d._eventRegistry={},new c(h));this.inVirtualSelectionMode=!0;for(var R=b.length;R--;){if(I)for(;0<R&&b[R].start.row==b[R-1].end.row;)R--;v.fromOrientedRange(b[R]),v.index=R,this.selection=h.selection=v;var B=o.exec?o.exec(this,l||{}):o(this,l||{});y||B===void 0||(y=B),v.toOrientedRange(b[R])}return v.detach(),this.selection=h.selection=d,this.inVirtualSelectionMode=!1,d._eventRegistry=w,d.mergeOverlappingRanges(),d.ranges[0]&&d.fromOrientedRange(d.ranges[0]),u=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),u&&u.from==u.to&&this.renderer.animateScrolling(u.from),y}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var o="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var l=this.multiSelect.rangeList.ranges,d=[],y=0;y<l.length;y++)d.push(this.session.getTextRange(l[y]));var I=this.session.getDocument().getNewLineCharacter();(o=d.join(I)).length==(d.length-1)*I.length&&(o="")}else this.selection.isEmpty()||(o=this.session.getTextRange(this.getSelectionRange()));return o},this.$checkMultiselectChange=function(o,l){var d;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(d=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&l==this.multiSelect.anchor||((d=l==this.multiSelect.anchor?d.cursor==d.start?d.end:d.start:d.cursor).row!=l.row||this.session.$clipPositionToDocument(d.row,d.column).column!=l.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(o,l,d){(l=l||{}).needle=o||l.needle,l.needle==null&&(y=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),l.needle=this.session.getTextRange(y)),this.$search.set(l);var y,I=this.$search.findAll(this.session);if(!I.length)return 0;var h=this.multiSelect;d||h.toSingleRange(I[0]);for(var u=I.length;u--;)h.addRange(I[u],!0);return y&&h.rangeList.rangeAtPoint(y.start)&&h.addRange(y,!0),I.length},this.selectMoreLines=function(o,l){var d,y,I,h=this.selection.toOrientedRange(),u=h.cursor==h.end,b=this.session.documentToScreenPosition(h.cursor),w=(this.selection.$desiredColumn&&(b.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(b.row+o,b.column));o=h.isEmpty()?w:(d=this.session.documentToScreenPosition(u?h.end:h.start),this.session.screenToDocumentPosition(d.row+o,d.column)),u?(y=p.fromPoints(w,o)).cursor=y.start:(y=p.fromPoints(o,w)).cursor=y.end,y.desiredColumn=b.column,this.selection.inMultiSelectMode?l&&(I=h.cursor):this.selection.addRange(h),this.selection.addRange(y),I&&this.selection.substractPoint(I)},this.transposeSelections=function(o){for(var l=this.session,d=l.multiSelect,y=d.ranges,I=y.length;I--;)(u=y[I]).isEmpty()&&(b=l.getWordRange(u.start.row,u.start.column),u.start.row=b.start.row,u.start.column=b.start.column,u.end.row=b.end.row,u.end.column=b.end.column);d.mergeOverlappingRanges();for(var h=[],I=y.length;I--;){var u=y[I];h.unshift(l.getTextRange(u))}for(o<0?h.unshift(h.pop()):h.push(h.shift()),I=y.length;I--;){var b=(u=y[I]).clone();l.replace(u,h[I]),u.start.row=b.start.row,u.start.column=b.start.column}d.fromOrientedRange(d.ranges[0])},this.selectMore=function(o,l,d){var y,I=this.session,h=I.multiSelect.toOrientedRange();h.isEmpty()&&((h=I.getWordRange(h.start.row,h.start.column)).cursor=o==-1?h.start:h.end,this.multiSelect.addRange(h),d)||(d=I.getTextRange(h),I=I,d=d,y=o,e.$options.wrap=!0,e.$options.needle=d,e.$options.backwards=y==-1,(d=e.find(I))&&(d.cursor=o==-1?d.start:d.end,this.session.unfold(d),this.multiSelect.addRange(d),this.renderer.scrollCursorIntoView(null,.5)),l&&this.multiSelect.substractPoint(h.cursor))},this.alignCursors=function(){var o=this.session,l=o.multiSelect,d=l.ranges,y=-1,I=d.filter(function(T){if(T.cursor.row==y)return!0;y=T.cursor.row});if(d.length&&I.length!=d.length-1){I.forEach(function(T){l.substractPoint(T.cursor)});var h=0,u=1/0,b=d.map(function(G){var G=G.cursor,F=o.getLine(G.row).substr(G.column).search(/\S/g);return G.column>h&&(h=G.column),(F=F==-1?0:F)<u&&(u=F),F});d.forEach(function(T,K){var F=T.cursor,z=h-F.column,K=b[K]-u;K<z?o.insert(F,i.stringRepeat(" ",z-K)):o.remove(new p(F.row,F.column,F.row,F.column-z+K)),T.start.column=T.end.column=h,T.start.row=T.end.row=F.row,T.cursor=T.end}),l.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var I=this.selection.getRange(),w=I.start.row,v=I.end.row,d=w==v;if(d){for(var R,B=this.session.getLength();R=this.session.getLine(v),/[=:]/.test(R)&&++v<B;);for(;R=this.session.getLine(w),/[=:]/.test(R)&&0<--w;);w<0&&(w=0),B<=v&&(v=B-1)}var E=this.session.removeFullLines(w,v),E=this.$reAlignText(E,d);this.session.insert({row:w,column:0},E.join(`
|
|
`)+`
|
|
`),d||(I.start.column=0,I.end.column=E[E.length-1].length),this.selection.setRange(I)}},this.$reAlignText=function(o,l){var d,y,I,h=!0,u=!0;return o.map(function(v){var R=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return R?(d==null?(d=R[1].length,y=R[2].length,I=R[3].length):(d+y+I!=R[1].length+R[2].length+R[3].length&&(u=!1),d!=R[1].length&&(h=!1),d>R[1].length&&(d=R[1].length),y<R[2].length&&(y=R[2].length),I>R[3].length&&(I=R[3].length)),R):[v]}).map(l?w:h?u?function(v){return v[2]?b(d+y-v[2].length)+v[2]+b(I)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}:w:function(v){return v[2]?b(d)+v[2]+b(I)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]});function b(v){return i.stringRepeat(" ",v)}function w(v){return v[2]?b(d)+v[2]+b(y-v[2].length+I)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}}}).call(r.prototype),m.onSessionChange=function(d){var l=d.session,d=(l&&!l.multiSelect&&(l.$selectionMarkers=[],l.selection.$initRangeList(),l.multiSelect=l.selection),this.multiSelect=l&&l.multiSelect,d.oldSession);d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),l&&(l.multiSelect.on("addRange",this.$onAddRange),l.multiSelect.on("removeRange",this.$onRemoveRange),l.multiSelect.on("multiSelect",this.$onMultiSelect),l.multiSelect.on("singleSelect",this.$onSingleSelect),l.multiSelect.lead.on("change",this.$checkMultiselectChange),l.multiSelect.anchor.on("change",this.$checkMultiselectChange)),l&&this.inMultiSelectMode!=l.selection.inMultiSelectMode&&(l.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},m.MultiSelect=a,C("./config").defineOptions(r.prototype,"editor",{enableMultiselect:{set:function(o){a(this),o?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(o){this.$blockSelectEnabled=o},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(p,m,A){var S=p("../../range").Range,p=m.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(c,s,n){return c=c.getLine(n),this.foldingStartMarker.test(c)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(c)?"end":""},this.getFoldWidgetRange=function(c,s,n){return null},this.indentationBlock=function(c,s,n){var i=/\S/,t=c.getLine(s),e=t.search(i);if(e!=-1){for(var r,n=n||t.length,a=c.getLength(),t=s,o=s;++s<a;){var l=c.getLine(s).search(i);if(l!=-1){if(l<=e&&(l=c.getTokenAt(s,0),!l||l.type!=="string"))break;o=s}}return t<o?(r=c.getLine(o).length,new S(t,n,o,r)):void 0}},this.openingBracketBlock=function(c,s,n,i,t){if(n={row:n,column:i+1},i=c.$findClosingBracket(s,n,t),i)return(s=(s=c.foldWidgets[i.row])==null?c.getFoldWidget(i.row):s)=="start"&&i.row>n.row&&(i.row--,i.column=c.getLine(i.row).length),S.fromPoints(n,i)},this.closingBracketBlock=function(c,s,n,i,t){if(n={row:n,column:i},i=c.$findOpeningBracket(s,n),i)return i.column++,n.column--,S.fromPoints(i,n)}}).call(p.prototype)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(C,m,A){var S=C("./lib/dom");function p(c){this.session=c,(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)}(function(){this.getRowLength=function(c){var s=this.lineWidgets&&this.lineWidgets[c]&&this.lineWidgets[c].rowCount||0;return this.$useWrapMode&&this.$wrapData[c]?this.$wrapData[c].length+1+s:1+s},this.$getWidgetScreenLength=function(){var c=0;return this.lineWidgets.forEach(function(s){s&&s.rowCount&&!s.hidden&&(c+=s.rowCount)}),c},this.$onChangeEditor=function(c){this.attach(c.editor)},this.attach=function(c){c&&c.widgetManager&&c.widgetManager!=this&&c.widgetManager.detach(),this.editor!=c&&(this.detach(),(this.editor=c)&&(c.widgetManager=this,c.renderer.on("beforeRender",this.measureWidgets),c.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(c){var s=this.editor;s&&(this.editor=null,s.widgetManager=null,s.renderer.off("beforeRender",this.measureWidgets),s.renderer.off("afterRender",this.renderWidgets),(s=this.session.lineWidgets)&&s.forEach(function(n){n&&n.el&&n.el.parentNode&&(n._inDocument=!1,n.el.parentNode.removeChild(n.el))}))},this.updateOnFold=function(c,s){var n=s.lineWidgets;if(n&&c.action){for(var s=c.data,i=s.start.row,t=s.end.row,e=c.action=="add",r=i+1;r<t;r++)n[r]&&(n[r].hidden=e);n[t]&&(e?n[i]?n[t].hidden=e:n[i]=n[t]:(n[i]==n[t]&&(n[i]=void 0),n[t].hidden=e))}},this.updateOnChange=function(c){var s,n,i,t=this.session.lineWidgets;t&&(s=c.start.row,(n=c.end.row-s)!=0&&(c.action=="remove"?(i=t.splice(s+1,n),!t[s]&&i[i.length-1]&&(t[s]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this)):(i=new Array(n),t[s]&&t[s].column!=null&&c.start.column>t[s].column&&s++,i.unshift(s,0),t.splice.apply(t,i)),this.$updateRows()))},this.$updateRows=function(){var c,s=this.session.lineWidgets;s&&(c=!0,s.forEach(function(n,i){if(n)for(c=!1,n.row=i;n.$oldWidget;)n.$oldWidget.row=i,n=n.$oldWidget}),c&&(this.session.lineWidgets=null))},this.$registerLineWidget=function(c){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var s=this.session.lineWidgets[c.row];return s&&(c.$oldWidget=s).el&&s.el.parentNode&&(s.el.parentNode.removeChild(s.el),s._inDocument=!1),this.session.lineWidgets[c.row]=c},this.addLineWidget=function(c){var s,n,i;return this.$registerLineWidget(c),c.session=this.session,this.editor&&(s=this.editor.renderer,c.html&&!c.el&&(c.el=S.createElement("div"),c.el.innerHTML=c.html),c.el&&(S.addCssClass(c.el,"ace_lineWidgetContainer"),c.el.style.position="absolute",c.el.style.zIndex=5,s.container.appendChild(c.el),c._inDocument=!0,c.coverGutter||(c.el.style.zIndex=3),c.pixelHeight==null&&(c.pixelHeight=c.el.offsetHeight)),c.rowCount==null&&(c.rowCount=c.pixelHeight/s.layerConfig.lineHeight),n=this.session.getFoldAt(c.row,0),(c.$fold=n)&&(i=this.session.lineWidgets,c.row!=n.end.row||i[n.start.row]?c.hidden=!0:i[n.start.row]=c),this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows(),this.renderWidgets(null,s),this.onWidgetChanged(c)),c},this.removeLineWidget=function(c){if(c._inDocument=!1,c.session=null,c.el&&c.el.parentNode&&c.el.parentNode.removeChild(c.el),c.editor&&c.editor.destroy)try{c.editor.destroy()}catch{}if(this.session.lineWidgets){var s=this.session.lineWidgets[c.row];if(s==c)this.session.lineWidgets[c.row]=c.$oldWidget,c.$oldWidget&&this.onWidgetChanged(c.$oldWidget);else for(;s;){if(s.$oldWidget==c){s.$oldWidget=c.$oldWidget;break}s=s.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:c.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(c){for(var s=this.session.lineWidgets,n=s&&s[c],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(c){this.session._changedWidgets.push(c),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(c,s){var n=this.session._changedWidgets,i=s.layerConfig;if(n&&n.length){for(var t=1/0,e=0;e<n.length;e++){var r=n[e];if(r&&r.el&&r.session==this.session){if(!r._inDocument){if(this.session.lineWidgets[r.row]!=r)continue;r._inDocument=!0,s.container.appendChild(r.el)}r.h=r.el.offsetHeight,r.fixedWidth||(r.w=r.el.offsetWidth,r.screenWidth=Math.ceil(r.w/i.characterWidth));var a=r.h/i.lineHeight;r.coverLine&&(a-=this.session.getRowLineCount(r.row))<0&&(a=0),r.rowCount!=a&&(r.rowCount=a,r.row<t&&(t=r.row))}}t!=1/0&&(this.session._emit("changeFold",{data:{start:{row:t}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(c,s){var n=s.layerConfig,i=this.session.lineWidgets;if(i){for(var t=Math.min(this.firstRow,n.firstRow),e=Math.max(this.lastRow,n.lastRow,i.length);0<t&&!i[t];)t--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,s.$cursorLayer.config=n;for(var r=t;r<=e;r++){var a,o=i[r];o&&o.el&&(o.hidden?o.el.style.top=-100-(o.pixelHeight||0)+"px":(o._inDocument||(o._inDocument=!0,s.container.appendChild(o.el)),a=s.$cursorLayer.getPixelPosition({row:r,column:0},!0).top,o.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=a-n.offset+"px",a=o.coverGutter?0:s.gutterWidth,o.fixedWidth||(a-=s.scrollLeft),o.el.style.left=a+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=n.width+2*n.padding+"px"),o.fixedWidth?o.el.style.right=s.scrollBar.getWidth()+"px":o.el.style.right=""))}}}}).call(p.prototype),m.LineWidgets=p}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(C,m,A){var S=C("../line_widgets").LineWidgets,p=C("../lib/dom"),c=C("../range").Range;function s(n,i,t){var e=n.getAnnotations().sort(c.comparePoints);if(e.length){var r=function(l,d,y){for(var I=0,h=l.length-1;I<=h;){var u=I+h>>1,b=y(d,l[u]);if(0<b)I=1+u;else{if(!(b<0))return u;h=u-1}}return-(I+1)}(e,{row:i,column:-1},c.comparePoints),a=((r=r<0?-r-1:r)>=e.length?r=0<t?0:e.length-1:r===0&&t<0&&(r=e.length-1),e[r]);if(a&&t){if(a.row===i){for(;(a=e[r+=t])&&a.row===i;);if(!a)return e.slice()}var o=[];for(i=a.row;o[t<0?"unshift":"push"](a),(a=e[r+=t])&&a.row==i;);return o.length&&o}}}m.showErrorMarker=function(n,d){var t,e=n.session,r=(e.widgetManager||(e.widgetManager=new S(e),e.widgetManager.attach(n)),n.getCursorPosition()),l=r.row,y=e.widgetManager.getWidgetsAtRow(l).filter(function(I){return I.type=="errorMarker"})[0],l=(y?y.destroy():l-=d,s(e,l,d));if(l)d=l[0],r.column=(d.pos&&typeof d.column!="number"?d.pos.sc:d.column)||0,r.row=d.row,t=n.renderer.$gutterLayer.$annotations[r.row];else{if(y)return;t={text:["Looks good!"],className:"ace_ok"}}n.session.unfold(r.row),n.selection.moveToPosition(r);function a(I,h,u){if(h===0&&(u==="esc"||u==="return"))return o.destroy(),{command:"null"}}var o={row:r.row,fixedWidth:!0,coverGutter:!0,el:p.createElement("div"),type:"errorMarker"},l=o.el.appendChild(p.createElement("div")),d=o.el.appendChild(p.createElement("div")),y=(d.className="error_widget_arrow "+t.className,n.renderer.$cursorLayer.getPixelPosition(r).left);d.style.left=y+n.renderer.gutterWidth-5+"px",o.el.className="error_widget_wrapper",l.className="error_widget "+t.className,l.innerHTML=t.text.join("<br>"),l.appendChild(p.createElement("div")),o.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(a),e.widgetManager.removeLineWidget(o),n.off("changeSelection",o.destroy),n.off("changeSession",o.destroy),n.off("mouseup",o.destroy),n.off("change",o.destroy))},n.keyBinding.addKeyboardHandler(a),n.on("changeSelection",o.destroy),n.on("changeSession",o.destroy),n.on("mouseup",o.destroy),n.on("change",o.destroy),n.session.widgetManager.addLineWidget(o),o.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:o.el.offsetHeight})},p.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/lib/event","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(C,m,A){C("./loader_build")(m);var S=C("./lib/dom"),p=C("./lib/event"),c=C("./range").Range,s=C("./editor").Editor,n=C("./edit_session").EditSession,i=C("./undomanager").UndoManager,t=C("./virtual_renderer").VirtualRenderer;C("./worker/worker_client"),C("./keyboard/hash_handler"),C("./placeholder"),C("./multi_select"),C("./mode/folding/fold_mode"),C("./theme/textmate"),C("./ext/error_marker"),m.config=C("./config"),m.edit=function(e,r){if(typeof e=="string"){var a=e;if(!(e=document.getElementById(a)))throw new Error("ace.edit can't find div #"+a)}var o,l;return e&&e.env&&e.env.editor instanceof s?e.env.editor:(a="",e&&/input|textarea/i.test(e.tagName)?(a=(o=e).value,e=S.createElement("pre"),o.parentNode.replaceChild(e,o)):e&&(a=e.textContent,e.innerHTML=""),a=m.createEditSession(a),e=new s(new t(e),a,r),l={document:a,editor:e,onResize:e.resize.bind(e,null)},o&&(l.textarea=o),p.addListener(window,"resize",l.onResize),e.on("destroy",function(){p.removeListener(window,"resize",l.onResize),l.editor.container.env=null}),e.container.env=e.env=l,e)},m.createEditSession=function(e,r){return e=new n(e,r),e.setUndoManager(new i),e},m.Range=c,m.Editor=s,m.EditSession=n,m.UndoManager=i,m.VirtualRenderer=t,m.version=m.config.version}),ace.require(["ace/ace"],function(C){for(var m in C&&(C.config.init(!0),C.define=ace.define),window.ace||(window.ace=C),C)C.hasOwnProperty(m)&&(window.ace[m]=C[m]);window.ace.default=window.ace,ie&&(ie.exports=window.ace)})},4317:function(ie,g,H){ie=H.nmd(ie),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(X,x,N){var t=X("./lib/dom"),O=X("./lib/oop"),D=X("./lib/event_emitter").EventEmitter,P=X("./lib/lang"),V=X("./range").Range,L=X("./range_list").RangeList,C=X("./keyboard/hash_handler").HashHandler,m=X("./tokenizer").Tokenizer,A=X("./clipboard"),S={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,r,a){return e=e.session.getTextRange(),a?e.replace(/\n\r?([ \t]*\S)/g,`
|
|
`+a+"$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 A.getText&&A.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:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){return e=new Date().toLocaleString("en-us",e),e.length==1?"0"+e:e}S.SELECTED_TEXT=S.SELECTION;function c(){this.snippetMap={},this.snippetNameMap={}}(function(){O.implement(this,D),this.getTokenizer=function(){return c.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(o){return o=o.substr(1),/^\d+$/.test(o)?[{tabstopId:parseInt(o,10)}]:[{text:o}]}function r(o){return"(?:[^\\\\"+o+"]|\\\\.)"}var a={regex:"/("+r("/")+"+)/",onMatch:function(o,l,d){return d=d[0],d.fmtString=!0,d.guard=o.slice(1,-1),d.flag=""},next:"formatString"};return c.$tokenizer=new m({start:[{regex:/\\./,onMatch:function(o,l,d){var y=o[1];return[o=y=="}"&&d.length||"`$\\".indexOf(y)!=-1?y:o]}},{regex:/}/,onMatch:function(o,l,d){return[d.length?d.shift():o]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(o,l,d){return o=e(o.substr(1)),d.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+r("\\|")+"*\\|",onMatch:function(o,l,d){return o=o.slice(1,-1).replace(/\\[,|\\]|,/g,function(y){return y.length==2?y[1]:"\0"}).split("\0").map(function(y){return{value:y}}),[(d[0].choices=o)[0]]},next:"start"},a,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(o,l,d){return d.length&&d[0].expectElse?(d[0].expectElse=!1,d[0].ifEnd={elseEnd:d[0]},[d[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(o,l,d){var y=o[1];return y=="}"&&d.length||"`$\\".indexOf(y)!=-1?o=y:y=="n"?o=`
|
|
`:y=="t"?o=" ":"ulULE".indexOf(y)!=-1&&(o={changeCase:y,local:"a"<y}),[o]}},{regex:"/\\w*}",onMatch:function(o,l,d){return d=d.shift(),d&&(d.flag=o.slice(1,-1)),this.next=d&&d.tabstopId?"start":"",[d||o]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(o,l,d){return[{text:o.slice(1)}]}},{regex:/\${\w+/,onMatch:function(o,l,d){return o={text:o.slice(2)},d.unshift(o),[o]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(o,l,d){return d=d.shift(),this.next=d&&d.tabstopId?"start":"",[d||o]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(o,l,d){return d[0].formatFunction=o.slice(2,-1),[d.shift()]},next:"formatString"},a,{regex:/:[\?\-+]?/,onMatch:function(o,l,d){o[1]=="+"&&(d[0].ifEnd=d[0]),o[1]=="?"&&(d[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(e,r){return this.getTokenizer().getLineTokens(e,r).tokens.map(function(a){return a.value||a})},this.getVariableValue=function(e,r,a){var o;return/^\d+$/.test(r)?(this.variables.__||{})[r]||"":/^[A-Z]\d+$/.test(r)?(this.variables[r[0]+"__"]||{})[r.substr(1)]||"":(r=r.replace(/^TM_/,""),!this.variables.hasOwnProperty(r)||(o=typeof(o=this.variables[r])=="function"?this.variables[r](e,r,a):o)==null?"":o)},this.variables=S,this.tmStrFormat=function(e,r,a){var o,l,d,y;return r.fmt?(o=r.flag||"",l=r.guard,l=new RegExp(l,o.replace(/[^gim]/g,"")),d=typeof r.fmt=="string"?this.tokenizeTmSnippet(r.fmt,"formatString"):r.fmt,y=this,e.replace(l,function(){for(var I=y.variables.__,h=(y.variables.__=[].slice.call(arguments),y.resolveVariables(d,a)),u="E",b=0;b<h.length;b++){var w,v=h[b];typeof v=="object"?(h[b]="",v.changeCase&&v.local?(w=h[b+1])&&typeof w=="string"&&(v.changeCase=="u"?h[b]=w[0].toUpperCase():h[b]=w[0].toLowerCase(),h[b+1]=w.substr(1)):v.changeCase&&(u=v.changeCase)):u=="U"?h[b]=v.toUpperCase():u=="L"&&(h[b]=v.toLowerCase())}return y.variables.__=I,h.join("")})):e},this.tmFormatFunction=function(e,r,a){return r.formatFunction=="upcase"?e.toUpperCase():r.formatFunction=="downcase"?e.toLowerCase():e},this.resolveVariables=function(e,r){for(var a=[],o="",l=!0,d=0;d<e.length;d++){var y,I=e[d];typeof I=="string"?(a.push(I),I==`
|
|
`?(l=!0,o=""):l&&(o=/^\t*/.exec(I)[0],l=/\S/.test(I))):I&&(l=!1,I.fmtString&&((y=e.indexOf(I,d+1))==-1&&(y=e.length),I.fmt=e.slice(d+1,y),d=y),I.text?(y=this.getVariableValue(r,I.text,o)+"",I.fmtString&&(y=this.tmStrFormat(y,I,r)),(y=I.formatFunction?this.tmFormatFunction(y,I,r):y)&&!I.ifEnd?(a.push(y),h(I)):!y&&I.ifEnd&&h(I.ifEnd)):I.elseEnd?h(I.elseEnd):I.tabstopId==null&&I.changeCase==null||a.push(I))}function h(u){u=e.indexOf(u,d+1),u!=-1&&(d=u)}return a},this.insertSnippetForSelection=function(e,G){for(var T=e.getCursorPosition(),E=e.session.getLine(T.row),a=e.session.getTabString(),o=E.match(/^\s*/)[0],l=(T.column<o.length&&(o=o.slice(0,T.column)),G=G.replace(/\r/g,""),this.tokenizeTmSnippet(G)),d=(l=(l=this.resolveVariables(l,e)).map(function(z){return z==`
|
|
`?z+o:typeof z=="string"?z.replace(/\t/g,a):z}),[]),y=(l.forEach(function(z,K){var Y,_;typeof z=="object"&&(_=z.tabstopId,(Y=d[_])||((Y=d[_]=[]).index=_,Y.value="",Y.parents={}),Y.indexOf(z)===-1&&(z.choices&&!Y.choices&&(Y.choices=z.choices),Y.push(z),(_=l.indexOf(z,K+1))!==-1&&((z=l.slice(K+1,_)).some(function(Z){return typeof Z=="object"})&&!Y.value?Y.value=z:!z.length||Y.value&&typeof Y.value=="string"||(Y.value=z.join("")))))}),d.forEach(function(z){z.length=0}),{}),I=0;I<l.length;I++){var h,u,b,w=l[I];typeof w=="object"&&(b=w.tabstopId,h=d[b],u=l.indexOf(w,I+1),y[b]?y[b]===w&&(delete y[b],Object.keys(y).forEach(function(z){h.parents[z]=!0})):(y[b]=w,typeof(b=h.value)!="string"?b=function(z){for(var K=[],Y=0;Y<z.length;Y++){if(typeof(_=z[Y])=="object"){if(y[_.tabstopId])continue;var _=K[z.lastIndexOf(_,Y-1)]||{tabstopId:_.tabstopId}}K[Y]=_}return K}(b):w.fmt&&(b=this.tmStrFormat(b,w,e)),l.splice.apply(l,[I+1,Math.max(0,u-I)].concat(b,w)),h.indexOf(w)===-1&&h.push(w)))}var v=0,R=0,B="",E=(l.forEach(function(z){var K;typeof z=="string"?(1<(K=z.split(`
|
|
`)).length?(R=K[K.length-1].length,v+=K.length-1):R+=z.length,B+=z):z&&(z.start?z.end={row:v,column:R}:z.start={row:v,column:R})}),e.getSelectionRange()),T=e.session.replace(E,B),G=new s(e),F=e.inVirtualSelectionMode&&e.selection.index;G.addTabstops(d,E.start,T,F)},this.insertSnippet=function(e,r){var a=this;if(e.inVirtualSelectionMode)return a.insertSnippetForSelection(e,r);e.forEachSelection(function(){a.insertSnippetForSelection(e,r)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var r,a=e.session.$mode.$id||"";return(a=a.split("/").pop())!=="html"&&a!=="php"||(a!=="php"||e.session.$mode.inlinePhp||(a="html"),r=e.getCursorPosition(),(e=typeof(e=e.session.getState(r.row))=="object"?e[0]:e).substring&&(e.substring(0,3)=="js-"?a="javascript":e.substring(0,4)=="css-"?a="css":e.substring(0,4)=="php-"&&(a="php"))),a},this.getActiveScopes=function(r){var r=this.$getScope(r),a=[r],o=this.snippetMap;return o[r]&&o[r].includeScopes&&a.push.apply(a,o[r].includeScopes),a.push("_"),a},this.expandWithTab=function(e,r){var a=this,o=e.forEachSelection(function(){return a.expandSnippetForSelection(e,r)},null,{keepOrder:!0});return o&&e.tabstopManager&&e.tabstopManager.tabNext(),o},this.expandSnippetForSelection=function(e,r){var a,o=e.getCursorPosition(),l=e.session.getLine(o.row),d=l.substring(0,o.column),y=l.substr(o.column),I=this.snippetMap;return this.getActiveScopes(e).some(function(h){return h=I[h],!!(a=h?this.findMatchingSnippet(h,d,y):a)},this),!!a&&(r&&r.dryRun||(e.session.doc.removeInLine(o.row,o.column-a.replaceBefore.length,o.column+a.replaceAfter.length),this.variables.M__=a.matchBefore,this.variables.T__=a.matchAfter,this.insertSnippetForSelection(e,a.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,r,a){for(var o=e.length;o--;){var l=e[o];if((!l.startRe||l.startRe.test(r))&&(!l.endRe||l.endRe.test(a))&&(l.startRe||l.endRe))return l.matchBefore=l.startRe?l.startRe.exec(r):[""],l.matchAfter=l.endRe?l.endRe.exec(a):[""],l.replaceBefore=l.triggerRe?l.triggerRe.exec(r)[0]:"",l.replaceAfter=l.endTriggerRe?l.endTriggerRe.exec(a)[0]:"",l}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,r){var a=this.snippetMap,o=this.snippetNameMap,l=this;function d(h){return(h=h&&!/^\^?\(.*\)\$?$|^\\b$/.test(h)?"(?:"+h+")":h)||""}function y(h,u,b){return h=d(h),u=d(u),b?(h=u+h)&&h[h.length-1]!="$"&&(h+="$"):(h+=u)&&h[0]!="^"&&(h="^"+h),new RegExp(h)}function I(h){h.scope||(h.scope=r||"_"),r=h.scope,a[r]||(a[r]=[],o[r]={});var u,b=o[r];h.name&&((u=b[h.name])&&l.unregister(u),b[h.name]=h),a[r].push(h),h.prefix&&(h.tabTrigger=h.prefix),!h.content&&h.body&&(h.content=Array.isArray(h.body)?h.body.join(`
|
|
`):h.body),h.tabTrigger&&!h.trigger&&(!h.guard&&/^\w/.test(h.tabTrigger)&&(h.guard="\\b"),h.trigger=P.escapeRegExp(h.tabTrigger)),(h.trigger||h.guard||h.endTrigger||h.endGuard)&&(h.startRe=y(h.trigger,h.guard,!0),h.triggerRe=new RegExp(h.trigger),h.endRe=y(h.endTrigger,h.endGuard,!0),h.endTriggerRe=new RegExp(h.endTrigger))}e=e||[],Array.isArray(e)?e.forEach(I):Object.keys(e).forEach(function(h){I(e[h])}),this._signal("registerSnippets",{scope:r})},this.unregister=function(e,r){var a=this.snippetMap,o=this.snippetNameMap;function l(d){var y=o[d.scope||r];y&&y[d.name]&&(delete y[d.name],0<=(d=(y=a[d.scope||r])&&y.indexOf(d))&&y.splice(d,1))}e.content?l(e):Array.isArray(e)&&e.forEach(l)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var r,a,o,l=[],d={},y=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;a=y.exec(e);){if(a[1])try{d=JSON.parse(a[1]),l.push(d)}catch{}a[4]?(d.content=a[4].replace(/^\t/gm,""),l.push(d),d={}):(r=a[2],a=a[3],r=="regex"?(d.guard=(o=/\/((?:[^\/\\]|\\.)*)|$/g).exec(a)[1],d.trigger=o.exec(a)[1],d.endTrigger=o.exec(a)[1],d.endGuard=o.exec(a)[1]):r=="snippet"?(d.tabTrigger=a.match(/^\S*/)[0],d.name||(d.name=a)):r&&(d[r]=a))}return l},this.getSnippetByName=function(e,r){var a,o=this.snippetNameMap;return this.getActiveScopes(r).some(function(l){return l=o[l],!!(a=l?l[e]:a)},this),a}}).call(c.prototype);var s=function(e){if(e.tabstopManager)return e.tabstopManager;(e.tabstopManager=this).$onChange=this.onChange.bind(this),this.$onChangeSelection=P.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)},n=(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 r=e.action[0]=="r",a=this.selectedTabstop||{},o=a.parents||{},l=(this.tabstops||[]).slice(),d=0;d<l.length;d++){var y=l[d],I=y==a||o[y.index];if(y.rangeList.$bias=I?0:1,e.action=="remove"&&y!==a)for(var I=y.parents&&y.parents[a.index],h=(h=y.rangeList.pointIndex(e.start,I))<0?-h-1:h+1,I=(I=y.rangeList.pointIndex(e.end,I))<0?-I-1:I-1,u=y.rangeList.ranges.slice(h,I),b=0;b<u.length;b++)this.removeRange(u[b]);y.rangeList.$onChange(e)}var w=this.editor.session;this.$inChange||!r||w.getLength()!=1||w.getValue()||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var r=this.editor.session,a=r.getTextRange(e.firstNonLinked),o=0;o<e.length;o++){var l,d=e[o];d.linked&&(l=d.original,l=x.snippetManager.tmStrFormat(a,l,this.editor),r.replace(d,l))}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,r=this.editor.selection.anchor,a=this.editor.selection.isEmpty(),o=0;o<this.ranges.length;o++)if(!this.ranges[o].linked){var l=this.ranges[o].contains(e.row,e.column),d=a||this.ranges[o].contains(r.row,r.column);if(l&&d)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(a){var r=this.tabstops.length,a=this.index+(a||1),a=Math.min(Math.max(a,1),r);this.selectTabstop(a=a==r?0:a),a===0&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var r=this.tabstops[this.index];if(r&&this.addTabstopMarkers(r),this.index=e,(r=this.tabstops[this.index])&&r.length){if(e=(this.selectedTabstop=r).firstNonLinked||r,r.choices&&(e.cursor=e.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(e);else{var a=this.editor.multiSelect;a.toSingleRange(e);for(var o=0;o<r.length;o++)r.hasLinkedRanges&&r[o].linked||a.addRange(r[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,r,a){var o=this.useLink||!this.editor.getOption("enableMultiselect");this.$openTabstops||(this.$openTabstops=[]),e[0]||(a=V.fromPoints(a,a),i(a.start,r),i(a.end,r),e[0]=[a],e[0].index=0);var l=[this.index+1,0],d=this.ranges;e.forEach(function(y,I){for(var h=this.$openTabstops[I]||y,u=0;u<y.length;u++){var b=y[u],w=V.fromPoints(b.start,b.end||b.start);n(w.start,r),n(w.end,r),w.original=b,w.tabstop=h,d.push(w),h!=y?h.unshift(w):h[u]=w,b.fmtString||h.firstNonLinked&&o?(w.linked=!0,h.hasLinkedRanges=!0):h.firstNonLinked||(h.firstNonLinked=w)}h.firstNonLinked||(h.hasLinkedRanges=!1),h===y&&(l.push(h),this.$openTabstops[I]=h),this.addTabstopMarkers(h),h.rangeList=h.rangeList||new L,h.rangeList.$bias=0,h.rangeList.addList(h)},this),2<l.length&&(this.tabstops.length&&l.push(l.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,l))},this.addTabstopMarkers=function(e){var r=this.editor.session;e.forEach(function(a){a.markerId||(a.markerId=r.addMarker(a,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var r=this.editor.session;e.forEach(function(a){r.removeMarker(a.markerId),a.markerId=null})},this.removeRange=function(e){var r=e.tabstop.indexOf(e);r!=-1&&e.tabstop.splice(r,1),(r=this.ranges.indexOf(e))!=-1&&this.ranges.splice(r,1),(r=e.tabstop.rangeList.ranges.indexOf(e))!=-1&&e.tabstop.splice(r,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||((r=this.tabstops.indexOf(e.tabstop))!=-1&&this.tabstops.splice(r,1),this.tabstops.length||this.detach())},this.keyboardHandler=new C,this.keyboardHandler.bindKeys({Tab:function(e){x.snippetManager&&x.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(s.prototype),function(e,r){e.row==0&&(e.column+=r.column),e.row+=r.row}),i=function(e,r){e.row==r.row&&(e.column-=r.column),e.row-=r.row},t=(t.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),x.snippetManager=new c,X("./editor").Editor);(function(){this.insertSnippet=function(e,r){return x.snippetManager.insertSnippet(this,e,r)},this.expandSnippet=function(e){return x.snippetManager.expandWithTab(this,e)}}).call(t.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"],function(X,x,N){function O(A){return(A=new D(A)).$maxLines=4,(A=new P(A)).setHighlightActiveLine(!1),A.setShowPrintMargin(!1),A.renderer.setShowGutter(!1),A.renderer.setHighlightGutterLine(!1),A.$mouseHandler.$focusTimeout=0,A.$highlightTagPending=!0,A}var D=X("../virtual_renderer").VirtualRenderer,P=X("../editor").Editor,V=X("../range").Range,L=X("../lib/event"),C=X("../lib/lang"),m=X("../lib/dom");m.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.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;
|
|
}`,"autocompletion.css",!1),x.AcePopup=function(r){function S(){}function p(){e(-1)}var c,s=m.createElement("div"),n=new O(s),i=(r&&r.appendChild(s),s.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150),n.focus=S,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=S,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(a){var o=a.getDocumentPosition();n.selection.moveToPosition(o),t.start.row=t.end.row=o.row,a.stop()}),new V(-1,0,-1,1/0)),t=new V(-1,0,-1,1/0),e=(t.id=n.session.addMarker(t,"ace_active-line","fullLine"),n.setSelectOnHover=function(a){a?i.id&&(n.session.removeMarker(i.id),i.id=null):i.id=n.session.addMarker(i,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(a){var o;c?c.x==a.x&&c.y==a.y||((c=a).scrollTop=n.renderer.scrollTop,o=c.getDocumentPosition().row,i.start.row!=o&&(i.id||n.setRow(o),e(o))):c=a}),n.renderer.on("beforeRender",function(){var a;c&&i.start.row!=-1&&(c.$pos=null,a=c.getDocumentPosition().row,i.id||n.setRow(a),e(a,!0))}),n.renderer.on("afterRender",function(){var o=n.getRow(),a=n.renderer.$textLayer,o=a.element.childNodes[o-a.config.firstRow];o!==a.selectedNode&&a.selectedNode&&m.removeCssClass(a.selectedNode,"ace_selected"),(a.selectedNode=o)&&m.addCssClass(o,"ace_selected")}),function(a,o){a!==i.start.row&&(i.start.row=i.end.row=a,o||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))}),r=(n.getHoveredRow=function(){return i.start.row},L.addListener(n.container,"mouseout",p),n.on("hide",p),n.on("changeSelection",p),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(a){return a=n.data[a],typeof a=="string"?a:a&&a.value||""},n.session.bgTokenizer);return r.$tokenizeRow=function(a){var o=n.data[a],l=[];if(o){for(var d,y,I=(o=typeof o=="string"?{value:o}:o).caption||o.value||o.name,h=I.toLowerCase(),u=(n.filterText||"").toLowerCase(),b=0,w=0,v=0;v<=u.length;v++)v!=w&&(o.matchMask&1<<v||v==u.length)&&(d=u.slice(w,v),w=v,(y=h.indexOf(d,b))!=-1&&(R(I.slice(b,y),""),b=y+d.length,R(I.slice(y,b),"completion-highlight")));R(I.slice(b,I.length),""),o.meta&&l.push({type:"completion-meta",value:o.meta}),o.message&&l.push({type:"completion-message",value:o.message})}return l;function R(B,E){B&&l.push({type:(o.className||"")+(E||""),value:B})}},r.$updateOnChange=S,r.start=S,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText="",n.data=[],n.setData=function(a,o){n.filterText=o||"",n.setValue(C.stringRepeat(`
|
|
`,a.length),-1),n.data=a||[],n.setRow(0)},n.getData=function(a){return n.data[a]},n.getRow=function(){return t.start.row},n.setRow=function(a){a=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,a)),t.start.row!=a&&(n.selection.clearSelection(),t.start.row=t.end.row=a||0,n.session._emit("changeBackMarker"),n.moveCursorTo(a||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(a,o,w){var d=this.container,y=window.innerHeight,I=window.innerWidth,h=this.renderer,u=h.$maxLines*o*1.4,b=a.top+this.$borderSize,w=(y/2<b&&!w&&y<b+o+u?(h.$maxPixelHeight=b-2*this.$borderSize,d.style.top="",d.style.bottom=y-b+"px",n.isTopdown=!1):(h.$maxPixelHeight=y-(b+=o)-.2*o,d.style.top=b+"px",d.style.bottom="",n.isTopdown=!0),d.style.display="",a.left);w+d.offsetWidth>I&&(w=I-d.offsetWidth),d.style.left=w+"px",this._signal("show"),c=null,n.isOpen=!0},n.goTo=function(a){var o=this.getRow(),l=this.session.getLength()-1;switch(a){case"up":o=o<=0?l:o-1;break;case"down":o=l<=o?-1:o+1;break;case"start":o=0;break;case"end":o=l}this.setRow(o)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},x.$singleLineEditor=O}),ace.define("ace/autocomplete/util",["require","exports","module"],function(X,x,N){x.parForEach=function(D,P,V){var L=0,C=D.length;C===0&&V();for(var m=0;m<C;m++)P(D[m],function(A,S){++L===C&&V(A,S)})};var O=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;x.retrievePrecedingIdentifier=function(D,P,V){V=V||O;for(var L=[],C=P-1;0<=C&&V.test(D[C]);C--)L.push(D[C]);return L.reverse().join("")},x.retrieveFollowingIdentifier=function(D,P,V){V=V||O;for(var L=[],C=P;C<D.length&&V.test(D[C]);C++)L.push(D[C]);return L},x.getCompletionPrefix=function(D){var P,V=D.getCursorPosition(),L=D.session.getLine(V.row);return D.completers.forEach(function(C){C.identifierRegexps&&C.identifierRegexps.forEach(function(m){!P&&m&&(P=this.retrievePrecedingIdentifier(L,V.column,m))}.bind(this))}.bind(this)),P||this.retrievePrecedingIdentifier(L,V.column)}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],function(X,x,N){function O(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new D,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=L.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=L.delayedCall(this.updateDocTooltip.bind(this),50)}var D=X("./keyboard/hash_handler").HashHandler,P=X("./autocomplete/popup").AcePopup,V=X("./autocomplete/util"),L=X("./lib/lang"),C=X("./lib/dom"),m=X("./snippets").snippetManager,A=X("./config"),S=(function(){this.$init=function(){return this.popup=new P(document.body||document.documentElement),this.popup.on("click",function(p){this.insertMatch(),p.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(p,c,s){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),p.keyBinding.addKeyboardHandler(this.keyboardHandler);var n,i=p.renderer;this.popup.setRow(this.autoSelect?0:-1),s?c||this.detach():(this.popup.setTheme(p.getTheme()),this.popup.setFontSize(p.getFontSize()),s=i.layerConfig.lineHeight,(c=i.$cursorLayer.getPixelPosition(this.base,!0)).left-=this.popup.getTextLeftOffset(),n=p.container.getBoundingClientRect(),c.top+=n.top-i.layerConfig.offset,c.left+=n.left-p.renderer.scrollLeft,c.left+=i.gutterWidth,this.popup.show(c,s)),this.changeTimer.cancel()},this.detach=function(){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.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(p){var c=this.editor.selection.lead;(c.row!=this.base.row||c.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(p){var c=document.activeElement,s=this.editor.textInput.getElement(),n=p.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(p.relatedTarget),i=this.popup&&this.popup.container;c==s||c.parentNode==i||n||c==this.tooltipNode||p.relatedTarget==s||this.detach()},this.mousedownListener=function(p){this.detach()},this.mousewheelListener=function(p){this.detach()},this.goTo=function(p){this.popup.goTo(p)},this.insertMatch=function(p,c){if(!(p=p||this.popup.getData(this.popup.getRow())))return!1;var s=this.completions;if(this.editor.startOperation({command:{name:"insertMatch"}}),p.completer&&p.completer.insertMatch)p.completer.insertMatch(this.editor,p);else{if(!s)return!1;if(s.filterText)for(var n,i=this.editor.selection.getAllRanges(),t=0;n=i[t];t++)n.start.column-=s.filterText.length,this.editor.session.remove(n);p.snippet?m.insertSnippet(this.editor,p.snippet):this.editor.execCommand("insertstring",p.value||p)}this.completions==s&&this.detach(),this.editor.endOperation()},this.commands={Up:function(p){p.completer.goTo("up")},Down:function(p){p.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(p){p.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(p){p.completer.goTo("end")},Esc:function(p){p.completer.detach()},Return:function(p){return p.completer.insertMatch()},"Shift-Return":function(p){p.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(p){var c=p.completer.insertMatch();if(c||p.tabstopManager)return c;p.completer.goTo("down")},PageUp:function(p){p.completer.popup.gotoPageUp()},PageDown:function(p){p.completer.popup.gotoPageDown()}},this.gatherCompletions=function(p,c){var s=p.getSession(),n=p.getCursorPosition(),i=V.getCompletionPrefix(p),t=(this.base=s.doc.createAnchor(n.row,n.column-i.length),this.base.$insertRight=!0,[]),e=p.completers.length;return p.completers.forEach(function(r,a){r.getCompletions(p,s,n,i,function(o,l){!o&&l&&(t=t.concat(l)),c(null,{prefix:V.getCompletionPrefix(p),matches:t,finished:--e==0})})}),!0},this.showPopup=function(p,c){this.editor&&this.detach(),this.activated=!0,(this.editor=p).completer!=this&&(p.completer&&p.completer.detach(),p.completer=this),p.on("changeSelection",this.changeListener),p.on("blur",this.blurListener),p.on("mousedown",this.mousedownListener),p.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,c)},this.updateCompletions=function(p,c){var s,n,i,t,e,r,a;return p&&this.base&&this.completions?(s=this.editor.getCursorPosition(),(r=this.editor.session.getTextRange({start:this.base,end:s}))==this.completions.filterText?void 0:(this.completions.setFilter(r),this.completions.filtered.length&&(this.completions.filtered.length!=1||this.completions.filtered[0].value!=r||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,r,p):this.detach())):c&&c.matches?(s=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(s.row,s.column),this.base.$insertRight=!0,this.completions=new S(c.matches),this.openPopup(this.editor,"",p)):(n=this.gatherCompletionsId,i=function(o){if(o.finished)return this.detach()}.bind(this),t=function(o){var l=o.prefix,d=o.matches,d=(this.completions=new S(d),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(l),this.completions.filtered);return d.length&&(d.length!=1||d[0].value!=l||d[0].snippet)?this.autoInsert&&d.length==1&&o.finished?this.insertMatch(d[0]):void this.openPopup(this.editor,l,p):i(o)}.bind(this),e=!0,a=null,this.gatherCompletions(this.editor,function(o,l){var d=l.prefix,y=l&&l.matches;if(!y||!y.length)return i(l);d.indexOf(l.prefix)===0&&n==this.gatherCompletionsId&&(e?a=l:t(l))}.bind(this)),e=!1,void(a&&(r=a,a=null,t(r))))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var p=this.popup,c=p.data,s=c&&(c[p.getHoveredRow()]||c[p.getRow()]),n=null;return s&&this.editor&&this.popup.isOpen&&(this.editor.completers.some(function(i){return n=i.getDocTooltip?i.getDocTooltip(s):n}),(n=typeof(n=n||typeof s=="string"?n:s)=="string"?{docText:n}:n)&&(n.docHTML||n.docText))?void this.showDocTooltip(n):this.hideDocTooltip()},this.showDocTooltip=function(s){this.tooltipNode||(this.tooltipNode=C.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",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 c=this.tooltipNode,s=(s.docHTML?c.innerHTML=s.docHTML:s.docText&&(c.textContent=s.docText),c.parentNode||document.body.appendChild(c),this.popup),n=s.container.getBoundingClientRect();c.style.top=s.container.style.top,c.style.bottom=s.container.style.bottom,c.style.display="block",window.innerWidth-n.right<320?n.left<320?(s.isTopdown?c.style.top=n.bottom+"px":c.style.top=s.container.offsetTop-c.offsetHeight+"px",c.style.left=n.left+"px",c.style.right="",c.style.bottom=""):(c.style.right=window.innerWidth-n.left+"px",c.style.left=""):(c.style.left=n.right+1+"px",c.style.right="")},this.hideDocTooltip=function(){var p;this.tooltipTimer.cancel(),this.tooltipNode&&(p=this.tooltipNode,this.editor.isFocused()||document.activeElement!=p||this.editor.focus(),this.tooltipNode=null,p.parentNode&&p.parentNode.removeChild(p))},this.onTooltipClick=function(p){for(var c=p.target;c&&c!=this.tooltipNode;){if(c.nodeName=="A"&&c.href){c.rel="noreferrer",c.target="_blank";break}c=c.parentNode}},this.destroy=function(){var p;this.detach(),this.popup&&(this.popup.destroy(),(p=this.popup.container)&&p.parentNode&&p.parentNode.removeChild(p)),this.editor&&this.editor.completer==this&&this.editor.completer,this.popup=null}}.call(O.prototype),O.for=function(p){return p.completer||(A.get("sharedPopups")?(O.$shared||(O.$sharedInstance=new O),p.completer=O.$sharedInstance):(p.completer=new O,p.once("destroy",function(c,s){s.completer.destroy()}))),p.completer},O.startCommand={name:"startAutocomplete",exec:function(p,c){var s=O.for(p);s.autoInsert=!1,s.autoSelect=!0,s.showPopup(p,c),s.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"},function(p,c){this.all=p,this.filtered=p,this.filterText=c||"",this.exactMatch=!1});(function(){this.setFilter=function(p){c=p.length>this.filterText&&p.lastIndexOf(this.filterText,0)===0?this.filtered:this.all,this.filterText=p,c=(c=this.filterCompletions(c,this.filterText)).sort(function(n,i){return i.exactMatch-n.exactMatch||i.$score-n.$score||(n.caption||n.value).localeCompare(i.caption||i.value)});var c,s=null;c=c.filter(function(n){return n=n.snippet||n.caption||n.value,n!==s&&(s=n,!0)}),this.filtered=c},this.filterCompletions=function(p,c){var s=[],n=c.toUpperCase(),i=c.toLowerCase();e:for(var t,e=0;t=p[e];e++){var r=t.caption||t.value||t.snippet;if(r){var a=-1,o=0,l=0;if(this.exactMatch){if(c!==r.substr(0,c.length))continue}else{var d=r.toLowerCase().indexOf(i);if(-1<d)l=d;else for(var y=0;y<c.length;y++){var I=r.indexOf(i[y],a+1),h=r.indexOf(n[y],a+1);if((I=0<=I&&(h<0||I<h)?I:h)<0)continue e;0<(h=I-a-1)&&(a===-1&&(l+=10),l+=h,o|=1<<y),a=I}}t.matchMask=o,t.exactMatch=l?0:1,t.$score=(t.score||0)-l,s.push(t)}}return s}}).call(S.prototype),x.Autocomplete=O,x.FilteredList=S}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(X,x,N){var O=X("../range").Range,D=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function P(V,L){var C=V.getTextRange(O.fromPoints({row:0,column:0},L)).split(D).length-1,m=V.getValue().split(D),A=Object.create(null),S=m[C];return m.forEach(function(p,c){p&&p!==S&&(c=Math.abs(C-c),c=m.length-c,A[p]?A[p]=Math.max(c,A[p]):A[p]=c)}),A}x.getCompletions=function(V,L,C,m,A){var S=P(L,C);A(null,Object.keys(S).map(function(p){return{caption:p,value:p,score:S[p],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(X,x,N){function O(t,e){s(e.session.$mode)}function D(t){var e=t.editor,r=e.completer&&e.completer.activated;t.command.name==="backspace"?r&&!m.getCompletionPrefix(e)&&e.completer.detach():t.command.name==="insertstring"&&m.getCompletionPrefix(e)&&!r&&((t=V.for(e)).autoInsert=!1,t.showPopup(e))}var P=X("../snippets").snippetManager,V=X("../autocomplete").Autocomplete,L=X("../config"),C=X("../lib/lang"),m=X("../autocomplete/util"),i=X("../autocomplete/text_completer"),A={getCompletions:function(t,e,r,a,o){if(e.$mode.completer)return e.$mode.completer.getCompletions(t,e,r,a,o);t=t.session.getState(r.row),o(null,e.$mode.getCompletions(t,e,r,a))}},S={getCompletions:function(t,d,r,a,o){var l=[],d=d.getTokenAt(r.row,r.column),y=(d&&d.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?l.push("html-tag"):l=P.getActiveScopes(t),P.snippetMap),I=[];l.forEach(function(h){for(var u=y[h]||[],b=u.length;b--;){var w=u[b],v=w.name||w.tabTrigger;v&&I.push({caption:v,snippet:w.content,meta:w.tabTrigger&&!w.name?w.tabTrigger+"\u21E5 ":"snippet",type:"snippet"})}},this),o(null,I)},getDocTooltip:function(t){var e;t.type!="snippet"||t.docHTML||(t.docHTML=["<b>",C.escapeHTML(t.caption),"</b>","<hr></hr>",C.escapeHTML((t=t.snippet,e={},t.replace(/\${(\d+)(:(.*?))?}/g,function(r,a,o,l){return e[a]=l||""}).replace(/\$(\d+?)/g,function(r,a){return e[a]})))].join(""))}},p=[S,i,A],c=(x.setCompleters=function(t){p.length=0,t&&p.push.apply(p,t)},x.addCompleter=function(t){p.push(t)},x.textCompleter=i,x.keyWordCompleter=A,x.snippetCompleter=S,{name:"expandSnippet",exec:function(t){return P.expandWithTab(t)},bindKey:"Tab"}),s=function(t){(t=typeof t=="string"?L.$modes[t]:t)&&(P.files||(P.files={}),n(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(s))},n=function(t,e){e&&t&&!P.files[t]&&(P.files[t]={},L.loadModule(e,function(r){r&&(!(P.files[t]=r).snippets&&r.snippetText&&(r.snippets=P.parseSnippetFile(r.snippetText)),P.register(r.snippets||[],r.scope),r.includeScopes&&(P.snippetMap[r.scope].includeScopes=r.includeScopes,r.includeScopes.forEach(function(a){s("ace/mode/"+a)})))}))},i=X("../editor").Editor;X("../config").defineOptions(i.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:p),this.commands.addCommand(V.startCommand)):this.commands.removeCommand(V.startCommand)},value:!1},enableLiveAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:p),this.commands.on("afterExec",D)):this.commands.removeListener("afterExec",D)},value:!1},enableSnippets:{set:function(t){t?(this.commands.addCommand(c),this.on("changeMode",O),O(0,this)):(this.commands.removeCommand(c),this.off("changeMode",O))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(X){ie&&(ie.exports=X)})},3330:function(ie,g,H){ie=H.nmd(ie),ace.define("ace/ext/searchbox.css",["require","exports","module"],function(X,x,N){N.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"],function(X,x,N){function O(A,S,p){var c=D.createElement("div");D.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:"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"},"All"]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:"Replace with",spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},"Replace"],["span",{action:"replaceAll",class:"ace_searchbtn"},"All"]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:"Toggle Replace mode",style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:"RegExp Search"},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:"CaseSensitive Search"},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:"Whole Word Search"},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:"Search In Selection"},"S"]]],c),this.element=c.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(A),D.importCssString(L,"ace_searchbox",A.container)}var D=X("../lib/dom"),P=X("../lib/lang"),V=X("../lib/event"),L=X("./searchbox.css"),C=X("../keyboard/hash_handler").HashHandler,m=X("../lib/keys");D.importCssString(L,"ace_searchbox",!1),function(){this.setEditor=function(A){A.searchBox=this,A.renderer.scroller.appendChild(this.element),this.editor=A},this.setSession=function(A){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(A){this.searchBox=A.querySelector(".ace_search_form"),this.replaceBox=A.querySelector(".ace_replace_form"),this.searchOption=A.querySelector("[action=searchInSelection]"),this.replaceOption=A.querySelector("[action=toggleReplace]"),this.regExpOption=A.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=A.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=A.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=A.querySelector(".ace_search_counter")},this.$init=function(){var A=this.element,S=(this.$initElements(A),this);V.addListener(A,"mousedown",function(p){setTimeout(function(){S.activeInput.focus()},0),V.stopPropagation(p)}),V.addListener(A,"click",function(p){var c=(p.target||p.srcElement).getAttribute("action");c&&S[c]?S[c]():S.$searchBarKb.commands[c]&&S.$searchBarKb.commands[c].exec(S),V.stopPropagation(p)}),V.addCommandKeyListener(A,function(p,c,s){s=m.keyCodeToString(s),c=S.$searchBarKb.findKeyCommand(c,s),c&&c.exec&&(c.exec(S),V.stopEvent(p))}),this.$onChange=P.delayedCall(function(){S.find(!1,!1)}),V.addListener(this.searchInput,"input",function(){S.$onChange.schedule(20)}),V.addListener(this.searchInput,"focus",function(){S.activeInput=S.searchInput,S.searchInput.value&&S.highlight()}),V.addListener(this.replaceInput,"focus",function(){S.activeInput=S.replaceInput,S.searchInput.value&&S.highlight()})},this.$closeSearchBarKb=new C([{bindKey:"Esc",name:"closeSearchBar",exec:function(A){A.searchBox.hide()}}]),this.$searchBarKb=new C,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(A){var S=A.isReplace=!A.isReplace;A.replaceBox.style.display=S?"":"none",A.replaceOption.checked=!1,A.$syncOptions(),A.searchInput.focus()},"Ctrl-H|Command-Option-F":function(A){A.editor.getReadOnly()||(A.replaceOption.checked=!0,A.$syncOptions(),A.replaceInput.focus())},"Ctrl-G|Command-G":function(A){A.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(A){A.findPrev()},esc:function(A){setTimeout(function(){A.hide()})},Return:function(A){A.activeInput==A.replaceInput&&A.replace(),A.findNext()},"Shift-Return":function(A){A.activeInput==A.replaceInput&&A.replace(),A.findPrev()},"Alt-Return":function(A){A.activeInput==A.replaceInput&&A.replaceAll(),A.findAll()},Tab:function(A){(A.activeInput==A.replaceInput?A.searchInput:A.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(A){A.regExpOption.checked=!A.regExpOption.checked,A.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(A){A.caseSensitiveOption.checked=!A.caseSensitiveOption.checked,A.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(A){A.wholeWordOption.checked=!A.wholeWordOption.checked,A.$syncOptions()}},{name:"toggleReplace",exec:function(A){A.replaceOption.checked=!A.replaceOption.checked,A.$syncOptions()}},{name:"searchInSelection",exec:function(A){A.searchOption.checked=!A.searchRange,A.setSearchRange(A.searchOption.checked&&A.editor.getSelectionRange()),A.$syncOptions()}}]),this.setSearchRange=function(A){(this.searchRange=A)?this.searchRangeMarker=this.editor.session.addMarker(A,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(A){D.setCssClass(this.replaceOption,"checked",this.searchRange),D.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",D.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),D.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),D.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var S=this.editor.getReadOnly();this.replaceOption.style.display=S?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!S?"":"none",this.find(!1,!1,A)},this.highlight=function(A){this.editor.session.highlight(A||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(A,S,p){A=!this.editor.find(this.searchInput.value,{skipCurrent:A,backwards:S,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:p,range:this.searchRange})&&this.searchInput.value,D.setCssClass(this.searchBox,"ace_nomatch",A),this.editor._emit("findSearchBox",{match:!A}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var A=this.editor,S=A.$search.$options.re,p=0,c=0;if(S){var s,n,i=this.searchRange?A.session.getTextRange(this.searchRange):A.getValue(),t=A.session.doc.positionToIndex(A.selection.anchor);for(this.searchRange&&(t-=A.session.doc.positionToIndex(this.searchRange.start)),S.lastIndex=0;(n=S.exec(i))&&((s=n.index)<=t&&c++,!(999<++p))&&(n[0]||(S.lastIndex=s+=1,!(s>=i.length))););}this.searchCounter.textContent=c+" of "+(999<p?"999+":p)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var A=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;D.setCssClass(this.searchBox,"ace_nomatch",A),this.editor._emit("findSearchBox",{match:!A}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.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()},this.show=function(A,S){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=S,A&&(this.searchInput.value=A),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var A=document.activeElement;return A==this.searchInput||A==this.replaceInput}}.call(O.prototype),x.SearchBox=O,x.Search=function(A,S){(A.searchBox||new O(A)).show(A.session.getTextRange(),S)}}),ace.require(["ace/ext/searchbox"],function(X){ie&&(ie.exports=X)})},4091:function(ie,g,H){ie=H.nmd(ie),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(P,x,N){function O(){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 D=P("../lib/oop"),P=P("./text_highlight_rules").TextHighlightRules;D.inherits(O,P),x.JsonHighlightRules=O}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(X,x,N){function O(){}var D=X("../range").Range;(function(){this.checkOutdent=function(P,V){return!!/^\s+$/.test(P)&&/^\s*\}/.test(V)},this.autoOutdent=function(P,V){var L,C=P.getLine(V).match(/^(\s*\})/);return C&&(C=C[1].length,(L=P.findMatchingBracket({row:V,column:C}))&&L.row!=V)?(L=this.$getIndent(P.getLine(L.row)),void P.replace(new D(V,0,V,C-1),L)):0},this.$getIndent=function(P){return P.match(/^\s*/)[0]}}).call(O.prototype),x.MatchingBraceOutdent=O}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(P,V,N){var O=P("../../lib/oop"),D=P("../../range").Range,P=P("./fold_mode").FoldMode,V=V.FoldMode=function(L){L&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+L.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+L.end)))};O.inherits(V,P),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(L,C,m){var A=L.getLine(m);return!this.singleLineBlockCommentRe.test(A)||this.startRegionRe.test(A)||this.tripleStarBlockCommentRe.test(A)?!(L=this._getFoldWidgetBase(L,C,m))&&this.startRegionRe.test(A)?"start":L:""},this.getFoldWidgetRange=function(L,C,m,A){var S,p,c,s=L.getLine(m);return this.startRegionRe.test(s)?this.getCommentRegionBlock(L,s,m):(p=s.match(this.foldingStartMarker))?(c=p.index,p[1]?this.openingBracketBlock(L,p[1],m,c):((S=L.getCommentFoldRange(m,c+p[0].length,1))&&!S.isMultiLine()&&(A?S=this.getSectionRange(L,m):C!="all"&&(S=null)),S)):C!=="markbegin"&&(p=s.match(this.foldingStopMarker))?(c=p.index+p[0].length,p[1]?this.closingBracketBlock(L,p[1],m,c):L.getCommentFoldRange(m,c,-1)):void 0},this.getSectionRange=function(L,C){for(var m=(s=L.getLine(C)).search(/\S/),A=C,S=s.length,p=C+=1,c=L.getLength();++C<c;){var s,n=(s=L.getLine(C)).search(/\S/);if(n!==-1){if(n<m)break;var i=this.getFoldWidgetRange(L,"all",C);if(i){if(i.start.row<=A)break;if(i.isMultiLine())C=i.end.row;else if(m==n)break}p=C}}return new D(A,S,p,L.getLine(p).length)},this.getCommentRegionBlock=function(L,C,m){for(var A=C.search(/\s*$/),S=L.getLength(),p=m,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++m<S;){C=L.getLine(m);var n=c.exec(C);if(n&&(n[1]?s--:s++,!s))break}if(p<m)return new D(p,A,m,C.length)}}.call(V.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(X,x,N){function O(){this.HighlightRules=V,this.$outdent=new L,this.$behaviour=new C,this.foldingRules=new m}var D=X("../lib/oop"),P=X("./text").Mode,V=X("./json_highlight_rules").JsonHighlightRules,L=X("./matching_brace_outdent").MatchingBraceOutdent,C=X("./behaviour/cstyle").CstyleBehaviour,m=X("./folding/cstyle").FoldMode,A=X("../worker/worker_client").WorkerClient;D.inherits(O,P),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(S,p,c){var s=this.$getIndent(p);return S=="start"&&p.match(/^.*[\{\(\[]\s*$/)&&(s+=c),s},this.checkOutdent=function(S,p,c){return this.$outdent.checkOutdent(p,c)},this.autoOutdent=function(S,p,c){this.$outdent.autoOutdent(p,c)},this.createWorker=function(S){var p=new A(["ace"],"ace/mode/json_worker","JsonWorker");return p.attachToDocument(S.getDocument()),p.on("annotate",function(c){S.setAnnotations(c.data)}),p.on("terminate",function(){S.clearAnnotations()}),p},this.$id="ace/mode/json"}.call(O.prototype),x.Mode=O}),ace.require(["ace/mode/json"],function(X){ie&&(ie.exports=X)})},8903:function(m,g,H){var X=H(5689),x=H(3969),N=H(5255),O=H(4293),D=H(3508),P=H(3368),V=H(742),L=H(9394),C=H(3724),m=((m.exports=c).prototype.validate=function(o,l){var d;if(typeof o=="string"){if(!(d=this.getSchema(o)))throw new Error('no schema with key or ref "'+o+'"')}else o=this._addSchema(o),d=o.validate||this._compile(o);return o=d(l),d.$async!==!0&&(this.errors=d.errors),o},c.prototype.compile=function(o,l){return o=this._addSchema(o,void 0,l),o.validate||this._compile(o)},c.prototype.addSchema=function(o,l,d,y){if(Array.isArray(o))for(var I=0;I<o.length;I++)this.addSchema(o[I],void 0,d,y);else{var h=this._getId(o);if(h!==void 0&&typeof h!="string")throw new Error("schema id must be string");r(this,l=x.normalizeId(l||h)),this._schemas[l]=this._addSchema(o,d,y,!0)}return this},c.prototype.addMetaSchema=function(o,l,d){return this.addSchema(o,l,d,!0),this},c.prototype.validateSchema=function(o,l){var d=o.$schema;if(d!==void 0&&typeof d!="string")throw new Error("$schema must be a string");if(!(d=d||this._opts.defaultMeta||function(y){var I=y._opts.meta;return y._opts.defaultMeta=typeof I=="object"?y._getId(I)||I:y.getSchema(A)?A:void 0,y._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);if(d=this.validate(d,o),!d&&l){if(o="schema is invalid: "+this.errorsText(),this._opts.validateSchema!="log")throw new Error(o);this.logger.error(o)}return d},c.prototype.getSchema=function(o){var l=s(this,o);switch(typeof l){case"object":return l.validate||this._compile(l);case"string":return this.getSchema(l);case"undefined":return function(d,y){var I=x.schema.call(d,{schema:{}},y);{var h,u,b;if(I)return h=I.schema,u=I.root,I=I.baseId,b=X.call(d,h,u,void 0,I),d._fragments[y]=new O({ref:y,fragment:!0,schema:h,root:u,baseId:I,validate:b}),b}}(this,o)}},c.prototype.removeSchema=function(o){if(o instanceof RegExp)n(this,this._schemas,o),n(this,this._refs,o);else switch(typeof o){case"undefined":return n(this,this._schemas),n(this,this._refs),this._cache.clear(),this;case"string":var l=s(this,o);return l&&this._cache.del(l.cacheKey),delete this._schemas[o],delete this._refs[o],this;case"object":l=this._opts.serialize,l=l?l(o):o,l=(this._cache.del(l),this._getId(o)),l&&(l=x.normalizeId(l),delete this._schemas[l],delete this._refs[l])}return this},c.prototype.addFormat=function(o,l){return typeof l=="string"&&(l=new RegExp(l)),this._formats[o]=l,this},c.prototype.errorsText=function(o,l){if(!(o=o||this.errors))return"No errors";for(var d=(l=l||{}).separator===void 0?", ":l.separator,y=l.dataVar===void 0?"data":l.dataVar,I="",h=0;h<o.length;h++){var u=o[h];u&&(I+=y+u.dataPath+" "+u.message+d)}return I.slice(0,-d.length)},c.prototype._addSchema=function(o,b,d,y){if(typeof o!="object"&&typeof o!="boolean")throw new Error("schema should be object or boolean");var I=this._opts.serialize,I=I?I(o):o,h=this._cache.get(I);if(h)return h;y=y||this._opts.addUsedSchema!==!1,h=x.normalizeId(this._getId(o)),h&&y&&r(this,h);var u,b=this._opts.validateSchema!==!1&&!b;b&&!(u=h&&h==x.normalizeId(o.$schema))&&this.validateSchema(o,!0);var w=x.ids.call(this,o),w=new O({id:h,schema:o,localRefs:w,cacheKey:I,meta:d});return h[0]!="#"&&y&&(this._refs[h]=w),this._cache.put(I,w),b&&u&&this.validateSchema(o,!0),w},c.prototype._compile=function(o,l){if(o.compiling)return(o.validate=I).schema=o.schema,I.errors=null,I.root=l||I,o.schema.$async===!0&&(I.$async=!0),I;var d,y;o.compiling=!0,o.meta&&(d=this._opts,this._opts=this._metaOpts);try{y=X.call(this,o.schema,l,o.localRefs)}catch(h){throw delete o.validate,h}finally{o.compiling=!1,o.meta&&(this._opts=d)}return o.validate=y,o.refs=y.refs,o.refVal=y.refVal,o.root=y.root,y;function I(){var h=o.validate,u=h.apply(this,arguments);return I.errors=h.errors,u}},c.prototype.compileAsync=H(9677),H(7931)),m=(c.prototype.addKeyword=m.add,c.prototype.getKeyword=m.get,c.prototype.removeKeyword=m.remove,c.prototype.validateKeyword=m.validate,H(5359)),A=(c.ValidationError=m.Validation,c.MissingRefError=m.MissingRef,c.$dataMetaSchema=L,"http://json-schema.org/draft-07/schema"),S=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],p=["/properties"];function c(o){if(!(this instanceof c))return new c(o);o=this._opts=C.copy(o)||{};var v=this,l=v._opts.logger;if(l===!1)v.logger={log:a,warn:a,error:a};else{if(!(typeof(l=l===void 0?console:l)=="object"&&l.log&&l.warn&&l.error))throw new Error("logger must implement log, warn and error methods");v.logger=l}if(this._schemas={},this._refs={},this._fragments={},this._formats=P(o.format),this._cache=o.cache||new N,this._loadingSchemas={},this._compilations=[],this.RULES=V(),this._getId=function(T){switch(T.schemaId){case"auto":return e;case"id":return i;default:return t}}(o),o.loopRequired=o.loopRequired||1/0,o.errorDataPath=="property"&&(o._errorDataPathProperty=!0),o.serialize===void 0&&(o.serialize=D),this._metaOpts=function(T){for(var G=C.copy(T._opts),F=0;F<S.length;F++)delete G[S[F]];return G}(this),o.formats){var d,y=this;for(d in y._opts.formats){var I=y._opts.formats[d];y.addFormat(d,I)}}if(o.keywords){var h,u=this;for(h in u._opts.keywords){var b=u._opts.keywords[h];u.addKeyword(h,b)}}var w,v=this,R=(v._opts.$data&&(w=H(894),v.addMetaSchema(w,w.$id,!0)),v._opts.meta!==!1&&(w=H(6680),v._opts.$data&&(w=L(w,p)),v.addMetaSchema(w,A,!0),v._refs["http://json-schema.org/schema"]=A),typeof o.meta=="object"&&this.addMetaSchema(o.meta),o.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),this),B=R._opts.schemas;if(B)if(Array.isArray(B))R.addSchema(B);else for(var E in B)R.addSchema(B[E],E)}function s(o,l){return l=x.normalizeId(l),o._schemas[l]||o._refs[l]||o._fragments[l]}function n(o,l,d){for(var y in l){var I=l[y];I.meta||d&&!d.test(y)||(o._cache.del(I.cacheKey),delete l[y])}}function i(o){return o.$id&&this.logger.warn("schema $id ignored",o.$id),o.id}function t(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 r(o,l){if(o._schemas[l]||o._refs[l])throw new Error('schema with key or id "'+l+'" already exists')}function a(){}},5255:function(ie){ie=ie.exports=function(){this._cache={}},ie.prototype.put=function(g,H){this._cache[g]=H},ie.prototype.get=function(g){return this._cache[g]},ie.prototype.del=function(g){delete this._cache[g]},ie.prototype.clear=function(){this._cache={}}},9677:function(ie,g,H){var X=H(5359).MissingRef;function x(N,O,D){var P=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof O=="function"&&(D=O,O=void 0);var V=L(N).then(function(){var C=P._addSchema(N,void 0,O);return C.validate||function m(A){try{return P._compile(A)}catch(p){if(p instanceof X)return S(p);throw p}function S(p){var c=p.missingSchema;if(n(c))throw new Error("Schema "+c+" is loaded but "+p.missingRef+" cannot be resolved");return p=P._loadingSchemas[c],p||(p=P._loadingSchemas[c]=P._opts.loadSchema(c)).then(s,s),p.then(function(i){if(!n(c))return L(i).then(function(){n(c)||P.addSchema(i,c,void 0,O)})}).then(function(){return m(A)});function s(){delete P._loadingSchemas[c]}function n(i){return P._refs[i]||P._schemas[i]}}}(C)});return D&&V.then(function(C){D(null,C)},D),V;function L(C){return C=C.$schema,C&&!P.getSchema(C)?x.call(P,{$ref:C},!0):Promise.resolve()}}ie.exports=x},5359:function(ie,g,H){var X=H(3969);function x(O,D,P){this.message=P||x.message(O,D),this.missingRef=X.url(O,D),this.missingSchema=X.normalizeId(X.fullPath(this.missingRef))}function N(O){return O.prototype=Object.create(Error.prototype),O.prototype.constructor=O}ie.exports={Validation:N(function(O){this.message="validation failed",this.errors=O,this.ajv=this.validation=!0}),MissingRef:N(x)},x.message=function(O,D){return"can't resolve reference "+D+" from id "+O}},3368:function(ie,g,D){var X=D(3724),x=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,N=[0,31,28,31,30,31,30,31,31,30,31,30,31],O=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,D=/^(?=.{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,P=/^(?:[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,V=/^(?:(?:[^\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,L=/^(?:(?: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,C=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,m=/^(?:\/(?:[^~/]|~0|~1)*)*$/,A=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,S=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function p(r){return X.copy(p[r=r=="full"?"full":"fast"])}function c(l){var a,o,l=l.match(x);return!!l&&(a=+l[1],o=+l[2],l=+l[3],1<=o&&o<=12&&1<=l&&l<=(o!=2||(l=a)%4!=0||l%100==0&&l%400!=0?N[o]:29))}function s(y,a){var o,l,d,y=y.match(O);return!!y&&(o=y[1],l=y[2],d=y[3],y=y[5],(o<=23&&l<=59&&d<=59||o==23&&l==59&&d==60)&&(!a||y))}(ie.exports=p).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":V,url:L,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:D,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:C,"json-pointer":m,"json-pointer-uri-fragment":A,"relative-json-pointer":S},p.full={date:c,time:s,"date-time":function(r){return r=r.split(n),r.length==2&&c(r[0])&&s(r[1],!0)},uri:function(r){return i.test(r)&&P.test(r)},"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":V,url:L,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:D,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:C,"json-pointer":m,"json-pointer-uri-fragment":A,"relative-json-pointer":S};var n=/t|\s/i,i=/\/|:/,t=/[^\\]\\Z/;function e(r){if(t.test(r))return!1;try{return new RegExp(r),!0}catch{return!1}}},5689:function(ie,g,H){var X=H(3969),x=H(3724),N=H(5359),O=H(3508),D=H(1869),P=x.ucs2length,V=H(2303),L=N.Validation;function C(n,i,t,e){var r=this,a=this._opts,o=[void 0],l={},d=[],y={},I=[],h={},u=[],b=(i=i||{schema:n,refVal:o,refs:l},function(W,f,k){var $=m.call(this,W,f,k);return 0<=$?{index:$,compiling:!0}:($=this._compilations.length,this._compilations[$]={schema:W,root:f,baseId:k},{index:$,compiling:!1})}.call(this,n,i,e)),w=this._compilations[b.index];if(b.compiling)return w.callValidate=T;var v=this._formats,R=this.RULES;try{var B=G(n,i,t,e),E=(w.validate=B,w.callValidate);return E&&(E.schema=B.schema,E.errors=null,E.refs=B.refs,E.refVal=B.refVal,E.root=B.root,E.$async=B.$async,a.sourceCode&&(E.source=B.source)),B}finally{(function(W,f,k){W=m.call(this,W,f,k),0<=W&&this._compilations.splice(W,1)}).call(this,n,i,e)}function T(){var W=w.validate,f=W.apply(this,arguments);return T.errors=W.errors,f}function G(W,f,k,$){var M=!f||f.schema==W;if(f.schema!=i.schema)return C.call(r,W,f,k,$);k=W.$async===!0,$=D({isTop:!0,schema:W,isRoot:M,baseId:$,root:f,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:N.MissingRef,RULES:R,validate:D,util:x,resolve:X,resolveRef:F,usePattern:Y,useDefault:_,useCustomRule:Z,opts:a,formats:v,logger:r.logger,self:r}),$=s(o,p)+s(d,A)+s(I,S)+s(u,c)+$,a.processCode&&($=a.processCode($,W));try{var j=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",$)(r,R,v,i,o,I,u,V,P,L);o[0]=j}catch(Q){throw r.logger.error("Error compiling schema, function code:",$),Q}return j.schema=W,j.errors=null,j.refs=l,j.refVal=o,j.root=M?j:f,k&&(j.$async=!0),a.sourceCode===!0&&(j.source={code:$,patterns:d,defaults:I}),j}function F(W,f,Q){f=X.url(W,f);var $=l[f];if($!==void 0)return K(M=o[$],j="refVal["+$+"]");if(!Q&&i.refs&&($=i.refs[f],$!==void 0))return K(M=i.refVal[$],j=z(f,M));var M,j=z(f),Q=X.call(r,G,i,f);if(Q!==void 0||($=t&&t[f])&&(Q=X.inlineRef($,a.inlineRefs)?$:C.call(r,$,i,t,W)),Q!==void 0)return M=Q,$=l[$=f],o[$]=M,K(Q,j);delete l[f]}function z(W,f){var k=o.length;return o[k]=f,"refVal"+(l[W]=k)}function K(W,f){return typeof W=="object"||typeof W=="boolean"?{code:f,schema:W,inline:!0}:{code:f,$async:W&&!!W.$async}}function Y(W){var f=y[W];return f===void 0&&(f=y[W]=d.length,d[f]=W),"pattern"+f}function _(W){switch(typeof W){case"boolean":case"number":return""+W;case"string":return x.toQuotedString(W);case"object":var f,k;return W===null?"null":(f=O(W),(k=h[f])===void 0&&(k=h[f]=I.length,I[k]=W),"default"+k)}}function Z(W,f,k,$){if(r._opts.validateSchema!==!1){var j=W.definition.dependencies;if(j&&!j.every(function(Ae){return Object.prototype.hasOwnProperty.call(k,Ae)}))throw new Error("parent schema must have all required keywords: "+j.join(","));if(j=W.definition.validateSchema,j&&!j(f)){if(j="keyword schema is invalid: "+r.errorsText(j.errors),r._opts.validateSchema!="log")throw new Error(j);r.logger.error(j)}}var M,j=W.definition.compile,Q=W.definition.inline,te=W.definition.macro;if(j)M=j.call(r,f,k,$);else if(te)M=te.call(r,f,k,$),a.validateSchema!==!1&&r.validateSchema(M,!0);else if(Q)M=Q.call(r,$,W.keyword,f,k);else if(!(M=W.definition.validate))return;if(M===void 0)throw new Error('custom keyword "'+W.keyword+'"failed to compile');return j=u.length,{code:"customRule"+j,validate:u[j]=M}}}function m(n,i,t){for(var e=0;e<this._compilations.length;e++){var r=this._compilations[e];if(r.schema==n&&r.root==i&&r.baseId==t)return e}return-1}function A(n,i){return"var pattern"+n+" = new RegExp("+x.toQuotedString(i[n])+");"}function S(n){return"var default"+n+" = defaults["+n+"];"}function p(n,i){return i[n]===void 0?"":"var refVal"+n+" = refVal["+n+"];"}function c(n){return"var customRule"+n+" = customRules["+n+"];"}function s(n,i){if(!n.length)return"";for(var t="",e=0;e<n.length;e++)t+=i(e,n);return t}ie.exports=C},3969:function(ie,g,H){var X=H(7533),x=H(2303),N=H(3724),O=H(4293),D=H(500);function P(i,t,e){var r,a,o,l=this._refs[e];if(typeof l=="string"){if(!this._refs[l])return P.call(this,i,t,l);l=this._refs[l]}return(l=l||this._schemas[e])instanceof O?A(l.schema,this._opts.inlineRefs)?l.schema:l.validate||this._compile(l):((l=V.call(this,t,e))&&(r=l.schema,t=l.root,o=l.baseId),r instanceof O?a=r.validate||i.call(this,r.schema,t,void 0,o):r!==void 0&&(a=A(r,this._opts.inlineRefs)?r:i.call(this,r,t,void 0,o)),a)}function V(i,t){var e=X.parse(t),r=p(e),a=S(this._getId(i.schema));if(Object.keys(i.schema).length===0||r!==a){var r=s(r),o=this._refs[r];if(typeof o=="string")return function(d,y,I){y=V.call(this,d,y);{var h,u;if(y)return h=y.schema,u=y.baseId,d=y.root,(y=this._getId(h))&&(u=n(u,y)),C.call(this,I,u,h,d)}}.call(this,i,o,e);if(o instanceof O)o.validate||this._compile(o);else{if(!((o=this._schemas[r])instanceof O))return;if(o.validate||this._compile(o),r==s(t))return{schema:o,root:i,baseId:a}}if(!(i=o).schema)return;a=S(this._getId(i.schema))}return C.call(this,e,a,i.schema,i)}(ie.exports=P).normalizeId=s,P.fullPath=S,P.url=n,P.ids=function(i){var t=s(this._getId(i)),e={"":t},r={"":S(t,!1)},a={},o=this;return D(i,{allKeys:!0},function(l,d,y,I,h,u,b){if(d!==""){var w=o._getId(l),v=e[I],I=r[I]+"/"+h;if(b!==void 0&&(I+="/"+(typeof b=="number"?b:N.escapeFragment(b))),typeof w=="string"){if(w=v=s(v?X.resolve(v,w):w),h=o._refs[w],(h=typeof h=="string"?o._refs[h]:h)&&h.schema){if(!x(l,h.schema))throw new Error('id "'+w+'" resolves to more than one schema')}else if(w!=s(I))if(w[0]=="#"){if(a[w]&&!x(l,a[w]))throw new Error('id "'+w+'" resolves to more than one schema');a[w]=l}else o._refs[w]=I}e[d]=v,r[d]=I}}),a},P.inlineRef=A,P.schema=V;var L=N.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function C(i,t,e,r){if(i.fragment=i.fragment||"",i.fragment.slice(0,1)=="/"){for(var a=i.fragment.split("/"),o=1;o<a.length;o++){var l=a[o];if(l){if((e=e[l=N.unescapeFragment(l)])===void 0)break;L[l]||((l=this._getId(e))&&(t=n(t,l)),e.$ref&&(l=n(t,e.$ref),(l=V.call(this,r,l))&&(e=l.schema,r=l.root,t=l.baseId)))}}return e!==void 0&&e!==r.schema?{schema:e,root:r,baseId:t}:void 0}}var m=N.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function A(i,t){return t!==!1&&(t===void 0||t===!0?function e(r){var a;if(Array.isArray(r)){for(var o=0;o<r.length;o++)if(typeof(a=r[o])=="object"&&!e(a))return!1}else for(var l in r)if(l=="$ref"||typeof(a=r[l])=="object"&&!e(a))return!1;return!0}(i):t?function e(r){var a,o=0;if(Array.isArray(r)){for(var l=0;l<r.length;l++)if(typeof(a=r[l])=="object"&&(o+=e(a)),o==1/0)return 1/0}else for(var d in r){if(d=="$ref")return 1/0;if(m[d])o++;else if(typeof(a=r[d])=="object"&&(o+=e(a)+1),o==1/0)return 1/0}return o}(i)<=t:void 0)}function S(i,t){return t!==!1&&(i=s(i)),p(X.parse(i))}function p(i){return X.serialize(i).split("#")[0]+"#"}var c=/#\/?$/;function s(i){return i?i.replace(c,""):""}function n(i,t){return t=s(t),X.resolve(i,t)}},742:function(ie,g,H){var X=H(9646),x=H(3724).toHash;ie.exports=function(){var N=[{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"]}],O=["type","$comment"];return N.all=x(O),N.types=x(["number","integer","string","array","object","boolean","null"]),N.forEach(function(D){D.rules=D.rules.map(function(P){var V,L;return typeof P=="object"&&(L=P[V=Object.keys(P)[0]],P=V,L.forEach(function(C){O.push(C),N.all[C]=!0})),O.push(P),N.all[P]={keyword:P,code:X[P],implements:L}}),N.all.$comment={keyword:"$comment",code:X.$comment},D.type&&(N.types[D.type]=D)}),N.keywords=x(O.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),N.custom={},N}},4293:function(ie,g,H){var X=H(3724);ie.exports=function(x){X.copy(x,this)}},6887:function(ie){ie.exports=function(g){for(var H,X=0,x=g.length,N=0;N<x;)X++,55296<=(H=g.charCodeAt(N++))&&H<=56319&&N<x&&(64512&(H=g.charCodeAt(N)))==56320&&N++;return X}},3724:function(ie,g,H){function X(c,s,n,i){var t=i?" !== ":" === ",e=i?" || ":" && ",r=i?"!":"",a=i?"":"!";switch(c){case"null":return s+t+"null";case"array":return r+"Array.isArray("+s+")";case"object":return"("+r+s+e+"typeof "+s+t+'"object"'+e+a+"Array.isArray("+s+"))";case"integer":return"(typeof "+s+t+'"number"'+e+a+"("+s+" % 1)"+e+s+t+s+(n?e+r+"isFinite("+s+")":"")+")";case"number":return"(typeof "+s+t+'"'+c+'"'+(n?e+r+"isFinite("+s+")":"")+")";default:return"typeof "+s+t+'"'+c+'"'}}ie.exports={copy:function(c,s){for(var n in s=s||{},c)s[n]=c[n];return s},checkDataType:X,checkDataTypes:function(c,s,n){{if(c.length===1)return X(c[0],s,n,!0);var i,t="",c=N(c);for(i in c.array&&c.object&&(t=c.null?"(":"(!"+s+" || ",t+="typeof "+s+' !== "object")',delete c.null,delete c.array,delete c.object),c.number&&delete c.integer,c)t+=(t?" && ":"")+X(i,s,n,!0);return t}},coerceToTypes:function(c,s){{if(!Array.isArray(s))return x[s]?[s]:c==="array"&&s==="array"?["array"]:void 0;for(var n=[],i=0;i<s.length;i++){var t=s[i];(x[t]||c==="array"&&t==="array")&&(n[n.length]=t)}return n.length?n:void 0}},toHash:N,getProperty:P,escapeQuotes:V,equal:H(2303),ucs2length:H(6887),varOccurences:function(c,s){return s+="[^0-9]",c=c.match(new RegExp(s,"g")),c?c.length:0},varReplace:function(c,s,n){return s+="([^0-9])",n=n.replace(/\$/g,"$$$$"),c.replace(new RegExp(s,"g"),n+"$1")},schemaHasRules:function(c,s){if(typeof c=="boolean")return!c;for(var n in c)if(s[n])return!0},schemaHasRulesExcept:function(c,s,n){if(typeof c=="boolean")return!c&&n!="not";for(var i in c)if(i!=n&&s[i])return!0},schemaUnknownRules:function(c,s){if(typeof c!="boolean"){for(var n in c)if(!s[n])return n}},toQuotedString:L,getPathExpr:function(c,s,n,i){return A(c,n?"'/' + "+s+(i?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):i?"'[' + "+s+" + ']'":"'[\\'' + "+s+" + '\\']'")},getPath:function(c,s,n){return n=L(n?"/"+S(s):P(s)),A(c,n)},getData:function(c,s,n){var i,t,e;if(c==="")return"rootData";if(c[0]=="/"){if(!C.test(c))throw new Error("Invalid JSON-pointer: "+c);i=c,t="rootData"}else{if(!(e=c.match(m)))throw new Error("Invalid JSON-pointer: "+c);if(c=+e[1],(i=e[2])=="#"){if(s<=c)throw new Error("Cannot access property/index "+c+" levels up, current level is "+s);return n[s-c]}if(s<c)throw new Error("Cannot access data "+c+" levels up, current level is "+s);if(t="data"+(s-c||""),!i)return t}for(var r=t,a=i.split("/"),o=0;o<a.length;o++){var l=a[o];l&&(t+=P(p(l)),r+=" && "+t)}return r},unescapeFragment:function(c){return p(decodeURIComponent(c))},unescapeJsonPointer:p,escapeFragment:function(c){return encodeURIComponent(S(c))},escapeJsonPointer:S};var x=N(["string","number","integer","boolean","null"]);function N(c){for(var s={},n=0;n<c.length;n++)s[c[n]]=!0;return s}var O=/^[a-z$_][a-z$_0-9]*$/i,D=/'|\\/g;function P(c){return typeof c=="number"?"["+c+"]":O.test(c)?"."+c:"['"+V(c)+"']"}function V(c){return c.replace(D,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function L(c){return"'"+V(c)+"'"}var C=/^\/(?:[^~]|~0|~1)*$/,m=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(c,s){return c=='""'?s:(c+" + "+s).replace(/([^\\])' \+ '/g,"$1")}function S(c){return c.replace(/~/g,"~0").replace(/\//g,"~1")}function p(c){return c.replace(/~1/g,"/").replace(/~0/g,"~")}},9394:function(ie){var g=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];ie.exports=function(H,X){for(var x=0;x<X.length;x++){H=JSON.parse(JSON.stringify(H));for(var N=X[x].split("/"),O=H,D=1;D<N.length;D++)O=O[N[D]];for(D=0;D<g.length;D++){var P=g[D],V=O[P];V&&(O[P]={anyOf:[V,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return H}},5868:function(ie,g,H){H=H(6680),ie.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:H.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:H.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(ie){ie.exports=function(g,H,X){var x,N,O,D,P,V=" ",L=g.level,C=g.dataLevel,m=g.schema[H],A=g.schemaPath+g.util.getProperty(H),S=g.errSchemaPath+"/"+H,p=!g.opts.allErrors,c="data"+(C||""),s=g.opts.$data&&m&&m.$data,n=s?(V+=" var schema"+L+" = "+g.util.getData(m.$data,C,g.dataPathArr)+"; ","schema"+L):m,i=H=="maximum",t=i?"exclusiveMaximum":"exclusiveMinimum",e=g.schema[t],r=g.opts.$data&&e&&e.$data,a=i?"<":">",o=i?">":"<",l=void 0;if(!s&&typeof m!="number"&&m!==void 0)throw new Error(H+" must be number");if(!r&&e!==void 0&&typeof e!="number"&&typeof e!="boolean")throw new Error(t+" must be number or boolean");r?(C=g.util.getData(e.$data,C,g.dataPathArr),O="exclIsNumber"+L,D="' + "+(P="op"+L)+" + '",l=t,(d=d||[]).push(V=V+(" var schemaExcl"+L+" = "+C+"; ")+(" var "+(x="exclusive"+L)+"; var "+(N="exclType"+L)+" = typeof "+(C="schemaExcl"+L)+"; if ("+N+" != 'boolean' && "+N+" != 'undefined' && "+N+" != 'number') { ")),V="",g.createErrors!==!1?(V+=" { keyword: '"+(l||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(S)+" , params: {} ",g.opts.messages!==!1&&(V+=" , message: '"+t+" should be boolean' "),g.opts.verbose&&(V+=" , schema: validate.schema"+A+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+c+" "),V+=" } "):V+=" {} ",y=V,V=d.pop(),!g.compositeRule&&p?g.async?V+=" throw new ValidationError(["+y+"]); ":V+=" validate.errors = ["+y+"]; return false; ":V+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",V+=" } else if ( ",s&&(V+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),V+=" "+N+" == 'number' ? ( ("+x+" = "+n+" === undefined || "+C+" "+a+"= "+n+") ? "+c+" "+o+"= "+C+" : "+c+" "+o+" "+n+" ) : ( ("+x+" = "+C+" === true) ? "+c+" "+o+"= "+n+" : "+c+" "+o+" "+n+" ) || "+c+" !== "+c+") { var op"+L+" = "+x+" ? '"+a+"' : '"+a+"='; ",m===void 0&&(S=g.errSchemaPath+"/"+(l=t),n=C,s=r)):(D=a,(O=typeof e=="number")&&s?(P="'"+D+"'",V+=" if ( ",s&&(V+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),V+=" ( "+n+" === undefined || "+e+" "+a+"= "+n+" ? "+c+" "+o+"= "+e+" : "+c+" "+o+" "+n+" ) || "+c+" !== "+c+") { "):(O&&m===void 0?(x=!0,S=g.errSchemaPath+"/"+(l=t),n=e,o+="="):(O&&(n=Math[i?"min":"max"](e,m)),e===(!O||n)?(x=!0,S=g.errSchemaPath+"/"+(l=t),o+="="):(x=!1,D+="=")),P="'"+D+"'",V+=" if ( ",s&&(V+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),V+=" "+c+" "+o+" "+n+" || "+c+" !== "+c+") { ")),l=l||H,(d=d||[]).push(V),V="",g.createErrors!==!1?(V+=" { keyword: '"+(l||"_limit")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(S)+" , params: { comparison: "+P+", limit: "+n+", exclusive: "+x+" } ",g.opts.messages!==!1&&(V=V+" , message: 'should be "+D+" "+(s?"' + "+n:n+"'")),g.opts.verbose&&(V=(V+=" , schema: ")+(s?"validate.schema"+A:""+m)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+c+" "),V+=" } "):V+=" {} ";var d,y=V;return V=d.pop(),!g.compositeRule&&p?g.async?V+=" throw new ValidationError(["+y+"]); ":V+=" validate.errors = ["+y+"]; return false; ":V+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",V+=" } ",p&&(V+=" else { "),V}},2407:function(ie){ie.exports=function(g,H,X){var x,N=" ",O=g.level,A=g.dataLevel,D=g.schema[H],P=g.schemaPath+g.util.getProperty(H),V=g.errSchemaPath+"/"+H,L=!g.opts.allErrors,C="data"+(A||""),m=g.opts.$data&&D&&D.$data,A=m?(N+=" var schema"+O+" = "+g.util.getData(D.$data,A,g.dataPathArr)+"; ","schema"+O):D;if(m||typeof D=="number")return N+="if ( ",m&&(N+=" ("+A+" !== undefined && typeof "+A+" != 'number') || "),(O=[]).push(N+=" "+C+".length "+((x=H)=="maxItems"?">":"<")+" "+A+") { "),N="",g.createErrors!==!1?(N+=" { keyword: '"+(x||"_limitItems")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { limit: "+A+" } ",g.opts.messages!==!1&&(N=(N=(N+=" , message: 'should NOT have ")+(H=="maxItems"?"more":"fewer")+" than ")+(m?"' + "+A+" + '":""+D)+" items' "),g.opts.verbose&&(N=(N+=" , schema: ")+(m?"validate.schema"+P:""+D)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),N+=" } "):N+=" {} ",x=N,N=O.pop(),!g.compositeRule&&L?g.async?N+=" throw new ValidationError(["+x+"]); ":N+=" validate.errors = ["+x+"]; return false; ":N+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N+="} ",L&&(N+=" else { "),N;throw new Error(H+" must be number")}},1250:function(ie){ie.exports=function(g,H,X){var x,N=" ",O=g.level,A=g.dataLevel,D=g.schema[H],P=g.schemaPath+g.util.getProperty(H),V=g.errSchemaPath+"/"+H,L=!g.opts.allErrors,C="data"+(A||""),m=g.opts.$data&&D&&D.$data,A=m?(N+=" var schema"+O+" = "+g.util.getData(D.$data,A,g.dataPathArr)+"; ","schema"+O):D;if(m||typeof D=="number")return N+="if ( ",m&&(N+=" ("+A+" !== undefined && typeof "+A+" != 'number') || "),g.opts.unicode===!1?N+=" "+C+".length ":N+=" ucs2length("+C+") ",(O=[]).push(N+=" "+((x=H)=="maxLength"?">":"<")+" "+A+") { "),N="",g.createErrors!==!1?(N+=" { keyword: '"+(x||"_limitLength")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { limit: "+A+" } ",g.opts.messages!==!1&&(N=(N=(N+=" , message: 'should NOT be ")+(H=="maxLength"?"longer":"shorter")+" than ")+(m?"' + "+A+" + '":""+D)+" characters' "),g.opts.verbose&&(N=(N+=" , schema: ")+(m?"validate.schema"+P:""+D)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),N+=" } "):N+=" {} ",x=N,N=O.pop(),!g.compositeRule&&L?g.async?N+=" throw new ValidationError(["+x+"]); ":N+=" validate.errors = ["+x+"]; return false; ":N+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N+="} ",L&&(N+=" else { "),N;throw new Error(H+" must be number")}},2596:function(ie){ie.exports=function(g,H,X){var x,N=" ",O=g.level,A=g.dataLevel,D=g.schema[H],P=g.schemaPath+g.util.getProperty(H),V=g.errSchemaPath+"/"+H,L=!g.opts.allErrors,C="data"+(A||""),m=g.opts.$data&&D&&D.$data,A=m?(N+=" var schema"+O+" = "+g.util.getData(D.$data,A,g.dataPathArr)+"; ","schema"+O):D;if(m||typeof D=="number")return N+="if ( ",m&&(N+=" ("+A+" !== undefined && typeof "+A+" != 'number') || "),(O=[]).push(N+=" Object.keys("+C+").length "+((x=H)=="maxProperties"?">":"<")+" "+A+") { "),N="",g.createErrors!==!1?(N+=" { keyword: '"+(x||"_limitProperties")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { limit: "+A+" } ",g.opts.messages!==!1&&(N=(N=(N+=" , message: 'should NOT have ")+(H=="maxProperties"?"more":"fewer")+" than ")+(m?"' + "+A+" + '":""+D)+" properties' "),g.opts.verbose&&(N=(N+=" , schema: ")+(m?"validate.schema"+P:""+D)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),N+=" } "):N+=" {} ",x=N,N=O.pop(),!g.compositeRule&&L?g.async?N+=" throw new ValidationError(["+x+"]); ":N+=" validate.errors = ["+x+"]; return false; ":N+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N+="} ",L&&(N+=" else { "),N;throw new Error(H+" must be number")}},9486:function(ie){ie.exports=function(g,H,X){var x=" ",N=g.schema[H],O=g.schemaPath+g.util.getProperty(H),D=g.errSchemaPath+"/"+H,P=!g.opts.allErrors,V=g.util.copy(g),L="",C=(V.level++,"valid"+V.level),m=V.baseId,A=!0,S=N;if(S)for(var p,c=-1,s=S.length-1;c<s;)p=S[c+=1],(g.opts.strictKeywords?typeof p=="object"&&0<Object.keys(p).length||p===!1:g.util.schemaHasRules(p,g.RULES.all))&&(A=!1,V.schema=p,V.schemaPath=O+"["+c+"]",V.errSchemaPath=D+"/"+c,x+=" "+g.validate(V)+" ",V.baseId=m,P&&(x+=" if ("+C+") { ",L+="}"));return P&&(x+=A?" if (true) { ":" "+L.slice(0,-1)+" "),x}},5347:function(ie){ie.exports=function(g,P,X){var x=" ",C=g.level,V=g.dataLevel,N=g.schema[P],O=g.schemaPath+g.util.getProperty(P),D=g.errSchemaPath+"/"+P,P=!g.opts.allErrors,V="data"+(V||""),L="valid"+C,C="errs__"+C,m=g.util.copy(g),A="",S=(m.level++,"valid"+m.level);if(N.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 p=m.baseId,c=(x+=" var "+C+" = errors; var "+L+" = false; ",g.compositeRule),s=(g.compositeRule=m.compositeRule=!0,N);if(s)for(var n,i=-1,t=s.length-1;i<t;)n=s[i+=1],m.schema=n,m.schemaPath=O+"["+i+"]",m.errSchemaPath=D+"/"+i,x+=" "+g.validate(m)+" ",m.baseId=p,x+=" "+L+" = "+L+" || "+S+"; if (!"+L+") { ",A+="}";g.compositeRule=m.compositeRule=c,x+=" "+A+" if (!"+L+") { var err = ",g.createErrors!==!1?(x+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(D)+" , params: {} ",g.opts.messages!==!1&&(x+=" , message: 'should match some schema in anyOf' "),g.opts.verbose&&(x+=" , schema: validate.schema"+O+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+V+" "),x+=" } "):x+=" {} ",x+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&P&&(g.async?x+=" throw new ValidationError(vErrors); ":x+=" validate.errors = vErrors; return false; "),x+=" } else { errors = "+C+"; if (vErrors !== null) { if ("+C+") vErrors.length = "+C+"; else vErrors = null; } ",g.opts.allErrors&&(x+=" } ")}else P&&(x+=" if (true) { ");return x}},923:function(ie){ie.exports=function(g,N,X){var x=" ",O=g.schema[N],N=g.errSchemaPath+"/"+N,O=(g.opts.allErrors,g.util.toQuotedString(O));return g.opts.$comment===!0?x+=" console.log("+O+");":typeof g.opts.$comment=="function"&&(x+=" self._opts.$comment("+O+", "+g.util.toQuotedString(N)+", validate.root.schema);"),x}},2617:function(ie){ie.exports=function(g,O,X){var A=" ",x=g.level,m=g.dataLevel,C=g.schema[O],N=g.schemaPath+g.util.getProperty(O),O=g.errSchemaPath+"/"+O,D=!g.opts.allErrors,P="data"+(m||""),V="valid"+x,L=g.opts.$data&&C&&C.$data,C=(L&&(A+=" var schema"+x+" = "+g.util.getData(C.$data,m,g.dataPathArr)+"; "),L||(A+=" var schema"+x+" = validate.schema"+N+";"),[]),m=(C.push(A+="var "+V+" = equal("+P+", schema"+x+"); if (!"+V+") { "),A="",g.createErrors!==!1?(A+=" { keyword: 'const' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(O)+" , params: { allowedValue: schema"+x+" } ",g.opts.messages!==!1&&(A+=" , message: 'should be equal to constant' "),g.opts.verbose&&(A+=" , schema: validate.schema"+N+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+P+" "),A+=" } "):A+=" {} ",A),A=C.pop();return!g.compositeRule&&D?g.async?A+=" throw new ValidationError(["+m+"]); ":A+=" validate.errors = ["+m+"]; return false; ":A+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",A+=" }",D&&(A+=" else { "),A}},2119:function(ie){ie.exports=function(g,O,X){var n=" ",c=g.level,P=g.dataLevel,x=g.schema[O],N=g.schemaPath+g.util.getProperty(O),O=g.errSchemaPath+"/"+O,D=!g.opts.allErrors,P="data"+(P||""),V="valid"+c,L="errs__"+c,C=g.util.copy(g),m=(C.level++,"valid"+C.level),c="i"+c,A=C.dataLevel=g.dataLevel+1,S="data"+A,s=g.baseId,p=g.opts.strictKeywords?typeof x=="object"&&0<Object.keys(x).length||x===!1:g.util.schemaHasRules(x,g.RULES.all),c=(n+="var "+L+" = errors;var "+V+";",p?(V=g.compositeRule,g.compositeRule=C.compositeRule=!0,C.schema=x,C.schemaPath=N,C.errSchemaPath=O,n+=" var "+m+" = false; for (var "+c+" = 0; "+c+" < "+P+".length; "+c+"++) { ",C.errorPath=g.util.getPathExpr(g.errorPath,c,g.opts.jsonPointers,!0),x=P+"["+c+"]",C.dataPathArr[A]=c,A=g.validate(C),C.baseId=s,g.util.varOccurences(A,S)<2?n+=" "+g.util.varReplace(A,S,x)+" ":n+=" var "+S+" = "+x+"; "+A+" ",n+=" if ("+m+") break; } ",g.compositeRule=C.compositeRule=V,n+=" if (!"+m+") {"):n+=" if ("+P+".length == 0) {",[]),s=(c.push(n),n="",g.createErrors!==!1?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(O)+" , params: {} ",g.opts.messages!==!1&&(n+=" , message: 'should contain a valid item' "),g.opts.verbose&&(n+=" , schema: validate.schema"+N+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+P+" "),n+=" } "):n+=" {} ",n),n=c.pop();return!g.compositeRule&&D?g.async?n+=" throw new ValidationError(["+s+"]); ":n+=" validate.errors = ["+s+"]; return false; ":n+=" var err = "+s+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",p&&(n+=" errors = "+L+"; if (vErrors !== null) { if ("+L+") vErrors.length = "+L+"; else vErrors = null; } "),g.opts.allErrors&&(n+=" } "),n}},1793:function(ie){ie.exports=function(g,I,X){var x,N,O,D=" ",P=g.level,V=g.dataLevel,h=g.schema[I],L=g.schemaPath+g.util.getProperty(I),C=g.errSchemaPath+"/"+I,m=!g.opts.allErrors,A="data"+(V||""),S="valid"+P,p="errs__"+P,c=g.opts.$data&&h&&h.$data,s=c?(D+=" var schema"+P+" = "+g.util.getData(h.$data,V,g.dataPathArr)+"; ","schema"+P):h,n="definition"+P,i=this.definition,t="";if(c&&i.$data){var e="keywordValidate"+P,r=i.validateSchema;D+=" var "+n+" = RULES.custom['"+I+"'].definition; var "+e+" = "+n+".validate;"}else{if(!(d=g.useCustomRule(this,h,g.schema,g)))return;s="validate.schema"+L,e=d.code,x=i.compile,N=i.inline,O=i.macro}var a,o,l,d,y,I=e+".errors",h="i"+P,u="ruleErr"+P,b=i.async;if(b&&!g.async)throw new Error("async keyword in sync schema");return N||O||(D+=I+" = null;"),D+="var "+p+" = errors;var "+S+";",c&&i.$data&&(t+="}",D+=" if ("+s+" === undefined) { "+S+" = true; } else { ",r&&(t+="}",D+=" "+S+" = "+n+".validateSchema("+s+"); if ("+S+") { ")),N?i.statements?D+=" "+d.validate+" ":D+=" "+S+" = "+d.validate+"; ":O?(t="",(c=g.util.copy(g)).level++,a="valid"+c.level,c.schema=d.validate,c.schemaPath="",r=g.compositeRule,g.compositeRule=c.compositeRule=!0,n=g.validate(c).replace(/validate\.schema/g,e),g.compositeRule=c.compositeRule=r,D+=" "+n):((y=y||[]).push(D),D="",D+=" "+e+".call( ",g.opts.passContext?D+="this":D+="self",x||i.schema===!1?D+=" , "+A+" ":D+=" , "+s+" , "+A+" , validate.schema"+g.schemaPath+" ",D+=" , (dataPath || '')",g.errorPath!='""'&&(D+=" + "+g.errorPath),d=D+=" , "+(o=V?"data"+(V-1||""):"parentData")+" , "+(l=V?g.dataPathArr[V]:"parentDataProperty")+" , rootData ) ",D=y.pop(),i.errors===!1?(D+=" "+S+" = ",b&&(D+="await "),D+=d+"; "):D+=b?" var "+(I="customErrors"+P)+" = null; try { "+S+" = await "+d+"; } catch (e) { "+S+" = false; if (e instanceof ValidationError) "+I+" = e.errors; else throw e; } ":" "+I+" = null; "+S+" = "+d+"; "),i.modifying&&(D+=" if ("+o+") "+A+" = "+o+"["+l+"];"),D+=""+t,i.valid?m&&(D+=" if (true) { "):(D+=" if ( ",i.valid===void 0?D=D+" !"+(O?""+a:S):D+=" "+!i.valid+" ",c=this.keyword,(y=y||[]).push(D+=") { "),(y=y||[]).push(D=""),D="",g.createErrors!==!1?(D+=" { keyword: '"+(c||"custom")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(C)+" , params: { keyword: '"+this.keyword+"' } ",g.opts.messages!==!1&&(D+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),g.opts.verbose&&(D+=" , schema: validate.schema"+L+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),D+=" } "):D+=" {} ",r=D,D=y.pop(),!g.compositeRule&&m?g.async?D+=" throw new ValidationError(["+r+"]); ":D+=" validate.errors = ["+r+"]; return false; ":D+=" var err = "+r+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n=D,D=y.pop(),N?i.errors?i.errors!="full"&&(D+=" for (var "+h+"="+p+"; "+h+"<errors; "+h+"++) { var "+u+" = vErrors["+h+"]; if ("+u+".dataPath === undefined) "+u+".dataPath = (dataPath || '') + "+g.errorPath+"; if ("+u+".schemaPath === undefined) { "+u+'.schemaPath = "'+C+'"; } ',g.opts.verbose&&(D+=" "+u+".schema = "+s+"; "+u+".data = "+A+"; "),D+=" } "):i.errors===!1?D+=" "+n+" ":(D+=" if ("+p+" == errors) { "+n+" } else { for (var "+h+"="+p+"; "+h+"<errors; "+h+"++) { var "+u+" = vErrors["+h+"]; if ("+u+".dataPath === undefined) "+u+".dataPath = (dataPath || '') + "+g.errorPath+"; if ("+u+".schemaPath === undefined) { "+u+'.schemaPath = "'+C+'"; } ',g.opts.verbose&&(D+=" "+u+".schema = "+s+"; "+u+".data = "+A+"; "),D+=" } } "):O?(D+=" var err = ",g.createErrors!==!1?(D+=" { keyword: '"+(c||"custom")+"' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(C)+" , params: { keyword: '"+this.keyword+"' } ",g.opts.messages!==!1&&(D+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),g.opts.verbose&&(D+=" , schema: validate.schema"+L+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+A+" "),D+=" } "):D+=" {} ",D+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&m&&(g.async?D+=" throw new ValidationError(vErrors); ":D+=" validate.errors = vErrors; return false; ")):i.errors===!1?D+=" "+n+" ":(D+=" if (Array.isArray("+I+")) { if (vErrors === null) vErrors = "+I+"; else vErrors = vErrors.concat("+I+"); errors = vErrors.length; for (var "+h+"="+p+"; "+h+"<errors; "+h+"++) { var "+u+" = vErrors["+h+"]; if ("+u+".dataPath === undefined) "+u+".dataPath = (dataPath || '') + "+g.errorPath+"; "+u+'.schemaPath = "'+C+'"; ',g.opts.verbose&&(D+=" "+u+".schema = "+s+"; "+u+".data = "+A+"; "),D+=" } } else { "+n+" } "),D+=" } ",m&&(D+=" else { ")),D}},9115:function(ie){ie.exports=function(g,A,X){var x,N=" ",O=g.level,D=g.dataLevel,P=g.schema[A],V=g.schemaPath+g.util.getProperty(A),L=g.errSchemaPath+"/"+A,C=!g.opts.allErrors,m="data"+(D||""),A="errs__"+O,S=g.util.copy(g),p="",c=(S.level++,"valid"+S.level),s={},n={},i=g.opts.ownProperties;for(v in P)v!="__proto__"&&(B=P[v],(x=Array.isArray(B)?n:s)[v]=B);var t=g.errorPath;for(v in N=N+("var "+A+" = errors;")+("var missing"+O+";"),n)if((x=n[v]).length){if(N+=" if ( "+m+g.util.getProperty(v)+" !== undefined ",i&&(N+=" && Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(v)+"') "),C){N+=" && ( ";var e=x;if(e)for(var r=-1,a=e.length-1;r<a;)I=e[r+=1],r&&(N+=" || "),N+=" ( ( "+(w=m+(b=g.util.getProperty(I)))+" === undefined ",i&&(N+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(I)+"') "),N+=") && (missing"+O+" = "+g.util.toQuotedString(g.opts.jsonPointers?I:b)+") ) ";N+=")) { ";var d="missing"+O,o="' + "+d+" + '",l=(g.opts._errorDataPathProperty&&(g.errorPath=g.opts.jsonPointers?g.util.getPathExpr(t,d,!0):t+" + "+d),l||[]),d=(l.push(N),N="",g.createErrors!==!1?(N+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(L)+" , params: { property: '"+g.util.escapeQuotes(v)+"', missingProperty: '"+o+"', depsCount: "+x.length+", deps: '"+g.util.escapeQuotes(x.length==1?x[0]:x.join(", "))+"' } ",g.opts.messages!==!1&&(N+=" , message: 'should have ",x.length==1?N+="property "+g.util.escapeQuotes(x[0]):N+="properties "+g.util.escapeQuotes(x.join(", ")),N+=" when property "+g.util.escapeQuotes(v)+" is present' "),g.opts.verbose&&(N+=" , schema: validate.schema"+V+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),N+=" } "):N+=" {} ",N),N=l.pop();!g.compositeRule&&C?g.async?N+=" throw new ValidationError(["+d+"]); ":N+=" validate.errors = ["+d+"]; return false; ":N+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{N+=" ) { ";var y=x;if(y)for(var I,h=-1,u=y.length-1;h<u;){I=y[h+=1];var b=g.util.getProperty(I),o=g.util.escapeQuotes(I),w=m+b;g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPath(t,I,g.opts.jsonPointers)),N+=" if ( "+w+" === undefined ",i&&(N+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(I)+"') "),N+=") { var err = ",g.createErrors!==!1?(N+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(L)+" , params: { property: '"+g.util.escapeQuotes(v)+"', missingProperty: '"+o+"', depsCount: "+x.length+", deps: '"+g.util.escapeQuotes(x.length==1?x[0]:x.join(", "))+"' } ",g.opts.messages!==!1&&(N+=" , message: 'should have ",x.length==1?N+="property "+g.util.escapeQuotes(x[0]):N+="properties "+g.util.escapeQuotes(x.join(", ")),N+=" when property "+g.util.escapeQuotes(v)+" is present' "),g.opts.verbose&&(N+=" , schema: validate.schema"+V+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),N+=" } "):N+=" {} ",N+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}N+=" } ",C&&(p+="}",N+=" else { ")}g.errorPath=t;var v,R=S.baseId;for(v in s){var B=s[v];(g.opts.strictKeywords?typeof B=="object"&&0<Object.keys(B).length||B===!1:g.util.schemaHasRules(B,g.RULES.all))&&(N+=" "+c+" = true; if ( "+m+g.util.getProperty(v)+" !== undefined ",i&&(N+=" && Object.prototype.hasOwnProperty.call("+m+", '"+g.util.escapeQuotes(v)+"') "),N+=") { ",S.schema=B,S.schemaPath=V+g.util.getProperty(v),S.errSchemaPath=L+"/"+g.util.escapeFragment(v),N+=" "+g.validate(S)+" ",S.baseId=R,N+=" } ",C&&(N+=" if ("+c+") { ",p+="}"))}return C&&(N+=" "+p+" if ("+A+" == errors) {"),N}},9317:function(ie){ie.exports=function(g,O,X){var A=" ",x=g.level,C=g.dataLevel,m=g.schema[O],N=g.schemaPath+g.util.getProperty(O),O=g.errSchemaPath+"/"+O,D=!g.opts.allErrors,P="data"+(C||""),V="valid"+x,L=g.opts.$data&&m&&m.$data,m=(L&&(A+=" var schema"+x+" = "+g.util.getData(m.$data,C,g.dataPathArr)+"; "),"i"+x),C="schema"+x,C=(L||(A+=" var "+C+" = validate.schema"+N+";"),A+="var "+V+";",L&&(A+=" if (schema"+x+" === undefined) "+V+" = true; else if (!Array.isArray(schema"+x+")) "+V+" = false; else {"),A+=V+" = false;for (var "+m+"=0; "+m+"<"+C+".length; "+m+"++) if (equal("+P+", "+C+"["+m+"])) { "+V+" = true; break; }",L&&(A+=" } "),[]),m=(C.push(A+=" if (!"+V+") { "),A="",g.createErrors!==!1?(A+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(O)+" , params: { allowedValues: schema"+x+" } ",g.opts.messages!==!1&&(A+=" , message: 'should be equal to one of the allowed values' "),g.opts.verbose&&(A+=" , schema: validate.schema"+N+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+P+" "),A+=" } "):A+=" {} ",A),A=C.pop();return!g.compositeRule&&D?g.async?A+=" throw new ValidationError(["+m+"]); ":A+=" validate.errors = ["+m+"]; return false; ":A+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",A+=" }",D&&(A+=" else { "),A}},8327:function(ie){ie.exports=function(g,V,X){var x=" ",N=g.level,O=g.dataLevel,D=g.schema[V],P=g.schemaPath+g.util.getProperty(V),V=g.errSchemaPath+"/"+V,L=!g.opts.allErrors,C="data"+(O||"");if(g.opts.format===!1)L&&(x+=" if (true) { ");else{var m,A=g.opts.$data&&D&&D.$data,O=A?(x+=" var schema"+N+" = "+g.util.getData(D.$data,O,g.dataPathArr)+"; ","schema"+N):D,S=g.opts.unknownFormats,p=Array.isArray(S);if(A)x+=" var "+(m="format"+N)+" = formats["+O+"]; var "+(c="isObject"+N)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(n="formatType"+N)+" = "+c+" && "+m+".type || 'string'; if ("+c+") { ",g.async&&(x+=" var async"+N+" = "+m+".async; "),x+=" "+m+" = "+m+".validate; } if ( ",A&&(x+=" ("+O+" !== undefined && typeof "+O+" != 'string') || "),x+=" (",S!="ignore"&&(x+=" ("+O+" && !"+m+" ",p&&(x+=" && self._opts.unknownFormats.indexOf("+O+") == -1 "),x+=") || "),x+=" ("+m+" && "+n+" == '"+X+"' && !(typeof "+m+" == 'function' ? ",g.async?x+=" (async"+N+" ? await "+m+"("+C+") : "+m+"("+C+")) ":x+=" "+m+"("+C+") ",x+=" : "+m+".test("+C+"))))) {";else{if(!(m=g.formats[D])){if(S=="ignore")return g.logger.warn('unknown format "'+D+'" ignored in schema at path "'+g.errSchemaPath+'"'),L&&(x+=" if (true) { "),x;if(p&&0<=S.indexOf(D))return L&&(x+=" if (true) { "),x;throw new Error('unknown format "'+D+'" is used in schema at path "'+g.errSchemaPath+'"')}var c,s,n=(c=typeof m=="object"&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(c&&(s=m.async===!0,m=m.validate),n!=X)return L&&(x+=" if (true) { "),x;if(s){if(!g.async)throw new Error("async format in sync schema");x+=" if (!(await "+(i="formats"+g.util.getProperty(D)+".validate")+"("+C+"))) { "}else{x+=" if (! ";var i="formats"+g.util.getProperty(D);c&&(i+=".validate"),x=x+(typeof m=="function"?" "+i+"("+C+") ":" "+i+".test("+C+") ")+") { "}}N=[],p=(N.push(x),x="",g.createErrors!==!1?(x=(x+=" { keyword: 'format' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { format: ")+(A?""+O:""+g.util.toQuotedString(D))+" } ",g.opts.messages!==!1&&(x=(x+=` , message: 'should match format "`)+(A?"' + "+O+" + '":""+g.util.escapeQuotes(D))+`"' `),g.opts.verbose&&(x=(x=(x+=" , schema: ")+(A?"validate.schema"+P:""+g.util.toQuotedString(D)))+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),x+=" } "):x+=" {} ",x),x=N.pop(),!g.compositeRule&&L?g.async?x+=" throw new ValidationError(["+p+"]); ":x+=" validate.errors = ["+p+"]; return false; ":x+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } ",L&&(x+=" else { ")}return x}},5926:function(ie){ie.exports=function(g,V,X){var x,N=" ",O=g.level,C=g.dataLevel,D=g.schema[V],P=g.schemaPath+g.util.getProperty(V),V=g.errSchemaPath+"/"+V,L=!g.opts.allErrors,C="data"+(C||""),m="valid"+O,A="errs__"+O,S=g.util.copy(g),p=(S.level++,"valid"+S.level),c=g.schema.then,s=g.schema.else,c=c!==void 0&&(g.opts.strictKeywords?typeof c=="object"&&0<Object.keys(c).length||c===!1:g.util.schemaHasRules(c,g.RULES.all)),s=s!==void 0&&(g.opts.strictKeywords?typeof s=="object"&&0<Object.keys(s).length||s===!1:g.util.schemaHasRules(s,g.RULES.all)),n=S.baseId;return c||s?(S.createErrors=!1,S.schema=D,S.schemaPath=P,S.errSchemaPath=V,N+=" var "+A+" = errors; var "+m+" = true; ",D=g.compositeRule,g.compositeRule=S.compositeRule=!0,N+=" "+g.validate(S)+" ",S.baseId=n,S.createErrors=!0,N+=" errors = "+A+"; if (vErrors !== null) { if ("+A+") vErrors.length = "+A+"; else vErrors = null; } ",g.compositeRule=S.compositeRule=D,c?(N+=" if ("+p+") { ",S.schema=g.schema.then,S.schemaPath=g.schemaPath+".then",S.errSchemaPath=g.errSchemaPath+"/then",N+=" "+g.validate(S)+" ",S.baseId=n,N+=" "+m+" = "+p+"; ",c&&s?N+=" var "+(x="ifClause"+O)+" = 'then'; ":x="'then'",N+=" } ",s&&(N+=" else { ")):N+=" if (!"+p+") { ",s&&(S.schema=g.schema.else,S.schemaPath=g.schemaPath+".else",S.errSchemaPath=g.errSchemaPath+"/else",N+=" "+g.validate(S)+" ",S.baseId=n,N+=" "+m+" = "+p+"; ",c&&s?N+=" var "+(x="ifClause"+O)+" = 'else'; ":x="'else'",N+=" } "),N+=" if (!"+m+") { var err = ",g.createErrors!==!1?(N+=" { keyword: 'if' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { failingKeyword: "+x+" } ",g.opts.messages!==!1&&(N+=` , message: 'should match "' + `+x+` + '" schema' `),g.opts.verbose&&(N+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),N+=" } "):N+=" {} ",N+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&L&&(g.async?N+=" throw new ValidationError(vErrors); ":N+=" validate.errors = vErrors; return false; "),N+=" } ",L&&(N+=" else { ")):L&&(N+=" if (true) { "),N}},9646:function(ie,g,H){ie.exports={$ref:H(2331),allOf:H(9486),anyOf:H(5347),$comment:H(923),const:H(2617),contains:H(2119),dependencies:H(9115),enum:H(9317),format:H(8327),if:H(5926),items:H(392),maximum:H(1796),minimum:H(1796),maxItems:H(2407),minItems:H(2407),maxLength:H(1250),minLength:H(1250),maxProperties:H(2596),minProperties:H(2596),multipleOf:H(6039),not:H(7946),oneOf:H(9344),pattern:H(9737),properties:H(2537),propertyNames:H(2127),required:H(1204),uniqueItems:H(1985),validate:H(1869)}},392:function(ie){ie.exports=function(g,L,X){var x=" ",p=g.level,C=g.dataLevel,N=g.schema[L],O=g.schemaPath+g.util.getProperty(L),D=g.errSchemaPath+"/"+L,P=!g.opts.allErrors,V="data"+(C||""),L="valid"+p,C="errs__"+p,m=g.util.copy(g),A="",S=(m.level++,"valid"+m.level),p="i"+p,c=m.dataLevel=g.dataLevel+1,s="data"+c,n=g.baseId;if(x+="var "+C+" = errors;var "+L+";",Array.isArray(N)){var i,t,e=g.schema.additionalItems,r=(e===!1&&(x+=" "+L+" = "+V+".length <= "+N.length+"; ",i=D,D=g.errSchemaPath+"/additionalItems",(t=t||[]).push(x+=" if (!"+L+") { "),x="",g.createErrors!==!1?(x+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(D)+" , params: { limit: "+N.length+" } ",g.opts.messages!==!1&&(x+=" , message: 'should NOT have more than "+N.length+" items' "),g.opts.verbose&&(x+=" , schema: false , parentSchema: validate.schema"+g.schemaPath+" , data: "+V+" "),x+=" } "):x+=" {} ",L=x,x=t.pop(),!g.compositeRule&&P?g.async?x+=" throw new ValidationError(["+L+"]); ":x+=" validate.errors = ["+L+"]; return false; ":x+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } ",D=i,P&&(A+="}",x+=" else { ")),N);if(r)for(var a=-1,o=r.length-1;a<o;){var l,d,y=r[a+=1];(g.opts.strictKeywords?typeof y=="object"&&0<Object.keys(y).length||y===!1:g.util.schemaHasRules(y,g.RULES.all))&&(x+=" "+S+" = true; if ("+V+".length > "+a+") { ",l=V+"["+a+"]",m.schema=y,m.schemaPath=O+"["+a+"]",m.errSchemaPath=D+"/"+a,m.errorPath=g.util.getPathExpr(g.errorPath,a,g.opts.jsonPointers,!0),m.dataPathArr[c]=a,d=g.validate(m),m.baseId=n,g.util.varOccurences(d,s)<2?x+=" "+g.util.varReplace(d,s,l)+" ":x+=" var "+s+" = "+l+"; "+d+" ",x+=" } ",P&&(x+=" if ("+S+") { ",A+="}"))}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",x+=" "+S+" = true; if ("+V+".length > "+N.length+") { for (var "+p+" = "+N.length+"; "+p+" < "+V+".length; "+p+"++) { ",m.errorPath=g.util.getPathExpr(g.errorPath,p,g.opts.jsonPointers,!0),l=V+"["+p+"]",m.dataPathArr[c]=p,d=g.validate(m),m.baseId=n,g.util.varOccurences(d,s)<2?x+=" "+g.util.varReplace(d,s,l)+" ":x+=" var "+s+" = "+l+"; "+d+" ",P&&(x+=" if (!"+S+") break; "),x+=" } } ",P&&(x+=" if ("+S+") { ",A+="}"))}else(g.opts.strictKeywords?typeof N=="object"&&0<Object.keys(N).length||N===!1:g.util.schemaHasRules(N,g.RULES.all))&&(m.schema=N,m.schemaPath=O,m.errSchemaPath=D,x+=" for (var "+p+" = 0; "+p+" < "+V+".length; "+p+"++) { ",m.errorPath=g.util.getPathExpr(g.errorPath,p,g.opts.jsonPointers,!0),l=V+"["+p+"]",m.dataPathArr[c]=p,d=g.validate(m),m.baseId=n,g.util.varOccurences(d,s)<2?x+=" "+g.util.varReplace(d,s,l)+" ":x+=" var "+s+" = "+l+"; "+d+" ",P&&(x+=" if (!"+S+") break; "),x+=" }");return P&&(x+=" "+A+" if ("+C+" == errors) {"),x}},6039:function(ie){ie.exports=function(g,H,X){var x=" ",N=g.level,m=g.dataLevel,O=g.schema[H],D=g.schemaPath+g.util.getProperty(H),P=g.errSchemaPath+"/"+H,V=!g.opts.allErrors,L="data"+(m||""),C=g.opts.$data&&O&&O.$data,m=C?(x+=" var schema"+N+" = "+g.util.getData(O.$data,m,g.dataPathArr)+"; ","schema"+N):O;if(!C&&typeof O!="number")throw new Error(H+" must be number");return x+="var division"+N+";if (",C&&(x+=" "+m+" !== undefined && ( typeof "+m+" != 'number' || "),x+=" (division"+N+" = "+L+" / "+m+", ",g.opts.multipleOfPrecision?x+=" Math.abs(Math.round(division"+N+") - division"+N+") > 1e-"+g.opts.multipleOfPrecision+" ":x+=" division"+N+" !== parseInt(division"+N+") ",x+=" ) ",C&&(x+=" ) "),H=[],H.push(x+=" ) { "),x="",g.createErrors!==!1?(x+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { multipleOf: "+m+" } ",g.opts.messages!==!1&&(x=x+" , message: 'should be multiple of "+(C?"' + "+m:m+"'")),g.opts.verbose&&(x=(x+=" , schema: ")+(C?"validate.schema"+D:""+O)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+L+" "),x+=" } "):x+=" {} ",N=x,x=H.pop(),!g.compositeRule&&V?g.async?x+=" throw new ValidationError(["+N+"]); ":x+=" validate.errors = ["+N+"]; return false; ":x+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+="} ",V&&(x+=" else { "),x}},7946:function(ie){ie.exports=function(g,V,X){var x,N,O=" ",m=g.level,C=g.dataLevel,D=g.schema[V],P=g.schemaPath+g.util.getProperty(V),V=g.errSchemaPath+"/"+V,L=!g.opts.allErrors,C="data"+(C||""),m="errs__"+m,A=g.util.copy(g),S=(A.level++,"valid"+A.level);return(g.opts.strictKeywords?typeof D=="object"&&0<Object.keys(D).length||D===!1:g.util.schemaHasRules(D,g.RULES.all))?(A.schema=D,A.schemaPath=P,A.errSchemaPath=V,O+=" var "+m+" = errors; ",D=g.compositeRule,g.compositeRule=A.compositeRule=!0,A.createErrors=!1,A.opts.allErrors&&(N=A.opts.allErrors,A.opts.allErrors=!1),O+=" "+g.validate(A)+" ",A.createErrors=!0,N&&(A.opts.allErrors=N),g.compositeRule=A.compositeRule=D,(x=x||[]).push(O+=" if ("+S+") { "),O="",g.createErrors!==!1?(O+=" { keyword: 'not' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: {} ",g.opts.messages!==!1&&(O+=" , message: 'should NOT be valid' "),g.opts.verbose&&(O+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),O+=" } "):O+=" {} ",N=O,O=x.pop(),!g.compositeRule&&L?g.async?O+=" throw new ValidationError(["+N+"]); ":O+=" validate.errors = ["+N+"]; return false; ":O+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",O+=" } else { errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",g.opts.allErrors&&(O+=" } ")):(O+=" var err = ",g.createErrors!==!1?(O+=" { keyword: 'not' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: {} ",g.opts.messages!==!1&&(O+=" , message: 'should NOT be valid' "),g.opts.verbose&&(O+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),O+=" } "):O+=" {} ",O+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",L&&(O+=" if (false) { ")),O}},9344:function(ie){ie.exports=function(g,P,X){var x=" ",n=g.level,V=g.dataLevel,N=g.schema[P],O=g.schemaPath+g.util.getProperty(P),D=g.errSchemaPath+"/"+P,P=!g.opts.allErrors,V="data"+(V||""),L="valid"+n,C="errs__"+n,m=g.util.copy(g),A="",S=(m.level++,"valid"+m.level),p=m.baseId,c="prevValid"+n,s="passingSchemas"+n,n=(x+="var "+C+" = errors , "+c+" = false , "+L+" = false , "+s+" = null; ",g.compositeRule),i=(g.compositeRule=m.compositeRule=!0,N);if(i)for(var t,e=-1,r=i.length-1;e<r;)t=i[e+=1],(g.opts.strictKeywords?typeof t=="object"&&0<Object.keys(t).length||t===!1:g.util.schemaHasRules(t,g.RULES.all))?(m.schema=t,m.schemaPath=O+"["+e+"]",m.errSchemaPath=D+"/"+e,x+=" "+g.validate(m)+" ",m.baseId=p):x+=" var "+S+" = true; ",e&&(x+=" if ("+S+" && "+c+") { "+L+" = false; "+s+" = ["+s+", "+e+"]; } else { ",A+="}"),x+=" if ("+S+") { "+L+" = "+c+" = true; "+s+" = "+e+"; }";return g.compositeRule=m.compositeRule=n,x+=A+"if (!"+L+") { var err = ",g.createErrors!==!1?(x+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(D)+" , params: { passingSchemas: "+s+" } ",g.opts.messages!==!1&&(x+=" , message: 'should match exactly one schema in oneOf' "),g.opts.verbose&&(x+=" , schema: validate.schema"+O+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+V+" "),x+=" } "):x+=" {} ",x+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&P&&(g.async?x+=" throw new ValidationError(vErrors); ":x+=" validate.errors = vErrors; return false; "),x+="} else { errors = "+C+"; if (vErrors !== null) { if ("+C+") vErrors.length = "+C+"; else vErrors = null; }",g.opts.allErrors&&(x+=" } "),x}},9737:function(ie){ie.exports=function(g,O,X){var A=" ",m=g.level,L=g.dataLevel,x=g.schema[O],N=g.schemaPath+g.util.getProperty(O),O=g.errSchemaPath+"/"+O,D=!g.opts.allErrors,P="data"+(L||""),V=g.opts.$data&&x&&x.$data,L=V?(A+=" var schema"+m+" = "+g.util.getData(x.$data,L,g.dataPathArr)+"; ","schema"+m):x,m=V?"(new RegExp("+L+"))":g.usePattern(x),C=(A+="if ( ",V&&(A+=" ("+L+" !== undefined && typeof "+L+" != 'string') || "),[]),m=(C.push(A+=" !"+m+".test("+P+") ) { "),A="",g.createErrors!==!1?(A=(A+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(O)+" , params: { pattern: ")+(V?""+L:""+g.util.toQuotedString(x))+" } ",g.opts.messages!==!1&&(A=(A+=` , message: 'should match pattern "`)+(V?"' + "+L+" + '":""+g.util.escapeQuotes(x))+`"' `),g.opts.verbose&&(A=(A=(A+=" , schema: ")+(V?"validate.schema"+N:""+g.util.toQuotedString(x)))+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+P+" "),A+=" } "):A+=" {} ",A),A=C.pop();return!g.compositeRule&&D?g.async?A+=" throw new ValidationError(["+m+"]); ":A+=" validate.errors = ["+m+"]; return false; ":A+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",A+="} ",D&&(A+=" else { "),A}},2537:function(ie){ie.exports=function(g,m,X){var x,N=" ",O=g.level,e=g.dataLevel,D=g.schema[m],P=g.schemaPath+g.util.getProperty(m),V=g.errSchemaPath+"/"+m,L=!g.opts.allErrors,C="data"+(e||""),m="errs__"+O,A=g.util.copy(g),S="",p=(A.level++,"valid"+A.level),c="key"+O,s="idx"+O,n=A.dataLevel=g.dataLevel+1,i="data"+n,t="dataProperties"+O,e=Object.keys(D||{}).filter(v),r=g.schema.patternProperties||{},a=Object.keys(r).filter(v),o=g.schema.additionalProperties,l=e.length||a.length,d=o===!1,y=typeof o=="object"&&Object.keys(o).length,I=g.opts.removeAdditional,h=d||y||I,u=g.opts.ownProperties,b=g.baseId,w=g.schema.required;function v(Te){return Te!=="__proto__"}if(w&&(!g.opts.$data||!w.$data)&&w.length<g.opts.loopRequired&&(x=g.util.toHash(w)),N+="var "+m+" = errors;var "+p+" = true;",u&&(N+=" var "+t+" = undefined;"),h){if(N+=u?" "+t+" = "+t+" || Object.keys("+C+"); for (var "+s+"=0; "+s+"<"+t+".length; "+s+"++) { var "+c+" = "+t+"["+s+"]; ":" for (var "+c+" in "+C+") { ",l){if(N+=" var isAdditional"+O+" = !(false ",e.length)if(8<e.length)N+=" || validate.schema"+P+".hasOwnProperty("+c+") ";else{var R=e;if(R)for(var B=-1,E=R.length-1;B<E;)Y=R[B+=1],N+=" || "+c+" == "+g.util.toQuotedString(Y)+" "}if(a.length){var T=a;if(T)for(var G=-1,F=T.length-1;G<F;)Ae=T[G+=1],N+=" || "+g.usePattern(Ae)+".test("+c+") "}N+=" ); if (isAdditional"+O+") { "}I=="all"?N+=" delete "+C+"["+c+"]; ":(k=g.errorPath,w="' + "+c+" + '",g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPathExpr(g.errorPath,c,g.opts.jsonPointers)),d?I?N+=" delete "+C+"["+c+"]; ":($=V,V=g.errSchemaPath+"/additionalProperties",(j=j||[]).push(N+=" "+p+" = false; "),N="",g.createErrors!==!1?(N+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { additionalProperty: '"+w+"' } ",g.opts.messages!==!1&&(N+=" , message: '",g.opts._errorDataPathProperty?N+="is an invalid additional property":N+="should NOT have additional properties",N+="' "),g.opts.verbose&&(N+=" , schema: false , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),N+=" } "):N+=" {} ",Q=N,N=j.pop(),!g.compositeRule&&L?g.async?N+=" throw new ValidationError(["+Q+"]); ":N+=" validate.errors = ["+Q+"]; return false; ":N+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",V=$,L&&(N+=" break; ")):y&&(I=="failing"?(N+=" var "+m+" = errors; ",h=g.compositeRule,g.compositeRule=A.compositeRule=!0,A.schema=o,A.schemaPath=g.schemaPath+".additionalProperties",A.errSchemaPath=g.errSchemaPath+"/additionalProperties",A.errorPath=g.opts._errorDataPathProperty?g.errorPath:g.util.getPathExpr(g.errorPath,c,g.opts.jsonPointers),Ie=C+"["+c+"]",A.dataPathArr[n]=c,we=g.validate(A),A.baseId=b,g.util.varOccurences(we,i)<2?N+=" "+g.util.varReplace(we,i,Ie)+" ":N+=" var "+i+" = "+Ie+"; "+we+" ",N+=" if (!"+p+") { errors = "+m+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+C+"["+c+"]; } ",g.compositeRule=A.compositeRule=h):(A.schema=o,A.schemaPath=g.schemaPath+".additionalProperties",A.errSchemaPath=g.errSchemaPath+"/additionalProperties",A.errorPath=g.opts._errorDataPathProperty?g.errorPath:g.util.getPathExpr(g.errorPath,c,g.opts.jsonPointers),Ie=C+"["+c+"]",A.dataPathArr[n]=c,we=g.validate(A),A.baseId=b,g.util.varOccurences(we,i)<2?N+=" "+g.util.varReplace(we,i,Ie)+" ":N+=" var "+i+" = "+Ie+"; "+we+" ",L&&(N+=" if (!"+p+") break; "))),g.errorPath=k),l&&(N+=" } "),N+=" } ",L&&(N+=" if ("+p+") { ",S+="}")}var z=g.opts.useDefaults&&!g.compositeRule;if(e.length){var K=e;if(K)for(var Y,_=-1,Z=K.length-1;_<Z;){var W,f,k,$,M,j,Q,te=D[Y=K[_+=1]];(g.opts.strictKeywords?typeof te=="object"&&0<Object.keys(te).length||te===!1:g.util.schemaHasRules(te,g.RULES.all))&&(Ie=C+(M=g.util.getProperty(Y)),W=z&&te.default!==void 0,A.schema=te,A.schemaPath=P+M,A.errSchemaPath=V+"/"+g.util.escapeFragment(Y),A.errorPath=g.util.getPath(g.errorPath,Y,g.opts.jsonPointers),A.dataPathArr[n]=g.util.toQuotedString(Y),we=g.validate(A),A.baseId=b,g.util.varOccurences(we,i)<2?(we=g.util.varReplace(we,i,Ie),f=Ie):N+=" var "+(f=i)+" = "+Ie+"; ",W?N+=" "+we+" ":(x&&x[Y]?(N+=" if ( "+f+" === undefined ",u&&(N+=" || ! Object.prototype.hasOwnProperty.call("+C+", '"+g.util.escapeQuotes(Y)+"') "),N+=") { "+p+" = false; ",k=g.errorPath,$=V,M=g.util.escapeQuotes(Y),g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPath(k,Y,g.opts.jsonPointers)),V=g.errSchemaPath+"/required",(j=j||[]).push(N),N="",g.createErrors!==!1?(N+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { missingProperty: '"+M+"' } ",g.opts.messages!==!1&&(N+=" , message: '",g.opts._errorDataPathProperty?N+="is a required property":N+="should have required property \\'"+M+"\\'",N+="' "),g.opts.verbose&&(N+=" , schema: validate.schema"+P+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),N+=" } "):N+=" {} ",Q=N,N=j.pop(),!g.compositeRule&&L?g.async?N+=" throw new ValidationError(["+Q+"]); ":N+=" validate.errors = ["+Q+"]; return false; ":N+=" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",V=$,g.errorPath=k,N+=" } else { "):L?(N+=" if ( "+f+" === undefined ",u&&(N+=" || ! Object.prototype.hasOwnProperty.call("+C+", '"+g.util.escapeQuotes(Y)+"') "),N+=") { "+p+" = true; } else { "):(N+=" if ("+f+" !== undefined ",u&&(N+=" && Object.prototype.hasOwnProperty.call("+C+", '"+g.util.escapeQuotes(Y)+"') "),N+=" ) { "),N+=" "+we+" } ")),L&&(N+=" if ("+p+") { ",S+="}")}}if(a.length){var he=a;if(he)for(var Ae,ue=-1,Ce=he.length-1;ue<Ce;){var Ie,we,te=r[Ae=he[ue+=1]];(g.opts.strictKeywords?typeof te=="object"&&0<Object.keys(te).length||te===!1:g.util.schemaHasRules(te,g.RULES.all))&&(A.schema=te,A.schemaPath=g.schemaPath+".patternProperties"+g.util.getProperty(Ae),A.errSchemaPath=g.errSchemaPath+"/patternProperties/"+g.util.escapeFragment(Ae),N=(N+=u?" "+t+" = "+t+" || Object.keys("+C+"); for (var "+s+"=0; "+s+"<"+t+".length; "+s+"++) { var "+c+" = "+t+"["+s+"]; ":" for (var "+c+" in "+C+") { ")+" if ("+g.usePattern(Ae)+".test("+c+")) { ",A.errorPath=g.util.getPathExpr(g.errorPath,c,g.opts.jsonPointers),Ie=C+"["+c+"]",A.dataPathArr[n]=c,we=g.validate(A),A.baseId=b,g.util.varOccurences(we,i)<2?N+=" "+g.util.varReplace(we,i,Ie)+" ":N+=" var "+i+" = "+Ie+"; "+we+" ",L&&(N+=" if (!"+p+") break; "),N+=" } ",L&&(N+=" else "+p+" = true; "),N+=" } ",L&&(N+=" if ("+p+") { ",S+="}"))}}return L&&(N+=" "+S+" if ("+m+" == errors) {"),N}},2127:function(ie){ie.exports=function(g,p,X){var x,N,O,D,P,V,L,C=" ",m=g.level,s=g.dataLevel,A=g.schema[p],S=g.schemaPath+g.util.getProperty(p),p=g.errSchemaPath+"/"+p,c=!g.opts.allErrors,s="data"+(s||""),n="errs__"+m,i=g.util.copy(g),t=(i.level++,"valid"+i.level);return C+="var "+n+" = errors;",(g.opts.strictKeywords?typeof A=="object"&&0<Object.keys(A).length||A===!1:g.util.schemaHasRules(A,g.RULES.all))&&(i.schema=A,i.schemaPath=S,i.errSchemaPath=p,A="idx"+m,N="i"+m,O="' + "+(x="key"+m)+" + '",D="data"+(i.dataLevel=g.dataLevel+1),L="dataProperties"+m,V=g.opts.ownProperties,P=g.baseId,V&&(C+=" var "+L+" = undefined; "),C=C+(V?" "+L+" = "+L+" || Object.keys("+s+"); for (var "+A+"=0; "+A+"<"+L+".length; "+A+"++) { var "+x+" = "+L+"["+A+"]; ":" for (var "+x+" in "+s+") { ")+" var startErrs"+m+" = errors; ",V=x,L=g.compositeRule,g.compositeRule=i.compositeRule=!0,A=g.validate(i),i.baseId=P,g.util.varOccurences(A,D)<2?C+=" "+g.util.varReplace(A,D,V)+" ":C+=" var "+D+" = "+V+"; "+A+" ",g.compositeRule=i.compositeRule=L,C+=" if (!"+t+") { for (var "+N+"=startErrs"+m+"; "+N+"<errors; "+N+"++) { vErrors["+N+"].propertyName = "+x+"; } var err = ",g.createErrors!==!1?(C+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(p)+" , params: { propertyName: '"+O+"' } ",g.opts.messages!==!1&&(C+=" , message: 'property name \\'"+O+"\\' is invalid' "),g.opts.verbose&&(C+=" , schema: validate.schema"+S+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+s+" "),C+=" } "):C+=" {} ",C+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!g.compositeRule&&c&&(g.async?C+=" throw new ValidationError(vErrors); ":C+=" validate.errors = vErrors; return false; "),c&&(C+=" break; "),C+=" } }"),c&&(C+=" if ("+n+" == errors) {"),C}},2331:function(ie){ie.exports=function(g,V,X){var x,N,O=" ",m=g.level,D=g.dataLevel,P=g.schema[V],V=g.errSchemaPath+"/"+V,L=!g.opts.allErrors,C="data"+(D||""),m="valid"+m;if(P=="#"||P=="#/")N=g.isRoot?(x=g.async,"validate"):(x=g.root.schema.$async===!0,"root.refVal[0]");else{var A=g.resolveRef(g.baseId,P,g.isRoot);if(A===void 0){var S=g.MissingRefError.message(g.baseId,P);if(g.opts.missingRefs=="fail")g.logger.error(S),(p=p||[]).push(O),O="",g.createErrors!==!1?(O+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { ref: '"+g.util.escapeQuotes(P)+"' } ",g.opts.messages!==!1&&(O+=" , message: 'can\\'t resolve reference "+g.util.escapeQuotes(P)+"' "),g.opts.verbose&&(O+=" , schema: "+g.util.toQuotedString(P)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),O+=" } "):O+=" {} ",V=O,O=p.pop(),!g.compositeRule&&L?g.async?O+=" throw new ValidationError(["+V+"]); ":O+=" validate.errors = ["+V+"]; return false; ":O+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",L&&(O+=" if (false) { ");else{if(g.opts.missingRefs!="ignore")throw new g.MissingRefError(g.baseId,P,S);g.logger.warn(S),L&&(O+=" if (true) { ")}}else A.inline?((V=g.util.copy(g)).level++,S="valid"+V.level,V.schema=A.schema,V.schemaPath="",V.errSchemaPath=P,O+=" "+g.validate(V).replace(/validate\.schema/g,A.code)+" ",L&&(O+=" if ("+S+") { ")):(x=A.$async===!0||g.async&&A.$async!==!1,N=A.code)}if(N){(p=p||[]).push(O),O="",g.opts.passContext?O+=" "+N+".call(this, ":O+=" "+N+"( ",O+=" "+C+", (dataPath || '')",g.errorPath!='""'&&(O+=" + "+g.errorPath);var p,P=D?"data"+(D-1||""):"parentData",V=O+=" , "+P+" , "+(D?g.dataPathArr[D]:"parentDataProperty")+", rootData) ";if(O=p.pop(),x){if(!g.async)throw new Error("async schema referenced by sync schema");L&&(O+=" var "+m+"; "),O+=" try { await "+V+"; ",L&&(O+=" "+m+" = true; "),O+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",L&&(O+=" "+m+" = false; "),O+=" } ",L&&(O+=" if ("+m+") { ")}else O+=" if (!"+V+") { if (vErrors === null) vErrors = "+N+".errors; else vErrors = vErrors.concat("+N+".errors); errors = vErrors.length; } ",L&&(O+=" else { ")}return O}},1204:function(ie){ie.exports=function(g,V,X){var x=" ",N=g.level,A=g.dataLevel,O=g.schema[V],D=g.schemaPath+g.util.getProperty(V),P=g.errSchemaPath+"/"+V,V=!g.opts.allErrors,L="data"+(A||""),C="valid"+N,m=g.opts.$data&&O&&O.$data,A=(m&&(x+=" var schema"+N+" = "+g.util.getData(O.$data,A,g.dataPathArr)+"; "),"schema"+N);if(!m)if(O.length<g.opts.loopRequired&&g.schema.properties&&Object.keys(g.schema.properties).length){var S=[],p=O;if(p)for(var c=-1,s=p.length-1;c<s;){var n=p[c+=1],i=g.schema.properties[n];i&&(g.opts.strictKeywords?typeof i=="object"&&0<Object.keys(i).length||i===!1:g.util.schemaHasRules(i,g.RULES.all))||(S[S.length]=n)}}else S=O;if(m||S.length){var t=g.errorPath,O=m||S.length>=g.opts.loopRequired,e=g.opts.ownProperties;if(V){if(x+=" var missing"+N+"; ",O){m||(x+=" var "+A+" = validate.schema"+D+"; ");var r="' + "+(I="schema"+N+"["+(l="i"+N)+"]")+" + '";g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPathExpr(t,I,g.opts.jsonPointers)),x+=" var "+C+" = true; ",m&&(x+=" if (schema"+N+" === undefined) "+C+" = true; else if (!Array.isArray(schema"+N+")) "+C+" = false; else {"),x+=" for (var "+l+" = 0; "+l+" < "+A+".length; "+l+"++) { "+C+" = "+L+"["+A+"["+l+"]] !== undefined ",e&&(x+=" && Object.prototype.hasOwnProperty.call("+L+", "+A+"["+l+"]) "),x+="; if (!"+C+") break; } ",m&&(x+=" } "),(y=y||[]).push(x+=" if (!"+C+") { "),x="",g.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { missingProperty: '"+r+"' } ",g.opts.messages!==!1&&(x+=" , message: '",g.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+r+"\\'",x+="' "),g.opts.verbose&&(x+=" , schema: validate.schema"+D+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+L+" "),x+=" } "):x+=" {} ";var a=x,x=y.pop()}else{x+=" if ( ";var o=S;if(o)for(var l=-1,d=o.length-1;l<d;)u=o[l+=1],l&&(x+=" || "),x+=" ( ( "+(R=L+(v=g.util.getProperty(u)))+" === undefined ",e&&(x+=" || ! Object.prototype.hasOwnProperty.call("+L+", '"+g.util.escapeQuotes(u)+"') "),x+=") && (missing"+N+" = "+g.util.toQuotedString(g.opts.jsonPointers?u:v)+") ) ";x+=") { ",r="' + "+(I="missing"+N)+" + '",g.opts._errorDataPathProperty&&(g.errorPath=g.opts.jsonPointers?g.util.getPathExpr(t,I,!0):t+" + "+I),(y=y||[]).push(x),x="",g.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { missingProperty: '"+r+"' } ",g.opts.messages!==!1&&(x+=" , message: '",g.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+r+"\\'",x+="' "),g.opts.verbose&&(x+=" , schema: validate.schema"+D+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+L+" "),x+=" } "):x+=" {} ";var y,a=x;x=y.pop()}!g.compositeRule&&V?g.async?x+=" throw new ValidationError(["+a+"]); ":x+=" validate.errors = ["+a+"]; return false; ":x+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } else { "}else if(O){m||(x+=" var "+A+" = validate.schema"+D+"; ");var I,r="' + "+(I="schema"+N+"["+(l="i"+N)+"]")+" + '";g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPathExpr(t,I,g.opts.jsonPointers)),m&&(x+=" if ("+A+" && !Array.isArray("+A+")) { var err = ",g.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { missingProperty: '"+r+"' } ",g.opts.messages!==!1&&(x+=" , message: '",g.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+r+"\\'",x+="' "),g.opts.verbose&&(x+=" , schema: validate.schema"+D+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+L+" "),x+=" } "):x+=" {} ",x+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+A+" !== undefined) { "),x+=" for (var "+l+" = 0; "+l+" < "+A+".length; "+l+"++) { if ("+L+"["+A+"["+l+"]] === undefined ",e&&(x+=" || ! Object.prototype.hasOwnProperty.call("+L+", "+A+"["+l+"]) "),x+=") { var err = ",g.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { missingProperty: '"+r+"' } ",g.opts.messages!==!1&&(x+=" , message: '",g.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+r+"\\'",x+="' "),g.opts.verbose&&(x+=" , schema: validate.schema"+D+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+L+" "),x+=" } "):x+=" {} ",x+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(x+=" } ")}else{var h=S;if(h)for(var u,b=-1,w=h.length-1;b<w;){u=h[b+=1];var v=g.util.getProperty(u),r=g.util.escapeQuotes(u),R=L+v;g.opts._errorDataPathProperty&&(g.errorPath=g.util.getPath(t,u,g.opts.jsonPointers)),x+=" if ( "+R+" === undefined ",e&&(x+=" || ! Object.prototype.hasOwnProperty.call("+L+", '"+g.util.escapeQuotes(u)+"') "),x+=") { var err = ",g.createErrors!==!1?(x+=" { keyword: 'required' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(P)+" , params: { missingProperty: '"+r+"' } ",g.opts.messages!==!1&&(x+=" , message: '",g.opts._errorDataPathProperty?x+="is a required property":x+="should have required property \\'"+r+"\\'",x+="' "),g.opts.verbose&&(x+=" , schema: validate.schema"+D+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+L+" "),x+=" } "):x+=" {} ",x+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}g.errorPath=t}else V&&(x+=" if (true) {");return x}},1985:function(ie){ie.exports=function(g,V,X){var x,N=" ",O=g.level,S=g.dataLevel,D=g.schema[V],P=g.schemaPath+g.util.getProperty(V),V=g.errSchemaPath+"/"+V,L=!g.opts.allErrors,C="data"+(S||""),m="valid"+O,A=g.opts.$data&&D&&D.$data,S=A?(N+=" var schema"+O+" = "+g.util.getData(D.$data,S,g.dataPathArr)+"; ","schema"+O):D;return(D||A)&&g.opts.uniqueItems!==!1?(A&&(N+=" var "+m+"; if ("+S+" === false || "+S+" === undefined) "+m+" = true; else if (typeof "+S+" != 'boolean') "+m+" = false; else { "),N+=" var i = "+C+".length , "+m+" = true , j; if (i > 1) { ",O=g.schema.items&&g.schema.items.type,S=Array.isArray(O),!O||O=="object"||O=="array"||S&&(0<=O.indexOf("object")||0<=O.indexOf("array"))?N+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+C+"[i], "+C+"[j])) { "+m+" = false; break outer; } } } ":(N=(N+=" var itemIndices = {}, item; for (;i--;) { var item = "+C+"[i]; ")+" if ("+g.util["checkDataType"+(S?"s":"")](O,"item",g.opts.strictNumbers,!0)+") continue; ",S&&(N+=` if (typeof item == 'string') item = '"' + item; `),N+=" if (typeof itemIndices[item] == 'number') { "+m+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),N+=" } ",A&&(N+=" } "),(x=x||[]).push(N+=" if (!"+m+") { "),N="",g.createErrors!==!1?(N+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(V)+" , params: { i: i, j: j } ",g.opts.messages!==!1&&(N+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),g.opts.verbose&&(N=(N+=" , schema: ")+(A?"validate.schema"+P:""+D)+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+C+" "),N+=" } "):N+=" {} ",O=N,N=x.pop(),!g.compositeRule&&L?g.async?N+=" throw new ValidationError(["+O+"]); ":N+=" validate.errors = ["+O+"]; return false; ":N+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N+=" } ",L&&(N+=" else { ")):L&&(N+=" if (true) { "),N}},1869:function(ie){ie.exports=function(g,H,X){var x="",N=g.schema.$async===!0,O=g.util.schemaHasRulesExcept(g.schema,g.RULES.all,"$ref"),D=g.self._getId(g.schema);if(g.opts.strictKeywords){var P=g.util.schemaUnknownRules(g.schema,g.RULES.keywords);if(P){if(P="unknown keyword: "+P,g.opts.strictKeywords!=="log")throw new Error(P);g.logger.warn(P)}}if(g.isTop&&(x+=" var validate = ",N&&(g.async=!0,x+="async "),x+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",D&&(g.opts.sourceCode||g.opts.processCode)&&(x+=" /*# sourceURL="+D+" */ ")),typeof g.schema=="boolean"||!O&&!g.schema.$ref)L=g.level,C=g.dataLevel,R=g.schema[H="false schema"],r=g.schemaPath+g.util.getProperty(H),a=g.errSchemaPath+"/"+H,p=!g.opts.allErrors,m="data"+(C||""),S="valid"+L,g.schema===!1?(g.isTop?p=!0:x+=" var "+S+" = false; ",(_=_||[]).push(x),x="",g.createErrors!==!1?(x+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(a)+" , params: {} ",g.opts.messages!==!1&&(x+=" , message: 'boolean schema is false' "),g.opts.verbose&&(x+=" , schema: false , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),x+=" } "):x+=" {} ",u=x,x=_.pop(),!g.compositeRule&&p?g.async?x+=" throw new ValidationError(["+u+"]); ":x+=" validate.errors = ["+u+"]; return false; ":x+=" var err = "+u+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):g.isTop?x+=N?" return data; ":" validate.errors = null; return true; ":x+=" var "+S+" = true; ",g.isTop&&(x+=" }; return validate; ");else{if(g.isTop){var V=g.isTop,L=g.level=0,C=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 A="default is ignored in the schema root";if(g.opts.strictDefaults!=="log")throw new Error(A);g.logger.warn(A)}x=(x+=" var vErrors = null; ")+" var errors = 0; if (rootData === undefined) rootData = data; "}else{if(L=g.level,m="data"+((C=g.dataLevel)||""),D&&(g.baseId=g.resolve.url(g.baseId,D)),N&&!g.async)throw new Error("async schema in sync schema");x+=" var errs_"+L+" = errors;"}var S="valid"+L,p=!g.opts.allErrors,c="",s="",n=g.schema.type,i=Array.isArray(n);if(n&&g.opts.nullable&&g.schema.nullable===!0&&(i?n.indexOf("null")==-1&&(n=n.concat("null")):n!="null"&&(n=[n,"null"],i=!0)),i&&n.length==1&&(n=n[0],i=!1),g.schema.$ref&&O){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&&(O=!1,g.logger.warn('$ref: keywords ignored in schema at path "'+g.errSchemaPath+'"'))}if(g.schema.$comment&&g.opts.$comment&&(x+=" "+g.RULES.all.$comment.code(g,"$comment")),n){g.opts.coerceTypes&&(t=g.util.coerceToTypes(g.opts.coerceTypes,n));var t,e=g.RULES.types[n];if(t||i||e===!0||e&&!$(e)){var r=g.schemaPath+".type",a=g.errSchemaPath+"/type",r=g.schemaPath+".type",a=g.errSchemaPath+"/type";if(x+=" if ("+g.util[i?"checkDataTypes":"checkDataType"](n,m,g.opts.strictNumbers,!0)+") { ",t){var o="dataType"+L,l="coerced"+L,d=(x+=" var "+o+" = typeof "+m+"; var "+l+" = undefined; ",g.opts.coerceTypes=="array"&&(x+=" 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)+") "+l+" = "+m+"; } "),x+=" if ("+l+" !== undefined) ; ",t);if(d)for(var y,I=-1,h=d.length-1;I<h;)(y=d[I+=1])=="string"?x+=" else if ("+o+" == 'number' || "+o+" == 'boolean') "+l+" = '' + "+m+"; else if ("+m+" === null) "+l+" = ''; ":y=="number"||y=="integer"?(x+=" else if ("+o+" == 'boolean' || "+m+" === null || ("+o+" == 'string' && "+m+" && "+m+" == +"+m+" ",y=="integer"&&(x+=" && !("+m+" % 1)"),x+=")) "+l+" = +"+m+"; "):y=="boolean"?x+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+l+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+l+" = true; ":y=="null"?x+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+l+" = null; ":g.opts.coerceTypes=="array"&&y=="array"&&(x+=" else if ("+o+" == 'string' || "+o+" == 'number' || "+o+" == 'boolean' || "+m+" == null) "+l+" = ["+m+"]; ");(_=_||[]).push(x+=" else { "),x="",g.createErrors!==!1?(x=(x+=" { keyword: 'type' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(a)+" , params: { type: '")+(i?""+n.join(","):""+n)+"' } ",g.opts.messages!==!1&&(x=(x+=" , message: 'should be ")+(i?""+n.join(","):""+n)+"' "),g.opts.verbose&&(x+=" , schema: validate.schema"+r+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),x+=" } "):x+=" {} ";var u=x,P=(x=_.pop(),!g.compositeRule&&p?g.async?x+=" throw new ValidationError(["+u+"]); ":x+=" validate.errors = ["+u+"]; return false; ":x+=" var err = "+u+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",C?"data"+(C-1||""):"parentData");x=x+(" } if ("+l+" !== undefined) { ")+(" "+m+" = "+l+"; "),C||(x+="if ("+P+" !== undefined)"),x+=" "+P+"["+(C?g.dataPathArr[C]:"parentDataProperty")+"] = "+l+"; } "}else u=((_=_||[]).push(x),x="",g.createErrors!==!1?(x=(x+=" { keyword: 'type' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(a)+" , params: { type: '")+(i?""+n.join(","):""+n)+"' } ",g.opts.messages!==!1&&(x=(x+=" , message: 'should be ")+(i?""+n.join(","):""+n)+"' "),g.opts.verbose&&(x+=" , schema: validate.schema"+r+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),x+=" } "):x+=" {} ",x),x=_.pop(),!g.compositeRule&&p?g.async?x+=" throw new ValidationError(["+u+"]); ":x+=" validate.errors = ["+u+"]; return false; ":x+=" var err = "+u+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";x+=" } "}}if(g.schema.$ref&&!O)x+=" "+g.RULES.all.$ref.code(g,"$ref")+" ",p&&(x=(x+=" } if (errors === ")+(V?"0":"errs_"+L)+") { ",s+="}");else{var b=g.RULES;if(b){for(var w=-1,v=b.length-1;w<v;)if($(e=b[w+=1])){if(e.type&&(x+=" if ("+g.util.checkDataType(e.type,m,g.opts.strictNumbers)+") { "),g.opts.useDefaults){if(e.type=="object"&&g.schema.properties){var R=g.schema.properties,B=Object.keys(R);if(B){for(var E,T=-1,G=B.length-1;T<G;)if((K=R[E=B[T+=1]]).default!==void 0){var F=m+g.util.getProperty(E);if(g.compositeRule){if(g.opts.strictDefaults){if(A="default is ignored for: "+F,g.opts.strictDefaults!=="log")throw new Error(A);g.logger.warn(A)}}else x+=" if ("+F+" === undefined ",g.opts.useDefaults=="empty"&&(x+=" || "+F+" === null || "+F+" === '' "),x+=" ) "+F+" = ",g.opts.useDefaults=="shared"?x+=" "+g.useDefault(K.default)+" ":x+=" "+JSON.stringify(K.default)+" ",x+="; "}}}else if(e.type=="array"&&Array.isArray(g.schema.items)){var z=g.schema.items;if(z){for(var K,I=-1,Y=z.length-1;I<Y;)if((K=z[I+=1]).default!==void 0)if(F=m+"["+I+"]",g.compositeRule){if(g.opts.strictDefaults){if(A="default is ignored for: "+F,g.opts.strictDefaults!=="log")throw new Error(A);g.logger.warn(A)}}else x+=" if ("+F+" === undefined ",g.opts.useDefaults=="empty"&&(x+=" || "+F+" === null || "+F+" === '' "),x+=" ) "+F+" = ",g.opts.useDefaults=="shared"?x+=" "+g.useDefault(K.default)+" ":x+=" "+JSON.stringify(K.default)+" ",x+="; "}}}var _,Z=e.rules;if(Z)for(var W,f=-1,k=Z.length-1;f<k;)!M(W=Z[f+=1])||(W=W.code(g,W.keyword,e.type))&&(x+=" "+W+" ",p&&(c+="}"));p&&(x+=" "+c+" ",c=""),e.type&&(x+=" } ",n&&n===e.type&&!t&&(x+=" else { ",r=g.schemaPath+".type",a=g.errSchemaPath+"/type",(_=_||[]).push(x),x="",g.createErrors!==!1?(x=(x+=" { keyword: 'type' , dataPath: (dataPath || '') + "+g.errorPath+" , schemaPath: "+g.util.toQuotedString(a)+" , params: { type: '")+(i?""+n.join(","):""+n)+"' } ",g.opts.messages!==!1&&(x=(x+=" , message: 'should be ")+(i?""+n.join(","):""+n)+"' "),g.opts.verbose&&(x+=" , schema: validate.schema"+r+" , parentSchema: validate.schema"+g.schemaPath+" , data: "+m+" "),x+=" } "):x+=" {} ",u=x,x=_.pop(),!g.compositeRule&&p?g.async?x+=" throw new ValidationError(["+u+"]); ":x+=" validate.errors = ["+u+"]; return false; ":x+=" var err = "+u+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",x+=" } ")),p&&(x=(x+=" if (errors === ")+(V?"0":"errs_"+L)+") { ",s+="}")}}}p&&(x+=" "+s+" "),V?x=x+(N?" if (errors === 0) return data; else throw new ValidationError(vErrors); ":" validate.errors = vErrors; return errors === 0; ")+" }; return validate;":x+=" var "+S+" = errors === errs_"+L+";"}return x;function $(j){for(var Q=j.rules,te=0;te<Q.length;te++)if(M(Q[te]))return 1}function M(j){return g.schema[j.keyword]!==void 0||j.implements&&function(Q){for(var te=Q.implements,he=0;he<te.length;he++)if(g.schema[te[he]]!==void 0)return 1}(j)}}},7931:function(ie,g,H){var X=/^[a-z_$][a-z0-9_$-]*$/i,x=H(1793),N=H(5868);function O(D,P){O.errors=null;var V=this._validateKeyword=this._validateKeyword||this.compile(N,!0);if(V(D))return!0;if(O.errors=V.errors,P)throw new Error("custom keyword definition is invalid: "+this.errorsText(V.errors));return!1}ie.exports={add:function(D,P){var V=this.RULES;if(V.keywords[D])throw new Error("Keyword "+D+" is already defined");if(!X.test(D))throw new Error("Keyword "+D+" is not a valid identifier");if(P){this.validateKeyword(P,!0);var L=P.type;if(Array.isArray(L))for(var C=0;C<L.length;C++)A(D,L[C],P);else A(D,L,P);var m=P.metaSchema;m&&(P.$data&&this._opts.$data&&(m={anyOf:[m,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),P.validateSchema=this.compile(m,!0))}function A(S,p,c){for(var s,n=0;n<V.length;n++){var i=V[n];if(i.type==p){s=i;break}}s||V.push(s={type:p,rules:[]}),c={keyword:S,definition:c,custom:!0,code:x,implements:c.implements},s.rules.push(c),V.custom[S]=c}return V.keywords[D]=V.all[D]=!0,this},get:function(D){var P=this.RULES.custom[D];return P?P.definition:this.RULES.keywords[D]||!1},remove:function(D){var P=this.RULES;delete P.keywords[D],delete P.all[D],delete P.custom[D];for(var V=0;V<P.length;V++)for(var L=P[V].rules,C=0;C<L.length;C++)if(L[C].keyword==D){L.splice(C,1);break}return this},validate:O}},2303:function(ie){ie.exports=function g(H,X){if(H===X)return!0;if(H&&X&&typeof H=="object"&&typeof X=="object"){if(H.constructor!==X.constructor)return!1;var x,N,O;if(Array.isArray(H)){if((x=H.length)!=X.length)return!1;for(N=x;N--!=0;)if(!g(H[N],X[N]))return!1}else{if(H.constructor===RegExp)return H.source===X.source&&H.flags===X.flags;if(H.valueOf!==Object.prototype.valueOf)return H.valueOf()===X.valueOf();if(H.toString!==Object.prototype.toString)return H.toString()===X.toString();if((x=(O=Object.keys(H)).length)!==Object.keys(X).length)return!1;for(N=x;N--!=0;)if(!Object.prototype.hasOwnProperty.call(X,O[N]))return!1;for(N=x;N--!=0;){var D=O[N];if(!g(H[D],X[D]))return!1}}return!0}return H!=H&&X!=X}},3508:function(ie){ie.exports=function(g,H){var X,x=typeof(H=typeof(H=H||{})=="function"?{cmp:H}:H).cycles=="boolean"&&H.cycles,N=H.cmp&&(X=H.cmp,function(D){return function(P,V){return P={key:P,value:D[P]},V={key:V,value:D[V]},X(P,V)}}),O=[];return function D(P){if((P=P&&P.toJSON&&typeof P.toJSON=="function"?P.toJSON():P)!==void 0){if(typeof P=="number")return isFinite(P)?""+P:"null";if(typeof P!="object")return JSON.stringify(P);if(Array.isArray(P)){for(C="[",m=0;m<P.length;m++)m&&(C+=","),C+=D(P[m])||"null";return C+"]"}if(P===null)return"null";if(O.indexOf(P)!==-1){if(x)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var V=O.push(P)-1,L=Object.keys(P).sort(N&&N(P)),C="",m=0;m<L.length;m++){var A=L[m],S=D(P[A]);S&&(C&&(C+=","),C+=JSON.stringify(A)+":"+S)}return O.splice(V,1),"{"+C+"}"}}(g)}},233:function(ie){ie.exports=function g(L,C){function x(n){return g.insensitive&&(""+n).toLowerCase()||""+n}var N,O,p=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,S=/(^[ ]*|[ ]*$)/g,D=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,P=/^0x[0-9a-f]+$/i,V=/^0/,L=x(L).replace(S,"")||"",C=x(C).replace(S,"")||"",m=L.replace(p,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),A=C.replace(p,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),S=parseInt(L.match(P),16)||m.length!==1&&L.match(D)&&Date.parse(L),p=parseInt(C.match(P),16)||S&&C.match(D)&&Date.parse(C)||null;if(p){if(S<p)return-1;if(p<S)return 1}for(var c=0,s=Math.max(m.length,A.length);c<s;c++){if(N=!(m[c]||"").match(V)&&parseFloat(m[c])||m[c]||0,O=!(A[c]||"").match(V)&&parseFloat(A[c])||A[c]||0,isNaN(N)!==isNaN(O))return isNaN(N)?1:-1;if(typeof N!=typeof O&&(N+="",O+=""),N<O)return-1;if(O<N)return 1}return 0}},5156:function(ie,g){(function(H){function X(E){return E!==null&&Object.prototype.toString.call(E)==="[object Array]"}function x(E){return E!==null&&Object.prototype.toString.call(E)==="[object Object]"}function N(E,T){if(E!==T){if(Object.prototype.toString.call(E)!==Object.prototype.toString.call(T))return!1;if(X(E)===!0){if(E.length!==T.length)return!1;for(var G=0;G<E.length;G++)if(N(E[G],T[G])===!1)return!1}else{if(x(E)!==!0)return!1;var F,z,K={};for(F in E)if(hasOwnProperty.call(E,F)){if(N(E[F],T[F])===!1)return!1;K[F]=!0}for(z in T)if(hasOwnProperty.call(T,z)&&K[z]!==!0)return!1}}return!0}function O(E){if(E===""||E===!1||E===null||X(E)&&E.length===0)return!0;if(x(E)){for(var T in E)if(E.hasOwnProperty(T))return!1;return!0}return!1}var D=typeof String.prototype.trimLeft=="function"?function(E){return E.trimLeft()}:function(E){return E.match(/^\s*(.*)/)[1]},P={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},V="UnquotedIdentifier",L="QuotedIdentifier",C="Rbracket",m="Rparen",A="Comma",S="Colon",p="Rbrace",c="Number",s="Current",n="Expref",i="Pipe",t="Flatten",e="Star",r="Filter",a="Lbrace",o="Lbracket",l="Lparen",d="Literal",y={".":"Dot","*":e,",":A,":":S,"{":a,"}":p,"]":C,"(":l,")":m,"@":s},I={"<":!0,">":!0,"=":!0,"!":!0},h={" ":!0," ":!0,"\n":!0};function u(E){return"0"<=E&&E<="9"||E==="-"}function b(){}b.prototype={tokenize:function(E){var T,G,F=[];for(this._current=0;this._current<E.length;)if("a"<=(K=E[this._current])&&K<="z"||"A"<=K&&K<="Z"||K==="_")z=this._current,T=this._consumeUnquotedIdentifier(E),F.push({type:V,value:T,start:z});else if(y[E[this._current]]!==void 0)F.push({type:y[E[this._current]],value:E[this._current],start:this._current}),this._current++;else if(u(E[this._current]))G=this._consumeNumber(E),F.push(G);else if(E[this._current]==="[")G=this._consumeLBracket(E),F.push(G);else if(E[this._current]==='"')z=this._current,T=this._consumeQuotedIdentifier(E),F.push({type:L,value:T,start:z});else if(E[this._current]==="'")z=this._current,T=this._consumeRawStringLiteral(E),F.push({type:d,value:T,start:z});else if(E[this._current]==="`"){var z=this._current,K=this._consumeLiteral(E);F.push({type:d,value:K,start:z})}else if(I[E[this._current]]!==void 0)F.push(this._consumeOperator(E));else if(h[E[this._current]]!==void 0)this._current++;else if(E[this._current]==="&")z=this._current,this._current++,E[this._current]==="&"?(this._current++,F.push({type:"And",value:"&&",start:z})):F.push({type:n,value:"&",start:z});else{if(E[this._current]!=="|")throw(K=new Error("Unknown character:"+E[this._current])).name="LexerError",K;z=this._current,this._current++,E[this._current]==="|"?(this._current++,F.push({type:"Or",value:"||",start:z})):F.push({type:i,value:"|",start:z})}return F},_consumeUnquotedIdentifier:function(E){var T,G=this._current;for(this._current++;this._current<E.length&&("a"<=(T=E[this._current])&&T<="z"||"A"<=T&&T<="Z"||"0"<=T&&T<="9"||T==="_");)this._current++;return E.slice(G,this._current)},_consumeQuotedIdentifier:function(E){for(var T=this._current,G=(this._current++,E.length);E[this._current]!=='"'&&this._current<G;){var F=this._current;E[F]!=="\\"||E[F+1]!=="\\"&&E[F+1]!=='"'?F++:F+=2,this._current=F}return this._current++,JSON.parse(E.slice(T,this._current))},_consumeRawStringLiteral:function(E){for(var T=this._current,G=(this._current++,E.length);E[this._current]!=="'"&&this._current<G;){var F=this._current;E[F]!=="\\"||E[F+1]!=="\\"&&E[F+1]!=="'"?F++:F+=2,this._current=F}return this._current++,E.slice(T+1,this._current-1).replace("\\'","'")},_consumeNumber:function(E){for(var T=this._current,G=(this._current++,E.length);u(E[this._current])&&this._current<G;)this._current++;var F=parseInt(E.slice(T,this._current));return{type:c,value:F,start:T}},_consumeLBracket:function(E){var T=this._current;return this._current++,E[this._current]==="?"?(this._current++,{type:r,value:"[?",start:T}):E[this._current]==="]"?(this._current++,{type:t,value:"[]",start:T}):{type:o,value:"[",start:T}},_consumeOperator:function(E){var T=this._current,G=E[T];return this._current++,G==="!"?E[this._current]==="="?(this._current++,{type:"NE",value:"!=",start:T}):{type:"Not",value:"!",start:T}:G==="<"?E[this._current]==="="?(this._current++,{type:"LTE",value:"<=",start:T}):{type:"LT",value:"<",start:T}:G===">"?E[this._current]==="="?(this._current++,{type:"GTE",value:">=",start:T}):{type:"GT",value:">",start:T}:G==="="&&E[this._current]==="="?(this._current++,{type:"EQ",value:"==",start:T}):void 0},_consumeLiteral:function(E){this._current++;for(var T=this._current,G=E.length;E[this._current]!=="`"&&this._current<G;){var F=this._current;E[F]!=="\\"||E[F+1]!=="\\"&&E[F+1]!=="`"?F++:F+=2,this._current=F}return T=(T=D(E.slice(T,this._current))).replace("\\`","`"),T=this._looksLikeJSON(T)?JSON.parse(T):JSON.parse('"'+T+'"'),this._current++,T},_looksLikeJSON:function(E){if(E==="")return!1;if(0<='[{"'.indexOf(E[0])||0<=["true","false","null"].indexOf(E))return!0;if(!(0<="-0123456789".indexOf(E[0])))return!1;try{return JSON.parse(E),!0}catch{return!1}}};var w={};function v(){}function R(E){this.runtime=E}function B(E){this._interpreter=E,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}]}}}w.EOF=0,w[V]=0,w[L]=0,w[C]=0,w[m]=0,w[A]=0,w[p]=0,w[c]=0,w[s]=0,w[n]=0,w.Pipe=1,w.Or=2,w.And=3,w.EQ=5,w.GT=5,w.LT=5,w.GTE=5,w.LTE=5,w.NE=5,w[t]=9,w.Star=20,w[r]=21,w.Dot=40,w.Not=45,w[a]=50,w[o]=55,w[l]=60,v.prototype={parse:function(G){this._loadTokens(G),this.index=0;var T,G=this.expression(0);if(this._lookahead(0)!=="EOF")throw T=this._lookaheadToken(0),(T=new Error("Unexpected token type: "+T.type+", value: "+T.value)).name="ParserError",T;return G},_loadTokens:function(E){var T=new b().tokenize(E);T.push({type:"EOF",value:"",start:E.length}),this.tokens=T},expression:function(E){for(var T=this._lookaheadToken(0),G=(this._advance(),this.nud(T)),F=this._lookahead(0);E<w[F];)this._advance(),G=this.led(F,G),F=this._lookahead(0);return G},_lookahead:function(E){return this.tokens[this.index+E].type},_lookaheadToken:function(E){return this.tokens[this.index+E]},_advance:function(){this.index++},nud:function(E){var T,G;switch(E.type){case d:return{type:"Literal",value:E.value};case V:return{type:"Field",name:E.value};case L:var F={type:"Field",name:E.value};if(this._lookahead(0)===l)throw new Error("Quoted identifier not allowed for function names.");return F;case"Not":return{type:"NotExpression",children:[T=this.expression(w.Not)]};case e:return T=null,{type:"ValueProjection",children:[{type:"Identity"},T=this._lookahead(0)===C?{type:"Identity"}:this._parseProjectionRHS(w.Star)]};case r:return this.led(E.type,{type:"Identity"});case a:return this._parseMultiselectHash();case t:return{type:"Projection",children:[{type:t,children:[{type:"Identity"}]},T=this._parseProjectionRHS(w.Flatten)]};case o:return this._lookahead(0)===c||this._lookahead(0)===S?(T=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},T)):this._lookahead(0)===e&&this._lookahead(1)===C?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},T=this._parseProjectionRHS(w.Star)]}):this._parseMultiselectList();case s:return{type:s};case n:return{type:"ExpressionReference",children:[G=this.expression(w.Expref)]};case l:for(var z=[];this._lookahead(0)!==m;)this._lookahead(0)===s?(G={type:s},this._advance()):G=this.expression(0),z.push(G);return this._match(m),z[0];default:this._errorToken(E)}},led:function(E,T){var G;switch(E){case"Dot":var F=w.Dot;return this._lookahead(0)!==e?{type:"Subexpression",children:[T,G=this._parseDotRHS(F)]}:(this._advance(),{type:"ValueProjection",children:[T,G=this._parseProjectionRHS(F)]});case i:return G=this.expression(w.Pipe),{type:i,children:[T,G]};case"Or":return{type:"OrExpression",children:[T,G=this.expression(w.Or)]};case"And":return{type:"AndExpression",children:[T,G=this.expression(w.And)]};case l:for(var z,F=T.name,K=[];this._lookahead(0)!==m;)this._lookahead(0)===s?(z={type:s},this._advance()):z=this.expression(0),this._lookahead(0)===A&&this._match(A),K.push(z);return this._match(m),{type:"Function",name:F,children:K};case r:return F=this.expression(0),this._match(C),{type:"FilterProjection",children:[T,G=this._lookahead(0)===t?{type:"Identity"}:this._parseProjectionRHS(w.Filter),F]};case t:return{type:"Projection",children:[{type:t,children:[T]},this._parseProjectionRHS(w.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(T,E);case o:return F=this._lookaheadToken(0),F.type===c||F.type===S?(G=this._parseIndexExpression(),this._projectIfSlice(T,G)):(this._match(e),this._match(C),{type:"Projection",children:[T,G=this._parseProjectionRHS(w.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(E){var T;if(this._lookahead(0)!==E)throw T=this._lookaheadToken(0),(E=new Error("Expected "+E+", got: "+T.type)).name="ParserError",E;this._advance()},_errorToken:function(E){throw E=new Error("Invalid token ("+E.type+'): "'+E.value+'"'),E.name="ParserError",E},_parseIndexExpression:function(){var E;return this._lookahead(0)===S||this._lookahead(1)===S?this._parseSliceExpression():(E={type:"Index",value:this._lookaheadToken(0).value},this._advance(),this._match(C),E)},_projectIfSlice:function(E,T){return E={type:"IndexExpression",children:[E,T]},T.type==="Slice"?{type:"Projection",children:[E,this._parseProjectionRHS(w.Star)]}:E},_parseSliceExpression:function(){for(var E,T=[null,null,null],G=0,F=this._lookahead(0);F!==C&&G<3;){if(F===S)G++;else{if(F!==c)throw E=this._lookahead(0),(E=new Error("Syntax error, unexpected token: "+E.value+"("+E.type+")")).name="Parsererror",E;T[G]=this._lookaheadToken(0).value}this._advance(),F=this._lookahead(0)}return this._match(C),{type:"Slice",children:T}},_parseComparator:function(E,T){return{type:"Comparator",name:T,children:[E,this.expression(w[T])]}},_parseDotRHS:function(E){var T=this._lookahead(0);return 0<=[V,L,e].indexOf(T)?this.expression(E):T===o?(this._match(o),this._parseMultiselectList()):T===a?(this._match(a),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(E){var T,G;if(w[this._lookahead(0)]<10)T={type:"Identity"};else if(this._lookahead(0)===o)T=this.expression(E);else if(this._lookahead(0)===r)T=this.expression(E);else{if(this._lookahead(0)!=="Dot")throw G=this._lookaheadToken(0),(G=new Error("Sytanx error, unexpected token: "+G.value+"("+G.type+")")).name="ParserError",G;this._match("Dot"),T=this._parseDotRHS(E)}return T},_parseMultiselectList:function(){for(var E=[];this._lookahead(0)!==C;){var T=this.expression(0);if(E.push(T),this._lookahead(0)===A&&(this._match(A),this._lookahead(0)===C))throw new Error("Unexpected token Rbracket")}return this._match(C),{type:"MultiSelectList",children:E}},_parseMultiselectHash:function(){for(var E,T,G=[],F=[V,L];;){if(E=this._lookaheadToken(0),F.indexOf(E.type)<0)throw new Error("Expecting an identifier token, got: "+E.type);if(E=E.value,this._advance(),this._match(S),T=this.expression(0),G.push({type:"KeyValuePair",name:E,value:T}),this._lookahead(0)===A)this._match(A);else if(this._lookahead(0)===p){this._match(p);break}}return{type:"MultiSelectHash",children:G}}},R.prototype={search:function(E,T){return this.visit(E,T)},visit:function(E,T){var G,F,z,K,Y,_;switch(E.type){case"Field":return T!==null&&x(T)?(Z=T[E.name])===void 0?null:Z:null;case"Subexpression":for($=this.visit(E.children[0],T),te=1;te<E.children.length;te++)if(($=this.visit(E.children[1],$))===null)return null;return $;case"IndexExpression":return Y=this.visit(E.children[0],T),this.visit(E.children[1],Y);case"Index":return X(T)?($=T[Z=(Z=E.value)<0?T.length+Z:Z])===void 0?null:$:null;case"Slice":if(!X(T))return null;var Z=E.children.slice(0),Z=this.computeSliceParams(T.length,Z),W=Z[0],f=Z[1],k=Z[2],$=[];if(0<k)for(te=W;te<f;te+=k)$.push(T[te]);else for(te=W;f<te;te+=k)$.push(T[te]);return $;case"Projection":var M=this.visit(E.children[0],T);if(!X(M))return null;for(j=[],te=0;te<M.length;te++)(F=this.visit(E.children[1],M[te]))!==null&&j.push(F);return j;case"ValueProjection":if(!x(M=this.visit(E.children[0],T)))return null;for(var j=[],Q=function(Te){for(var $e=Object.keys(Te),ke=[],de=0;de<$e.length;de++)ke.push(Te[$e[de]]);return ke}(M),te=0;te<Q.length;te++)(F=this.visit(E.children[1],Q[te]))!==null&&j.push(F);return j;case"FilterProjection":if(!X(M=this.visit(E.children[0],T)))return null;var he=[],Ae=[];for(te=0;te<M.length;te++)O(G=this.visit(E.children[2],M[te]))||he.push(M[te]);for(var ue=0;ue<he.length;ue++)(F=this.visit(E.children[1],he[ue]))!==null&&Ae.push(F);return Ae;case"Comparator":switch(z=this.visit(E.children[0],T),K=this.visit(E.children[1],T),E.name){case"EQ":$=N(z,K);break;case"NE":$=!N(z,K);break;case"GT":$=K<z;break;case"GTE":$=K<=z;break;case"LT":$=z<K;break;case"LTE":$=z<=K;break;default:throw new Error("Unknown comparator: "+E.name)}return $;case t:var Ce=this.visit(E.children[0],T);if(!X(Ce))return null;var Ie=[];for(te=0;te<Ce.length;te++)X(F=Ce[te])?Ie.push.apply(Ie,F):Ie.push(F);return Ie;case"Identity":return T;case"MultiSelectList":if(T===null)return null;for(j=[],te=0;te<E.children.length;te++)j.push(this.visit(E.children[te],T));return j;case"MultiSelectHash":if(T===null)return null;for(j={},te=0;te<E.children.length;te++)j[(_=E.children[te]).name]=this.visit(_.value,T);return j;case"OrExpression":return G=O(G=this.visit(E.children[0],T))?this.visit(E.children[1],T):G;case"AndExpression":return O(z=this.visit(E.children[0],T))===!0?z:this.visit(E.children[1],T);case"NotExpression":return O(z=this.visit(E.children[0],T));case"Literal":return E.value;case i:return Y=this.visit(E.children[0],T),this.visit(E.children[1],Y);case s:return T;case"Function":var we=[];for(te=0;te<E.children.length;te++)we.push(this.visit(E.children[te],T));return this.runtime.callFunction(E.name,we);case"ExpressionReference":return Z=E.children[0],Z.jmespathType=n,Z;default:throw new Error("Unknown node type: "+E.type)}},computeSliceParams:function(E,G){var K=G[0],Y=G[1],G=G[2],F=[null,null,null];if(G===null)G=1;else if(G===0)throw(z=new Error("Invalid slice, step cannot be 0")).name="RuntimeError",z;var z=G<0,K=K===null?z?E-1:0:this.capSliceRange(E,K,G),Y=Y===null?z?-1:E:this.capSliceRange(E,Y,G);return F[0]=K,F[1]=Y,F[2]=G,F},capSliceRange:function(E,T,G){return T<0?(T+=E)<0&&(T=G<0?-1:0):E<=T&&(T=G<0?E-1:E),T}},B.prototype={callFunction:function(E,T){var G=this.functionTable[E];if(G===void 0)throw new Error("Unknown function: "+E+"()");return this._validateArgs(E,T,G._signature),G._func.call(this,T)},_validateArgs:function(E,T,G){var F;if(G[G.length-1].variadic){if(T.length<G.length)throw F=G.length===1?" argument":" arguments",new Error("ArgumentError: "+E+"() takes at least"+G.length+F+" but received "+T.length)}else if(T.length!==G.length)throw F=G.length===1?" argument":" arguments",new Error("ArgumentError: "+E+"() takes "+G.length+F+" but received "+T.length);for(var z=0;z<G.length;z++){for(var K,Y=!1,_=G[z].types,Z=this._getTypeName(T[z]),W=0;W<_.length;W++)if(this._typeMatches(Z,_[W],T[z])){Y=!0;break}if(!Y)throw K=_.map(function(f){return P[f]}).join(","),new Error("TypeError: "+E+"() expected argument "+(z+1)+" to be type "+K+" but received type "+P[Z]+" instead.")}},_typeMatches:function(E,T,G){if(T===1)return!0;if(T!==9&&T!==8&&T!==3)return E===T;if(T===3)return E===3;if(E===3){var F;T===8?F=0:T===9&&(F=2);for(var z=0;z<G.length;z++)if(!this._typeMatches(this._getTypeName(G[z]),F,G[z]))return!1;return!0}},_getTypeName:function(E){switch(Object.prototype.toString.call(E)){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 E.jmespathType===n?6:4}},_functionStartsWith:function(E){return E[0].lastIndexOf(E[1])===0},_functionEndsWith:function(G){var T=G[0],G=G[1];return T.indexOf(G,T.length-G.length)!==-1},_functionReverse:function(E){var T;if(this._getTypeName(E[0])!==2)return(T=E[0].slice(0)).reverse(),T;for(var G=E[0],F="",z=G.length-1;0<=z;z--)F+=G[z];return F},_functionAbs:function(E){return Math.abs(E[0])},_functionCeil:function(E){return Math.ceil(E[0])},_functionAvg:function(E){for(var T=0,G=E[0],F=0;F<G.length;F++)T+=G[F];return T/G.length},_functionContains:function(E){return 0<=E[0].indexOf(E[1])},_functionFloor:function(E){return Math.floor(E[0])},_functionLength:function(E){return(x(E[0])?Object.keys(E[0]):E[0]).length},_functionMap:function(E){for(var T=[],G=this._interpreter,F=E[0],z=E[1],K=0;K<z.length;K++)T.push(G.visit(F,z[K]));return T},_functionMerge:function(E){for(var T={},G=0;G<E.length;G++){var F,z=E[G];for(F in z)T[F]=z[F]}return T},_functionMax:function(E){if(0<E[0].length){if(this._getTypeName(E[0][0])===0)return Math.max.apply(Math,E[0]);for(var T=E[0],G=T[0],F=1;F<T.length;F++)G.localeCompare(T[F])<0&&(G=T[F]);return G}return null},_functionMin:function(E){if(0<E[0].length){if(this._getTypeName(E[0][0])===0)return Math.min.apply(Math,E[0]);for(var T=E[0],G=T[0],F=1;F<T.length;F++)T[F].localeCompare(G)<0&&(G=T[F]);return G}return null},_functionSum:function(E){for(var T=0,G=E[0],F=0;F<G.length;F++)T+=G[F];return T},_functionType:function(E){switch(this._getTypeName(E[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(E){return Object.keys(E[0])},_functionValues:function(E){for(var T=E[0],G=Object.keys(T),F=[],z=0;z<G.length;z++)F.push(T[G[z]]);return F},_functionJoin:function(E){var T=E[0];return E[1].join(T)},_functionToArray:function(E){return this._getTypeName(E[0])===3?E[0]:[E[0]]},_functionToString:function(E){return this._getTypeName(E[0])===2?E[0]:JSON.stringify(E[0])},_functionToNumber:function(E){var T=this._getTypeName(E[0]);return T===0?E[0]:T!==2||(T=+E[0],isNaN(T))?null:T},_functionNotNull:function(E){for(var T=0;T<E.length;T++)if(this._getTypeName(E[T])!==7)return E[T];return null},_functionSort:function(E){return E=E[0].slice(0),E.sort(),E},_functionSortBy:function(E){var T=E[0].slice(0);if(T.length!==0){var G=this._interpreter,F=E[1],z=this._getTypeName(G.visit(F,T[0]));if([0,2].indexOf(z)<0)throw new Error("TypeError");for(var K=this,Y=[],_=0;_<T.length;_++)Y.push([_,T[_]]);Y.sort(function(W,f){var k=G.visit(F,W[1]),$=G.visit(F,f[1]);if(K._getTypeName(k)!==z)throw new Error("TypeError: expected "+z+", received "+K._getTypeName(k));if(K._getTypeName($)!==z)throw new Error("TypeError: expected "+z+", received "+K._getTypeName($));return $<k?1:k<$?-1:W[0]-f[0]});for(var Z=0;Z<Y.length;Z++)T[Z]=Y[Z][1]}return T},_functionMaxBy:function(E){for(var T,G,F=E[1],z=E[0],K=this.createKeyFunction(F,[0,2]),Y=-1/0,_=0;_<z.length;_++)Y<(G=K(z[_]))&&(Y=G,T=z[_]);return T},_functionMinBy:function(E){for(var T,G,F=E[1],z=E[0],K=this.createKeyFunction(F,[0,2]),Y=1/0,_=0;_<z.length;_++)(G=K(z[_]))<Y&&(Y=G,T=z[_]);return T},createKeyFunction:function(E,T){var G=this,F=this._interpreter;return function(Y){var K,Y=F.visit(E,Y);if(T.indexOf(G._getTypeName(Y))<0)throw K="TypeError: expected one of "+T+", received "+G._getTypeName(Y),new Error(K);return Y}}},H.tokenize=function(E){return new b().tokenize(E)},H.compile=function(E){return new v().parse(E)},H.search=function(E,T){var G=new v,F=new R(z=new B),z=(z._interpreter=F,G.parse(T));return F.search(z,E)},H.strictDeepEqual=N})(g)},500:function(ie){var g=ie.exports=function(X,x,N){typeof x=="function"&&(N=x,x={}),function O(D,P,V,L,C,m,A,S,p,c){if(L&&typeof L=="object"&&!Array.isArray(L)){for(var s in P(L,C,m,A,S,p,c),L){var n=L[s];if(Array.isArray(n)){if(s in g.arrayKeywords)for(var i=0;i<n.length;i++)O(D,P,V,n[i],C+"/"+s+"/"+i,m,C,s,L,i)}else if(s in g.propsKeywords){if(n&&typeof n=="object")for(var t in n)O(D,P,V,n[t],C+"/"+s+"/"+H(t),m,C,s,L,t)}else(s in g.keywords||D.allKeys&&!(s in g.skipKeywords))&&O(D,P,V,n,C+"/"+s,m,C,s,L)}V(L,C,m,A,S,p,c)}}(x,typeof(N=x.cb||N)=="function"?N:N.pre||function(){},N.post||function(){},X,"",X)};function H(X){return X.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(ie,g){var H={b:"\b",f:"\f",n:`
|
|
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},X="a".charCodeAt(),x=(g.parse=function(c,s,n){var i={},t=0,e=0,r=0,a=n&&n.bigint&&typeof BigInt!="undefined";return{data:o("",!0),pointers:i};function o(T,G){l(),b(T,"value");var F,z=I();switch(z){case"t":y("rue"),F=!0;break;case"f":y("alse"),F=!1;break;case"n":y("ull"),F=null;break;case'"':F=d();break;case"[":F=function(K){l();var Y=[],_=0;if(I()!="]")for(h();;){var Z=K+"/"+_,Z=(Y.push(o(Z)),l(),I());if(Z=="]")break;Z!=","&&B(),l(),_++}return Y}(T);break;case"{":F=function(K){l();var Y={};if(I()!="}")for(h();;){var W=v(),_=(I()!='"'&&B(),d()),Z=K+"/"+p(_),W=(w(Z,"key",W),b(Z,"keyEnd"),l(),I()!=":"&&B(),l(),Y[_]=o(Z),l(),I());if(W=="}")break;W!=","&&B(),l()}return Y}(T);break;default:h(),0<="-0123456789".indexOf(z)?F=function(){var K="",Y=!0;c[r]=="-"&&(K+=I()),K+=(c[r]=="0"?I:u)(),c[r]=="."&&(K+=I()+u(),Y=!1),c[r]!="e"&&c[r]!="E"||(K+=I(),c[r]!="+"&&c[r]!="-"||(K+=I()),K+=u(),Y=!1);var _=+K;return a&&Y&&(_>Number.MAX_SAFE_INTEGER||_<Number.MIN_SAFE_INTEGER)?BigInt(K):_}():R()}return b(T,"valueEnd"),l(),G&&r<c.length&&R(),F}function l(){e:for(;r<c.length;){switch(c[r]){case" ":e++;break;case" ":e+=4;break;case"\r":e=0;break;case`
|
|
`:e=0,t++;break;default:break e}r++}}function d(){for(var T,G="";(T=I())!='"';)T=="\\"?(T=I())in H?G+=H[T]:T=="u"?G+=function(){for(var F=4,z=0;F--;){z<<=4;var K=I().toLowerCase();"a"<=K&&K<="f"?z+=K.charCodeAt()-X+10:"0"<=K&&K<="9"?z+=+K:B()}return String.fromCharCode(z)}():B():G+=T;return G}function y(T){for(var G=0;G<T.length;G++)I()!==T[G]&&B()}function I(){E();var T=c[r];return r++,e++,T}function h(){r--,e--}function u(){for(var T="";"0"<=c[r]&&c[r]<="9";)T+=I();if(T.length)return T;E(),R()}function b(T,G){w(T,G,v())}function w(T,G,F){i[T]=i[T]||{},i[T][G]=F}function v(){return{line:t,column:e,pos:r}}function R(){throw new SyntaxError("Unexpected token "+c[r]+" in JSON at position "+r)}function B(){h(),R()}function E(){if(r>=c.length)throw new SyntaxError("Unexpected end of JSON input")}},g.stringify=function(c,s,n){if(N(c)){var i=0;switch(typeof(e=typeof n=="object"?n.space:n)){case"number":var t=10<e?10:e<0?0:Math.floor(e),e=t&&R(t," "),r=t,a=t;break;case"string":e=e.slice(0,10);for(var o=a=r=0;o<e.length;o++){switch(e[o]){case" ":a++;break;case" ":a+=4;break;case"\r":a=0;break;case`
|
|
`:a=0,i++;break;default:throw new Error("whitespace characters not allowed in JSON")}r++}break;default:e=void 0}var l="",d={},y=0,I=0,h=0,u=n&&n.es6&&typeof Map=="function";return function B(E,T,G){switch(v(G,"value"),typeof E){case"number":case"bigint":case"boolean":b(""+E);break;case"string":b(m(E));break;case"object":E===null?b("null"):typeof E.toJSON=="function"?b(m(E.toJSON())):Array.isArray(E)?F():u?E.constructor.BYTES_PER_ELEMENT?F():E instanceof Map?K():E instanceof Set?K(!0):z():z()}v(G,"valueEnd");function F(){if(E.length){b("[");for(var Y=T+1,_=0;_<E.length;_++){_&&b(","),w(Y);var Z=N(E[_])?E[_]:null,W=G+"/"+_;B(Z,Y,W)}w(T),b("]")}else b("[]")}function z(){var Y=Object.keys(E);if(Y.length){b("{");for(var _=T+1,Z=0;Z<Y.length;Z++){var W,f=Y[Z],k=E[f];N(k)&&(Z&&b(","),W=G+"/"+p(f),w(_),v(W,"key"),b(m(f)),v(W,"keyEnd"),b(":"),e&&b(" "),B(k,_,W))}w(T),b("}")}else b("{}")}function K(Y){if(E.size){b("{");for(var _=T+1,Z=!0,W=E.entries(),f=W.next();!f.done;){var k,M=f.value,$=M[0],M=!!Y||M[1];N(M)&&(Z||b(","),Z=!1,k=G+"/"+p($),w(_),v(k,"key"),b(m($)),v(k,"keyEnd"),b(":"),e&&b(" "),B(M,_,k)),f=W.next()}w(T),b("}")}else b("{}")}}(c,0,""),{json:l,pointers:d}}function b(B){I+=B.length,h+=B.length,l+=B}function w(B){if(e){for(l+=`
|
|
`+R(B,e),y++,I=0;B--;)i?(y+=i,I=a):I+=a,h+=r;h+=1}}function v(B,E){d[B]=d[B]||{},d[B][E]={line:y,column:I,pos:h}}function R(B,E){return Array(B+1).join(E)}},["number","bigint","boolean","string","object"]);function N(c){return 0<=x.indexOf(typeof c)}var O=/"|\\/g,D=/[\b]/g,P=/\f/g,V=/\n/g,L=/\r/g,C=/\t/g;function m(c){return'"'+(c=c.replace(O,"\\$&").replace(P,"\\f").replace(D,"\\b").replace(V,"\\n").replace(L,"\\r").replace(C,"\\t"))+'"'}var A=/~/g,S=/\//g;function p(c){return c.replace(A,"~0").replace(S,"~1")}},483:function(ie,g){var H,X;(function(){X=[],(X=typeof(H=function(){function x(n){return typeof Node=="object"?n instanceof Node:n&&typeof n=="object"&&typeof n.nodeType=="number"}function N(n){return typeof n=="string"}function O(){var n=[];return{watch:n.push.bind(n),trigger:function(i,t){for(var e=!0,r={detail:t,preventDefault:function(){e=!1}},a=0;a<n.length;a++)n[a](i,r);return e}}}function D(n){return window.getComputedStyle(n).display==="none"}function P(n){this.elem=n}function V(n,i){return P.make(n("parent")).clazz("pico-overlay").clazz(n("overlayClass","")).stylize({display:"none",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).stylize(n("overlayStyles",{opacity:.5,background:"#000"})).onClick(function(){n("overlayClose",!0)&&i()})}P.make=function(n,i){typeof n=="string"&&(n=document.querySelector(n));var t=document.createElement(i||"div");return(n||document.body).appendChild(t),new P(t)},P.prototype={child:function(n){return P.make(this.elem,n)},stylize:function(n){n=n||{},typeof n.opacity!="undefined"&&(n.filter="alpha(opacity="+n.opacity*100+")");for(var i in n)n.hasOwnProperty(i)&&(this.elem.style[i]=n[i]);return this},clazz:function(n){return this.elem.className+=" "+n,this},html:function(n){return x(n)?this.elem.appendChild(n):this.elem.innerHTML=n,this},onClick:function(n){return this.elem.addEventListener("click",n),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(n,i){return i!==void 0&&this.elem.setAttribute(n,i),this},anyAncestor:function(n){for(var i=this.elem;i;){if(n(new P(i)))return!0;i=i.parentNode}return!1},isVisible:function(){return!D(this.elem)}};var L=1;function C(n,i){var t=n("width","auto");typeof t=="number"&&(t=""+t+"px");var e=n("modalId","pico-"+L++),r=P.make(n("parent")).clazz("pico-content").clazz(n("modalClass","")).stylize({display:"none",position:"fixed",zIndex:10001,left:"50%",top:"38.1966%",maxHeight:"90%",boxSizing:"border-box",width:t,"-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(n("modalStyles",{overflow:"auto",backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(n("content")).attr("id",e).attr("role","dialog").attr("aria-labelledby",n("ariaLabelledBy")).attr("aria-describedby",n("ariaDescribedBy",e)).onClick(function(a){var o=new P(a.target).anyAncestor(function(l){return/\bpico-close\b/.test(l.elem.className)});o&&i()});return r}function m(n,i){if(i("closeButton",!0))return n.child("button").html(i("closeHtml","×")).clazz("pico-close").clazz(i("closeClass","")).stylize(i("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",i("close-label","Close"))}function A(n){return function(){return n().elem}}var S=O(),p=O();function c(n,i){function t(l,d){var y=l.msMatchesSelector||l.webkitMatchesSelector||l.matches;return y.call(l,d)}function e(l){return D(l)||t(l,":disabled")||l.hasAttribute("contenteditable")?!1:l.hasAttribute("tabindex")||t(l,"input,select,textarea,button,a[href],area[href],iframe")}function r(l){for(var d=l.getElementsByTagName("*"),y=0;y<d.length;y++)if(e(d[y]))return d[y]}function a(l){for(var d=l.getElementsByTagName("*"),y=d.length;y--;)if(e(d[y]))return d[y]}var o;n.beforeShow(function(){o=document.activeElement}),n.afterShow(function(){if(i()){var d=r(n.modalElem());d&&d.focus()}}),n.afterClose(function(){i()&&o&&o.focus(),o=null}),p.watch(function(d){if(i()&&n.isVisible()){var y=r(n.modalElem()),I=a(n.modalElem()),h=d.shiftKey?y:I;h===document.activeElement&&((d.shiftKey?I:y).focus(),d.preventDefault())}})}function s(n,i){var t,e=new P(document.body);n.beforeShow(function(){t=e.elem.style.overflow,i()&&e.stylize({overflow:"hidden"})}),n.afterClose(function(){e.stylize({overflow:t})})}return document.documentElement.addEventListener("keydown",function(i){var t=i.which||i.keyCode;t===27?S.trigger():t===9&&p.trigger(i)}),function(i){(N(i)||x(i))&&(i={content:i});var t=O(),e=O(),r=O(),a=O(),o=O();function l(B,E){var T=i[B];return typeof T=="function"&&(T=T(E)),T===void 0?E:T}var d=R.bind(window,"modal"),y=R.bind(window,"overlay"),I=R.bind(window,"close"),h;function u(B){y().hide(),d().hide(),o.trigger(h,B)}function b(B){a.trigger(h,B)&&u(B)}function w(B){return function(){return B.apply(this,arguments),h}}var v;function R(B,E){if(!v){var T=C(l,b);v={modal:T,overlay:V(l,b),close:m(T,l)},t.trigger(h,E)}return v[B]}return h={modalElem:A(d),closeElem:A(I),overlayElem:A(y),buildDom:w(R.bind(null,null)),isVisible:function(){return!!(v&&d&&d().isVisible())},show:function(B){return e.trigger(h,B)&&(y().show(),I(),d().show(),r.trigger(h,B)),this},close:w(b),forceClose:w(u),destroy:function(){d().destroy(),y().destroy(),y=d=I=void 0},options:function(B){Object.keys(B).map(function(E){i[E]=B[E]})},afterCreate:w(t.watch),beforeShow:w(e.watch),afterShow:w(r.watch),beforeClose:w(a.watch),afterClose:w(o.watch)},c(h,l.bind(null,"focus",!0)),s(h,l.bind(null,"bodyOverflow",!0)),S.watch(function(){l("escCloses",!0)&&h.isVisible()&&h.close()}),h}})=="function"?H.apply(g,X):H)!==void 0&&(ie.exports=X)})()},7533:function(ie,g){/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(H){function X(){for(var q=arguments.length,U=Array(q),ee=0;ee<q;ee++)U[ee]=arguments[ee];if(U.length>1){U[0]=U[0].slice(0,-1);for(var se=U.length-1,re=1;re<se;++re)U[re]=U[re].slice(1,-1);return U[se]=U[se].slice(1),U.join("")}else return U[0]}function x(q){return"(?:"+q+")"}function N(q){return q===void 0?"undefined":q===null?"null":Object.prototype.toString.call(q).split(" ").pop().split("]").shift().toLowerCase()}function O(q){return q.toUpperCase()}function D(q){return q!=null?q instanceof Array?q:typeof q.length!="number"||q.split||q.setInterval||q.call?[q]:Array.prototype.slice.call(q):[]}function P(q,U){var ee=q;if(U)for(var se in U)ee[se]=U[se];return ee}function V(q){var U="[A-Za-z]",ee="[0-9]",se=X(ee,"[A-Fa-f]"),re=x(x("%[EFef]"+se+"%"+se+se+"%"+se+se)+"|"+x("%[89A-Fa-f]"+se+"%"+se+se)+"|"+x("%"+se+se)),_e="[\\:\\/\\?\\#\\[\\]\\@]",Re="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",We=X(_e,Re),Oe=q?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ye=q?"[\\uE000-\\uF8FF]":"[]",Ne=X(U,ee,"[\\-\\.\\_\\~]",Oe);x(U+X(U,ee,"[\\+\\-\\.]")+"*"),x(x(re+"|"+X(Ne,Re,"[\\:]"))+"*");var Ve=x(x("25[0-5]")+"|"+x("2[0-4]"+ee)+"|"+x("1"+ee+ee)+"|"+x("0?[1-9]"+ee)+"|0?0?"+ee),Je=x(Ve+"\\."+Ve+"\\."+Ve+"\\."+Ve),Be=x(se+"{1,4}"),De=x(x(Be+"\\:"+Be)+"|"+Je),Ue=x(x(Be+"\\:")+"{6}"+De),Ke=x("\\:\\:"+x(Be+"\\:")+"{5}"+De),ft=x(x(Be)+"?\\:\\:"+x(Be+"\\:")+"{4}"+De),lt=x(x(x(Be+"\\:")+"{0,1}"+Be)+"?\\:\\:"+x(Be+"\\:")+"{3}"+De),ct=x(x(x(Be+"\\:")+"{0,2}"+Be)+"?\\:\\:"+x(Be+"\\:")+"{2}"+De),yt=x(x(x(Be+"\\:")+"{0,3}"+Be)+"?\\:\\:"+Be+"\\:"+De),It=x(x(x(Be+"\\:")+"{0,4}"+Be)+"?\\:\\:"+De),rt=x(x(x(Be+"\\:")+"{0,5}"+Be)+"?\\:\\:"+Be),ht=x(x(x(Be+"\\:")+"{0,6}"+Be)+"?\\:\\:"),vt=x([Ue,Ke,ft,lt,ct,yt,It,rt,ht].join("|")),pt=x(x(Ne+"|"+re)+"+");x("[vV]"+se+"+\\."+X(Ne,Re,"[\\:]")+"+"),x(x(re+"|"+X(Ne,Re))+"*");var wt=x(re+"|"+X(Ne,Re,"[\\:\\@]"));return x(x(re+"|"+X(Ne,Re,"[\\@]"))+"+"),x(x(wt+"|"+X("[\\/\\?]",Ye))+"*"),{NOT_SCHEME:new RegExp(X("[^]",U,ee,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(X("[^\\%\\:]",Ne,Re),"g"),NOT_HOST:new RegExp(X("[^\\%\\[\\]\\:]",Ne,Re),"g"),NOT_PATH:new RegExp(X("[^\\%\\/\\:\\@]",Ne,Re),"g"),NOT_PATH_NOSCHEME:new RegExp(X("[^\\%\\/\\@]",Ne,Re),"g"),NOT_QUERY:new RegExp(X("[^\\%]",Ne,Re,"[\\:\\@\\/\\?]",Ye),"g"),NOT_FRAGMENT:new RegExp(X("[^\\%]",Ne,Re,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(X("[^]",Ne,Re),"g"),UNRESERVED:new RegExp(Ne,"g"),OTHER_CHARS:new RegExp(X("[^\\%]",Ne,We),"g"),PCT_ENCODED:new RegExp(re,"g"),IPV4ADDRESS:new RegExp("^("+Je+")$"),IPV6ADDRESS:new RegExp("^\\[?("+vt+")"+x(x("\\%25|\\%(?!"+se+"{2})")+"("+pt+")")+"?\\]?$")}}var L=V(!1),C=V(!0),m=function(){function q(U,ee){var se=[],re=!0,_e=!1,Re=void 0;try{for(var We=U[Symbol.iterator](),Oe;!(re=(Oe=We.next()).done)&&(se.push(Oe.value),!(ee&&se.length===ee));re=!0);}catch(Ye){_e=!0,Re=Ye}finally{try{!re&&We.return&&We.return()}finally{if(_e)throw Re}}return se}return function(U,ee){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return q(U,ee);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function(q){if(Array.isArray(q)){for(var U=0,ee=Array(q.length);U<q.length;U++)ee[U]=q[U];return ee}else return Array.from(q)},S=2147483647,p=36,c=1,s=26,n=38,i=700,t=72,e=128,r="-",a=/^xn--/,o=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=p-c,I=Math.floor,h=String.fromCharCode;function u(q){throw new RangeError(d[q])}function b(q,U){for(var ee=[],se=q.length;se--;)ee[se]=U(q[se]);return ee}function w(q,U){var ee=q.split("@"),se="";ee.length>1&&(se=ee[0]+"@",q=ee[1]),q=q.replace(l,".");var re=q.split("."),_e=b(re,U).join(".");return se+_e}function v(q){for(var U=[],ee=0,se=q.length;ee<se;){var re=q.charCodeAt(ee++);if(re>=55296&&re<=56319&&ee<se){var _e=q.charCodeAt(ee++);(_e&64512)==56320?U.push(((re&1023)<<10)+(_e&1023)+65536):(U.push(re),ee--)}else U.push(re)}return U}var R=function(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:p},B=function(U,ee){return U+22+75*(U<26)-((ee!=0)<<5)},E=function(U,ee,se){var re=0;for(U=se?I(U/i):U>>1,U+=I(U/ee);U>y*s>>1;re+=p)U=I(U/y);return I(re+(y+1)*U/(U+n))},T=function(U){var ee=[],se=U.length,re=0,_e=e,Re=t,We=U.lastIndexOf(r);We<0&&(We=0);for(var Oe=0;Oe<We;++Oe)U.charCodeAt(Oe)>=128&&u("not-basic"),ee.push(U.charCodeAt(Oe));for(var Ye=We>0?We+1:0;Ye<se;){for(var Ne=re,Ve=1,Je=p;;Je+=p){Ye>=se&&u("invalid-input");var Be=R(U.charCodeAt(Ye++));(Be>=p||Be>I((S-re)/Ve))&&u("overflow"),re+=Be*Ve;var De=Je<=Re?c:Je>=Re+s?s:Je-Re;if(Be<De)break;var Ue=p-De;Ve>I(S/Ue)&&u("overflow"),Ve*=Ue}var Ke=ee.length+1;Re=E(re-Ne,Ke,Ne==0),I(re/Ke)>S-_e&&u("overflow"),_e+=I(re/Ke),re%=Ke,ee.splice(re++,0,_e)}return String.fromCodePoint.apply(String,ee)},G=function(U){var ee=[];U=v(U);var se=U.length,re=e,_e=0,Re=t,We=!0,Oe=!1,Ye=void 0;try{for(var Ne=U[Symbol.iterator](),Ve;!(We=(Ve=Ne.next()).done);We=!0){var Je=Ve.value;Je<128&&ee.push(h(Je))}}catch(xt){Oe=!0,Ye=xt}finally{try{!We&&Ne.return&&Ne.return()}finally{if(Oe)throw Ye}}var Be=ee.length,De=Be;for(Be&&ee.push(r);De<se;){var Ue=S,Ke=!0,ft=!1,lt=void 0;try{for(var ct=U[Symbol.iterator](),yt;!(Ke=(yt=ct.next()).done);Ke=!0){var It=yt.value;It>=re&&It<Ue&&(Ue=It)}}catch(xt){ft=!0,lt=xt}finally{try{!Ke&&ct.return&&ct.return()}finally{if(ft)throw lt}}var rt=De+1;Ue-re>I((S-_e)/rt)&&u("overflow"),_e+=(Ue-re)*rt,re=Ue;var ht=!0,vt=!1,pt=void 0;try{for(var wt=U[Symbol.iterator](),Bt;!(ht=(Bt=wt.next()).done);ht=!0){var Nt=Bt.value;if(Nt<re&&++_e>S&&u("overflow"),Nt==re){for(var Et=_e,_t=p;;_t+=p){var Rt=_t<=Re?c:_t>=Re+s?s:_t-Re;if(Et<Rt)break;var Gt=Et-Rt,Wt=p-Rt;ee.push(h(B(Rt+Gt%Wt,0))),Et=I(Gt/Wt)}ee.push(h(B(Et,0))),Re=E(_e,rt,De==Be),_e=0,++De}}}catch(xt){vt=!0,pt=xt}finally{try{!ht&&wt.return&&wt.return()}finally{if(vt)throw pt}}++_e,++re}return ee.join("")},F={version:"2.1.0",ucs2:{decode:v,encode:function(U){return String.fromCodePoint.apply(String,A(U))}},decode:T,encode:G,toASCII:function(U){return w(U,function(ee){return o.test(ee)?"xn--"+G(ee):ee})},toUnicode:function(U){return w(U,function(ee){return a.test(ee)?T(ee.slice(4).toLowerCase()):ee})}},z={};function K(q){var U=q.charCodeAt(0),ee=void 0;return U<16?ee="%0"+U.toString(16).toUpperCase():U<128?ee="%"+U.toString(16).toUpperCase():U<2048?ee="%"+(U>>6|192).toString(16).toUpperCase()+"%"+(U&63|128).toString(16).toUpperCase():ee="%"+(U>>12|224).toString(16).toUpperCase()+"%"+(U>>6&63|128).toString(16).toUpperCase()+"%"+(U&63|128).toString(16).toUpperCase(),ee}function Y(q){for(var U="",ee=0,se=q.length;ee<se;){var re=parseInt(q.substr(ee+1,2),16);if(re<128)U+=String.fromCharCode(re),ee+=3;else if(re>=194&&re<224){if(se-ee>=6){var _e=parseInt(q.substr(ee+4,2),16);U+=String.fromCharCode((re&31)<<6|_e&63)}else U+=q.substr(ee,6);ee+=6}else if(re>=224){if(se-ee>=9){var Re=parseInt(q.substr(ee+4,2),16),We=parseInt(q.substr(ee+7,2),16);U+=String.fromCharCode((re&15)<<12|(Re&63)<<6|We&63)}else U+=q.substr(ee,9);ee+=9}else U+=q.substr(ee,3),ee+=3}return U}function _(q,U){function ee(se){var re=Y(se);return re.match(U.UNRESERVED)?re:se}return q.scheme&&(q.scheme=String(q.scheme).replace(U.PCT_ENCODED,ee).toLowerCase().replace(U.NOT_SCHEME,"")),q.userinfo!==void 0&&(q.userinfo=String(q.userinfo).replace(U.PCT_ENCODED,ee).replace(U.NOT_USERINFO,K).replace(U.PCT_ENCODED,O)),q.host!==void 0&&(q.host=String(q.host).replace(U.PCT_ENCODED,ee).toLowerCase().replace(U.NOT_HOST,K).replace(U.PCT_ENCODED,O)),q.path!==void 0&&(q.path=String(q.path).replace(U.PCT_ENCODED,ee).replace(q.scheme?U.NOT_PATH:U.NOT_PATH_NOSCHEME,K).replace(U.PCT_ENCODED,O)),q.query!==void 0&&(q.query=String(q.query).replace(U.PCT_ENCODED,ee).replace(U.NOT_QUERY,K).replace(U.PCT_ENCODED,O)),q.fragment!==void 0&&(q.fragment=String(q.fragment).replace(U.PCT_ENCODED,ee).replace(U.NOT_FRAGMENT,K).replace(U.PCT_ENCODED,O)),q}function Z(q){return q.replace(/^0*(.*)/,"$1")||"0"}function W(q,U){var ee=q.match(U.IPV4ADDRESS)||[],se=m(ee,2),re=se[1];return re?re.split(".").map(Z).join("."):q}function f(q,U){var ee=q.match(U.IPV6ADDRESS)||[],se=m(ee,3),re=se[1],_e=se[2];if(re){for(var Re=re.toLowerCase().split("::").reverse(),We=m(Re,2),Oe=We[0],Ye=We[1],Ne=Ye?Ye.split(":").map(Z):[],Ve=Oe.split(":").map(Z),Je=U.IPV4ADDRESS.test(Ve[Ve.length-1]),Be=Je?7:8,De=Ve.length-Be,Ue=Array(Be),Ke=0;Ke<Be;++Ke)Ue[Ke]=Ne[Ke]||Ve[De+Ke]||"";Je&&(Ue[Be-1]=W(Ue[Be-1],U));var ft=Ue.reduce(function(rt,ht,vt){if(!ht||ht==="0"){var pt=rt[rt.length-1];pt&&pt.index+pt.length===vt?pt.length++:rt.push({index:vt,length:1})}return rt},[]),lt=ft.sort(function(rt,ht){return ht.length-rt.length})[0],ct=void 0;if(lt&<.length>1){var yt=Ue.slice(0,lt.index),It=Ue.slice(lt.index+lt.length);ct=yt.join(":")+"::"+It.join(":")}else ct=Ue.join(":");return _e&&(ct+="%"+_e),ct}else return q}var k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,$="".match(/(){0}/)[1]===void 0;function M(q){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee={},se=U.iri!==!1?C:L;U.reference==="suffix"&&(q=(U.scheme?U.scheme+":":"")+"//"+q);var re=q.match(k);if(re){$?(ee.scheme=re[1],ee.userinfo=re[3],ee.host=re[4],ee.port=parseInt(re[5],10),ee.path=re[6]||"",ee.query=re[7],ee.fragment=re[8],isNaN(ee.port)&&(ee.port=re[5])):(ee.scheme=re[1]||void 0,ee.userinfo=q.indexOf("@")!==-1?re[3]:void 0,ee.host=q.indexOf("//")!==-1?re[4]:void 0,ee.port=parseInt(re[5],10),ee.path=re[6]||"",ee.query=q.indexOf("?")!==-1?re[7]:void 0,ee.fragment=q.indexOf("#")!==-1?re[8]:void 0,isNaN(ee.port)&&(ee.port=q.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?re[4]:void 0)),ee.host&&(ee.host=f(W(ee.host,se),se)),ee.scheme===void 0&&ee.userinfo===void 0&&ee.host===void 0&&ee.port===void 0&&!ee.path&&ee.query===void 0?ee.reference="same-document":ee.scheme===void 0?ee.reference="relative":ee.fragment===void 0?ee.reference="absolute":ee.reference="uri",U.reference&&U.reference!=="suffix"&&U.reference!==ee.reference&&(ee.error=ee.error||"URI is not a "+U.reference+" reference.");var _e=z[(U.scheme||ee.scheme||"").toLowerCase()];if(!U.unicodeSupport&&(!_e||!_e.unicodeSupport)){if(ee.host&&(U.domainHost||_e&&_e.domainHost))try{ee.host=F.toASCII(ee.host.replace(se.PCT_ENCODED,Y).toLowerCase())}catch(Re){ee.error=ee.error||"Host's domain name can not be converted to ASCII via punycode: "+Re}_(ee,L)}else _(ee,se);_e&&_e.parse&&_e.parse(ee,U)}else ee.error=ee.error||"URI can not be parsed.";return ee}function j(q,U){var ee=U.iri!==!1?C:L,se=[];return q.userinfo!==void 0&&(se.push(q.userinfo),se.push("@")),q.host!==void 0&&se.push(f(W(String(q.host),ee),ee).replace(ee.IPV6ADDRESS,function(re,_e,Re){return"["+_e+(Re?"%25"+Re:"")+"]"})),(typeof q.port=="number"||typeof q.port=="string")&&(se.push(":"),se.push(String(q.port))),se.length?se.join(""):void 0}var Q=/^\.\.?\//,te=/^\/\.(\/|$)/,he=/^\/\.\.(\/|$)/,Ae=/^\/?(?:.|\n)*?(?=\/|$)/;function ue(q){for(var U=[];q.length;)if(q.match(Q))q=q.replace(Q,"");else if(q.match(te))q=q.replace(te,"/");else if(q.match(he))q=q.replace(he,"/"),U.pop();else if(q==="."||q==="..")q="";else{var ee=q.match(Ae);if(ee){var se=ee[0];q=q.slice(se.length),U.push(se)}else throw new Error("Unexpected dot segment condition")}return U.join("")}function Ce(q){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=U.iri?C:L,se=[],re=z[(U.scheme||q.scheme||"").toLowerCase()];if(re&&re.serialize&&re.serialize(q,U),q.host&&!ee.IPV6ADDRESS.test(q.host)){if(U.domainHost||re&&re.domainHost)try{q.host=U.iri?F.toUnicode(q.host):F.toASCII(q.host.replace(ee.PCT_ENCODED,Y).toLowerCase())}catch(We){q.error=q.error||"Host's domain name can not be converted to "+(U.iri?"Unicode":"ASCII")+" via punycode: "+We}}_(q,ee),U.reference!=="suffix"&&q.scheme&&(se.push(q.scheme),se.push(":"));var _e=j(q,U);if(_e!==void 0&&(U.reference!=="suffix"&&se.push("//"),se.push(_e),q.path&&q.path.charAt(0)!=="/"&&se.push("/")),q.path!==void 0){var Re=q.path;!U.absolutePath&&(!re||!re.absolutePath)&&(Re=ue(Re)),_e===void 0&&(Re=Re.replace(/^\/\//,"/%2F")),se.push(Re)}return q.query!==void 0&&(se.push("?"),se.push(q.query)),q.fragment!==void 0&&(se.push("#"),se.push(q.fragment)),se.join("")}function Ie(q,U){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},se=arguments[3],re={};return se||(q=M(Ce(q,ee),ee),U=M(Ce(U,ee),ee)),ee=ee||{},!ee.tolerant&&U.scheme?(re.scheme=U.scheme,re.userinfo=U.userinfo,re.host=U.host,re.port=U.port,re.path=ue(U.path||""),re.query=U.query):(U.userinfo!==void 0||U.host!==void 0||U.port!==void 0?(re.userinfo=U.userinfo,re.host=U.host,re.port=U.port,re.path=ue(U.path||""),re.query=U.query):(U.path?(U.path.charAt(0)==="/"?re.path=ue(U.path):((q.userinfo!==void 0||q.host!==void 0||q.port!==void 0)&&!q.path?re.path="/"+U.path:q.path?re.path=q.path.slice(0,q.path.lastIndexOf("/")+1)+U.path:re.path=U.path,re.path=ue(re.path)),re.query=U.query):(re.path=q.path,U.query!==void 0?re.query=U.query:re.query=q.query),re.userinfo=q.userinfo,re.host=q.host,re.port=q.port),re.scheme=q.scheme),re.fragment=U.fragment,re}function we(q,U,ee){var se=P({scheme:"null"},ee);return Ce(Ie(M(q,se),M(U,se),se,!0),se)}function Te(q,U){return typeof q=="string"?q=Ce(M(q,U),U):N(q)==="object"&&(q=M(Ce(q,U),U)),q}function $e(q,U,ee){return typeof q=="string"?q=Ce(M(q,ee),ee):N(q)==="object"&&(q=Ce(q,ee)),typeof U=="string"?U=Ce(M(U,ee),ee):N(U)==="object"&&(U=Ce(U,ee)),q===U}function ke(q,U){return q&&q.toString().replace(!U||!U.iri?L.ESCAPE:C.ESCAPE,K)}function de(q,U){return q&&q.toString().replace(!U||!U.iri?L.PCT_ENCODED:C.PCT_ENCODED,Y)}var Le={scheme:"http",domainHost:!0,parse:function(U,ee){return U.host||(U.error=U.error||"HTTP URIs must have a host."),U},serialize:function(U,ee){var se=String(U.scheme).toLowerCase()==="https";return(U.port===(se?443:80)||U.port==="")&&(U.port=void 0),U.path||(U.path="/"),U}},ae={scheme:"https",domainHost:Le.domainHost,parse:Le.parse,serialize:Le.serialize};function ge(q){return typeof q.secure=="boolean"?q.secure:String(q.scheme).toLowerCase()==="wss"}var le={scheme:"ws",domainHost:!0,parse:function(U,ee){var se=U;return se.secure=ge(se),se.resourceName=(se.path||"/")+(se.query?"?"+se.query:""),se.path=void 0,se.query=void 0,se},serialize:function(U,ee){if((U.port===(ge(U)?443:80)||U.port==="")&&(U.port=void 0),typeof U.secure=="boolean"&&(U.scheme=U.secure?"wss":"ws",U.secure=void 0),U.resourceName){var se=U.resourceName.split("?"),re=m(se,2),_e=re[0],Re=re[1];U.path=_e&&_e!=="/"?_e:void 0,U.query=Re,U.resourceName=void 0}return U.fragment=void 0,U}},ce={scheme:"wss",domainHost:le.domainHost,parse:le.parse,serialize:le.serialize},fe={},ve="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ee="[0-9A-Fa-f]",Fe=x(x("%[EFef]"+Ee+"%"+Ee+Ee+"%"+Ee+Ee)+"|"+x("%[89A-Fa-f]"+Ee+"%"+Ee+Ee)+"|"+x("%"+Ee+Ee)),Qe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Me=X("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),nt="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",kt=new RegExp(ve,"g"),J=new RegExp(Fe,"g"),ne=new RegExp(X("[^]",Qe,"[\\.]",'[\\"]',Me),"g"),oe=new RegExp(X("[^]",ve,nt),"g"),pe=oe;function Se(q){var U=Y(q);return U.match(kt)?U:q}var xe={scheme:"mailto",parse:function(U,ee){var se=U,re=se.to=se.path?se.path.split(","):[];if(se.path=void 0,se.query){for(var _e=!1,Re={},We=se.query.split("&"),Oe=0,Ye=We.length;Oe<Ye;++Oe){var Ne=We[Oe].split("=");switch(Ne[0]){case"to":for(var Ve=Ne[1].split(","),Je=0,Be=Ve.length;Je<Be;++Je)re.push(Ve[Je]);break;case"subject":se.subject=de(Ne[1],ee);break;case"body":se.body=de(Ne[1],ee);break;default:_e=!0,Re[de(Ne[0],ee)]=de(Ne[1],ee);break}}_e&&(se.headers=Re)}se.query=void 0;for(var De=0,Ue=re.length;De<Ue;++De){var Ke=re[De].split("@");if(Ke[0]=de(Ke[0]),ee.unicodeSupport)Ke[1]=de(Ke[1],ee).toLowerCase();else try{Ke[1]=F.toASCII(de(Ke[1],ee).toLowerCase())}catch(ft){se.error=se.error||"Email address's domain name can not be converted to ASCII via punycode: "+ft}re[De]=Ke.join("@")}return se},serialize:function(U,ee){var se=U,re=D(U.to);if(re){for(var _e=0,Re=re.length;_e<Re;++_e){var We=String(re[_e]),Oe=We.lastIndexOf("@"),Ye=We.slice(0,Oe).replace(J,Se).replace(J,O).replace(ne,K),Ne=We.slice(Oe+1);try{Ne=ee.iri?F.toUnicode(Ne):F.toASCII(de(Ne,ee).toLowerCase())}catch(De){se.error=se.error||"Email address's domain name can not be converted to "+(ee.iri?"Unicode":"ASCII")+" via punycode: "+De}re[_e]=Ye+"@"+Ne}se.path=re.join(",")}var Ve=U.headers=U.headers||{};U.subject&&(Ve.subject=U.subject),U.body&&(Ve.body=U.body);var Je=[];for(var Be in Ve)Ve[Be]!==fe[Be]&&Je.push(Be.replace(J,Se).replace(J,O).replace(oe,K)+"="+Ve[Be].replace(J,Se).replace(J,O).replace(pe,K));return Je.length&&(se.query=Je.join("&")),se}},Ge=/^([^\:]+)\:(.*)/,ze={scheme:"urn",parse:function(U,ee){var se=U.path&&U.path.match(Ge),re=U;if(se){var _e=ee.scheme||re.scheme||"urn",Re=se[1].toLowerCase(),We=se[2],Oe=_e+":"+(ee.nid||Re),Ye=z[Oe];re.nid=Re,re.nss=We,re.path=void 0,Ye&&(re=Ye.parse(re,ee))}else re.error=re.error||"URN can not be parsed.";return re},serialize:function(U,ee){var se=ee.scheme||U.scheme||"urn",re=U.nid,_e=se+":"+(ee.nid||re),Re=z[_e];Re&&(U=Re.serialize(U,ee));var We=U,Oe=U.nss;return We.path=(re||ee.nid)+":"+Oe,We}},et=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,gt={scheme:"urn:uuid",parse:function(U,ee){var se=U;return se.uuid=se.nss,se.nss=void 0,!ee.tolerant&&(!se.uuid||!se.uuid.match(et))&&(se.error=se.error||"UUID is not valid."),se},serialize:function(U,ee){var se=U;return se.nss=(U.uuid||"").toLowerCase(),se}};z[Le.scheme]=Le,z[ae.scheme]=ae,z[le.scheme]=le,z[ce.scheme]=ce,z[xe.scheme]=xe,z[ze.scheme]=ze,z[gt.scheme]=gt,H.SCHEMES=z,H.pctEncChar=K,H.pctDecChars=Y,H.parse=M,H.removeDotSegments=ue,H.serialize=Ce,H.resolveComponents=Ie,H.resolve=we,H.normalize=Te,H.equal=$e,H.escapeComponent=ke,H.unescapeComponent=de,Object.defineProperty(H,"__esModule",{value:!0})})(g)},4049:function(ie){ie.exports=function(){var g=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},H=function(){function t(e,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,r,a){return r&&t(e.prototype,r),a&&t(e,a),e}}(),X=function(){function t(e,r){var a=[],o=!0,l=!1,d=void 0;try{for(var y=e[Symbol.iterator](),I;!(o=(I=y.next()).done)&&(a.push(I.value),!(r&&a.length===r));o=!0);}catch(h){l=!0,d=h}finally{try{!o&&y.return&&y.return()}finally{if(l)throw d}}return a}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=(String.prototype.startsWith=String.prototype.startsWith||function(t){return this.indexOf(t)===0},String.prototype.padStart=String.prototype.padStart||function(t,e){for(var r=this;r.length<t;)r=e+r;return r},{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 N(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return r||"0"}var O=function(){function t(e,r,a,o){g(this,t);var l=this;function d(I){if(I.startsWith("hsl")){var h=I.match(/([\-\d\.e]+)/g).map(Number),u=X(h,4),b=u[0],w=u[1],v=u[2],R=u[3];R===void 0&&(R=1),b/=360,w/=100,v/=100,l.hsla=[b,w,v,R]}else if(I.startsWith("rgb")){var B=I.match(/([\-\d\.e]+)/g).map(Number),E=X(B,4),T=E[0],G=E[1],F=E[2],z=E[3];z===void 0&&(z=1),l.rgba=[T,G,F,z]}else I.startsWith("#")?l.rgba=t.hexToRgb(I):l.rgba=t.nameToRgb(I)||t.hexToRgb(I)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(a===void 0){var y=e&&""+e;y&&d(y.toLowerCase())}else this.rgba=[e,r,a,o===void 0?1:o]}return H(t,[{key:"printRGB",value:function(r){var a=r?this.rgba:this.rgba.slice(0,3),o=a.map(function(l,d){return N(l,d===3?3:0)});return r?"rgba("+o+")":"rgb("+o+")"}},{key:"printHSL",value:function(r){var a=[360,100,100,1],o=["","%","%",""],l=r?this.hsla:this.hsla.slice(0,3),d=l.map(function(y,I){return N(y*a[I],I===3?3:1)+o[I]});return r?"hsla("+d+")":"hsl("+d+")"}},{key:"printHex",value:function(r){var a=this.hex;return r?a:a.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=t.hslToRgb(this._hsla)},set:function(r){r.length===3&&(r[3]=1),this._rgba=r,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=t.rgbToHsl(this._rgba)},set:function(r){r.length===3&&(r[3]=1),this._hsla=r,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var r=this.rgba,a=r.map(function(o,l){return l<3?o.toString(16):Math.round(o*255).toString(16)});return"#"+a.map(function(o){return o.padStart(2,"0")}).join("")},set:function(r){this.rgba=t.hexToRgb(r)}}],[{key:"hexToRgb",value:function(r){var a=(r.startsWith("#")?r.slice(1):r).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!a.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+r);var o=a.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(l){return parseInt(l,16)});return o[3]=o[3]/255,o}},{key:"nameToRgb",value:function(r){var a=r.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),o=x[a];return o===void 0?o:t.hexToRgb(o.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(r){var a=X(r,4),o=a[0],l=a[1],d=a[2],y=a[3];o/=255,l/=255,d/=255;var I=Math.max(o,l,d),h=Math.min(o,l,d),u=void 0,b=void 0,w=(I+h)/2;if(I===h)u=b=0;else{var v=I-h;switch(b=w>.5?v/(2-I-h):v/(I+h),I){case o:u=(l-d)/v+(l<d?6:0);break;case l:u=(d-o)/v+2;break;case d:u=(o-l)/v+4;break}u/=6}return[u,b,w,y]}},{key:"hslToRgb",value:function(r){var a=X(r,4),o=a[0],l=a[1],d=a[2],y=a[3],I=void 0,h=void 0,u=void 0;if(l===0)I=h=u=d;else{var b=function(E,T,G){return G<0&&(G+=1),G>1&&(G-=1),G<.16666666666666666?E+(T-E)*6*G:G<.5?T:G<.6666666666666666?E+(T-E)*(.6666666666666666-G)*6:E},w=d<.5?d*(1+l):d+l-d*l,v=2*d-w;I=b(v,w,o+1/3),h=b(v,w,o),u=b(v,w,o-1/3)}var R=[I*255,h*255,u*255].map(Math.round);return R[3]=y,R}}]),t}(),D=function(){function t(){g(this,t),this._events=[]}return H(t,[{key:"add",value:function(r,a,o){r.addEventListener(a,o,!1),this._events.push({target:r,type:a,handler:o})}},{key:"remove",value:function(r,a,o){this._events=this._events.filter(function(l){var d=!0;return r&&r!==l.target&&(d=!1),a&&a!==l.type&&(d=!1),o&&o!==l.handler&&(d=!1),d&&t._doRemove(l.target,l.type,l.handler),!d})}},{key:"destroy",value:function(){this._events.forEach(function(r){return t._doRemove(r.target,r.type,r.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(r,a,o){r.removeEventListener(a,o,!1)}}]),t}();function P(t){var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}function V(t,e,r){var a=!1;function o(I,h,u){return Math.max(h,Math.min(I,u))}function l(I,h,u){if(u&&(a=!0),!!a){I.preventDefault();var b=e.getBoundingClientRect(),w=b.width,v=b.height,R=h.clientX,B=h.clientY,E=o(R-b.left,0,w),T=o(B-b.top,0,v);r(E/w,T/v)}}function d(I,h){var u=I.buttons===void 0?I.which:I.buttons;u===1?l(I,I,h):a=!1}function y(I,h){I.touches.length===1?l(I,I.touches[0],h):a=!1}t.add(e,"mousedown",function(I){d(I,!0)}),t.add(e,"touchstart",function(I){y(I,!0)}),t.add(window,"mousemove",d),t.add(e,"touchmove",y),t.add(window,"mouseup",function(I){a=!1}),t.add(e,"touchend",function(I){a=!1}),t.add(e,"touchcancel",function(I){a=!1})}var L=`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`,C=360,m="keydown",A="mousedown",S="focusin";function p(t,e){return(e||document).querySelector(t)}function c(t){t.preventDefault(),t.stopPropagation()}function s(t,e,r,a,o){t.add(e,m,function(l){r.indexOf(l.key)>=0&&(o&&c(l),a(l))})}var n=function(){function t(e){g(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new D,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return H(t,[{key:"setOptions",value:function(r){var a=this;if(!r)return;var o=this.settings;function l(h,u,b){for(var w in h)b&&b.indexOf(w)>=0||(u[w]=h[w])}if(r instanceof HTMLElement)o.parent=r;else{o.parent&&r.parent&&o.parent!==r.parent&&(this._events.remove(o.parent),this._popupInited=!1),l(r,o),r.onChange&&(this.onChange=r.onChange),r.onDone&&(this.onDone=r.onDone),r.onOpen&&(this.onOpen=r.onOpen),r.onClose&&(this.onClose=r.onClose);var d=r.color||r.colour;d&&this._setColor(d)}var y=o.parent;if(y&&o.popup&&!this._popupInited){var I=function(u){return a.openHandler(u)};this._events.add(y,"click",I),s(this._events,y,[" ","Spacebar","Enter"],I),this._popupInited=!0}else r.parent&&!o.popup&&this.show()}},{key:"openHandler",value:function(r){if(this.show()){r&&r.preventDefault(),this.settings.parent.style.pointerEvents="none";var a=r&&r.type===m?this._domEdit:this.domElement;setTimeout(function(){return a.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(r){var a=r&&r.type,o=!1;if(!r)o=!0;else if(a===A||a===S){var l=(this.__containedEvent||0)+100;r.timeStamp>l&&(o=!0)}else c(r),o=!0;o&&this.hide()&&(this.settings.parent.style.pointerEvents="",a!==A&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(r,a){this.closeHandler(),this.setOptions(r),a&&this.openHandler()}},{key:"setColor",value:function(r,a){this._setColor(r,{silent:a})}},{key:"_setColor",value:function(r,a){if(typeof r=="string"&&(r=r.trim()),!!r){a=a||{};var o=void 0;try{o=new O(r)}catch(d){if(a.failSilently)return;throw d}if(!this.settings.alpha){var l=o.hsla;l[3]=1,o.hsla=l}this.colour=this.color=o,this._setHSLA(null,null,null,null,a)}}},{key:"setColour",value:function(r,a){this.setColor(r,a)}},{key:"show",value:function(){var r=this.settings.parent;if(!r)return!1;if(this.domElement){var a=this._toggleDOM(!0);return this._setPosition(),a}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>',l=P(o);return this.domElement=l,this._domH=p(".picker_hue",l),this._domSL=p(".picker_sl",l),this._domA=p(".picker_alpha",l),this._domEdit=p(".picker_editor input",l),this._domSample=p(".picker_sample",l),this._domOkay=p(".picker_done button",l),this._domCancel=p(".picker_cancel button",l),l.classList.add("layout_"+this.settings.layout),this.settings.alpha||l.classList.add("no_alpha"),this.settings.editor||l.classList.add("no_editor"),this.settings.cancelButton||l.classList.add("no_cancel"),this._ifPopup(function(){return l.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 r=this,a=this,o=this.domElement,l=this._events;function d(h,u,b){l.add(h,u,b)}d(o,"click",function(h){return h.preventDefault()}),V(l,this._domH,function(h,u){return a._setHSLA(h)}),V(l,this._domSL,function(h,u){return a._setHSLA(null,h,1-u)}),this.settings.alpha&&V(l,this._domA,function(h,u){return a._setHSLA(null,null,null,1-u)});var y=this._domEdit;d(y,"input",function(h){a._setColor(this.value,{fromEditor:!0,failSilently:!0})}),d(y,"focus",function(h){var u=this;u.selectionStart===u.selectionEnd&&u.select()}),this._ifPopup(function(){var h=function(w){return r.closeHandler(w)};d(window,A,h),d(window,S,h),s(l,o,["Esc","Escape"],h);var u=function(w){r.__containedEvent=w.timeStamp};d(o,A,u),d(o,S,u),d(r._domCancel,"click",h)});var I=function(u){r._ifPopup(function(){return r.closeHandler(u)}),r.onDone&&r.onDone(r.colour)};d(this._domOkay,"click",I),s(l,o,["Enter"],I)}},{key:"_setPosition",value:function(){var r=this.settings.parent,a=this.domElement;r!==a.parentNode&&r.appendChild(a),this._ifPopup(function(o){getComputedStyle(r).position==="static"&&(r.style.position="relative");var l=o===!0?"popup_right":"popup_"+o;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(d){d===l?a.classList.add(d):a.classList.remove(d)}),a.classList.add(l)})}},{key:"_setHSLA",value:function(r,a,o,l,d){d=d||{};var y=this.colour,I=y.hsla;[r,a,o,l].forEach(function(h,u){(h||h===0)&&(I[u]=h)}),y.hsla=I,this._updateUI(d),this.onChange&&!d.silent&&this.onChange(y)}},{key:"_updateUI",value:function(r){if(!this.domElement)return;r=r||{};var a=this.colour,o=a.hsla,l="hsl("+o[0]*C+", 100%, 50%)",d=a.hslString,y=a.hslaString,I=this._domH,h=this._domSL,u=this._domA,b=p(".picker_selector",I),w=p(".picker_selector",h),v=p(".picker_selector",u);function R(Y,_,Z){_.style.left=Z*100+"%"}function B(Y,_,Z){_.style.top=Z*100+"%"}R(I,b,o[0]),this._domSL.style.backgroundColor=this._domH.style.color=l,R(h,w,o[1]),B(h,w,1-o[2]),h.style.color=d,B(u,v,1-o[3]);var E=d,T=E.replace("hsl","hsla").replace(")",", 0)"),G="linear-gradient("+[E,T]+")";if(this._domA.style.background=G+", "+L,!r.fromEditor){var F=this.settings.editorFormat,z=this.settings.alpha,K=void 0;switch(F){case"rgb":K=a.printRGB(z);break;case"hsl":K=a.printHSL(z);break;default:K=a.printHex(z)}this._domEdit.value=K}this._domSample.style.color=y}},{key:"_ifPopup",value:function(r,a){this.settings.parent&&this.settings.popup?r&&r(this.settings.popup):a&&a()}},{key:"_toggleDOM",value:function(r){var a=this.domElement;if(!a)return!1;var o=r?"":"none",l=a.style.display!==o;return l&&(a.style.display=o),l}}]),t}(),i=document.createElement("style");return i.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(i),n.StyleElement=i,n}()},402:function(ie,g){function H(X,x){if(!(this instanceof H))throw new SyntaxError("Constructor must be called with the new operator");this.message=X+" (char "+x+")",this.char=x,this.stack=new Error().stack}Object.defineProperty(g,"__esModule",{value:!0}),((g.default=H).prototype=new Error).constructor=Error},3860:function(ie,g,H){ie.exports=H(7490).default},7490:function(ie,g,H){g.default=function(u){n="",i=0,t=(s=u).charAt(0),e="",r=C,d();var b=r;if(h(),y(),e==="")return n;if(b===r&&l()){for(var w="";b===r&&l();)n=(0,x.insertBeforeLastWhitespace)(n,","),w+=n,n="",h(),y();return`[
|
|
`.concat(w).concat(n,`
|
|
]`)}throw new X.default("Unexpected characters",i-e.length)};var X=(g=H(402))&&g.__esModule?g:{default:g},x=H(9422),N=0,O=1,D=2,P=3,V=4,L=5,C=6,m={"":!0,"{":!0,"}":!0,"[":!0,"]":!0,":":!0,",":!0,"(":!0,")":!0,";":!0,"+":!0},A={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
`,r:"\r",t:" "},S={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},p={null:"null",true:"true",false:"false"},c={None:"null",True:"true",False:"false"},s="",n="",i=0,t="",e="",r=C;function a(){i++,t=s.charAt(i)}function o(){a(),t==="\\"&&a()}function l(){return r===N&&(e==="["||e==="{")||r===D||r===O||r===P}function d(){if(n+=e,r=C,e="",m[t])r=N,e=t,a();else if((0,x.isDigit)(t)||t==="-"){if(r=O,t==="-"){if(e+=t,a(),!(0,x.isDigit)(t))throw new X.default("Invalid number, digit expected",i)}else t==="0"&&(e+=t,a());for(;(0,x.isDigit)(t);)e+=t,a();if(t==="."){if(e+=t,a(),!(0,x.isDigit)(t))throw new X.default("Invalid number, digit expected",i);for(;(0,x.isDigit)(t);)e+=t,a()}if(t==="e"||t==="E"){if(e+=t,a(),t!=="+"&&t!=="-"||(e+=t,a()),!(0,x.isDigit)(t))throw new X.default("Invalid number, digit expected",i);for(;(0,x.isDigit)(t);)e+=t,a()}}else t==="\\"&&s.charAt(i+1)==='"'?(a(),I(o)):I(a);r===V&&(e=(0,x.normalizeWhitespace)(e),d()),r===L&&(r=C,e="",d())}function y(){e===","&&(e="",r=C,d())}function I(u){if((0,x.isQuote)(t)){var b=(0,x.normalizeQuote)(t),w=(0,x.isSingleQuote)(t)?x.isSingleQuote:x.isDoubleQuote;for(e+='"',r=D,u();t!==""&&!w(t);)if(t==="\\")if(u(),A[t]!==void 0)e+="\\"+t,u();else if(t==="u"){e+="\\u",u();for(var v=0;v<4;v++){if(!(0,x.isHex)(t))throw new X.default("Invalid unicode character",i-e.length);e+=t,u()}}else{if(t!=="'")throw new X.default('Invalid escape character "\\'+t+'"',i);e+="'",u()}else S[t]?e+=S[t]:e+=t==='"'?'\\"':t,u();if((0,x.normalizeQuote)(t)!==b)throw new X.default("End of string expected",i-e.length);e+='"',u()}else if((0,x.isAlpha)(t))for(r=P;(0,x.isAlpha)(t)||(0,x.isDigit)(t)||t==="$";)e+=t,a();else if((0,x.isWhitespace)(t)||(0,x.isSpecialWhitespace)(t))for(r=V;(0,x.isWhitespace)(t)||(0,x.isSpecialWhitespace)(t);)e+=t,a();else if(t==="/"&&s[i+1]==="*"){for(r=L;t!==""&&(t!=="*"||t==="*"&&s[i+1]!=="/");)e+=t,a();t==="*"&&s[i+1]==="/"&&(e+=t,a(),e+=t,a())}else if(t==="/"&&s[i+1]==="/")for(r=L;t!==""&&t!==`
|
|
`;)e+=t,a();else{for(r=C;t!=="";)e+=t,a();throw new X.default('Syntax error in part "'+e+'"',i-e.length)}}function h(){if(r===N&&e==="{")if(d(),r===N&&e==="}")d();else{for(;;){if(r!==P&&r!==O||(r=D,e='"'.concat(e,'"')),r!==D)throw new X.default("Object key expected",i-e.length);if(d(),r===N&&e===":")d();else{if(!l())throw new X.default("Colon expected",i-e.length);n=(0,x.insertBeforeLastWhitespace)(n,":")}if(h(),r===N&&e===","){if(d(),r===N&&e==="}"){n=(0,x.stripLastOccurrence)(n,",");break}if(e===""){n=(0,x.stripLastOccurrence)(n,",");break}}else{if(r!==D&&r!==O&&r!==P)break;n=(0,x.insertBeforeLastWhitespace)(n,",")}}r===N&&e==="}"?d():n=(0,x.insertBeforeLastWhitespace)(n,"}")}else if(r===N&&e==="[")if(d(),r===N&&e==="]")d();else{for(;;)if(h(),r===N&&e===","){if(d(),r===N&&e==="]"){n=(0,x.stripLastOccurrence)(n,",");break}if(e===""){n=(0,x.stripLastOccurrence)(n,",");break}}else{if(!l())break;n=(0,x.insertBeforeLastWhitespace)(n,",")}r===N&&e==="]"?d():n=(0,x.insertBeforeLastWhitespace)(n,"]")}else if(r===D)for(d();r===N&&e==="+";){var u;e="",d(),r===D&&(u=n.lastIndexOf('"'),n=n.substring(0,u)+e.substring(1),e="",d())}else if(r===O)d();else{if(r!==P)throw e===""?new X.default("Unexpected end of json string",i-e.length):new X.default("Value expected",i-e.length);if(p[e])d();else if(c[e])e=c[e],d();else{var b=e,w=n.length;if(e="",d(),r===N&&e==="(")e="",d(),h(),r===N&&e===")"&&(e="",d(),r===N&&e===";"&&(e="",d()));else{for(n=(0,x.insertAtIndex)(n,'"'.concat(b),w);r===P||r===O;)d();n+='"'}}}}},9422:function(ie,g){Object.defineProperty(g,"__esModule",{value:!0}),g.isAlpha=function(V){return x.test(V)},g.isHex=function(V){return N.test(V)},g.isDigit=function(V){return O.test(V)},g.isWhitespace=D,g.isSpecialWhitespace=P,g.normalizeWhitespace=function(V){for(var L="",C=0;C<V.length;C++){var m=V[C];L+=P(m)?" ":m}return L},g.isQuote=function(V){return H[V]===!0||X[V]===!0},g.isSingleQuote=function(V){return H[V]===!0},g.isDoubleQuote=function(V){return X[V]===!0},g.normalizeQuote=function(V){return H[V]!==!0?X[V]!==!0?V:'"':"'"},g.stripLastOccurrence=function(V,L){return L=V.lastIndexOf(L),L!==-1?V.substring(0,L)+V.substring(L+1):V},g.insertBeforeLastWhitespace=function(V,L){var C=V.length;if(!D(V[C-1]))return V+L;for(;D(V[C-1]);)C--;return V.substring(0,C)+L+V.substring(C)},g.insertAtIndex=function(V,L,C){return V.substring(0,C)+L+V.substring(C)};var H={"'":!0,"\u2018":!0,"\u2019":!0,"`":!0,"\xB4":!0},X={'"':!0,"\u201C":!0,"\u201D":!0},x=/^[a-zA-Z_]$/,N=/^[0-9a-fA-F]$/,O=/^[0-9]$/;function D(V){return V===" "||V===" "||V===`
|
|
`||V==="\r"}function P(V){return V==="\xA0"||"\u2000"<=V&&V<="\u200A"||V==="\u202F"||V==="\u205F"||V==="\u3000"}},894:function(ie){ie.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(ie){ie.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(ie){ie.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(ie){ie.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}')}},st={},He.amdD=function(){throw new Error("define cannot be used indirect")},He.n=function(ie){var g=ie&&ie.__esModule?function(){return ie.default}:function(){return ie};return He.d(g,{a:g}),g},He.d=function(ie,g){for(var H in g)He.o(g,H)&&!He.o(ie,H)&&Object.defineProperty(ie,H,{enumerable:!0,get:g[H]})},He.o=function(ie,g){return Object.prototype.hasOwnProperty.call(ie,g)},He.r=function(ie){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ie,"__esModule",{value:!0})},He.nmd=function(ie){return ie.paths=[],ie.children||(ie.children=[]),ie},He(3161);function He(ie){var g=st[ie];return g!==void 0||(g=st[ie]={id:ie,loaded:!1,exports:{}},ot[ie].call(g.exports,g,g.exports,He),g.loaded=!0),g.exports}var ot,st})})(Ht);var hi=ri(Ht.exports);const di={editor:null,name:"json-editor-vue",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"],inChange:!1,isFullScreen:!1,hasLogo:!0,showFullScreen:!1}},watch:{modelValue:{immediate:!0,deep:!0,handler(je){this.internalChange||(this.setEditorContent(je),this.$nextTick(()=>{this.expandAll()}))}}},mounted(){this.init();const je=document.querySelector(".jsoneditor-menu .jsoneditor-poweredBy");this.hasLogo=je&&window.getComputedStyle(je).display!=="none",this.showFullScreen=!0},unmounted(){var je;(je=this.editor)==null||je.destroy(),this.editor=null},methods:{toggleFullScreen(){this.isFullScreen=!this.isFullScreen},init(){const{currentMode:je,modeList:Xe,options:He}=this,ot=()=>{try{const O=this.editor.get();this.json=O,this.$emit("update:modelValue",O),this.$emit("change",O),this.internalChange=!0,this.$nextTick(()=>{this.internalChange=!1})}catch{}},st=()=>{this.expandAll()},ie=(O,D,P)=>{this.$emit("textSelectionChange",this.editor,O,D,P)},g=(O,D)=>{this.$emit("selectionChange",this.editor,O,D)},H=(O,D,P)=>{this.$emit("colorPicker",this.editor,O,D,P)},X=({target:O})=>{this.$emit("focus",this.editor,O)},x=async({target:O})=>{this.$emit("blur",this.editor,O)},N={...He,indentation:2,language:this.language,mode:je,modes:Xe,onChange:ot,onModeChange:st,onTextSelectionChange:ie,onSelectionChange:g,onColorPicker:H,onFocus:X,onBlur:x};this.editor=new hi(this.$refs.jsonEditorVue,N,this.json)},expandAll(){var je,Xe;this.expandedModes.includes((je=this.editor)==null?void 0:je.getMode())&&((Xe=this.editor)==null||Xe.expandAll())},setEditorContent(je){var Xe;(Xe=this.editor)==null||Xe.set(je)}}},ui={ref:"jsonEditorVue",class:"json-editor-vue"};function gi(je,Xe,He,ot,st,ie){return Ze(),it("div",{class:Pt(["container",{"full-screen-container":st.isFullScreen}])},[Pe("div",ui,null,512),Pe("div",{class:Pt(["full-screen",{show:st.showFullScreen,right:!st.hasLogo}]),onClick:Xe[0]||(Xe[0]=(...g)=>ie.toggleFullScreen&&ie.toggleFullScreen(...g))},null,2)],2)}var At=Mt(di,[["render",gi],["__scopeId","data-v-33965fd3"]]);At.install=function(Xe){Xe.component(At.name,At)};typeof window!="undefined"&&window.Vue&&window.Vue.component(At.name,At);const Ct=je=>(ni("data-v-70a74aad"),je=je(),oi(),je),pi=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u540D\u79F0",-1)),mi=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u7C7B\u578B",-1)),fi=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u5185\u5BB9",-1)),Ci={key:1,class:"config_image_wrapper"},Ii={class:"config_image_item_wrapper","m-1":""},vi={key:0},Ai={class:"config_image_cover_wrapper"},yi=["src"],bi={class:"config_image_wrapper"},wi={class:"config_image_cover_wrapper"},xi=["onClick"],Si=["onClick"],ki=["src"],Ei=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u5907\u6CE8",-1)),_i=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u540D\u79F0",-1)),Ri=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u7C7B\u578B",-1)),Ti=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u5185\u5BB9",-1)),$i={key:1,class:"config_image_wrapper"},Li={class:"config_image_item_wrapper","m-1":""},Bi={key:0},Ni={class:"config_image_cover_wrapper"},Gi=["src"],Wi={class:"config_image_wrapper"},Pi=["onClick"],Fi={class:"config_image_cover_wrapper"},Mi=["onClick"],Hi=["onClick"],Vi=["src"],Zi=Ct(()=>Pe("div",{class:"form_tag_wrapper"},"\u5907\u6CE8",-1)),Vt={__name:"config",setup(je){Zt(()=>{ot()});const Xe=mt([]),He=mt([]),ot=async()=>{const o=await Ot();St(o,()=>{He.value=o.data.list})},st=["","\u6587\u5B57","\u56FE\u7247","\u6587\u5B57\u6570\u7EC4","\u56FE\u7247\u6570\u7EC4","JSON"],ie=[{type:"selection",multiple:!1},{type:"expand",renderExpand:o=>{switch(o.type){case 1:return ut("div",{class:["config_text_wrapper"]},{default:()=>o.value});case 2:return ut("div",{class:["config_image_wrapper"]},[ut("div",{class:["config_image_item_wrapper"]},[ut("img",{src:bt(o.value_turn)},{default:()=>{}})])]);case 3:return ut("div",{},o.value_turn.map(l=>ut("div",{class:["config_text_wrapper"]},{default:()=>l})));case 4:return ut("div",{class:["config_image_wrapper"]},o.value_turn.map(l=>ut("div",{class:["config_image_item_wrapper","m-1"]},[ut("img",{src:bt(l)},{default:()=>{}})])));case 5:return ut(at,{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 st[o.type]}},{title:"\u5907\u6CE8",key:"remark"}],g=["","","",[],[],{}],H=mt(!1),X={label:"",value:"",value_edit:"",value_push:"",type:1,remark:""},x=mt(JSON.parse(JSON.stringify(X))),N=async()=>{const o=await Dt({label:x.value.label,value:[3,4,5].indexOf(x.value.type)!==-1?JSON.stringify(x.value.value_edit):x.value.value_edit,type:x.value.type,remark:x.value.remark});St(o,()=>{window.$message().success(o.message),H.value=!1,x.value=JSON.parse(JSON.stringify(X)),ot()})},O=()=>{x.value=JSON.parse(JSON.stringify(X)),H.value=!0},D=o=>{H.value?(x.value.value_edit=JSON.parse(JSON.stringify(g[o])),x.value.value_push="",x.value.type=o):(s.value.value_edit=JSON.parse(JSON.stringify(g[o])),s.value.value_push="",s.value.type=o)},P=()=>{if(H.value){const o=JSON.parse(JSON.stringify(x.value.value_push));x.value.value_push="",x.value.value_edit.push(o)}else{const o=JSON.parse(JSON.stringify(s.value.value_push));s.value.value_push="",s.value.value_edit.push(o)}},V=o=>{H.value?x.value.value_edit.splice(o,1):s.value.value_edit.splice(o,1)},L=mt(null),C=o=>{L.value=o},m=mt(-2),A=async o=>{const l=o.target.files[0];L.value.value=null;const d=await Kt(l),y=await jt(d);St(y,()=>{let I=y.data.url;H.value?m.value===-2?x.value.value_edit=I:m.value===-1?x.value.value_edit.push(I):x.value.value_edit[m.value]=I:m.value===-2?s.value.value_edit=I:m.value===-1?s.value.value_edit.push(I):s.value.value_edit[m.value]=I})},S=o=>{m.value=o,L.value.click()},p=mt(!1),c={id:0,label:"",value:"",value_edit:"",value_push:"",type:1,remark:""},s=mt(JSON.parse(JSON.stringify(c))),n=async()=>{const o=await zt({config_id:s.value.id,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});St(o,()=>{window.$message().success(o.message),p.value=!1,s.value=JSON.parse(JSON.stringify(c)),ot()})},i=()=>{if(Xe.value.length!==1)return window.$message().error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u914D\u7F6E");s.value=JSON.parse(JSON.stringify(c));for(let o=0;o<He.value.length;o++)if(Xe.value[0]===He.value[o].id){s.value={id:He.value[o].id,label:He.value[o].label,value:He.value[o].value,value_edit:He.value[o].value_turn,value_push:"",type:He.value[o].type,remark:He.value[o].remark},p.value=!0;return}},t=o=>{H.value?o===-2?x.value.value_edit="":x.value.value_edit.splice(o,1):o===-2?s.value.value_edit="":s.value.value_edit.splice(o,1)},e=mt(!1),r=()=>{if(Xe.value.length!==1)return window.$message().error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u914D\u7F6E");e.value=!0},a=async()=>{const o=await Xt(Xe.value[0]);St(o,()=>{window.$message().success(o.message),e.value=!1,Xe.value=[],ot()})};return(o,l)=>{const d=Yt,y=Jt,I=Ut,h=Qt,u=qt,b=ei,w=ti,v=si,R=ai,B=ci,E=li,T=ii;return Ze(),it("div",null,[me(b,{show:ye(e),"onUpdate:show":l[2]||(l[2]=G=>Tt(e)?e.value=G:null),preset:"card",style:{width:"400px"},title:"\u5220\u9664\u786E\u8BA4","auto-focus":!1,bordered:!1},{default:be(()=>[Pe("div",null,[me(I,{title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"alarm"})]),_:1})]),_:1}),me(I,{"mt-2":"",title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"alarm"})]),_:1})]),_:1}),me(I,{"mt-2":"",title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"alarm"})]),_:1})]),_:1}),me(u,{"mt-2":"",justify:"center"},{default:be(()=>[me(h,{onClick:l[0]||(l[0]=G=>a()),type:"info"},{default:be(()=>[qe("\u786E\u5B9A")]),_:1}),me(h,{onClick:l[1]||(l[1]=G=>e.value=!1)},{default:be(()=>[qe("\u53D6\u6D88")]),_:1})]),_:1})])]),_:1},8,["show"]),me(b,{show:ye(p),"onUpdate:show":l[14]||(l[14]=G=>Tt(p)?p.value=G:null),preset:"card",style:{width:"1000px"},title:"\u4FEE\u6539","auto-focus":!1,bordered:!1},{default:be(()=>[Pe("div",null,[me(u,{align:"center"},{default:be(()=>[me(w,null,{default:be(()=>[pi]),_:1}),me(ye(at),{class:"form_input_wrapper",value:ye(s).label,"onUpdate:value":l[3]||(l[3]=G=>ye(s).label=G)},null,8,["value"])]),_:1}),me(u,{"mt-2":"",align:"center"},{default:be(()=>[me(w,null,{default:be(()=>[mi]),_:1}),me(R,{value:ye(s).type,"onUpdate:value":[l[4]||(l[4]=G=>ye(s).type=G),D],name:"type_radio"},{default:be(()=>[me(u,null,{default:be(()=>[me(v,{value:1},{default:be(()=>[qe("\u6587\u5B57")]),_:1}),me(v,{value:2},{default:be(()=>[qe("\u56FE\u7247")]),_:1}),me(v,{value:3},{default:be(()=>[qe("\u6587\u5B57\u6570\u7EC4")]),_:1}),me(v,{value:4},{default:be(()=>[qe("\u56FE\u7247\u6570\u7EC4")]),_:1}),me(v,{value:5},{default:be(()=>[qe("JSON")]),_:1})]),_:1})]),_:1},8,["value"])]),_:1}),me(u,{"mt-2":""},{default:be(()=>[me(w,{"mt-1":""},{default:be(()=>[fi]),_:1}),ye(s).type===1?(Ze(),dt(ye(at),{key:0,class:"form_input_wrapper",value:ye(s).value_edit,"onUpdate:value":l[5]||(l[5]=G=>ye(s).value_edit=G)},null,8,["value"])):tt("",!0),ye(s).type===2?(Ze(),it("div",Ci,[Pe("div",Ii,[ye(s).value_edit?tt("",!0):(Ze(),it("span",vi,"\u6682\u65E0\u56FE\u7247")),Pe("div",Ai,[Pe("div",{class:"config_image_cover_upload_wrapper","cursor-pointer":"",onClick:l[6]||(l[6]=G=>S(-2))},[me(d,{type:"upload-three"})]),ye(s).value_edit?(Ze(),it("div",{key:0,"cursor-pointer":"",class:"config_image_cover_delete_wrapper",onClick:l[7]||(l[7]=G=>t(-2))},[me(d,{type:"delete-one"})])):tt("",!0)]),ye(s).value_edit?(Ze(),it("img",{key:1,src:ye(bt)(ye(s).value_edit),alt:""},null,8,yi)):tt("",!0)])])):tt("",!0),ye(s).type===3?(Ze(),dt(B,{key:2,style:{"max-height":"500px"}},{default:be(()=>[(Ze(!0),it($t,null,Lt(ye(s).value_edit,(G,F)=>(Ze(),dt(u,{"mb-2":"",key:F,align:"center"},{default:be(()=>[me(ye(at),{class:"form_input_wrapper",value:ye(s).value_edit[F],"onUpdate:value":z=>ye(s).value_edit[F]=z},null,8,["value","onUpdate:value"]),me(h,{onClick:z=>V(F),quaternary:"",circle:"",type:"error"},{icon:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"minus"})]),_:1})]),_:2},1032,["onClick"])]),_:2},1024))),128)),me(u,{align:"center"},{default:be(()=>[me(ye(at),{class:"form_input_wrapper",value:ye(s).value_push,"onUpdate:value":l[8]||(l[8]=G=>ye(s).value_push=G)},null,8,["value"]),me(h,{onClick:l[9]||(l[9]=G=>P()),quaternary:"",circle:"",type:"info"},{icon:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"plus"})]),_:1})]),_:1})]),_:1})]),_:1})):tt("",!0),ye(s).type===4?(Ze(),dt(B,{key:3,style:{"max-height":"500px"}},{default:be(()=>[Pe("div",bi,[(Ze(!0),it($t,null,Lt(ye(s).value_edit,(G,F)=>(Ze(),it("div",{key:F,class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},[Pe("div",wi,[Pe("div",{class:"config_image_cover_upload_wrapper",onClick:z=>S(F)},[me(d,{type:"upload-three"})],8,xi),Pe("div",{class:"config_image_cover_delete_wrapper",onClick:z=>t(F)},[me(d,{type:"delete-one"})],8,Si)]),Pe("img",{src:ye(bt)(G),alt:""},null,8,ki)]))),128)),Pe("div",{onClick:l[10]||(l[10]=G=>S(-1)),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},"\u4E0A\u4F20\u56FE\u7247")])]),_:1})):tt("",!0),ye(s).type===5?(Ze(),dt(ye(At),{key:4,style:{width:"840px",height:"500px"},modelValue:ye(s).value_edit,"onUpdate:modelValue":l[11]||(l[11]=G=>ye(s).value_edit=G),language:"zh-CN",modeList:[]},null,8,["modelValue"])):tt("",!0)]),_:1}),me(u,{"mt-2":"",align:"center"},{default:be(()=>[me(w,null,{default:be(()=>[Ei]),_:1}),me(ye(at),{class:"form_input_wrapper",value:ye(s).remark,"onUpdate:value":l[12]||(l[12]=G=>ye(s).remark=G)},null,8,["value"])]),_:1}),me(u,{"mt-2":""},{default:be(()=>[me(h,{onClick:l[13]||(l[13]=G=>n()),type:"info"},{default:be(()=>[qe("\u786E\u5B9A")]),_:1})]),_:1})])]),_:1},8,["show"]),me(b,{show:ye(H),"onUpdate:show":l[26]||(l[26]=G=>Tt(H)?H.value=G:null),preset:"card",style:{width:"1000px"},title:"\u65B0\u5EFA","auto-focus":!1,bordered:!1},{default:be(()=>[Pe("div",null,[me(u,{align:"center"},{default:be(()=>[me(w,null,{default:be(()=>[_i]),_:1}),me(ye(at),{class:"form_input_wrapper",value:ye(x).label,"onUpdate:value":l[15]||(l[15]=G=>ye(x).label=G)},null,8,["value"])]),_:1}),me(u,{"mt-2":"",align:"center"},{default:be(()=>[me(w,null,{default:be(()=>[Ri]),_:1}),me(R,{value:ye(x).type,"onUpdate:value":[l[16]||(l[16]=G=>ye(x).type=G),D],name:"type_radio"},{default:be(()=>[me(u,null,{default:be(()=>[me(v,{value:1},{default:be(()=>[qe("\u6587\u5B57")]),_:1}),me(v,{value:2},{default:be(()=>[qe("\u56FE\u7247")]),_:1}),me(v,{value:3},{default:be(()=>[qe("\u6587\u5B57\u6570\u7EC4")]),_:1}),me(v,{value:4},{default:be(()=>[qe("\u56FE\u7247\u6570\u7EC4")]),_:1}),me(v,{value:5},{default:be(()=>[qe("JSON")]),_:1})]),_:1})]),_:1},8,["value"])]),_:1}),me(u,{"mt-2":""},{default:be(()=>[me(w,{"mt-1":""},{default:be(()=>[Ti]),_:1}),ye(x).type===1?(Ze(),dt(ye(at),{key:0,class:"form_input_wrapper",value:ye(x).value_edit,"onUpdate:value":l[17]||(l[17]=G=>ye(x).value_edit=G)},null,8,["value"])):tt("",!0),ye(x).type===2?(Ze(),it("div",$i,[Pe("div",Li,[ye(x).value_edit?tt("",!0):(Ze(),it("span",Bi,"\u6682\u65E0\u56FE\u7247")),Pe("div",Ni,[Pe("div",{class:"config_image_cover_upload_wrapper","cursor-pointer":"",onClick:l[18]||(l[18]=G=>S(-2))},[me(d,{type:"upload-three"})]),ye(x).value_edit?(Ze(),it("div",{key:0,"cursor-pointer":"",class:"config_image_cover_delete_wrapper",onClick:l[19]||(l[19]=G=>t(-2))},[me(d,{type:"delete-one"})])):tt("",!0)]),ye(x).value_edit?(Ze(),it("img",{key:1,src:ye(bt)(ye(x).value_edit),alt:""},null,8,Gi)):tt("",!0)])])):tt("",!0),ye(x).type===3?(Ze(),dt(B,{key:2,style:{"max-height":"500px"}},{default:be(()=>[(Ze(!0),it($t,null,Lt(ye(x).value_edit,(G,F)=>(Ze(),dt(u,{"mb-2":"",key:F,align:"center"},{default:be(()=>[me(ye(at),{class:"form_input_wrapper",value:ye(x).value_edit[F],"onUpdate:value":z=>ye(x).value_edit[F]=z},null,8,["value","onUpdate:value"]),me(h,{onClick:z=>V(F),quaternary:"",circle:"",type:"error"},{icon:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"minus"})]),_:1})]),_:2},1032,["onClick"])]),_:2},1024))),128)),me(u,{align:"center"},{default:be(()=>[me(ye(at),{class:"form_input_wrapper",value:ye(x).value_push,"onUpdate:value":l[20]||(l[20]=G=>ye(x).value_push=G)},null,8,["value"]),me(h,{onClick:l[21]||(l[21]=G=>P()),quaternary:"",circle:"",type:"info"},{icon:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"plus"})]),_:1})]),_:1})]),_:1})]),_:1})):tt("",!0),ye(x).type===4?(Ze(),dt(B,{key:3,style:{"max-height":"500px"}},{default:be(()=>[Pe("div",Wi,[(Ze(!0),it($t,null,Lt(ye(x).value_edit,(G,F)=>(Ze(),it("div",{key:F,onClick:z=>S(F),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},[Pe("div",Fi,[Pe("div",{class:"config_image_cover_upload_wrapper",onClick:z=>S(F)},[me(d,{type:"upload-three"})],8,Mi),Pe("div",{class:"config_image_cover_delete_wrapper",onClick:z=>t(F)},[me(d,{type:"delete-one"})],8,Hi)]),Pe("img",{src:ye(bt)(G),alt:""},null,8,Vi)],8,Pi))),128)),Pe("div",{onClick:l[22]||(l[22]=G=>S(-1)),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},"\u4E0A\u4F20\u56FE\u7247")])]),_:1})):tt("",!0),ye(x).type===5?(Ze(),dt(ye(At),{key:4,style:{width:"840px",height:"500px"},modelValue:ye(x).value_edit,"onUpdate:modelValue":l[23]||(l[23]=G=>ye(x).value_edit=G),language:"zh-CN",modeList:[]},null,8,["modelValue"])):tt("",!0)]),_:1}),me(u,{"mt-2":"",align:"center"},{default:be(()=>[me(w,null,{default:be(()=>[Zi]),_:1}),me(ye(at),{class:"form_input_wrapper",value:ye(x).remark,"onUpdate:value":l[24]||(l[24]=G=>ye(x).remark=G)},null,8,["value"])]),_:1}),me(u,{"mt-2":""},{default:be(()=>[me(h,{onClick:l[25]||(l[25]=G=>N()),type:"info"},{default:be(()=>[qe("\u786E\u5B9A")]),_:1})]),_:1})])]),_:1},8,["show"]),Pe("input",{class:"upload_input_wrapper",accept:"image/*",onChange:A,type:"file",ref:C},null,32),me(T,{title:"\u540E\u53F0\u914D\u7F6E"},{default:be(()=>[Pe("div",null,[me(u,null,{default:be(()=>[me(h,{onClick:l[27]||(l[27]=G=>O()),type:"success"},{default:be(()=>[qe("\u65B0\u5EFA")]),_:1}),me(h,{onClick:l[28]||(l[28]=G=>r()),type:"error"},{default:be(()=>[qe("\u5220\u9664")]),_:1}),me(h,{onClick:l[29]||(l[29]=G=>i()),type:"info"},{default:be(()=>[qe("\u4FEE\u6539")]),_:1})]),_:1}),me(I,{"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:be(()=>[me(y,null,{default:be(()=>[me(d,{type:"alarm"})]),_:1})]),_:1}),me(E,{"mt-2":"","checked-row-keys":ye(Xe),"onUpdate:checked-row-keys":l[30]||(l[30]=G=>Tt(Xe)?Xe.value=G:null),columns:ie,"row-key":G=>G.id,data:ye(He)},null,8,["checked-row-keys","row-key","data"])])]),_:1})])}}};typeof Ft=="function"&&Ft(Vt);var qi=Mt(Vt,[["__scopeId","data-v-70a74aad"]]);export{qi as default};
|