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.
1353 lines
1.0 MiB
1353 lines
1.0 MiB
import{_ as Pt,o as je,c as rt,h as Ze,bB as Ht,e as Zt,f as ft,dY as Ot,$ as kt,a as xe,w as $e,i as it,j as _e,k as Rt,b as gt,bv as ot,cG as wt,F as $t,l as Lt,d as Gt,m as pt,dZ as Dt,cL as Kt,cF as jt,dr as zt,d_ as Xt,y as Yt,z as Jt,cA as Ut,s as Qt,v as qt,x as en,N as tn,B as nn,bE as on,bF as rn}from"./index.ba6d2826.js";import{g as sn}from"./_commonjsHelpers.b273fa3f.js";import{_ as ct}from"./Input.a5e3f92d.js";import{a as an,b as ln,_ as cn}from"./DataTable.106d47ab.js";import{_ as hn}from"./Scrollbar.6eb5866a.js";import"./Suffix.236be5c8.js";import"./Checkbox.4929fce7.js";import"./FocusDetector.f6cb7f9f.js";import"./Select.7ff9cb13.js";import"./Forward.17e154bf.js";var Ft={exports:{}};/*!
|
|
* jsoneditor.js
|
|
*
|
|
* @brief
|
|
* JSONEditor is a web-based tool to view, edit, format, and validate JSON.
|
|
* It has various modes such as a tree editor, a code editor, and a plain text
|
|
* editor.
|
|
*
|
|
* Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+
|
|
*
|
|
* @license
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
* use this file except in compliance with the License. You may obtain a copy
|
|
* of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
* License for the specific language governing permissions and limitations under
|
|
* the License.
|
|
*
|
|
* Copyright (c) 2011-2023 Jos de Jong, http://jsoneditoronline.org
|
|
*
|
|
* @author Jos de Jong, <wjosdejong@gmail.com>
|
|
* @version 9.10.3
|
|
* @date 2023-09-21
|
|
*/(function(ze,Qe){(function(De,st){ze.exports=st()})(self,function(){return st={897:function(ae,m,O){O.d(m,{x:function(){return X}});var U=O(2602),S=O(9791),M=O(7907);function K(F){return(K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(F)}function j(F,N){for(var w=0;w<N.length;w++){var f=N[w];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(F,function(_){return _=function(I,C){if(K(I)!=="object"||I===null)return I;var h=I[Symbol.toPrimitive];if(h===void 0)return(C==="string"?String:Number)(I);if(h=h.call(I,C||"default"),K(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}(_,"string"),K(_)==="symbol"?_:String(_)}(f.key),f)}}var X=function(){function F(f,C){if(!(this instanceof F))throw new TypeError("Cannot call a class as a function");this.dom={};var I=this,l=this.dom,C=(this.anchor=void 0,this.items=f,this.eventListeners={},this.selection=void 0,this.onClose=C?C.close:void 0,this.limitHeight=!!C&&C.limitHeight,document.createElement("div")),h=(C.className="jsoneditor-contextmenu-root",l.root=C,document.createElement("div")),C=(h.className="jsoneditor-contextmenu",l.menu=h,C.appendChild(h),document.createElement("ul")),h=(C.className="jsoneditor-menu",h.appendChild(C),l.list=C,l.items=[],document.createElement("button")),l=(h.type="button",l.focusButton=h,document.createElement("li"));l.style.overflow="hidden",l.style.height="0",l.appendChild(h),C.appendChild(l),function c(n,s,i){i.forEach(function(o){var a,e,t,r,d,p;o.type==="separator"?((d=document.createElement("div")).className="jsoneditor-separator",(e=document.createElement("li")).appendChild(d),n.appendChild(e)):(a={},d=document.createElement("li"),n.appendChild(d),(e=document.createElement("button")).type="button",e.className=o.className,a.button=e,o.title&&(e.title=o.title),o.click&&(e.onclick=function(g){g.preventDefault(),I.hide(),o.click()}),d.appendChild(e),o.submenu?((r=document.createElement("div")).className="jsoneditor-icon",e.appendChild(r),(r=document.createElement("div")).className="jsoneditor-text"+(o.click?"":" jsoneditor-right-margin"),r.appendChild(document.createTextNode(o.text)),e.appendChild(r),(t=o.click?(e.className+=" jsoneditor-default",(r=document.createElement("button")).type="button",(a.buttonExpand=r).className="jsoneditor-expand",(p=document.createElement("div")).className="jsoneditor-expand",r.appendChild(p),d.appendChild(r),o.submenuTitle&&(r.title=o.submenuTitle),r):((p=document.createElement("div")).className="jsoneditor-expand",e.appendChild(p),e)).onclick=function(g){g.preventDefault(),I._onExpandItem(a),t.focus()},a.subItems=r=[],p=document.createElement("ul"),(a.ul=p).className="jsoneditor-menu",p.style.height="0",d.appendChild(p),c(p,r,o.submenu)):((d=document.createElement("div")).className="jsoneditor-icon",e.appendChild(d),(p=document.createElement("div")).className="jsoneditor-text",p.appendChild(document.createTextNode((0,M.Iu)(o.text))),e.appendChild(p)),s.push(a))})}(C,this.dom.items,f),this.maxHeight=0,f.forEach(function(c){c=24*(f.length+(c.submenu?c.submenu.length:0)),I.maxHeight=Math.max(I.maxHeight,c)})}var N,w;return N=F,(w=[{key:"_getVisibleButtons",value:function(){var f=[],_=this;return this.dom.items.forEach(function(I){f.push(I.button),I.buttonExpand&&f.push(I.buttonExpand),I.subItems&&I===_.expandedItem&&I.subItems.forEach(function(C){f.push(C.button),C.buttonExpand&&f.push(C.buttonExpand)})}),f}},{key:"show",value:function(f,s,I){this.hide();var C=!0,l=f.parentNode,h=f.getBoundingClientRect(),l=l.getBoundingClientRect(),c=s.getBoundingClientRect(),n=this,s=(this.dom.absoluteAnchor=(0,U.w)(f,s,function(){n.hide()}),h.bottom+this.maxHeight<c.bottom||h.top-this.maxHeight>c.top&&(C=!1),I?0:h.top-l.top);C?(I=f.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=s+I+"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&&(l=C?c.bottom-h.bottom-10:h.top-c.top-10,this.dom.list.style.maxHeight=l+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,S.getSelection)(),this.anchor=f,setTimeout(function(){n.dom.focusButton.focus()},0),F.visibleMenu&&F.visibleMenu.hide(),F.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(),F.visibleMenu===this&&(F.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(f){var _,I=this,C=f===this.expandedItem,h=this.expandedItem;h&&(h.ul.style.height="0",h.ul.style.padding="",setTimeout(function(){I.expandedItem!==h&&(h.ul.style.display="",S.removeClassName)(h.ul.parentNode,"jsoneditor-selected")},300),this.expandedItem=void 0),C||((_=f.ul).style.display="block",_.clientHeight,setTimeout(function(){if(I.expandedItem===f){for(var l=0,c=0;c<_.childNodes.length;c++)l+=_.childNodes[c].clientHeight;_.style.height=l+"px",_.style.padding="5px 10px"}},0),(0,S.addClassName)(_.parentNode,"jsoneditor-selected"),this.expandedItem=f)}},{key:"_onKeyDown",value:function(f){var _,I,C,h,l=f.target,c=f.which,n=!1;c===27?(this.selection&&(0,S.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),n=!0):c===9?f.shiftKey?(I=(_=this._getVisibleButtons()).indexOf(l))===0&&(_[_.length-1].focus(),n=!0):(I=(_=this._getVisibleButtons()).indexOf(l))===_.length-1&&(_[0].focus(),n=!0):c===37?(l.className==="jsoneditor-expand"&&(I=(_=this._getVisibleButtons()).indexOf(l),C=_[I-1])&&C.focus(),n=!0):c===38?(I=(_=this._getVisibleButtons()).indexOf(l),(C=(C=(C=_[I-1])&&C.className==="jsoneditor-expand"?_[I-2]:C)||_[_.length-1])&&C.focus(),n=!0):c===39?(I=(_=this._getVisibleButtons()).indexOf(l),(h=_[I+1])&&h.className==="jsoneditor-expand"&&h.focus(),n=!0):c===40&&(I=(_=this._getVisibleButtons()).indexOf(l),(h=(h=(h=_[I+1])&&h.className==="jsoneditor-expand"?_[I+2]:h)||_[0])&&(h.focus(),n=!0),n=!0),n&&(f.stopPropagation(),f.preventDefault())}}])&&j(N.prototype,w),Object.defineProperty(N,"prototype",{writable:!1}),F}();X.visibleMenu=void 0},6436:function(ae,m,O){function U(K){return(U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(K)}function S(K,j){for(var X=0;X<j.length;X++){var F=j[X];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(K,function(N){return N=function(w,f){if(U(w)!=="object"||w===null)return w;var _=w[Symbol.toPrimitive];if(_===void 0)return(f==="string"?String:Number)(w);if(_=_.call(w,f||"default"),U(_)!=="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}(N,"string"),U(N)==="symbol"?N:String(N)}(F.key),F)}}O.d(m,{Q:function(){return M}});var M=function(){function K(N){if(!(this instanceof K))throw new TypeError("Cannot call a class as a function");this.errorTableVisible=N.errorTableVisible,this.onToggleVisibility=N.onToggleVisibility,this.onFocusLine=N.onFocusLine||function(){},this.onChangeHeight=N.onChangeHeight,this.dom={};var N=document.createElement("div"),w=(N.className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=N,document.createElement("div")),N=(w.style.display="none",w.className="jsoneditor-additional-errors fadein",w.textContent="Scroll for more \u25BF",this.dom.additionalErrorsIndication=w,N.appendChild(w),document.createElement("span")),w=(N.className="jsoneditor-validation-error-icon",N.style.display="none",this.dom.validationErrorIcon=N,document.createElement("span"));w.className="jsoneditor-validation-error-count",w.style.display="none",this.dom.validationErrorCount=w,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}var j,X;return j=K,(X=[{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(F,N){var w,f,_=this,I=(this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.dom.additionalErrorsIndication.style.display="none"),this.errorTableVisible&&0<F.length?((I=document.createElement("div")).className="jsoneditor-validation-errors",(f=document.createElement("table")).className="jsoneditor-text-errors",I.appendChild(f),w=document.createElement("tbody"),f.appendChild(w),F.forEach(function(C){isNaN(C.line)?C.dataPath&&(l=N.find(function(s){return s.path===C.dataPath}))&&(h=l.line+1):h=C.line;var h,l=document.createElement("tr"),c=(l.className=isNaN(h)?"":"jump-to-line",C.type==="error"?l.className+=" parse-error":l.className+=" validation-error",document.createElement("td")),n=document.createElement("button"),n=(n.className="jsoneditor-schema-error",c.appendChild(n),l.appendChild(c),document.createElement("td"));n.style="white-space: nowrap;",n.textContent=isNaN(h)?"":"Ln "+h,l.appendChild(n),typeof C=="string"?((c=document.createElement("td")).colSpan=2,(n=document.createElement("pre")).appendChild(document.createTextNode(C)),c.appendChild(n),l.appendChild(c)):((n=document.createElement("td")).appendChild(document.createTextNode(C.dataPath||"")),l.appendChild(n),c=document.createElement("td"),(n=document.createElement("pre")).appendChild(document.createTextNode(C.message.replace(/<br>/gi,`
|
|
`))),c.appendChild(n),l.appendChild(c)),l.onclick=function(){_.onFocusLine(h)},w.appendChild(l)}),this.dom.validationErrors=I,this.dom.validationErrorsContainer.appendChild(I),this.dom.additionalErrorsIndication.title=F.length+" errors total",this.dom.validationErrorsContainer.clientHeight<this.dom.validationErrorsContainer.scrollHeight?(this.dom.additionalErrorsIndication.style.display="block",this.dom.validationErrorsContainer.onscroll=function(){_.dom.additionalErrorsIndication.style.display=0<_.dom.validationErrorsContainer.clientHeight&&_.dom.validationErrorsContainer.scrollTop===0?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0,f=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0),this.onChangeHeight(f)):this.onChangeHeight(0),F.filter(function(C){return C.type!=="error"}).length);0<I?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=I,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=I+" 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"),F.some(function(C){return C.type==="error"})?(f=F[0].line,this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(f)?"parse error - check that the json is valid":"parse error on line "+f,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)):this.dom.parseErrorIndication.style.display="none"}}])&&S(j.prototype,X),Object.defineProperty(j,"prototype",{writable:!1}),K}()},2474:function(ae,m,O){function U(K){return(U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j})(K)}function S(K,j){for(var X=0;X<j.length;X++){var F=j[X];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(K,function(N){return N=function(w,f){if(U(w)!=="object"||w===null)return w;var _=w[Symbol.toPrimitive];if(_===void 0)return(f==="string"?String:Number)(w);if(_=_.call(w,f||"default"),U(_)!=="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}(N,"string"),U(N)==="symbol"?N:String(N)}(F.key),F)}}O.d(m,{R:function(){return M}});var M=function(){function K(F){if(!(this instanceof K))throw new TypeError("Cannot call a class as a function");if(this.target=F.target||null,!this.target)throw new Error('FocusTracker constructor called without a "target" to track.');this.onFocus=typeof F.onFocus=="function"?F.onFocus:null,this.onBlur=typeof F.onBlur=="function"?F.onBlur:null,this._onClick=this._onEvent.bind(this),this._onKeyUp=function(N){N.which!==9&&N.keyCode!==9||this._onEvent(N)}.bind(this),this._onBlur=this._onEvent.bind(this),this.focusFlag=!1,this.firstEventFlag=!0,(this.onFocus||this.onBlur)&&(document.addEventListener("click",this._onClick),document.addEventListener("keyup",this._onKeyUp),document.addEventListener("blur",this._onBlur))}var j,X;return j=K,(X=[{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(F){F=F.target,F=F===this.target||!(!this.target.contains(F)&&!this.target.contains(document.activeElement)),F?this.focusFlag||(this.onFocus&&this.onFocus({type:"focus",target:this.target}),this.focusFlag=!0):(this.focusFlag||this.firstEventFlag)&&(this.onBlur&&this.onBlur({type:"blur",target:this.target}),this.focusFlag=!1,this.firstEventFlag)&&(this.firstEventFlag=!1)}}])&&S(j.prototype,X),Object.defineProperty(j,"prototype",{writable:!1}),K}()},3161:function(ae,m,O){var U=O(8170),S=O(8037),M=O(8038).treeModeMixins,K=O(8458).textModeMixins,j=O(341).previewModeMixins,_=O(9791),X=_.clear,F=_.extend,N=_.getInnerText,w=_.getInternetExplorerVersion,f=_.parse,_=O(2744).tryRequireAjv,I=O(2558).showTransformModal,C=O(6210).showSortModal,h=_();function l(c,n,s){if(!(this instanceof l))throw new Error('JSONEditor constructor called without "new".');var i=w();if(i!==-1&&i<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");n&&(n.error&&(console.warn('Option "error" has been renamed to "onError"'),n.onError=n.error,delete n.error),n.change&&(console.warn('Option "change" has been renamed to "onChange"'),n.onChange=n.change,delete n.change),n.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),n.onEditable=n.editable,delete n.editable),n.onChangeJSON&&(n.mode==="text"||n.mode==="code"||n.modes&&(n.modes.indexOf("text")!==-1||n.modes.indexOf("code")!==-1))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),n)&&Object.keys(n).forEach(function(o){l.VALID_OPTIONS.indexOf(o)===-1&&console.warn('Unknown option "'+o+'". This option will be ignored')}),arguments.length&&this._create(c,n,s)}typeof Promise=="undefined"&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),l.modes={},l.prototype.DEBOUNCE_INTERVAL=150,l.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onExpand","onEditable","onError","onEvent","onModeChange","onNodeName","onValidate","onCreateMenu","onSelectionChange","onTextSelectionChange","onClassName","onFocus","onBlur","colorPicker","onColorPicker","timestampTag","timestampFormat","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","mainMenuBar","languages","language","enableSort","enableTransform","limitDragging","maxVisibleChilds","onValidationError","modalAnchor","popupAnchor","createQuery","executeQuery","queryDescription","allowSchemaSuggestions","showErrorTable"],l.prototype._create=function(c,n,s){this.container=c,this.options=n||{},this.json=s||{},c=this.options.mode||this.options.modes&&this.options.modes[0]||"tree",this.setMode(c)},l.prototype.destroy=function(){},l.prototype.set=function(c){this.json=c},l.prototype.get=function(){return this.json},l.prototype.setText=function(c){this.json=f(c)},l.prototype.getText=function(){return JSON.stringify(this.json)},l.prototype.setName=function(c){this.options||(this.options={}),this.options.name=c},l.prototype.getName=function(){return this.options&&this.options.name},l.prototype.setMode=function(c){if(c!==this.options.mode||!this.create){var n=this.container,s=F({},this.options),i=s.mode,o=(s.mode=c,l.modes[c]);if(!o)throw new Error('Unknown mode "'+s.mode+'"');var a=o.data==="text",e=this.getName(),t=this[a?"getText":"get"]();if(this.destroy(),X(this),F(this,o.mixin),this.create(n,s),this.setName(e),this[a?"setText":"set"](t),typeof o.load=="function")try{o.load.call(this)}catch(r){console.error(r)}if(typeof s.onModeChange=="function"&&c!==i)try{s.onModeChange(c,i)}catch(r){console.error(r)}}},l.prototype.getMode=function(){return this.options.mode},l.prototype._onError=function(c){this.options&&typeof this.options.onError=="function"?this.options.onError(c):window.alert(c.toString())},l.prototype.setSchema=function(c,n){if(c){var s;try{this.options.ajv?s=this.options.ajv:((s=h({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(O(7171)),s.addMetaSchema(O(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(s){if(n){for(var i in n)s.removeSchema(i),n[i]&&s.addSchema(n[i],i);this.options.schemaRefs=n}this.validateSchema=s.compile(c),this.options.schema=c,this.options.schemaRefs=n,this.validate()}}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate();this.refresh(),typeof this._onSchemaChange=="function"&&this._onSchemaChange(c,n)},l.prototype.validate=function(){},l.prototype.refresh=function(){},(l.registerMode=function(c){var n;if(Array.isArray(c))for(o=0;o<c.length;o++)l.registerMode(c[o]);else{if(!("mode"in c))throw new Error('Property "mode" missing');if(!("mixin"in c))throw new Error('Property "mixin" missing');if(!("data"in c))throw new Error('Property "data" missing');var s=c.mode;if(s in l.modes)throw new Error('Mode "'+s+'" already registered');if(typeof c.mixin.create!="function")throw new Error('Required function "create" missing on mixin');for(var i=["setMode","registerMode","modes"],o=0;o<i.length;o++)if((n=i[o])in c.mixin)throw new Error('Reserved property "'+n+'" not allowed in mixin');l.modes[s]=c}})(M),l.registerMode(K),l.registerMode(j),l.ace=U,l.Ajv=h,l.VanillaPicker=S,l.showTransformModal=I,l.showSortModal=C,l.getInnerText=N,ae.exports=l.default=l},6617:function(ae,m,O){O.d(m,{x:function(){return j}});var U=O(897),S=O(7907);function M(X){return(M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F})(X)}function K(X,F){for(var N=0;N<F.length;N++){var w=F[N];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(X,function(f){return f=function(_,I){if(M(_)!=="object"||_===null)return _;var C=_[Symbol.toPrimitive];if(C===void 0)return(I==="string"?String:Number)(_);if(C=C.call(_,I||"default"),M(C)!=="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}(f,"string"),M(f)==="symbol"?f:String(f)}(w.key),w)}}var j=function(){function X(w,f,_,I){if(!(this instanceof X))throw new TypeError("Cannot call a class as a function");for(var C={code:{text:(0,S.Iu)("modeCodeText"),title:(0,S.Iu)("modeCodeTitle"),click:function(){I("code")}},form:{text:(0,S.Iu)("modeFormText"),title:(0,S.Iu)("modeFormTitle"),click:function(){I("form")}},text:{text:(0,S.Iu)("modeTextText"),title:(0,S.Iu)("modeTextTitle"),click:function(){I("text")}},tree:{text:(0,S.Iu)("modeTreeText"),title:(0,S.Iu)("modeTreeTitle"),click:function(){I("tree")}},view:{text:(0,S.Iu)("modeViewText"),title:(0,S.Iu)("modeViewTitle"),click:function(){I("view")}},preview:{text:(0,S.Iu)("modePreviewText"),title:(0,S.Iu)("modePreviewTitle"),click:function(){I("preview")}}},h=[],l=0;l<f.length;l++){var c=f[l],n=C[c];if(!n)throw new Error('Unknown mode "'+c+'"');n.className="jsoneditor-type-modes"+(_===c?" jsoneditor-selected":""),h.push(n)}var i=C[_];if(!i)throw new Error('Unknown mode "'+_+'"');var i=i.text,s=document.createElement("button"),i=(s.type="button",s.className="jsoneditor-modes jsoneditor-separator",s.textContent=i+" \u25BE",s.title=(0,S.Iu)("modeEditorTitle"),s.onclick=function(){new U.x(h).show(s,w)},document.createElement("div"));i.className="jsoneditor-modes",i.style.position="relative",i.appendChild(s),w.appendChild(i),this.dom={container:w,box:s,frame:i}}var F,N;return F=X,(N=[{key:"focus",value:function(){this.dom.box.focus()}},{key:"destroy",value:function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null}}])&&K(F.prototype,N),Object.defineProperty(F,"prototype",{writable:!1}),X}()},8170:function(ae,m,O){var U;if(window.ace)U=window.ace;else try{U=O(6225),O(4091),O(3330),O(4317);var S=O(7923);U.config.setModuleUrl("ace/mode/json_worker",S)}catch{}ae.exports=U},4864:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(ae,m,O){m.isDark=!1,m.cssClass="ace-jsoneditor",m.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
|
|
}`,ae("../lib/dom").importCssString(m.cssText,m.cssClass)})},6589:function(ae,m){(O={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(U,S,M,K,j,X,F){var N=X.length-1;switch(j){case 1:this.$=U.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
|
|
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(U);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=X[N-1];case 13:this.$={};break;case 14:this.$=X[N-1];break;case 15:this.$=[X[N-2],X[N]];break;case 16:this.$={},this.$[X[N][0]]=X[N][1];break;case 17:this.$=X[N-2],X[N-2][X[N][0]]=X[N][1];break;case 18:this.$=[];break;case 19:this.$=X[N-1];break;case 20:this.$=[X[N]];break;case 21:this.$=X[N-2],X[N-2].push(X[N])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(U,S){throw new Error(U)},parse:function(U){var S=this,M=[0],K=[null],j=[],X=this.table,F="",N=0,w=0,f=0,_=(this.lexer.setInput(U),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.lexer.yylloc===void 0&&(this.lexer.yylloc={}),this.lexer.yylloc);function I(){var r=S.lexer.lex()||1;return r=typeof r!="number"&&S.symbols_[r]||r}j.push(_),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);for(var C,h,l,c,n,s,i,o,a,e={};;){if(l=M[M.length-1],(c=this.defaultActions[l]||(C==null&&(C=I()),X[l]&&X[l][C]))===void 0||!c.length||!c[0]){if(!f){for(n in o=[],X[l])this.terminals_[n]&&2<n&&o.push("'"+this.terminals_[n]+"'");var t="",t=this.lexer.showPosition?"Parse error on line "+(N+1)+`:
|
|
`+this.lexer.showPosition()+`
|
|
Expecting `+o.join(", ")+", got '"+this.terminals_[C]+"'":"Parse error on line "+(N+1)+": Unexpected "+(C==1?"end of input":"'"+(this.terminals_[C]||C)+"'");this.parseError(t,{text:this.lexer.match,token:this.terminals_[C]||C,line:this.lexer.yylineno,loc:_,expected:o})}if(f==3){if(C==1)throw new Error(t||"Parsing halted.");w=this.lexer.yyleng,F=this.lexer.yytext,N=this.lexer.yylineno,_=this.lexer.yylloc,C=I()}for(;!(2 .toString()in X[l]);){if(l==0)throw new Error(t||"Parsing halted.");a=1,M.length=M.length-2*a,K.length=K.length-a,j.length=j.length-a,l=M[M.length-1]}h=C,C=2,c=X[l=M[M.length-1]]&&X[l][2],f=3}if(c[0]instanceof Array&&1<c.length)throw new Error("Parse Error: multiple actions possible at state: "+l+", token: "+C);switch(c[0]){case 1:M.push(C),K.push(this.lexer.yytext),j.push(this.lexer.yylloc),M.push(c[1]),C=null,h?(C=h,h=null):(w=this.lexer.yyleng,F=this.lexer.yytext,N=this.lexer.yylineno,_=this.lexer.yylloc,0<f&&f--);break;case 2:if(s=this.productions_[c[1]][1],e.$=K[K.length-s],e._$={first_line:j[j.length-(s||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(s||1)].first_column,last_column:j[j.length-1].last_column},(i=this.performAction.call(e,F,w,N,this.yy,c[1],K,j))!==void 0)return i;s&&(M=M.slice(0,-1*s*2),K=K.slice(0,-1*s),j=j.slice(0,-1*s)),M.push(this.productions_[c[1]][0]),K.push(e.$),j.push(e._$),i=X[M[M.length-2]][M[M.length-1]],M.push(i);break;case 3:return!0}}return!0}}).lexer={EOF:1,parseError:function(U,S){if(!this.yy.parseError)throw new Error(U);this.yy.parseError(U,S)},setInput:function(U){return this._input=U,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var U=this._input[0];return this.yytext+=U,this.yyleng++,this.match+=U,this.matched+=U,U.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),U},unput:function(U){return this._input=U+this._input,this},more:function(){return this._more=!0,this},less:function(U){this._input=this.match.slice(U)+this._input},pastInput:function(){var U=this.matched.substr(0,this.matched.length-this.match.length);return(20<U.length?"...":"")+U.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var U=this.match;return U.length<20&&(U+=this._input.substr(0,20-U.length)),(U.substr(0,20)+(20<U.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var U=this.pastInput(),S=new Array(U.length+1).join("-");return U+this.upcomingInput()+`
|
|
`+S+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var U,S,M,K,j=this._currentRules(),X=0;X<j.length&&(!(S=this._input.match(this.rules[j[X]]))||U&&!(S[0].length>U[0].length)||(U=S,M=X,this.options.flex));X++);return U?((K=U[0].match(/\n.*/g))&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-1:this.yylloc.last_column+U[0].length},this.yytext+=U[0],this.match+=U[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(U[0].length),this.matched+=U[0],K=this.performAction.call(this,this.yy,this,j[M],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),K||void 0):this._input===""?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U!==void 0?U:this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(U){this.begin(U)},options:{},performAction:function(U,S,M,K){switch(M){case 0:break;case 1:return 6;case 2:return S.yytext=S.yytext.substr(1,S.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};var O;m.parser=O,m.parse=O.parse.bind(O)},3879:function(ae){function m(){}m.prototype={on:function(N,w){this._events=this._events||{},this._events[N]=this._events[N]||[],this._events[N].push(w)},off:function(N,w){this._events=this._events||{},N in this._events&&this._events[N].splice(this._events[N].indexOf(w),1)},emit:function(N){if(this._events=this._events||{},N in this._events)for(var w=0;w<this._events[N].length;w++)this._events[N][w].apply(this,Array.prototype.slice.call(arguments,1))}},m.mixin=function(N){for(var w=["on","off","emit"],f=0;f<w.length;f++)typeof N=="function"?N.prototype[w[f]]=m.prototype[w[f]]:N[w[f]]=m.prototype[w[f]];return N};var O={escapeRegExp:function(N){var w=/[\\^$.*+?()[\]{}|]/g,f=new RegExp(w.source);return N&&f.test(N)?N.replace(w,"\\$&"):N},extend:function(N,w){for(var f in w){var _;w.hasOwnProperty(f)&&((_=w[f])&&Object.prototype.toString.call(_)==="[object Object]"?(N[f]=N[f]||{},O.extend(N[f],_)):N[f]=_)}return N},each:function(N,w,f){if(Object.prototype.toString.call(N)==="[object Object]")for(var _ in N)Object.prototype.hasOwnProperty.call(N,_)&&w.call(f,_,N[_],N);else for(var I=0,C=N.length;I<C;I++)w.call(f,I,N[I],N)},createElement:function(N,w){var f,_=document.createElement(N);if(w&&Object.prototype.toString.call(w)==="[object Object]")for(f in w)f in _?_[f]=w[f]:f==="html"?_.innerHTML=w[f]:_.setAttribute(f,w[f]);return _},hasClass:function(N,w){if(N)return N.classList?N.classList.contains(w):!!N.className&&!!N.className.match(new RegExp("(\\s|^)"+w+"(\\s|$)"))},addClass:function(N,w){O.hasClass(N,w)||(N.classList?N.classList.add(w):N.className=N.className.trim()+" "+w)},removeClass:function(N,w){O.hasClass(N,w)&&(N.classList?N.classList.remove(w):N.className=N.className.replace(new RegExp("(^|\\s)"+w.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(N,w){return N&&N!==document.body&&(w(N)?N:O.closest(N.parentNode,w))},isInt:function(N){return typeof N=="number"&&isFinite(N)&&Math.floor(N)===N},debounce:function(N,w,f){var _;return function(){var I=this,C=arguments,h=f&&!_;clearTimeout(_),_=setTimeout(function(){_=null,f||N.apply(I,C)},w),h&&N.apply(I,C)}},rect:function(_,C){var f=window,_=_.getBoundingClientRect(),I=C?f.pageXOffset:0,C=C?f.pageYOffset:0;return{bottom:_.bottom+C,height:_.height,left:_.left+I,right:_.right+I,top:_.top+C,width:_.width}},includes:function(N,w){return-1<N.indexOf(w)},startsWith:function(N,w){return N.substr(0,w.length)===w},truncate:function(N){for(;N.firstChild;)N.removeChild(N.firstChild)}};function U(N,w){return N.hasOwnProperty(w)&&(N[w]===!0||N[w].length)}function S(N,w,f){N.parentNode?N.parentNode.parentNode||w.appendChild(N.parentNode):w.appendChild(N),O.removeClass(N,"excluded"),f||(N.textContent=N.textContent)}function M(){var N,w;this.items.length&&(N=document.createDocumentFragment(),this.config.pagination?(w=this.pages.slice(0,this.pageIndex),O.each(w,function(f,_){O.each(_,function(I,C){S(C,N,this.customOption)},this)},this)):O.each(this.items,function(f,_){S(_,N,this.customOption)},this),N.childElementCount&&(O.removeClass(this.items[this.navIndex],"active"),this.navIndex=(N.querySelector(".selectr-option.selected")||N.querySelector(".selectr-option")).idx,O.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(N))}function K(N,w){w=w||N;var f={class:"selectr-option",role:"treeitem","aria-selected":!1};return this.customOption?f.html=this.config.renderOption(w):f.textContent=N.textContent,(w=O.createElement("li",f)).idx=N.idx,this.items.push(w),N.defaultSelected&&this.defaultSelected.push(N.idx),N.disabled&&(w.disabled=!0,O.addClass(w,"disabled")),w}function j(){var N,w=this.tree,f=w.scrollTop;w.scrollHeight-w.offsetHeight<=f&&this.pageIndex<this.pages.length&&(N=document.createDocumentFragment(),O.each(this.pages[this.pageIndex],function(_,I){S(I,N,this.customOption)},this),w.appendChild(N),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length}))}function X(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&O.removeClass(this.inputContainer,"active"),O.hasClass(this.container,"notice")&&(O.removeClass(this.container,"notice"),O.addClass(this.container,"open"),this.input.focus()),O.each(this.items,function(N,w){O.removeClass(w,"excluded"),this.customOption||(w.textContent=w.textContent)},this))}function F(N,w){if(!N)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if(typeof(this.el=N)=="string"&&(this.el=document.querySelector(N)),this.el===null)throw new Error("The element you passed to Selectr can not be found.");if(this.el.nodeName.toLowerCase()!=="select")throw new Error("The element you passed to Selectr is not a HTMLSelectElement.");this.render(w)}F.prototype.render=function(N){var w;this.rendered||((this.el.selectr=this).config=O.extend({defaultSelected:!0,width:"auto",disabled:!1,disabledMobile:!1,searchable:!0,clearable:!1,sortSelected:!1,allowDeselect:!1,closeOnScroll:!1,nativeDropdown:!1,nativeKeyboard:!1,placeholder:"Select an option...",taggable:!1,tagPlaceholder:"Enter a tag...",messages:{noResults:"No results.",noOptions:"No options available.",maxSelections:"A maximum of {max} items can be selected.",tagDuplicate:"That tag is already in use.",searchPlaceholder:"Search options..."}},N),this.originalType=this.el.type,this.originalIndex=this.el.tabIndex,this.defaultSelected=[],this.originalOptionCount=this.el.options.length,(this.config.multiple||this.config.taggable)&&(this.el.multiple=!0),this.disabled=U(this.config,"disabled"),this.opened=!1,this.config.taggable&&(this.config.searchable=!1),this.navigating=!1,this.mobileDevice=!1,!this.config.disabledMobile&&/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent)&&(this.mobileDevice=!0),this.customOption=this.config.hasOwnProperty("renderOption")&&typeof this.config.renderOption=="function",this.customSelected=this.config.hasOwnProperty("renderSelection")&&typeof this.config.renderSelection=="function",this.supportsEventPassiveOption=this.detectEventPassiveOption(),m.mixin(this),function(){this.requiresPagination=this.config.pagination&&0<this.config.pagination,U(this.config,"width")&&(O.isInt(this.config.width)?this.width=this.config.width+"px":this.config.width==="auto"?this.width="100%":O.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=O.createElement("div",{class:"selectr-container"}),this.config.customClass&&O.addClass(this.container,this.config.customClass),this.mobileDevice?O.addClass(this.container,"selectr-mobile"):O.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?O.addClass(this.el,"selectr-visible"):O.addClass(this.el,"selectr-hidden"),this.selected=O.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:0,"aria-expanded":!1}),this.label=O.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var f=O.createElement("div",{class:"selectr-options-container"});if(this.tree=O.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=O.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple?(O.addClass(this.label,"selectr-tags"),O.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=O.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),O.addClass(this.container,"clearable")),this.config.taggable){var _=O.createElement("li",{class:"input-tag"});if(this.input=O.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),_.appendChild(this.input),this.label.appendChild(_),O.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators){this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators);for(var I=[],C=0;C<this.tagSeperators.length;C++)I.push(O.escapeRegExp(this.tagSeperators[C]));this.tagSeperatorsRegex=new RegExp(I.join("|"),"i")}else this.tagSeperatorsRegex=new RegExp(",","i")}this.config.searchable&&(this.input=O.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=O.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=O.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),f.appendChild(this.inputContainer)),f.appendChild(this.notice),f.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var h,l,c,n=!1,s=0;this.el.children.length&&O.each(this.el.children,function(o,a){a.nodeName==="OPTGROUP"?(n=O.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+a.label+"</li>"}),O.each(a.children,function(e,t){t.idx=s,n.appendChild(K.call(this,t,n)),s++},this)):(a.idx=s,K.call(this,a),s++)},this),this.config.data&&Array.isArray(this.config.data)&&(h=!(this.data=[]),n=!1,s=0,O.each(this.config.data,function(o,a){U(a,"children")?(h=O.createElement("optgroup",{label:a.text}),n=O.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+a.text+"</li>"}),O.each(a.children,function(e,t){(l=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&t.selected===!0)).disabled=U(t,"disabled"),this.options.push(l),h.appendChild(l),l.idx=s,n.appendChild(K.call(this,l,t)),this.data[s]=t,s++},this),this.el.appendChild(h)):((l=new Option(a.text,a.value,!1,a.hasOwnProperty("selected")&&a.selected===!0)).disabled=U(a,"disabled"),this.options.push(l),l.idx=s,K.call(this,l,a),this.data[s]=a,s++)},this)),this.setSelected(!0);for(var i=this.navIndex=0;i<this.items.length;i++)if(c=this.items[i],!O.hasClass(c,"disabled")){O.addClass(c,"active"),this.navIndex=i;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(f),this.placeEl=O.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=O.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex),w=this,setTimeout(function(){w.emit("selectr.init")},20))},F.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},F.prototype.getSelectedProperties=function(N){var w=this.getSelected();return[].slice.call(w).map(function(f){return f[N]}).filter(function(f){return f!=null})},F.prototype.detectEventPassiveOption=function(){var N=!1;try{var w=Object.defineProperty({},"passive",{get:function(){N=!0}});window.addEventListener("test",null,w)}catch{}return N},F.prototype.bindEvents=function(){var N,w=this;this.events={},this.events.dismiss=function(f){f=f.target,this.container.contains(f)||!this.opened&&!O.hasClass(this.container,"notice")||this.close()}.bind(this),this.events.navigate=function(f){if(f=f||window.event,this.items.length&&this.opened&&O.includes([13,38,40],f.which)){if(f.preventDefault(),f.which===13)return!(this.noResults||this.config.taggable&&0<this.input.value.length)&&this.change(this.navIndex);var _,I=this.items[this.navIndex],C=this.navIndex;switch(f.which){case 38:(_=0)<this.navIndex&&this.navIndex--;break;case 40:this.navIndex<this.items.length-(_=1)&&this.navIndex++}for(this.navigating=!0;O.hasClass(this.items[this.navIndex],"disabled")||O.hasClass(this.items[this.navIndex],"excluded");){if(!(0<this.navIndex&&this.navIndex<this.items.length-1)){this.navIndex=C;break}if(_?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}}}f=O.rect(this.items[this.navIndex]),_?(this.navIndex===0?this.tree.scrollTop=0:f.top+f.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(f.top+f.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&j.call(this)):this.navIndex===0?this.tree.scrollTop=0:f.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(f.top-this.optsRect.top)),I&&O.removeClass(I,"active"),O.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(f){f.changedTouches[0].target===w.el&&w.toggle()},!!this.supportsEventPassiveOption&&{passive:!0}),this.container.addEventListener("click",function(f){f.target===w.el&&w.toggle()}),this.el.addEventListener("change",function(f){f.__selfTriggered||(w.el.multiple?(f=w.getSelectedProperties("idx"),f=function(_,I){for(var C,h=[],l=_.slice(0),c=0;c<I.length;c++)-1<(C=l.indexOf(I[c]))?l.splice(C,1):h.push(I[c]);return[h,l]}(w.selectedIndexes,f),O.each(f[0],function(_,I){w.select(I)},w),O.each(f[1],function(_,I){w.deselect(I)},w)):-1<w.el.selectedIndex&&w.select(w.el.selectedIndex))})),this.config.nativeDropdown&&this.container.addEventListener("keydown",function(f){f.key==="Enter"&&w.selected===document.activeElement&&(w.toggle(),setTimeout(function(){w.el.focus()},200))}),this.selected.addEventListener("click",function(f){w.disabled||w.toggle(),f.preventDefault()}),this.config.nativeKeyboard&&(N="",this.selected.addEventListener("keydown",function(f){var _;w.disabled||w.selected!==document.activeElement||f.altKey||f.ctrlKey||f.metaKey||(f.key===" "||!w.opened&&-1<["Enter","ArrowUp","ArrowDown"].indexOf(f.key)?(w.toggle(),f.preventDefault(),f.stopPropagation()):f.key.length<=2&&String[String.fromCodePoint?"fromCodePoint":"fromCharCode"](f.key[String.codePointAt?"codePointAt":"charCodeAt"](0))===f.key&&(w.config.multiple?(w.open(),w.config.searchable&&(w.input.value=f.key,w.input.focus(),w.search(null,!0))):(N+=f.key,(_=w.search(N,!0))&&_.length&&(w.clear(),w.setValue(_[0].value)),setTimeout(function(){N=""},1e3)),f.preventDefault(),f.stopPropagation()))}),this.container.addEventListener("keyup",function(f){w.opened&&f.key==="Escape"&&(w.close(),f.stopPropagation(),w.selected.focus())})),this.label.addEventListener("click",function(f){O.hasClass(f.target,"selectr-tag-remove")&&w.deselect(f.target.parentNode.idx)}),this.selectClear&&this.selectClear.addEventListener("click",this.clear.bind(this)),this.tree.addEventListener("mousedown",function(f){f.preventDefault()}),this.tree.addEventListener("click",function(f){var _=O.closest(f.target,function(I){return I&&O.hasClass(I,"selectr-option")});_&&!O.hasClass(_,"disabled")&&(O.hasClass(_,"selected")?(w.el.multiple||!w.el.multiple&&w.config.allowDeselect)&&w.deselect(_.idx):w.select(_.idx),w.opened&&!w.el.multiple)&&w.close(),f.preventDefault(),f.stopPropagation()}),this.tree.addEventListener("mouseover",function(f){!O.hasClass(f.target,"selectr-option")||O.hasClass(f.target,"disabled")||(O.removeClass(w.items[w.navIndex],"active"),O.addClass(f.target,"active"),w.navIndex=[].slice.call(w.items).indexOf(f.target))}),this.config.searchable&&(this.input.addEventListener("focus",function(f){w.searching=!0}),this.input.addEventListener("blur",function(f){w.searching=!1}),this.input.addEventListener("keyup",function(f){w.search(),w.config.taggable||(this.value.length?O.addClass(this.parentNode,"active"):O.removeClass(this.parentNode,"active"))}),this.inputClear.addEventListener("click",function(f){w.input.value=null,X.call(w),w.tree.childElementCount||M.call(w)})),this.config.taggable&&this.input.addEventListener("keyup",function(f){var _,I;w.search(),w.config.taggable&&this.value.length&&(_=this.value.trim()).length&&(f.which===13||w.tagSeperatorsRegex.test(_))&&(f=_.replace(w.tagSeperatorsRegex,""),(I=(f=(f=O.escapeRegExp(f)).trim()).length?w.add({value:f,textContent:f,selected:!0},!0):I)?(w.close(),X.call(w)):(this.value="",w.setMessage(w.config.messages.tagDuplicate)))}),this.update=O.debounce(function(){w.opened&&w.config.closeOnScroll&&w.close(),w.width&&(w.container.style.width=w.width),w.invert()},50),this.requiresPagination&&(this.paginateItems=O.debounce(function(){j.call(this)},50),this.tree.addEventListener("scroll",this.paginateItems.bind(this))),document.addEventListener("click",this.events.dismiss),window.addEventListener("keydown",this.events.navigate),window.addEventListener("resize",this.update),window.addEventListener("scroll",this.update),this.on("selectr.destroy",function(){document.removeEventListener("click",this.events.dismiss),window.removeEventListener("keydown",this.events.navigate),window.removeEventListener("resize",this.update),window.removeEventListener("scroll",this.update)}),this.el.form&&(this.el.form.addEventListener("reset",this.events.reset),this.on("selectr.destroy",function(){this.el.form.removeEventListener("reset",this.events.reset)}))},F.prototype.setSelected=function(N){var w;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),O.each(this.options,function(f,_){_.selected&&_.defaultSelected&&this.select(_.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),w=0,O.each(this.config.data,function(f,_){U(_,"children")?O.each(_.children,function(I,C){C.hasOwnProperty("selected")&&C.selected===!0&&this.select(w),w++},this):(_.hasOwnProperty("selected")&&_.selected===!0&&this.select(w),w++)},this))},F.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),this.originalType==="select-one"&&(this.el.multiple=!1),this.config.data&&(this.el.innerHTML=""),O.removeClass(this.el,"selectr-hidden"),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1,delete this.el.selectr)},F.prototype.change=function(N){var w=this.items[N],f=this.options[N];f.disabled||(f.selected&&O.hasClass(w,"selected")?this.deselect(N):this.select(N),this.opened&&!this.el.multiple&&this.close())},F.prototype.select=function(N){var w=this.items[N],f=[].slice.call(this.el.options),_=this.options[N];if(this.el.multiple){if(O.includes(this.selectedIndexes,N))return!1;if(this.config.maxSelections&&this.tags.length===this.config.maxSelections)return this.setMessage(this.config.messages.maxSelections.replace("{max}",this.config.maxSelections),!0),!1;this.selectedValues.push(_.value),this.selectedIndexes.push(N),function(C){var h,l=this,c=document.createDocumentFragment(),n=this.options[C.idx],s=this.data?this.data[C.idx]:n,i={class:"selectr-tag"},s=(this.customSelected?i.html=this.config.renderSelection(s):i.textContent=n.textContent,O.createElement("li",i)),i=O.createElement("button",{class:"selectr-tag-remove",type:"button"});s.appendChild(i),s.idx=C.idx,s.tag=n.value,this.tags.push(s),this.config.sortSelected?(i=this.tags.slice(),h=function(o,a){o.replace(/(\d+)|(\D+)/g,function(e,t,r){a.push([t||1/0,r||""])})},i.sort(function(o,a){var e,t,r=[],d=[];for(l.config.sortSelected===!0?(e=o.tag,t=a.tag):l.config.sortSelected==="text"&&(e=o.textContent,t=a.textContent),h(e,r),h(t,d);r.length&&d.length;){var g=r.shift(),p=d.shift(),g=g[0]-p[0]||g[1].localeCompare(p[1]);if(g)return g}return r.length-d.length}),O.each(i,function(o,a){c.appendChild(a)}),this.label.innerHTML=""):c.appendChild(s),this.config.taggable?this.label.insertBefore(c,this.input.parentNode):this.label.appendChild(c)}.call(this,w)}else{var I=this.data?this.data[N]:_;this.customSelected?this.label.innerHTML=this.config.renderSelection(I):this.label.textContent=_.textContent,this.selectedValue=_.value,this.selectedIndex=N,O.each(this.options,function(C,h){var l=this.items[C];C!==N&&(l&&O.removeClass(l,"selected"),h.selected=!1,h.removeAttribute("selected"))},this)}O.includes(f,_)||this.el.add(_),w.setAttribute("aria-selected",!0),O.addClass(w,"selected"),O.addClass(this.container,"has-selected"),_.selected=!0,_.setAttribute("selected",""),this.emit("selectr.change",_),this.emit("selectr.select",_),"createEvent"in document?((I=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),I.__selfTriggered=!0,this.el.dispatchEvent(I)):this.el.fireEvent("onchange")},F.prototype.deselect=function(N,w){var f=this.items[N],_=this.options[N];if(this.el.multiple){var I=this.selectedIndexes.indexOf(N),I=(this.selectedIndexes.splice(I,1),this.selectedValues.indexOf(_.value));this.selectedValues.splice(I,1),function(C){var h=!1;O.each(this.tags,function(l,c){c.idx===C.idx&&(h=c)},this),h&&(this.label.removeChild(h),this.tags.splice(this.tags.indexOf(h),1))}.call(this,f),this.tags.length||O.removeClass(this.container,"has-selected")}else{if(!w&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.innerHTML="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,O.removeClass(this.container,"has-selected")}this.items[N].setAttribute("aria-selected",!1),O.removeClass(this.items[N],"selected"),_.selected=!1,_.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",_),"createEvent"in document?((I=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),I.__selfTriggered=!0,this.el.dispatchEvent(I)):this.el.fireEvent("onchange")},F.prototype.setValue=function(N){var w=Array.isArray(N);if(w||(N=N.toString().trim()),!this.el.multiple&&w)return!1;O.each(this.options,function(f,_){(w&&-1<N.indexOf(_.value)||_.value===N)&&this.change(_.idx)},this)},F.prototype.getValue=function(N,w){var f,_;return this.el.multiple?N?this.selectedIndexes.length&&(_={values:[]},O.each(this.selectedIndexes,function(I,C){C=this.options[C],_.values[I]={value:C.value,text:C.textContent}},this)):_=this.selectedValues.slice():_=N?{value:(f=this.options[this.selectedIndex]).value,text:f.textContent}:this.selectedValue,_=N&&w?JSON.stringify(_):_},F.prototype.add=function(N,w){if(N){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(N))O.each(N,function(I,C){this.add(C,w)},this);else if(Object.prototype.toString.call(N)==="[object Object]"){if(w){var f=!1;if(O.each(this.options,function(I,C){C.value.toLowerCase()===N.value.toLowerCase()&&(f=!0)}),f)return!1}var _=O.createElement("option",N);return this.data.push(N),this.mobileDevice&&this.el.add(_),this.options.push(_),_.idx=0<this.options.length?this.options.length-1:0,K.call(this,_),N.selected&&this.select(_.idx),this.setPlaceholder(),_}return this.config.pagination&&this.paginate(),!0}},F.prototype.remove=function(N){var w,f=[];Array.isArray(N)?O.each(N,function(_,I){O.isInt(I)?f.push(this.getOptionByIndex(I)):typeof I=="string"&&f.push(this.getOptionByValue(I))},this):O.isInt(N)?f.push(this.getOptionByIndex(N)):typeof N=="string"&&f.push(this.getOptionByValue(N)),f.length&&(O.each(f,function(_,I){w=I.idx,this.el.remove(I),this.options.splice(w,1),I=this.items[w].parentNode,I&&I.removeChild(this.items[w]),this.items.splice(w,1),O.each(this.options,function(C,h){h.idx=C,this.items[C].idx=C},this)},this),this.setPlaceholder(),this.config.pagination)&&this.paginate()},F.prototype.removeAll=function(){this.clear(!0),O.each(this.el.options,function(N,w){this.el.remove(w)},this),O.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},F.prototype.search=function(N,w){var f,_,I,C,h;if(!this.navigating)return f=!1,N||(N=this.input.value,f=!0,this.removeMessage(),O.truncate(this.tree)),_=[],I=document.createDocumentFragment(),0<(N=N.trim().toLowerCase()).length?(C=w?O.startsWith:O.includes,O.each(this.options,function(l,c){var n,s,i,o,a=this.items[c.idx];C(c.textContent.trim().toLowerCase(),N)&&!c.disabled?(_.push({text:c.textContent,value:c.value}),f&&(S(a,I,this.customOption),O.removeClass(a,"excluded"),!this.customOption)&&(n=N,i=(c=c).textContent,n=new RegExp(n,"ig"),o=n.exec(i))&&(c.innerHTML="",(s=document.createElement("span")).classList.add("selectr-match"),s.textContent=o[0],c.appendChild(document.createTextNode(i.substring(0,o.index))),c.appendChild(s),c.appendChild(document.createTextNode(i.substring(n.lastIndex))))):f&&O.addClass(a,"excluded")},this),f&&(I.childElementCount?(w=this.items[this.navIndex],h=I.querySelector(".selectr-option:not(.excluded)"),this.noResults=!1,O.removeClass(w,"active"),this.navIndex=h.idx,O.addClass(h,"active")):this.config.taggable||(this.noResults=!0,this.setMessage(this.config.messages.noResults)),this.tree.appendChild(I))):M.call(this),_},F.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},F.prototype.open=function(){var N=this;if(!this.options.length)return!1;this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(O.addClass(this.container,"native-open"),this.config.data&&O.each(this.options,function(w,f){this.el.add(f)},this)):(O.addClass(this.container,"open"),M.call(this),this.invert(),this.tree.scrollTop=0,O.removeClass(this.container,"notice"),this.selected.setAttribute("aria-expanded",!0),this.tree.setAttribute("aria-hidden",!1),this.tree.setAttribute("aria-expanded",!0),this.config.searchable&&!this.config.taggable&&setTimeout(function(){N.input.focus(),N.input.tabIndex=0},10))},F.prototype.close=function(){var N;this.opened&&this.emit("selectr.close"),this.opened=!1,this.navigating=!1,this.mobileDevice||this.config.nativeDropdown?O.removeClass(this.container,"native-open"):(N=O.hasClass(this.container,"notice"),this.config.searchable&&!N&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),N&&(O.removeClass(this.container,"notice"),this.notice.textContent=""),O.removeClass(this.container,"open"),O.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),O.truncate(this.tree),X.call(this))},F.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&O.each(this.tags,function(N,w){w.lastElementChild.tabIndex=0}),O.removeClass(this.container,"selectr-disabled")},F.prototype.disable=function(N){N||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&O.each(this.tags,function(w,f){f.lastElementChild.tabIndex=-1}),this.disabled=!0,O.addClass(this.container,"selectr-disabled")},F.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),O.each(this.defaultSelected,function(N,w){this.select(w)},this),this.emit("selectr.reset"))},F.prototype.clear=function(N,w){var f;this.el.multiple?this.selectedIndexes.length&&(f=this.selectedIndexes.slice(),w?this.deselect(f.slice(-1)[0]):O.each(f,function(_,I){this.deselect(I)},this)):-1<this.selectedIndex&&this.deselect(this.selectedIndex,N),this.emit("selectr.clear")},F.prototype.serialise=function(N){var w=[];return O.each(this.options,function(f,_){var I={value:_.value,text:_.textContent};_.selected&&(I.selected=!0),_.disabled&&(I.disabled=!0),w[f]=I}),N?JSON.stringify(w):w},F.prototype.serialize=function(N){return this.serialise(N)},F.prototype.setPlaceholder=function(N){N=N||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(N=this.config.messages.noOptions),this.placeEl.innerHTML=N},F.prototype.paginate=function(){var N;if(this.items.length)return(N=this).pages=this.items.map(function(w,f){return f%N.config.pagination==0?N.items.slice(f,f+N.config.pagination):null}).filter(function(w){return w}),this.pages},F.prototype.setMessage=function(N,w){w&&this.close(),O.addClass(this.container,"notice"),this.notice.textContent=N},F.prototype.removeMessage=function(){O.removeClass(this.container,"notice"),this.notice.innerHTML=""},F.prototype.invert=function(){var N=O.rect(this.selected),w=this.tree.parentNode.offsetHeight,f=window.innerHeight;N.top+N.height+w>f?(O.addClass(this.container,"inverted"),this.isInverted=!0):(O.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=O.rect(this.tree)},F.prototype.getOptionByIndex=function(N){return this.options[N]},F.prototype.getOptionByValue=function(N){for(var w=!1,f=0,_=this.options.length;f<_;f++)if(this.options[f].value.trim()===N.toString().trim()){w=this.options[f];break}return w},ae.exports=F},4188:function(ae,m,O){O.d(m,{EX:function(){return S},WF:function(){return M},oW:function(){return K},qD:function(){return U}});var U=document.body,S=10485760,M=2e4,K=2147483648},2602:function(ae,m,O){O.d(m,{w:function(){return S}});var U=O(9791);function S(M,K,j){var X,F=3<arguments.length&&arguments[3]!==void 0&&arguments[3],N=typeof(f=M).getRootNode=="function"?f.getRootNode():window,w={},f=M.getBoundingClientRect(),_=K.getBoundingClientRect(),I=document.createElement("div");function C(){if(I&&I.parentNode){for(var l in I.parentNode.removeChild(I),w)c=l,Object.prototype.hasOwnProperty.call(w,c)&&((c=w[l])&&(0,U.removeEventListener)(N,l,c),delete w[l]);typeof j=="function"&&j(M)}var c}function h(l){(l=l.target)===I||(0,U.isChildOf)(l,I)||C()}return I.className="jsoneditor-anchor",I.style.position="absolute",I.style.left=f.left-_.left+"px",I.style.top=f.top-_.top+"px",I.style.width=f.width-2+"px",I.style.height=f.height-2+"px",I.style.boxSizing="border-box",K.appendChild(I),w.mousedown=(0,U.addEventListener)(N,"mousedown",h),w.mousewheel=(0,U.addEventListener)(N,"mousewheel",h),F&&(X=null,I.onmouseover=function(){clearTimeout(X),X=null},I.onmouseout=function(){X=X||setTimeout(C,200)}),I.destroy=C,I}},7923:function(ae){ae.exports="data:application/javascript;base64,Im5vIHVzZSBzdHJpY3QiOwohKGZ1bmN0aW9uKHdpbmRvdykgewppZiAodHlwZW9mIHdpbmRvdy53aW5kb3cgIT0gInVuZGVmaW5lZCIgJiYgd2luZG93LmRvY3VtZW50KQogICAgcmV0dXJuOwppZiAod2luZG93LnJlcXVpcmUgJiYgd2luZG93LmRlZmluZSkKICAgIHJldHVybjsKCmlmICghd2luZG93LmNvbnNvbGUpIHsKICAgIHdpbmRvdy5jb25zb2xlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG1zZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApOwogICAgICAgIHBvc3RNZXNzYWdlKHt0eXBlOiAibG9nIiwgZGF0YTogbXNnc30pOwogICAgfTsKICAgIHdpbmRvdy5jb25zb2xlLmVycm9yID0KICAgIHdpbmRvdy5jb25zb2xlLndhcm4gPSAKICAgIHdpbmRvdy5jb25zb2xlLmxvZyA9CiAgICB3aW5kb3cuY29uc29sZS50cmFjZSA9IHdpbmRvdy5jb25zb2xlOwp9CndpbmRvdy53aW5kb3cgPSB3aW5kb3c7CndpbmRvdy5hY2UgPSB3aW5kb3c7Cgp3aW5kb3cub25lcnJvciA9IGZ1bmN0aW9uKG1lc3NhZ2UsIGZpbGUsIGxpbmUsIGNvbCwgZXJyKSB7CiAgICBwb3N0TWVzc2FnZSh7dHlwZTogImVycm9yIiwgZGF0YTogewogICAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsCiAgICAgICAgZGF0YTogZXJyICYmIGVyci5kYXRhLAogICAgICAgIGZpbGU6IGZpbGUsCiAgICAgICAgbGluZTogbGluZSwgCiAgICAgICAgY29sOiBjb2wsCiAgICAgICAgc3RhY2s6IGVyciAmJiBlcnIuc3RhY2sKICAgIH19KTsKfTsKCndpbmRvdy5ub3JtYWxpemVNb2R1bGUgPSBmdW5jdGlvbihwYXJlbnRJZCwgbW9kdWxlTmFtZSkgewogICAgLy8gbm9ybWFsaXplIHBsdWdpbiByZXF1aXJlcwogICAgaWYgKG1vZHVsZU5hbWUuaW5kZXhPZigiISIpICE9PSAtMSkgewogICAgICAgIHZhciBjaHVua3MgPSBtb2R1bGVOYW1lLnNwbGl0KCIhIik7CiAgICAgICAgcmV0dXJuIHdpbmRvdy5ub3JtYWxpemVNb2R1bGUocGFyZW50SWQsIGNodW5rc1swXSkgKyAiISIgKyB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBjaHVua3NbMV0pOwogICAgfQogICAgLy8gbm9ybWFsaXplIHJlbGF0aXZlIHJlcXVpcmVzCiAgICBpZiAobW9kdWxlTmFtZS5jaGFyQXQoMCkgPT0gIi4iKSB7CiAgICAgICAgdmFyIGJhc2UgPSBwYXJlbnRJZC5zcGxpdCgiLyIpLnNsaWNlKDAsIC0xKS5qb2luKCIvIik7CiAgICAgICAgbW9kdWxlTmFtZSA9IChiYXNlID8gYmFzZSArICIvIiA6ICIiKSArIG1vZHVsZU5hbWU7CiAgICAgICAgCiAgICAgICAgd2hpbGUgKG1vZHVsZU5hbWUuaW5kZXhPZigiLiIpICE9PSAtMSAmJiBwcmV2aW91cyAhPSBtb2R1bGVOYW1lKSB7CiAgICAgICAgICAgIHZhciBwcmV2aW91cyA9IG1vZHVsZU5hbWU7CiAgICAgICAgICAgIG1vZHVsZU5hbWUgPSBtb2R1bGVOYW1lLnJlcGxhY2UoL15cLlwvLywgIiIpLnJlcGxhY2UoL1wvXC5cLy8sICIvIikucmVwbGFjZSgvW15cL10rXC9cLlwuXC8vLCAiIik7CiAgICAgICAgfQogICAgfQogICAgCiAgICByZXR1cm4gbW9kdWxlTmFtZTsKfTsKCndpbmRvdy5yZXF1aXJlID0gZnVuY3Rpb24gcmVxdWlyZShwYXJlbnRJZCwgaWQpIHsKICAgIGlmICghaWQpIHsKICAgICAgICBpZCA9IHBhcmVudElkOwogICAgICAgIHBhcmVudElkID0gbnVsbDsKICAgIH0KICAgIGlmICghaWQuY2hhckF0KQogICAgICAgIHRocm93IG5ldyBFcnJvcigid29ya2VyLmpzIHJlcXVpcmUoKSBhY2NlcHRzIG9ubHkgKHBhcmVudElkLCBpZCkgYXMgYXJndW1lbnRzIik7CgogICAgaWQgPSB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBpZCk7CgogICAgdmFyIG1vZHVsZSA9IHdpbmRvdy5yZXF1aXJlLm1vZHVsZXNbaWRdOwogICAgaWYgKG1vZHVsZSkgewogICAgICAgIGlmICghbW9kdWxlLmluaXRpYWxpemVkKSB7CiAgICAgICAgICAgIG1vZHVsZS5pbml0aWFsaXplZCA9IHRydWU7CiAgICAgICAgICAgIG1vZHVsZS5leHBvcnRzID0gbW9kdWxlLmZhY3RvcnkoKS5leHBvcnRzOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbW9kdWxlLmV4cG9ydHM7CiAgICB9CiAgIAogICAgaWYgKCF3aW5kb3cucmVxdWlyZS50bG5zKQogICAgICAgIHJldHVybiBjb25zb2xlLmxvZygidW5hYmxlIHRvIGxvYWQgIiArIGlkKTsKICAgIAogICAgdmFyIHBhdGggPSByZXNvbHZlTW9kdWxlSWQoaWQsIHdpbmRvdy5yZXF1aXJlLnRsbnMpOwogICAgaWYgKHBhdGguc2xpY2UoLTMpICE9ICIuanMiKSBwYXRoICs9ICIuanMiOwogICAgCiAgICB3aW5kb3cucmVxdWlyZS5pZCA9IGlkOwogICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7fTsgLy8gcHJldmVudCBpbmZpbml0ZSBsb29wIG9uIGJyb2tlbiBtb2R1bGVzCiAgICBpbXBvcnRTY3JpcHRzKHBhdGgpOwogICAgcmV0dXJuIHdpbmRvdy5yZXF1aXJlKHBhcmVudElkLCBpZCk7Cn07CmZ1bmN0aW9uIHJlc29sdmVNb2R1bGVJZChpZCwgcGF0aHMpIHsKICAgIHZhciB0ZXN0UGF0aCA9IGlkLCB0YWlsID0gIiI7CiAgICB3aGlsZSAodGVzdFBhdGgpIHsKICAgICAgICB2YXIgYWxpYXMgPSBwYXRoc1t0ZXN0UGF0aF07CiAgICAgICAgaWYgKHR5cGVvZiBhbGlhcyA9PSAic3RyaW5nIikgewogICAgICAgICAgICByZXR1cm4gYWxpYXMgKyB0YWlsOwogICAgICAgIH0gZWxzZSBpZiAoYWxpYXMpIHsKICAgICAgICAgICAgcmV0dXJuICBhbGlhcy5sb2NhdGlvbi5yZXBsYWNlKC9cLyokLywgIi8iKSArICh0YWlsIHx8IGFsaWFzLm1haW4gfHwgYWxpYXMubmFtZSk7CiAgICAgICAgfSBlbHNlIGlmIChhbGlhcyA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KICAgICAgICB2YXIgaSA9IHRlc3RQYXRoLmxhc3RJbmRleE9mKCIvIik7CiAgICAgICAgaWYgKGkgPT09IC0xKSBicmVhazsKICAgICAgICB0YWlsID0gdGVzdFBhdGguc3Vic3RyKGkpICsgdGFpbDsKICAgICAgICB0ZXN0UGF0aCA9IHRlc3RQYXRoLnNsaWNlKDAsIGkpOwogICAgfQogICAgcmV0dXJuIGlkOwp9CndpbmRvdy5yZXF1aXJlLm1vZHVsZXMgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9OwoKd2luZG93LmRlZmluZSA9IGZ1bmN0aW9uKGlkLCBkZXBzLCBmYWN0b3J5KSB7CiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAyKSB7CiAgICAgICAgZmFjdG9yeSA9IGRlcHM7CiAgICAgICAgaWYgKHR5cGVvZiBpZCAhPSAic3RyaW5nIikgewogICAgICAgICAgICBkZXBzID0gaWQ7CiAgICAgICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICAgICAgfQogICAgfSBlbHNlIGlmIChhcmd1bWVudHMubGVuZ3RoID09IDEpIHsKICAgICAgICBmYWN0b3J5ID0gaWQ7CiAgICAgICAgZGVwcyA9IFtdOwogICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICB9CiAgICAKICAgIGlmICh0eXBlb2YgZmFjdG9yeSAhPSAiZnVuY3Rpb24iKSB7CiAgICAgICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7CiAgICAgICAgICAgIGV4cG9ydHM6IGZhY3RvcnksCiAgICAgICAgICAgIGluaXRpYWxpemVkOiB0cnVlCiAgICAgICAgfTsKICAgICAgICByZXR1cm47CiAgICB9CgogICAgaWYgKCFkZXBzLmxlbmd0aCkKICAgICAgICAvLyBJZiB0aGVyZSBpcyBubyBkZXBlbmRlbmNpZXMsIHdlIGluamVjdCAicmVxdWlyZSIsICJleHBvcnRzIiBhbmQKICAgICAgICAvLyAibW9kdWxlIiBhcyBkZXBlbmRlbmNpZXMsIHRvIHByb3ZpZGUgQ29tbW9uSlMgY29tcGF0aWJpbGl0eS4KICAgICAgICBkZXBzID0gWyJyZXF1aXJlIiwgImV4cG9ydHMiLCAibW9kdWxlIl07CgogICAgdmFyIHJlcSA9IGZ1bmN0aW9uKGNoaWxkSWQpIHsKICAgICAgICByZXR1cm4gd2luZG93LnJlcXVpcmUoaWQsIGNoaWxkSWQpOwogICAgfTsKCiAgICB3aW5kb3cucmVxdWlyZS5tb2R1bGVzW2lkXSA9IHsKICAgICAgICBleHBvcnRzOiB7fSwKICAgICAgICBmYWN0b3J5OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdmFyIG1vZHVsZSA9IHRoaXM7CiAgICAgICAgICAgIHZhciByZXR1cm5FeHBvcnRzID0gZmFjdG9yeS5hcHBseSh0aGlzLCBkZXBzLnNsaWNlKDAsIGZhY3RvcnkubGVuZ3RoKS5tYXAoZnVuY3Rpb24oZGVwKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKGRlcCkgewogICAgICAgICAgICAgICAgICAgIC8vIEJlY2F1c2UgInJlcXVpcmUiLCAiZXhwb3J0cyIgYW5kICJtb2R1bGUiIGFyZW4ndCBhY3R1YWwKICAgICAgICAgICAgICAgICAgICAvLyBkZXBlbmRlbmNpZXMsIHdlIG11c3QgaGFuZGxlIHRoZW0gc2VwZXJhdGVseS4KICAgICAgICAgICAgICAgICAgICBjYXNlICJyZXF1aXJlIjogcmV0dXJuIHJlcTsKICAgICAgICAgICAgICAgICAgICBjYXNlICJleHBvcnRzIjogcmV0dXJuIG1vZHVsZS5leHBvcnRzOwogICAgICAgICAgICAgICAgICAgIGNhc2UgIm1vZHVsZSI6ICByZXR1cm4gbW9kdWxlOwogICAgICAgICAgICAgICAgICAgIC8vIEJ1dCBmb3IgYWxsIG90aGVyIGRlcGVuZGVuY2llcywgd2UgY2FuIGp1c3QgZ28gYWhlYWQgYW5kCiAgICAgICAgICAgICAgICAgICAgLy8gcmVxdWlyZSB0aGVtLgogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICAgICAgICByZXR1cm4gcmVxKGRlcCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgaWYgKHJldHVybkV4cG9ydHMpCiAgICAgICAgICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IHJldHVybkV4cG9ydHM7CiAgICAgICAgICAgIHJldHVybiBtb2R1bGU7CiAgICAgICAgfQogICAgfTsKfTsKd2luZG93LmRlZmluZS5hbWQgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9Owp3aW5kb3cuaW5pdEJhc2VVcmxzICA9IGZ1bmN0aW9uIGluaXRCYXNlVXJscyh0b3BMZXZlbE5hbWVzcGFjZXMpIHsKICAgIGZvciAodmFyIGkgaW4gdG9wTGV2ZWxOYW1lc3BhY2VzKQogICAgICAgIHRoaXMucmVxdWlyZS50bG5zW2ldID0gdG9wTGV2ZWxOYW1lc3BhY2VzW2ldOwp9OwoKd2luZG93LmluaXRTZW5kZXIgPSBmdW5jdGlvbiBpbml0U2VuZGVyKCkgewoKICAgIHZhciBFdmVudEVtaXR0ZXIgPSB3aW5kb3cucmVxdWlyZSgiYWNlL2xpYi9ldmVudF9lbWl0dGVyIikuRXZlbnRFbWl0dGVyOwogICAgdmFyIG9vcCA9IHdpbmRvdy5yZXF1aXJlKCJhY2UvbGliL29vcCIpOwogICAgCiAgICB2YXIgU2VuZGVyID0gZnVuY3Rpb24oKSB7fTsKICAgIAogICAgKGZ1bmN0aW9uKCkgewogICAgICAgIAogICAgICAgIG9vcC5pbXBsZW1lbnQodGhpcywgRXZlbnRFbWl0dGVyKTsKICAgICAgICAgICAgICAgIAogICAgICAgIHRoaXMuY2FsbGJhY2sgPSBmdW5jdGlvbihkYXRhLCBjYWxsYmFja0lkKSB7CiAgICAgICAgICAgIHBvc3RNZXNzYWdlKHsKICAgICAgICAgICAgICAgIHR5cGU6ICJjYWxsIiwKICAgICAgICAgICAgICAgIGlkOiBjYWxsYmFja0lkLAogICAgICAgICAgICAgICAgZGF0YTogZGF0YQogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgCiAgICAgICAgdGhpcy5lbWl0ID0gZnVuY3Rpb24obmFtZSwgZGF0YSkgewogICAgICAgICAgICBwb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICB0eXBlOiAiZXZlbnQiLAogICAgICAgICAgICAgICAgbmFtZTogbmFtZSwKICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICAKICAgIH0pLmNhbGwoU2VuZGVyLnByb3RvdHlwZSk7CiAgICAKICAgIHJldHVybiBuZXcgU2VuZGVyKCk7Cn07Cgp2YXIgbWFpbiA9IHdpbmRvdy5tYWluID0gbnVsbDsKdmFyIHNlbmRlciA9IHdpbmRvdy5zZW5kZXIgPSBudWxsOwoKd2luZG93Lm9ubWVzc2FnZSA9IGZ1bmN0aW9uKGUpIHsKICAgIHZhciBtc2cgPSBlLmRhdGE7CiAgICBpZiAobXNnLmV2ZW50ICYmIHNlbmRlcikgewogICAgICAgIHNlbmRlci5fc2lnbmFsKG1zZy5ldmVudCwgbXNnLmRhdGEpOwogICAgfQogICAgZWxzZSBpZiAobXNnLmNvbW1hbmQpIHsKICAgICAgICBpZiAobWFpblttc2cuY29tbWFuZF0pCiAgICAgICAgICAgIG1haW5bbXNnLmNvbW1hbmRdLmFwcGx5KG1haW4sIG1zZy5hcmdzKTsKICAgICAgICBlbHNlIGlmICh3aW5kb3dbbXNnLmNvbW1hbmRdKQogICAgICAgICAgICB3aW5kb3dbbXNnLmNvbW1hbmRdLmFwcGx5KHdpbmRvdywgbXNnLmFyZ3MpOwogICAgICAgIGVsc2UKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJVbmtub3duIGNvbW1hbmQ6IiArIG1zZy5jb21tYW5kKTsKICAgIH0KICAgIGVsc2UgaWYgKG1zZy5pbml0KSB7CiAgICAgICAgd2luZG93LmluaXRCYXNlVXJscyhtc2cudGxucyk7CiAgICAgICAgc2VuZGVyID0gd2luZG93LnNlbmRlciA9IHdpbmRvdy5pbml0U2VuZGVyKCk7CiAgICAgICAgdmFyIGNsYXp6ID0gdGhpcy5yZXF1aXJlKG1zZy5tb2R1bGUpW21zZy5jbGFzc25hbWVdOwogICAgICAgIG1haW4gPSB3aW5kb3cubWFpbiA9IG5ldyBjbGF6eihzZW5kZXIpOwogICAgfQp9Owp9KSh0aGlzKTsKCmFjZS5kZWZpbmUoImFjZS9saWIvb29wIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CmV4cG9ydHMuaW5oZXJpdHMgPSBmdW5jdGlvbiAoY3Rvciwgc3VwZXJDdG9yKSB7CiAgICBjdG9yLnN1cGVyXyA9IHN1cGVyQ3RvcjsKICAgIGN0b3IucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShzdXBlckN0b3IucHJvdG90eXBlLCB7CiAgICAgICAgY29uc3RydWN0b3I6IHsKICAgICAgICAgICAgdmFsdWU6IGN0b3IsCiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLAogICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSwKICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgfQogICAgfSk7Cn07CmV4cG9ydHMubWl4aW4gPSBmdW5jdGlvbiAob2JqLCBtaXhpbikgewogICAgZm9yICh2YXIga2V5IGluIG1peGluKSB7CiAgICAgICAgb2JqW2tleV0gPSBtaXhpbltrZXldOwogICAgfQogICAgcmV0dXJuIG9iajsKfTsKZXhwb3J0cy5pbXBsZW1lbnQgPSBmdW5jdGlvbiAocHJvdG8sIG1peGluKSB7CiAgICBleHBvcnRzLm1peGluKHByb3RvLCBtaXhpbik7Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9hcHBseV9kZWx0YSIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwpmdW5jdGlvbiB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsIGVycm9yVGV4dCkgewogICAgY29uc29sZS5sb2coIkludmFsaWQgRGVsdGE6IiwgZGVsdGEpOwogICAgdGhyb3cgIkludmFsaWQgRGVsdGE6ICIgKyBlcnJvclRleHQ7Cn0KZnVuY3Rpb24gcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBwb3NpdGlvbikgewogICAgcmV0dXJuIHBvc2l0aW9uLnJvdyA+PSAwICYmIHBvc2l0aW9uLnJvdyA8IGRvY0xpbmVzLmxlbmd0aCAmJgogICAgICAgIHBvc2l0aW9uLmNvbHVtbiA+PSAwICYmIHBvc2l0aW9uLmNvbHVtbiA8PSBkb2NMaW5lc1twb3NpdGlvbi5yb3ddLmxlbmd0aDsKfQpmdW5jdGlvbiB2YWxpZGF0ZURlbHRhKGRvY0xpbmVzLCBkZWx0YSkgewogICAgaWYgKGRlbHRhLmFjdGlvbiAhPSAiaW5zZXJ0IiAmJiBkZWx0YS5hY3Rpb24gIT0gInJlbW92ZSIpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuYWN0aW9uIG11c3QgYmUgJ2luc2VydCcgb3IgJ3JlbW92ZSciKTsKICAgIGlmICghKGRlbHRhLmxpbmVzIGluc3RhbmNlb2YgQXJyYXkpKQogICAgICAgIHRocm93RGVsdGFFcnJvcihkZWx0YSwgImRlbHRhLmxpbmVzIG11c3QgYmUgYW4gQXJyYXkiKTsKICAgIGlmICghZGVsdGEuc3RhcnQgfHwgIWRlbHRhLmVuZCkKICAgICAgICB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsICJkZWx0YS5zdGFydC9lbmQgbXVzdCBiZSBhbiBwcmVzZW50Iik7CiAgICB2YXIgc3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIGlmICghcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBkZWx0YS5zdGFydCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuc3RhcnQgbXVzdCBiZSBjb250YWluZWQgaW4gZG9jdW1lbnQiKTsKICAgIHZhciBlbmQgPSBkZWx0YS5lbmQ7CiAgICBpZiAoZGVsdGEuYWN0aW9uID09ICJyZW1vdmUiICYmICFwb3NpdGlvbkluRG9jdW1lbnQoZG9jTGluZXMsIGVuZCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuZW5kIG11c3QgY29udGFpbmVkIGluIGRvY3VtZW50IGZvciAncmVtb3ZlJyBhY3Rpb25zIik7CiAgICB2YXIgbnVtUmFuZ2VSb3dzID0gZW5kLnJvdyAtIHN0YXJ0LnJvdzsKICAgIHZhciBudW1SYW5nZUxhc3RMaW5lQ2hhcnMgPSAoZW5kLmNvbHVtbiAtIChudW1SYW5nZVJvd3MgPT0gMCA/IHN0YXJ0LmNvbHVtbiA6IDApKTsKICAgIGlmIChudW1SYW5nZVJvd3MgIT0gZGVsdGEubGluZXMubGVuZ3RoIC0gMSB8fCBkZWx0YS5saW5lc1tudW1SYW5nZVJvd3NdLmxlbmd0aCAhPSBudW1SYW5nZUxhc3RMaW5lQ2hhcnMpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEucmFuZ2UgbXVzdCBtYXRjaCBkZWx0YSBsaW5lcyIpOwp9CmV4cG9ydHMuYXBwbHlEZWx0YSA9IGZ1bmN0aW9uIChkb2NMaW5lcywgZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7CiAgICB2YXIgc3RhcnRDb2x1bW4gPSBkZWx0YS5zdGFydC5jb2x1bW47CiAgICB2YXIgbGluZSA9IGRvY0xpbmVzW3Jvd10gfHwgIiI7CiAgICBzd2l0Y2ggKGRlbHRhLmFjdGlvbikgewogICAgICAgIGNhc2UgImluc2VydCI6CiAgICAgICAgICAgIHZhciBsaW5lcyA9IGRlbHRhLmxpbmVzOwogICAgICAgICAgICBpZiAobGluZXMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3ddID0gbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZGVsdGEubGluZXNbMF0gKyBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IFtyb3csIDFdLmNvbmNhdChkZWx0YS5saW5lcyk7CiAgICAgICAgICAgICAgICBkb2NMaW5lcy5zcGxpY2UuYXBwbHkoZG9jTGluZXMsIGFyZ3MpOwogICAgICAgICAgICAgICAgZG9jTGluZXNbcm93XSA9IGxpbmUuc3Vic3RyaW5nKDAsIHN0YXJ0Q29sdW1uKSArIGRvY0xpbmVzW3Jvd107CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3cgKyBkZWx0YS5saW5lcy5sZW5ndGggLSAxXSArPSBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAicmVtb3ZlIjoKICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IGRlbHRhLmVuZC5jb2x1bW47CiAgICAgICAgICAgIHZhciBlbmRSb3cgPSBkZWx0YS5lbmQucm93OwogICAgICAgICAgICBpZiAocm93ID09PSBlbmRSb3cpIHsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBsaW5lLnN1YnN0cmluZyhlbmRDb2x1bW4pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZG9jTGluZXMuc3BsaWNlKHJvdywgZW5kUm93IC0gcm93ICsgMSwgbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbZW5kUm93XS5zdWJzdHJpbmcoZW5kQ29sdW1uKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICB9Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9saWIvZXZlbnRfZW1pdHRlciIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwp2YXIgRXZlbnRFbWl0dGVyID0ge307CnZhciBzdG9wUHJvcGFnYXRpb24gPSBmdW5jdGlvbiAoKSB7IHRoaXMucHJvcGFnYXRpb25TdG9wcGVkID0gdHJ1ZTsgfTsKdmFyIHByZXZlbnREZWZhdWx0ID0gZnVuY3Rpb24gKCkgeyB0aGlzLmRlZmF1bHRQcmV2ZW50ZWQgPSB0cnVlOyB9OwpFdmVudEVtaXR0ZXIuX2VtaXQgPQogICAgRXZlbnRFbWl0dGVyLl9kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50TmFtZSwgZSkgewogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwgKHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB7fSk7CiAgICAgICAgdGhpcy5fZGVmYXVsdEhhbmRsZXJzIHx8ICh0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB7fSk7CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXSB8fCBbXTsKICAgICAgICB2YXIgZGVmYXVsdEhhbmRsZXIgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycy5sZW5ndGggJiYgIWRlZmF1bHRIYW5kbGVyKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKHR5cGVvZiBlICE9ICJvYmplY3QiIHx8ICFlKQogICAgICAgICAgICBlID0ge307CiAgICAgICAgaWYgKCFlLnR5cGUpCiAgICAgICAgICAgIGUudHlwZSA9IGV2ZW50TmFtZTsKICAgICAgICBpZiAoIWUuc3RvcFByb3BhZ2F0aW9uKQogICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbiA9IHN0b3BQcm9wYWdhdGlvbjsKICAgICAgICBpZiAoIWUucHJldmVudERlZmF1bHQpCiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQgPSBwcmV2ZW50RGVmYXVsdDsKICAgICAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3RlbmVycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBsaXN0ZW5lcnNbaV0oZSwgdGhpcyk7CiAgICAgICAgICAgIGlmIChlLnByb3BhZ2F0aW9uU3RvcHBlZCkKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBpZiAoZGVmYXVsdEhhbmRsZXIgJiYgIWUuZGVmYXVsdFByZXZlbnRlZCkKICAgICAgICAgICAgcmV0dXJuIGRlZmF1bHRIYW5kbGVyKGUsIHRoaXMpOwogICAgfTsKRXZlbnRFbWl0dGVyLl9zaWduYWwgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBlKSB7CiAgICB2YXIgbGlzdGVuZXJzID0gKHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge30pW2V2ZW50TmFtZV07CiAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICByZXR1cm47CiAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdGVuZXJzLmxlbmd0aDsgaSsrKQogICAgICAgIGxpc3RlbmVyc1tpXShlLCB0aGlzKTsKfTsKRXZlbnRFbWl0dGVyLm9uY2UgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIF9zZWxmID0gdGhpczsKICAgIHRoaXMub24oZXZlbnROYW1lLCBmdW5jdGlvbiBuZXdDYWxsYmFjaygpIHsKICAgICAgICBfc2VsZi5vZmYoZXZlbnROYW1lLCBuZXdDYWxsYmFjayk7CiAgICAgICAgY2FsbGJhY2suYXBwbHkobnVsbCwgYXJndW1lbnRzKTsKICAgIH0pOwogICAgaWYgKCFjYWxsYmFjaykgewogICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSkgewogICAgICAgICAgICBjYWxsYmFjayA9IHJlc29sdmU7CiAgICAgICAgfSk7CiAgICB9Cn07CkV2ZW50RW1pdHRlci5zZXREZWZhdWx0SGFuZGxlciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICB2YXIgaGFuZGxlcnMgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnM7CiAgICBpZiAoIWhhbmRsZXJzKQogICAgICAgIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzID0geyBfZGlzYWJsZWRfOiB7fSB9OwogICAgaWYgKGhhbmRsZXJzW2V2ZW50TmFtZV0pIHsKICAgICAgICB2YXIgb2xkID0gaGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICAgICAgaWYgKCFkaXNhYmxlZCkKICAgICAgICAgICAgaGFuZGxlcnMuX2Rpc2FibGVkX1tldmVudE5hbWVdID0gZGlzYWJsZWQgPSBbXTsKICAgICAgICBkaXNhYmxlZC5wdXNoKG9sZCk7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQogICAgaGFuZGxlcnNbZXZlbnROYW1lXSA9IGNhbGxiYWNrOwp9OwpFdmVudEVtaXR0ZXIucmVtb3ZlRGVmYXVsdEhhbmRsZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzOwogICAgaWYgKCFoYW5kbGVycykKICAgICAgICByZXR1cm47CiAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICBpZiAoaGFuZGxlcnNbZXZlbnROYW1lXSA9PSBjYWxsYmFjaykgewogICAgICAgIGlmIChkaXNhYmxlZCkKICAgICAgICAgICAgdGhpcy5zZXREZWZhdWx0SGFuZGxlcihldmVudE5hbWUsIGRpc2FibGVkLnBvcCgpKTsKICAgIH0KICAgIGVsc2UgaWYgKGRpc2FibGVkKSB7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQp9OwpFdmVudEVtaXR0ZXIub24gPQogICAgRXZlbnRFbWl0dGVyLmFkZEV2ZW50TGlzdGVuZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaywgY2FwdHVyaW5nKSB7CiAgICAgICAgdGhpcy5fZXZlbnRSZWdpc3RyeSA9IHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge307CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdID0gW107CiAgICAgICAgaWYgKGxpc3RlbmVycy5pbmRleE9mKGNhbGxiYWNrKSA9PSAtMSkKICAgICAgICAgICAgbGlzdGVuZXJzW2NhcHR1cmluZyA/ICJ1bnNoaWZ0IiA6ICJwdXNoIl0oY2FsbGJhY2spOwogICAgICAgIHJldHVybiBjYWxsYmFjazsKICAgIH07CkV2ZW50RW1pdHRlci5vZmYgPQogICAgRXZlbnRFbWl0dGVyLnJlbW92ZUxpc3RlbmVyID0KICAgICAgICBFdmVudEVtaXR0ZXIucmVtb3ZlRXZlbnRMaXN0ZW5lciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5IHx8IHt9OwogICAgICAgICAgICB2YXIgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdOwogICAgICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdmFyIGluZGV4ID0gbGlzdGVuZXJzLmluZGV4T2YoY2FsbGJhY2spOwogICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xKQogICAgICAgICAgICAgICAgbGlzdGVuZXJzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgfTsKRXZlbnRFbWl0dGVyLnJlbW92ZUFsbExpc3RlbmVycyA9IGZ1bmN0aW9uIChldmVudE5hbWUpIHsKICAgIGlmICghZXZlbnROYW1lKQogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZXZlbnRSZWdpc3RyeSkKICAgICAgICB0aGlzLl9ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZGVmYXVsdEhhbmRsZXJzKQogICAgICAgIHRoaXMuX2RlZmF1bHRIYW5kbGVyc1tldmVudE5hbWVdID0gdW5kZWZpbmVkOwp9OwpleHBvcnRzLkV2ZW50RW1pdHRlciA9IEV2ZW50RW1pdHRlcjsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL3JhbmdlIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBjb21wYXJlUG9pbnRzID0gZnVuY3Rpb24gKHAxLCBwMikgewogICAgcmV0dXJuIHAxLnJvdyAtIHAyLnJvdyB8fCBwMS5jb2x1bW4gLSBwMi5jb2x1bW47Cn07CnZhciBSYW5nZSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgIGZ1bmN0aW9uIFJhbmdlKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBlbmRDb2x1bW4pIHsKICAgICAgICB0aGlzLnN0YXJ0ID0gewogICAgICAgICAgICByb3c6IHN0YXJ0Um93LAogICAgICAgICAgICBjb2x1bW46IHN0YXJ0Q29sdW1uCiAgICAgICAgfTsKICAgICAgICB0aGlzLmVuZCA9IHsKICAgICAgICAgICAgcm93OiBlbmRSb3csCiAgICAgICAgICAgIGNvbHVtbjogZW5kQ29sdW1uCiAgICAgICAgfTsKICAgIH0KICAgIFJhbmdlLnByb3RvdHlwZS5pc0VxdWFsID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuc3RhcnQucm93ID09PSByYW5nZS5zdGFydC5yb3cgJiYKICAgICAgICAgICAgdGhpcy5lbmQucm93ID09PSByYW5nZS5lbmQucm93ICYmCiAgICAgICAgICAgIHRoaXMuc3RhcnQuY29sdW1uID09PSByYW5nZS5zdGFydC5jb2x1bW4gJiYKICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uID09PSByYW5nZS5lbmQuY29sdW1uOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS50b1N0cmluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gKCJSYW5nZTogWyIgKyB0aGlzLnN0YXJ0LnJvdyArICIvIiArIHRoaXMuc3RhcnQuY29sdW1uICsKICAgICAgICAgICAgIl0gLT4gWyIgKyB0aGlzLmVuZC5yb3cgKyAiLyIgKyB0aGlzLmVuZC5jb2x1bW4gKyAiXSIpOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb250YWlucyA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDA7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmVSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAsIGVuZCA9IHJhbmdlLmVuZCwgc3RhcnQgPSByYW5nZS5zdGFydDsKICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoZW5kLnJvdywgZW5kLmNvbHVtbik7CiAgICAgICAgaWYgKGNtcCA9PSAxKSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoY21wID09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKSB7CiAgICAgICAgICAgIHJldHVybiAtMjsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDQyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmVQb2ludCA9IGZ1bmN0aW9uIChwKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShwLnJvdywgcC5jb2x1bW4pOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb250YWluc1JhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLnN0YXJ0KSA9PSAwICYmIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLmVuZCkgPT0gMDsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaW50ZXJzZWN0cyA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmVSYW5nZShyYW5nZSk7CiAgICAgICAgcmV0dXJuIChjbXAgPT0gLTEgfHwgY21wID09IDAgfHwgY21wID09IDEpOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5pc0VuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW47CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmlzU3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4gdGhpcy5zdGFydC5yb3cgPT0gcm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09IGNvbHVtbjsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuc2V0U3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93LnJvdzsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93OwogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLnNldEVuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0eXBlb2Ygcm93ID09ICJvYmplY3QiKSB7CiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdy5yb3c7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPSByb3c7CiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmluc2lkZSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNFbmQocm93LCBjb2x1bW4pIHx8IHRoaXMuaXNTdGFydChyb3csIGNvbHVtbikpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaW5zaWRlU3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzRW5kKHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5pbnNpZGVFbmQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzU3RhcnQocm93LCBjb2x1bW4pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmUgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAoIXRoaXMuaXNNdWx0aUxpbmUoKSkgewogICAgICAgICAgICBpZiAocm93ID09PSB0aGlzLnN0YXJ0LnJvdykgewogICAgICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8IHRoaXMuc3RhcnQuY29sdW1uID8gLTEgOiAoY29sdW1uID4gdGhpcy5lbmQuY29sdW1uID8gMSA6IDApOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmIChyb3cgPCB0aGlzLnN0YXJ0LnJvdykKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIGlmIChyb3cgPiB0aGlzLmVuZC5yb3cpCiAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIGlmICh0aGlzLnN0YXJ0LnJvdyA9PT0gcm93KQogICAgICAgICAgICByZXR1cm4gY29sdW1uID49IHRoaXMuc3RhcnQuY29sdW1uID8gMCA6IC0xOwogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT09IHJvdykKICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8PSB0aGlzLmVuZC5jb2x1bW4gPyAwIDogMTsKICAgICAgICByZXR1cm4gMDsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29tcGFyZVN0YXJ0ID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CiAgICAgICAgfQogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb21wYXJlRW5kID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PSByb3cgJiYgdGhpcy5lbmQuY29sdW1uID09IGNvbHVtbikgewogICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29tcGFyZUluc2lkZSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CiAgICAgICAgfQogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jbGlwUm93cyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPiBsYXN0Um93KQogICAgICAgICAgICB2YXIgZW5kID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdykKICAgICAgICAgICAgdmFyIGVuZCA9IHsgcm93OiBmaXJzdFJvdywgY29sdW1uOiAwIH07CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID4gbGFzdFJvdykKICAgICAgICAgICAgdmFyIHN0YXJ0ID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA8IGZpcnN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7IHJvdzogZmlyc3RSb3csIGNvbHVtbjogMCB9OwogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHN0YXJ0IHx8IHRoaXMuc3RhcnQsIGVuZCB8fCB0aGlzLmVuZCk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmV4dGVuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIGlmIChjbXAgPT0gMCkKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7IHJvdzogcm93LCBjb2x1bW46IGNvbHVtbiB9OwogICAgICAgIGVsc2UKICAgICAgICAgICAgdmFyIGVuZCA9IHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH07CiAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHMoc3RhcnQgfHwgdGhpcy5zdGFydCwgZW5kIHx8IHRoaXMuZW5kKTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaXNFbXB0eSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gKHRoaXMuc3RhcnQucm93ID09PSB0aGlzLmVuZC5yb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT09IHRoaXMuZW5kLmNvbHVtbik7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmlzTXVsdGlMaW5lID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiAodGhpcy5zdGFydC5yb3cgIT09IHRoaXMuZW5kLnJvdyk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNsb25lID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHRoaXMuc3RhcnQsIHRoaXMuZW5kKTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29sbGFwc2VSb3dzID0gZnVuY3Rpb24gKCkgewogICAgICAgIGlmICh0aGlzLmVuZC5jb2x1bW4gPT0gMCkKICAgICAgICAgICAgcmV0dXJuIG5ldyBSYW5nZSh0aGlzLnN0YXJ0LnJvdywgMCwgTWF0aC5tYXgodGhpcy5zdGFydC5yb3csIHRoaXMuZW5kLnJvdyAtIDEpLCAwKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2UodGhpcy5zdGFydC5yb3csIDAsIHRoaXMuZW5kLnJvdywgMCk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLnRvU2NyZWVuUmFuZ2UgPSBmdW5jdGlvbiAoc2Vzc2lvbikgewogICAgICAgIHZhciBzY3JlZW5Qb3NTdGFydCA9IHNlc3Npb24uZG9jdW1lbnRUb1NjcmVlblBvc2l0aW9uKHRoaXMuc3RhcnQpOwogICAgICAgIHZhciBzY3JlZW5Qb3NFbmQgPSBzZXNzaW9uLmRvY3VtZW50VG9TY3JlZW5Qb3NpdGlvbih0aGlzLmVuZCk7CiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzY3JlZW5Qb3NTdGFydC5yb3csIHNjcmVlblBvc1N0YXJ0LmNvbHVtbiwgc2NyZWVuUG9zRW5kLnJvdywgc2NyZWVuUG9zRW5kLmNvbHVtbik7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLm1vdmVCeSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHRoaXMuc3RhcnQucm93ICs9IHJvdzsKICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiArPSBjb2x1bW47CiAgICAgICAgdGhpcy5lbmQucm93ICs9IHJvdzsKICAgICAgICB0aGlzLmVuZC5jb2x1bW4gKz0gY29sdW1uOwogICAgfTsKICAgIHJldHVybiBSYW5nZTsKfSgpKTsKUmFuZ2UuZnJvbVBvaW50cyA9IGZ1bmN0aW9uIChzdGFydCwgZW5kKSB7CiAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uLCBlbmQucm93LCBlbmQuY29sdW1uKTsKfTsKUmFuZ2UuY29tcGFyZVBvaW50cyA9IGNvbXBhcmVQb2ludHM7ClJhbmdlLmNvbXBhcmVQb2ludHMgPSBmdW5jdGlvbiAocDEsIHAyKSB7CiAgICByZXR1cm4gcDEucm93IC0gcDIucm93IHx8IHAxLmNvbHVtbiAtIHAyLmNvbHVtbjsKfTsKZXhwb3J0cy5SYW5nZSA9IFJhbmdlOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvYW5jaG9yIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBvb3AgPSByZXF1aXJlKCIuL2xpYi9vb3AiKTsKdmFyIEV2ZW50RW1pdHRlciA9IHJlcXVpcmUoIi4vbGliL2V2ZW50X2VtaXR0ZXIiKS5FdmVudEVtaXR0ZXI7CnZhciBBbmNob3IgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7CiAgICBmdW5jdGlvbiBBbmNob3IoZG9jLCByb3csIGNvbHVtbikgewogICAgICAgIHRoaXMuJG9uQ2hhbmdlID0gdGhpcy5vbkNoYW5nZS5iaW5kKHRoaXMpOwogICAgICAgIHRoaXMuYXR0YWNoKGRvYyk7CiAgICAgICAgaWYgKHR5cGVvZiBjb2x1bW4gPT0gInVuZGVmaW5lZCIpCiAgICAgICAgICAgIHRoaXMuc2V0UG9zaXRpb24ocm93LnJvdywgcm93LmNvbHVtbik7CiAgICAgICAgZWxzZQogICAgICAgICAgICB0aGlzLnNldFBvc2l0aW9uKHJvdywgY29sdW1uKTsKICAgIH0KICAgIEFuY2hvci5wcm90b3R5cGUuZ2V0UG9zaXRpb24gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQodGhpcy5yb3csIHRoaXMuY29sdW1uKTsKICAgIH07CiAgICBBbmNob3IucHJvdG90eXBlLmdldERvY3VtZW50ID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLmRvY3VtZW50OwogICAgfTsKICAgIEFuY2hvci5wcm90b3R5cGUub25DaGFuZ2UgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICBpZiAoZGVsdGEuc3RhcnQucm93ID09IGRlbHRhLmVuZC5yb3cgJiYgZGVsdGEuc3RhcnQucm93ICE9IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKGRlbHRhLnN0YXJ0LnJvdyA+IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIHBvaW50ID0gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHsgcm93OiB0aGlzLnJvdywgY29sdW1uOiB0aGlzLmNvbHVtbiB9LCB0aGlzLiRpbnNlcnRSaWdodCk7CiAgICAgICAgdGhpcy5zZXRQb3NpdGlvbihwb2ludC5yb3csIHBvaW50LmNvbHVtbiwgdHJ1ZSk7CiAgICB9OwogICAgQW5jaG9yLnByb3RvdHlwZS5zZXRQb3NpdGlvbiA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbiwgbm9DbGlwKSB7CiAgICAgICAgdmFyIHBvczsKICAgICAgICBpZiAobm9DbGlwKSB7CiAgICAgICAgICAgIHBvcyA9IHsKICAgICAgICAgICAgICAgIHJvdzogcm93LAogICAgICAgICAgICAgICAgY29sdW1uOiBjb2x1bW4KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBvcyA9IHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5yb3cgPT0gcG9zLnJvdyAmJiB0aGlzLmNvbHVtbiA9PSBwb3MuY29sdW1uKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIG9sZCA9IHsKICAgICAgICAgICAgcm93OiB0aGlzLnJvdywKICAgICAgICAgICAgY29sdW1uOiB0aGlzLmNvbHVtbgogICAgICAgIH07CiAgICAgICAgdGhpcy5yb3cgPSBwb3Mucm93OwogICAgICAgIHRoaXMuY29sdW1uID0gcG9zLmNvbHVtbjsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZSIsIHsKICAgICAgICAgICAgb2xkOiBvbGQsCiAgICAgICAgICAgIHZhbHVlOiBwb3MKICAgICAgICB9KTsKICAgIH07CiAgICBBbmNob3IucHJvdG90eXBlLmRldGFjaCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9mZigiY2hhbmdlIiwgdGhpcy4kb25DaGFuZ2UpOwogICAgfTsKICAgIEFuY2hvci5wcm90b3R5cGUuYXR0YWNoID0gZnVuY3Rpb24gKGRvYykgewogICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2MgfHwgdGhpcy5kb2N1bWVudDsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9uKCJjaGFuZ2UiLCB0aGlzLiRvbkNoYW5nZSk7CiAgICB9OwogICAgQW5jaG9yLnByb3RvdHlwZS4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBwb3MgPSB7fTsKICAgICAgICBpZiAocm93ID49IHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgcG9zLnJvdyA9IE1hdGgubWF4KDAsIHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA8IDApIHsKICAgICAgICAgICAgcG9zLnJvdyA9IDA7CiAgICAgICAgICAgIHBvcy5jb2x1bW4gPSAwOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcG9zLnJvdyA9IHJvdzsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IE1hdGgubWluKHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGgsIE1hdGgubWF4KDAsIGNvbHVtbikpOwogICAgICAgIH0KICAgICAgICBpZiAoY29sdW1uIDwgMCkKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IDA7CiAgICAgICAgcmV0dXJuIHBvczsKICAgIH07CiAgICByZXR1cm4gQW5jaG9yOwp9KCkpOwpBbmNob3IucHJvdG90eXBlLiRpbnNlcnRSaWdodCA9IGZhbHNlOwpvb3AuaW1wbGVtZW50KEFuY2hvci5wcm90b3R5cGUsIEV2ZW50RW1pdHRlcik7CmZ1bmN0aW9uICRwb2ludHNJbk9yZGVyKHBvaW50MSwgcG9pbnQyLCBlcXVhbFBvaW50c0luT3JkZXIpIHsKICAgIHZhciBiQ29sSXNBZnRlciA9IGVxdWFsUG9pbnRzSW5PcmRlciA/IHBvaW50MS5jb2x1bW4gPD0gcG9pbnQyLmNvbHVtbiA6IHBvaW50MS5jb2x1bW4gPCBwb2ludDIuY29sdW1uOwogICAgcmV0dXJuIChwb2ludDEucm93IDwgcG9pbnQyLnJvdykgfHwgKHBvaW50MS5yb3cgPT0gcG9pbnQyLnJvdyAmJiBiQ29sSXNBZnRlcik7Cn0KZnVuY3Rpb24gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHBvaW50LCBtb3ZlSWZFcXVhbCkgewogICAgdmFyIGRlbHRhSXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICB2YXIgZGVsdGFSb3dTaGlmdCA9IChkZWx0YUlzSW5zZXJ0ID8gMSA6IC0xKSAqIChkZWx0YS5lbmQucm93IC0gZGVsdGEuc3RhcnQucm93KTsKICAgIHZhciBkZWx0YUNvbFNoaWZ0ID0gKGRlbHRhSXNJbnNlcnQgPyAxIDogLTEpICogKGRlbHRhLmVuZC5jb2x1bW4gLSBkZWx0YS5zdGFydC5jb2x1bW4pOwogICAgdmFyIGRlbHRhU3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIHZhciBkZWx0YUVuZCA9IGRlbHRhSXNJbnNlcnQgPyBkZWx0YVN0YXJ0IDogZGVsdGEuZW5kOyAvLyBDb2xsYXBzZSBpbnNlcnQgcmFuZ2UuCiAgICBpZiAoJHBvaW50c0luT3JkZXIocG9pbnQsIGRlbHRhU3RhcnQsIG1vdmVJZkVxdWFsKSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHJvdzogcG9pbnQucm93LAogICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbgogICAgICAgIH07CiAgICB9CiAgICBpZiAoJHBvaW50c0luT3JkZXIoZGVsdGFFbmQsIHBvaW50LCAhbW92ZUlmRXF1YWwpKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgcm93OiBwb2ludC5yb3cgKyBkZWx0YVJvd1NoaWZ0LAogICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbiArIChwb2ludC5yb3cgPT0gZGVsdGFFbmQucm93ID8gZGVsdGFDb2xTaGlmdCA6IDApCiAgICAgICAgfTsKICAgIH0KICAgIHJldHVybiB7CiAgICAgICAgcm93OiBkZWx0YVN0YXJ0LnJvdywKICAgICAgICBjb2x1bW46IGRlbHRhU3RhcnQuY29sdW1uCiAgICB9Owp9CmV4cG9ydHMuQW5jaG9yID0gQW5jaG9yOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvZG9jdW1lbnQiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpeyJ1c2Ugc3RyaWN0IjsKdmFyIG9vcCA9IHJlcXVpcmUoIi4vbGliL29vcCIpOwp2YXIgYXBwbHlEZWx0YSA9IHJlcXVpcmUoIi4vYXBwbHlfZGVsdGEiKS5hcHBseURlbHRhOwp2YXIgRXZlbnRFbWl0dGVyID0gcmVxdWlyZSgiLi9saWIvZXZlbnRfZW1pdHRlciIpLkV2ZW50RW1pdHRlcjsKdmFyIFJhbmdlID0gcmVxdWlyZSgiLi9yYW5nZSIpLlJhbmdlOwp2YXIgQW5jaG9yID0gcmVxdWlyZSgiLi9hbmNob3IiKS5BbmNob3I7CnZhciBEb2N1bWVudCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgIGZ1bmN0aW9uIERvY3VtZW50KHRleHRPckxpbmVzKSB7CiAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgICAgIGlmICh0ZXh0T3JMaW5lcy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHRleHRPckxpbmVzKSkgewogICAgICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiAwLCBjb2x1bW46IDAgfSwgdGV4dE9yTGluZXMpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0T3JMaW5lcyk7CiAgICAgICAgfQogICAgfQogICAgRG9jdW1lbnQucHJvdG90eXBlLnNldFZhbHVlID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICB2YXIgbGVuID0gdGhpcy5nZXRMZW5ndGgoKSAtIDE7CiAgICAgICAgdGhpcy5yZW1vdmUobmV3IFJhbmdlKDAsIDAsIGxlbiwgdGhpcy5nZXRMaW5lKGxlbikubGVuZ3RoKSk7CiAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0IHx8ICIiKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0VmFsdWUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0QWxsTGluZXMoKS5qb2luKHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuY3JlYXRlQW5jaG9yID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgcmV0dXJuIG5ldyBBbmNob3IodGhpcywgcm93LCBjb2x1bW4pOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kZGV0ZWN0TmV3TGluZSA9IGZ1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgdmFyIG1hdGNoID0gdGV4dC5tYXRjaCgvXi4qPyhcclxufFxyfFxuKS9tKTsKICAgICAgICB0aGlzLiRhdXRvTmV3TGluZSA9IG1hdGNoID8gbWF0Y2hbMV0gOiAiXG4iOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlTmV3TGluZU1vZGUiKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0TmV3TGluZUNoYXJhY3RlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuJG5ld0xpbmVNb2RlKSB7CiAgICAgICAgICAgIGNhc2UgIndpbmRvd3MiOgogICAgICAgICAgICAgICAgcmV0dXJuICJcclxuIjsKICAgICAgICAgICAgY2FzZSAidW5peCI6CiAgICAgICAgICAgICAgICByZXR1cm4gIlxuIjsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiRhdXRvTmV3TGluZSB8fCAiXG4iOwogICAgICAgIH0KICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuc2V0TmV3TGluZU1vZGUgPSBmdW5jdGlvbiAobmV3TGluZU1vZGUpIHsKICAgICAgICBpZiAodGhpcy4kbmV3TGluZU1vZGUgPT09IG5ld0xpbmVNb2RlKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdGhpcy4kbmV3TGluZU1vZGUgPSBuZXdMaW5lTW9kZTsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZU5ld0xpbmVNb2RlIik7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmdldE5ld0xpbmVNb2RlID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLiRuZXdMaW5lTW9kZTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaXNOZXdMaW5lID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICByZXR1cm4gKHRleHQgPT0gIlxyXG4iIHx8IHRleHQgPT0gIlxyIiB8fCB0ZXh0ID09ICJcbiIpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lID0gZnVuY3Rpb24gKHJvdykgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lc1tyb3ddIHx8ICIiOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lcyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lcy5zbGljZShmaXJzdFJvdywgbGFzdFJvdyArIDEpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRBbGxMaW5lcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lcygwLCB0aGlzLmdldExlbmd0aCgpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0TGVuZ3RoID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lcy5sZW5ndGg7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmdldFRleHRSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHJldHVybiB0aGlzLmdldExpbmVzRm9yUmFuZ2UocmFuZ2UpLmpvaW4odGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lc0ZvclJhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgdmFyIGxpbmVzOwogICAgICAgIGlmIChyYW5nZS5zdGFydC5yb3cgPT09IHJhbmdlLmVuZC5yb3cpIHsKICAgICAgICAgICAgbGluZXMgPSBbdGhpcy5nZXRMaW5lKHJhbmdlLnN0YXJ0LnJvdykuc3Vic3RyaW5nKHJhbmdlLnN0YXJ0LmNvbHVtbiwgcmFuZ2UuZW5kLmNvbHVtbildOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgbGluZXMgPSB0aGlzLmdldExpbmVzKHJhbmdlLnN0YXJ0LnJvdywgcmFuZ2UuZW5kLnJvdyk7CiAgICAgICAgICAgIGxpbmVzWzBdID0gKGxpbmVzWzBdIHx8ICIiKS5zdWJzdHJpbmcocmFuZ2Uuc3RhcnQuY29sdW1uKTsKICAgICAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSAxOwogICAgICAgICAgICBpZiAocmFuZ2UuZW5kLnJvdyAtIHJhbmdlLnN0YXJ0LnJvdyA9PSBsKQogICAgICAgICAgICAgICAgbGluZXNbbF0gPSBsaW5lc1tsXS5zdWJzdHJpbmcoMCwgcmFuZ2UuZW5kLmNvbHVtbik7CiAgICAgICAgfQogICAgICAgIHJldHVybiBsaW5lczsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0TGluZXMgPSBmdW5jdGlvbiAocm93LCBsaW5lcykgewogICAgICAgIGNvbnNvbGUud2FybigiVXNlIG9mIGRvY3VtZW50Lmluc2VydExpbmVzIGlzIGRlcHJlY2F0ZWQuIFVzZSB0aGUgaW5zZXJ0RnVsbExpbmVzIG1ldGhvZCBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydEZ1bGxMaW5lcyhyb3csIGxpbmVzKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlTGluZXMgPSBmdW5jdGlvbiAoZmlyc3RSb3csIGxhc3RSb3cpIHsKICAgICAgICBjb25zb2xlLndhcm4oIlVzZSBvZiBkb2N1bWVudC5yZW1vdmVMaW5lcyBpcyBkZXByZWNhdGVkLiBVc2UgdGhlIHJlbW92ZUZ1bGxMaW5lcyBtZXRob2QgaW5zdGVhZC4iKTsKICAgICAgICByZXR1cm4gdGhpcy5yZW1vdmVGdWxsTGluZXMoZmlyc3RSb3csIGxhc3RSb3cpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5pbnNlcnROZXdMaW5lID0gZnVuY3Rpb24gKHBvc2l0aW9uKSB7CiAgICAgICAgY29uc29sZS53YXJuKCJVc2Ugb2YgZG9jdW1lbnQuaW5zZXJ0TmV3TGluZSBpcyBkZXByZWNhdGVkLiBVc2UgaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIFsnJywgJyddKSBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydE1lcmdlZExpbmVzKHBvc2l0aW9uLCBbIiIsICIiXSk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmluc2VydCA9IGZ1bmN0aW9uIChwb3NpdGlvbiwgdGV4dCkgewogICAgICAgIGlmICh0aGlzLmdldExlbmd0aCgpIDw9IDEpCiAgICAgICAgICAgIHRoaXMuJGRldGVjdE5ld0xpbmUodGV4dCk7CiAgICAgICAgcmV0dXJuIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIHRoaXMuJHNwbGl0KHRleHQpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0SW5MaW5lID0gZnVuY3Rpb24gKHBvc2l0aW9uLCB0ZXh0KSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5wb3MocG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4gKyB0ZXh0Lmxlbmd0aCk7CiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAogICAgICAgICAgICBlbmQ6IGVuZCwKICAgICAgICAgICAgYWN0aW9uOiAiaW5zZXJ0IiwKICAgICAgICAgICAgbGluZXM6IFt0ZXh0XQogICAgICAgIH0sIHRydWUpOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmNsaXBwZWRQb3MgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICB2YXIgbGVuZ3RoID0gdGhpcy5nZXRMZW5ndGgoKTsKICAgICAgICBpZiAocm93ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgcm93ID0gbGVuZ3RoOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChyb3cgPCAwKSB7CiAgICAgICAgICAgIHJvdyA9IDA7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA+PSBsZW5ndGgpIHsKICAgICAgICAgICAgcm93ID0gbGVuZ3RoIC0gMTsKICAgICAgICAgICAgY29sdW1uID0gdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICB2YXIgbGluZSA9IHRoaXMuZ2V0TGluZShyb3cpOwogICAgICAgIGlmIChjb2x1bW4gPT0gdW5kZWZpbmVkKQogICAgICAgICAgICBjb2x1bW4gPSBsaW5lLmxlbmd0aDsKICAgICAgICBjb2x1bW4gPSBNYXRoLm1pbihNYXRoLm1heChjb2x1bW4sIDApLCBsaW5lLmxlbmd0aCk7CiAgICAgICAgcmV0dXJuIHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH07CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmNsb25lUG9zID0gZnVuY3Rpb24gKHBvcykgewogICAgICAgIHJldHVybiB7IHJvdzogcG9zLnJvdywgY29sdW1uOiBwb3MuY29sdW1uIH07CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnBvcyA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB7IHJvdzogcm93LCBjb2x1bW46IGNvbHVtbiB9OwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kY2xpcFBvc2l0aW9uID0gZnVuY3Rpb24gKHBvc2l0aW9uKSB7CiAgICAgICAgdmFyIGxlbmd0aCA9IHRoaXMuZ2V0TGVuZ3RoKCk7CiAgICAgICAgaWYgKHBvc2l0aW9uLnJvdyA+PSBsZW5ndGgpIHsKICAgICAgICAgICAgcG9zaXRpb24ucm93ID0gTWF0aC5tYXgoMCwgbGVuZ3RoIC0gMSk7CiAgICAgICAgICAgIHBvc2l0aW9uLmNvbHVtbiA9IHRoaXMuZ2V0TGluZShsZW5ndGggLSAxKS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBwb3NpdGlvbi5yb3cgPSBNYXRoLm1heCgwLCBwb3NpdGlvbi5yb3cpOwogICAgICAgICAgICBwb3NpdGlvbi5jb2x1bW4gPSBNYXRoLm1pbihNYXRoLm1heChwb3NpdGlvbi5jb2x1bW4sIDApLCB0aGlzLmdldExpbmUocG9zaXRpb24ucm93KS5sZW5ndGgpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcG9zaXRpb247CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmluc2VydEZ1bGxMaW5lcyA9IGZ1bmN0aW9uIChyb3csIGxpbmVzKSB7CiAgICAgICAgcm93ID0gTWF0aC5taW4oTWF0aC5tYXgocm93LCAwKSwgdGhpcy5nZXRMZW5ndGgoKSk7CiAgICAgICAgdmFyIGNvbHVtbiA9IDA7CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgbGluZXMgPSBsaW5lcy5jb25jYXQoWyIiXSk7CiAgICAgICAgICAgIGNvbHVtbiA9IDA7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBsaW5lcyA9IFsiIl0uY29uY2F0KGxpbmVzKTsKICAgICAgICAgICAgcm93LS07CiAgICAgICAgICAgIGNvbHVtbiA9IHRoaXMuJGxpbmVzW3Jvd10ubGVuZ3RoOwogICAgICAgIH0KICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH0sIGxpbmVzKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0TWVyZ2VkTGluZXMgPSBmdW5jdGlvbiAocG9zaXRpb24sIGxpbmVzKSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gewogICAgICAgICAgICByb3c6IHN0YXJ0LnJvdyArIGxpbmVzLmxlbmd0aCAtIDEsCiAgICAgICAgICAgIGNvbHVtbjogKGxpbmVzLmxlbmd0aCA9PSAxID8gc3RhcnQuY29sdW1uIDogMCkgKyBsaW5lc1tsaW5lcy5sZW5ndGggLSAxXS5sZW5ndGgKICAgICAgICB9OwogICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKICAgICAgICAgICAgZW5kOiBlbmQsCiAgICAgICAgICAgIGFjdGlvbjogImluc2VydCIsCiAgICAgICAgICAgIGxpbmVzOiBsaW5lcwogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyYW5nZS5zdGFydC5yb3csIHJhbmdlLnN0YXJ0LmNvbHVtbik7CiAgICAgICAgdmFyIGVuZCA9IHRoaXMuY2xpcHBlZFBvcyhyYW5nZS5lbmQucm93LCByYW5nZS5lbmQuY29sdW1uKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHsgc3RhcnQ6IHN0YXJ0LCBlbmQ6IGVuZCB9KQogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlSW5MaW5lID0gZnVuY3Rpb24gKHJvdywgc3RhcnRDb2x1bW4sIGVuZENvbHVtbikgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyb3csIHN0YXJ0Q29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJvdywgZW5kQ29sdW1uKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHsgc3RhcnQ6IHN0YXJ0LCBlbmQ6IGVuZCB9KQogICAgICAgIH0sIHRydWUpOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlRnVsbExpbmVzID0gZnVuY3Rpb24gKGZpcnN0Um93LCBsYXN0Um93KSB7CiAgICAgICAgZmlyc3RSb3cgPSBNYXRoLm1pbihNYXRoLm1heCgwLCBmaXJzdFJvdyksIHRoaXMuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICBsYXN0Um93ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgbGFzdFJvdyksIHRoaXMuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICB2YXIgZGVsZXRlRmlyc3ROZXdMaW5lID0gbGFzdFJvdyA9PSB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiBmaXJzdFJvdyA+IDA7CiAgICAgICAgdmFyIGRlbGV0ZUxhc3ROZXdMaW5lID0gbGFzdFJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkgLSAxOwogICAgICAgIHZhciBzdGFydFJvdyA9IChkZWxldGVGaXJzdE5ld0xpbmUgPyBmaXJzdFJvdyAtIDEgOiBmaXJzdFJvdyk7CiAgICAgICAgdmFyIHN0YXJ0Q29sID0gKGRlbGV0ZUZpcnN0TmV3TGluZSA/IHRoaXMuZ2V0TGluZShzdGFydFJvdykubGVuZ3RoIDogMCk7CiAgICAgICAgdmFyIGVuZFJvdyA9IChkZWxldGVMYXN0TmV3TGluZSA/IGxhc3RSb3cgKyAxIDogbGFzdFJvdyk7CiAgICAgICAgdmFyIGVuZENvbCA9IChkZWxldGVMYXN0TmV3TGluZSA/IDAgOiB0aGlzLmdldExpbmUoZW5kUm93KS5sZW5ndGgpOwogICAgICAgIHZhciByYW5nZSA9IG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2wsIGVuZFJvdywgZW5kQ29sKTsKICAgICAgICB2YXIgZGVsZXRlZExpbmVzID0gdGhpcy4kbGluZXMuc2xpY2UoZmlyc3RSb3csIGxhc3RSb3cgKyAxKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogcmFuZ2Uuc3RhcnQsCiAgICAgICAgICAgIGVuZDogcmFuZ2UuZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHJhbmdlKQogICAgICAgIH0pOwogICAgICAgIHJldHVybiBkZWxldGVkTGluZXM7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJlbW92ZU5ld0xpbmUgPSBmdW5jdGlvbiAocm93KSB7CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkgLSAxICYmIHJvdyA+PSAwKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93LCB0aGlzLmdldExpbmUocm93KS5sZW5ndGgpLAogICAgICAgICAgICAgICAgZW5kOiB0aGlzLnBvcyhyb3cgKyAxLCAwKSwKICAgICAgICAgICAgICAgIGFjdGlvbjogInJlbW92ZSIsCiAgICAgICAgICAgICAgICBsaW5lczogWyIiLCAiIl0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5yZXBsYWNlID0gZnVuY3Rpb24gKHJhbmdlLCB0ZXh0KSB7CiAgICAgICAgaWYgKCEocmFuZ2UgaW5zdGFuY2VvZiBSYW5nZSkpCiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhyYW5nZS5zdGFydCwgcmFuZ2UuZW5kKTsKICAgICAgICBpZiAodGV4dC5sZW5ndGggPT09IDAgJiYgcmFuZ2UuaXNFbXB0eSgpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2Uuc3RhcnQ7CiAgICAgICAgaWYgKHRleHQgPT0gdGhpcy5nZXRUZXh0UmFuZ2UocmFuZ2UpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2UuZW5kOwogICAgICAgIHRoaXMucmVtb3ZlKHJhbmdlKTsKICAgICAgICB2YXIgZW5kOwogICAgICAgIGlmICh0ZXh0KSB7CiAgICAgICAgICAgIGVuZCA9IHRoaXMuaW5zZXJ0KHJhbmdlLnN0YXJ0LCB0ZXh0KTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGVuZCA9IHJhbmdlLnN0YXJ0OwogICAgICAgIH0KICAgICAgICByZXR1cm4gZW5kOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5hcHBseURlbHRhcyA9IGZ1bmN0aW9uIChkZWx0YXMpIHsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRlbHRhcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICB0aGlzLmFwcGx5RGVsdGEoZGVsdGFzW2ldKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJldmVydERlbHRhcyA9IGZ1bmN0aW9uIChkZWx0YXMpIHsKICAgICAgICBmb3IgKHZhciBpID0gZGVsdGFzLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7CiAgICAgICAgICAgIHRoaXMucmV2ZXJ0RGVsdGEoZGVsdGFzW2ldKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmFwcGx5RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgICAgICB2YXIgaXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICAgICAgaWYgKGlzSW5zZXJ0ID8gZGVsdGEubGluZXMubGVuZ3RoIDw9IDEgJiYgIWRlbHRhLmxpbmVzWzBdCiAgICAgICAgICAgIDogIVJhbmdlLmNvbXBhcmVQb2ludHMoZGVsdGEuc3RhcnQsIGRlbHRhLmVuZCkpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZiAoaXNJbnNlcnQgJiYgZGVsdGEubGluZXMubGVuZ3RoID4gMjAwMDApIHsKICAgICAgICAgICAgdGhpcy4kc3BsaXRBbmRhcHBseUxhcmdlRGVsdGEoZGVsdGEsIDIwMDAwKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGFwcGx5RGVsdGEodGhpcy4kbGluZXMsIGRlbHRhLCBkb05vdFZhbGlkYXRlKTsKICAgICAgICAgICAgdGhpcy5fc2lnbmFsKCJjaGFuZ2UiLCBkZWx0YSk7CiAgICAgICAgfQogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kc2FmZUFwcGx5RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICB2YXIgZG9jTGVuZ3RoID0gdGhpcy4kbGluZXMubGVuZ3RoOwogICAgICAgIGlmIChkZWx0YS5hY3Rpb24gPT0gInJlbW92ZSIgJiYgZGVsdGEuc3RhcnQucm93IDwgZG9jTGVuZ3RoICYmIGRlbHRhLmVuZC5yb3cgPCBkb2NMZW5ndGgKICAgICAgICAgICAgfHwgZGVsdGEuYWN0aW9uID09ICJpbnNlcnQiICYmIGRlbHRhLnN0YXJ0LnJvdyA8PSBkb2NMZW5ndGgpIHsKICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLiRzcGxpdEFuZGFwcGx5TGFyZ2VEZWx0YSA9IGZ1bmN0aW9uIChkZWx0YSwgTUFYKSB7CiAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7CiAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSBNQVggKyAxOwogICAgICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7CiAgICAgICAgdmFyIGNvbHVtbiA9IGRlbHRhLnN0YXJ0LmNvbHVtbjsKICAgICAgICBmb3IgKHZhciBmcm9tID0gMCwgdG8gPSAwOyBmcm9tIDwgbDsgZnJvbSA9IHRvKSB7CiAgICAgICAgICAgIHRvICs9IE1BWCAtIDE7CiAgICAgICAgICAgIHZhciBjaHVuayA9IGxpbmVzLnNsaWNlKGZyb20sIHRvKTsKICAgICAgICAgICAgY2h1bmsucHVzaCgiIik7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93ICsgZnJvbSwgY29sdW1uKSwKICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgdG8sIGNvbHVtbiA9IDApLAogICAgICAgICAgICAgICAgYWN0aW9uOiBkZWx0YS5hY3Rpb24sCiAgICAgICAgICAgICAgICBsaW5lczogY2h1bmsKICAgICAgICAgICAgfSwgdHJ1ZSk7CiAgICAgICAgfQogICAgICAgIGRlbHRhLmxpbmVzID0gbGluZXMuc2xpY2UoZnJvbSk7CiAgICAgICAgZGVsdGEuc3RhcnQucm93ID0gcm93ICsgZnJvbTsKICAgICAgICBkZWx0YS5zdGFydC5jb2x1bW4gPSBjb2x1bW47CiAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhLCB0cnVlKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmV2ZXJ0RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICB0aGlzLiRzYWZlQXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiB0aGlzLmNsb25lUG9zKGRlbHRhLnN0YXJ0KSwKICAgICAgICAgICAgZW5kOiB0aGlzLmNsb25lUG9zKGRlbHRhLmVuZCksCiAgICAgICAgICAgIGFjdGlvbjogKGRlbHRhLmFjdGlvbiA9PSAiaW5zZXJ0IiA/ICJyZW1vdmUiIDogImluc2VydCIpLAogICAgICAgICAgICBsaW5lczogZGVsdGEubGluZXMuc2xpY2UoKQogICAgICAgIH0pOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5pbmRleFRvUG9zaXRpb24gPSBmdW5jdGlvbiAoaW5kZXgsIHN0YXJ0Um93KSB7CiAgICAgICAgdmFyIGxpbmVzID0gdGhpcy4kbGluZXMgfHwgdGhpcy5nZXRBbGxMaW5lcygpOwogICAgICAgIHZhciBuZXdsaW5lTGVuZ3RoID0gdGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkubGVuZ3RoOwogICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdyB8fCAwLCBsID0gbGluZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgICAgIGluZGV4IC09IGxpbmVzW2ldLmxlbmd0aCArIG5ld2xpbmVMZW5ndGg7CiAgICAgICAgICAgIGlmIChpbmRleCA8IDApCiAgICAgICAgICAgICAgICByZXR1cm4geyByb3c6IGksIGNvbHVtbjogaW5kZXggKyBsaW5lc1tpXS5sZW5ndGggKyBuZXdsaW5lTGVuZ3RoIH07CiAgICAgICAgfQogICAgICAgIHJldHVybiB7IHJvdzogbCAtIDEsIGNvbHVtbjogaW5kZXggKyBsaW5lc1tsIC0gMV0ubGVuZ3RoICsgbmV3bGluZUxlbmd0aCB9OwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5wb3NpdGlvblRvSW5kZXggPSBmdW5jdGlvbiAocG9zLCBzdGFydFJvdykgewogICAgICAgIHZhciBsaW5lcyA9IHRoaXMuJGxpbmVzIHx8IHRoaXMuZ2V0QWxsTGluZXMoKTsKICAgICAgICB2YXIgbmV3bGluZUxlbmd0aCA9IHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpLmxlbmd0aDsKICAgICAgICB2YXIgaW5kZXggPSAwOwogICAgICAgIHZhciByb3cgPSBNYXRoLm1pbihwb3Mucm93LCBsaW5lcy5sZW5ndGgpOwogICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdyB8fCAwOyBpIDwgcm93OyArK2kpCiAgICAgICAgICAgIGluZGV4ICs9IGxpbmVzW2ldLmxlbmd0aCArIG5ld2xpbmVMZW5ndGg7CiAgICAgICAgcmV0dXJuIGluZGV4ICsgcG9zLmNvbHVtbjsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuJHNwbGl0ID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICByZXR1cm4gdGV4dC5zcGxpdCgvXHJcbnxccnxcbi8pOwogICAgfTsKICAgIHJldHVybiBEb2N1bWVudDsKfSgpKTsKRG9jdW1lbnQucHJvdG90eXBlLiRhdXRvTmV3TGluZSA9ICIiOwpEb2N1bWVudC5wcm90b3R5cGUuJG5ld0xpbmVNb2RlID0gImF1dG8iOwpvb3AuaW1wbGVtZW50KERvY3VtZW50LnByb3RvdHlwZSwgRXZlbnRFbWl0dGVyKTsKZXhwb3J0cy5Eb2N1bWVudCA9IERvY3VtZW50OwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvbGliL2RlZXBfY29weSIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7ZXhwb3J0cy5kZWVwQ29weSA9IGZ1bmN0aW9uIGRlZXBDb3B5KG9iaikgewogICAgaWYgKHR5cGVvZiBvYmogIT09ICJvYmplY3QiIHx8ICFvYmopCiAgICAgICAgcmV0dXJuIG9iajsKICAgIHZhciBjb3B5OwogICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkgewogICAgICAgIGNvcHkgPSBbXTsKICAgICAgICBmb3IgKHZhciBrZXkgPSAwOyBrZXkgPCBvYmoubGVuZ3RoOyBrZXkrKykgewogICAgICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBjb3B5OwogICAgfQogICAgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvYmopICE9PSAiW29iamVjdCBPYmplY3RdIikKICAgICAgICByZXR1cm4gb2JqOwogICAgY29weSA9IHt9OwogICAgZm9yICh2YXIga2V5IGluIG9iaikKICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7CiAgICByZXR1cm4gY29weTsKfTsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL2xpYi9sYW5nIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CmV4cG9ydHMubGFzdCA9IGZ1bmN0aW9uIChhKSB7CiAgICByZXR1cm4gYVthLmxlbmd0aCAtIDFdOwp9OwpleHBvcnRzLnN0cmluZ1JldmVyc2UgPSBmdW5jdGlvbiAoc3RyaW5nKSB7CiAgICByZXR1cm4gc3RyaW5nLnNwbGl0KCIiKS5yZXZlcnNlKCkuam9pbigiIik7Cn07CmV4cG9ydHMuc3RyaW5nUmVwZWF0ID0gZnVuY3Rpb24gKHN0cmluZywgY291bnQpIHsKICAgIHZhciByZXN1bHQgPSAnJzsKICAgIHdoaWxlIChjb3VudCA+IDApIHsKICAgICAgICBpZiAoY291bnQgJiAxKQogICAgICAgICAgICByZXN1bHQgKz0gc3RyaW5nOwogICAgICAgIGlmIChjb3VudCA+Pj0gMSkKICAgICAgICAgICAgc3RyaW5nICs9IHN0cmluZzsKICAgIH0KICAgIHJldHVybiByZXN1bHQ7Cn07CnZhciB0cmltQmVnaW5SZWdleHAgPSAvXlxzXHMqLzsKdmFyIHRyaW1FbmRSZWdleHAgPSAvXHNccyokLzsKZXhwb3J0cy5zdHJpbmdUcmltTGVmdCA9IGZ1bmN0aW9uIChzdHJpbmcpIHsKICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSh0cmltQmVnaW5SZWdleHAsICcnKTsKfTsKZXhwb3J0cy5zdHJpbmdUcmltUmlnaHQgPSBmdW5jdGlvbiAoc3RyaW5nKSB7CiAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UodHJpbUVuZFJlZ2V4cCwgJycpOwp9OwpleHBvcnRzLmNvcHlPYmplY3QgPSBmdW5jdGlvbiAob2JqKSB7CiAgICB2YXIgY29weSA9IHt9OwogICAgZm9yICh2YXIga2V5IGluIG9iaikgewogICAgICAgIGNvcHlba2V5XSA9IG9ialtrZXldOwogICAgfQogICAgcmV0dXJuIGNvcHk7Cn07CmV4cG9ydHMuY29weUFycmF5ID0gZnVuY3Rpb24gKGFycmF5KSB7CiAgICB2YXIgY29weSA9IFtdOwogICAgZm9yICh2YXIgaSA9IDAsIGwgPSBhcnJheS5sZW5ndGg7IGkgPCBsOyBpKyspIHsKICAgICAgICBpZiAoYXJyYXlbaV0gJiYgdHlwZW9mIGFycmF5W2ldID09ICJvYmplY3QiKQogICAgICAgICAgICBjb3B5W2ldID0gdGhpcy5jb3B5T2JqZWN0KGFycmF5W2ldKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIGNvcHlbaV0gPSBhcnJheVtpXTsKICAgIH0KICAgIHJldHVybiBjb3B5Owp9OwpleHBvcnRzLmRlZXBDb3B5ID0gcmVxdWlyZSgiLi9kZWVwX2NvcHkiKS5kZWVwQ29weTsKZXhwb3J0cy5hcnJheVRvTWFwID0gZnVuY3Rpb24gKGFycikgewogICAgdmFyIG1hcCA9IHt9OwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHsKICAgICAgICBtYXBbYXJyW2ldXSA9IDE7CiAgICB9CiAgICByZXR1cm4gbWFwOwp9OwpleHBvcnRzLmNyZWF0ZU1hcCA9IGZ1bmN0aW9uIChwcm9wcykgewogICAgdmFyIG1hcCA9IE9iamVjdC5jcmVhdGUobnVsbCk7CiAgICBmb3IgKHZhciBpIGluIHByb3BzKSB7CiAgICAgICAgbWFwW2ldID0gcHJvcHNbaV07CiAgICB9CiAgICByZXR1cm4gbWFwOwp9OwpleHBvcnRzLmFycmF5UmVtb3ZlID0gZnVuY3Rpb24gKGFycmF5LCB2YWx1ZSkgewogICAgZm9yICh2YXIgaSA9IDA7IGkgPD0gYXJyYXkubGVuZ3RoOyBpKyspIHsKICAgICAgICBpZiAodmFsdWUgPT09IGFycmF5W2ldKSB7CiAgICAgICAgICAgIGFycmF5LnNwbGljZShpLCAxKTsKICAgICAgICB9CiAgICB9Cn07CmV4cG9ydHMuZXNjYXBlUmVnRXhwID0gZnVuY3Rpb24gKHN0cikgewogICAgcmV0dXJuIHN0ci5yZXBsYWNlKC8oWy4qKz9eJHt9KCl8W1xdXC9cXF0pL2csICdcXCQxJyk7Cn07CmV4cG9ydHMuZXNjYXBlSFRNTCA9IGZ1bmN0aW9uIChzdHIpIHsKICAgIHJldHVybiAoIiIgKyBzdHIpLnJlcGxhY2UoLyYvZywgIiYjMzg7IikucmVwbGFjZSgvIi9nLCAiJiMzNDsiKS5yZXBsYWNlKC8nL2csICImIzM5OyIpLnJlcGxhY2UoLzwvZywgIiYjNjA7Iik7Cn07CmV4cG9ydHMuZ2V0TWF0Y2hPZmZzZXRzID0gZnVuY3Rpb24gKHN0cmluZywgcmVnRXhwKSB7CiAgICB2YXIgbWF0Y2hlcyA9IFtdOwogICAgc3RyaW5nLnJlcGxhY2UocmVnRXhwLCBmdW5jdGlvbiAoc3RyKSB7CiAgICAgICAgbWF0Y2hlcy5wdXNoKHsKICAgICAgICAgICAgb2Zmc2V0OiBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDJdLAogICAgICAgICAgICBsZW5ndGg6IHN0ci5sZW5ndGgKICAgICAgICB9KTsKICAgIH0pOwogICAgcmV0dXJuIG1hdGNoZXM7Cn07CmV4cG9ydHMuZGVmZXJyZWRDYWxsID0gZnVuY3Rpb24gKGZjbikgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aW1lciA9IG51bGw7CiAgICAgICAgZmNuKCk7CiAgICB9OwogICAgdmFyIGRlZmVycmVkID0gZnVuY3Rpb24gKHRpbWVvdXQpIHsKICAgICAgICBkZWZlcnJlZC5jYW5jZWwoKTsKICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoY2FsbGJhY2ssIHRpbWVvdXQgfHwgMCk7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKICAgIGRlZmVycmVkLnNjaGVkdWxlID0gZGVmZXJyZWQ7CiAgICBkZWZlcnJlZC5jYWxsID0gZnVuY3Rpb24gKCkgewogICAgICAgIHRoaXMuY2FuY2VsKCk7CiAgICAgICAgZmNuKCk7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKICAgIGRlZmVycmVkLmNhbmNlbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpOwogICAgICAgIHRpbWVyID0gbnVsbDsKICAgICAgICByZXR1cm4gZGVmZXJyZWQ7CiAgICB9OwogICAgZGVmZXJyZWQuaXNQZW5kaW5nID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aW1lcjsKICAgIH07CiAgICByZXR1cm4gZGVmZXJyZWQ7Cn07CmV4cG9ydHMuZGVsYXllZENhbGwgPSBmdW5jdGlvbiAoZmNuLCBkZWZhdWx0VGltZW91dCkgewogICAgdmFyIHRpbWVyID0gbnVsbDsKICAgIHZhciBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aW1lciA9IG51bGw7CiAgICAgICAgZmNuKCk7CiAgICB9OwogICAgdmFyIF9zZWxmID0gZnVuY3Rpb24gKHRpbWVvdXQpIHsKICAgICAgICBpZiAodGltZXIgPT0gbnVsbCkKICAgICAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGNhbGxiYWNrLCB0aW1lb3V0IHx8IGRlZmF1bHRUaW1lb3V0KTsKICAgIH07CiAgICBfc2VsZi5kZWxheSA9IGZ1bmN0aW9uICh0aW1lb3V0KSB7CiAgICAgICAgdGltZXIgJiYgY2xlYXJUaW1lb3V0KHRpbWVyKTsKICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoY2FsbGJhY2ssIHRpbWVvdXQgfHwgZGVmYXVsdFRpbWVvdXQpOwogICAgfTsKICAgIF9zZWxmLnNjaGVkdWxlID0gX3NlbGY7CiAgICBfc2VsZi5jYWxsID0gZnVuY3Rpb24gKCkgewogICAgICAgIHRoaXMuY2FuY2VsKCk7CiAgICAgICAgZmNuKCk7CiAgICB9OwogICAgX3NlbGYuY2FuY2VsID0gZnVuY3Rpb24gKCkgewogICAgICAgIHRpbWVyICYmIGNsZWFyVGltZW91dCh0aW1lcik7CiAgICAgICAgdGltZXIgPSBudWxsOwogICAgfTsKICAgIF9zZWxmLmlzUGVuZGluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGltZXI7CiAgICB9OwogICAgcmV0dXJuIF9zZWxmOwp9OwpleHBvcnRzLnN1cHBvcnRzTG9va2JlaGluZCA9IGZ1bmN0aW9uICgpIHsKICAgIHRyeSB7CiAgICAgICAgbmV3IFJlZ0V4cCgnKD88PS4pJyk7CiAgICB9CiAgICBjYXRjaCAoZSkgewogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KICAgIHJldHVybiB0cnVlOwp9OwpleHBvcnRzLnN1cHBvcnRzVW5pY29kZUZsYWcgPSBmdW5jdGlvbiAoKSB7CiAgICB0cnkgewogICAgICAgIG5ldyBSZWdFeHAoJ14uJCcsICd1Jyk7CiAgICB9CiAgICBjYXRjaCAoZXJyb3IpIHsKICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9CiAgICByZXR1cm4gdHJ1ZTsKfTsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL3dvcmtlci9taXJyb3IiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKdmFyIERvY3VtZW50ID0gcmVxdWlyZSgiLi4vZG9jdW1lbnQiKS5Eb2N1bWVudDsKdmFyIGxhbmcgPSByZXF1aXJlKCIuLi9saWIvbGFuZyIpOwogICAgCnZhciBNaXJyb3IgPSBleHBvcnRzLk1pcnJvciA9IGZ1bmN0aW9uKHNlbmRlcikgewogICAgdGhpcy5zZW5kZXIgPSBzZW5kZXI7CiAgICB2YXIgZG9jID0gdGhpcy5kb2MgPSBuZXcgRG9jdW1lbnQoIiIpOwogICAgCiAgICB2YXIgZGVmZXJyZWRVcGRhdGUgPSB0aGlzLmRlZmVycmVkVXBkYXRlID0gbGFuZy5kZWxheWVkQ2FsbCh0aGlzLm9uVXBkYXRlLmJpbmQodGhpcykpOwogICAgCiAgICB2YXIgX3NlbGYgPSB0aGlzOwogICAgc2VuZGVyLm9uKCJjaGFuZ2UiLCBmdW5jdGlvbihlKSB7CiAgICAgICAgdmFyIGRhdGEgPSBlLmRhdGE7CiAgICAgICAgaWYgKGRhdGFbMF0uc3RhcnQpIHsKICAgICAgICAgICAgZG9jLmFwcGx5RGVsdGFzKGRhdGEpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkgKz0gMikgewogICAgICAgICAgICAgICAgdmFyIGQsIGVycjsgCiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShkYXRhW2krMV0pKSB7CiAgICAgICAgICAgICAgICAgICAgZCA9IHthY3Rpb246ICJpbnNlcnQiLCBzdGFydDogZGF0YVtpXSwgbGluZXM6IGRhdGFbaSsxXX07CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIGQgPSB7YWN0aW9uOiAicmVtb3ZlIiwgc3RhcnQ6IGRhdGFbaV0sIGVuZDogZGF0YVtpKzFdfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgaWYgKChkLmFjdGlvbiA9PSAiaW5zZXJ0IiA/IGQuc3RhcnQgOiBkLmVuZCkucm93ID49IGRvYy4kbGluZXMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgZXJyID0gbmV3IEVycm9yKCJJbnZhbGlkIGRlbHRhIik7CiAgICAgICAgICAgICAgICAgICAgZXJyLmRhdGEgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGg6IF9zZWxmLiRwYXRoLAogICAgICAgICAgICAgICAgICAgICAgICBsaW5lc0xlbmd0aDogZG9jLiRsaW5lcy5sZW5ndGgsCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0OiBkLnN0YXJ0LAogICAgICAgICAgICAgICAgICAgICAgICBlbmQ6IGQuZW5kCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnI7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZG9jLmFwcGx5RGVsdGEoZCwgdHJ1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKF9zZWxmLiR0aW1lb3V0KQogICAgICAgICAgICByZXR1cm4gZGVmZXJyZWRVcGRhdGUuc2NoZWR1bGUoX3NlbGYuJHRpbWVvdXQpOwogICAgICAgIF9zZWxmLm9uVXBkYXRlKCk7CiAgICB9KTsKfTsKCihmdW5jdGlvbigpIHsKICAgIAogICAgdGhpcy4kdGltZW91dCA9IDUwMDsKICAgIAogICAgdGhpcy5zZXRUaW1lb3V0ID0gZnVuY3Rpb24odGltZW91dCkgewogICAgICAgIHRoaXMuJHRpbWVvdXQgPSB0aW1lb3V0OwogICAgfTsKICAgIAogICAgdGhpcy5zZXRWYWx1ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgdGhpcy5kb2Muc2V0VmFsdWUodmFsdWUpOwogICAgICAgIHRoaXMuZGVmZXJyZWRVcGRhdGUuc2NoZWR1bGUodGhpcy4kdGltZW91dCk7CiAgICB9OwogICAgCiAgICB0aGlzLmdldFZhbHVlID0gZnVuY3Rpb24oY2FsbGJhY2tJZCkgewogICAgICAgIHRoaXMuc2VuZGVyLmNhbGxiYWNrKHRoaXMuZG9jLmdldFZhbHVlKCksIGNhbGxiYWNrSWQpOwogICAgfTsKICAgIAogICAgdGhpcy5vblVwZGF0ZSA9IGZ1bmN0aW9uKCkgewogICAgfTsKICAgIAogICAgdGhpcy5pc1BlbmRpbmcgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gdGhpcy5kZWZlcnJlZFVwZGF0ZS5pc1BlbmRpbmcoKTsKICAgIH07CiAgICAKfSkuY2FsbChNaXJyb3IucHJvdG90eXBlKTsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL21vZGUvanNvbi9qc29uX3BhcnNlIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCiAgICB2YXIgYXQsICAgICAvLyBUaGUgaW5kZXggb2YgdGhlIGN1cnJlbnQgY2hhcmFjdGVyCiAgICAgICAgY2gsICAgICAvLyBUaGUgY3VycmVudCBjaGFyYWN0ZXIKICAgICAgICBlc2NhcGVlID0gewogICAgICAgICAgICAnIic6ICAnIicsCiAgICAgICAgICAgICdcXCc6ICdcXCcsCiAgICAgICAgICAgICcvJzogICcvJywKICAgICAgICAgICAgYjogICAgJ1xiJywKICAgICAgICAgICAgZjogICAgJ1xmJywKICAgICAgICAgICAgbjogICAgJ1xuJywKICAgICAgICAgICAgcjogICAgJ1xyJywKICAgICAgICAgICAgdDogICAgJ1x0JwogICAgICAgIH0sCiAgICAgICAgdGV4dCwKCiAgICAgICAgZXJyb3IgPSBmdW5jdGlvbiAobSkgewoKICAgICAgICAgICAgdGhyb3cgewogICAgICAgICAgICAgICAgbmFtZTogICAgJ1N5bnRheEVycm9yJywKICAgICAgICAgICAgICAgIG1lc3NhZ2U6IG0sCiAgICAgICAgICAgICAgICBhdDogICAgICBhdCwKICAgICAgICAgICAgICAgIHRleHQ6ICAgIHRleHQKICAgICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBuZXh0ID0gZnVuY3Rpb24gKGMpIHsKCiAgICAgICAgICAgIGlmIChjICYmIGMgIT09IGNoKSB7CiAgICAgICAgICAgICAgICBlcnJvcigiRXhwZWN0ZWQgJyIgKyBjICsgIicgaW5zdGVhZCBvZiAnIiArIGNoICsgIiciKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY2ggPSB0ZXh0LmNoYXJBdChhdCk7CiAgICAgICAgICAgIGF0ICs9IDE7CiAgICAgICAgICAgIHJldHVybiBjaDsKICAgICAgICB9LAoKICAgICAgICBudW1iZXIgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB2YXIgbnVtYmVyLAogICAgICAgICAgICAgICAgc3RyaW5nID0gJyc7CgogICAgICAgICAgICBpZiAoY2ggPT09ICctJykgewogICAgICAgICAgICAgICAgc3RyaW5nID0gJy0nOwogICAgICAgICAgICAgICAgbmV4dCgnLScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHdoaWxlIChjaCA+PSAnMCcgJiYgY2ggPD0gJzknKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoID09PSAnLicpIHsKICAgICAgICAgICAgICAgIHN0cmluZyArPSAnLic7CiAgICAgICAgICAgICAgICB3aGlsZSAobmV4dCgpICYmIGNoID49ICcwJyAmJiBjaCA8PSAnOScpIHsKICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoID09PSAnZScgfHwgY2ggPT09ICdFJykgewogICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgbmV4dCgpOwogICAgICAgICAgICAgICAgaWYgKGNoID09PSAnLScgfHwgY2ggPT09ICcrJykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB3aGlsZSAoY2ggPj0gJzAnICYmIGNoIDw9ICc5JykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbnVtYmVyID0gK3N0cmluZzsKICAgICAgICAgICAgaWYgKGlzTmFOKG51bWJlcikpIHsKICAgICAgICAgICAgICAgIGVycm9yKCJCYWQgbnVtYmVyIik7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyOwogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgc3RyaW5nID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGhleCwKICAgICAgICAgICAgICAgIGksCiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnJywKICAgICAgICAgICAgICAgIHVmZmZmOwoKICAgICAgICAgICAgaWYgKGNoID09PSAnIicpIHsKICAgICAgICAgICAgICAgIHdoaWxlIChuZXh0KCkpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICciJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdHJpbmc7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ1xcJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ3UnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZmZmZiA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgNDsgaSArPSAxKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGV4ID0gcGFyc2VJbnQobmV4dCgpLCAxNik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0Zpbml0ZShoZXgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZmZmZiA9IHVmZmZmICogMTYgKyBoZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gU3RyaW5nLmZyb21DaGFyQ29kZSh1ZmZmZik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGVzY2FwZWVbY2hdID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGVzY2FwZWVbY2hdOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09ICJcbiIgfHwgY2ggPT0gIlxyIikgewogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJCYWQgc3RyaW5nIik7CiAgICAgICAgfSwKCiAgICAgICAgd2hpdGUgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB3aGlsZSAoY2ggJiYgY2ggPD0gJyAnKSB7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICB3b3JkID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgc3dpdGNoIChjaCkgewogICAgICAgICAgICBjYXNlICd0JzoKICAgICAgICAgICAgICAgIG5leHQoJ3QnKTsKICAgICAgICAgICAgICAgIG5leHQoJ3InKTsKICAgICAgICAgICAgICAgIG5leHQoJ3UnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2UnKTsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICBjYXNlICdmJzoKICAgICAgICAgICAgICAgIG5leHQoJ2YnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2EnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIG5leHQoJ3MnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2UnKTsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgY2FzZSAnbic6CiAgICAgICAgICAgICAgICBuZXh0KCduJyk7CiAgICAgICAgICAgICAgICBuZXh0KCd1Jyk7CiAgICAgICAgICAgICAgICBuZXh0KCdsJyk7CiAgICAgICAgICAgICAgICBuZXh0KCdsJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvcigiVW5leHBlY3RlZCAnIiArIGNoICsgIiciKTsKICAgICAgICB9LAoKICAgICAgICB2YWx1ZSwgIC8vIFBsYWNlIGhvbGRlciBmb3IgdGhlIHZhbHVlIGZ1bmN0aW9uLgoKICAgICAgICBhcnJheSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBhcnJheSA9IFtdOwoKICAgICAgICAgICAgaWYgKGNoID09PSAnWycpIHsKICAgICAgICAgICAgICAgIG5leHQoJ1snKTsKICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykgewogICAgICAgICAgICAgICAgICAgIG5leHQoJ10nKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXJyYXk7ICAgLy8gZW1wdHkgYXJyYXkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCkgewogICAgICAgICAgICAgICAgICAgIGFycmF5LnB1c2godmFsdWUoKSk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCddJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJheTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnLCcpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBhcnJheSIpOwogICAgICAgIH0sCgogICAgICAgIG9iamVjdCA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBrZXksCiAgICAgICAgICAgICAgICBvYmplY3QgPSB7fTsKCiAgICAgICAgICAgIGlmIChjaCA9PT0gJ3snKSB7CiAgICAgICAgICAgICAgICBuZXh0KCd7Jyk7CiAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgaWYgKGNoID09PSAnfScpIHsKICAgICAgICAgICAgICAgICAgICBuZXh0KCd9Jyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsgICAvLyBlbXB0eSBvYmplY3QKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCkgewogICAgICAgICAgICAgICAgICAgIGtleSA9IHN0cmluZygpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnOicpOwogICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IoJ0R1cGxpY2F0ZSBrZXkgIicgKyBrZXkgKyAnIicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBvYmplY3Rba2V5XSA9IHZhbHVlKCk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd9JykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCd9Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmplY3Q7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIG5leHQoJywnKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJCYWQgb2JqZWN0Iik7CiAgICAgICAgfTsKCiAgICB2YWx1ZSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgd2hpdGUoKTsKICAgICAgICBzd2l0Y2ggKGNoKSB7CiAgICAgICAgY2FzZSAneyc6CiAgICAgICAgICAgIHJldHVybiBvYmplY3QoKTsKICAgICAgICBjYXNlICdbJzoKICAgICAgICAgICAgcmV0dXJuIGFycmF5KCk7CiAgICAgICAgY2FzZSAnIic6CiAgICAgICAgICAgIHJldHVybiBzdHJpbmcoKTsKICAgICAgICBjYXNlICctJzoKICAgICAgICAgICAgcmV0dXJuIG51bWJlcigpOwogICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgIHJldHVybiBjaCA+PSAnMCcgJiYgY2ggPD0gJzknID8gbnVtYmVyKCkgOiB3b3JkKCk7CiAgICAgICAgfQogICAgfTsKCiAgICByZXR1cm4gZnVuY3Rpb24gKHNvdXJjZSwgcmV2aXZlcikgewogICAgICAgIHZhciByZXN1bHQ7CgogICAgICAgIHRleHQgPSBzb3VyY2U7CiAgICAgICAgYXQgPSAwOwogICAgICAgIGNoID0gJyAnOwogICAgICAgIHJlc3VsdCA9IHZhbHVlKCk7CiAgICAgICAgd2hpdGUoKTsKICAgICAgICBpZiAoY2gpIHsKICAgICAgICAgICAgZXJyb3IoIlN5bnRheCBlcnJvciIpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHR5cGVvZiByZXZpdmVyID09PSAnZnVuY3Rpb24nID8gZnVuY3Rpb24gd2Fsayhob2xkZXIsIGtleSkgewogICAgICAgICAgICB2YXIgaywgdiwgdmFsdWUgPSBob2xkZXJba2V5XTsKICAgICAgICAgICAgaWYgKHZhbHVlICYmIHR5cGVvZiB2YWx1ZSA9PT0gJ29iamVjdCcpIHsKICAgICAgICAgICAgICAgIGZvciAoayBpbiB2YWx1ZSkgewogICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbCh2YWx1ZSwgaykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdiA9IHdhbGsodmFsdWUsIGspOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodiAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZVtrXSA9IHY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdmFsdWVba107CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJldml2ZXIuY2FsbChob2xkZXIsIGtleSwgdmFsdWUpOwogICAgICAgIH0oeycnOiByZXN1bHR9LCAnJykgOiByZXN1bHQ7CiAgICB9Owp9KTsKCmFjZS5kZWZpbmUoImFjZS9tb2RlL2pzb25fd29ya2VyIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCnZhciBvb3AgPSByZXF1aXJlKCIuLi9saWIvb29wIik7CnZhciBNaXJyb3IgPSByZXF1aXJlKCIuLi93b3JrZXIvbWlycm9yIikuTWlycm9yOwp2YXIgcGFyc2UgPSByZXF1aXJlKCIuL2pzb24vanNvbl9wYXJzZSIpOwoKdmFyIEpzb25Xb3JrZXIgPSBleHBvcnRzLkpzb25Xb3JrZXIgPSBmdW5jdGlvbihzZW5kZXIpIHsKICAgIE1pcnJvci5jYWxsKHRoaXMsIHNlbmRlcik7CiAgICB0aGlzLnNldFRpbWVvdXQoMjAwKTsKfTsKCm9vcC5pbmhlcml0cyhKc29uV29ya2VyLCBNaXJyb3IpOwoKKGZ1bmN0aW9uKCkgewoKICAgIHRoaXMub25VcGRhdGUgPSBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdmFsdWUgPSB0aGlzLmRvYy5nZXRWYWx1ZSgpOwogICAgICAgIHZhciBlcnJvcnMgPSBbXTsKICAgICAgICB0cnkgewogICAgICAgICAgICBpZiAodmFsdWUpCiAgICAgICAgICAgICAgICBwYXJzZSh2YWx1ZSk7CiAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICB2YXIgcG9zID0gdGhpcy5kb2MuaW5kZXhUb1Bvc2l0aW9uKGUuYXQtMSk7CiAgICAgICAgICAgIGVycm9ycy5wdXNoKHsKICAgICAgICAgICAgICAgIHJvdzogcG9zLnJvdywKICAgICAgICAgICAgICAgIGNvbHVtbjogcG9zLmNvbHVtbiwKICAgICAgICAgICAgICAgIHRleHQ6IGUubWVzc2FnZSwKICAgICAgICAgICAgICAgIHR5cGU6ICJlcnJvciIKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIHRoaXMuc2VuZGVyLmVtaXQoImFubm90YXRlIiwgZXJyb3JzKTsKICAgIH07Cgp9KS5jYWxsKEpzb25Xb3JrZXIucHJvdG90eXBlKTsKCn0pOwo="},7907:function(ae,m,O){O.d(m,{Iu:function(){return N},cC:function(){return F},m0:function(){return X}}),O(4987);var U={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",cannotParseFieldError:"Cannot parse field into JSON",cannotParseValueError:"Cannot parse value into JSON",collapseAll:"Collapse all fields",compactTitle:"Compact JSON data, remove all whitespaces (Ctrl+Shift+I)",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",duplicateFieldError:"Duplicate field name",empty:"empty",expandAll:"Expand all fields",expandTitle:`Click to expand/collapse this field (Ctrl+E).
|
|
Ctrl+Click to expand/collapse including all childs.`,formatTitle:"Format JSON data, with proper indentation and line feeds (Ctrl+I)",insert:"Insert",insertTitle:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",insertSub:"Select the type of the field to be inserted",object:"Object",ok:"Ok",redo:"Redo (Ctrl+Shift+Z)",removeText:"Remove",removeTitle:"Remove selected fields (Ctrl+Del)",removeField:"Remove this field (Ctrl+Del)",repairTitle:"Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",searchTitle:"Search fields and values",searchNextResultTitle:"Next result (Enter)",searchPreviousResultTitle:"Previous result (Shift + Enter)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",extract:"Extract",extractTitle:"Extract this ${type}",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+Click or Ctrl+Enter to open url in new window",undo:"Undo last action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Field type "object". An object contains an unordered set of key/value pairs.',arrayType:'Field type "array". An array contains an ordered collection of values.',stringType:'Field type "string". Field type is not determined from the value, but always returned as string.',modeEditorTitle:"Switch Editor Mode",modeCodeText:"Code",modeCodeTitle:"Switch to code highlighter",modeFormText:"Form",modeFormTitle:"Switch to form editor",modeTextText:"Text",modeTextTitle:"Switch to plain text editor",modeTreeText:"Tree",modeTreeTitle:"Switch to tree editor",modeViewText:"View",modeViewTitle:"Switch to tree view",modePreviewText:"Preview",modePreviewTitle:"Switch to preview mode",examples:"Examples",default:"Default",containsInvalidProperties:"Contains invalid properties",containsInvalidItems:"Contains invalid items"},es:{array:"Matriz",auto:"Auto",appendText:"Agregar",appendTitle:"Agregue un nuevo campo con el tipo 'auto' despu\xE9s de este campo (Ctrl + Shift + Ins)",appendSubmenuTitle:"Seleccione el tipo de campo que se agregar\xE1",appendTitleAuto:"Agregue un nuevo campo con el tipo 'auto' (Ctrl + Shift + Ins)",ascending:"Ascendente",ascendingTitle:"Ordene los elementos secundarios de este ${type} en orden ascendente",actionsMenu:"Haga clic para abrir el men\xFA de acciones (Ctrl + M)",cannotParseFieldError:"No se puede parsear el campo en JSON",cannotParseValueError:"No se puede parsear el valor en JSON",collapseAll:"Contraer todos los campos",compactTitle:"Compactar datos JSON, eliminar todos los espacios en blanco (Ctrl + Shift + I)",descending:"Descendente",descendingTitle:"Ordene los hijos de este ${type} en orden descendente",drag:"Arrastre para mover este campo (Alt + May\xFAs + Flechas)",duplicateKey:"llave duplicada",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos seleccionados (Ctrl + D)",duplicateField:"Duplicar este campo (Ctrl + D)",duplicateFieldError:"Nombre de campo duplicado",empty:"vacio",expandAll:"Expandir todos los campos",expandTitle:`Haga clic para expandir/contraer este campo (Ctrl + E).
|
|
Ctrl+Clic para expandir/contraer incluyendo todos los ni\xF1os.`,formatTitle:"Formatee los datos JSON, con la sangr\xEDa y los avances de l\xEDnea adecuados (Ctrl + I)",insert:"Insertar",insertTitle:"Inserte un nuevo campo con el tipo 'auto' antes de este campo (Ctrl + Ins)",insertSub:"Seleccione el tipo de campo a insertar",object:"Objeto",ok:"Ok",redo:"Rehacer (Ctrl+May\xFAs+Z)",removeText:"Eliminar",removeTitle:"Eliminar campos seleccionados (Ctrl+Supr)",removeField:"Eliminar este campo (Ctrl+Supr)",repairTitle:"Reparar JSON: corrija comillas y caracteres de escape, elimine comentarios y notaci\xF3n JSONP, convierta objetos JavaScript en JSON.",searchTitle:"Campos de b\xFAsqueda y valores",searchNextResultTitle:"Siguiente resultado (Entrar)",searchPreviousResultTitle:"Resultado anterior (Shift + Enter)",selectNode:"Seleccione un nodo...",showAll:"mostrar todo",showMore:"mostrar m\xE1s",showMoreStatus:"mostrando ${visibleChilds} de ${totalChilds} elementos.",sort:"Ordenar",sortTitle:"Ordene los hijos de este ${type}",sortTitleShort:"Ordenar contenidos",sortFieldLabel:"Campo:",sortDirectionLabel:"Direcci\xF3n:",sortFieldTitle:"Seleccione el campo anidado por el cual ordenar la matriz u objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar el campo seleccionado en orden ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar por el campo seleccionado, en orden descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar o transformar los hijos de este ${type}",transformTitleShort:"Filtrar, ordenar o transformar contenidos",extract:"Extraer",extractTitle:"Extrae este ${type}",transformQueryTitle:"Ingrese una consulta JMESPath",transformWizardLabel:"Wizard",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Seleccione un campo",transformQueryLabel:"Consulta",transformPreviewLabel:"Vista Previa",type:"Tipo",typeTitle:"Cambiar el tipo de campo",openUrl:"Ctrl+Click o Ctrl+Enter para abrir la URL en una nueva ventana",undo:"Deshacer la \xFAltima acci\xF3n (Ctrl+Z)",validationCannotMove:"No se puede mover un campo a un hijo de s\xED mismo.",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Tipo de campo "objeto". Un objeto contiene un conjunto desordenado de pares clave/valor.',arrayType:'Tipo de campo "matriz". Una matriz contiene una colecci\xF3n ordenada de valores.',stringType:'Tipo de campo "cadena". El tipo de campo no se determina a partir del valor, pero siempre se devuelve como una cadena.',modeEditorTitle:"Cambiar modo de editor",modeCodeText:"Codigo",modeCodeTitle:"Cambiar al resaltador de c\xF3digo",modeFormText:"Formulario",modeFormTitle:"Cambiar al editor de formularios",modeTextText:"Texto",modeTextTitle:"Cambiar al editor de texto sin formato",modeTreeText:"Arbol",modeTreeTitle:"Cambiar al editor de \xE1rbol",modeViewText:"Vista",modeViewTitle:"Cambiar a la vista de \xE1rbol",modePreviewText:"Vista Previa",modePreviewTitle:"Cambiar al modo de vista previa",examples:"Ejemplos",default:"Predeterminado",containsInvalidProperties:"Contiene propiedades no validas",containsInvalidItems:"Contiene items no validos"},"zh-CN":{array:"\u6570\u7EC4",auto:"\u81EA\u52A8",appendText:"\u8FFD\u52A0",appendTitle:"\u5728\u6B64\u5B57\u6BB5\u540E\u8FFD\u52A0\u4E00\u4E2A\u7C7B\u578B\u4E3A\u201Cauto\u201D\u7684\u65B0\u5B57\u6BB5 (Ctrl+Shift+Ins)",appendSubmenuTitle:"\u9009\u62E9\u8981\u8FFD\u52A0\u7684\u5B57\u6BB5\u7C7B\u578B",appendTitleAuto:"\u8FFD\u52A0\u7C7B\u578B\u4E3A\u201Cauto\u201D\u7684\u65B0\u5B57\u6BB5 (Ctrl+Shift+Ins)",ascending:"\u5347\u5E8F",ascendingTitle:"\u5347\u5E8F\u6392\u5217${type}\u7684\u5B50\u8282\u70B9",actionsMenu:"\u70B9\u51FB\u6253\u5F00\u52A8\u4F5C\u83DC\u5355(Ctrl+M)",cannotParseFieldError:"\u65E0\u6CD5\u5C06\u5B57\u6BB5\u89E3\u6790\u4E3AJSON",cannotParseValueError:"\u65E0\u6CD5\u5C06\u503C\u89E3\u6790\u4E3AJSON",collapseAll:"\u7F29\u8FDB\u6240\u6709\u5B57\u6BB5",compactTitle:"\u538B\u7F29JSON\u6570\u636E\uFF0C\u5220\u9664\u6240\u6709\u7A7A\u683C (Ctrl+Shift+I)",descending:"\u964D\u5E8F",descendingTitle:"\u964D\u5E8F\u6392\u5217${type}\u7684\u5B50\u8282\u70B9",drag:"\u62D6\u62FD\u79FB\u52A8\u8BE5\u8282\u70B9(Alt+Shift+Arrows)",duplicateKey:"\u91CD\u590D\u952E",duplicateText:"\u590D\u5236",duplicateTitle:"\u590D\u5236\u9009\u4E2D\u5B57\u6BB5(Ctrl+D)",duplicateField:"\u590D\u5236\u8BE5\u5B57\u6BB5(Ctrl+D)",duplicateFieldError:"\u91CD\u590D\u7684\u5B57\u6BB5\u540D\u79F0",empty:"\u6E05\u7A7A",expandAll:"\u5C55\u5F00\u6240\u6709\u5B57\u6BB5",expandTitle:`\u70B9\u51FB \u5C55\u5F00/\u6536\u7F29 \u8BE5\u5B57\u6BB5(Ctrl+E).
|
|
Ctrl+Click \u5C55\u5F00/\u6536\u7F29 \u5305\u542B\u6240\u6709\u5B50\u8282\u70B9.`,formatTitle:"\u4F7F\u7528\u9002\u5F53\u7684\u7F29\u8FDB\u548C\u6362\u884C\u7B26\u683C\u5F0F\u5316JSON\u6570\u636E (Ctrl+I)",insert:"\u63D2\u5165",insertTitle:"\u5728\u6B64\u5B57\u6BB5\u524D\u63D2\u5165\u7C7B\u578B\u4E3A\u201Cauto\u201D\u7684\u65B0\u5B57\u6BB5 (Ctrl+Ins)",insertSub:"\u9009\u62E9\u8981\u63D2\u5165\u7684\u5B57\u6BB5\u7C7B\u578B",object:"\u5BF9\u8C61",ok:"Ok",redo:"\u91CD\u505A (Ctrl+Shift+Z)",removeText:"\u79FB\u9664",removeTitle:"\u79FB\u9664\u9009\u4E2D\u5B57\u6BB5 (Ctrl+Del)",removeField:"\u79FB\u9664\u8BE5\u5B57\u6BB5 (Ctrl+Del)",repairTitle:"\u4FEE\u590DJSON\uFF1A\u4FEE\u590D\u5F15\u53F7\u548C\u8F6C\u4E49\u7B26\uFF0C\u5220\u9664\u6CE8\u91CA\u548CJSONP\u8868\u793A\u6CD5\uFF0C\u5C06JavaScript\u5BF9\u8C61\u8F6C\u6362\u4E3AJSON\u3002",selectNode:"\u9009\u62E9\u4E00\u4E2A\u8282\u70B9...",showAll:"\u5C55\u793A\u5168\u90E8",showMore:"\u5C55\u793A\u66F4\u591A",showMoreStatus:"\u663E\u793A${totalChilds}\u7684${visibleChilds}\u9879\u76EE.",sort:"\u6392\u5E8F",sortTitle:"\u6392\u5E8F${type}\u7684\u5B50\u8282\u70B9",sortTitleShort:"\u5185\u5BB9\u6392\u5E8F",sortFieldLabel:"\u5B57\u6BB5\uFF1A",sortDirectionLabel:"\u65B9\u5411\uFF1A",sortFieldTitle:"\u9009\u62E9\u7528\u4E8E\u5BF9\u6570\u7EC4\u6216\u5BF9\u8C61\u6392\u5E8F\u7684\u5D4C\u5957\u5B57\u6BB5",sortAscending:"\u5347\u5E8F\u6392\u5E8F",sortAscendingTitle:"\u6309\u7167\u8BE5\u5B57\u6BB5\u5347\u5E8F\u6392\u5E8F",sortDescending:"\u964D\u5E8F\u6392\u5E8F",sortDescendingTitle:"\u6309\u7167\u8BE5\u5B57\u6BB5\u964D\u5E8F\u6392\u5E8F",string:"\u5B57\u7B26\u4E32",transform:"\u53D8\u6362",transformTitle:"\u7B5B\u9009\uFF0C\u6392\u5E8F\uFF0C\u6216\u8005\u8F6C\u6362${type}\u7684\u5B50\u8282\u70B9",transformTitleShort:"\u7B5B\u9009\uFF0C\u6392\u5E8F\uFF0C\u6216\u8005\u8F6C\u6362\u5185\u5BB9",extract:"\u63D0\u53D6",extractTitle:"\u63D0\u53D6\u8FD9\u4E2A ${type}",transformQueryTitle:"\u8F93\u5165JMESPath\u67E5\u8BE2",transformWizardLabel:"\u5411\u5BFC",transformWizardFilter:"\u7B5B\u9009",transformWizardSortBy:"\u6392\u5E8F",transformWizardSelectFields:"\u9009\u62E9\u5B57\u6BB5",transformQueryLabel:"\u67E5\u8BE2",transformPreviewLabel:"\u9884\u89C8",type:"\u7C7B\u578B",typeTitle:"\u66F4\u6539\u5B57\u6BB5\u7C7B\u578B",openUrl:"Ctrl+Click \u6216\u8005 Ctrl+Enter \u5728\u65B0\u7A97\u53E3\u6253\u5F00\u94FE\u63A5",undo:"\u64A4\u9500\u4E0A\u6B21\u52A8\u4F5C (Ctrl+Z)",validationCannotMove:"\u65E0\u6CD5\u5C06\u5B57\u6BB5\u79FB\u5165\u5176\u5B50\u8282\u70B9",autoType:'\u5B57\u6BB5\u7C7B\u578B "auto". \u5B57\u6BB5\u7C7B\u578B\u7531\u503C\u81EA\u52A8\u786E\u5B9A \u53EF\u4EE5\u4E3A string\uFF0Cnumber\uFF0Cboolean\uFF0C\u6216\u8005 null.',objectType:'\u5B57\u6BB5\u7C7B\u578B "object". \u5BF9\u8C61\u5305\u542B\u4E00\u7EC4\u65E0\u5E8F\u7684\u952E/\u503C\u5BF9.',arrayType:'\u5B57\u6BB5\u7C7B\u578B "array". \u6570\u7EC4\u5305\u542B\u503C\u7684\u6709\u5E8F\u96C6\u5408.',stringType:'\u5B57\u6BB5\u7C7B\u578B "string". \u5B57\u6BB5\u7C7B\u578B\u7531\u503C\u81EA\u52A8\u786E\u5B9A\uFF0C\u4F46\u59CB\u7EC8\u4F5C\u4E3A\u5B57\u7B26\u4E32\u8FD4\u56DE.',modeCodeText:"\u4EE3\u7801",modeCodeTitle:"\u5207\u6362\u81F3\u4EE3\u7801\u9AD8\u4EAE",modeFormText:"\u8868\u5355",modeFormTitle:"\u5207\u6362\u81F3\u8868\u5355\u7F16\u8F91",modeTextText:"\u6587\u672C",modeTextTitle:"\u5207\u6362\u81F3\u6587\u672C\u7F16\u8F91",modeTreeText:"\u6811",modeTreeTitle:"\u5207\u6362\u81F3\u6811\u7F16\u8F91",modeViewText:"\u89C6\u56FE",modeViewTitle:"\u5207\u6362\u81F3\u6811\u89C6\u56FE",modePreviewText:"\u9884\u89C8",modePreviewTitle:"\u5207\u6362\u81F3\u9884\u89C8\u6A21\u5F0F",examples:"\u4F8B\u5B50",default:"\u7F3A\u7701",containsInvalidProperties:"\u5305\u542B\u65E0\u6548\u7684\u5C5E\u6027",containsInvalidItems:"\u5305\u542B\u65E0\u6548\u9879\u76EE"},"pt-BR":{array:"Lista",auto:"Automatico",appendText:"Adicionar",appendTitle:"Adicionar novo campo com tipo 'auto' depois deste campo (Ctrl+Shift+Ins)",appendSubmenuTitle:"Selecione o tipo do campo a ser adicionado",appendTitleAuto:"Adicionar novo campo com tipo 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendente",ascendingTitle:"Organizar filhor do tipo ${type} em crescente",actionsMenu:"Clique para abrir o menu de a\xE7\xF5es (Ctrl+M)",cannotParseFieldError:"N\xE3o \xE9 poss\xEDvel analisar o campo no JSON",cannotParseValueError:"N\xE3o \xE9 poss\xEDvel analisar o valor em JSON",collapseAll:"Fechar todos campos",compactTitle:"Dados JSON compactos, remova todos os espa\xE7os em branco (Ctrl+Shift+I)",descending:"Descendente",descendingTitle:"Organizar o filhos do tipo ${type} em decrescente",duplicateKey:"chave duplicada",drag:"Arraste para mover este campo (Alt+Shift+Arrows)",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos selecionados (Ctrl+D)",duplicateField:"Duplicar este campo (Ctrl+D)",duplicateFieldError:"Nome do campo duplicado",empty:"vazio",expandAll:"Expandir todos campos",expandTitle:`Clique para expandir/encolher este campo (Ctrl+E).
|
|
Ctrl+Click para expandir/encolher incluindo todos os filhos.`,formatTitle:"Formate dados JSON, com recuo e feeds de linha adequados (Ctrl+I)",insert:"Inserir",insertTitle:"Inserir um novo campo do tipo 'auto' antes deste campo (Ctrl+Ins)",insertSub:"Selecionar o tipo de campo a ser inserido",object:"Objeto",ok:"Ok",redo:"Refazer (Ctrl+Shift+Z)",removeText:"Remover",removeTitle:"Remover campos selecionados (Ctrl+Del)",removeField:"Remover este campo (Ctrl+Del)",repairTitle:"Repare JSON: corrija aspas e caracteres de escape, remova coment\xE1rios e nota\xE7\xE3o JSONP, transforme objetos JavaScript em JSON.",selectNode:"Selecione um n\xF3dulo...",showAll:"mostrar todos",showMore:"mostrar mais",showMoreStatus:"exibindo ${visibleChilds} de ${totalChilds} itens.",sort:"Organizar",sortTitle:"Organizar os filhos deste ${type}",sortTitleShort:"Organizar os filhos",sortFieldLabel:"Campo:",sortDirectionLabel:"Dire\xE7\xE3o:",sortFieldTitle:"Selecione um campo filho pelo qual ordenar o array ou objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar o campo selecionado por ordem ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar o campo selecionado por ordem descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar ou transformar os filhos deste ${type}",transformTitleShort:"Filtrar, ordenar ou transformar conte\xFAdos",transformQueryTitle:"Insira uma express\xE3o JMESPath",transformWizardLabel:"Assistente",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Selecionar campos",transformQueryLabel:"Express\xE3o",transformPreviewLabel:"Visualizar",type:"Tipo",typeTitle:"Mudar o tipo deste campo",openUrl:"Ctrl+Click ou Ctrl+Enter para abrir link em nova janela",undo:"Desfazer \xFAltimo a\xE7\xE3o (Ctrl+Z)",validationCannotMove:"N\xE3o pode mover um campo como filho dele mesmo",autoType:'Campo do tipo "auto". O tipo do campo \xE9 determinao automaticamente a partir do seu valor e pode ser texto, n\xFAmero, verdade/falso ou nulo.',objectType:'Campo do tipo "objeto". Um objeto cont\xE9m uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma cole\xE7\xE3o de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao \xE9 determinado atrav\xE9s do seu valor, mas sempre retornara um texto.',examples:"Exemplos",default:"Revelia",containsInvalidProperties:"Cont\xE9m propriedades inv\xE1lidas",containsInvalidItems:"Cont\xE9m itens inv\xE1lidos"},tr:{array:"Dizin",auto:"Otomatik",appendText:"Ekle",appendTitle:"Bu alan\u0131n alt\u0131na 'otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",appendSubmenuTitle:"Eklenecek alan\u0131n tipini se\xE7",appendTitleAuto:"'Otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",ascending:"Artan",ascendingTitle:"${type}'\u0131n alt tiplerini artan d\xFCzende s\u0131rala",actionsMenu:"Aksiyon men\xFCs\xFCn\xFC a\xE7mak i\xE7in t\u0131klay\u0131n (Ctrl+M)",collapseAll:"T\xFCm alanlar\u0131 kapat",descending:"Azalan",descendingTitle:"${type}'\u0131n alt tiplerini azalan d\xFCzende s\u0131rala",drag:"Bu alan\u0131 ta\u015F\u0131mak i\xE7in s\xFCr\xFCkleyin (Alt+Shift+Arrows)",duplicateKey:"Var olan anahtar",duplicateText:"A\u015Fa\u011F\u0131ya kopyala",duplicateTitle:"Se\xE7ili alanlardan bir daha olu\u015Ftur (Ctrl+D)",duplicateField:"Bu alandan bir daha olu\u015Ftur (Ctrl+D)",duplicateFieldError:"Duplicate field name",cannotParseFieldError:"Alan JSON'a ayr\u0131\u015Ft\u0131r\u0131lam\u0131yor",cannotParseValueError:"JSON'a de\u011Fer ayr\u0131\u015Ft\u0131r\u0131lam\u0131yor",empty:"bo\u015F",expandAll:"T\xFCm alanlar\u0131 a\xE7",expandTitle:`Bu alan\u0131 a\xE7mak/kapatmak i\xE7in t\u0131kla (Ctrl+E).
|
|
Alt alanlarda dahil t\xFCm alanlar\u0131 a\xE7mak i\xE7in Ctrl+Click `,insert:"Ekle",insertTitle:"Bu alan\u0131n \xFCst\xFCne 'otomatik' tipinde yeni bir alan ekle (Ctrl+Ins)",insertSub:"Araya eklenecek alan\u0131n tipini se\xE7",object:"Nesne",ok:"Tamam",redo:"Yeniden yap (Ctrl+Shift+Z)",removeText:"Kald\u0131r",removeTitle:"Se\xE7ilen alanlar\u0131 kald\u0131r (Ctrl+Del)",removeField:"Bu alan\u0131 kald\u0131r (Ctrl+Del)",selectNode:"Bir nesne se\xE7...",showAll:"t\xFCm\xFCn\xFC g\xF6ster",showMore:"daha fazla g\xF6ster",showMoreStatus:"${totalChilds} alan\u0131n ${visibleChilds} alt alanlar\u0131 g\xF6steriliyor",sort:"S\u0131rala",sortTitle:"${type}'\u0131n alt alanlar\u0131n\u0131 s\u0131rala",sortTitleShort:"\u0130\xE7erikleri s\u0131rala",sortFieldLabel:"Alan:",sortDirectionLabel:"Y\xF6n:",sortFieldTitle:"Diziyi veya nesneyi s\u0131ralamak i\xE7in i\xE7 i\xE7e ge\xE7mi\u015F alan\u0131 se\xE7in",sortAscending:"Artan",sortAscendingTitle:"Se\xE7ili alan\u0131 artan d\xFCzende s\u0131rala",sortDescending:"Azalan",sortDescendingTitle:"Se\xE7ili alan\u0131 azalan d\xFCzende s\u0131rala",string:"Karakter Dizisi",transform:"D\xF6n\xFC\u015Ft\xFCr",transformTitle:"${type}'\u0131n alt alanlar\u0131n\u0131 filtrele, s\u0131rala veya d\xF6n\xFC\u015Ft\xFCr",transformTitleShort:"\u0130\xE7erikleri filterele, s\u0131rala veya d\xF6n\xFC\u015Ft\xFCr",transformQueryTitle:"JMESPath sorgusu gir",transformWizardLabel:"Sihirbaz",transformWizardFilter:"Filtre",transformWizardSortBy:"S\u0131rala",transformWizardSelectFields:"Alanlar\u0131 se\xE7",transformQueryLabel:"Sorgu",transformPreviewLabel:"\xD6nizleme",type:"Tip",typeTitle:"Bu alan\u0131n tipini de\u011Fi\u015Ftir",openUrl:"URL'i yeni bir pencerede a\xE7mak i\xE7in Ctrl+Click veya Ctrl+Enter",undo:"Son de\u011Fi\u015Fikli\u011Fi geri al (Ctrl+Z)",validationCannotMove:"Alt alan olarak ta\u015F\u0131nam\u0131yor",autoType:'Alan tipi "otomatik". Alan t\xFCr\xFC otomatik olarak de\u011Ferden belirlenirve bir dize, say\u0131, boolean veya null olabilir.',objectType:'Alan tipi "nesne". Bir nesne, s\u0131ralanmam\u0131\u015F bir anahtar / de\u011Fer \xE7ifti k\xFCmesi i\xE7erir.',arrayType:'Alan tipi "dizi". Bir dizi, d\xFCzenli de\u011Ferler koleksiyonu i\xE7erir.',stringType:'Alan tipi "karakter dizisi". Alan t\xFCr\xFC de\u011Ferden belirlenmez,ancak her zaman karakter dizisi olarak d\xF6nd\xFCr\xFCl\xFCr.',modeCodeText:"Kod",modeCodeTitle:"Kod vurgulay\u0131c\u0131ya ge\xE7",modeFormText:"Form",modeFormTitle:"Form d\xFCzenleyiciye ge\xE7",modeTextText:"Metin",modeTextTitle:"D\xFCz metin d\xFCzenleyiciye ge\xE7",modeTreeText:"A\u011Fa\xE7",modeTreeTitle:"A\u011Fa\xE7 d\xFCzenleyiciye ge\xE7",modeViewText:"G\xF6r\xFCn\xFCm",modeViewTitle:"A\u011Fa\xE7 g\xF6r\xFCn\xFCm\xFCne ge\xE7",examples:"\xD6rnekler",default:"Varsay\u0131lan",containsInvalidProperties:"Ge\xE7ersiz \xF6zellikler i\xE7eriyor",containsInvalidItems:"Ge\xE7ersiz \xF6\u011Feler i\xE7eriyor"},ja:{array:"\u914D\u5217",auto:"\u30AA\u30FC\u30C8",appendText:"\u8FFD\u52A0",appendTitle:'\u6B21\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306B"\u30AA\u30FC\u30C8"\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0 (Ctrl+Shift+Ins)',appendSubmenuTitle:"\u8FFD\u52A0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",appendTitleAuto:'"\u30AA\u30FC\u30C8"\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0 (Ctrl+Shift+Ins)',ascending:"\u6607\u9806",ascendingTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u6607\u9806\u306B\u4E26\u3079\u66FF\u3048",actionsMenu:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30A2\u30AF\u30B7\u30E7\u30F3\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F (Ctrl+M)",collapseAll:"\u3059\u3079\u3066\u3092\u6298\u308A\u305F\u305F\u3080",descending:"\u964D\u9806",descendingTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u964D\u9806\u306B\u4E26\u3079\u66FF\u3048",drag:"\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u79FB\u52D5 (Alt+Shift+Arrows)",duplicateKey:"\u8907\u88FD\u30AD\u30FC",duplicateText:"\u8907\u88FD",duplicateTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8907\u88FD (Ctrl+D)",duplicateField:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8907\u88FD (Ctrl+D)",duplicateFieldError:"\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059",cannotParseFieldError:"JSON\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093",cannotParseValueError:"JSON\u306E\u5024\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093",empty:"\u7A7A",expandAll:"\u3059\u3079\u3066\u3092\u5C55\u958B",expandTitle:`\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u5C55\u958B/\u6298\u308A\u305F\u305F\u3080 (Ctrl+E).
|
|
Ctrl+Click \u3067\u3059\u3079\u3066\u306E\u5B50\u8981\u7D20\u3092\u5C55\u958B/\u6298\u308A\u305F\u305F\u3080`,insert:"\u633F\u5165",insertTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u524D\u306B\u65B0\u3057\u3044\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u633F\u5165 (Ctrl+Ins)",insertSub:"\u633F\u5165\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u3092\u9078\u629E",object:"\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8",ok:"\u5B9F\u884C",redo:"\u3084\u308A\u76F4\u3059 (Ctrl+Shift+Z)",removeText:"\u524A\u9664",removeTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u524A\u9664 (Ctrl+Del)",removeField:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u524A\u9664 (Ctrl+Del)",selectNode:"\u30CE\u30FC\u30C9\u3092\u9078\u629E...",showAll:"\u3059\u3079\u3066\u3092\u8868\u793A",showMore:"\u3082\u3063\u3068\u898B\u308B",showMoreStatus:"${totalChilds}\u500B\u306E\u30A2\u30A4\u30C6\u30E0\u306E\u3046\u3061 ${visibleChilds}\u500B\u3092\u8868\u793A\u3057\u3066\u3044\u307E\u3059\u3002",sort:"\u4E26\u3079\u66FF\u3048",sortTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u4E26\u3079\u66FF\u3048",sortTitleShort:"\u4E26\u3079\u66FF\u3048",sortFieldLabel:"\u30D5\u30A3\u30FC\u30EB\u30C9:",sortDirectionLabel:"\u9806\u5E8F:",sortFieldTitle:"\u914D\u5217\u307E\u305F\u306F\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4E26\u3073\u66FF\u3048\u308B\u305F\u3081\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E",sortAscending:"\u6607\u9806",sortAscendingTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6607\u9806\u306B\u4E26\u3073\u66FF\u3048",sortDescending:"\u964D\u9806",sortDescendingTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u964D\u9806\u306B\u4E26\u3073\u66FF\u3048",string:"\u6587\u5B57\u5217",transform:"\u5909\u63DB",transformTitle:"${type}\u306E\u5B50\u8981\u7D20\u3092\u30D5\u30A3\u30EB\u30BF\u30FC\u30FB\u4E26\u3073\u66FF\u3048\u30FB\u5909\u63DB\u3059\u308B",transformTitleShort:"\u5185\u5BB9\u3092\u30D5\u30A3\u30EB\u30BF\u30FC\u30FB\u4E26\u3073\u66FF\u3048\u30FB\u5909\u63DB\u3059\u308B",extract:"\u62BD\u51FA",extractTitle:"${type}\u3092\u62BD\u51FA",transformQueryTitle:"JMESPath\u30AF\u30A8\u30EA\u3092\u5165\u529B",transformWizardLabel:"\u30A6\u30A3\u30B6\u30FC\u30C9",transformWizardFilter:"\u30D5\u30A3\u30EB\u30BF\u30FC",transformWizardSortBy:"\u4E26\u3073\u66FF\u3048",transformWizardSelectFields:"\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E",transformQueryLabel:"\u30AF\u30A8\u30EA",transformPreviewLabel:"\u30D7\u30EC\u30D3\u30E5\u30FC",type:"\u578B",typeTitle:"\u9078\u629E\u4E2D\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u3092\u5909\u66F4",openUrl:"Ctrl+Click \u307E\u305F\u306F Ctrl+Enter \u3067 \u65B0\u898F\u30A6\u30A3\u30F3\u30C9\u30A6\u3067URL\u3092\u958B\u304F",undo:"\u5143\u306B\u623B\u3059 (Ctrl+Z)",validationCannotMove:"\u5B50\u8981\u7D20\u306B\u79FB\u52D5\u3067\u304D\u307E\u305B\u3093 ",autoType:"\u30AA\u30FC\u30C8\uFF1A \u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u578B\u306F\u5024\u304B\u3089\u81EA\u52D5\u7684\u306B\u6C7A\u5B9A\u3055\u308C\u307E\u3059\u3002 (\u6587\u5B57\u5217\u30FB\u6570\u5024\u30FB\u30D6\u30FC\u30EB\u30FBnull)",objectType:"\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\uFF1A \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u9806\u5E8F\u304C\u6C7A\u307E\u3063\u3066\u3044\u306A\u3044\u30AD\u30FC\u3068\u5024\u306E\u30DA\u30A2\u7D44\u307F\u5408\u308F\u305B\u3067\u3059\u3002",arrayType:"\u914D\u5217\uFF1A \u914D\u5217\u306F\u9806\u5E8F\u304C\u6C7A\u307E\u3063\u3066\u3044\u308B\u5024\u306E\u96C6\u5408\u4F53\u3067\u3059\u3002",stringType:"\u6587\u5B57\u5217\uFF1A \u30D5\u30A3\u30FC\u30EB\u30C9\u578B\u306F\u5024\u304B\u3089\u6C7A\u5B9A\u3055\u308C\u307E\u305B\u3093\u304C\u3001\u5E38\u306B\u6587\u5B57\u5217\u3068\u3057\u3066\u8FD4\u3055\u308C\u307E\u3059\u3002",modeCodeText:"\u30B3\u30FC\u30C9\u30E2\u30FC\u30C9",modeCodeTitle:"\u30CF\u30A4\u30E9\u30A4\u30C8\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeFormText:"\u30D5\u30A9\u30FC\u30E0\u30E2\u30FC\u30C9",modeFormTitle:"\u30D5\u30A9\u30FC\u30E0\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeTextText:"\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9",modeTextTitle:"\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeTreeText:"\u30C4\u30EA\u30FC\u30E2\u30FC\u30C9",modeTreeTitle:"\u30C4\u30EA\u30FC\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modeViewText:"\u30D3\u30E5\u30FC\u30E2\u30FC\u30C9",modeViewTitle:"\u30D3\u30E5\u30FC\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",modePreviewText:"\u30D7\u30EC\u30D3\u30E5\u30FC",modePreviewTitle:"\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u5207\u308A\u66FF\u3048",examples:"\u4F8B",default:"\u30C7\u30D5\u30A9\u30EB\u30C8",containsInvalidProperties:"\u7121\u52B9\u306A\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059",containsInvalidItems:"\u7121\u52B9\u306A\u30A2\u30A4\u30C6\u30E0\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059"},"fr-FR":{array:"Liste",auto:"Auto",appendText:"Ajouter",appendTitle:"Ajouter un champ de type 'auto' apr\xE8s ce champ (Ctrl+Shift+Ins)",appendSubmenuTitle:"S\xE9lectionner le type du champ \xE0 ajouter",appendTitleAuto:"Ajouter un champ de type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendant",ascendingTitle:"Trier les enfants de ce ${type} par ordre ascendant",actionsMenu:"Ouvrir le menu des actions (Ctrl+M)",collapseAll:"Regrouper",descending:"Descendant",descendingTitle:"Trier les enfants de ce ${type} par ordre descendant",drag:"D\xE9placer (Alt+Shift+Arrows)",duplicateKey:"Dupliquer la cl\xE9",duplicateText:"Dupliquer",duplicateTitle:"Dupliquer les champs s\xE9lectionn\xE9s (Ctrl+D)",duplicateField:"Dupliquer ce champ (Ctrl+D)",duplicateFieldError:"Dupliquer le nom de champ",cannotParseFieldError:"Champ impossible \xE0 parser en JSON",cannotParseValueError:"Valeur impossible \xE0 parser en JSON",empty:"vide",expandAll:"\xC9tendre",expandTitle:`\xC9tendre/regrouper ce champ (Ctrl+E).
|
|
Ctrl+Click pour \xE9tendre/regrouper avec tous les champs.`,insert:"Ins\xE9rer",insertTitle:"Ins\xE9rer un champ de type 'auto' avant ce champ (Ctrl+Ins)",insertSub:"S\xE9lectionner le type de champ \xE0 ins\xE9rer",object:"Objet",ok:"Ok",redo:"Rejouer (Ctrl+Shift+Z)",removeText:"Supprimer",removeTitle:"Supprimer les champs s\xE9lectionn\xE9s (Ctrl+Del)",removeField:"Supprimer ce champ (Ctrl+Del)",searchTitle:"Rechercher champs et valeurs",searchNextResultTitle:"R\xE9sultat suivant (Enter)",searchPreviousResultTitle:"R\xE9sultat pr\xE9c\xE9dent (Shift + Enter)",selectNode:"S\xE9lectionner un n\u0153ud...",showAll:"voir tout",showMore:"voir plus",showMoreStatus:"${visibleChilds} \xE9l\xE9ments affich\xE9s de ${totalChilds}.",sort:"Trier",sortTitle:"Trier les champs de ce ${type}",sortTitleShort:"Trier",sortFieldLabel:"Champ:",sortDirectionLabel:"Direction:",sortFieldTitle:"S\xE9lectionner les champs permettant de trier les listes et objet",sortAscending:"Ascendant",sortAscendingTitle:"Trier les champs s\xE9lectionn\xE9s par ordre ascendant",sortDescending:"Descendant",sortDescendingTitle:"Trier les champs s\xE9lectionn\xE9s par ordre descendant",string:"Cha\xEEne",transform:"Transformer",transformTitle:"Filtrer, trier, or transformer les enfants de ce ${type}",transformTitleShort:"Filtrer, trier ou transformer le contenu",extract:"Extraire",extractTitle:"Extraire ce ${type}",transformQueryTitle:"Saisir une requ\xEAte JMESPath",transformWizardLabel:"Assistant",transformWizardFilter:"Filtrer",transformWizardSortBy:"Trier par",transformWizardSelectFields:"S\xE9lectionner les champs",transformQueryLabel:"Requ\xEAte",transformPreviewLabel:"Pr\xE9visualisation",type:"Type",typeTitle:"Changer le type de ce champ",openUrl:"Ctrl+Click ou Ctrl+Enter pour ouvrir l'url dans une autre fen\xEAtre",undo:"Annuler la derni\xE8re action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Champe de type "auto". Ce type de champ est automatiquement d\xE9termin\xE9 en fonction de la valeur et peut \xEAtre de type "cha\xEEne", "nombre", "bool\xE9en" ou null.',objectType:'Champ de type "objet". Un objet contient un ensemble non ordonn\xE9 de paires cl\xE9/valeur.',arrayType:'Champ de type "liste". Une liste contient une collection ordonn\xE9e de valeurs.',stringType:`Champ de type "cha\xEEne". Ce type de champ n'est pas d\xE9termin\xE9 en fonction de la valeur, mais retourne syst\xE9matiquement une cha\xEEne de caract\xE8res.`,modeEditorTitle:"Changer mode d'\xE9dition",modeCodeText:"Code",modeCodeTitle:"Activer surlignage code",modeFormText:"Formulaire",modeFormTitle:"Activer formulaire",modeTextText:"Texte",modeTextTitle:"Activer \xE9diteur texte",modeTreeText:"Arbre",modeTreeTitle:"Activer \xE9diteur arbre",modeViewText:"Lecture seule",modeViewTitle:"Activer vue arbre",modePreviewText:"Pr\xE9visualisation",modePreviewTitle:"Activer mode pr\xE9visualiser",examples:"Exemples",default:"D\xE9faut",containsInvalidProperties:"Contient des propri\xE9t\xE9s non valides",containsInvalidItems:"Contient des \xE9l\xE9ments invalides"},de:{array:"Auflistung",auto:"Auto",appendText:"anh\xE4ngen",appendTitle:"F\xFCgen Sie nach diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Umschalt+Ein)",appendSubmenuTitle:"W\xE4hlen Sie den Typ des neuen Feldes",appendTitleAuto:"Ein neues Feld vom Typ 'auto' hinzuf\xFCgen (Strg+Umschalt+Ein)",ascending:"Aufsteigend",ascendingTitle:"Sortieren Sie die Elemente dieses ${type} in aufsteigender Reihenfolge",actionsMenu:"Klicken Sie zum \xD6ffnen des Aktionsmen\xFCs (Strg+M)",cannotParseFieldError:"Feld kann nicht in JSON geparst werden",cannotParseValueError:"Wert kann nicht in JSON geparst werden",collapseAll:"Alle Felder zuklappen",compactTitle:"JSON-Daten verdichten, alle Leerzeichen entfernen (Strg+Umschalt+\\)",descending:"Absteigend",descendingTitle:"Sortieren Sie die Elemente dieses ${type} in absteigender Reihenfolge",drag:"Ziehen, um dieses Feld zu verschieben (Alt+Umschalt+Pfeile)",duplicateKey:"Doppelter Schl\xFCssel",duplicateText:"Duplikat",duplicateTitle:"Ausgew\xE4hlte Felder duplizieren (Strg+D)",duplicateField:"Dieses Feld duplizieren (Strg+D)",duplicateFieldError:"Doppelter Feldname",empty:"leer",expandAll:"Alle Felder anzeigen",expandTitle:`Klicken Sie, um dieses Feld zu erweitern/zu kollabieren (Strg+E).
|
|
Strg+Klicken Sie, um dieses Feld einschlie\xDFlich aller Elemente zu erweitern/zu kollabieren.`,formatTitle:"JSON-Daten mit korrekter Einr\xFCckung und Zeilenvorsch\xFCben formatieren (Strg+\\)",insert:"einf\xFCgen",insertTitle:"F\xFCgen Sie vor diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Einfg)",insertSub:"W\xE4hlen Sie den Typ des neuen Feldes",object:"Objekt",ok:"Ok",redo:"Wiederholen (Strg+Umschalt+Z)",removeText:"entfernen",removeTitle:"Ausgew\xE4hlte Felder entfernen (Strg+Entf)",removeField:"Dieses Feld entfernen (Strg+Entf)",repairTitle:"JSON reparieren: Anf\xFChrungszeichen und Escape-Zeichen korrigieren, Kommentare und JSONP-Notation entfernen, JavaScript-Objekte in JSON umwandeln.",searchTitle:"Suchfelder und Werte",searchNextResultTitle:"N\xE4chstes Ergebnis (Enter)",searchPreviousResultTitle:"Vorheriges Ergebnis (Umschalt + Eingabe)",selectNode:"W\xE4hlen Sie einen Knoten aus...",showAll:"alle anzeigen",showMore:"mehr anzeigen",showMoreStatus:"Anzeige von ${visibleChilds} von ${totalChilds}-Elementen.",sort:"Sortieren",sortTitle:"Sortieren Sie die Elemente dieses ${type}",sortTitleShort:"Inhalt sortieren",sortFieldLabel:"Feld:",sortDirectionLabel:"Richtung:",sortFieldTitle:"W\xE4hlen Sie das verschachtelte Feld, nach dem das Array oder Objekt sortiert werden soll.",sortAscending:"Aufsteigend",sortAscendingTitle:"Sortieren Sie das ausgew\xE4hlte Feld in aufsteigender Reihenfolge",sortDescending:"Absteigend",sortDescendingTitle:"Sortieren Sie das ausgew\xE4hlte Feld in absteigender Reihenfolge",string:"Zeichenfolge",transform:"Verwandeln",transformTitle:"Die Elemente dieses ${type} filtern, sortieren oder transformieren",transformTitleShort:"Inhalte filtern, sortieren oder transformieren",extract:"Auszug",extractTitle:"Extrahieren Sie diesen ${type}",transformQueryTitle:"Eine JMESPath-Abfrage eingeben",transformWizardLabel:"Zauberer",transformWizardFilter:"Filter",transformWizardSortBy:"Sortieren nach",transformWizardSelectFields:"Felder ausw\xE4hlen",transformQueryLabel:"Anfrage",transformPreviewLabel:"Vorschau",type:"Geben Sie ein.",typeTitle:"\xC4ndern Sie den Typ dieses Feldes",openUrl:"Strg+Klicken oder Strg+Eingabe, um die URL in einem neuen Fenster zu \xF6ffnen",undo:"Letzte Aktion r\xFCckg\xE4ngig machen (Strg+Z)",validationCannotMove:"Kann ein Feld nicht in ein Kind seiner selbst verschieben",autoType:'Feldtyp "auto". Der Feldtyp wird automatisch aus dem Wert bestimmt und kann ein String, eine Zahl, boolesch oder null sein.',objectType:'Feldtyp "Objekt". Ein Objekt enth\xE4lt eine ungeordnete Menge von Schl\xFCssel/Wert-Paaren.',arrayType:'Feldtyp "Array". Ein Array enth\xE4lt eine geordnete Sammlung von Werten.',stringType:'Feldtyp "Zeichenfolge". Der Feldtyp wird nicht aus dem Wert bestimmt, sondern immer als Zeichenfolge zur\xFCckgegeben.',modeEditorTitle:"Editor-Modus umschalten",modeCodeText:"Code",modeCodeTitle:"Umschalten auf Code-Highlighter",modeFormText:"Formular",modeFormTitle:"Zum Formular-Editor wechseln",modeTextText:"Text",modeTextTitle:"Zum Editor f\xFCr einfachen Text wechseln",modeTreeText:"Baum",modeTreeTitle:"Zum Baum-Editor wechseln",modeViewText:"Siehe",modeViewTitle:"Zur Baumansicht wechseln",modePreviewText:"Vorschau",modePreviewTitle:"In den Vorschau-Modus wechseln",examples:"Beispiele",default:"Standardm\xE4\xDFig",containsInvalidProperties:"Enth\xE4lt ung\xFCltige Eigenschaften",containsInvalidItems:"Enth\xE4lt ung\xFCltige Elemente"},ru:{array:"\u041C\u0430\u0441\u0441\u0438\u0432",auto:"\u0410\u0432\u0442\u043E",appendText:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",appendTitle:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435 \u0441 \u0442\u0438\u043F\u043E\u043C '\u0430\u0432\u0442\u043E' \u043F\u043E\u0441\u043B\u0435 \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F (Ctrl+Shift+Ins)",appendSubmenuTitle:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0438\u043F \u043F\u043E\u043B\u044F \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F",appendTitleAuto:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435 \u0441 \u0442\u0438\u043F\u043E\u043C '\u0430\u0432\u0442\u043E' (Ctrl+Shift+Ins)",ascending:"\u041F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",ascendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C ${type} \u043F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",actionsMenu:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u043C\u0435\u043D\u044E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (Ctrl+M)",cannotParseFieldError:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u0435 \u0432 JSON",cannotParseValueError:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 JSON",collapseAll:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435",compactTitle:"\u041C\u0438\u043D\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F JSON (Ctrl+Shift+I)",descending:"\u041F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",descendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C ${type} \u043F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",drag:"\u041F\u043E\u0442\u044F\u043D\u0438\u0442\u0435 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F (Alt+Shift+Arrows)",duplicateKey:"\u043F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0438\u0439\u0441\u044F \u043A\u043B\u044E\u0447",duplicateText:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C",duplicateTitle:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u043E\u043B\u0435\u0439 (Ctrl+D)",duplicateField:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u0435 (Ctrl+D)",duplicateFieldError:"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u044F",empty:"\u043F\u0443\u0441\u0442\u043E\u0439",expandAll:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435",expandTitle:`\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0434\u043B\u044F \u0440\u0430\u0441\u043A\u0440\u044B\u0442\u0438\u044F/\u0441\u043A\u0440\u044B\u0442\u0438\u044F \u043F\u043E\u043B\u044F (Ctrl+E)
|
|
\u0438\u043B\u0438 Ctrl+Click \u0434\u043B\u044F \u0440\u0430\u0441\u043A\u0440\u044B\u0442\u0438\u044F/\u0441\u043A\u0440\u044B\u0442\u0438\u044F \u0432\u0441\u0435\u0445 \u043F\u043E\u0442\u043E\u043C\u043A\u043E\u0432.`,formatTitle:"\u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 JSON (Ctrl+I)",insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C",insertTitle:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435 \u0441 \u0442\u0438\u043F\u043E\u043C '\u0430\u0432\u0442\u043E' \u043F\u0435\u0440\u0435\u0434 \u044D\u0442\u0438\u043C \u043F\u043E\u043B\u0435\u043C (Ctrl+Ins)",insertSub:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0438\u043F \u043F\u043E\u043B\u044F \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438",object:"\u041E\u0431\u044A\u0435\u043A\u0442",ok:"\u041E\u041A",redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C (Ctrl+Shift+Z)",removeText:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",removeTitle:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u043B\u044F (Ctrl+Del)",removeField:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043F\u043E\u043B\u0435 (Ctrl+Del)",repairTitle:"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 JSON: \u0438\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0438 escape-\u0441\u0438\u043C\u0432\u043E\u043B\u044B, \u0443\u0434\u0430\u043B\u0438\u0442\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u0438 \u043D\u043E\u0442\u0430\u0446\u0438\u044E JSONP, \u043C\u043E\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0439\u0442\u0435 \u043E\u0431\u044A\u0435\u043A\u0442\u044B JavaScript \u0432 JSON.",searchTitle:"\u041F\u043E\u0438\u0441\u043A",searchNextResultTitle:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 (Enter)",searchPreviousResultTitle:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 (Shift + Enter)",selectNode:"\u0412\u044B\u0431\u043E\u0440 \u0443\u0437\u043B\u0430...",showAll:"\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435",showMore:"\u0431\u043E\u043B\u044C\u0448\u0435",showMoreStatus:"${visibleChilds} \u0438\u0437 ${totalChilds}",sort:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430",sortTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u043F\u043E\u0442\u043E\u043C\u043A\u043E\u0432 \u0442\u0438\u043F\u0430 ${type}",sortTitleShort:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E",sortFieldLabel:"\u041F\u043E\u043B\u0435:",sortDirectionLabel:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435:",sortFieldTitle:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u043E\u043B\u0435 \u0434\u043B\u044F \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0438 \u043C\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u043B\u0438 \u043E\u0431\u044A\u0435\u043A\u0442\u0430",sortAscending:"\u041F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",sortAscendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u043E\u0440\u044F \u043F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E",sortDescending:"\u041F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",sortDescendingTitle:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u043E\u0440\u044F \u043F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E",string:"\u0421\u0442\u0440\u043E\u043A\u0430",transform:"\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F",transformTitle:"\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F, \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0438\u043B\u0438 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445 \u0442\u0438\u043F\u0430 ${type}",transformTitleShort:"\u0424\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u044F, \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0438\u043B\u0438 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0434\u0430\u043D\u043D\u044B\u0445",extract:"\u0418\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u0435",extractTitle:"\u0418\u0437\u0432\u043B\u0435\u0447\u044C \u0442\u0438\u043F ${type}",transformQueryTitle:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 JMESpath \u0437\u0430\u043F\u0440\u043E\u0441",transformWizardLabel:"\u041C\u0430\u0441\u0442\u0435\u0440",transformWizardFilter:"\u0424\u0438\u043B\u044C\u0442\u0440",transformWizardSortBy:"\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430",transformWizardSelectFields:"\u041F\u043E\u043B\u044F",transformQueryLabel:"\u0417\u0430\u043F\u0440\u043E\u0441",transformPreviewLabel:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",type:"\u0422\u0438\u043F",typeTitle:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0442\u0438\u043F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F",openUrl:"Ctrl+Click \u0438\u043B\u0438 Ctrl+Enter \u0434\u043B\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F url \u0432 \u043D\u043E\u0432\u043E\u043C \u043E\u043A\u043D\u0435",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C (Ctrl+Z)",validationCannotMove:"\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043E \u0432 \u043F\u043E\u0442\u043E\u043C\u043A\u0430",autoType:"\u0422\u0438\u043F \u043F\u043E\u043B\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u043F\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044E \u0438 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u043E\u0439, \u0447\u0438\u0441\u043B\u043E\u043C, \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u0438\u043C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\u043C \u0438\u043B\u0438 null.",objectType:"\u041E\u0431\u044A\u0435\u043A\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u0435\u043D\u043D\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u043F\u0430\u0440 \u043A\u043B\u044E\u0447/\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435.",arrayType:"\u041C\u0430\u0441\u0441\u0438\u0432 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u0435\u043D\u043D\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439.",stringType:"\u0422\u0438\u043F \u043F\u043E\u043B\u044F \u043D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u0438\u0437 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F, \u043D\u043E \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044F \u043A\u0430\u043A \u0441\u0442\u0440\u043E\u043A\u0430.",modeEditorTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0440\u0435\u0436\u0438\u043C\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430",modeCodeText:"\u041A\u043E\u0434",modeCodeTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043A\u043E\u0434\u0430",modeFormText:"\u0424\u043E\u0440\u043C\u0430",modeFormTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0444\u043E\u0440\u043C\u044B",modeTextText:"\u0422\u0435\u043A\u0441\u0442",modeTextTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0442\u0435\u043A\u0441\u0442\u0430",modeTreeText:"\u0414\u0435\u0440\u0435\u0432\u043E",modeTreeTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430",modeViewText:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0434\u0435\u0440\u0435\u0432\u0430",modeViewTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430",modePreviewText:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",modePreviewTitle:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432 \u0440\u0435\u0436\u0438\u043C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430",examples:"\u041F\u0440\u0438\u043C\u0435\u0440\u044B",default:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",containsInvalidProperties:"\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430",containsInvalidItems:"\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B"},ko:{array:"\uBC30\uC5F4",auto:"\uC790\uB3D9",appendText:"\uCD94\uAC00",appendTitle:'\uC120\uD0DD\uD55C \uC694\uC18C \uC544\uB798\uC5D0 "\uC790\uB3D9" \uC694\uC18C\uB97C \uCD94\uAC00\uD569\uB2C8\uB2E4. (Ctrl + Shift + Ins)',appendSubmenuTitle:"\uCD94\uAC00\uD560 \uC694\uC18C\uC758 \uC720\uD615\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",appendTitleAuto:'"\uC790\uB3D9" \uC694\uC18C\uB97C \uCD94\uAC00\uD569\uB2C8\uB2E4. (Ctrl + Shift + Ins)',ascending:"\uC624\uB984\uCC28\uC21C",ascendingTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uC624\uB984\uCC28\uC21C \uC815\uB82C\uD569\uB2C8\uB2E4.",actionsMenu:"\uBA54\uB274 \uC5F4\uAE30 (Ctrl + M)",cannotParseFieldError:"JSON\uC758 \uC694\uC18C\uB97C \uD574\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",cannotParseValueError:"JSON\uC758 \uAC12\uC744 \uD574\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",collapseAll:"\uBAA8\uB450 \uC811\uAE30",compactTitle:"\uBAA8\uB4E0 \uACF5\uBC31\uC744 \uC81C\uAC70\uD558\uC5EC JSON \uB370\uC774\uD130\uB97C \uC791\uAC8C \uB9CC\uB4ED\uB2C8\uB2E4. (Ctrl + Shift + I)",descending:"\uB0B4\uB9BC\uCC28\uC21C",descendingTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uB0B4\uB9BC\uCC28\uC21C\uC73C\uB85C \uC815\uB82C",drag:"\uB4DC\uB798\uADF8\uD558\uC5EC \uC694\uC18C\uB97C \uC774\uB3D9\uD569\uB2C8\uB2E4. (Alt + Shift + Arrows)",duplicateKey:"\uBCF5\uC81C\uD0A4",duplicateText:"\uBCF5\uC81C",duplicateTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uBCF5\uC81C\uD569\uB2C8\uB2E4. (Ctrl + D)",duplicateField:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uBCF5\uC81C\uD569\uB2C8\uB2E4. (Ctrl + D)",duplicateFieldError:"\uC694\uC18C \uC774\uB984\uC774 \uC911\uBCF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",empty:"\uBE44\uC5B4\uC788\uC74C",expandAll:"\uBAA8\uB450 \uC5F4\uAE30",expandTitle:`\uD074\uB9AD\uD558\uC5EC \uC694\uC18C\uB97C \uC5F4\uAC70\uB098 \uB2EB\uC2B5\uB2C8\uB2E4. (Ctrl + E)
|
|
Ctrl + Click\uC73C\uB85C \uBAA8\uB4E0 \uD558\uC704 \uC694\uC18C\uB97C \uC5F4\uAC70\uB098 \uB2EB\uC2B5\uB2C8\uB2E4.`,formatTitle:"\uC801\uC808\uD55C \uB4E4\uC5EC\uC4F0\uAE30 \uBC0F \uC904\uBC14\uAFC8\uC73C\uB85C JSON \uB370\uC774\uD130\uB97C \uC815\uD615\uD654\uD569\uB2C8\uB2E4. (Ctrl + I)",insert:"\uC0BD\uC785",insertTitle:"\uC120\uD0DD\uD55C \uC694\uC18C \uC704\uC5D0 \uC0C8\uC694\uC18C\uB97C \uC0BD\uC785\uD569\uB2C8\uB2E4. (Ctrl + Ins)",insertSub:"\uC0BD\uC785\uD560 \uC694\uC18C\uC758 \uC720\uD615\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",object:"\uAC1D\uCCB4",ok:"\uD655\uC778",redo:"\uB2E4\uC2DC \uC2E4\uD589 (Ctrl + Shift + Z)",removeText:"\uC0AD\uC81C",removeTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. (Ctrl + Del)",removeField:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. (Ctrl + Del)",repairTitle:"JSON \uAD50\uC815: JSON \uB0B4\uC758 \uC8FC\uC11D\uACFC JSONP \uD45C\uAE30\uBC95\uC744 \uC9C0\uC6B0\uACE0 \uB530\uC634\uD45C\uC640 \uC774\uC2A4\uCF00\uC774\uD504 \uBB38\uC790\uB97C \uC218\uC815\uD569\uB2C8\uB2E4.",searchTitle:"\uC694\uC18C \uB610\uB294 \uAC12 \uCC3E\uAE30",searchNextResultTitle:"\uB2E4\uC74C\uC73C\uB85C \uCC3E\uAE30 (Enter)",searchPreviousResultTitle:"\uC774\uC804\uC73C\uB85C \uCC3E\uAE30 (Shift + Enter)",selectNode:"\uC694\uC18C\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694...",showAll:"\uBAA8\uB450\uBCF4\uAE30",showMore:"\uB354\uBCF4\uAE30",showMoreStatus:"${totalChilds} \uAC1C\uC758 \uD56D\uBAA9 \uC911 ${visibleChilds} \uAC1C\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.",sort:"\uC815\uB82C",sortTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uC815\uB82C\uD569\uB2C8\uB2E4.",sortTitleShort:"\uC815\uB82C",sortFieldLabel:"\uC694\uC18C:",sortDirectionLabel:"\uC21C\uC11C:",sortFieldTitle:"\uBC30\uC5F4\uC774\uB098 \uAC1D\uCCB4\uB97C \uC815\uB82C\uD558\uB294 \uC694\uC18C\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",sortAscending:"\uC624\uB984\uCC28\uC21C",sortAscendingTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uC624\uB984\uCC28\uC21C\uC73C\uB85C \uC815\uB82C\uD569\uB2C8\uB2E4.",sortDescending:"\uB0B4\uB9BC\uCC28\uC21C",sortDescendingTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uB97C \uB0B4\uB9BC\uCC28\uC21C\uC73C\uB85C \uC815\uB82C\uD569\uB2C8\uB2E4.",string:"\uBB38\uC790",transform:"\uBCC0\uD658",transformTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uD558\uC704 \uC694\uC18C\uB97C \uD544\uD130\uD558\uAC70\uB098 \uC815\uB82C \uB610\uB294 \uBCC0\uD658\uD569\uB2C8\uB2E4.",transformTitleShort:"\uB0B4\uC6A9\uC744 \uD544\uD130\uD558\uAC70\uB098 \uC815\uB82C \uB610\uB294 \uBCC0\uD658\uD569\uB2C8\uB2E4.",extract:"\uCD94\uCD9C",extractTitle:"\uC120\uD0DD\uD55C ${type}\uC758 \uAC12\uC744 \uCD5C\uC0C1\uC704\uC5D0 \uC704\uCE58\uC2DC\uD0B5\uB2C8\uB2E4.",transformQueryTitle:"JMESPath \uCFFC\uB9AC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",transformWizardLabel:"\uB9C8\uBC95\uC0AC",transformWizardFilter:"\uD544\uD130",transformWizardSortBy:"\uC815\uB82C",transformWizardSelectFields:"\uC694\uC18C\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",transformQueryLabel:"\uCFFC\uB9AC",transformPreviewLabel:"\uBBF8\uB9AC\uBCF4\uAE30",type:"\uC720\uD615",typeTitle:"\uC120\uD0DD\uD55C \uC694\uC18C\uC758 \uC720\uD615\uC744 \uBCC0\uACBD\uD569\uB2C8\uB2E4.",openUrl:"Ctrl + Click \uB610\uB294 Ctrl + Enter\uB85C \uC0C8 \uCC3D\uC5D0\uC11C URL \uC5F4\uAE30",undo:"\uC2E4\uD589 \uCDE8\uC18C (Ctrl + Z)",validationCannotMove:"\uD558\uC704 \uC694\uC18C\uB85C \uC774\uB3D9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",autoType:"\uC790\uB3D9: \uC694\uC18C\uC758 \uD615\uC2DD\uC774 \uAC12\uC758 \uC720\uD615\uC73C\uB85C \uACB0\uC815\uB429\uB2C8\uB2E4. \uBB38\uC790, \uC22B\uC790, \uBD80\uC6B8, \uB610\uB294 null\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4.",objectType:"\uAC1D\uCCB4: \uC21C\uC11C\uB300\uB85C \uB098\uC5F4\uB418\uC9C0 \uC54A\uC740 \uC774\uB984/\uAC12 \uC30D\uC73C\uB85C \uC774\uB8E8\uC5B4\uC9C4 \uC9D1\uD569\uC785\uB2C8\uB2E4.",arrayType:"\uBC30\uC5F4: \uC21C\uC11C\uB300\uB85C \uB098\uC5F4\uB41C \uAC12\uC758 \uC9D1\uD569\uC785\uB2C8\uB2E4.",stringType:"\uBB38\uC790: \uC694\uC18C\uC758 \uC720\uD615\uC774 \uAC12\uC5D0\uC11C \uACB0\uC815\uB418\uC9C0 \uC54A\uC9C0\uB9CC \uD56D\uC0C1 \uBB38\uC790\uB85C \uBC18\uD658\uB429\uB2C8\uB2E4.",modeEditorTitle:"\uD3B8\uC9D1\uAE30 \uC720\uD615 \uBCC0\uACBD",modeCodeText:"\uCF54\uB4DC",modeCodeTitle:"\uD615\uC2DD \uAD50\uC815\uC744 \uB3C4\uC640\uC8FC\uB294 \uAE30\uB2A5\uC774 \uD3EC\uD568\uB41C \uBB38\uC790 \uD3B8\uC9D1\uAE30",modeFormText:"\uC785\uB825 \uC591\uC2DD",modeFormTitle:"\uC815\uD574\uC9C4 \uC694\uC18C\uC5D0 \uAC12\uC744 \uC785\uB825\uD558\uB294 \uD3B8\uC9D1\uAE30",modeTextText:"\uBB38\uC790",modeTextTitle:"\uB2E8\uC21C \uBB38\uC790 \uD3B8\uC9D1\uAE30",modeTreeText:"\uD2B8\uB9AC",modeTreeTitle:"\uD2B8\uB9AC \uAD6C\uC870\uB85C \uD45C\uC2DC\uB418\uB294 \uD3B8\uC9D1\uAE30",modeViewText:"\uBCF4\uAE30",modeViewTitle:"\uC77D\uAE30\uC804\uC6A9 \uD2B8\uB9AC \uAD6C\uC870\uB85C JSON\uC744 \uD45C\uC2DC",modePreviewText:"\uBBF8\uB9AC\uBCF4\uAE30",modePreviewTitle:"\uC77D\uAE30\uC804\uC6A9 \uBB38\uC790\uB85C JSON\uC744 \uD45C\uC2DC",examples:"\uC608\uC81C",default:"\uAE30\uBCF8\uAC12",containsInvalidProperties:"\uC798\uBABB\uB41C \uC18D\uC131\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",containsInvalidItems:"\uC798\uBABB\uB41C \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4"}},S=Object.keys(U),M="en",K=typeof navigator!="undefined"?navigator.language||navigator.userLanguage:void 0,j=S.find(function(w){return w===K})||M;function X(w){var f;w&&((f=S.find(function(_){return _===w}))?j=f:console.error("Language not found"))}function F(w){if(w)for(var f in w)(function(_){S.find(function(I){return I===_})||S.push(_),U[_]=Object.assign({},U[M],U[_],w[_])})(f)}function N(w,f,_){var I=U[_=_||j][w]||U[M][w]||w;if(f)for(var C in f)I=I.replace("${"+C+"}",f[C]);return I}},6056:function(ae,U,O){O.d(U,{J:function(){return j},r:function(){return K}});var U=O(5156),S=O.n(U),M=O(9791);function K(X,_){var N,w=_.sort,f=_.filter,_=_.projection,I="";return f?(N=f.field!=="@"?["0"].concat((0,M.parsePath)("."+f.field)):["0"],N=typeof(0,M.get)(X,N)=="string"?f.value:(0,M.parseString)(f.value),I+="[? "+f.field+" "+f.relation+" `"+JSON.stringify(N)+"`]"):I+=Array.isArray(X)?"[*]":"@",w&&(w.direction==="desc"?I+=" | reverse(sort_by(@, &"+w.field+"))":I+=" | sort_by(@, &"+w.field+")"),_&&(I[I.length-1]!=="]"&&(I+=" | [*]"),_.fields.length===1?I+="."+_.fields[0]:1<_.fields.length&&(I+=".{"+_.fields.map(function(C){var h=C.split(".");return h[h.length-1]+": "+C}).join(", ")+"}")),I}function j(X,F){return S().search(X,F)}},4987:function(){function ae(m){m===void 0||"remove"in m||Object.defineProperty(m,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode!==void 0&&this.parentNode.removeChild(this)}})}typeof Element!="undefined"&&(window.Element!==void 0&&ae(window.Element.prototype),window.CharacterData!==void 0&&ae(window.CharacterData.prototype),window.DocumentType!==void 0)&&ae(window.DocumentType.prototype),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(m){for(var O=0;O<this.length;O++){var U=this[O];if(m.call(this,U,O,this))return O}return-1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(m){return m=this.findIndex(m),this[m]},configurable:!0,writable:!0}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},341:function(ae,l,h){h.r(l),h.d(l,{previewModeMixins:function(){return c}});var U=h(1262),S=h(4188),M=h(6436),K=h(2474);function j(n){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(n)}function X(n,s){for(var i=0;i<s.length;i++){var o=s[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,function(a){return a=function(e,t){if(j(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r===void 0)return(t==="string"?String:Number)(e);if(r=r.call(e,t||"default"),j(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(a,"string"),j(a)==="symbol"?a:String(a)}(o.key),o)}}var F=function(){function n(o,a,e){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.onChange=o,this.calculateItemSize=a||function(){return 1},this.limit=e,this.items=[],this.index=-1}var s,i;return s=n,(i=[{key:"add",value:function(o){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(o),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var o=this.calculateItemSize,a=0;return this.items.forEach(function(e){a+=o(e)}),a}},{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()}}])&&X(s.prototype,i),Object.defineProperty(s,"prototype",{writable:!1}),n}(),N=h(7907),w=h(6056),f=h(6617),_=h(6210),I=h(2558),l=h(8458),C=h(9791),h=l.textModeMixins[0].mixin,l={create:function(o){var s=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},i=(s.statusBar===void 0&&(s.statusBar=!0),s.mainMenuBar=s.mainMenuBar!==!1,s.enableSort=s.enableSort!==!1,s.enableTransform=s.enableTransform!==!1,s.createQuery=s.createQuery||w.r,s.executeQuery=s.executeQuery||w.J,typeof(this.options=s).indentation=="number"?this.indentation=Number(s.indentation):this.indentation=2,(0,N.cC)(this.options.languages),(0,N.m0)(this.options.language),this.mode="preview",this),o=(this.container=o,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,C.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=o.clientWidth,this.height=o.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(a){a.preventDefault()},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),o=(this.frameFocusTracker=new K.R(o),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,C.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(o=document.createElement("button")).type="button",o.className="jsoneditor-format",o.title=(0,N.Iu)("formatTitle"),this.menu.appendChild(o),o.onclick=function(){i.executeWithBusyMessage(function(){try{i.format()}catch(a){i._onError(a)}},"formatting...")},(o=document.createElement("button")).type="button",o.className="jsoneditor-compact",o.title=(0,N.Iu)("compactTitle"),this.menu.appendChild(o),o.onclick=function(){i.executeWithBusyMessage(function(){try{i.compact()}catch(a){i._onError(a)}},"compacting...")},this.options.enableSort&&((o=document.createElement("button")).type="button",o.className="jsoneditor-sort",o.title=(0,N.Iu)("sortTitleShort"),o.onclick=function(){i._showSortModal()},this.menu.appendChild(o)),this.options.enableTransform&&((o=document.createElement("button")).type="button",o.title=(0,N.Iu)("transformTitleShort"),o.className="jsoneditor-transform",o.onclick=function(){i._showTransformModal()},this.dom.transform=o,this.menu.appendChild(o)),(o=document.createElement("button")).type="button",o.className="jsoneditor-repair",o.title=(0,N.Iu)("repairTitle"),this.menu.appendChild(o),!(o.onclick=function(){i.json===void 0&&i.executeWithBusyMessage(function(){try{i.repair()}catch(a){i._onError(a)}},"repairing...")})!==this.options.history&&(this.history=new F(function(){i.dom.undo.disabled=!i.history.canUndo(),i.dom.redo.disabled=!i.history.canRedo()},function(a){return 2*a.text.length},S.oW),(o=document.createElement("button")).type="button",o.className="jsoneditor-undo jsoneditor-separator",o.title=(0,N.Iu)("undo"),o.onclick=function(){var a=i.history.undo();a&&i._applyHistory(a)},this.menu.appendChild(o),this.dom.undo=o,(o=document.createElement("button")).type="button",o.className="jsoneditor-redo",o.title=(0,N.Iu)("redo"),o.onclick=function(){var a=i.history.redo();a&&i._applyHistory(a)},this.menu.appendChild(o),this.dom.redo=o,this.history.onChange()),this.options)&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new f.x(this.menu,this.options.modes,this.options.mode,function(a){try{i.setMode(a),i.modeSwitcher.focus()}catch(e){i._onError(e)}})),Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):this.options.showErrorTable===!0);this.errorTable=new M.Q({errorTableVisible:o,onToggleVisibility:function(){i.validate()},onFocusLine:null,onChangeHeight:function(a){a=a+(i.dom.statusBar?i.dom.statusBar.clientHeight:0)+1,i.content.style.marginBottom=-a+"px",i.content.style.paddingBottom=a+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),s.statusBar&&((0,C.addClassName)(this.content,"has-status-bar"),o=document.createElement("div"),(this.dom.statusBar=o).className="jsoneditor-statusbar",this.frame.appendChild(o),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",o.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",o.appendChild(this.dom.arrayInfo),o.appendChild(this.errorTable.getErrorCounter()),o.appendChild(this.errorTable.getWarningIcon()),o.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,C.limitCharacters)(n,S.WF),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,C.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)}}},c=(l._showSortModal=function(){var n=this;this.executeWithBusyMessage(function(){var s=n.options.modalAnchor||S.qD,i=n.get();n._renderPreview(),(0,_.showSortModal)(s,i,function(o){n.executeWithBusyMessage(function(){var a,e,t;a=i,e=o,Array.isArray(a)&&(t=(0,C.sort)(a,e.path,e.direction),n.sortedBy=e,n._setAndFireOnChange(t)),(0,C.isObject)(a)&&(t=(0,C.sortObjectKeys)(a,e.direction),n.sortedBy=e,n._setAndFireOnChange(t))},"sorting...")},n.sortedBy)},"parsing...")},l._showTransformModal=function(){var n=this;this.executeWithBusyMessage(function(){var a=n.options,s=a.createQuery,i=a.executeQuery,o=a.modalAnchor,a=a.queryDescription,e=n.get();n._renderPreview(),(0,I.showTransformModal)({container:o||S.qD,json:e,queryDescription:a,createQuery:s,executeQuery:i,onTransform:function(t){n.executeWithBusyMessage(function(){var r=i(e,t);n._setAndFireOnChange(r)},"transforming...")}})},"parsing...")},l.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()},l.compact=function(){var n=this.get(),s=JSON.stringify(n);this._setTextAndFireOnChange(s,n)},l.format=function(){var n=this.get(),s=JSON.stringify(n,null,this.indentation);this._setTextAndFireOnChange(s,n)},l.repair=function(){var n=this.getText();try{var s=(0,U.K)(n);this._setTextAndFireOnChange(s)}catch{}},l.focus=function(){this.dom.transform.focus()},l.set=function(n){this.history&&this.history.clear(),this._set(n)},l.update=function(n){this._set(n)},l._set=function(n){this.text=void 0,this.json=n,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},l._setAndFireOnChange=function(n){this._set(n),this._onChange()},l.get=function(){var n;return this.json===void 0&&(n=this.getText(),this.json=(0,C.parse)(n)),this.json},l.getText=function(){return this.text===void 0&&(this.text=JSON.stringify(this.json,null,this.indentation),this.options.escapeUnicode===!0)&&(this.text=(0,C.escapeUnicodeChars)(this.text)),this.text},l.setText=function(n){this.history&&this.history.clear(),this._setText(n)},l.updateText=function(n){this.getText()!==n&&this._setText(n)},l._setText=function(n,s){var i;this.options.escapeUnicode===!0?this.text=(0,C.escapeUnicodeChars)(n):this.text=n,this.json=s,this._renderPreview(),this.json===void 0?(i=this).executeWithBusyMessage(function(){try{i.json=i.get(),i._renderPreview(),i._pushHistory()}catch{}},"parsing..."):this._pushHistory(),this._debouncedValidate()},l._setTextAndFireOnChange=function(n,s){this._setText(n,s),this._onChange()},l._applyHistory=function(n){this.json=n.json,this.text=n.text,this._renderPreview(),this._debouncedValidate()},l._pushHistory=function(){var n;this.history&&(n={text:this.text,json:this.json},this.history.add(n))},l.executeWithBusyMessage=function(n,s){var i;this.getText().length>S.EX?((0,C.addClassName)((i=this).frame,"busy"),i.dom.busyContent.innerText=s,setTimeout(function(){n(),(0,C.removeClassName)(i.frame,"busy"),i.dom.busyContent.innerText=""},100)):n()},l.validate=h.validate,l._renderErrors=h._renderErrors,[{mode:"preview",mixin:l,data:"json"}])},6210:function(ae,U,O){O.r(U),O.d(U,{showSortModal:function(){return j}});var U=O(483),S=O.n(U),M=O(7907),K=O(9791);function j(X,C,N,w){var f=Array.isArray(C)?(0,K.getChildPaths)(C):[""],_=w&&w.path&&(0,K.contains)(f,w.path)?w.path:f[0],I=w&&w.direction||"asc",C='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,M.Iu)("sort")+"</div><form><table><tbody><tr> <td>"+(0,M.Iu)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+(0,M.Iu)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+(0,M.Iu)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,M.Iu)("sortAscending")+'" title="'+(0,M.Iu)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,M.Iu)("sortDescending")+'" title="'+(0,M.Iu)("sortDescendingTitle")+'" data-value="desc" class="jsoneditor-button-last jsoneditor-button-desc"/> </div> </td></tr><tr><td colspan="2" class="jsoneditor-modal-input jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,M.Iu)("ok")+'" /></td></tr></tbody></table></form></div>';S()({parent:X,content:C,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(h){var l=h.modalElem().querySelector("form"),c=h.modalElem().querySelector("#ok"),n=h.modalElem().querySelector("#field"),s=h.modalElem().querySelector("#direction");function i(o){s.value=o,s.className="jsoneditor-button-group jsoneditor-button-group-value-"+s.value}f.forEach(function(o){var a,e=document.createElement("option");e.text=(a=o)===""?"@":a[0]==="."?a.slice(1):a,e.value=o,n.appendChild(e)}),n.value=_||f[0],i(I||"asc"),s.onclick=function(o){i(o.target.getAttribute("data-value"))},c.onclick=function(o){o.preventDefault(),o.stopPropagation(),h.close(),N({path:n.value,direction:s.value})},l&&(l.onsubmit=c.onclick)}).afterClose(function(h){h.destroy()}).show()}},2558:function(ae,S,O){O.r(S),O.d(S,{showTransformModal:function(){return _}});var S=O(483),U=O.n(S),S=O(3879),M=O.n(S),K=O(7907);function j(I){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(I)}function X(I,C,h,l){if(typeof I=="boolean"||I instanceof Boolean||I===null||typeof I=="number"||I instanceof Number||typeof I=="string"||I instanceof String||I instanceof Date)return JSON.stringify(I);if(Array.isArray(I)){for(var c=I,n=C,s=h,i=l,o=n?s+n:void 0,a=n?`[
|
|
`:"[",e=0;e<c.length;e++){var t=c[e];if(n&&(a+=o),a+=t!==void 0&&typeof t!="function"?X(t,n,o,i):"null",e<c.length-1&&(a+=n?`,
|
|
`:","),a.length>i)return a+"..."}return a+=n?`
|
|
`+s+"]":"]"}if(I&&j(I)==="object"){var r,d=I,p=C,s=h,g=l,A=p?s+p:void 0,x=!0,E=p?`{
|
|
`:"{";if(typeof d.toJSON=="function")return X(d.toJSON(),p,s,g);for(r in d)if(function(V,u){return Object.prototype.hasOwnProperty.call(V,u)}(d,r)){var W=d[r];if(x?x=!1:E+=p?`,
|
|
`:",",(E=(E+=p?A+'"'+r+'": ':'"'+r+'":')+X(W,p,A,g)).length>g)return E+"..."}return E+=p?`
|
|
`+s+"}":"}"}}function F(I,C){for(var h="";0<C--;)h+=I;return h}var N=O(9791),w=O(4188),f='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 _(o){var C=o.container,h=o.json,l=o.queryDescription,l=l===void 0?f:l,c=o.createQuery,n=o.executeQuery,s=o.onTransform,i=h,o='<label class="pico-modal-contents"><div class="pico-modal-header">'+(0,K.Iu)("transform")+"</div><p>"+l+'</p><div class="jsoneditor-jmespath-label">'+(0,K.Iu)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+(0,K.Iu)("transformWizardFilter")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-filter-field" > <select id="filterField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-relation" > <select id="filterRelation"> <option value="==">==</option> <option value="!=">!=</option> <option value="<"><</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,K.Iu)("transformWizardSortBy")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-sort-field"> <select id="sortField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-sort-order" > <select id="sortOrder"> <option value="asc">Ascending</option> <option value="desc">Descending</option> </select> </div> </td> </tr> <tr id="selectFieldsPart"> <th>'+(0,K.Iu)("transformWizardSelectFields")+'</th> <td class="jsoneditor-jmespath-filter"> <select class="jsoneditor-jmespath-select-fields" id="selectFields" multiple></select> </td> </tr> </tbody> </table></div><div class="jsoneditor-jmespath-label">'+(0,K.Iu)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+(0,K.Iu)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,K.Iu)("transformPreviewLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="preview" class="jsoneditor-transform-preview" readonly> </textarea></div><div class="jsoneditor-jmespath-block jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,K.Iu)("ok")+'" autofocus /></div></div>';U()({parent:C,content:o,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(a){var e=a.modalElem(),B=e.querySelector("#wizard"),t=e.querySelector("#ok"),r=e.querySelector("#filterField"),d=e.querySelector("#filterRelation"),p=e.querySelector("#filterValue"),g=e.querySelector("#sortField"),A=e.querySelector("#sortOrder"),x=e.querySelector("#selectFields"),E=e.querySelector("#query"),W=e.querySelector("#preview");Array.isArray(i)||(B.style.fontStyle="italic",B.textContent="(wizard not available for objects, only for arrays)"),(0,N.getChildPaths)(h).forEach(function(Q){var Q=y(Q),z=document.createElement("option"),z=(z.text=Q,z.value=Q,r.appendChild(z),document.createElement("option"));z.text=Q,z.value=Q,g.appendChild(z)});var B=(0,N.getChildPaths)(h,!0).filter(function(Y){return Y!==""}),B=(0<B.length?B.forEach(function(Q){var Q=y(Q),z=document.createElement("option");z.text=Q,z.value=Q,x.appendChild(z)}):(B=e.querySelector("#selectFieldsPart"))&&(B.style.display="none"),new(M())(r,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."})),V=new(M())(d,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),u=new(M())(g,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),v=new(M())(A,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),$=new(M())(x,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function y(Y){return Y===""?"@":Y[0]==="."?Y.slice(1):Y}B.on("selectr.change",G),V.on("selectr.change",G),p.oninput=G,u.on("selectr.change",G),v.on("selectr.change",G),$.on("selectr.change",G),e.querySelector(".pico-modal-contents").onclick=function(Y){Y.target.nodeName!=="A"&&Y.preventDefault()};var L=(0,N.debounce)(function(){try{var Y=n(i,E.value);W.className="jsoneditor-transform-preview",W.value=(Q=Y,z=2,ee=w.WF,typeof z=="number"?10<z?T=F(" ",10):1<=z&&(T=F(" ",z)):typeof z=="string"&&z!==""&&(T=z),(z=X(Q,T,"",ee)).length>ee?(Q=z,(typeof(T=ee)=="number"?Q.slice(0,T):Q)+"..."):z),t.disabled=!1}catch(P){W.className="jsoneditor-transform-preview jsoneditor-error",W.value=P.toString(),t.disabled=!0}var Q,z,ee,T},300);function H(Y,Q){try{E.value=c(Y,Q),t.disabled=!1,L()}catch(z){Y='Error: an error happened when executing "createQuery": '+(z.message||z.toString()),E.value="",t.disabled=!0,W.className="jsoneditor-transform-preview jsoneditor-error",W.value=Y}}function G(){var Y={};if(r.value&&d.value&&p.value&&(Y.filter={field:r.value,relation:d.value,value:p.value}),g.value&&A.value&&(Y.sort={field:g.value,direction:A.value}),x.value){for(var Q,z=[],ee=0;ee<x.options.length;ee++)x.options[ee].selected&&(Q=x.options[ee].value,z.push(Q));Y.projection={fields:z}}H(h,Y)}E.oninput=L,t.onclick=function(Y){Y.preventDefault(),Y.stopPropagation(),a.close(),s(E.value)},H(h,{}),setTimeout(function(){E.select(),E.focus(),E.selectionStart=3,E.selectionEnd=3})}).afterClose(function(a){a.destroy()}).show()}},8458:function(ae,s,O){O.r(s),O.d(s,{textModeMixins:function(){return a}});var U=O(1262),s=O(8170),S=O.n(s),M=O(4188),K=O(6436),j=O(2474),X=O(7907),F=O(6056),N=O(6617),w=O(6210),f=O(2558),_=O(9125),I=O(7026),C=O(9791);function h(e){return(h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function l(e,t){for(var r=0;r<t.length;r++){var d=t[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(e,function(p){return p=function(g,A){if(h(g)!=="object"||g===null)return g;var x=g[Symbol.toPrimitive];if(x===void 0)return(A==="string"?String:Number)(g);if(x=x.call(g,A||"default"),h(x)!=="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}(p,"string"),h(p)==="symbol"?p:String(p)}(d.key),d)}}var c=function(){function e(d,p){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.schema=d,this.schemaRefs=p||{},this.suggestions={},this.suggestionsRefs={},this._buildSuggestions()}var t,r;return t=e,(r=[{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,p,g){g[d]=g[d]||{},g[d].refs=g[d].refs||[],g[d].refs=(0,C.uniqueMergeArrays)(g[d].refs,[p])}},{key:"_handleSchemaEntry",value:function(d,p,g){if(p)if(p.$ref)this._handleRef(d,p.$ref,g);else{var A=this._checkOfConditon(p);if(A)this._handleOfCondition(d,p[A],g);else switch(p.type){case"object":this._handleObject(d,p,g);break;case"string":case"number":case"integer":this._handlePrimitive(d,p,g);break;case"boolean":this._handleBoolean(d,p,g);break;case"array":this._handleArray(d,p,g)}}else console.error("SchemaTextCompleter: schema node is missing for path",d)}},{key:"_handleObject",value:function(d,p,g){var A,x=this;(0,C.isObject)(p.properties)&&(A=Object.keys(p.properties),g[d]=g[d]||{},g[d].props=g[d].props||[],g[d].props=(0,C.uniqueMergeArrays)(g[d].props,A),A.forEach(function(E){(0,C.asyncExec)(function(){x._handleSchemaEntry("".concat(d,"/").concat(E),p.properties[E],g)})}))}},{key:"_handlePrimitive",value:function(d,p,g){g[d]=g[d]||{},(0,C.isArray)(p.examples)&&(g[d].examples=g[d].examples||[],g[d].examples=(0,C.uniqueMergeArrays)(g[d].examples,p.examples)),(0,C.isArray)(p.enum)&&(g[d].enum=g[d].enum||[],g[d].enum=(0,C.uniqueMergeArrays)(g[d].enum,p.enum))}},{key:"_handleBoolean",value:function(d,p,g){g[d]||(g[d]={bool:[!0,!1]})}},{key:"_handleArray",value:function(d,p,g){var A=this;p.items&&(0,C.asyncExec)(function(){A._handleSchemaEntry("".concat(d,"/\\d+"),p.items,g)})}},{key:"_handleOfCondition",value:function(d,p,g){var A=this;p&&p.length&&p.forEach(function(x){(0,C.asyncExec)(function(){A._handleSchemaEntry(d,x,g)})})}},{key:"_checkOfConditon",value:function(d){if(d)return d.oneOf?"oneOf":d.anyOf?"anyOf":d.allOf?"allOf":void 0}},{key:"getCompletions",value:function(d,p,g,A,x){var E=this;try{var W=I.parse(p.getValue()).pointers||{},B=function(V){function u(y){var L,H={props:"property",enum:"enum",bool:"boolean",examples:"examples"};V&&(L=V[y])!=null&&L.length&&(v=v.concat(V[y].map(function(G){return{caption:G+"",meta:"schema [".concat(H[y],"]"),score:$++,value:G+""}})))}var v=[],$=0;u("props"),u("enum"),u("bool"),u("examples"),v.length&&x(null,v)};Object.keys(W).forEach(function(V){(0,C.asyncExec)(function(){function u(y,L,H){var G,Y=Object.keys(L).reduce(function(T,P){return new RegExp("^".concat(H).concat(P)).test(y)&&(!T||T.length<P.length)?P:T});if(typeof Y=="string"){if((G=L[Y])!=null&&(G=G.refs)!=null&&G.length){var Q,z={};for(Q in L[Y].refs){var ee=L[Y].refs[Q];E.suggestionsRefs[ee]&&((ee=u(y,E.suggestionsRefs[ee],"".concat(H).concat(Y)))!=null&&ee.enum&&(z.enum=(0,C.uniqueMergeArrays)(z.enum,ee.enum)),ee!=null&&ee.examples&&(z.examples=(0,C.uniqueMergeArrays)(z.examples,ee.examples)),ee!=null&&ee.bool&&(z.bool=(0,C.uniqueMergeArrays)(z.bool,ee.bool)),ee!=null)&&ee.props&&(z.props=(0,C.uniqueMergeArrays)(z.props,ee.props))}return z}if(new RegExp("^".concat(H).concat(Y,"$")).test(y))return L[Y]}}var v,$;(($=W[V].key)==null?void 0:$.line)===g.row&&g.column>=W[V].key.column&&g.column<=W[V].keyEnd.column&&(v=V.slice(0,V.lastIndexOf("/"))),(v=(($=W[V].value)==null?void 0:$.line)===g.row&&(($=W[V].value)==null?void 0:$.line)===(($=W[V].valueEnd)==null?void 0:$.line)&&g.column>=W[V].value.column&&g.column<=W[V].valueEnd.column?V:v)&&($=u(v,E.suggestions,""),B($))})})}catch{}}}])&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function n(e){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var s={},i="ace/theme/jsoneditor";function o(){try{this.format()}catch{}}s.create=function(x){var t,r,d,p=this,g=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},E=(g.statusBar===void 0&&(g.statusBar=!0),g.mainMenuBar=g.mainMenuBar!==!1,g.enableSort=g.enableSort!==!1,g.enableTransform=g.enableTransform!==!1,g.createQuery=g.createQuery||F.r,g.executeQuery=g.executeQuery||F.J,g.showErrorTable=g.showErrorTable!==void 0?g.showErrorTable:["text","preview"],typeof(this.options=g).indentation=="number"?this.indentation=Number(g.indentation):this.indentation=2,(0,X.cC)(this.options.languages),(0,X.m0)(this.options.language),g.ace||S()),A=(this.mode=g.mode==="code"?"code":"text",this.mode==="code"&&E===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=g.theme||i,this.theme===i&&E&&(0,_.O)(),g.onTextSelectionChange&&this.onTextSelectionChange(g.onTextSelectionChange),this),x=(this.container=x,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0,this._debouncedValidate=(0,C.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=x.clientWidth,this.height=x.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(W){W.preventDefault()},this.frame.onkeydown=function(W){A._onKeyDown(W)},{target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null}),x=(this.frameFocusTracker=new j.R(x),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,C.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(x=document.createElement("button")).type="button",x.className="jsoneditor-format",x.title=(0,X.Iu)("formatTitle"),this.menu.appendChild(x),x.onclick=function(){try{A.format(),A._onChange()}catch(W){A._onError(W)}},(x=document.createElement("button")).type="button",x.className="jsoneditor-compact",x.title=(0,X.Iu)("compactTitle"),this.menu.appendChild(x),x.onclick=function(){try{A.compact(),A._onChange()}catch(W){A._onError(W)}},this.options.enableSort&&((x=document.createElement("button")).type="button",x.className="jsoneditor-sort",x.title=(0,X.Iu)("sortTitleShort"),x.onclick=function(){A._showSortModal()},this.menu.appendChild(x)),this.options.enableTransform&&((x=document.createElement("button")).type="button",x.title=(0,X.Iu)("transformTitleShort"),x.className="jsoneditor-transform",x.onclick=function(){A._showTransformModal()},this.menu.appendChild(x)),(x=document.createElement("button")).type="button",x.className="jsoneditor-repair",x.title=(0,X.Iu)("repairTitle"),this.menu.appendChild(x),x.onclick=function(){try{A.repair(),A._onChange()}catch(W){A._onError(W)}},this.mode==="code"&&((x=document.createElement("button")).type="button",x.className="jsoneditor-undo jsoneditor-separator",x.title=(0,X.Iu)("undo"),x.onclick=function(){p.aceEditor.getSession().getUndoManager().undo()},this.menu.appendChild(x),this.dom.undo=x,(x=document.createElement("button")).type="button",x.className="jsoneditor-redo",x.title=(0,X.Iu)("redo"),x.onclick=function(){p.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(x),this.dom.redo=x),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new N.x(this.menu,this.options.modes,this.options.mode,function(W){try{A.setMode(W),A.modeSwitcher.focus()}catch(B){A._onError(B)}})),this.mode==="code")&&((t=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),t.href="https://ace.c9.io/",t.target="_blank",t.className="jsoneditor-poweredBy",t.onclick=function(){window.open(t.href,t.target,"noreferrer")},this.menu.appendChild(t)),this.options.onEditable&&n(this.options.onEditable==="function")&&!this.options.onEditable({})),E=(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=(E=E.edit(this.editorDom)).getSession(),E.$blockScrolling=1/0,E.setTheme(this.theme),E.setOptions({readOnly:x}),E.setShowPrintMargin(!1),E.setFontSize("14px"),d.setMode("ace/mode/json"),d.setTabSize(this.indentation),d.setUseSoftTabs(!0),d.setUseWrapMode(!0),r=d.setAnnotations,d.setAnnotations=function(W){r.call(this,W&&W.length?W:A.annotations)},E.commands.bindKey("Ctrl-L",null),E.commands.bindKey("Command-L",null),E.commands.bindKey("Ctrl-\\",null),E.commands.bindKey("Command-\\",null),E.commands.bindKey("Ctrl-Shift-\\",null),E.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=E).on("change",this._onChange.bind(this)),E.on("changeSelection",this._onSelect.bind(this))):((d=document.createElement("textarea")).className="jsoneditor-text",d.spellcheck=!1,this.content.appendChild(d),this.textarea=d,this.textarea.readOnly=x,this.textarea.oninput===null?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),d.onselect=this._onSelect.bind(this),d.onmousedown=this._onMouseDown.bind(this),d.onblur=this._onBlur.bind(this)),this._updateHistoryButtons(),Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):this.options.showErrorTable===!0);this.errorTable=new K.Q({errorTableVisible:E,onToggleVisibility:function(){A._validateAndCatch()},onFocusLine:function(W){A.isFocused=!0,isNaN(W)||A.setTextSelection({row:W,column:1},{row:W,column:1e3})},onChangeHeight:function(W){W=W+(A.dom.statusBar?A.dom.statusBar.clientHeight:0)+1,A.content.style.marginBottom=-W+"px",A.content.style.paddingBottom=W+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),g.statusBar&&((0,C.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},x=document.createElement("div"),(this.dom.statusBar=x).className="jsoneditor-statusbar",this.frame.appendChild(x),(d=document.createElement("span")).className="jsoneditor-curserinfo-label",d.innerText="Ln:",(E=document.createElement("span")).className="jsoneditor-curserinfo-val",E.innerText="1",x.appendChild(d),x.appendChild(E),(g=document.createElement("span")).className="jsoneditor-curserinfo-label",g.innerText="Col:",(d=document.createElement("span")).className="jsoneditor-curserinfo-val",d.innerText="1",x.appendChild(g),x.appendChild(d),this.curserInfoElements.colVal=d,this.curserInfoElements.lnVal=E,(g=document.createElement("span")).className="jsoneditor-curserinfo-label",g.innerText="characters selected",g.style.display="none",(d=document.createElement("span")).className="jsoneditor-curserinfo-count",d.innerText="0",d.style.display="none",this.curserInfoElements.countLabel=g,this.curserInfoElements.countVal=d,x.appendChild(d),x.appendChild(g),x.appendChild(this.errorTable.getErrorCounter()),x.appendChild(this.errorTable.getWarningIcon()),x.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},s._onSchemaChange=function(e,t){this.aceEditor&&(this.options.allowSchemaSuggestions&&e?(this.aceEditor.setOption("enableBasicAutocompletion",[new c(e,t)]),this.aceEditor.setOption("enableLiveAutocompletion",!0)):(this.aceEditor.setOption("enableBasicAutocompletion",void 0),this.aceEditor.setOption("enableLiveAutocompletion",!1)))},s._onChange=function(){var e=this;if(!this.onChangeDisabled){if(setTimeout(function(){e._updateHistoryButtons&&e._updateHistoryButtons()}),this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(t){console.error("Error in onChange callback: ",t)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(t){console.error("Error in onChangeText callback: ",t)}}},s._updateHistoryButtons=function(){var e;this.aceEditor&&this.dom.undo&&this.dom.redo&&(e=this.aceEditor.getSession().getUndoManager())&&e.hasUndo&&e.hasRedo&&(this.dom.undo.disabled=!e.hasUndo(),this.dom.redo.disabled=!e.hasRedo())},s._showSortModal=function(){try{var e=this,t=this.options.modalAnchor||M.qD,r=this.get();(0,w.showSortModal)(t,r,function(d){var p;Array.isArray(r)&&(p=(0,C.sort)(r,d.path,d.direction),e.sortedBy=d,e.update(p)),(0,C.isObject)(r)&&(p=(0,C.sortObjectKeys)(r,d.direction),e.sortedBy=d,e.update(p))},e.sortedBy)}catch(d){this._onError(d)}},s._showTransformModal=function(){var e=this;try{var t=this.options,r=t.modalAnchor,d=t.createQuery,p=t.executeQuery,g=t.queryDescription,A=this.get();(0,f.showTransformModal)({container:r||M.qD,json:A,queryDescription:g,createQuery:d,executeQuery:p,onTransform:function(x){x=p(A,x),e.update(x)}})}catch(x){this._onError(x)}},s._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},s._onKeyDown=function(e){var t=!1;(e.which||e.keyCode)===73&&e.ctrlKey&&(e.shiftKey?this.compact():this.format(),this._onChange(),t=!0),t&&(e.preventDefault(),e.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},s._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},s._onBlur=function(){var e=this;setTimeout(function(){e.isFocused||(e._updateCursorInfo(),e._emitSelectionChange()),e.isFocused=!1})},s._updateCursorInfo=function(){var e,t,r,d,p,g=this;function A(){g.curserInfoElements.countVal.innerText!==p&&(g.curserInfoElements.countVal.innerText=p,g.curserInfoElements.countVal.style.display=p?"inline":"none",g.curserInfoElements.countLabel.style.display=p?"inline":"none"),g.curserInfoElements.lnVal.innerText=r,g.curserInfoElements.colVal.innerText=d}this.textarea?setTimeout(function(){var x=(0,C.getInputSelection)(g.textarea);x.startIndex!==x.endIndex&&(p=x.endIndex-x.startIndex),d=(p&&g.cursorInfo&&g.cursorInfo.line===x.end.row&&g.cursorInfo.column===x.end.column?(r=x.start.row,x.start):(r=x.end.row,x.end)).column,g.cursorInfo={line:r,column:d,count:p},g.options.statusBar&&A()},0):this.aceEditor&&this.curserInfoElements&&(e=this.aceEditor.getCursorPosition(),t=this.aceEditor.getSelectedText(),r=e.row+1,d=e.column+1,p=t.length,g.cursorInfo={line:r,column:d,count:p},this.options.statusBar)&&A()},s._emitSelectionChange=function(){var e;this._selectionChangedHandler&&(e=this.getTextSelection(),this._selectionChangedHandler(e.start,e.end,e.text))},s._refreshAnnotations=function(){var e,t=this.aceEditor&&this.aceEditor.getSession();t&&(e=t.getAnnotations().filter(function(r){return r.type==="error"}),t.setAnnotations(e))},s.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()},s.compact=function(){var e=this.get(),e=JSON.stringify(e);this.updateText(e)},s.format=function(){var e=this.get(),e=JSON.stringify(e,null,this.indentation);this.updateText(e)},s.repair=function(){var e=this.getText();try{var t=(0,U.K)(e);this.updateText(t)}catch{}},s.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},s.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},s.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},s.update=function(e){this.updateText(JSON.stringify(e,null,this.indentation))},s.get=function(){var e=this.getText();return(0,C.parse)(e)},s.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},s._setText=function(p,t){var r,d=this,p=this.options.escapeUnicode===!0?(0,C.escapeUnicodeChars)(p):p;this.textarea&&(this.textarea.value=p),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(p,-1),this.onChangeDisabled=!1,t&&(r=this,setTimeout(function(){r.aceEditor&&r.aceEditor.session.getUndoManager().reset()})),setTimeout(function(){d._updateHistoryButtons&&d._updateHistoryButtons()})),this._debouncedValidate()},s.setText=function(e){this._setText(e,!0)},s.updateText=function(e){this.getText()!==e&&this._setText(e,!1)},s.validate=function(){var e,t=this,r=[],d=[];try{var p=this.get(),g=(this.validateSchema&&!this.validateSchema(p)&&(r=this.validateSchema.errors.map(function(x){return x.type="validation",(0,C.improveSchemaError)(x)})),this.validationSequence=(this.validationSequence||0)+1,this),A=this.validationSequence;return function(x,E){if(!E)return Promise.resolve([]);try{var W=E(x);return((0,C.isPromise)(W)?W:Promise.resolve(W)).then(function(B){return Array.isArray(B)?B.filter(function(V){var u=(0,C.isValidValidationError)(V);return u||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',V),u}).map(function(V){return{dataPath:(0,C.stringifyPath)(V.path),message:V.message,type:"customValidation"}}):[]})}catch(B){return Promise.reject(B)}}(p,this.options.onValidate).then(function(x){return A===g.validationSequence&&(x=r.concat(d).concat(x),g._renderErrors(x),typeof t.options.onValidationError=="function"&&(0,C.isValidationErrorChanged)(x,t.lastSchemaErrors)&&t.options.onValidationError.call(t,x),t.lastSchemaErrors=x),t.lastSchemaErrors})}catch(x){return this.getText()&&((p=/\w*line\s*(\d+)\w*/g.exec(x.message))&&(e=+p[1]),d=[{type:"error",message:x.message.replace(/\n/g,"<br>"),line:e}]),this._renderErrors(d),typeof this.options.onValidationError=="function"&&(0,C.isValidationErrorChanged)(d,this.lastSchemaErrors)&&this.options.onValidationError.call(this,d),this.lastSchemaErrors=d,Promise.resolve(this.lastSchemaErrors)}},s._validateAndCatch=function(){this.validate().catch(function(e){console.error("Error running validation:",e)})},s._renderErrors=function(e){var r=this.getText(),t=[],r=(e.reduce(function(d,p){return typeof p.dataPath=="string"&&d.indexOf(p.dataPath)===-1&&d.push(p.dataPath),d},t),(0,C.getPositionForPath)(r,t));this.aceEditor&&(this.annotations=r.map(function(d){var p=e.filter(function(A){return A.dataPath===d.path}),g=p.map(function(A){return A.message}).join(`
|
|
`);return g?{row:d.line,column:d.column,text:"Schema validation error"+(p.length!==1?"s":"")+`:
|
|
`+g,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(e,r),this.aceEditor&&this.aceEditor.resize(!1)},s.getTextSelection=function(){var e,t,r,d={};return this.textarea?(r=(0,C.getInputSelection)(this.textarea),this.cursorInfo&&this.cursorInfo.line===r.end.row&&this.cursorInfo.column===r.end.column?(d.start=r.end,d.end=r.start):d=r,{start:d.start,end:d.end,text:this.textarea.value.substring(r.startIndex,r.endIndex)}):this.aceEditor?(r=this.aceEditor.getSelection(),e=this.aceEditor.getSelectedText(),t=r.getRange(),(r=r.getSelectionLead()).row===t.end.row&&r.column===t.end.column?d=t:(d.start=t.end,d.end=t.start),{start:{row:d.start.row+1,column:d.start.column+1},end:{row:d.end.row+1,column:d.end.column+1},text:e}):void 0},s.onTextSelectionChange=function(e){typeof e=="function"&&(this._selectionChangedHandler=(0,C.debounce)(e,this.DEBOUNCE_INTERVAL))},s.setTextSelection=function(e,t){var r,d,p;e&&t&&(this.textarea?(r=(0,C.getIndexForPosition)(this.textarea,e.row,e.column),p=(0,C.getIndexForPosition)(this.textarea,t.row,t.column),-1<r&&-1<p&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(r,p)):this.textarea.createTextRange&&((d=this.textarea.createTextRange()).collapse(!0),d.moveEnd("character",p),d.moveStart("character",r),d.select()),p=(this.textarea.value.match(/\n/g)||[]).length+1,r=this.textarea.scrollHeight/p,d=e.row*r,this.textarea.scrollTop=d>this.textarea.clientHeight?d-this.textarea.clientHeight/2:0)):this.aceEditor&&(p={start:{row:e.row-1,column:e.column-1},end:{row:t.row-1,column:t.column-1}},this.aceEditor.selection.setRange(p),this.aceEditor.scrollToLine(e.row-1,!0)))};var a=[{mode:"text",mixin:s,data:"text",load:o},{mode:"code",mixin:s,data:"text",load:o}]},8038:function(ae,Y,z){z.r(Y),z.d(Y,{treeModeMixins:function(){return ee}});var U={start:function(T,P,Z){return P.indexOf(T)===0},contain:function(T,P,Z){return-1<P.indexOf(T)}},S=z(897),M=z(2474);function K(T){return(K=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})(T)}function j(T,P){for(var Z=0;Z<P.length;Z++){var b=P[Z];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(T,function(k){return k=function(R,D){if(K(R)!=="object"||R===null)return R;var J=R[Symbol.toPrimitive];if(J===void 0)return(D==="string"?String:Number)(R);if(J=J.call(R,D||"default"),K(J)!=="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),K(k)==="symbol"?k:String(k)}(b.key),b)}}var X=function(){function T(){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");this.locked=!1}var P,Z;return P=T,(Z=[{key:"highlight",value:function(b){this.locked||(this.node!==b&&(this.node&&this.node.setHighlight(!1),this.node=b,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var b;this.locked||(b=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){b.node.setHighlight(!1),b.node=void 0,b.unhighlightTimer=void 0},0))}},{key:"_cancelUnhighlight",value:function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}}])&&j(P.prototype,Z),Object.defineProperty(P,"prototype",{writable:!1}),T}(),F=z(7907),N=z(6056),w=z(6617),Y=z(233),f=z.n(Y),_=z(2602),I=z(9791),C=z(6210),h=z(2558),l=z(4188);function c(T){return function(P){if(Array.isArray(P))return o(P)}(T)||function(P){if(typeof Symbol!="undefined"&&P[Symbol.iterator]!=null||P["@@iterator"]!=null)return Array.from(P)}(T)||i(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(T,P){return function(Z){if(Array.isArray(Z))return Z}(T)||function(Z,b){var k=Z==null?null:typeof Symbol!="undefined"&&Z[Symbol.iterator]||Z["@@iterator"];if(k!=null){var R,D,J,ne,me=[],Ce=!0,Ie=!1;try{if(J=(k=k.call(Z)).next,b===0){if(Object(k)!==k)return;Ce=!1}else for(;!(Ce=(R=J.call(k)).done)&&(me.push(R.value),me.length!==b);Ce=!0);}catch(ke){Ie=!0,D=ke}finally{try{if(!Ce&&k.return!=null&&(ne=k.return(),Object(ne)!==ne))return}finally{if(Ie)throw D}}return me}}(T,P)||i(T,P)||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 s(T,P){var Z,b,k,R,D=typeof Symbol!="undefined"&&T[Symbol.iterator]||T["@@iterator"];if(D)return b=!(Z=!0),{s:function(){D=D.call(T)},n:function(){var J=D.next();return Z=J.done,J},e:function(J){b=!0,k=J},f:function(){try{Z||D.return==null||D.return()}finally{if(b)throw k}}};if(Array.isArray(T)||(D=i(T))||P&&T&&typeof T.length=="number")return D&&(T=D),R=0,{s:P=function(){},n:function(){return R>=T.length?{done:!0}:{done:!1,value:T[R++]}},e:function(J){throw J},f:P};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 i(T,P){var Z;if(T)return typeof T=="string"?o(T,P):(Z=(Z=Object.prototype.toString.call(T).slice(8,-1))==="Object"&&T.constructor?T.constructor.name:Z)==="Map"||Z==="Set"?Array.from(T):Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z)?o(T,P):void 0}function o(T,P){(P==null||P>T.length)&&(P=T.length);for(var Z=0,b=new Array(P);Z<P;Z++)b[Z]=T[Z];return b}function a(T){return(a=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})(T)}function e(T,P){for(var Z=0;Z<P.length;Z++){var b=P[Z];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(T,function(k){return k=function(R,D){if(a(R)!=="object"||R===null)return R;var J=R[Symbol.toPrimitive];if(J===void 0)return(D==="string"?String:Number)(R);if(J=J.call(R,D||"default"),a(J)!=="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),a(k)==="symbol"?k:String(k)}(b.key),b)}}var t=function(){function T(b,k){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");this.editor=b,this.dom={},this.expanded=!1,k&&k instanceof Object?(this.setField(k.field,k.fieldEditable),"value"in k&&this.setValue(k.value,k.type),"internalValue"in k&&this.setInternalValue(k.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=(0,I.debounce)(this._onChangeValue.bind(this),T.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,I.debounce)(this._onChangeField.bind(this),T.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}var P,Z;return P=T,(Z=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:r}},{key:"_updateEditability",value:function(){var b,k;this.editable={field:!0,value:!0},this.editor&&(this.editable.field=this.editor.options.mode==="tree",this.editable.value=this.editor.options.mode!=="view",this.editor.options.mode!=="tree"&&this.editor.options.mode!=="form"||typeof this.editor.options.onEditable!="function"||(b=this.getValue.bind(this),typeof(k=this.editor.options.onEditable({field:this.field,get value(){return b()},path:this.getPath()}))=="boolean"?(this.editable.field=k,this.editable.value=k):a(k)==="object"&&k!==null?(typeof k.field=="boolean"&&(this.editable.field=k.field),typeof k.value=="boolean"&&(this.editable.value=k.value)):(console.error("Invalid return value for function onEditable.","Actual value:",k,".","Either a boolean or object { field: boolean, value: boolean } expected."),this.editable.field=!1,this.editable.value=!1)))}},{key:"getPath",value:function(){for(var b=this,k=[];b;){var R=b.getName();R!==void 0&&k.unshift(R),b=b.parent}return k}},{key:"getInternalPath",value:function(){for(var b=this,k=[];b;)b.parent&&k.unshift(b.getIndex()),b=b.parent;return k}},{key:"getName",value:function(){return this.parent?this.parent.type!=="array"?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(b){if(b){if(b.length===0)return this;if(b.length&&this.childs&&this.childs.length){for(var k=0;k<this.childs.length;++k)if(""+b[0]==""+this.childs[k].getName())return this.childs[k].findNodeByPath(b.slice(1))}}}},{key:"findNodeByInternalPath",value:function(b){if(b){for(var D=this,k=0;k<b.length&&D;k++)var R=b[k],D=D.childs[R];return D}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(b){for(var k=(0,I.parsePath)(b),R=this;R&&0<k.length;)(function(){var D=k.shift();if(typeof D=="number"){if(R.type!=="array")throw new Error("Cannot get child node at index "+D+": node is no array");R=R.childs[D]}else{if(R.type!=="object")throw new Error("Cannot get child node "+D+": node is no object");R=R.childs.filter(function(J){return J.field===D})[0]}})();return R}},{key:"findParents",value:function(){for(var b=[],k=this.parent;k;)b.unshift(k),k=k.parent;return b}},{key:"setError",value:function(b,k){this.error=b,this.errorChild=k,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var b=this,k=this.fieldError||this.valueError||this.error,R=this.dom.tdError;if(k&&this.dom&&this.dom.tr){(0,I.addClassName)(this.dom.tr,"jsoneditor-validation-error"),R||(R=document.createElement("td"),this.dom.tdError=R,this.dom.tdValue.parentNode.appendChild(R));var D=document.createElement("button"),J=(D.type="button",D.className="jsoneditor-button jsoneditor-schema-error",function(){b.dom.popupAnchor&&b.dom.popupAnchor.destroy()}),ne=function(){delete b.dom.popupAnchor},me=function(Se){var ke=b.editor.frame,Se=(b.dom.popupAnchor=(0,_.w)(D,b.editor.getPopupAnchor(),ne,Se),D.getBoundingClientRect()),ke=120<ke.getBoundingClientRect().width-Se.x?"jsoneditor-above":"jsoneditor-left",Se=document.createElement("div");Se.className="jsoneditor-popover "+ke,Se.appendChild(document.createTextNode(k.message)),b.dom.popupAnchor.appendChild(Se)},Ce=(D.onmouseover=function(){b.dom.popupAnchor||me(!0)},D.onfocus=function(){J(),me(!1)},D.onblur=function(){J()},this.errorChild);for(Ce&&(D.onclick=function(){Ce.findParents().forEach(function(Ie){Ie.expand(!1)}),Ce.scrollTo(function(){Ce.focus()})});R.firstChild;)R.removeChild(R.firstChild);R.appendChild(D)}else this.dom.tr&&(0,I.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),R&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){var b;return this.parent?(b=this.parent.childs.indexOf(this))!==-1?b:null:-1}},{key:"setParent",value:function(b){this.parent=b}},{key:"setField",value:function(b,k){this.field=b,this.previousField=b,this.fieldEditable=k===!0}},{key:"getField",value:function(){return this.field===void 0&&this._getDomField(),this.field}},{key:"setValue",value:function(b,k){var R,D,J,ne,me,Ce,Ie=this.childs;if(this.type=this._getType(b),k&&k!==this.type){if(k!=="string"||this.type!=="auto")throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+k+'"');this.type=k}if(this.type==="array"){for(this.childs||(this.childs=[]),R=0;R<b.length;R++)(me=b[R])===void 0||me instanceof Function||(R<this.childs.length?((J=this.childs[R]).fieldEditable=!1,J.index=R,J.setValue(me)):(J=new T(this.editor,{value:me}),ne=R<this.getMaxVisibleChilds(),this.appendChild(J,ne,!1)));for(D=this.childs.length;D>=b.length;D--)this.removeChild(this.childs[D],!1)}else if(this.type==="object"){for(this.childs||(this.childs=[]),D=this.childs.length-1;0<=D;D--)g(b,this.childs[D].field)||this.removeChild(this.childs[D],!1);for(var ke in R=0,b)g(b,ke)&&((me=b[ke])===void 0||me instanceof Function||((Ce=this.findChildByProperty(ke))?(Ce.setField(ke,!0),Ce.setValue(me)):(Ce=new T(this.editor,{field:ke,value:me}),ke=R<this.getMaxVisibleChilds(),this.appendChild(Ce,ke,!1))),R++);!(this.value="")===this.editor.options.sortObjectKeys&&this.sort([],"asc",!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=b;Array.isArray(Ie)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(b){var k,R,D,J,ne,me=this.childs;if(this.type=b.type,b.type==="array"){for(this.childs||(this.childs=[]),J=0;J<b.childs.length;J++)(k=b.childs[J])===void 0||k instanceof Function||(J<this.childs.length?((R=this.childs[J]).fieldEditable=!1,R.index=J,R.setInternalValue(k)):(R=new T(this.editor,{internalValue:k}),D=J<this.getMaxVisibleChilds(),this.appendChild(R,D,!1)));for(ne=this.childs.length;ne>=b.childs.length;ne--)this.removeChild(this.childs[ne],!1)}else if(b.type==="object"){for(this.childs||(this.childs=[]),J=0;J<b.childs.length;J++)(k=b.childs[J])===void 0||k instanceof Function||(J<this.childs.length?(delete(R=this.childs[J]).index,R.setField(k.field,!0),R.setInternalValue(k.value)):(R=new T(this.editor,{field:k.field,internalValue:k.value}),D=J<this.getMaxVisibleChilds(),this.appendChild(R,D,!1)));for(ne=this.childs.length;ne>=b.childs.length;ne--)this.removeChild(this.childs[ne],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=b.value;Array.isArray(me)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var b;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(b=this._detachFromDom(),this.clearDom(),this._attachToDom(b)):this.clearDom()}},{key:"getValue",value:function(){var b,k;return this.type==="array"?(b=[],this.childs.forEach(function(R){b.push(R.getValue())}),b):this.type==="object"?(k={},this.childs.forEach(function(R){k[R.getField()]=R.getValue()}),k):(this.value===void 0&&this._getDomValue(),this.value)}},{key:"getInternalValue",value:function(){return this.type==="array"?{type:this.type,childs:this.childs.map(function(b){return b.getInternalValue()})}:this.type==="object"?{type:this.type,childs:this.childs.map(function(b){return{field:b.getField(),value:b.getInternalValue()}})}:(this.value===void 0&&this._getDomValue(),{type:this.type,value:this.value})}},{key:"getLevel",value:function(){return this.parent?this.parent.getLevel()+1:0}},{key:"getNodePath",value:function(){var b=this.parent?this.parent.getNodePath():[];return b.push(this),b}},{key:"clone",value:function(){var b,k;return(b=new T(this.editor)).type=this.type,b.field=this.field,b.fieldInnerText=this.fieldInnerText,b.fieldEditable=this.fieldEditable,b.previousField=this.previousField,b.value=this.value,b.valueInnerText=this.valueInnerText,b.previousValue=this.previousValue,b.expanded=this.expanded,b.visibleChilds=this.visibleChilds,this.childs?(k=[],this.childs.forEach(function(R){R=R.clone(),R.setParent(b),k.push(R)}),b.childs=k):b.childs=void 0,b}},{key:"expand",value:function(b){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),b!==!1&&this.childs.forEach(function(k){k.expand(b)}),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(b){this.childs&&(this.hideChilds(),b!==!1&&this.childs.forEach(function(k){k.collapse(b)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var b=this.childs;if(b&&this.expanded){var b=this.dom.tr,k=b?b.parentNode:void 0;if(k){for(var R=this.getAppendDom(),D=(R.parentNode||((J=b.nextSibling)?k.insertBefore(R,J):k.appendChild(R)),Math.min(this.childs.length,this.visibleChilds)),J=this._getNextTr(),ne=0;ne<D;ne++){var me=this.childs[ne];me.getDom().parentNode||k.insertBefore(me.getDom(),J),me.showChilds()}b=this.getShowMoreDom(),J=this._getNextTr(),b.parentNode||k.insertBefore(b,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(b){var k=this.dom.tr,R=k?k.parentNode:void 0;R&&R.removeChild(k),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(b)}},{key:"hideChilds",value:function(b){var k;this.childs&&this.expanded&&((k=this.getAppendDom()).parentNode&&k.parentNode.removeChild(k),this.childs.forEach(function(R){R.hide()}),(k=this.getShowMoreDom()).parentNode&&k.parentNode.removeChild(k),b&&!b.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var b,k;this.dom.field&&this.editor&&this.editor.options&&typeof this.editor.options.onClassName=="function"&&this.dom.tree&&((0,I.removeAllClassNames)(this.dom.tree),b=this.getValue.bind(this),k=this.editor.options.onClassName({path:this.getPath(),field:this.field,get value(){return b()}})||"",(0,I.addClassName)(this.dom.tree,"jsoneditor-values "+k))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var b=0;b<this.childs.length;b++)this.childs[b].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var b=this.parent;b;)b.expanded||b.expand(),b=b.parent}},{key:"appendChild",value:function(b,k,R){var D,J;this._hasChilds()&&(b.setParent(this),b.fieldEditable=this.type==="object",this.type==="array"&&(b.index=this.childs.length),this.type==="object"&&b.field===void 0&&b.setField(""),this.childs.push(b),this.expanded&&k!==!1&&(k=b.getDom(),J=(D=this._getNextTr())?D.parentNode:void 0,D&&J&&J.insertBefore(k,D),b.showChilds(),this.visibleChilds++),R!==!1)&&(this.updateDom({updateIndexes:!0}),b.updateDom({recurse:!0}))}},{key:"moveBefore",value:function(b,k,R){var D,J,ne;this._hasChilds()&&((D=this.dom.tr?this.dom.tr.parentNode:void 0)&&((J=document.createElement("tr")).style.height=D.clientHeight+"px",D.appendChild(J)),b.parent&&b.parent.removeChild(b),k instanceof A||!k?this.childs.length+1>this.visibleChilds?(ne=this.childs[this.visibleChilds-1],this.insertBefore(b,ne,R)):this.appendChild(b,!0,R):this.insertBefore(b,k,R),D)&&J&&D.removeChild(J)}},{key:"insertBefore",value:function(b,k,R){if(this._hasChilds()){if(this.visibleChilds++,this.type==="object"&&b.field===void 0&&b.setField(""),k===this.append)b.setParent(this),b.fieldEditable=this.type==="object",this.childs.push(b);else{var D=this.childs.indexOf(k);if(D===-1)throw new Error("Node not found");b.setParent(this),b.fieldEditable=this.type==="object",this.childs.splice(D,0,b)}var J;this.expanded&&(D=b.getDom(),J=(k=k.getDom())?k.parentNode:void 0,k&&J&&J.insertBefore(D,k),b.showChilds(),this.showChilds()),R!==!1&&(this.updateDom({updateIndexes:!0}),b.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(b,k){this._hasChilds()&&(k=this.childs.indexOf(k),(k=this.childs[k+1])?this.insertBefore(b,k):this.appendChild(b))}},{key:"search",value:function(b,k){Array.isArray(k)||(k=[]);var R=b?b.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,this.field!==void 0&&k.length<=this.MAX_SEARCH_RESULTS&&(String(this.field).toLowerCase().indexOf(R)!==-1&&(this.searchField=!0,k.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach(function(D){D.search(b,k)}):this.value!==void 0&&k.length<=this.MAX_SEARCH_RESULTS&&(String(this.value).toLowerCase().indexOf(R)!==-1&&(this.searchValue=!0,k.push({node:this,elem:"value"})),this._updateDomValue()),k}},{key:"scrollTo",value:function(b){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,b)}},{key:"expandPathToNode",value:function(){for(var b=this;b&&b.parent;){for(var k=b.parent.type==="array"?b.index:b.parent.childs.indexOf(b);b.parent.visibleChilds<k+1;)b.parent.visibleChilds+=this.getMaxVisibleChilds();b.parent.expand(!1),b=b.parent}}},{key:"focus",value:function(b){if(T.focusElement=b,this.dom.tr&&this.dom.tr.parentNode){var k=this.dom;switch(b){case"drag":(k.drag||k.menu).focus();break;case"menu":k.menu.focus();break;case"expand":this._hasChilds()?k.expand.focus():k.field&&this.fieldEditable?(k.field.focus(),(0,I.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,I.selectContentEditable)(k.value)):k.menu.focus();break;case"field":k.field&&this.fieldEditable?(k.field.focus(),(0,I.selectContentEditable)(k.field)):k.value&&!this._hasChilds()?(k.value.focus(),(0,I.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,I.selectContentEditable)(k.value)):k.field&&this.fieldEditable?(k.field.focus(),(0,I.selectContentEditable)(k.field)):(this._hasChilds()?k.expand:k.menu).focus()}}}},{key:"containsNode",value:function(b){if(this===b)return!0;var k=this.childs;if(k){for(var R=0,D=k.length;R<D;R++)if(k[R].containsNode(b))return!0}return!1}},{key:"removeChild",value:function(b,k){if(this.childs){var R=this.childs.indexOf(b);if(R!==-1)return R<this.visibleChilds&&this.expanded&&this.visibleChilds--,b.hide(),delete b.searchField,delete b.searchValue,(b=this.childs.splice(R,1)[0]).parent=null,k!==!1&&this.updateDom({updateIndexes:!0}),b}}},{key:"_remove",value:function(b){this.removeChild(b)}},{key:"changeType",value:function(b){var k,R=this.type;R!==b&&(b!=="string"&&b!=="auto"||R!=="string"&&R!=="auto"?(k=this._detachFromDom(),this.clearDom(),(this.type=b)==="object"?(this.childs||(this.childs=[]),this.childs.forEach(function(D){D.clearDom(),delete D.index,D.fieldEditable=!0,D.field===void 0&&(D.field="")}),R!=="string"&&R!=="auto"||(this.expanded=!0)):b==="array"?(this.childs||(this.childs=[]),this.childs.forEach(function(D,J){D.clearDom(),D.fieldEditable=!1,D.index=J}),R!=="string"&&R!=="auto"||(this.expanded=!0)):this.expanded=!1,this._attachToDom(k)):this.type=b,b!=="auto"&&b!=="string"||(this.value=b==="string"?String(this.value):(0,I.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(b){var k;if(this.type==="array"){if(!Array.isArray(b)||this.childs.length!==b.length)return!1;for(k=0;k<this.childs.length;k++)if(!this.childs[k].deepEqual(b[k]))return!1}else if(this.type==="object"){if(a(b)!=="object"||!b)return!1;var R=Object.keys(b);if(this.childs.length!==R.length)return!1;for(k=0;k<R.length;k++){var D=this.childs[k];if(D.field!==R[k]||!D.deepEqual(b[D.field]))return!1}}else if(this.value!==b)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&this.type!=="array"&&this.type!=="object"&&(this.valueInnerText=(0,I.getInnerText)(this.dom.value),this.valueInnerText==="")&&this.dom.value.innerHTML!==""&&(this.dom.value.textContent=""),this.valueInnerText!==void 0)try{var b,k;(k=this.type==="string"?this._unescapeHTML(this.valueInnerText):(b=this._unescapeHTML(this.valueInnerText),(0,I.parseString)(b)))!==this.value&&(this.value=k,this._debouncedOnChangeValue())}catch{this._setValueError((0,F.Iu)("cannotParseValueError"))}}},{key:"_setValueError",value:function(b){this.valueError={message:b},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(b){this.fieldError={message:b},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var b,k=this.editor.getDomSelection(),R=(k.range&&(R=(0,I.textDiff)(String(this.value),String(this.previousValue)),k.range.startOffset=R.start,k.range.endOffset=R.end),this.editor.getDomSelection());R.range&&(b=(0,I.textDiff)(String(this.previousValue),String(this.value)),R.range.startOffset=b.start,R.range.endOffset=b.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:k,newSelection:R}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var b=this.editor.getDomSelection(),k=this.previousField||"",R=(b.range&&(R=(0,I.textDiff)(this.field,k),b.range.startOffset=R.start,b.range.endOffset=R.end),this.editor.getDomSelection());R.range&&(k=(0,I.textDiff)(k,this.field),R.range.startOffset=k.start,R.range.endOffset=k.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:b,newSelection:R}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var b=this.dom.value;if(b){var k=["jsoneditor-value"],R=this.value,D=this.type==="auto"?(0,I.getType)(R):this.type,J=D==="string"&&(0,I.isUrl)(R);if(k.push("jsoneditor-"+D),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"),b.className=k.join(" "),D==="array"||D==="object"?(k=this.childs?this.childs.length:0,b.title=this.type+" containing "+k+" items"):J&&this.editable.value?b.title=(0,F.Iu)("openUrl"):b.title="",D==="boolean"&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value?(this.dom.select||(this.dom.select=document.createElement("select"),this.id=this.field+"_"+new Date().getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id,(k=document.createElement("option")).value="",k.textContent="--",this.dom.select.appendChild(k),this._updateEnumOptions(),this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)),this.dom.select.value=this.enum.indexOf(this.value)!==-1?this.value:"",!this.schema||g(this.schema,"oneOf")||g(this.schema,"anyOf")||g(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.textContent="")):this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML,this.dom.tdValue.appendChild(this.dom.value)),this.editor.options.colorPicker&&typeof R=="string"&&(0,I.isValidColor)(R)?(this.dom.color||(this.dom.color=document.createElement("div"),this.dom.color.className="jsoneditor-color",this.dom.tdColor=document.createElement("td"),this.dom.tdColor.className="jsoneditor-tree",this.dom.tdColor.appendChild(this.dom.color),this.dom.tdValue.parentNode.insertBefore(this.dom.tdColor,this.dom.tdValue)),(0,I.addClassName)(this.dom.value,"jsoneditor-color-value"),(this.editable.value?I.removeClassName:I.addClassName)(this.dom.color,"jsoneditor-color-readonly"),this.dom.color.style.backgroundColor=R):this._deleteDomColor(),this._showTimestampTag()){if(this.dom.date||(this.dom.date=document.createElement("div"),this.dom.date.className="jsoneditor-date",this.dom.value.parentNode.appendChild(this.dom.date)),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(R).toISOString();this.dom.date.title=new Date(R).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,I.stripFormatting)(b),this._updateDomDefault()}}},{key:"_updateEnumOptions",value:function(){if(this.enum&&this.dom.select){this.dom.select.innerHTML="";for(var b=0;b<this.enum.length;b++){var k=document.createElement("option");k.value=this.enum[b],k.textContent=this.enum[b],this.dom.select.appendChild(k)}}}},{key:"_deleteDomColor",value:function(){this.dom.color&&(this.dom.tdColor.parentNode.removeChild(this.dom.tdColor),delete this.dom.tdColor,delete this.dom.color,(0,I.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var b,k=this.dom.field;k&&((b=(0,I.makeFieldTooltip)(this.schema,this.editor.options.language))&&(k.title=b),(String(this.field)===""&&this.parent&&this.parent.type!=="array"?I.addClassName:I.removeClassName)(k,"jsoneditor-empty"),(this.searchFieldActive?I.addClassName:I.removeClassName)(k,"jsoneditor-highlight-active"),(this.searchField?I.addClassName:I.removeClassName)(k,"jsoneditor-highlight"),(0,I.stripFormatting)(k))}},{key:"_getDomField",value:function(b){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,I.getInnerText)(this.dom.field),this.fieldInnerText==="")&&this.dom.field.innerHTML!==""&&(this.dom.field.textContent=""),this.fieldInnerText!==void 0)try{var k=this._unescapeHTML(this.fieldInnerText),R=this.parent.getFieldNames(this);R.indexOf(k)!==-1?b?(k=(0,I.findUniqueName)(k,R))!==this.field&&(this.field=k,this._debouncedOnChangeField()):this._setFieldError((0,F.Iu)("duplicateFieldError")):k!==this.field&&(this.field=k,this._debouncedOnChangeField())}catch{this._setFieldError((0,F.Iu)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){var b;this.schema&&this.schema.default!==void 0&&!this._hasChilds()&&(b=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(b.title=(0,F.Iu)("default"),(0,I.addClassName)(b,"jsoneditor-is-default"),I.removeClassName):(b.removeAttribute("title"),(0,I.removeClassName)(b,"jsoneditor-is-default"),I.addClassName))(b,"jsoneditor-is-not-default")}},{key:"_showTimestampTag",value:function(){var b,k;return typeof this.value=="number"&&(typeof(b=this.editor.options.timestampTag)=="function"?typeof(k=b({field:this.field,value:this.value,path:this.getPath()}))=="boolean"?k:(0,I.isTimestamp)(this.field,this.value):b===!0&&(0,I.isTimestamp)(this.field,this.value))}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var b,k,R=this.dom;return R.tr||(this._updateEditability(),R.tr=document.createElement("tr"),(R.tr.node=this).editor.options.mode==="tree"&&(k=document.createElement("td"),this.editable.field&&this.parent&&((b=document.createElement("button")).type="button",(R.drag=b).className="jsoneditor-button jsoneditor-dragarea",b.title=(0,F.Iu)("drag"),k.appendChild(b)),R.tr.appendChild(k),b=document.createElement("td"),(k=document.createElement("button")).type="button",(R.menu=k).className="jsoneditor-button jsoneditor-contextmenu-button",k.title=(0,F.Iu)("actionsMenu"),b.appendChild(R.menu),R.tr.appendChild(b)),k=document.createElement("td"),R.tr.appendChild(k),R.tree=this._createDomTree(),k.appendChild(R.tree),this.updateDom({updateIndexes:!0})),R.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(b){for(var k=this.parent;k;){if(k===b)return!0;k=k.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(b){this.dom.tr&&((b?I.addClassName:I.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(b),this.childs)&&this.childs.forEach(function(k){k.setHighlight(b)})}},{key:"setSelected",value:function(b,k){this.selected=b,this.dom.tr&&((b?I.addClassName:I.removeClassName)(this.dom.tr,"jsoneditor-selected"),(k?I.addClassName:I.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(b),this.showMore&&this.showMore.setSelected(b),this.childs)&&this.childs.forEach(function(R){R.setSelected(b)})}},{key:"updateValue",value:function(b){this.value=b,this.previousValue=b,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(b){this.field=b,this.previousField=b,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(b){var k,R=this.dom.tree,R=(R&&(R.style.marginLeft=24*this.getLevel()+"px"),this.dom.field),R=(R&&(this.fieldEditable?(R.contentEditable=this.editable.field,R.spellcheck=!1,R.className="jsoneditor-field"):(R.contentEditable=!1,R.className="jsoneditor-readonly"),k=this.index!==void 0?this.index:this.field!==void 0?this.field:(k=this.editor.options.schema?T._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0)&&k.title?k.title:this._hasChilds()?this.type:"",k=this._escapeHTML(k),document.activeElement!==R&&k!==this._unescapeHTML((0,I.getInnerText)(R))&&(R.innerHTML=k),this._updateSchema(),this._updateEnumOptions()),this.dom.value),R=(R&&(this.type==="array"||this.type==="object"?this.updateNodeName():(k=this._escapeHTML(this.value),document.activeElement!==R&&k!==this._unescapeHTML((0,I.getInnerText)(R))&&(R.innerHTML=k))),this.dom.tr);R&&(this.type==="array"||this.type==="object"?((0,I.addClassName)(R,"jsoneditor-expandable"),this.expanded?((0,I.addClassName)(R,"jsoneditor-expanded"),(0,I.removeClassName)(R,"jsoneditor-collapsed")):((0,I.addClassName)(R,"jsoneditor-collapsed"),(0,I.removeClassName)(R,"jsoneditor-expanded"))):((0,I.removeClassName)(R,"jsoneditor-expandable"),(0,I.removeClassName)(R,"jsoneditor-expanded"),(0,I.removeClassName)(R,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),b&&b.updateIndexes===!0&&this._updateDomIndexes(),b&&b.recurse===!0&&this.childs&&this.childs.forEach(function(D){D.updateDom(b)}),this.error&&this.updateError(),this.append&&this.append.updateDom(),this.showMore&&this.showMore.updateDom(),this._updateCssClassName()}},{key:"_updateSchema",value:function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?T._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=T._findEnum(this.schema):delete this.enum)}},{key:"_updateDomIndexes",value:function(){var b=this.dom.value,k=this.childs;b&&k&&(this.type==="array"?k.forEach(function(R,D){R.index=D,R=R.dom.field,R&&(R.textContent=D)}):this.type==="object"&&k.forEach(function(R){R.index!==void 0&&(delete R.index,R.field===void 0)&&(R.field="")}))}},{key:"_createDomValue",value:function(){var b;return this.type==="array"?(b=document.createElement("div")).textContent="[...]":this.type==="object"?(b=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,I.isUrl)(this.value)?(b=document.createElement("a")).href=this.value:((b=document.createElement("div")).contentEditable=this.editable.value,b.spellcheck=!1),b.innerHTML=this._escapeHTML(this.value)),b}},{key:"_createDomExpandButton",value:function(){var b=document.createElement("button");return b.type="button",this._hasChilds()?(b.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",b.title=(0,F.Iu)("expandTitle")):(b.className="jsoneditor-button jsoneditor-invisible",b.title=""),b}},{key:"_createDomTree",value:function(){var b=this.dom,k=document.createElement("table"),D=document.createElement("tbody"),R=(k.style.borderCollapse="collapse",k.className="jsoneditor-values",k.appendChild(D),document.createElement("tr")),D=(D.appendChild(R),document.createElement("td")),D=(D.className="jsoneditor-tree",R.appendChild(D),b.expand=this._createDomExpandButton(),D.appendChild(b.expand),b.tdExpand=D,document.createElement("td")),D=(D.className="jsoneditor-tree",R.appendChild(D),b.field=this._createDomField(),D.appendChild(b.field),b.tdField=D,document.createElement("td")),D=(D.className="jsoneditor-tree",R.appendChild(D),this.type!=="object"&&this.type!=="array"&&(D.appendChild(document.createTextNode(":")),D.className="jsoneditor-separator"),b.tdSeparator=D,document.createElement("td"));return D.className="jsoneditor-tree",R.appendChild(D),b.value=this._createDomValue(),D.appendChild(b.value),b.tdValue=D,k}},{key:"onEvent",value:function(b){var k,R=b.type,D=b.target||b.srcElement,J=this.dom,ne=this,me=this._hasChilds(),Ce=(D!==J.drag&&D!==J.menu||(R==="mouseover"?this.editor.highlighter.highlight(this):R==="mouseout"&&this.editor.highlighter.unhighlight()),R==="click"&&D===J.menu&&((k=ne.editor.highlighter).highlight(ne),k.lock(),(0,I.addClassName)(J.menu,"jsoneditor-selected"),this.showContextMenu(J.menu,function(){(0,I.removeClassName)(J.menu,"jsoneditor-selected"),k.unlock(),k.unhighlight()})),R==="click"&&D===J.expand&&me&&(Te=b.ctrlKey,this._onExpand(Te)),R!=="click"||b.target!==ne.dom.tdColor&&b.target!==ne.dom.color||!this.editable.value||this._showColorPicker(),R==="change"&&D===J.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),R==="change"&&D===J.select&&(this.dom.value.innerHTML=this._escapeHTML(J.select.value),this._getDomValue(),this._updateDomValue()),J.value);if(D===Ce)switch(R){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var Ie=this._escapeHTML(this.value);Ie!==this._unescapeHTML((0,I.getInnerText)(Ce))&&(Ce.innerHTML=Ie);break;case"input":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":b.ctrlKey&&this.editable.value&&(0,I.isUrl)(this.value)&&(b.preventDefault(),window.open(this.value,"_blank","noreferrer"));break;case"keyup":this._getDomValue(),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){ne._getDomValue(),ne._updateDomValue()},1)}var ke=J.field;if(D===ke)switch(R){case"blur":this._getDomField(!0),this._updateDomField();var Se=this._escapeHTML(this.field);Se!==this._unescapeHTML((0,I.getInnerText)(ke))&&(ke.innerHTML=Se);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(){ne._getDomField(),ne._updateDomField()},1)}var Te=J.tree;Te&&D===Te.parentNode&&R==="click"&&!b.hasMoved&&((b.offsetX!==void 0?b.offsetX<24*(this.getLevel()+1):b.pageX<(0,I.getAbsoluteLeft)(J.tdSeparator))||me?ke&&((0,I.setEndOfContentEditable)(ke),ke.focus()):Ce&&!this.enum&&((0,I.setEndOfContentEditable)(Ce),Ce.focus())),(D!==J.tdExpand||me)&&D!==J.tdField&&D!==J.tdSeparator||R!=="click"||b.hasMoved||ke&&((0,I.setEndOfContentEditable)(ke),ke.focus()),R==="keydown"&&this.onKeyDown(b),typeof this.editor.options.onEvent=="function"&&this._onEvent(b)}},{key:"_onEvent",value:function(b){var R=b.target,k=R===this.dom.field,R=R===this.dom.value||R===this.dom.checkbox||R===this.dom.select;(k||R)&&(k={field:this.getField(),path:this.getPath()},R&&!this._hasChilds()&&(k.value=this.getValue()),this.editor.options.onEvent(k,b))}},{key:"onKeyDown",value:function(b){var k,R,D,J,ne,me,Ce,Ie,ke,Se,Te,Re,Le,le,oe=b.which||b.keyCode,pe=b.target||b.srcElement,Me=b.ctrlKey,Pe=b.shiftKey,he=b.altKey,ue=!1,ye=this.editor.options.mode==="tree",ve=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],be=ve[0],Ee=ve[ve.length-1];oe===13?pe===this.dom.value?this.editable.value&&!b.ctrlKey||(0,I.isUrl)(this.value)&&(window.open(this.value,"_blank","noreferrer"),ue=!0):pe===this.dom.expand&&this._hasChilds()&&(Le=b.ctrlKey,this._onExpand(Le),pe.focus(),ue=!0):oe===68?Me&&ye&&(T.onDuplicate(ve),ue=!0):oe===69?Me&&(this._onExpand(Pe),pe.focus(),ue=!0):oe===77&&ye?Me&&(this.showContextMenu(pe),ue=!0):oe===46&&ye?Me&&(T.onRemove(ve),ue=!0):oe===45&&ye?Me&&!Pe?(this._onInsertBefore(),ue=!0):Me&&Pe&&(this._onInsertAfter(),ue=!0):oe===35?he&&((Le=this._lastNode())&&Le.focus(T.focusElement||this._getElementName(pe)),ue=!0):oe===36?he&&((Le=this._firstNode())&&Le.focus(T.focusElement||this._getElementName(pe)),ue=!0):oe===37?he&&!Pe?((Le=this._previousElement(pe))&&this.focus(this._getElementName(Le)),ue=!0):he&&Pe&&ye&&(Le=Ee.expanded?(Le=Ee.getAppendDom())?Le.nextSibling:void 0:Ee.getDom().nextSibling)&&(Te=T.getNodeFromTarget(Le),Le=Le.nextSibling,Re=T.getNodeFromTarget(Le),Te)&&Te instanceof A&&Ee.parent.childs.length!==1&&Re&&Re.parent&&(R=this.editor.getDomSelection(),D=(J=be.parent).childs[Ee.getIndex()+1]||J.append,ne=be.getIndex(),me=Re.getIndex(),Ce=J.getInternalPath(),Ie=Re.parent.getInternalPath(),ve.forEach(function(Ge){Re.parent.moveBefore(Ge,Re)}),this.focus(T.focusElement||this._getElementName(pe)),this.editor._onAction("moveNodes",{count:ve.length,fieldNames:ve.map(p),oldParentPath:J.getInternalPath(),newParentPath:be.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:be.getIndex(),oldIndexRedo:ne,newIndexRedo:me,oldParentPathRedo:Ce,newParentPathRedo:Ie,oldSelection:R,newSelection:this.editor.getDomSelection()})):oe===38?he&&!Pe?((k=this._previousNode())&&(this.editor.deselect(!0),k.focus(T.focusElement||this._getElementName(pe))),ue=!0):!he&&Me&&Pe&&ye?((k=this._previousNode())&&((Se=this.editor.multiselection).start=Se.start||this,Se.end=k,ke=this.editor._findTopLevelNodes(Se.start,Se.end),this.editor.select(ke),k.focus("field")),ue=!0):he&&Pe&&ye&&((k=be._previousNode())&&k.parent&&(R=this.editor.getDomSelection(),D=(J=be.parent).childs[Ee.getIndex()+1]||J.append,ne=be.getIndex(),me=k.getIndex(),Ce=J.getInternalPath(),Ie=k.parent.getInternalPath(),ve.forEach(function(Ge){k.parent.moveBefore(Ge,k)}),this.focus(T.focusElement||this._getElementName(pe)),this.editor._onAction("moveNodes",{count:ve.length,fieldNames:ve.map(p),oldParentPath:J.getInternalPath(),newParentPath:be.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:be.getIndex(),oldIndexRedo:ne,newIndexRedo:me,oldParentPathRedo:Ce,newParentPathRedo:Ie,oldSelection:R,newSelection:this.editor.getDomSelection()})),ue=!0):oe===39?he&&!Pe?((Le=this._nextElement(pe))&&this.focus(this._getElementName(Le)),ue=!0):he&&Pe&&ye&&(Le=be.getDom().previousSibling)&&(k=T.getNodeFromTarget(Le))&&k.parent&&!k.isVisible()&&(R=this.editor.getDomSelection(),D=(J=be.parent).childs[Ee.getIndex()+1]||J.append,ne=be.getIndex(),me=k.getIndex(),Ce=J.getInternalPath(),Ie=k.parent.getInternalPath(),ve.forEach(function(Ge){k.parent.moveBefore(Ge,k)}),this.focus(T.focusElement||this._getElementName(pe)),this.editor._onAction("moveNodes",{count:ve.length,fieldNames:ve.map(p),oldParentPath:J.getInternalPath(),newParentPath:be.parent.getInternalPath(),oldIndex:D.getIndex(),newIndex:be.getIndex(),oldIndexRedo:ne,newIndexRedo:me,oldParentPathRedo:Ce,newParentPathRedo:Ie,oldSelection:R,newSelection:this.editor.getDomSelection()})):oe===40&&(he&&!Pe?((Te=this._nextNode())&&(this.editor.deselect(!0),Te.focus(T.focusElement||this._getElementName(pe))),ue=!0):!he&&Me&&Pe&&ye?((Te=this._nextNode())&&((Se=this.editor.multiselection).start=Se.start||this,Se.end=Te,ke=this.editor._findTopLevelNodes(Se.start,Se.end),this.editor.select(ke),Te.focus("field")),ue=!0):he&&Pe&&ye&&((le=(Te=(Te=(Te=Ee.expanded?Ee.append?Ee.append._nextNode():void 0:Ee._nextNode())&&!Te.isVisible()?Te.parent.showMore:Te)&&Te instanceof A?Ee:Te)&&(Te._nextNode()||Te.parent.append))&&le.parent&&(R=this.editor.getDomSelection(),D=(J=be.parent).childs[Ee.getIndex()+1]||J.append,ne=be.getIndex(),me=le.getIndex(),Ce=J.getInternalPath(),Ie=le.parent.getInternalPath(),ve.forEach(function(Ge){le.parent.moveBefore(Ge,le)}),this.focus(T.focusElement||this._getElementName(pe)),this.editor._onAction("moveNodes",{count:ve.length,fieldNames:ve.map(p),oldParentPath:J.getInternalPath(),newParentPath:be.parent.getInternalPath(),oldParentPathRedo:Ce,newParentPathRedo:Ie,oldIndexRedo:ne,newIndexRedo:me,oldIndex:D.getIndex(),newIndex:be.getIndex(),oldSelection:R,newSelection:this.editor.getDomSelection()})),ue=!0)),ue&&(b.preventDefault(),b.stopPropagation())}},{key:"_onExpand",value:function(b){var k,R,D;b&&(D=(R=(k=this.dom.tr.parentNode).parentNode).scrollTop,R.removeChild(k)),this.expanded?this.collapse(b):this.expand(b),b&&(R.appendChild(k),R.scrollTop=D),typeof this.editor.options.onExpand=="function"&&this.editor.options.onExpand({path:this.getPath(),isExpand:this.expanded,recursive:b})}},{key:"_showColorPicker",value:function(){var b,k;typeof this.editor.options.onColorPicker=="function"&&this.dom.color&&((b=this)._deleteDomColor(),b.updateDom(),k=(0,_.w)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(k,this.value,function(R){typeof R=="string"&&R!==b.value&&(b._deleteDomColor(),b.value=R,b.updateDom(),b._debouncedOnChangeValue())}))}},{key:"getFieldNames",value:function(b){return this.type==="object"?this.childs.filter(function(k){return k!==b}).map(function(k){return k.field}):[]}},{key:"_onInsertBefore",value:function(J,ne,me){var D=this.editor.getDomSelection(),J=new T(this.editor,{field:J!==void 0?J:"",value:ne!==void 0?ne:"",type:me}),ne=(J.expand(!0),this.getInternalPath()),me=(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:ne,parentPath:this.parent.getInternalPath(),oldSelection:D,newSelection:me})}},{key:"_onInsertAfter",value:function(J,ne,R){var D=this.editor.getDomSelection(),J=new T(this.editor,{field:J!==void 0?J:"",value:ne!==void 0?ne:"",type:R}),ne=(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:D,newSelection:ne})}},{key:"_onAppend",value:function(J,ne,R){var D=this.editor.getDomSelection(),J=new T(this.editor,{field:J!==void 0?J:"",value:ne!==void 0?ne:"",type:R}),ne=(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:D,newSelection:ne})}},{key:"_onChangeType",value:function(b){var k,R,D=this.type;b!==D&&(k=this.editor.getDomSelection(),this.changeType(b),R=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:D,newType:b,oldSelection:k,newSelection:R}))}},{key:"sort",value:function(b,k){var R,D,J=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];typeof b=="string"&&(b=(0,I.parsePath)(b)),this._hasChilds()&&(this.hideChilds(),R=this.childs,this.childs=this.childs.concat(),D=k==="desc"?-1:1,this.type==="object"?this.childs.sort(function(ne,me){return D*f()(ne.field,me.field)}):this.childs.sort(function(Ce,Ie){var Ce=Ce.getNestedChild(b),Ie=Ie.getNestedChild(b);return Ce?Ie?(Ce=Ce.value,Ie=Ie.value,typeof Ce!="string"&&typeof Ie!="string"?Ie<Ce?D:Ce<Ie?-D:0:D*f()(Ce,Ie)):-D:D}),this._updateDomIndexes(),this.showChilds(),J===!0)&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:R,newChilds:this.childs})}},{key:"update",value:function(b){var k=this.getInternalValue();this.setValue(b),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var b=this.dom.tr?this.dom.tr.parentNode:void 0,k=this.expanded?this.getAppendDom():this.getDom(),k=k&&k.parentNode?k.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:b,nextTr:k}}},{key:"_attachToDom",value:function(b){b.table&&(b.nextTr?b.table.insertBefore(this.getDom(),b.nextTr):b.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(b){if(this._hasChilds()){this.hideChilds();try{var k=this.getInternalValue(),R=this.getValue(),D=this.editor.options.executeQuery(R,b),J=(this.setValue(D),this.getInternalValue());this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:k,newValue:J}),this.showChilds()}catch(ne){this.showChilds(),this.editor._onError(ne)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var b=this.editor.node.getInternalValue(),k=(this.editor._setRoot(this),this.editor.node.getInternalValue());this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:b,newValue:k})}catch(R){this.editor._onError(R)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(b){for(var k=0,R=this;R&&k<b.length;)R=R.findChildByProperty(b[k]),k++;return R}},{key:"findChildByProperty",value:function(b){if(this.type==="object")return this.childs.find(function(k){return k.field===b})}},{key:"getAppendDom",value:function(){return this.append||(this.append=new A(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new E(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var b=this.parent.childs.indexOf(this);return this.parent.childs[b+1]||this.parent.append}},{key:"_previousNode",value:function(){var b=null,k=this.getDom();if(k&&k.parentNode)for(var R=k;R=R.previousSibling,b=T.getNodeFromTarget(R),R&&b&&b instanceof A&&!b.isVisible(););return b}},{key:"_nextNode",value:function(){var b=null,k=this.getDom();if(k&&k.parentNode)for(var R=k;R=R.nextSibling,b=T.getNodeFromTarget(R),R&&b&&b instanceof A&&!b.isVisible(););return b}},{key:"_firstNode",value:function(){var b=null,k=this.getDom();return k&&k.parentNode&&(k=k.parentNode.firstChild,b=T.getNodeFromTarget(k)),b}},{key:"_lastNode",value:function(){var b=null,k=this.getDom();if(k&&k.parentNode)for(var R=k.parentNode.lastChild,b=T.getNodeFromTarget(R);R&&b&&!b.isVisible();)R=R.previousSibling,b=T.getNodeFromTarget(R);return b}},{key:"_previousElement",value:function(b){var k=this.dom;switch(b){case k.value:if(this.fieldEditable)return k.field;case k.field:if(this._hasChilds())return k.expand;case k.expand:return k.menu;case k.menu:if(k.drag)return k.drag;default:return null}}},{key:"_nextElement",value:function(b){var k=this.dom;switch(b){case k.drag:return k.menu;case k.menu:if(this._hasChilds())return k.expand;case k.expand:if(this.fieldEditable)return k.field;case k.field:if(!this._hasChilds())return k.value;default:return null}}},{key:"_getElementName",value:function(b){var k=this;return Object.keys(this.dom).find(function(R){return k.dom[R]===b})}},{key:"_hasChilds",value:function(){return this.type==="array"||this.type==="object"}},{key:"addTemplates",value:function(b,k){var R=this,D=R.editor.options.templates;D!=null&&(D.length&&b.push({type:"separator"}),D.forEach(function(J){b.push({text:J.text,className:J.className||"jsoneditor-type-object",title:J.title,click:(k?function(ne,me){R._onAppend(ne,me)}:function(ne,me){R._onInsertBefore(ne,me)}).bind(this,J.field,J.value)})}))}},{key:"showContextMenu",value:function(b,k){var R,D=this,J=[];this.editable.value&&J.push({text:(0,F.Iu)("type"),title:(0,F.Iu)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:(0,F.Iu)("auto"),className:"jsoneditor-type-auto"+(this.type==="auto"?" jsoneditor-selected":""),title:(0,F.Iu)("autoType"),click:function(){D._onChangeType("auto")}},{text:(0,F.Iu)("array"),className:"jsoneditor-type-array"+(this.type==="array"?" jsoneditor-selected":""),title:(0,F.Iu)("arrayType"),click:function(){D._onChangeType("array")}},{text:(0,F.Iu)("object"),className:"jsoneditor-type-object"+(this.type==="object"?" jsoneditor-selected":""),title:(0,F.Iu)("objectType"),click:function(){D._onChangeType("object")}},{text:(0,F.Iu)("string"),className:"jsoneditor-type-string"+(this.type==="string"?" jsoneditor-selected":""),title:(0,F.Iu)("stringType"),click:function(){D._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&J.push({text:(0,F.Iu)("sort"),title:(0,F.Iu)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){D.showSortModal()}}),this.editor.options.enableTransform&&J.push({text:(0,F.Iu)("transform"),title:(0,F.Iu)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){D.showTransformModal()}}),this.parent)&&J.push({text:(0,F.Iu)("extract"),title:(0,F.Iu)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){D.extract()}}),this.parent&&this.parent._hasChilds()&&(J.length&&J.push({type:"separator"}),R=D.parent.childs,D===R[R.length-1]&&(R=[{text:(0,F.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,F.Iu)("autoType"),click:function(){D._onAppend("","","auto")}},{text:(0,F.Iu)("array"),className:"jsoneditor-type-array",title:(0,F.Iu)("arrayType"),click:function(){D._onAppend("",[])}},{text:(0,F.Iu)("object"),className:"jsoneditor-type-object",title:(0,F.Iu)("objectType"),click:function(){D._onAppend("",{})}},{text:(0,F.Iu)("string"),className:"jsoneditor-type-string",title:(0,F.Iu)("stringType"),click:function(){D._onAppend("","","string")}}],D.addTemplates(R,!0),J.push({text:(0,F.Iu)("appendText"),title:(0,F.Iu)("appendTitle"),submenuTitle:(0,F.Iu)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){D._onAppend("","","auto")},submenu:R})),R=[{text:(0,F.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,F.Iu)("autoType"),click:function(){D._onInsertBefore("","","auto")}},{text:(0,F.Iu)("array"),className:"jsoneditor-type-array",title:(0,F.Iu)("arrayType"),click:function(){D._onInsertBefore("",[])}},{text:(0,F.Iu)("object"),className:"jsoneditor-type-object",title:(0,F.Iu)("objectType"),click:function(){D._onInsertBefore("",{})}},{text:(0,F.Iu)("string"),className:"jsoneditor-type-string",title:(0,F.Iu)("stringType"),click:function(){D._onInsertBefore("","","string")}}],D.addTemplates(R,!1),J.push({text:(0,F.Iu)("insert"),title:(0,F.Iu)("insertTitle"),submenuTitle:(0,F.Iu)("insertSub"),className:"jsoneditor-insert",click:function(){D._onInsertBefore("","","auto")},submenu:R}),this.editable.field)&&(J.push({text:(0,F.Iu)("duplicateText"),title:(0,F.Iu)("duplicateField"),className:"jsoneditor-duplicate",click:function(){T.onDuplicate(D)}}),J.push({text:(0,F.Iu)("removeText"),title:(0,F.Iu)("removeField"),className:"jsoneditor-remove",click:function(){T.onRemove(D)}})),this.editor.options.onCreateMenu&&(R=D.getPath(),J=this.editor.options.onCreateMenu(J,{type:"single",path:R,paths:[R]})),new S.x(J,{close:k}).show(b,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var b=this,k=this.editor.options.modalAnchor||l.qD,R=this.getValue();(0,C.showSortModal)(k,R,function(D){var J=D.path,J=(0,I.parsePath)(J);b.sortedBy=D,b.sort(J,D.direction)},b.sortedBy)}},{key:"showTransformModal",value:function(){var b=this,J=this.editor.options,k=J.modalAnchor,R=J.createQuery,D=J.executeQuery,J=J.queryDescription,ne=this.getValue();(0,h.showTransformModal)({container:k||l.qD,json:ne,queryDescription:J,createQuery:R,executeQuery:D,onTransform:function(me){b.transform(me)}})}},{key:"_getType",value:function(b){return b instanceof Array?"array":b instanceof Object?"object":typeof b=="string"&&typeof(0,I.parseString)(b)!="string"?"string":"auto"}},{key:"_escapeHTML",value:function(b){return typeof b!="string"?String(b):(b=String(b).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/^ /," ").replace(/ $/," "),b=(b=JSON.stringify(b)).substring(1,b.length-1),this.editor.options.escapeUnicode===!0?(0,I.escapeUnicodeChars)(b):b)}},{key:"_unescapeHTML",value:function(b){return b='"'+this._escapeJSON(b)+'"',(0,I.parse)(b).replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ").replace(/&/g,"&")}},{key:"_escapeJSON",value:function(b){for(var k="",R=0;R<b.length;){var D=b.charAt(R);D===`
|
|
`?k+="\\n":D==="\\"?(k+=D,R++,(D=b.charAt(R))!==""&&'"\\/bfnrtu'.indexOf(D)!==-1||(k+="\\"),k+=D):k+=D==='"'?'\\"':D,R++}return k}},{key:"updateNodeName",value:function(){var b=this.childs?this.childs.length:0;if(this.type==="object"||this.type==="array"){if(this.editor.options.onNodeName)try{var k=this.getValue.bind(this),R=this.editor.options.onNodeName({path:this.getPath(),size:b,type:this.type,get value(){return k()}})}catch(D){console.error("Error in onNodeName callback: ",D)}this.dom.value.textContent=this.type==="object"?"{"+(R||b)+"}":"["+(R||b)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),this.childs!=="undefined"))for(var b in this.childs)this.childs[b].recursivelyUpdateNodeName()}}])&&e(P.prototype,Z),Object.defineProperty(P,"prototype",{writable:!1}),T}(),r=(t.prototype.DEBOUNCE_INTERVAL=150,t.prototype.MAX_SEARCH_RESULTS=999,100);function d(T){return T.getInternalPath()}function p(T){return T.getField()}function g(T,P){return Object.prototype.hasOwnProperty.call(T,P)}t.focusElement=void 0,t.select=function(T){setTimeout(function(){(0,I.selectContentEditable)(T)},0)},t.onDragStart=function(T,P){if(!Array.isArray(T))return t.onDragStart([T],P);var Z,b,k,R,D;T.length!==0&&(Z=T[0],b=T[T.length-1],k=Z.parent,D=t.getNodeFromTarget(P.target),R=Z.editor,D=(0,I.getAbsoluteTop)(D.dom.tr)-(0,I.getAbsoluteTop)(Z.dom.tr),R.mousemove||(R.mousemove=(0,I.addEventListener)(P.view,"mousemove",function(J){t.onDrag(T,J)})),R.mouseup||(R.mouseup=(0,I.addEventListener)(P.view,"mouseup",function(J){t.onDragEnd(T,J)})),R.highlighter.lock(),R.drag={oldCursor:document.body.style.cursor,oldSelection:R.getDomSelection(),oldPaths:T.map(d),oldParent:k,oldNextNode:k.childs[b.getIndex()+1]||k.append,oldParentPathRedo:k.getInternalPath(),oldIndexRedo:Z.getIndex(),mouseX:P.pageX,offsetY:D,level:Z.getLevel()},document.body.style.cursor="move",P.preventDefault())},t.onDrag=function(T,P){if(!Array.isArray(T))return t.onDrag([T],P);if(T.length!==0){var Z,b,k,R,D,J=T[0].editor,ne=P.pageY-J.drag.offsetY,me=P.pageX,Ce=!1,Ie=T[0],ke=Ie.dom.tr,Se=(0,I.getAbsoluteTop)(ke),Te=ke.offsetHeight;if(ne<Se){for(oe=ke;oe=oe.previousSibling,pe=t.getNodeFromTarget(oe),k=oe?(0,I.getAbsoluteTop)(oe):0,oe&&ne<k;);(pe=pe&&!pe.parent?void 0:pe)||(oe=(ke=ke.parentNode.firstChild)?ke.nextSibling:void 0,(pe=t.getNodeFromTarget(oe))===Ie&&(pe=void 0)),!(pe=pe&&pe.isVisible()&&(k=(oe=pe.dom.tr)?(0,I.getAbsoluteTop)(oe):0)+Te<ne?void 0:pe)||J.options.limitDragging!==!1&&pe.parent!==T[0].parent||(T.forEach(function(Pe){pe.parent.moveBefore(Pe,pe)}),Ce=!0)}else{var Re=T[T.length-1];if(Te=(ke=Re.expanded&&Re.append?Re.append.getDom():Re.dom.tr)?ke.nextSibling:void 0){for(R=(0,I.getAbsoluteTop)(Te),Z=Te;b=t.getNodeFromTarget(Z),Z&&(D=Z.nextSibling?(0,I.getAbsoluteTop)(Z.nextSibling):0,D=Z?D-R:0,b&&b.parent.childs.length===T.length&&b.parent.childs[T.length-1]===Re&&(Se+=27),Z=Z.nextSibling),Z&&Se+D<ne;);if(b&&b.parent){for(var Te=me-J.drag.mouseX,Te=Math.round(Te/24/2),Le=J.drag.level+Te,le=b.getLevel(),oe=b.dom.tr&&b.dom.tr.previousSibling;le<Le&&oe;){var pe=t.getNodeFromTarget(oe),Me=T.some(function(he){return he===pe||pe.isDescendantOf(he)});if(!Me){if(!(pe instanceof A)||(Me=pe.parent.childs,Me.length===T.length&&Me[T.length-1]===Re))break;le=(b=t.getNodeFromTarget(oe)).getLevel()}oe=oe.previousSibling}(b=b instanceof A&&!b.isVisible()&&b.parent.showMore.isVisible()?b._nextNode():b)&&(J.options.limitDragging===!1||b.parent===T[0].parent)&&b.dom.tr&&b.dom.tr!==ke.nextSibling&&(T.forEach(function(Pe){b.parent.moveBefore(Pe,b)}),Ce=!0)}}}Ce&&(J.drag.mouseX=me,J.drag.level=Ie.getLevel()),J.startAutoScroll(ne),P.preventDefault()}},t.onDragEnd=function(T,P){if(!Array.isArray(T))return t.onDrag([T],P);var Z,b,k,R,D,J,ne,me,Ce;T.length!==0&&(J=T[0],Z=J.editor,J&&J.dom.menu&&J.dom.menu.focus(),b=Z.drag.oldParent.getInternalPath(),k=J.parent.getInternalPath(),R=Z.drag.oldParent===J.parent,D=Z.drag.oldNextNode.getIndex(),J=J.getIndex(),ne=Z.drag.oldParentPathRedo,me=Z.drag.oldIndexRedo,Ce=R&&me<J?J+T.length:J,R&&me===J||Z._onAction("moveNodes",{count:T.length,fieldNames:T.map(p),oldParentPath:b,newParentPath:k,oldIndex:D,newIndex:J,oldIndexRedo:me,newIndexRedo:Ce,oldParentPathRedo:ne,newParentPathRedo:null,oldSelection:Z.drag.oldSelection,newSelection:Z.getDomSelection()}),document.body.style.cursor=Z.drag.oldCursor,Z.highlighter.unlock(),T.forEach(function(Ie){Ie.updateDom(),P.target!==Ie.dom.drag&&P.target!==Ie.dom.menu&&Z.highlighter.unhighlight()}),delete Z.drag,Z.mousemove&&((0,I.removeEventListener)(P.view,"mousemove",Z.mousemove),delete Z.mousemove),Z.mouseup&&((0,I.removeEventListener)(P.view,"mouseup",Z.mouseup),delete Z.mouseup),Z.stopAutoScroll(),P.preventDefault())},t._findEnum=function(T){return T.enum?T.enum:(T=T.oneOf||T.anyOf||T.allOf,T&&(T=T.filter(function(P){return P.enum}),0<T.length)?T[0].enum:null)},t._findSchema=function(T,P,Z){for(var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:T,k=Z.slice(1,Z.length),R=Z[0],D=[b],J=0,ne=[b.oneOf,b.anyOf,b.allOf];J<ne.length;J++){var me=ne[J];Array.isArray(me)&&(D=D.concat(me))}var Ce,Ie=s(D);try{for(Ie.s();!(Ce=Ie.n()).done;){if("$ref"in(b=Ce.value)&&typeof b.$ref=="string"){var ke,Se=b.$ref;if(Se in P)b=P[Se];else{if(!Se.startsWith("#/")){if(((ke=Se.match(/#\//g))==null?void 0:ke.length)===1){var Te,Re,Le,le=n(Se.split("#/"),2),oe=le[0],pe=le[1];if(oe in P)return Te=P[oe],Re={$ref:"#/".concat(pe)},(Le=[]).push(R),0<k.length&&Le.push.apply(Le,c(k)),t._findSchema(Te,P,Le,Re)}throw Error("Unable to resolve reference ".concat(Se))}var Me,Pe=Se.substring(2).split("/"),b=T,he=s(Pe);try{for(he.s();!(Me=he.n()).done;){var ue=Me.value;if(!(ue in b))throw Error("Unable to resolve reference ".concat(Se));b=b[ue]}}catch(be){he.e(be)}finally{he.f()}}}if(R===void 0)return b;if(typeof R=="string"){if(a(b.properties)==="object"&&b.properties!==null&&R in b.properties)return b=b.properties[R],t._findSchema(T,P,k,b);if(a(b.patternProperties)==="object"&&b.patternProperties!==null){for(var ye in b.patternProperties)if(R.match(ye))return b=b.patternProperties[ye],t._findSchema(T,P,k,b)}if(a(b.additionalProperties)==="object")return b=b.additionalProperties,t._findSchema(T,P,k,b)}else if(typeof R=="number"&&a(b.items)==="object"&&b.items!==null)return b=b.items,t._findSchema(T,P,k,b)}}catch(ve){Ie.e(ve)}finally{Ie.f()}return null},t.onRemove=function(T){if(!Array.isArray(T))return t.onRemove([T]);var P,Z,b,k,R,D;T&&0<T.length&&(P=(b=T[0]).parent,Z=b.editor,b=b.getIndex(),Z.highlighter.unhighlight(),k=Z.getDomSelection(),t.blurNodes(T),R=Z.getDomSelection(),D=T.map(d),T.forEach(function(J){J.parent._remove(J)}),Z._onAction("removeNodes",{nodes:T,paths:D,parentPath:P.getInternalPath(),index:b,oldSelection:k,newSelection:R}))},t.onDuplicate=function(T){if(!Array.isArray(T))return t.onDuplicate([T]);var P,Z,b,k,R,D,J;T&&0<T.length&&(P=T[T.length-1],Z=P.parent,(b=P.editor).deselect(b.multiselection.nodes),k=b.getDomSelection(),R=P,D=T.map(function(ne){var me,Ce=ne.clone();return ne.parent.type==="object"&&(me=ne.parent.getFieldNames(),Ce.field=(0,I.findUniqueName)(ne.field,me)),Z.insertAfter(Ce,R),R=Ce}),T.length===1?D[0].parent.type==="object"?(D[0].dom.field.innerHTML=T[0]._escapeHTML(T[0].field),D[0].focus("field")):D[0].focus():b.select(D),J=b.getDomSelection(),b._onAction("duplicateNodes",{paths:T.map(d),clonePaths:D.map(d),afterPath:P.getInternalPath(),parentPath:Z.getInternalPath(),oldSelection:k,newSelection:J}))},t.getNodeFromTarget=function(T){for(;T;){if(T.node)return T.node;T=T.parentNode}},t.targetIsColorPicker=function(T){var P=t.getNodeFromTarget(T);if(P)for(var Z=T&&T.parentNode;Z;){if(Z===P.dom.color)return!0;Z=Z.parentNode}return!1},t.blurNodes=function(T){var P,Z;Array.isArray(T)?(P=(Z=T[0]).parent,Z=Z.getIndex(),(P.childs[Z+T.length]?P.childs[Z+T.length]:P.childs[Z-1]||P).focus()):t.blurNodes([T])},(x.prototype=new t).getDom=function(){var T=this.dom;if(T.tr)return T.tr;this._updateEditability();var P=document.createElement("tr"),Z=(P.className="jsoneditor-append",P.node=this,T.tr=P,this.editor.options.mode==="tree"&&(T.tdDrag=document.createElement("td"),b=document.createElement("td"),T.tdMenu=b,(Z=document.createElement("button")).type="button",Z.className="jsoneditor-button jsoneditor-contextmenu-button",Z.title="Click to open the actions menu (Ctrl+M)",T.menu=Z,b.appendChild(T.menu)),document.createElement("td")),b=document.createElement("div");return b.appendChild(document.createTextNode("("+(0,F.Iu)("empty")+")")),b.className="jsoneditor-readonly",Z.appendChild(b),T.td=Z,T.text=b,this.updateDom(),P},x.prototype.getPath=function(){return null},x.prototype.getIndex=function(){return null},x.prototype.updateDom=function(T){var P=this.dom,Z=P.td,b=(Z&&(Z.style.paddingLeft=24*this.getLevel()+26+"px"),P.text),b=(b&&(b.firstChild.nodeValue="("+(0,F.Iu)("empty")+" "+this.parent.type+")"),P.tr);this.isVisible()?P.tr.firstChild||(P.tdDrag&&b.appendChild(P.tdDrag),P.tdMenu&&b.appendChild(P.tdMenu),b.appendChild(Z)):P.tr.firstChild&&(P.tdDrag&&b.removeChild(P.tdDrag),P.tdMenu&&b.removeChild(P.tdMenu),b.removeChild(Z))},x.prototype.isVisible=function(){return this.parent.childs.length===0},x.prototype.showContextMenu=function(T,P){var Z,b=this,k=[{text:(0,F.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,F.Iu)("autoType"),click:function(){b._onAppend("","","auto")}},{text:(0,F.Iu)("array"),className:"jsoneditor-type-array",title:(0,F.Iu)("arrayType"),click:function(){b._onAppend("",[])}},{text:(0,F.Iu)("object"),className:"jsoneditor-type-object",title:(0,F.Iu)("objectType"),click:function(){b._onAppend("",{})}},{text:(0,F.Iu)("string"),className:"jsoneditor-type-string",title:(0,F.Iu)("stringType"),click:function(){b._onAppend("","","string")}}],k=(b.addTemplates(k,!0),[{text:(0,F.Iu)("appendText"),title:(0,F.Iu)("appendTitleAuto"),submenuTitle:(0,F.Iu)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){b._onAppend("","","auto")},submenu:k}]);this.editor.options.onCreateMenu&&(Z=b.parent.getPath(),k=this.editor.options.onCreateMenu(k,{type:"append",path:Z,paths:[Z]})),new S.x(k,{close:P}).show(T,this.editor.getPopupAnchor())},x.prototype.onEvent=function(T){var P,Z=T.type,b=T.target||T.srcElement,k=this.dom;b===k.menu&&(Z==="mouseover"?this.editor.highlighter.highlight(this.parent):Z==="mouseout"&&this.editor.highlighter.unhighlight()),Z==="click"&&b===k.menu&&((P=this.editor.highlighter).highlight(this.parent),P.lock(),(0,I.addClassName)(k.menu,"jsoneditor-selected"),this.showContextMenu(k.menu,function(){(0,I.removeClassName)(k.menu,"jsoneditor-selected"),P.unlock(),P.unhighlight()})),Z==="keydown"&&this.onKeyDown(T)};var A=x;function x(T){this.editor=T,this.dom={}}(W.prototype=new t).getDom=function(){var T,P,Z,b,k,R;return this.dom.tr||(this._updateEditability(),this.dom.tr||(P=(T=this).parent,(k=document.createElement("a")).appendChild(document.createTextNode((0,F.Iu)("showMore"))),k.href="#",k.onclick=function(D){return P.visibleChilds=Math.floor(P.visibleChilds/P.getMaxVisibleChilds()+1)*P.getMaxVisibleChilds(),T.updateDom(),P.showChilds(),D.preventDefault(),!1},(R=document.createElement("a")).appendChild(document.createTextNode((0,F.Iu)("showAll"))),R.href="#",R.onclick=function(D){return P.visibleChilds=1/0,T.updateDom(),P.showChilds(),D.preventDefault(),!1},Z=document.createElement("div"),b=document.createTextNode(this._getShowMoreText()),Z.className="jsoneditor-show-more",Z.appendChild(b),Z.appendChild(k),Z.appendChild(document.createTextNode(". ")),Z.appendChild(R),Z.appendChild(document.createTextNode(". ")),(k=document.createElement("td")).appendChild(Z),R=document.createElement("tr"),this.editor.options.mode==="tree"&&(R.appendChild(document.createElement("td")),R.appendChild(document.createElement("td"))),R.appendChild(k),R.className="jsoneditor-show-more",this.dom.tr=R,this.dom.moreContents=Z,this.dom.moreText=b),this.updateDom()),this.dom.tr},W.prototype.updateDom=function(T){var P;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(P=this.parent._getNextTr())&&P.parentNode.insertBefore(this.dom.tr,P),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,F.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(T){T.type==="keydown"&&this.onKeyDown(T)};var E=W;function W(T,P){this.editor=T,this.parent=P,this.dom={}}function B(T){return(B=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})(T)}function V(T,P){for(var Z=0;Z<P.length;Z++){var b=P[Z];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(T,function(k){return k=function(R,D){if(B(R)!=="object"||R===null)return R;var J=R[Symbol.toPrimitive];if(J===void 0)return(D==="string"?String:Number)(R);if(J=J.call(R,D||"default"),B(J)!=="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),B(k)==="symbol"?k:String(k)}(b.key),b)}}var u=function(){function T(b){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");function k(R){return b.node.findNodeByInternalPath(R)}this.editor=b,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(R){k(R.parentPath).childs[R.index].updateField(R.oldValue)},redo:function(R){k(R.parentPath).childs[R.index].updateField(R.newValue)}},editValue:{undo:function(R){k(R.path).updateValue(R.oldValue)},redo:function(R){k(R.path).updateValue(R.newValue)}},changeType:{undo:function(R){k(R.path).changeType(R.oldType)},redo:function(R){k(R.path).changeType(R.newType)}},appendNodes:{undo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(J){D.removeChild(J)})},redo:function(R){var D=k(R.parentPath);R.nodes.forEach(function(J){D.appendChild(J)})}},insertBeforeNodes:{undo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(J){D.removeChild(J)})},redo:function(R){var D=k(R.parentPath),J=k(R.beforePath);R.nodes.forEach(function(ne){D.insertBefore(ne,J)})}},insertAfterNodes:{undo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(J){D.removeChild(J)})},redo:function(R){var D=k(R.parentPath),J=k(R.afterPath);R.nodes.forEach(function(ne){D.insertAfter(ne,J),J=ne})}},removeNodes:{undo:function(R){var D=k(R.parentPath),J=D.childs[R.index]||D.append;R.nodes.forEach(function(ne){D.insertBefore(ne,J)})},redo:function(R){var D=k(R.parentPath);R.paths.map(k).forEach(function(J){D.removeChild(J)})}},duplicateNodes:{undo:function(R){var D=k(R.parentPath);R.clonePaths.map(k).forEach(function(J){D.removeChild(J)})},redo:function(R){var D=k(R.parentPath),J=k(R.afterPath);R.paths.map(k).forEach(function(ne){var me,Ce=ne.clone();D.type==="object"&&(me=D.getFieldNames(),Ce.field=(0,I.findUniqueName)(ne.field,me)),D.insertAfter(Ce,J),J=Ce})}},moveNodes:{undo:function(R){var D=k(R.oldParentPath),J=k(R.newParentPath),ne=D.childs[R.oldIndex]||D.append;J.childs.slice(R.newIndex,R.newIndex+R.count).forEach(function(me,Ce){me.field=R.fieldNames[Ce],D.moveBefore(me,ne)}),R.newParentPathRedo===null&&(R.newParentPathRedo=J.getInternalPath())},redo:function(R){var D=k(R.oldParentPathRedo),J=k(R.newParentPathRedo),ne=J.childs[R.newIndexRedo]||J.append;D.childs.slice(R.oldIndexRedo,R.oldIndexRedo+R.count).forEach(function(me,Ce){me.field=R.fieldNames[Ce],J.moveBefore(me,ne)})}},sort:{undo:function(R){var D=k(R.path);D.hideChilds(),D.childs=R.oldChilds,D.updateDom({updateIndexes:!0}),D.showChilds()},redo:function(R){var D=k(R.path);D.hideChilds(),D.childs=R.newChilds,D.updateDom({updateIndexes:!0}),D.showChilds()}},transform:{undo:function(R){k(R.path).setInternalValue(R.oldValue)},redo:function(R){k(R.path).setInternalValue(R.newValue)}}}}var P,Z;return P=T,(Z=[{key:"onChange",value:function(){}},{key:"add",value:function(b,k){this.index++,this.history[this.index]={action:b,params:k,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()}},{key:"clear",value:function(){this.history=[],this.index=-1,this.onChange()}},{key:"canUndo",value:function(){return 0<=this.index}},{key:"canRedo",value:function(){return this.index<this.history.length-1}},{key:"undo",value:function(){if(this.canUndo()){var b=this.history[this.index];if(b){var k=this.actions[b.action];if(k&&k.undo){if(k.undo(b.params),b.params.oldSelection)try{this.editor.setDomSelection(b.params.oldSelection)}catch(R){console.error(R)}}else console.error(new Error('unknown action "'+b.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var b=this.history[this.index];if(b){var k=this.actions[b.action];if(k&&k.redo){if(k.redo(b.params),b.params.newSelection)try{this.editor.setDomSelection(b.params.newSelection)}catch(R){console.error(R)}}else console.error(new Error('unknown action "'+b.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&V(P.prototype,Z),Object.defineProperty(P,"prototype",{writable:!1}),T}();function v(T){return(v=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})(T)}function $(T,P){for(var Z=0;Z<P.length;Z++){var b=P[Z];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(T,function(k){return k=function(R,D){if(v(R)!=="object"||R===null)return R;var J=R[Symbol.toPrimitive];if(J===void 0)return(D==="string"?String:Number)(R);if(J=J.call(R,D||"default"),v(J)!=="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),v(k)==="symbol"?k:String(k)}(b.key),b)}}var y=function(){function T(ne,D){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");var R=this,ne=(this.editor=ne,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=D,document.createElement("div")),D=((this.dom.wrapper=ne).className="jsoneditor-search",D.appendChild(ne),document.createElement("div")),D=((this.dom.results=D).className="jsoneditor-results",ne.appendChild(D),document.createElement("div")),ne=((this.dom.input=D).className="jsoneditor-frame",D.title=(0,F.Iu)("searchTitle"),ne.appendChild(D),document.createElement("button")),J=(ne.type="button",ne.className="jsoneditor-refresh",D.appendChild(ne),document.createElement("input")),ne=(J.type="text",(this.dom.search=J).oninput=function(me){R._onDelayedSearch(me)},J.onchange=function(me){R._onSearch()},J.onkeydown=function(me){R._onKeyDown(me)},J.onkeyup=function(me){R._onKeyUp(me)},ne.onclick=function(me){J.select()},D.appendChild(J),document.createElement("button")),ne=(ne.type="button",ne.title=(0,F.Iu)("searchNextResultTitle"),ne.className="jsoneditor-next",ne.onclick=function(){R.next()},D.appendChild(ne),document.createElement("button"));ne.type="button",ne.title=(0,F.Iu)("searchPreviousResultTitle"),ne.className="jsoneditor-previous",ne.onclick=function(){R.previous()},D.appendChild(ne)}var P,Z;return P=T,(Z=[{key:"next",value:function(b){var k;this.results&&((k=this.resultIndex!==null?this.resultIndex+1:0)>this.results.length-1&&(k=0),this._setActiveResult(k,b))}},{key:"previous",value:function(b){var k,R;this.results&&(k=this.results.length-1,R=this.resultIndex!==null?this.resultIndex-1:k,this._setActiveResult(R=R<0?k:R,b))}},{key:"_setActiveResult",value:function(b,k){var R,D,J;this.activeResult&&(R=this.activeResult.node,this.activeResult.elem==="field"?delete R.searchFieldActive:delete R.searchValueActive,R.updateDom()),this.results&&this.results[b]?(this.resultIndex=b,D=this.results[this.resultIndex].node,(J=this.results[this.resultIndex].elem)==="field"?D.searchFieldActive=!0:D.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],D.updateDom(),D.scrollTo(function(){k&&D.focus(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(b){this._clearDelay();var k=this;this.timeout=setTimeout(function(R){k._onSearch()},this.delay)}},{key:"_onSearch",value:function(b){this._clearDelay();var k=this.dom.search.value,k=0<k.length?k:void 0;if(k!==this.lastText||b){this.lastText=k,this.results=this.editor.search(k);var b=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0,R=0;if(this.activeResult){for(var D=0;D<this.results.length;D++)if(this.results[D].node===this.activeResult.node){R=D;break}}this._setActiveResult(R,!1),k!==void 0?(k=this.results.length,this.dom.results.textContent=k===0?"no\xA0results":k===1?"1\xA0result":b<k?b+"+\xA0results":k+"\xA0results"):this.dom.results.textContent=""}}},{key:"_onKeyDown",value:function(b){var k=b.which;k===27?(this.dom.search.value="",this._onSearch(),b.preventDefault(),b.stopPropagation()):k===13&&(b.ctrlKey?this._onSearch(!0):b.shiftKey?this.previous():this.next(),b.preventDefault(),b.stopPropagation())}},{key:"_onKeyUp",value:function(b){var k=b.keyCode;k!==27&&k!==13&&this._onDelayedSearch(b)}},{key:"clear",value:function(){this.dom.search.value="",this._onSearch()}},{key:"forceSearch",value:function(){this._onSearch(!0)}},{key:"isEmpty",value:function(){return this.dom.search.value===""}},{key:"destroy",value:function(){this.editor=null,this.dom.container.removeChild(this.dom.wrapper),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()}}])&&$(P.prototype,Z),Object.defineProperty(P,"prototype",{writable:!1}),T}();function L(T){return(L=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})(T)}function H(T,P){for(var Z=0;Z<P.length;Z++){var b=P[Z];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(T,function(k){return k=function(R,D){if(L(R)!=="object"||R===null)return R;var J=R[Symbol.toPrimitive];if(J===void 0)return(D==="string"?String:Number)(R);if(J=J.call(R,D||"default"),L(J)!=="object")return J;throw new TypeError("@@toPrimitive must return a primitive value.")}(k,"string"),L(k)==="symbol"?k:String(k)}(b.key),b)}}var G=function(){function T(b,k){if(!(this instanceof T))throw new TypeError("Cannot call a class as a function");b&&(this.root=k,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,b.appendChild(this.path),this.reset())}var P,Z;return P=T,(Z=[{key:"reset",value:function(){this.path.textContent=(0,F.Iu)("selectNode")}},{key:"setPath",value:function(b){var k=this;this.path.textContent="",b&&b.length&&b.forEach(function(R,D){var J,ne=document.createElement("span");ne.className="jsoneditor-treepath-element",ne.innerText=R.name,ne.onclick=function(me){this.selectionCallback&&this.selectionCallback(me)}.bind(k,R),k.path.appendChild(ne),R.children.length&&((J=document.createElement("span")).className="jsoneditor-treepath-seperator",J.textContent="\u25BA",J.onclick=function(){k.contentMenuClicked=!0;var me=[];R.children.forEach(function(Ce){me.push({text:Ce.name,className:"jsoneditor-type-modes"+(b[D+1]+1&&b[D+1].name===Ce.name?" jsoneditor-selected":""),click:function(Ie,ke){this.contextMenuCallback&&this.contextMenuCallback(Ie,ke)}.bind(k,R,Ce.name)})}),new S.x(me,{limitHeight:!0}).show(J,k.root,!0)},k.path.appendChild(J)),D===b.length-1&&(ne=(J||ne).getBoundingClientRect().right,k.path.offsetWidth<ne&&(k.path.scrollLeft=ne),k.path.scrollLeft)&&((ne=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",ne.title="show all path",ne.textContent="...",ne.onclick=function(me){(k.contentMenuClicked=!1,I.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,I.removeClassName)(k.path,"show-all"),k.path.onblur=void 0,k.path.style.width="",k.setPath(me))}}.bind(k,b),k.path.insertBefore(ne,k.path.firstChild))})}},{key:"onSectionSelected",value:function(b){typeof b=="function"&&(this.selectionCallback=b)}},{key:"onContextMenuItemSelected",value:function(b){typeof b=="function"&&(this.contextMenuCallback=b)}}])&&H(P.prototype,Z),Object.defineProperty(P,"prototype",{writable:!1}),T}(),Y=z(8037),Q=z.n(Y),z={},ee=(z.create=function(T,P){if(!T)throw new Error("No container element provided.");function Z(ue){var ye,ve;document.createRange?((ye=document.createRange()).selectNodeContents(ue),ye.collapse(!1),(ve=window.getSelection()).removeAllRanges(),ve.addRange(ye)):document.selection&&((ye=document.body.createTextRange()).moveToElementText(ue),ye.collapse(!1),ye.select())}function b(ue){return ne===void 0&&((ne=document.createElement("span")).style.visibility="hidden",ne.style.position="fixed",ne.style.outline="0",ne.style.margin="0",ne.style.padding="0",ne.style.border="0",ne.style.left="0",ne.style.whiteSpace="pre",ne.style.fontSize=Ce,ne.style.fontFamily=Ie,ne.style.fontWeight="normal",document.body.appendChild(ne)),ne.textContent=ue,ne.getBoundingClientRect().right}function k(){this.style.backgroundColor="#ddd"}function R(){this.style.backgroundColor=""}function D(){oe.hide(),oe.onmouseselection(this.__hint,oe.rs)}var J,ne,me,Ce,Ie,ke,Se,Te,Re,Le,le,oe,pe,Me,Pe,he;this.container=T,this.dom={},this.highlighter=new X,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(P),P.autocomplete&&(this.autocomplete=((J=(J=P.autocomplete)||{}).filter=J.filter||"start",J.trigger=J.trigger||"keydown",J.confirmKeys=J.confirmKeys||[39,35,9],J.caseSensitive=J.caseSensitive||!1,Ie=Ce="",(ke=document.createElement("div")).style.position="relative",ke.style.outline="0",ke.style.border="0",ke.style.margin="0",ke.style.padding="0",(Se=document.createElement("div")).className="autocomplete dropdown",Se.style.position="absolute",Se.style.visibility="hidden",Te=Se,Re=[],le=-1,Me=oe={rs:pe={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:Le=0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:ke,show:function(ue,ye,ve){var be=this;this.startFrom=ye,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),Ce===""&&(Ce=window.getComputedStyle(ue).getPropertyValue("font-size")),Ie===""&&(Ie=window.getComputedStyle(ue).getPropertyValue("font-family")),Se.style.marginLeft="0",Se.style.marginTop=ue.getBoundingClientRect().height+"px",this.options=ve.map(String),this.element!==ue&&(this.element=ue,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=ue.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){be.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",Pe),this.element.addEventListener("keydown",Pe,!1),this.element.removeEventListener("blur",he),this.element.addEventListener("blur",he,!1)),ke.appendChild(this.elementHint),ke.appendChild(Se),ue.parentElement.appendChild(ke),this.repaint(ue)},setText:function(ue){this.element.innerText=ue},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,Me.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(ye){var ye=(ye=ye.innerText).replace(`
|
|
`,""),ve=this.options.length,be=ye.substring(this.startFrom);me=ye.substring(0,this.startFrom);for(var Ee=0;Ee<ve;Ee++){var Ge=this.options[Ee];if(!J.caseSensitive&&Ge.toLowerCase().indexOf(be.toLowerCase())===0||J.caseSensitive&&Ge.indexOf(be)===0){this.elementHint.innerText=me+be+Ge.substring(be.length),this.elementHint.realInnerText=me+Ge;break}}Se.style.left=b(me)+"px",Me.refresh(be,this.options),this.elementHint.style.width=b(this.elementHint.innerText)+10+"px",Se.style.visibility!=="hidden"&&(this.elementHint.style.width=b(this.elementHint.innerText)+Se.clientWidth+"px")}},hide:function(){Te.style.visibility="hidden"},refresh:function(ue,ye){Te.style.visibility="hidden",Le=0,Te.textContent="";var be=window.innerHeight||document.documentElement.clientHeight,Ge=Te.parentNode.getBoundingClientRect(),ve=Ge.top-6,be=be-Ge.bottom-6,Ee=(Re=[],typeof J.filter=="function"?J.filter:U[J.filter]),Ge=Ee?ye.filter(function(q){return Ee(J.caseSensitive?ue:ue.toLowerCase(),J.caseSensitive?q:q.toLowerCase(),J)}):[];(Re=Ge.map(function(q){var re=document.createElement("div"),ce=(re.className="item",re.onmouseover=k,re.onmouseout=R,re.onmousedown=D,re.__hint=q,re.textContent="",re.appendChild(document.createTextNode(q.substring(0,ue.length))),document.createElement("b"));return ce.appendChild(document.createTextNode(q.substring(ue.length))),re.appendChild(ce),Te.appendChild(re),re})).length===0||Re.length===1&&(ue.toLowerCase()===Re[0].__hint.toLowerCase()&&!J.caseSensitive||ue===Re[0].__hint&&J.caseSensitive)||Re.length<2||(oe.highlight(0),3*be<ve?(Te.style.maxHeight=ve+"px",Te.style.top="",Te.style.bottom="100%"):(Te.style.top="100%",Te.style.bottom="",Te.style.maxHeight=be+"px"),Te.style.visibility="visible")},highlight:function(ue){le!==-1&&Re[le]&&(Re[le].className="item"),Re[ue].className="item hover",le=ue},move:function(ue){return Te.style.visibility==="hidden"?"":(Le+ue!==-1&&Le+ue!==Re.length&&(Le+=ue,oe.highlight(Le)),Re[Le].__hint)},onmouseselection:function(){}},Pe=function(ue){var ye=(ue=ue||window.event).keyCode;if(this.elementHint!=null&&ye!==33&&ye!==34)if(ye===27)pe.hideDropDown(),pe.element.focus(),ue.preventDefault(),ue.stopPropagation();else{var ve,be=(be=this.element.innerText).replace(`
|
|
`,"");if(0<=J.confirmKeys.indexOf(ye))ye===9&&this.elementHint.innerText.length===0&&pe.onTab(),0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,pe.hideDropDown(),Z(this.element),ye===9)&&(pe.element.focus(),ue.preventDefault(),ue.stopPropagation());else if(ye===13)if(this.elementHint.innerText.length===0)pe.onEnter();else{var Ee=Se.style.visibility==="hidden";if(Me.hide(),Ee)return pe.hideDropDown(),pe.element.focus(),void pe.onEnter();this.element.innerText=this.elementHint.realInnerText,pe.hideDropDown(),Z(this.element),ue.preventDefault(),ue.stopPropagation()}else ye===40?(Ee=be.substring(this.startFrom),(ve=Me.move(1))===""&&pe.onArrowDown(),this.elementHint.innerText=me+Ee+ve.substring(Ee.length),this.elementHint.realInnerText=me+ve,ue.preventDefault(),ue.stopPropagation()):ye===38&&(Ee=be.substring(this.startFrom),(ve=Me.move(-1))===""&&pe.onArrowUp(),this.elementHint.innerText=me+Ee+ve.substring(Ee.length),this.elementHint.realInnerText=me+ve,ue.preventDefault(),ue.stopPropagation())}}.bind(pe),he=function(ue){pe.hideDropDown()},Me.onmouseselection=function(ue,ye){ye.element.innerText=ye.elementHint.innerText=me+ue,ye.hideDropDown(),window.setTimeout(function(){ye.element.focus(),Z(ye.element)},1)},pe)),this.options.history&&this.options.mode!=="view"&&(this.history=new u(this)),this._createFrame(),this._createTable()},z.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()},z._setOptions=function(T){var P=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(Z,b,k){var R;Q()?(R=Z.getBoundingClientRect().top,R=(0,I.getWindow)(Z).innerHeight-R<300&&300<R,new(Q())({parent:Z,color:b,popup:R?"top":"bottom",onDone:function(D){D=D.rgba[3]===1?D.hex.substr(0,7):D.hex,k(D)}}).show()):console.warn("Cannot open color picker: the `vanilla-picker` library is not included in the bundle. Either use the full bundle or implement your own color picker using `onColorPicker`.")},timestampTag:!0,timestampFormat:null,createQuery:N.r,executeQuery:N.J,onEvent:null,enableSort:!0,enableTransform:!0},T&&(Object.keys(T).forEach(function(Z){P.options[Z]=T[Z]}),T.limitDragging==null)&&T.schema!=null&&(this.options.limitDragging=!0),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,I.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),T.onSelectionChange&&this.onSelectionChange(T.onSelectionChange),(0,F.cC)(this.options.languages),(0,F.m0)(this.options.language)},z.set=function(T){T instanceof Function||T===void 0?this.clear():(this.content.removeChild(this.table),T={field:this.options.name,value:T},T=new t(this,T),this._setRoot(T),this._validateAndCatch(),this.node.expand(!1),this.content.appendChild(this.table)),this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},z.update=function(T){var P,Z;this.node.deepEqual(T)||(P=this.getSelection(),this.onChangeDisabled=!0,this.node.update(T),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),P&&P.start&&P.end&&(T=this.node.findNodeByPath(P.start.path),Z=this.node.findNodeByPath(P.end.path),T)&&Z?this.setSelection(P.start,P.end):this.setSelection({},{}))},z.get=function(){if(this.node)return this.node.getValue()},z.getText=function(){return JSON.stringify(this.get())},z.setText=function(T){try{this.set((0,I.parse)(T))}catch{T=(0,I.tryJsonRepair)(T),this.set((0,I.parse)(T))}},z.updateText=function(T){try{this.update((0,I.parse)(T))}catch{T=(0,I.tryJsonRepair)(T),this.update((0,I.parse)(T))}},z.setName=function(T){this.options.name=T,this.node&&this.node.updateField(this.options.name)},z.getName=function(){return this.options.name},z.focus=function(){var T=this.scrollableContent.querySelector("[contenteditable=true]");T?T.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(T=this.frame.querySelector("button"))&&T.focus()},z.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},z._setRoot=function(T){this.clear(),(this.node=T).setParent(null),T.setField(this.getName(),!1),delete T.index,this.tbody.appendChild(T.getDom())},z.search=function(T){var P;return this.node?(this.content.removeChild(this.table),P=this.node.search(T),this.content.appendChild(this.table)):P=[],P},z.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},z.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},z.expand=function(T){var P;T&&(P=this.node?this.node.findNodeByPath(T.path):null)&&(T.isExpand?P.expand(T.recursive):P.collapse(T.recursive))},z._onAction=function(T,P){this.history&&this.history.add(T,P),this._onChange()},z._onChange=function(){if(!this.onChangeDisabled){var T;if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath&&((T=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0)?this._updateTreePath(T.getNodePath()):this.treePath.reset()),this.options.onChange)try{this.options.onChange()}catch(P){console.error("Error in onChange callback: ",P)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(P){console.error("Error in onChangeJSON callback: ",P)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(P){console.error("Error in onChangeText callback: ",P)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(P){console.error("Error in onNodeName callback: ",P)}}},z.validate=function(){var T=this,P=this.node;if(P){var Z=P.getValue(),b=[];this.validateSchema&&!this.validateSchema(Z)&&(b=this.validateSchema.errors.map(function(D){return(0,I.improveSchemaError)(D)}).map(function(D){return{node:P.findNode(D.dataPath),error:D,type:"validation"}}).filter(function(D){return D.node!=null}));try{this.validationSequence++;var k=this,R=this.validationSequence;return this._validateCustom(Z).then(function(D){return R===k.validationSequence&&(D=[].concat(b,D||[]),k._renderValidationErrors(D),typeof T.options.onValidationError=="function"&&(0,I.isValidationErrorChanged)(D,T.lastSchemaErrors)&&T.options.onValidationError.call(T,D),T.lastSchemaErrors=D),T.lastSchemaErrors})}catch(D){return Promise.reject(D)}}},z._validateAndCatch=function(){this.validate().catch(function(T){console.error("Error running validation:",T)})},z._renderValidationErrors=function(T){this.errorNodes&&this.errorNodes.forEach(function(Z){Z.setError(null)});var P=T.reduce(function(Z,b){return b.node.findParents().filter(function(k){return!Z.some(function(R){return R[0]===k})}).map(function(k){return[k,b.node]}).concat(Z)},[]);this.errorNodes=P.map(function(Z){return{node:Z[0],child:Z[1],error:{message:Z[0].type==="object"?(0,F.Iu)("containsInvalidProperties"):(0,F.Iu)("containsInvalidItems")}}}).concat(T).map(function(Z){return Z.node.setError(Z.error,Z.child),Z.node})},z._validateCustom=function(T){try{var P,Z;if(this.options.onValidate)return P=this.node,Z=this.options.onValidate(T),((0,I.isPromise)(Z)?Z:Promise.resolve(Z)).then(function(b){return Array.isArray(b)?b.filter(function(k){var R=(0,I.isValidValidationError)(k);return R||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',k),R}).map(function(k){var R;try{R=k&&k.path?P.findNodeByPath(k.path):null}catch{}return R||console.warn("Ignoring validation error: node not found. Path:",k.path,"Error:",k),{node:R,error:k,type:"customValidation"}}).filter(function(k){return k&&k.node&&k.error&&k.error.message}):null})}catch(b){return Promise.reject(b)}return Promise.resolve(null)},z.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},z.startAutoScroll=function(T){var P=this,Z=this.scrollableContent,b=(0,I.getAbsoluteTop)(Z),k=Z.clientHeight,R=b+k;T<b+24&&0<Z.scrollTop?this.autoScrollStep=(b+24-T)/3:R-24<T&&k+Z.scrollTop<Z.scrollHeight?this.autoScrollStep=(R-24-T)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){P.autoScrollStep?Z.scrollTop-=P.autoScrollStep:P.stopAutoScroll()},50)):this.stopAutoScroll()},z.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},z.setDomSelection=function(T){var P,Z,b;T&&("scrollTop"in T&&this.scrollableContent&&(this.scrollableContent.scrollTop=T.scrollTop),T.paths?(P=this,Z=T.paths.map(function(k){return P.node.findNodeByInternalPath(k)}),this.select(Z)):(b=(Z=T.path?this.node.findNodeByInternalPath(T.path):null)&&T.domName?Z.dom[T.domName]:null,T.range&&b?(T=Object.assign({},T.range,{container:b}),(0,I.setSelectionOffset)(T)):Z&&Z.focus()))},z.getDomSelection=function(){var T=t.getNodeFromTarget(this.focusTarget),P=this.focusTarget,Z=T?Object.keys(T.dom).find(function(k){return T.dom[k]===P}):null,b=(0,I.getSelectionOffset)();return(b=(b=b&&b.container.nodeName!=="DIV"?null:b)&&b.container!==P?null:b)&&delete b.container,{path:T?T.getInternalPath():null,domName:Z,range:b,paths:0<this.multiselection.length?this.multiselection.nodes.map(function(k){return k.getInternalPath()}):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},z.scrollTo=function(T,P){var Z,b,k,R,D=this.scrollableContent;D?((Z=this).animateTimeout&&(clearTimeout(Z.animateTimeout),delete Z.animateTimeout),Z.animateCallback&&(Z.animateCallback(!1),delete Z.animateCallback),b=D.clientHeight,k=D.scrollHeight-b,R=Math.min(Math.max(T-b/4,0),k),function J(){var ne=D.scrollTop,ne=R-ne;3<Math.abs(ne)?(D.scrollTop+=ne/3,Z.animateCallback=P,Z.animateTimeout=setTimeout(J,50)):(P&&P(!0),D.scrollTop=R,delete Z.animateTimeout,delete Z.animateCallback)}()):P&&P(!1)},z._createFrame=function(){var T=this,P=(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 Z(J){P._onEvent&&P._onEvent(J)}var b,k,R,D={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new M.R(D),this.frame.onclick=function(J){var ne=J.target;Z(J),ne.nodeName==="BUTTON"&&J.preventDefault()},this.frame.oninput=Z,this.frame.onchange=Z,this.frame.onkeydown=Z,this.frame.onkeyup=Z,this.frame.oncut=Z,this.frame.onpaste=Z,this.frame.onmousedown=Z,this.frame.onmouseup=Z,this.frame.onmouseover=Z,this.frame.onmouseout=Z,(0,I.addEventListener)(this.frame,"focus",Z,!0),(0,I.addEventListener)(this.frame,"blur",Z,!0),this.frame.onfocusin=Z,this.frame.onfocusout=Z,this.options.mainMenuBar&&((0,I.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(D=document.createElement("button")).type="button",D.className="jsoneditor-expand-all",D.title=(0,F.Iu)("expandAll"),D.onclick=function(){P.expandAll(),typeof T.options.onExpand=="function"&&T.options.onExpand({path:[],isExpand:!0,recursive:!0})},this.menu.appendChild(D),(D=document.createElement("button")).type="button",D.title=(0,F.Iu)("collapseAll"),D.className="jsoneditor-collapse-all",D.onclick=function(){P.collapseAll(),typeof T.options.onExpand=="function"&&T.options.onExpand({path:[],isExpand:!1,recursive:!0})},this.menu.appendChild(D),this.options.enableSort&&((D=document.createElement("button")).type="button",D.className="jsoneditor-sort",D.title=(0,F.Iu)("sortTitleShort"),D.onclick=function(){P.node.showSortModal()},this.menu.appendChild(D)),this.options.enableTransform&&((D=document.createElement("button")).type="button",D.title=(0,F.Iu)("transformTitleShort"),D.className="jsoneditor-transform",D.onclick=function(){P.node.showTransformModal()},this.menu.appendChild(D)),this.history&&((b=document.createElement("button")).type="button",b.className="jsoneditor-undo jsoneditor-separator",b.title=(0,F.Iu)("undo"),b.onclick=function(){P._onUndo()},this.menu.appendChild(b),this.dom.undo=b,(k=document.createElement("button")).type="button",k.className="jsoneditor-redo",k.title=(0,F.Iu)("redo"),k.onclick=function(){P._onRedo()},this.menu.appendChild(k),this.dom.redo=k,this.history.onChange=function(){b.disabled=!P.history.canUndo(),k.disabled=!P.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&((R=this).modeSwitcher=new w.x(this.menu,this.options.modes,this.options.mode,function(J){try{R.setMode(J),R.modeSwitcher.focus()}catch(ne){R._onError(ne)}})),this.options.search)&&(this.searchBox=new y(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)))},z._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},z._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},z._onEvent=function(T){if(!t.targetIsColorPicker(T.target)){var P,Z=t.getNodeFromTarget(T.target);if(T.type==="keydown"&&this._onKeyDown(T),Z&&T.type==="focus"&&(this.focusTarget=T.target,this.options.autocomplete)&&this.options.autocomplete.trigger==="focus"&&this._showAutoComplete(T.target),T.type==="mousedown"&&this._startDragDistance(T),T.type!=="mousemove"&&T.type!=="mouseup"&&T.type!=="click"||this._updateDragDistance(T),Z&&this.options&&this.options.navigationBar&&Z&&(T.type==="keydown"||T.type==="mousedown")&&(P=this,setTimeout(function(){P._updateTreePath(Z.getNodePath())})),Z&&Z.selected){if(T.type==="click"){if(T.target===Z.dom.menu)return void this.showContextMenu(T.target);T.hasMoved||this.deselect()}T.type==="mousedown"&&t.onDragStart(this.multiselection.nodes,T)}else T.type==="mousedown"&&(0,I.hasParentNode)(T.target,this.content)&&(this.deselect(),Z&&T.target===Z.dom.drag?t.onDragStart(Z,T):Z&&(T.target===Z.dom.field||T.target===Z.dom.value||T.target===Z.dom.select)||this._onMultiSelectStart(T));Z&&Z.onEvent(T)}},z._updateTreePath=function(T){var P;function Z(b){return b.parent?b.parent.type==="array"?b.index:b.field:b.field||b.type}T&&T.length?((0,I.removeClassName)(this.navBar,"nav-bar-empty"),P=[],T.forEach(function(b){var k={name:Z(b),node:b,children:[]};b.childs&&b.childs.length&&b.childs.forEach(function(R){k.children.push({name:Z(R),node:R})}),P.push(k)}),this.treePath.setPath(P)):(0,I.addClassName)(this.navBar,"nav-bar-empty")},z._onTreePathSectionSelected=function(T){T&&T.node&&(T.node.expandTo(),T.node.focus())},z._onTreePathMenuItemSelected=function(T,P){T&&T.children.length&&(T=T.children.find(function(Z){return Z.name===P}))&&T.node&&(this._updateTreePath(T.node.getNodePath()),T.node.expandTo(),T.node.focus())},z._startDragDistance=function(T){this.dragDistanceEvent={initialTarget:T.target,initialPageX:T.pageX,initialPageY:T.pageY,dragDistance:0,hasMoved:!1}},z._updateDragDistance=function(T){this.dragDistanceEvent||this._startDragDistance(T);var P=T.pageX-this.dragDistanceEvent.initialPageX,Z=T.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(P*P+Z*Z),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,T.dragDistance=this.dragDistanceEvent.dragDistance,T.hasMoved=this.dragDistanceEvent.hasMoved,T.dragDistance},z._onMultiSelectStart=function(T){var P,Z=t.getNodeFromTarget(T.target);this.options.mode==="tree"&&this.options.onEditable===void 0&&(this.multiselection={start:Z||null,end:null,nodes:[]},this._startDragDistance(T),(P=this).mousemove||(this.mousemove=(0,I.addEventListener)(T.view,"mousemove",function(b){P._onMultiSelect(b)})),this.mouseup||(this.mouseup=(0,I.addEventListener)(T.view,"mouseup",function(b){P._onMultiSelectEnd(b)})),T.preventDefault())},z._onMultiSelect=function(T){var P;T.preventDefault(),this._updateDragDistance(T),T.hasMoved&&((T=t.getNodeFromTarget(T.target))&&(this.multiselection.start==null&&(this.multiselection.start=T),this.multiselection.end=T),this.deselect(),T=this.multiselection.start,P=this.multiselection.end||this.multiselection.start,T)&&P&&(this.multiselection.nodes=this._findTopLevelNodes(T,P),this.multiselection.nodes&&this.multiselection.nodes.length&&(T=this.multiselection.nodes[0],this.multiselection.start===T||this.multiselection.start.isDescendantOf(T)?this.multiselection.direction="down":this.multiselection.direction="up"),this.select(this.multiselection.nodes))},z._onMultiSelectEnd=function(T){var P=this.multiselection.nodes[0];P&&P.dom.menu&&P.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,I.removeEventListener)(T.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,I.removeEventListener)(T.view,"mouseup",this.mouseup),delete this.mouseup)},z.deselect=function(T){var P=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach(function(Z){Z.setSelected(!1)}),this.multiselection.nodes=[],T&&(this.multiselection.start=null,this.multiselection.end=null),P&&this._selectionChangedHandler&&this._selectionChangedHandler()},z.select=function(T){if(!Array.isArray(T))return this.select([T]);var P;T&&(this.deselect(),this.multiselection.nodes=T.slice(0),P=T[0],T.forEach(function(Z){Z.expandPathToNode(),Z.setSelected(!0,Z===P)}),this._selectionChangedHandler)&&(T=this.getSelection(),this._selectionChangedHandler(T.start,T.end))},z._findTopLevelNodes=function(D,J){for(var Z=D.getNodePath(),b=J.getNodePath(),k=0;k<Z.length&&Z[k]===b[k];)k++;var R,D=Z[k-1],J=Z[k],ne=b[k];return J&&ne||(D.parent?D=(ne=J=D).parent:(J=D.childs[0],ne=D.childs[D.childs.length-1])),D&&J&&ne?(J=D.childs.indexOf(J),ne=D.childs.indexOf(ne),R=Math.min(J,ne),J=Math.max(J,ne),D.childs.slice(R,J+1)):[]},z._showAutoComplete=function(T){var P,Z=t.getNodeFromTarget(T),b="";0<=T.className.indexOf("jsoneditor-value")&&(b="value"),(b=0<=T.className.indexOf("jsoneditor-field")?"field":b)!==""&&(P=this,setTimeout(function(){var k;!Z||!(P.options.autocomplete.trigger==="focus"||0<T.innerText.length)||(k=P.options.autocomplete.getOptions(T.innerText,Z.getPath(),b,Z.editor))===null?P.autocomplete.hideDropDown():typeof k.then=="function"?k.then(function(R){R===null?P.autocomplete.hideDropDown():R.options?P.autocomplete.show(T,R.startFrom,R.options):P.autocomplete.show(T,0,R)}).catch(function(R){console.error(R)}):k.options?P.autocomplete.show(T,k.startFrom,k.options):P.autocomplete.show(T,0,k)},50))},z._onKeyDown=function(T){var P,Z=T.which||T.keyCode,b=T.altKey,k=T.ctrlKey,R=T.metaKey,D=T.shiftKey,J=!1,ne=this.focusTarget;Z===9&&(P=this,setTimeout(function(){P.focusTarget!==ne&&(0,I.selectContentEditable)(P.focusTarget)},0)),this.searchBox&&(k&&Z===70?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),J=!0):(Z===114||k&&Z===71)&&(D?this.searchBox.previous(!0):this.searchBox.next(!0),J=!0)),this.history&&(k&&!D&&Z===90?(this._onUndo(),J=!0):k&&D&&Z===90&&(this._onRedo(),J=!0)),!this.options.autocomplete||J||k||b||R||T.key.length!==1&&Z!==8&&Z!==46||(J=!1,this._showAutoComplete(T.target)),J&&(T.preventDefault(),T.stopPropagation())},z._createTable=function(){var T;this.options.navigationBar&&(0,I.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"&&((T=document.createElement("col")).width="24px",this.colgroupContent.appendChild(T)),(T=document.createElement("col")).width="24px",this.colgroupContent.appendChild(T),T=document.createElement("col"),this.colgroupContent.appendChild(T),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(this.contentOuter)},z.showContextMenu=function(T,P){var Z,b=[],k=this.multiselection.nodes.slice();b.push({text:(0,F.Iu)("duplicateText"),title:(0,F.Iu)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){t.onDuplicate(k)}}),b.push({text:(0,F.Iu)("remove"),title:(0,F.Iu)("removeTitle"),className:"jsoneditor-remove",click:function(){t.onRemove(k)}}),this.options.onCreateMenu&&(Z=k.map(function(R){return R.getPath()}),b=this.options.onCreateMenu(b,{type:"multiple",path:Z[0],paths:Z})),new S.x(b,{close:P}).show(T,this.getPopupAnchor())},z.getPopupAnchor=function(){return this.options.popupAnchor||this.frame},z.getSelection=function(){var T,P,Z={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(T=this.multiselection.nodes[0],P=this.multiselection.nodes[this.multiselection.nodes.length-1],this.multiselection.direction==="down"?(Z.start=T.serialize(),Z.end=P.serialize()):(Z.start=P.serialize(),Z.end=T.serialize())),Z},z.onSelectionChange=function(T){typeof T=="function"&&(this._selectionChangedHandler=(0,I.debounce)(T,this.DEBOUNCE_INTERVAL))},z.setSelection=function(T,P){T&&T.dom&&T.range&&(console.warn("setSelection/getSelection usage for text selection is deprecated and should not be used, see documentation for supported selection options"),this.setDomSelection(T)),T=this._getNodeInstancesByRange(T,P),T.forEach(function(Z){Z.expandTo()}),this.select(T)},z._getNodeInstancesByRange=function(T,P){T&&T.path&&(Z=this.node.findNodeByPath(T.path),P)&&P.path&&(b=this.node.findNodeByPath(P.path));var Z,b,k=[];if(Z instanceof t)if(b instanceof t&&b!==Z)if(Z.parent===b.parent){P=Z.getIndex()<b.getIndex()?(T=Z,b):(T=b,Z);var R=T;for(k.push(R);R=R.nextSibling(),k.push(R),R&&R!==P;);}else k=this._findTopLevelNodes(Z,b);else k.push(Z);return k},z.getNodesByRange=function(Z,P){var Z=this._getNodeInstancesByRange(Z,P),b=[];return Z.forEach(function(k){b.push(k.serialize())}),b},[{mode:"tree",mixin:z,data:"json"},{mode:"view",mixin:z,data:"json"},{mode:"form",mixin:z,data:"json"}])},2744:function(ae,m,O){m.tryRequireAjv=function(){try{return O(8903)}catch{}}},9125:function(ae,m,O){m.O=function(){try{O(4864)}catch(U){console.error(U)}}},9791:function(ae,U,O){O.r(U),O.d(U,{addClassName:function(){return d},addEventListener:function(){return Y},asyncExec:function(){return Ee},clear:function(){return n},compileJSONPointer:function(){return Ce},contains:function(){return ye},debounce:function(){return R},escapeUnicodeChars:function(){return h},extend:function(){return c},findUniqueName:function(){return Re},formatSize:function(){return Pe},get:function(){return Te},getAbsoluteLeft:function(){return t},getAbsoluteTop:function(){return r},getChildPaths:function(){return Le},getColorCSS:function(){return Ie},getIndexForPosition:function(){return ne},getInnerText:function(){return v},getInputSelection:function(){return J},getInternetExplorerVersion:function(){return L},getPositionForPath:function(){return me},getSelection:function(){return W},getSelectionOffset:function(){return V},getType:function(){return s},getWindow:function(){return e},hasParentNode:function(){return y},improveSchemaError:function(){return P},insideRect:function(){return k},isArray:function(){return a},isChildOf:function(){return z},isFirefox:function(){return G},isObject:function(){return ue},isPromise:function(){return Z},isTimestamp:function(){return Me},isUrl:function(){return o},isValidColor:function(){return ke},isValidValidationError:function(){return b},isValidationErrorChanged:function(){return ve},limitCharacters:function(){return he},makeFieldTooltip:function(){return Se},parse:function(){return I},parsePath:function(){return ee},parseString:function(){return pe},removeAllClassNames:function(){return p},removeClassName:function(){return g},removeEventListener:function(){return Q},removeReturnsAndSurroundingWhitespace:function(){return $},selectContentEditable:function(){return E},setEndOfContentEditable:function(){return x},setSelection:function(){return B},setSelectionOffset:function(){return u},sort:function(){return le},sortObjectKeys:function(){return oe},stringifyPath:function(){return T},stripFormatting:function(){return A},textDiff:function(){return D},tryJsonRepair:function(){return C},uniqueMergeArrays:function(){return be},validate:function(){return l}}),O(4987);var U=O(233),S=O.n(U),M=O(1262),K=O(6589),j=O(7026),X=O(7907);function F(q){return function(re){if(Array.isArray(re))return N(re)}(q)||function(re){if(typeof Symbol!="undefined"&&re[Symbol.iterator]!=null||re["@@iterator"]!=null)return Array.from(re)}(q)||function(re,ce){var fe;if(re)return typeof re=="string"?N(re,ce):(fe=(fe=Object.prototype.toString.call(re).slice(8,-1))==="Object"&&re.constructor?re.constructor.name:fe)==="Map"||fe==="Set"?Array.from(re):fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fe)?N(re,ce):void 0}(q)||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(q,re){(re==null||re>q.length)&&(re=q.length);for(var ce=0,fe=new Array(re);ce<re;ce++)fe[ce]=q[ce];return fe}function w(q){return(w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re})(q)}var f=1e4,_=9466848e5;function I(q){try{return JSON.parse(q)}catch(re){throw l(q),re}}function C(q){try{return(0,M.K)(q)}catch{return q}}function h(q){return q.replace(/[\u007F-\uFFFF]/g,function(re){return"\\u"+("0000"+re.charCodeAt(0).toString(16)).slice(-4)})}function l(q){(K!==void 0?K:JSON).parse(q)}function c(q,re){for(var ce in re)Ge(re,ce)&&(q[ce]=re[ce]);return q}function n(q){for(var re in q)Ge(q,re)&&delete q[re];return q}function s(q){return q===null?"null":q===void 0?"undefined":q instanceof Number||typeof q=="number"?"number":q instanceof String||typeof q=="string"?"string":q instanceof Boolean||typeof q=="boolean"?"boolean":q instanceof RegExp?"regexp":a(q)?"array":"object"}var i=/^https?:\/\/\S+$/;function o(q){return(typeof q=="string"||q instanceof String)&&i.test(q)}function a(q){return Object.prototype.toString.call(q)==="[object Array]"}function e(q){return q.ownerDocument.defaultView}function t(q){return q.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function r(q){return q.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function d(q,re){var ce=q.className.split(" ");ce.indexOf(re)===-1&&(ce.push(re),q.className=ce.join(" "))}function p(q){q.className=""}function g(q,fe){var ce=q.className.split(" "),fe=ce.indexOf(fe);fe!==-1&&(ce.splice(fe,1),q.className=ce.join(" "))}function A(q){for(var re=q.childNodes,ce=0,fe=re.length;ce<fe;ce++){var Ae=re[ce],we=(Ae.style&&Ae.removeAttribute("style"),Ae.attributes);if(we)for(var We=we.length-1;0<=We;We--){var Xe=we[We];Xe.specified===!0&&Ae.removeAttribute(Xe.name)}A(Ae)}}function x(q){var re;document.createRange&&((re=document.createRange()).selectNodeContents(q),re.collapse(!1),(q=window.getSelection()).removeAllRanges(),q.addRange(re))}function E(q){var re;q&&q.nodeName==="DIV"&&window.getSelection&&document.createRange&&((re=document.createRange()).selectNodeContents(q),(q=window.getSelection()).removeAllRanges(),q.addRange(re))}function W(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount)return q.getRangeAt(0)}return null}function B(q){var re;q&&window.getSelection&&((re=window.getSelection()).removeAllRanges(),re.addRange(q))}function V(){var q=W();return q&&"startOffset"in q&&"endOffset"in q&&q.startContainer&&q.startContainer===q.endContainer?{startOffset:q.startOffset,endOffset:q.endOffset,container:q.startContainer.parentNode}:null}function u(q){var re;document.createRange&&window.getSelection&&window.getSelection()&&(re=document.createRange(),q.container.firstChild||q.container.appendChild(document.createTextNode("")),re.setStart(q.container.firstChild,q.startOffset),re.setEnd(q.container.firstChild,q.endOffset),B(re))}function v(q,re){var ce;if(re===void 0&&(re={_text:"",flush:function(){var nt=this._text;return this._text="",nt},set:function(nt){this._text=nt}}),q.nodeValue)return(ce=$(q.nodeValue))!==""?re.flush()+ce:"";if(q.hasChildNodes()){for(var fe=q.childNodes,Ae="",we=0,We=fe.length;we<We;we++){var Xe,Oe=fe[we];Oe.nodeName==="DIV"||Oe.nodeName==="P"?((Xe=(Xe=fe[we-1])?Xe.nodeName:void 0)&&Xe!=="DIV"&&Xe!=="P"&&Xe!=="BR"&&(Ae!==""&&(Ae+=`
|
|
`),re.flush()),Ae+=v(Oe,re),re.set(`
|
|
`)):Oe.nodeName==="BR"?(Ae+=re.flush(),re.set(`
|
|
`)):Ae+=v(Oe,re)}return Ae}return""}function $(q){return q.replace(/(\b|^)\s*(\b|$)/g,function(re){return/\n/.exec(re)?"":re})}function y(q,re){for(var ce=q?q.parentNode:void 0;ce;){if(ce===re)return!0;ce=ce.parentNode}return!1}function L(){var q;return H===-1&&(q=-1,typeof navigator!="undefined"&&navigator.appName==="Microsoft Internet Explorer"&&/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)!=null&&(q=parseFloat(RegExp.$1)),H=q),H}var H=-1;function G(){return typeof navigator!="undefined"&&navigator.userAgent.indexOf("Firefox")!==-1}function Y(q,re,ce,fe){return q.addEventListener?(fe===void 0&&(fe=!1),re==="mousewheel"&&G()&&(re="DOMMouseScroll"),q.addEventListener(re,ce,fe),ce):q.attachEvent?(q.attachEvent("on"+re,fe=function(){return ce.call(q,window.event)}),fe):void 0}function Q(q,re,ce,fe){q.removeEventListener?(fe===void 0&&(fe=!1),re==="mousewheel"&&G()&&(re="DOMMouseScroll"),q.removeEventListener(re,ce,fe)):q.detachEvent&&q.detachEvent("on"+re,ce)}function z(q,re){for(var ce=q.parentNode;ce;){if(ce===re)return!0;ce=ce.parentNode}return!1}function ee(q){var re=[],ce=0;function fe(we){for(var We="";q[ce]!==void 0&&q[ce]!==we;)We+=q[ce],ce++;if(q[ce]!==we)throw new Error("Invalid JSON path: unexpected end, character "+we+" expected");return We}for(;q[ce]!==void 0;)if(q[ce]===".")ce++,re.push(function(){for(var we="";q[ce]!==void 0&&/[\w$]/.test(q[ce]);)we+=q[ce],ce++;if(we==="")throw new Error("Invalid JSON path: property name expected at index "+ce);return we}());else{if(q[ce]!=="[")throw new Error('Invalid JSON path: unexpected character "'+q[ce]+'" at index '+ce);if(q[++ce]==="'"||q[ce]==='"'){var Ae=q[ce];if(ce++,re.push(fe(Ae)),q[ce]!==Ae)throw new Error("Invalid JSON path: closing quote ' expected at index "+ce);ce++}else{if(Ae=fe("]").trim(),Ae.length===0)throw new Error("Invalid JSON path: array value expected at index "+ce);Ae=Ae==="*"?Ae:JSON.parse(Ae),re.push(Ae)}if(q[ce]!=="]")throw new Error("Invalid JSON path: closing bracket ] expected at index "+ce);ce++}return re}function T(q){return q.map(function(re){return typeof re=="number"?"["+re+"]":typeof re=="string"&&re.match(/^[A-Za-z0-9_$]+$/)?"."+re:'["'+re+'"]'}).join("")}function P(q){var re,ce;return q.keyword==="enum"&&Array.isArray(q.schema)&&(ce=q.schema)&&(5<(ce=ce.map(function(fe){return JSON.stringify(fe)})).length&&(re=["("+(ce.length-5)+" more...)"],(ce=ce.slice(0,5)).push(re)),q.message="should be equal to one of: "+ce.join(", ")),q.keyword==="additionalProperties"&&(q.message="should NOT have additional property: "+q.params.additionalProperty),q}function Z(q){return q&&typeof q.then=="function"&&typeof q.catch=="function"}function b(q){return w(q)==="object"&&Array.isArray(q.path)&&typeof q.message=="string"}function k(q,re,ce){return ce=ce!==void 0?ce:0,re.left-ce>=q.left&&re.right+ce<=q.right&&re.top-ce>=q.top&&re.bottom+ce<=q.bottom}function R(q,re,ce){var fe;return function(){var Ae=this,we=arguments,We=ce&&!fe;clearTimeout(fe),fe=setTimeout(function(){fe=null,ce||q.apply(Ae,we)},re),We&&q.apply(Ae,we)}}function D(q,re){for(var ce=re.length,fe=0,Ae=q.length,we=re.length;re.charAt(fe)===q.charAt(fe)&&fe<ce;)fe++;for(;re.charAt(we-1)===q.charAt(Ae-1)&&fe<we&&0<Ae;)we--,Ae--;return{start:fe,end:we}}function J(q){var re,ce,fe,Ae,we=0,We=0;return typeof q.selectionStart=="number"&&typeof q.selectionEnd=="number"?(we=q.selectionStart,We=q.selectionEnd):(Ae=document.selection.createRange())&&Ae.parentElement()===q&&(fe=q.value.length,re=q.value.replace(/\r\n/g,`
|
|
`),(ce=q.createTextRange()).moveToBookmark(Ae.getBookmark()),(Ae=q.createTextRange()).collapse(!1),-1<ce.compareEndPoints("StartToEnd",Ae)?we=We=fe:(we=-ce.moveStart("character",-fe),we+=re.slice(0,we).split(`
|
|
`).length-1,-1<ce.compareEndPoints("EndToEnd",Ae)?We=fe:(We=-ce.moveEnd("character",-fe),We+=re.slice(0,We).split(`
|
|
`).length-1))),{startIndex:we,endIndex:We,start:Xe(we),end:Xe(We)};function Xe(Oe){return Oe=q.value.substring(0,Oe),{row:(Oe.match(/\n/g)||[]).length+1,column:Oe.length-Oe.lastIndexOf(`
|
|
`)}}}function ne(fe,re,ce){var fe=fe.value||"";return 0<re&&0<ce?(fe=fe.split(`
|
|
`,re),re=Math.min(fe.length,re),ce=Math.min(fe[re-1].length,ce-1),ce=re===1?ce:ce+1,fe.slice(0,re-1).join(`
|
|
`).length+ce):-1}function me(q,re){var ce,fe=[];if(re&&re.length){try{ce=j.parse(q)}catch{return fe}re.forEach(function(Ae){var we=Ce(ee(Ae)),we=ce.pointers[we];we&&fe.push({path:Ae,line:we.key?we.key.line:we.value?we.value.line:0,column:we.key?we.key.column:we.value?we.value.column:0})})}return fe}function Ce(q){return q.map(function(re){return"/"+String(re).replace(/~/g,"~0").replace(/\//g,"~1")}).join("")}function Ie(q){var re=document.createElement("div");return re.style.color=q,re.style.color.split(/\s+/).join("").toLowerCase()||null}function ke(q){return!!Ie(q)}function Se(q,re){var ce;return q?(ce="",q.title&&(ce+=q.title),q.description&&(0<ce.length&&(ce+=`
|
|
`),ce+=q.description),q.default&&(0<ce.length&&(ce+=`
|
|
|
|
`),ce=(ce+=(0,X.Iu)("default",void 0,re)+`
|
|
`)+JSON.stringify(q.default,null,2)),Array.isArray(q.examples)&&0<q.examples.length&&(0<ce.length&&(ce+=`
|
|
|
|
`),ce+=(0,X.Iu)("examples",void 0,re)+`
|
|
`,q.examples.forEach(function(fe,Ae){ce+=JSON.stringify(fe,null,2),Ae!==q.examples.length-1&&(ce+=`
|
|
`)})),ce):""}function Te(q,re){for(var ce=q,fe=0;fe<re.length&&ce!=null;fe++)ce=ce[re[fe]];return ce}function Re(q,re){for(var ce=q.replace(/ \(copy( \d+)?\)$/,""),fe=ce,Ae=1;re.indexOf(fe)!==-1;)fe=ce+" ("+("copy"+(1<Ae?" "+Ae:""))+")",Ae++;return fe}function Le(q,re){var ce={};if(Array.isArray(q))for(var fe=Math.min(q.length,f),Ae=0;Ae<fe;Ae++)(function we(We,Xe,Oe,nt){(Array.isArray(We)||ue(We))&&!nt||(Xe[Oe||""]=!0),ue(We)&&Object.keys(We).forEach(function(ie){we(We[ie],Xe,Oe+"."+ie,nt)})})(q[Ae],ce,"",re);else ce[""]=!0;return Object.keys(ce).sort()}function le(q,we,ce){var fe=we&&we!=="."?ee(we):[],Ae=ce==="desc"?-1:1,we=q.slice();return we.sort(function(We,Xe){return We=Te(We,fe),Xe=Te(Xe,fe),Ae*(Xe<We?1:We<Xe?-1:0)}),we}function oe(q,fe){var ce=fe==="desc"?-1:1,fe=Object.keys(q).sort(function(we,We){return ce*S()(we,We)}),Ae={};return fe.forEach(function(we){Ae[we]=q[we]}),Ae}function pe(q){var re,ce;return q===""?"":(re=q.toLowerCase())==="null"?null:re==="true"||re!=="false"&&(/^0\d+$/.test(q)||(re=Number(q),ce=parseFloat(q),isNaN(re))||isNaN(ce)?q:re)}function Me(q,re){return typeof re=="number"&&_<re&&isFinite(re)&&Math.floor(re)===re&&!isNaN(new Date(re).valueOf())}function Pe(q){return q<900?q.toFixed()+" B":(q=q/1e3)<900?q.toFixed(1)+" KB":(q=q/1e3)<900?q.toFixed(1)+" MB":(q=q/1e3)<900?q.toFixed(1)+" GB":(q/1e3).toFixed(1)+" TB"}function he(q,re){return q.length<=re?q:q.slice(0,re)+"..."}function ue(q){return w(q)==="object"&&q!==null&&!Array.isArray(q)}function ye(q,re){return q.indexOf(re)!==-1}function ve(q,re){if(re||q){if(re&&!q||!re&&q||re.length!==q.length)return!0;for(var ce,fe=0;fe<q.length;++fe)if(ce=function(Ae){var we=q[Ae].type==="error"?re.find(function(We){return We.line===q[Ae].line}):re.find(function(We){return We.dataPath===q[Ae].dataPath&&We.schemaPath===q[Ae].schemaPath});if(!we)return{v:!0}}(fe))return ce.v}return!1}function be(q,re){return q=q!=null&&q.length?q:[],re=re!=null&&re.length?re:[],F(new Set(q.concat(re)))}function Ee(q){setTimeout(q)}function Ge(q,re){return Object.prototype.hasOwnProperty.call(q,re)}},8037:function(ae,m,O){var U;if(window.Picker)U=window.Picker;else try{U=O(4049)}catch{}ae.exports=U},6225:function(ae,m,O){function U(w,f){var _,I;return f=N(w,f),(w=j.modules[f])||(typeof(w=j.payloads[f])=="function"&&(_={id:f,uri:"",exports:I={},packaged:!0},I=w(function(C,h){return X(f,C,h)},I,_)||_.exports,j.modules[f]=I,delete j.payloads[f]),w=j.modules[f]=I||w),w}var S,M,K,j,X,F,N;ae=O.nmd(ae),(K=function(){return this}())||typeof window=="undefined"||(K=window),(j=function(w,f,_){typeof w!="string"?j.original?j.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(arguments.length==2&&(_=f),j.modules[w]||(j.payloads[w]=_,j.modules[w]=null))}).modules={},j.payloads={},X=function(w,f,_){if(typeof f=="string"){var I=U(w,f);if(I!=null)return _&&_(),I}else if(Object.prototype.toString.call(f)==="[object Array]"){for(var C=[],h=0,l=f.length;h<l;++h){var c=U(w,f[h]);if(c==null&&F.original)return;C.push(c)}return _&&_.apply(null,C)||!0}},F=function(w,f){var _=X("",w,f);return _==null&&F.original?F.original.apply(this,arguments):_},N=function(w,f){var _;if(f.indexOf("!")!==-1)return _=f.split("!"),N(w,_[0])+"!"+N(w,_[1]);if(f.charAt(0)==".")for(f=w.split("/").slice(0,-1).join("/")+"/"+f;f.indexOf(".")!==-1&&I!=f;){var I=f;f=f.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return f},M=K,(S="ace")&&(K[S]||(K[S]={}),M=K[S]),M.define&&M.define.packaged||(j.original=M.define,M.define=j,M.define.packaged=!0),M.require&&M.require.packaged||(F.original=M.require,M.require=F,M.require.packaged=!0),ace.define("ace/lib/es6-shim",["require","exports","module"],function(w,f,_){function I(C,h,l){Object.defineProperty(C,h,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||I(String.prototype,"startsWith",function(C,h){return this.lastIndexOf(C,h=h||0)===h}),String.prototype.endsWith||I(String.prototype,"endsWith",function(C,h){return(h===void 0||h>this.length)&&(h=this.length),h-=C.length,C=this.indexOf(C,h),C!==-1&&C===h}),String.prototype.repeat||I(String.prototype,"repeat",function(C){for(var h="",l=this;0<C;)1&C&&(h+=l),(C>>=1)&&(l+=l);return h}),String.prototype.includes||I(String.prototype,"includes",function(C,h){return this.indexOf(C,h)!=-1}),Object.assign||(Object.assign=function(C){if(C==null)throw new TypeError("Cannot convert undefined or null to object");for(var h=Object(C),l=1;l<arguments.length;l++){var c=arguments[l];c!=null&&Object.keys(c).forEach(function(n){h[n]=c[n]})}return h}),Object.values||(Object.values=function(C){return Object.keys(C).map(function(h){return C[h]})}),Array.prototype.find||I(Array.prototype,"find",function(C){for(var h=this.length,l=arguments[1],c=0;c<h;c++){var n=this[c];if(C.call(l,n,c,this))return n}}),Array.prototype.findIndex||I(Array.prototype,"findIndex",function(C){for(var h=this.length,l=arguments[1],c=0;c<h;c++){var n=this[c];if(C.call(l,n,c,this))return c}}),Array.prototype.includes||I(Array.prototype,"includes",function(C,h){return this.indexOf(C,h)!=-1}),Array.prototype.fill||I(Array.prototype,"fill",function(C){for(var h=this.length>>>0,c=arguments[1]>>0,l=c<0?Math.max(h+c,0):Math.min(c,h),c=arguments[2],c=c===void 0?h:c>>0,n=c<0?Math.max(h+c,0):Math.min(c,h);l<n;)this[l]=C,l++;return this}),Array.of||I(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(w,f,_){w("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(w,f,_){f.deepCopy=function I(C){if(typeof C!="object"||!C)return C;if(Array.isArray(C))for(var h=[],l=0;l<C.length;l++)h[l]=I(C[l]);else{if(Object.prototype.toString.call(C)!=="[object Object]")return C;for(var l in h={},C)h[l]=I(C[l])}return h}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(w,f,_){f.last=function(h){return h[h.length-1]},f.stringReverse=function(h){return h.split("").reverse().join("")},f.stringRepeat=function(h,l){for(var c="";0<l;)1&l&&(c+=h),(l>>=1)&&(h+=h);return c};var I=/^\s\s*/,C=/\s\s*$/;f.stringTrimLeft=function(h){return h.replace(I,"")},f.stringTrimRight=function(h){return h.replace(C,"")},f.copyObject=function(h){var l,c={};for(l in h)c[l]=h[l];return c},f.copyArray=function(h){for(var l=[],c=0,n=h.length;c<n;c++)h[c]&&typeof h[c]=="object"?l[c]=this.copyObject(h[c]):l[c]=h[c];return l},f.deepCopy=w("./deep_copy").deepCopy,f.arrayToMap=function(h){for(var l={},c=0;c<h.length;c++)l[h[c]]=1;return l},f.createMap=function(h){var l,c=Object.create(null);for(l in h)c[l]=h[l];return c},f.arrayRemove=function(h,l){for(var c=0;c<=h.length;c++)l===h[c]&&h.splice(c,1)},f.escapeRegExp=function(h){return h.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},f.escapeHTML=function(h){return(""+h).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},f.getMatchOffsets=function(h,l){var c=[];return h.replace(l,function(n){c.push({offset:arguments[arguments.length-2],length:n.length})}),c},f.deferredCall=function(h){function l(){n=null,h()}function c(s){return c.cancel(),n=setTimeout(l,s||0),c}var n=null;return(c.schedule=c).call=function(){return this.cancel(),h(),c},c.cancel=function(){return clearTimeout(n),n=null,c},c.isPending=function(){return n},c},f.delayedCall=function(h,l){function c(){s=null,h()}function n(i){s==null&&(s=setTimeout(c,i||l))}var s=null;return n.delay=function(i){s&&clearTimeout(s),s=setTimeout(c,i||l)},(n.schedule=n).call=function(){this.cancel(),h()},n.cancel=function(){s&&clearTimeout(s),s=null},n.isPending=function(){return s},n},f.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},f.supportsUnicodeFlag=function(){try{new RegExp("^.$","u")}catch{return!1}return!0}}),ace.define("ace/lib/useragent",["require","exports","module"],function(w,f,_){f.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},f.getOS=function(){return f.isMac?f.OS.MAC:f.isLinux?f.OS.LINUX:f.OS.WINDOWS};var h=typeof navigator=="object"?navigator:{},I=(/mac|win|linux/i.exec(h.platform)||["other"])[0].toLowerCase(),C=h.userAgent||"",h=h.appName||"";f.isWin=I=="win",f.isMac=I=="mac",f.isLinux=I=="linux",f.isIE=h=="Microsoft Internet Explorer"||0<=h.indexOf("MSAppHost")?parseFloat((C.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((C.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),f.isOldIE=f.isIE&&f.isIE<9,f.isGecko=f.isMozilla=C.match(/ Gecko\/\d+/),f.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",f.isWebKit=parseFloat(C.split("WebKit/")[1])||void 0,f.isChrome=parseFloat(C.split(" Chrome/")[1])||void 0,f.isEdge=parseFloat(C.split(" Edge/")[1])||void 0,f.isAIR=0<=C.indexOf("AdobeAIR"),f.isAndroid=0<=C.indexOf("Android"),f.isChromeOS=0<=C.indexOf(" CrOS "),f.isIOS=/iPad|iPhone|iPod/.test(C)&&!window.MSStream,f.isIOS&&(f.isMac=!0),f.isMobile=f.isIOS||f.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(h,f,_){var I,C,h=h("./useragent"),l=(f.buildDom=function s(i,o,a){if(typeof i=="string"&&i)return g=document.createTextNode(i),o&&o.appendChild(g),g;if(!Array.isArray(i))return i&&i.appendChild&&o&&o.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var e=[],t=0;t<i.length;t++){var r=s(i[t],o,a);r&&e.push(r)}return e}for(var d=document.createElement(i[0]),p=i[1],g=1,t=g=p&&typeof p=="object"&&!Array.isArray(p)?2:g;t<i.length;t++)s(i[t],d,a);return g==2&&Object.keys(p).forEach(function(A){var x=p[A];A==="class"?d.className=Array.isArray(x)?x.join(" "):x:typeof x=="function"||A=="value"||A[0]=="$"?d[A]=x:A==="ref"?a&&(a[x]=d):A==="style"?typeof x=="string"&&(d.style.cssText=x):x!=null&&d.setAttribute(A,x)}),o&&o.appendChild(d),d},f.getDocumentHead=function(s){return(s=s||document).head||s.getElementsByTagName("head")[0]||s.documentElement},f.createElement=function(s,i){return document.createElementNS?document.createElementNS(i||"http://www.w3.org/1999/xhtml",s):document.createElement(s)},f.removeChildren=function(s){s.innerHTML=""},f.createTextNode=function(s,i){return(i?i.ownerDocument:document).createTextNode(s)},f.createFragment=function(s){return(s?s.ownerDocument:document).createDocumentFragment()},f.hasCssClass=function(s,i){return(s.className+"").split(/\s+/g).indexOf(i)!==-1},f.addCssClass=function(s,i){f.hasCssClass(s,i)||(s.className+=" "+i)},f.removeCssClass=function(s,i){for(var o=s.className.split(/\s+/g);;){var a=o.indexOf(i);if(a==-1)break;o.splice(a,1)}s.className=o.join(" ")},f.toggleCssClass=function(s,i){for(var o=s.className.split(/\s+/g),a=!0;;){var e=o.indexOf(i);if(e==-1)break;a=!1,o.splice(e,1)}return a&&o.push(i),s.className=o.join(" "),a},f.setCssClass=function(s,i,o){o?f.addCssClass(s,i):f.removeCssClass(s,i)},f.hasCssString=function(s,i){var o,a=0;if(o=(i=i||document).querySelectorAll("style")){for(;a<o.length;)if(o[a++].id===s)return!0}},f.removeElementById=function(s,i){(i=i||document).getElementById(s)&&i.getElementById(s).remove()},[]);function c(){var s=l;l=null,s&&s.forEach(function(i){n(i[0],i[1])})}function n(s,i,o){if(typeof document!="undefined"){if(l){if(o)c();else if(o===!1)return l.push([s,i])}if(!I){var a=o,o=(a=o&&o.getRootNode&&(a=o.getRootNode())&&a!=o?a:document).ownerDocument||a;if(i&&f.hasCssString(i,a))return null;i&&(s+=`
|
|
/*# sourceURL=ace/css/`+i+" */");var e=f.createElement("style");e.appendChild(o.createTextNode(s)),i&&(e.id=i),(a=a==o?f.getDocumentHead(o):a).insertBefore(e,a.firstChild)}}}f.useStrictCSP=function(s){(I=s)==0?c():l=l||[]},f.importCssString=n,f.importCssStylsheet=function(s,i){f.buildDom(["link",{rel:"stylesheet",href:s}],f.getDocumentHead(i))},f.scrollbarWidth=function(a){var i=f.createElement("ace_inner"),o=(i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block",f.createElement("ace_outer")),t=o.style,a=(t.position="absolute",t.left="-10000px",t.overflow="hidden",t.width="200px",t.minWidth="0px",t.height="150px",t.display="block",o.appendChild(i),a&&a.documentElement||document&&document.documentElement);if(!a)return 0;a.appendChild(o);var e=i.offsetWidth,t=(t.overflow="scroll",i.offsetWidth);return e===t&&(t=o.clientWidth),a.removeChild(o),e-t},f.computedStyle=function(s,i){return window.getComputedStyle(s,"")||{}},f.setStyle=function(s,i,o){s[i]!==o&&(s[i]=o)},f.HAS_CSS_ANIMATION=!1,f.HAS_CSS_TRANSFORMS=!1,f.HI_DPI=!h.isWin||typeof window!="undefined"&&1.5<=window.devicePixelRatio,h.isChromeOS&&(f.HI_DPI=!1),typeof document!="undefined"&&(C=document.createElement("div"),f.HI_DPI&&C.style.transform!==void 0&&(f.HAS_CSS_TRANSFORMS=!0),h.isEdge||C.style.animationName===void 0||(f.HAS_CSS_ANIMATION=!0),C=null),f.HAS_CSS_TRANSFORMS?f.translate=function(s,i,o){s.style.transform="translate("+Math.round(i)+"px, "+Math.round(o)+"px)"}:f.translate=function(s,i,o){s.style.top=Math.round(o)+"px",s.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(w,f,_){var I=w("./dom");f.get=function(C,h){var l=new XMLHttpRequest;l.open("GET",C,!0),l.onreadystatechange=function(){l.readyState===4&&h(l.responseText)},l.send(null)},f.loadScript=function(C,h){var l=I.getDocumentHead(),c=document.createElement("script");c.src=C,l.appendChild(c),c.onload=c.onreadystatechange=function(n,s){!s&&c.readyState&&c.readyState!="loaded"&&c.readyState!="complete"||(c=c.onload=c.onreadystatechange=null,s)||h()}},f.qualifyURL=function(C){var h=document.createElement("a");return h.href=C,h.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(w,f,_){f.inherits=function(I,C){I.super_=C,I.prototype=Object.create(C.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}})},f.mixin=function(I,C){for(var h in C)I[h]=C[h];return I},f.implement=function(I,C){f.mixin(I,C)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(w,f,_){function I(){this.propagationStopped=!0}function C(){this.defaultPrevented=!0}var h={};h._emit=h._dispatchEvent=function(l,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[l]||[],s=this._defaultHandlers[l];if(n.length||s){(c=typeof c=="object"&&c?c:{}).type||(c.type=l),c.stopPropagation||(c.stopPropagation=I),c.preventDefault||(c.preventDefault=C);for(var n=n.slice(),i=0;i<n.length&&(n[i](c,this),!c.propagationStopped);i++);return s&&!c.defaultPrevented?s(c,this):void 0}},h._signal=function(l,c){if(n=(this._eventRegistry||{})[l])for(var n=n.slice(),s=0;s<n.length;s++)n[s](c,this)},h.once=function(l,c){var n=this;if(this.on(l,function s(){n.off(l,s),c.apply(null,arguments)}),!c)return new Promise(function(s){c=s})},h.setDefaultHandler=function(l,c){var n,s,i=this._defaultHandlers;(i=i||(this._defaultHandlers={_disabled_:{}}))[l]&&(s=i[l],(n=i._disabled_[l])||(i._disabled_[l]=n=[]),n.push(s),(s=n.indexOf(c))!=-1)&&n.splice(s,1),i[l]=c},h.removeDefaultHandler=function(l,c){var n,s=this._defaultHandlers;s&&(n=s._disabled_[l],s[l]==c?n&&this.setDefaultHandler(l,n.pop()):n&&(s=n.indexOf(c))!=-1&&n.splice(s,1))},h.on=h.addEventListener=function(l,c,n){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[l];return(s=s||(this._eventRegistry[l]=[])).indexOf(c)==-1&&s[n?"unshift":"push"](c),c},h.off=h.removeListener=h.removeEventListener=function(l,c){this._eventRegistry=this._eventRegistry||{},l=this._eventRegistry[l],l&&(c=l.indexOf(c))!==-1&&l.splice(c,1)},h.removeAllListeners=function(l){l||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[l]=void 0),this._defaultHandlers&&(this._defaultHandlers[l]=void 0)},f.EventEmitter=h}),ace.define("ace/lib/report_error",["require","exports","module"],function(w,f,_){f.reportError=function(I,C){var h=new Error(I);h.data=C,typeof console=="object"&&console.error&&console.error(h),setTimeout(function(){throw h})}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error"],function(l,f,_){var I,C=l("./oop"),h=l("./event_emitter").EventEmitter,l=l("./report_error").reportError,c={setOptions:function(o){Object.keys(o).forEach(function(a){this.setOption(a,o[a])},this)},getOptions:function(o){var a,e={};return o?Array.isArray(o)||(e=o,o=Object.keys(e)):(a=this.$options,o=Object.keys(a).filter(function(t){return!a[t].hidden})),o.forEach(function(t){e[t]=this.getOption(t)},this),e},setOption:function(o,a){var e;if(this["$"+o]!==a)return(e=this.$options[o])?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].setOption(o,a):(e.handlesSet||(this["$"+o]=a),void(e&&e.set&&e.set.call(this,a))):n('misspelled option "'+o+'"')},getOption:function(o){var a=this.$options[o];return a?a.forwardTo?this[a.forwardTo]&&this[a.forwardTo].getOption(o):a&&a.get?a.get.call(this):this["$"+o]:n('misspelled option "'+o+'"')}};function n(o){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}i.prototype.defineOptions=function(o,a,e){return o.$options||(this.$defaultOptions[a]=o.$options={}),Object.keys(e).forEach(function(t){var r=e[t];(r=typeof r=="string"?{forwardTo:r}:r).name||(r.name=t),"initialValue"in(o.$options[r.name]=r)&&(o["$"+r.name]=r.initialValue)}),C.implement(o,c),this},i.prototype.resetOptions=function(o){Object.keys(o.$options).forEach(function(a){var e=o.$options[a];"value"in e&&o.setOption(a,e.value)})},i.prototype.setDefaultValue=function(o,a,e){if(!o){for(o in this.$defaultOptions)if(this.$defaultOptions[o][a])break;if(!this.$defaultOptions[o][a])return!1}var t=this.$defaultOptions[o]||(this.$defaultOptions[o]={});t[a]&&(t.forwardTo?this.setDefaultValue(t.forwardTo,a,e):t[a].value=e)},i.prototype.setDefaultValues=function(o,a){Object.keys(a).forEach(function(e){this.setDefaultValue(o,e,a[e])},this)},i.prototype.setMessages=function(o){I=o},i.prototype.nls=function(o,a){return I&&!I[o]&&n("No message found for '"+o+"' in the provided messages, falling back to default English message."),o=I&&I[o]||o,o=a?o.replace(/\$(\$|[\d]+)/g,function(e,t){return t=="$"?"$":a[t]}):o};var s=i;function i(){this.$defaultOptions={}}s.prototype.warn=n,s.prototype.reportError=l,C.implement(s.prototype,h),f.AppConfig=s}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(w,f,_){_.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(w,f,_){f.isDark=!1,f.cssClass="ace-tm",f.cssText=w("./textmate-css"),f.$id="ace/theme/textmate",w("../lib/dom").importCssString(f.cssText,f.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(w,f,_){var I,C=w("./lib/lang"),h=w("./lib/net"),l=w("./lib/dom"),c=w("./lib/app_config").AppConfig,n=(_.exports=f=new c,{packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null}),s=(f.get=function(i){if(n.hasOwnProperty(i))return n[i];throw new Error("Unknown config key: "+i)},f.set=function(i,o){if(n.hasOwnProperty(i))n[i]=o;else if(this.setDefaultValue("",i,o)==0)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&l.useStrictCSP(o)},f.all=function(){return C.copyObject(n)},f.$modes={},f.moduleUrl=function(i,o){var a,e,t;return n.$moduleUrls[i]||(i=i.split("/"),a=(o=o||i[i.length-2]||"")=="snippets"?"/":"-",e=i[i.length-1],o=="worker"&&a=="-"&&(t=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g"),e=e.replace(t,"")),(!e||e==o)&&1<i.length&&(e=i[i.length-2]),(t=n[o+"Path"])==null?t=n.basePath:a=="/"&&(o=a=""),t&&t.slice(-1)!="/"&&(t+="/"),t+o+a+e+this.get("suffix"))},f.setModuleUrl=function(i,o){return n.$moduleUrls[i]=o},f.setLoader=function(i){I=i},f.dynamicModules=Object.create(null),f.$loading={},f.$loaded={},f.loadModule=function(i,o){function a(r){if(r&&!f.$loading[i])return o&&o(r);if(f.$loading[i]||(f.$loading[i]=[]),f.$loading[i].push(o),!(1<f.$loading[i].length)){let d=function(){var p,g;g=function(A,x){x&&(f.$loaded[i]=x),f._emit("load.module",{name:i,module:x});var E=f.$loading[i];f.$loading[i]=null,E.forEach(function(W){W&&W(x)})},(p=i)==="ace/theme/textmate"||p==="./theme/textmate"?g(null,w("./theme/textmate")):I?I(p,g):console.error("loader is not configured")};if(!f.get("packaged"))return d();h.loadScript(f.moduleUrl(i,t),d),s()}}var e,t;if(Array.isArray(i)&&(t=i[0],i=i[1]),f.dynamicModules[i])f.dynamicModules[i]().then(function(r){r.default?a(r.default):a(r)});else{try{e=this.$require(i)}catch{}a(e||f.$loaded[i])}},f.$require=function(i){if(typeof _.require=="function")return _.require(i)},f.setModuleLoader=function(i,o){f.dynamicModules[i]=o},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"),s=function(){})});f.version="1.27.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(w,f,_){w("./lib/fixoldbrowsers");var I=w("./config"),C=(I.setLoader(function(l,c){w([l],function(n){c(null,n)})}),function(){return this||typeof window!="undefined"&&window}());function h(l){if(C&&C.document){I.set("packaged",l||w.packaged||_.packaged||C.define&&O.amdD.packaged);for(var c,n={},s="",l=document.currentScript||document._currentScript,i=l&&l.ownerDocument||document,o=(l&&l.src&&(s=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||""),i.getElementsByTagName("script")),a=0;a<o.length;a++){var e=o[a],t=e.src||e.getAttribute("src");if(t){for(var r=e.attributes,d=0,p=r.length;d<p;d++){var g=r[d];g.name.indexOf("data-ace-")===0&&(n[g.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(x,E){return E.toUpperCase()})]=g.value)}e=t.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/),e&&(s=e[1])}}for(c in s&&(n.base=n.base||s,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base,n)n[c]!==void 0&&I.set(c,n[c])}}_.exports=function(l){I.init=h,I.$require=w,l.require=w,l.define=O.amdD},h(!0)}),ace.define("ace/range",["require","exports","module"],function(w,f,_){C.prototype.isEqual=function(h){return this.start.row===h.start.row&&this.end.row===h.end.row&&this.start.column===h.start.column&&this.end.column===h.end.column},C.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},C.prototype.contains=function(h,l){return this.compare(h,l)==0},C.prototype.compareRange=function(l){var c=l.end,l=l.start,c=this.compare(c.row,c.column);return c==1?(c=this.compare(l.row,l.column))==1?2:c==0?1:0:c==-1?-2:(c=this.compare(l.row,l.column))==-1?-1:c==1?42:0},C.prototype.comparePoint=function(h){return this.compare(h.row,h.column)},C.prototype.containsRange=function(h){return this.comparePoint(h.start)==0&&this.comparePoint(h.end)==0},C.prototype.intersects=function(h){return h=this.compareRange(h),h==-1||h==0||h==1},C.prototype.isEnd=function(h,l){return this.end.row==h&&this.end.column==l},C.prototype.isStart=function(h,l){return this.start.row==h&&this.start.column==l},C.prototype.setStart=function(h,l){typeof h=="object"?(this.start.column=h.column,this.start.row=h.row):(this.start.row=h,this.start.column=l)},C.prototype.setEnd=function(h,l){typeof h=="object"?(this.end.column=h.column,this.end.row=h.row):(this.end.row=h,this.end.column=l)},C.prototype.inside=function(h,l){return this.compare(h,l)==0&&!this.isEnd(h,l)&&!this.isStart(h,l)},C.prototype.insideStart=function(h,l){return this.compare(h,l)==0&&!this.isEnd(h,l)},C.prototype.insideEnd=function(h,l){return this.compare(h,l)==0&&!this.isStart(h,l)},C.prototype.compare=function(h,l){return this.isMultiLine()||h!==this.start.row?h<this.start.row?-1:h>this.end.row?1:this.start.row===h?l>=this.start.column?0:-1:this.end.row!==h||l<=this.end.column?0:1:l<this.start.column?-1:l>this.end.column?1:0},C.prototype.compareStart=function(h,l){return this.start.row==h&&this.start.column==l?-1:this.compare(h,l)},C.prototype.compareEnd=function(h,l){return this.end.row==h&&this.end.column==l?1:this.compare(h,l)},C.prototype.compareInside=function(h,l){return this.end.row==h&&this.end.column==l?1:this.start.row==h&&this.start.column==l?-1:this.compare(h,l)},C.prototype.clipRows=function(h,l){var c,n;return this.end.row>l?c={row:l+1,column:0}:this.end.row<h&&(c={row:h,column:0}),this.start.row>l?n={row:l+1,column:0}:this.start.row<h&&(n={row:h,column:0}),C.fromPoints(n||this.start,c||this.end)},C.prototype.extend=function(h,l){var c,n,s=this.compare(h,l);return s==0?this:(s==-1?c={row:h,column:l}:n={row:h,column:l},C.fromPoints(c||this.start,n||this.end))},C.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},C.prototype.isMultiLine=function(){return this.start.row!==this.end.row},C.prototype.clone=function(){return C.fromPoints(this.start,this.end)},C.prototype.collapseRows=function(){return this.end.column==0?new C(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new C(this.start.row,0,this.end.row,0)},C.prototype.toScreenRange=function(c){var l=c.documentToScreenPosition(this.start),c=c.documentToScreenPosition(this.end);return new C(l.row,l.column,c.row,c.column)},C.prototype.moveBy=function(h,l){this.start.row+=h,this.start.column+=l,this.end.row+=h,this.end.column+=l};var I=C;function C(h,l,c,n){this.start={row:h,column:l},this.end={row:c,column:n}}I.fromPoints=function(h,l){return new I(h.row,h.column,l.row,l.column)},I.comparePoints=function(h,l){return h.row-l.row||h.column-l.column},I.comparePoints=function(h,l){return h.row-l.row||h.column-l.column},f.Range=I}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(w,f,_){var I=w("./oop"),C=function(){var h,l,c={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(l in c.PRINTABLE_KEYS[173]="-",c.FUNCTION_KEYS)h=c.FUNCTION_KEYS[l].toLowerCase(),c[h]=parseInt(l,10);for(l in c.PRINTABLE_KEYS)h=c.PRINTABLE_KEYS[l].toLowerCase(),c[h]=parseInt(l,10);I.mixin(c,c.MODIFIER_KEYS),I.mixin(c,c.PRINTABLE_KEYS),I.mixin(c,c.FUNCTION_KEYS),c.enter=c.return,c.escape=c.esc,c.del=c.delete;for(var n=["cmd","ctrl","alt","shift"],s=Math.pow(2,n.length);s--;)c.KEY_MODS[s]=n.filter(function(i){return s&c.KEY_MODS[i]}).join("-")+"-";return c.KEY_MODS[0]="",c.KEY_MODS[-1]="input-",c}();I.mixin(f,C),(f.default=f).keyCodeToString=function(h){var l=C[h];return(l=typeof l!="string"?String.fromCharCode(h):l).toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(w,f,_){var I,C=w("./keys"),h=w("./useragent"),l=null,c=0;function n(){if(I==null){I=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){I={passive:!1}}})}catch{}}return I}function s(d,p,g){this.elem=d,this.type=p,this.callback=g}s.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};function i(d){return 0|(d.ctrlKey?1:0)|(d.altKey?2:0)|(d.shiftKey?4:0)|(d.metaKey?8:0)}var o,a=f.addListener=function(d,p,g,A){d.addEventListener(p,g,n()),A&&A.$toDestroy.push(new s(d,p,g))},e=f.removeListener=function(d,p,g){d.removeEventListener(p,g,n())};f.stopEvent=function(d){return f.stopPropagation(d),f.preventDefault(d),!1},f.stopPropagation=function(d){d.stopPropagation&&d.stopPropagation()},f.preventDefault=function(d){d.preventDefault&&d.preventDefault()},f.getButton=function(d){return d.type=="dblclick"?0:d.type=="contextmenu"||h.isMac&&d.ctrlKey&&!d.altKey&&!d.shiftKey?2:d.button},f.capture=function(d,p,g){var A=d&&d.ownerDocument||document;function x(E){p&&p(E),g&&g(E),e(A,"mousemove",p),e(A,"mouseup",x),e(A,"dragstart",x)}return a(A,"mousemove",p),a(A,"mouseup",x),a(A,"dragstart",x),x},f.addMouseWheelListener=function(d,p,g){a(d,"wheel",function(A){var x=A.deltaX||0,E=A.deltaY||0;switch(A.deltaMode){case A.DOM_DELTA_PIXEL:A.wheelX=.15*x,A.wheelY=.15*E;break;case A.DOM_DELTA_LINE:A.wheelX=15*x,A.wheelY=15*E;break;case A.DOM_DELTA_PAGE:A.wheelX=150*x,A.wheelY=150*E}p(A)},g)},f.addMultiMouseDownListener=function(d,p,g,A,x){var E,W,B,V=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function v($){var y;if(f.getButton($)!==0?V=0:1<$.detail&&!(4<++V)||(V=1),h.isIE&&(y=5<Math.abs($.clientX-E)||5<Math.abs($.clientY-W),B&&!y||(V=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},p[V-1]||600),V==1)&&(E=$.clientX,W=$.clientY),$._clicks=V,g[A]("mousedown",$),4<V)V=0;else if(1<V)return g[A](u[V],$)}(d=Array.isArray(d)?d:[d]).forEach(function($){a($,"mousedown",v,x)})};function t(d,p,g){var A=i(p);if(!h.isMac&&l){if(p.getModifierState&&(p.getModifierState("OS")||p.getModifierState("Win"))&&(A|=8),l.altGr){if((3&A)==3)return;l.altGr=0}g!==18&&g!==17||(x="location"in p?p.location:p.keyLocation,g===17&&x===1?l[g]==1&&(c=p.timeStamp):g===18&&A===3&&x===2&&p.timeStamp-c<50&&(l.altGr=!0))}if(g in C.MODIFIER_KEYS&&(g=-1),!A&&g===13){var x="location"in p?p.location:p.keyLocation;if(x===3&&(d(p,A,-g),p.defaultPrevented))return}if(h.isChromeOS&&8&A){if(d(p,A,g),p.defaultPrevented)return;A&=-9}return!!(A||g in C.FUNCTION_KEYS||g in C.PRINTABLE_KEYS)&&d(p,A,g)}function r(){l=Object.create(null)}f.getModifierString=function(d){return C.KEY_MODS[i(d)]},f.addCommandKeyListener=function(d,p,g){var A,x;h.isOldGecko||h.isOpera&&!("KeyboardEvent"in window)?(A=null,a(d,"keydown",function(E){A=E.keyCode},g),a(d,"keypress",function(E){return t(p,E,A)},g)):(x=null,a(d,"keydown",function(E){l[E.keyCode]=(l[E.keyCode]||0)+1;var W=t(p,E,E.keyCode);return x=E.defaultPrevented,W},g),a(d,"keypress",function(E){x&&(E.ctrlKey||E.altKey||E.shiftKey||E.metaKey)&&(f.stopEvent(E),x=null)},g),a(d,"keyup",function(E){l[E.keyCode]=null},g),l||(r(),a(window,"focus",r)))},typeof window=="object"&&window.postMessage&&!h.isOldIE&&(o=1,f.nextTick=function(d,p){p=p||window;function g(x){x.data==A&&(f.stopPropagation(x),e(p,"message",g),d())}var A="zero-timeout-message-"+o++;a(p,"message",g),p.postMessage(A,"*")}),f.$idleBlocked=!1,f.onIdle=function(d,p){return setTimeout(function g(){f.$idleBlocked?setTimeout(g,100):d()},p)},f.$idleBlockId=null,f.blockIdle=function(d){f.$idleBlockId&&clearTimeout(f.$idleBlockId),f.$idleBlocked=!0,f.$idleBlockId=setTimeout(function(){f.$idleBlocked=!1},d||100)},f.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),f.nextFrame?f.nextFrame=f.nextFrame.bind(window):f.nextFrame=function(d){setTimeout(d,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(w,f,_){var I;_.exports={lineMode:!1,pasteCancelled:function(){return!!(I&&I>Date.now()-50)||(I=!1)},cancel:function(){I=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(w,f,_){var I=w("../lib/event"),C=w("../config").nls,h=w("../lib/useragent"),l=w("../lib/dom"),c=w("../lib/lang"),n=w("../clipboard"),s=h.isChrome<18,i=h.isIE,o=63<h.isChrome,a=w("../lib/keys"),e=a.KEY_MODS,t=h.isIOS,r=t?/\s/:/\n/,d=h.isMobile;f.TextInput=function(p,g){var A=l.createElement("textarea"),x=(A.className="ace_text-input",A.setAttribute("wrap","off"),A.setAttribute("autocorrect","off"),A.setAttribute("autocapitalize","off"),A.setAttribute("spellcheck",!1),A.style.opacity="0",p.insertBefore(A,p.firstChild),!1),E=!1,W=!1,B=!1,V="",u=(d||(A.style.fontSize="1px"),!1),v=!1,$="",y=0,L=0,H=0,G=Number.MAX_SAFE_INTEGER,Y=Number.MIN_SAFE_INTEGER,Q=0;try{var z=document.activeElement===A}catch{}this.setNumberOfExtraLines=function(he){G=Number.MAX_SAFE_INTEGER,Y=Number.MIN_SAFE_INTEGER,Q=he<0?0:he},this.setAriaOptions=function(he){he.activeDescendant?(A.setAttribute("aria-haspopup","true"),A.setAttribute("aria-autocomplete",he.inline?"both":"list"),A.setAttribute("aria-activedescendant",he.activeDescendant)):(A.setAttribute("aria-haspopup","false"),A.setAttribute("aria-autocomplete","both"),A.removeAttribute("aria-activedescendant")),he.role&&A.setAttribute("role",he.role),he.setLabel&&(A.setAttribute("aria-roledescription",C("editor")),g.session)&&(he=g.session.selection.cursor.row,A.setAttribute("aria-label",C("Cursor at row $0",[he+1])))},this.setAriaOptions({role:"textbox"}),I.addListener(A,"blur",function(he){v||(g.onBlur(he),z=!1)},g),I.addListener(A,"focus",function(he){if(!v){if(z=!0,h.isEdge)try{if(!document.hasFocus())return}catch{}g.onFocus(he),h.isEdge?setTimeout(b):b()}},g),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:g.renderer.enableKeyboardAccessibility}),V||o||this.$focusScroll=="browser")return A.focus({preventScroll:!0});var he=A.style.top;A.style.position="fixed",A.style.top="0px";try{var ue=A.getBoundingClientRect().top!=0}catch{return}var ye=[];if(ue)for(var ve=A.parentElement;ve&&ve.nodeType==1;)ye.push(ve),ve.setAttribute("ace_nocontext",!0),ve=!ve.parentElement&&ve.getRootNode?ve.getRootNode().host:ve.parentElement;A.focus({preventScroll:!0}),ue&&ye.forEach(function(be){be.removeAttribute("ace_nocontext")}),setTimeout(function(){A.style.position="",A.style.top=="0px"&&(A.style.top=he)},0)},this.blur=function(){A.blur()},this.isFocused=function(){return z},g.on("beforeEndOperation",function(){var he=g.curOp,ue=he&&he.command&&he.command.name;ue!="insertstring"&&(ue=ue&&(he.docChanged||he.selectionChanged),W&&ue&&($=A.value="",ke()),b())});function ee(he,ue){for(var ye=ue,ve=1;ve<=he-G&&ve<2*Q+1;ve++)ye+=g.session.getLine(he-ve).length+1;return ye}function T(he){Ce(he,!0)}function P(he){Ce(he,!1)}function Z(he){var ue=me(he);n.pasteCancelled()||(typeof ue=="string"?(ue&&g.onPaste(ue,he),h.isIE&&setTimeout(b),I.preventDefault(he)):(A.value="",E=!0))}var b=t?function(he){var ue;!z||x&&!he||B||((ue=`
|
|
ab`+(he=he||"")+`cde fg
|
|
`)!=A.value&&(A.value=$=ue),ue=4+(he.length||(g.selection.isEmpty()?0:1)),y==4&&L==ue||A.setSelectionRange(4,ue),y=4,L=ue)}:function(){if(!W&&!B&&(z||D)){W=!0;var he=0,ue=0,ye="";if(g.session){for(var ve,Ee=g.selection,be=Ee.getRange(),Ee=Ee.cursor.row,Ge=(Ee===Y+1?Y=(G=Y+1)+2*Q:Ee===G-1?G=(Y=G-1)-2*Q:(Ee<G-1||Y+1<Ee)&&(G=Q<Ee?Ee-Q:0,Y=Q<Ee?Ee+Q:2*Q),[]),q=G;q<=Y;q++)Ge.push(g.session.getLine(q));ye=Ge.join(`
|
|
`),he=ee(be.start.row,be.start.column),ue=ee(be.end.row,be.end.column),be.start.row<G?(ve=g.session.getLine(G-1),he=be.start.row<G-1?0:he,ue+=ve.length+1,ye=ve+`
|
|
`+ye):be.end.row>Y?(ve=g.session.getLine(Y+1),ue=be.end.row>Y+1?ve.length:be.end.column,ue+=ye.length+1,ye=ye+`
|
|
`+ve):d&&0<Ee&&(ye=`
|
|
`+ye,ue+=1,he+=1),400<ye.length&&(he<400&&ue<400?ye=ye.slice(0,400):(ye=`
|
|
`,he==ue?he=ue=0:(he=0,ue=1))),be=ye+`
|
|
|
|
`,be!=$&&(A.value=$=be,y=L=be.length)}if(D&&(y=A.selectionStart,L=A.selectionEnd),L!=ue||y!=he||A.selectionEnd!=L)try{A.setSelectionRange(he,ue),y=he,L=ue}catch{}W=!1}},k=(this.resetSelection=b,z&&g.onFocus(),function(he){return he.selectionStart===0&&he.selectionEnd>=$.length&&he.value===$&&$&&he.selectionEnd!==L}),R=null,D=(this.setInputHandler=function(he){R=he},!(this.getInputHandler=function(){return R})),J=function(he,ue){if(D=D&&!1,E)return b(),he&&g.onPaste(he),E=!1,"";for(var ye=A.selectionStart,ve=A.selectionEnd,be=y,Ee=$.length-L,Ge=he,q=he.length-ye,re=he.length-ve,ce=0;0<be&&$[ce]==he[ce];)ce++,be--;for(Ge=Ge.slice(ce),ce=1;0<Ee&&$.length-ce>y-1&&$[$.length-ce]==he[he.length-ce];)ce++,Ee--;q-=ce-1,re-=ce-1;var fe=Ge.length-ce+1;return fe<0&&(be=-fe,fe=0),Ge=Ge.slice(0,fe),ue||Ge||q||be||Ee||re?(fe=!(B=!0),h.isAndroid&&Ge==". "&&(Ge=" ",fe=!0),Ge&&!be&&!Ee&&!q&&!re||u?g.onTextInput(Ge):g.onTextInput(Ge,{extendLeft:be,extendRight:Ee,restoreStart:q,restoreEnd:re}),B=!1,$=he,y=ye,L=ve,H=re,fe?`
|
|
`:Ge):""},ne=function(ue){if(W)return Ie();if(ue&&ue.inputType){if(ue.inputType=="historyUndo")return g.execCommand("undo");if(ue.inputType=="historyRedo")return g.execCommand("redo")}var ue=A.value,ye=J(ue,!0);(500<ue.length||r.test(ye)||d&&y<1&&y==L)&&b()},me=function(he,ue,ye){var ve=he.clipboardData||window.clipboardData;if(ve&&!s){var be=i||ye?"Text":"text/plain";try{return ue?ve.setData(be,ue)!==!1:ve.getData(be)}catch(Ee){if(!ye)return me(Ee,ue,!0)}}},Ce=function(he,ue){var ye=g.getCopyText();if(!ye)return I.preventDefault(he);me(he,ye)?(t&&(b(ye),x=ye,setTimeout(function(){x=!1},10)),ue?g.onCut():g.onCopy(),I.preventDefault(he)):(x=!0,A.value=ye,A.select(),setTimeout(function(){x=!1,b(),ue?g.onCut():g.onCopy()}))},Ie=(I.addCommandKeyListener(A,g.onCommandKey.bind(g),g),I.addListener(A,"select",function(he){W||(x?x=!1:k(A)?(g.selectAll(),b()):d&&A.selectionStart!=y&&b())},g),I.addListener(A,"input",ne,g),I.addListener(A,"cut",T,g),I.addListener(A,"copy",P,g),I.addListener(A,"paste",Z,g),"oncut"in A&&"oncopy"in A&&"onpaste"in A||I.addListener(p,"keydown",function(he){if((!h.isMac||he.metaKey)&&he.ctrlKey)switch(he.keyCode){case 67:P(he);break;case 86:Z(he);break;case 88:T(he)}},g),function(){var he;if(W&&g.onCompositionUpdate&&!g.$readOnly)return u?Se():void(W.useTextareaForIME?g.onCompositionUpdate(A.value):(he=A.value,J(he),W.markerRange&&(W.context&&(W.markerRange.start.column=W.selectionStart=W.context.compositionStartOffset),W.markerRange.end.column=W.markerRange.start.column+L-W.selectionStart+H)))}),ke=function(he){g.onCompositionEnd&&!g.$readOnly&&(W=!1,g.onCompositionEnd(),g.off("mousedown",Se),he)&&ne()};function Se(){v=!0,A.blur(),A.focus(),v=!1}var Te,Re=c.delayedCall(Ie,50).schedule.bind(null,null);function Le(){clearTimeout(Te),Te=setTimeout(function(){V&&(A.style.cssText=V,V=""),g.renderer.$isMousePressed=!1,g.renderer.$keepTextAreaAtCursor&&g.renderer.$moveTextAreaToCursor()},0)}I.addListener(A,"compositionstart",function(he){W||!g.onCompositionStart||g.$readOnly||(W={},u)||(he.data&&(W.useTextareaForIME=!1),setTimeout(Ie,0),g._signal("compositionStart"),g.on("mousedown",Se),(he=g.getSelectionRange()).end.row=he.start.row,he.end.column=he.start.column,W.markerRange=he,W.selectionStart=y,g.onCompositionStart(W),W.useTextareaForIME?($=A.value="",L=y=0):(A.msGetInputContext&&(W.context=A.msGetInputContext()),A.getInputContext&&(W.context=A.getInputContext())))},g),I.addListener(A,"compositionupdate",Ie,g),I.addListener(A,"keyup",function(he){he.keyCode==27&&A.value.length<A.selectionStart&&(W||($=A.value),y=L=-1,b()),Re()},g),I.addListener(A,"keydown",Re,g),I.addListener(A,"compositionend",ke,g),this.getElement=function(){return A},this.setCommandMode=function(he){u=he,A.readOnly=!1},this.setReadOnly=function(he){u||(A.readOnly=he)},this.setCopyWithEmptySelection=function(he){},this.onContextMenu=function(he){D=!0,b(),g._emit("nativecontextmenu",{target:g,domEvent:he}),this.moveToMouse(he,!0)},this.moveToMouse=function(he,ve){V=V||A.style.cssText,A.style.cssText=(ve?"z-index:100000;":"")+(h.isIE?"opacity:0.1;":"")+"text-indent: -"+(y+L)*g.renderer.characterWidth*.5+"px;";function ye(re){l.translate(A,re.clientX-Ge-2,Math.min(re.clientY-Ee-2,q))}var ve=g.container.getBoundingClientRect(),be=l.computedStyle(g.container),Ee=ve.top+(parseInt(be.borderTopWidth)||0),Ge=ve.left+(parseInt(ve.borderLeftWidth)||0),q=ve.bottom-Ee-A.clientHeight-2;ye(he),he.type=="mousedown"&&(g.renderer.$isMousePressed=!0,clearTimeout(Te),h.isWin)&&I.capture(g.container,ye,Le)},this.onContextMenuClose=Le;function le(he){g.textInput.onContextMenu(he),Le()}if(I.addListener(A,"mouseup",le,g),I.addListener(A,"mousedown",function(he){he.preventDefault(),Le()},g),I.addListener(g.renderer.scroller,"contextmenu",le,g),I.addListener(A,"contextmenu",le,g),t){let he=function(ue){var ye,ve,be,Ee;document.activeElement!==pe||Pe||W||oe.$mouseHandler.isMousePressed||x||(ye=pe.selectionStart,ve=pe.selectionEnd,be=null,(Ee=0)==ye?be=a.up:ye==1?be=a.home:L<ve&&$[ve]==`
|
|
`?be=a.end:ye<y&&$[ye-1]==" "?(be=a.left,Ee=e.option):ye<y||ye==y&&L!=y&&ye==ve?be=a.left:L<ve&&2<$.slice(0,ve).split(`
|
|
`).length?be=a.down:L<ve&&$[ve-1]==" "?(be=a.right,Ee=e.option):(L<ve||ve==L&&L!=y&&ye==ve)&&(be=a.right),ye!==ve&&(Ee|=e.shift),be&&(!oe.onCommandKey({},Ee,be)&&oe.commands&&(be=a.keyCodeToString(be),Ee=oe.commands.findKeyCommand(Ee,be))&&oe.execCommand(Ee),y=ye,L=ve,b("")))};var oe=g,pe=A,Me=null,Pe=!1;pe.addEventListener("keydown",function(ue){Me&&clearTimeout(Me),Pe=!0},!0),pe.addEventListener("keyup",function(ue){Me=setTimeout(function(){Pe=!1},100)},!0),document.addEventListener("selectionchange",he),oe.on("destroy",function(){document.removeEventListener("selectionchange",he)})}this.destroy=function(){A.parentElement&&A.parentElement.removeChild(A)}},f.$setUserAgentForTests=function(p,g){d=p,t=g}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(C,f,_){var I=C("../lib/useragent"),C=(h.prototype.onMouseDown=function(c){var n=c.inSelection(),s=c.getDocumentPosition(),i=(this.mousedownEvent=c,this.editor),o=c.getButton();if(o!==0)!i.getSelectionRange().isEmpty()&&o!=1||i.selection.moveToPosition(s),o==2&&(i.textInput.onContextMenu(c.domEvent),I.isMozilla||c.preventDefault());else{if(this.mousedownEvent.time=Date.now(),!n||i.isFocused()||(i.focus(),!this.$focusTimeout)||this.$clickSelection||i.inMultiSelectMode)return this.captureMouse(c),this.startSelect(s,1<c.domEvent._clicks),c.preventDefault();this.setState("focusWait"),this.captureMouse(c)}},h.prototype.startSelect=function(c,n){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(c):n||s.selection.moveToPosition(c),n||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},h.prototype.select=function(){var c,n=this.editor,s=n.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(c=(c=this.$clickSelection.comparePoint(s))==-1?this.$clickSelection.end:c==1?this.$clickSelection.start:(s=(c=l(this.$clickSelection,s)).cursor,c.anchor),n.selection.setSelectionAnchor(c.row,c.column)),n.selection.selectToPosition(s),n.renderer.scrollCursorIntoView()},h.prototype.extendSelectionBy=function(e){var n,s,i,o=this.editor,a=o.renderer.screenToTextCoordinates(this.x,this.y),e=o.selection[e](a.row,a.column);this.$clickSelection&&(s=this.$clickSelection.comparePoint(e.start),n=this.$clickSelection.comparePoint(e.end),s==-1&&n<=0?(i=this.$clickSelection.end,e.end.row==a.row&&e.end.column==a.column||(a=e.start)):n==1&&0<=s?(i=this.$clickSelection.start,e.start.row==a.row&&e.start.column==a.column||(a=e.end)):i=s==-1&&n==1?(a=e.end,e.start):(a=(s=l(this.$clickSelection,a)).cursor,s.anchor),o.selection.setSelectionAnchor(i.row,i.column)),o.selection.selectToPosition(a),o.renderer.scrollCursorIntoView()},h.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},h.prototype.focusWait=function(){i=this.mousedownEvent.x,c=this.mousedownEvent.y,s=this.x,n=this.y;var c,n,s=Math.sqrt(Math.pow(s-i,2)+Math.pow(n-c,2)),i=Date.now();(0<s||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},h.prototype.onDoubleClick=function(n){var n=n.getDocumentPosition(),s=this.editor,i=s.session.getBracketRange(n);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=s.selection.getWordRange(n.row,n.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},h.prototype.onTripleClick=function(n){var n=n.getDocumentPosition(),s=this.editor,i=(this.setState("selectByLines"),s.getSelectionRange());i.isMultiLine()&&i.contains(n.row,n.column)?(this.$clickSelection=s.selection.getLineRange(i.start.row),this.$clickSelection.end=s.selection.getLineRange(i.end.row).end):this.$clickSelection=s.selection.getLineRange(n.row),this.select()},h.prototype.onQuadClick=function(c){var n=this.editor;n.selectAll(),this.$clickSelection=n.getSelectionRange(),this.setState("selectAll")},h.prototype.onMouseWheel=function(c){var n,s,i,o,a,e,t;if(!c.getAccelKey())return c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0),n=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),s=this.$lastScroll,o=(t=(i=c.domEvent.timeStamp)-s.t)?c.wheelX/t:s.vx,a=t?c.wheelY/t:s.vy,t<550&&(o=(o+s.vx)/2,a=(a+s.vy)/2),t=!1,1<=(e=Math.abs(o/a))&&n.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(t=!0),(t=e<=1&&n.renderer.isScrollableBy(0,c.wheelY*c.speed)?!0:t)?s.allowed=i:i-s.allowed<550&&(Math.abs(o)<=1.5*Math.abs(s.vx)&&Math.abs(a)<=1.5*Math.abs(s.vy)?(t=!0,s.allowed=i):s.allowed=0),s.t=i,s.vx=o,s.vy=a,t?(n.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()):void 0},h);function h(c){c.$clickSelection=null;var n=c.editor;n.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),n.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),n.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),n.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),n.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(s){c[s]=this[s]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}function l(c,n){return(c.start.row==c.end.row?2*n.column-c.start.column-c.end.column:c.start.row!=c.end.row-1||c.start.column||c.end.column?2*n.row-c.start.row-c.end.row:n.column-4)<0?{cursor:c.start,anchor:c.end}:{cursor:c.end,anchor:c.start}}C.prototype.selectEnd=C.prototype.selectByLinesEnd,C.prototype.selectAllEnd=C.prototype.selectByLinesEnd,C.prototype.selectByWordsEnd=C.prototype.selectByLinesEnd,f.DefaultHandlers=C}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],function(n,f,_){var I,e=this&&this.__extends||(I=function(r,d){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(p,g){p.__proto__=g}:function(p,g){for(var A in g)Object.prototype.hasOwnProperty.call(g,A)&&(p[A]=g[A])}))(r,d)},function(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function p(){this.constructor=r}I(r,d),r.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}),C=this&&this.__values||function(r){var d=typeof Symbol=="function"&&Symbol.iterator,p=d&&r[d],g=0;if(p)return p.call(r);if(r&&typeof r.length=="number")return{next:function(){return{value:(r=r&&g>=r.length?void 0:r)&&r[g++],done:!r}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},h=n("./lib/dom"),l=n("./range").Range,c="ace_tooltip",n=(s.prototype.$init=function(){return this.$element=h.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(r){this.getElement().textContent=r},s.prototype.setHtml=function(r){this.getElement().innerHTML=r},s.prototype.setPosition=function(r,d){this.getElement().style.left=r+"px",this.getElement().style.top=d+"px"},s.prototype.setClassName=function(r){h.addCssClass(this.getElement(),r)},s.prototype.setTheme=function(r){this.$element.className=c+" "+(r.isDark?"ace_dark ":"")+(r.cssClass||"")},s.prototype.show=function(r,d,p){r!=null&&this.setText(r),d!=null&&p!=null&&this.setPosition(d,p),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s);function s(r){this.isOpen=!1,this.$element=null,this.$parentNode=r}function i(){this.popups=[]}i.prototype.addPopup=function(r){this.popups.push(r),this.updatePopups()},i.prototype.removePopup=function(r){r=this.popups.indexOf(r),r!==-1&&(this.popups.splice(r,1),this.updatePopups())},i.prototype.updatePopups=function(){this.popups.sort(function($,y){return y.priority-$.priority});var r,d,p,g,A=[];try{for(var x=C(this.popups),E=x.next();!E.done;E=x.next()){var W=E.value,B=!0;try{p=void 0;for(var V=C(A),u=V.next();!u.done;u=V.next()){var v=u.value;if(this.doPopupsOverlap(v,W)){B=!1;break}}}catch($){p={error:$}}finally{try{u&&!u.done&&(g=V.return)&&g.call(V)}finally{if(p)throw p.error}}B?A.push(W):W.hide()}}catch($){r={error:$}}finally{try{E&&!E.done&&(d=x.return)&&d.call(x)}finally{if(r)throw r.error}}},i.prototype.doPopupsOverlap=function(r,d){return r=r.getElement().getBoundingClientRect(),d=d.getElement().getBoundingClientRect(),r.left<d.right&&r.right>d.left&&r.top<d.bottom&&r.bottom>d.top};var o,a=new i,e=(f.popupManager=a,f.Tooltip=n,e(t,o=n),t.prototype.addToEditor=function(r){r.on("mousemove",this.onMouseMove),r.on("mousedown",this.hide),r.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(r){r.off("mousemove",this.onMouseMove),r.off("mousedown",this.hide),r.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(r,g){this.lastEvent=r,this.lastT=Date.now();var p,g=g.$mouseHandler.isMousePressed;this.isOpen&&(p=this.lastEvent&&this.lastEvent.getDocumentPosition(),this.range&&this.range.contains(p.row,p.column)&&!g&&!this.isOutsideOfText(this.lastEvent)||this.hide()),this.timeout||g||(this.lastEvent=r,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var r=Date.now()-this.lastT;10<this.idleTime-r?this.timeout=setTimeout(this.waitForHover,this.idleTime-r):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(r){var d=r.editor,p=r.getDocumentPosition(),g=d.session.getLine(p.row);return p.column==g.length&&(g=d.renderer.pixelToScreenCoordinates(r.clientX,r.clientY),r=d.session.documentToScreenPosition(p.row,p.column),r.column!=g.column||r.row!=g.row)},t.prototype.setDataProvider=function(r){this.$gatherData=r},t.prototype.showForRange=function(r,d,p,g){var A,x,E;g&&g!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement()||(g=r.renderer,this.isOpen||(a.addPopup(this),this.$registerCloseEvents(),this.setTheme(g.theme)),this.isOpen=!0,this.addMarker(d,r.session),this.range=l.fromPoints(d.start,d.end),(A=this.getElement()).innerHTML="",A.appendChild(p),A.style.display="block",p=g.textToScreenCoordinates(d.start.row,d.start.column),d=r.getCursorPosition(),r=A.clientHeight,x=g.scroller.getBoundingClientRect(),E=!0,this.row>d.row?E=!0:this.row<d.row&&(E=!1),p.pageY-r+g.lineHeight<x.top?E=!0:p.pageY+r>x.bottom&&(E=!1),E?p.pageY+=g.lineHeight:p.pageY-=r,A.style.maxWidth=x.width-(p.pageX-x.left)+"px",this.setPosition(p.pageX,p.pageY))},t.prototype.addMarker=function(r,d){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=d,this.marker=d&&d.addMarker(r,"ace_highlight-marker","text")},t.prototype.hide=function(r){!r&&document.activeElement==this.getElement()||r&&r.target&&(r.type!="keydown"||r.ctrlKey||r.metaKey)&&this.$element.contains(r.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,a.removePopup(this)))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},t.prototype.onMouseOut=function(r){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,!this.isOpen||!r.relatedTarget||r.relatedTarget==this.getElement()||r&&r.currentTarget.contains(r.relatedTarget)||r.relatedTarget.classList.contains("ace_content")||this.hide()},t);function t(d){d===void 0&&(d=document.body);var d=o.call(this,d)||this,p=(d.timeout=void 0,d.lastT=0,d.idleTime=350,d.lastEvent=void 0,d.onMouseOut=d.onMouseOut.bind(d),d.onMouseMove=d.onMouseMove.bind(d),d.waitForHover=d.waitForHover.bind(d),d.hide=d.hide.bind(d),d.getElement());return p.style.whiteSpace="pre-wrap",p.style.pointerEvents="auto",p.addEventListener("mouseout",d.onMouseOut),p.tabIndex=-1,p.addEventListener("blur",function(){p.contains(document.activeElement)||this.hide()}.bind(d)),d}f.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(w,f,_){var I,C=this&&this.__extends||(I=function(e,t){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(r,d){r.__proto__=d}:function(r,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(r[p]=d[p])}))(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}I(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}),h=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],d=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return{value:(e=e&&d>=e.length?void 0:e)&&e[d++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=w("../lib/dom"),c=w("../lib/event"),n=w("../tooltip").Tooltip,s=w("../config").nls;f.GutterHandler=function(e){var t,r,d=e.editor,p=d.renderer.$gutterLayer,g=new o(d);function A(){t=t&&clearTimeout(t),g.isOpen&&(g.hideTooltip(),d.off("mousewheel",A))}function x(E){g.setPosition(E.x,E.y)}e.editor.setDefaultHandler("guttermousedown",function(E){if(d.isFocused()&&E.getButton()==0){var W=p.getRegion(E);if(W!="foldWidgets"){var W=E.getDocumentPosition().row,B=d.session.selection;if(E.getShiftKey())B.selectTo(W,0);else{if(E.domEvent.detail==2)return d.selectAll(),E.preventDefault();e.$clickSelection=d.selection.getLineRange(W)}return e.setState("selectByLines"),e.captureMouse(E),E.preventDefault()}}}),e.editor.setDefaultHandler("guttermousemove",function(E){var W=E.domEvent.target||E.domEvent.srcElement;if(l.hasCssClass(W,"ace_fold-widget"))return A();g.isOpen&&e.$tooltipFollowsMouse&&x(E),r=E,t=t||setTimeout(function(){if(t=null,r&&!e.isMousePressed){var B=r.getDocumentPosition().row;if(B==d.session.getLength()){var V=d.renderer.pixelToScreenCoordinates(0,r.y).row,u=r.$pos;if(V>d.session.documentToScreenRow(u.row,u.column))return void A()}g.showTooltip(B),g.isOpen&&(d.on("mousewheel",A),!e.$tooltipFollowsMouse&&(V=r.getGutterRow(),u=p.$lines.get(V))?(B=u.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),(V=g.getElement().style).left=B.right+"px",V.top=B.bottom+"px"):x(r))}else A()},50)}),c.addListener(d.renderer.$gutter,"mouseout",function(E){r=null,g.isOpen&&(t=t||setTimeout(function(){t=null,A()},50))},d),d.on("changeSession",A),d.on("input",A)},C(a,i=n),a.prototype.setPosition=function(e,t){var r=window.innerWidth||document.documentElement.clientWidth,d=window.innerHeight||document.documentElement.clientHeight,p=this.getWidth(),g=this.getHeight();r<(e+=15)+p&&(e-=e+p-r),d<(t+=15)+g&&(t-=20+g),n.prototype.setPosition.call(this,e,t)},Object.defineProperty(a,"annotationLabels",{get:function(){return{error:{singular:s("error"),plural:s("errors")},warning:{singular:s("warning"),plural:s("warnings")},info:{singular:s("information message"),plural:s("information messages")}}},enumerable:!1,configurable:!0}),a.prototype.showTooltip=function(e){var t=this.editor.renderer.$gutterLayer,r=t.$annotations[e],d=r?{text:Array.from(r.text),type:Array.from(r.type)}:{text:[],type:[]},p=t.session.getFoldLine(e);if(p&&t.$showFoldedAnnotations){for(var g,A={error:[],warning:[],info:[]},x=e+1;x<=p.end.row;x++)if(t.$annotations[x])for(var E=0;E<t.$annotations[x].text.length;E++){var W=t.$annotations[x].type[E];A[W].push(t.$annotations[x].text[E]),W==="error"?g="error_fold":W==="warning"&&(g="warning_fold")}g!=="error_fold"&&g!=="warning_fold"||(r="".concat(a.annotationsToSummaryString(A)," in folded code."),d.text.push(r),d.type.push(g))}if(d.text.length===0)return this.hide();for(var B={error:[],warning:[],info:[]},V=t.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",x=0;x<d.text.length;x++){var u="<span class='ace_".concat(d.type[x]," ").concat(V,"' aria-label='").concat(a.annotationLabels[d.type[x].replace("_fold","")].singular,"' role=img> </span> ").concat(d.text[x]);B[d.type[x].replace("_fold","")].push(u)}e=[].concat(B.error,B.warning,B.info).join("<br>"),this.setHtml(e),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},a.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},a.annotationsToSummaryString=function(e){var t,r,d=[];try{for(var p=h(["error","warning","info"]),g=p.next();!g.done;g=p.next()){var A,x=g.value;e[x].length&&(A=e[x].length===1?a.annotationLabels[x].singular:a.annotationLabels[x].plural,d.push("".concat(e[x].length," ").concat(A)))}}catch(E){t={error:E}}finally{try{g&&!g.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}return d.join(", ")};var i,o=a;function a(e){var t=i.call(this,e.container)||this;return t.editor=e,t}f.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(w,f,_){var I=w("../lib/event"),C=w("../lib/useragent");function h(l,c){this.domEvent=l,this.editor=c,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}h.prototype.stopPropagation=function(){I.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){I.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},h.prototype.getGutterRow=function(){var l=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(l,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},h.prototype.inSelection=function(){var l,c;return this.$inSelection===null&&((l=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(c=this.getDocumentPosition(),this.$inSelection=l.contains(c.row,c.column))),this.$inSelection},h.prototype.getButton=function(){return I.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return C.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},f.MouseEvent=h}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(w,f,_){var I=w("../lib/dom"),C=w("../lib/event"),h=w("../lib/useragent");function l(n){var s,i,o,a,e,t,r,d,p,g,A,x=n.editor,E=I.createElement("div"),W=(E.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",E.textContent="\xA0",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(G){n[G]=this[G]},this),x.on("mousedown",this.onMouseDown.bind(n)),x.container),B=0;function V(){var G,Y,Q,z,ee,T,P,Z,b=t;t=x.renderer.screenToTextCoordinates(i,o),Q=t,Y=b,z=Date.now(),G=!Y||Q.row!=Y.row,Y=!Y||Q.column!=Y.column,!g||G||Y?(x.moveCursorToPosition(Q),g=z,A={x:i,y:o}):5<c(A.x,A.y,i,o)?g=null:200<=z-g&&(x.renderer.scrollCursorIntoView(),g=null),G=t,Y=b,Q=Date.now(),z=x.renderer.layerConfig.lineHeight,b=x.renderer.layerConfig.characterWidth,ee=x.renderer.scroller.getBoundingClientRect(),ee={x:{left:i-ee.left,right:ee.right-i},y:{top:o-ee.top,bottom:ee.bottom-o}},T=Math.min(ee.x.left,ee.x.right),P=Math.min(ee.y.top,ee.y.bottom),Z={row:G.row,column:G.column},T/b<=2&&(Z.column+=ee.x.left<ee.x.right?-3:2),P/z<=1&&(Z.row+=ee.y.top<ee.y.bottom?-1:1),T=G.row!=Z.row,b=G.column!=Z.column,P=!Y||G.row!=Y.row,T||b&&!P?p?200<=Q-p&&x.renderer.scrollCursorIntoView(Z):p=Q:p=null}function u(){e=x.selection.toOrientedRange(),s=x.session.addMarker(e,"ace_selection",x.getSelectionStyle()),x.clearSelection(),x.isFocused()&&x.renderer.$cursorLayer.setBlinking(!1),clearInterval(a),V(),a=setInterval(V,20),B=0,C.addListener(document,"mousemove",y)}function v(){clearInterval(a),x.session.removeMarker(s),s=null,x.selection.fromOrientedRange(e),x.isFocused()&&!d&&x.$resetCursorStyle(),B=0,g=p=t=e=null,C.removeListener(document,"mousemove",y)}this.onDragStart=function(G){var Y;if(this.cancelDrag||!W.draggable)return Y=this,setTimeout(function(){Y.startSelect(),Y.captureMouse(G)},0),G.preventDefault();e=x.getSelectionRange();var Q=G.dataTransfer;Q.effectAllowed=x.getReadOnly()?"copy":"copyMove",x.container.appendChild(E),Q.setDragImage&&Q.setDragImage(E,0,0),setTimeout(function(){x.container.removeChild(E)}),Q.clearData(),Q.setData("Text",x.session.getTextRange()),d=!0,this.setState("drag")},this.onDragEnd=function(G){W.draggable=!1,d=!1,this.setState(null),x.getReadOnly()||(G=G.dataTransfer.dropEffect,r||G!="move"||x.session.remove(x.getSelectionRange()),x.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(G){if(!x.getReadOnly()&&L(G.dataTransfer))return i=G.clientX,o=G.clientY,s||u(),B++,G.dataTransfer.dropEffect=r=H(G),C.preventDefault(G)},this.onDragOver=function(G){if(!x.getReadOnly()&&L(G.dataTransfer))return i=G.clientX,o=G.clientY,s||(u(),B++),$!==null&&($=null),G.dataTransfer.dropEffect=r=H(G),C.preventDefault(G)},this.onDragLeave=function(G){if(--B<=0&&s)return v(),r=null,C.preventDefault(G)},this.onDrop=function(G){if(t){var Y=G.dataTransfer;if(d)switch(r){case"move":e=e.contains(t.row,t.column)?{start:t,end:t}:x.moveText(e,t);break;case"copy":e=x.moveText(e,t,!0)}else Y=Y.getData("Text"),e={start:t,end:x.session.insert(t,Y)},x.focus(),r=null;return v(),C.preventDefault(G)}},C.addListener(W,"dragstart",this.onDragStart.bind(n),x),C.addListener(W,"dragend",this.onDragEnd.bind(n),x),C.addListener(W,"dragenter",this.onDragEnter.bind(n),x),C.addListener(W,"dragover",this.onDragOver.bind(n),x),C.addListener(W,"dragleave",this.onDragLeave.bind(n),x),C.addListener(W,"drop",this.onDrop.bind(n),x);var $=null;function y(){$==null&&($=setTimeout(function(){$!=null&&s&&v()},20))}function L(G){return G=G.types,!G||Array.prototype.some.call(G,function(Y){return Y=="text/plain"||Y=="Text"})}function H(G){var Y=["copy","copymove","all","uninitialized"],Q=h.isMac?G.altKey:G.ctrlKey,z="uninitialized";try{z=G.dataTransfer.effectAllowed.toLowerCase()}catch{}var ee="none";return Q&&0<=Y.indexOf(z)?ee="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(z)?ee="move":0<=Y.indexOf(z)&&(ee="copy"),ee}}function c(n,s,i,o){return Math.sqrt(Math.pow(i-n,2)+Math.pow(o-s,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(n){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var n=this.editor,s=(n.container.draggable=!0,n.renderer.$cursorLayer.setBlinking(!1),n.setStyle("ace_dragging"),h.isWin?"default":"move");n.renderer.setCursorStyle(s),this.setState("dragReady")},this.onMouseDrag=function(n){var s=this.editor.container;h.isIE&&this.state=="dragReady"&&3<c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&s.dragDrop(),this.state==="dragWait"&&0<c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(n){var s,i,o;this.$dragEnabled&&(this.mousedownEvent=n,s=this.editor,i=n.inSelection(),o=n.getButton(),(n.domEvent.detail||1)!==1||o!==0||!i||n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(o=n.domEvent.target||n.domEvent.srcElement)&&(o.unselectable="on"),s.getDragDelay()?(h.isWebKit&&(this.cancelDrag=!0,s.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(n,this.onMouseDrag.bind(this)),n.defaultPrevented=!0))}}).call(l.prototype),f.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(w,f,_){var I=w("./mouse_event").MouseEvent,C=w("../lib/event"),h=w("../lib/dom");f.addTouchListeners=function(l,c){var n,s,i,o,a,e,t,r,d,p="scroll",g=0,A=0,x=0,E=0;function W(){function v(L){var H,G=L.target.getAttribute("action");G!="more"&&y?(G=="paste"?$.readText().then(function(Y){c.execCommand(G,Y)}):G&&(G!="cut"&&G!="copy"||($?$.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(G)),d.firstChild.style.display="none",y=!1,G!="openCommandPallete"&&c.focus()):(y=!y,L=c.getCopyText(),H=c.session.getUndoManager().hasUndo(),d.replaceChild(h.buildDom(y?["span",!L&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],L&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],L&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],H&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),d.firstChild))}var $=window.navigator&&window.navigator.clipboard,y=!1;d=h.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(L){p="menu",L.stopPropagation(),L.preventDefault(),c.textInput.focus()},ontouchend:function(L){L.stopPropagation(),L.preventDefault(),v(L)},onclick:v},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function B(){d||W();var v=c.selection.cursor,v=c.renderer.textToScreenCoordinates(v.row,v.column),$=c.renderer.textToScreenCoordinates(0,0).pageX,y=c.renderer.scrollLeft,L=c.container.getBoundingClientRect();d.style.top=v.pageY-L.top-3+"px",v.pageX-L.left<L.width-70?(d.style.left="",d.style.right="10px"):(d.style.right="",d.style.left=$+y-L.left+"px"),d.style.display="",d.firstChild.style.display="none",c.on("input",V)}function V(v){d&&(d.style.display="none"),c.off("input",V)}function u(){a=null,clearTimeout(a);var v=c.selection.getRange(),$=v.contains(t.row,t.column);!v.isEmpty()&&$||(c.selection.moveToPosition(t),c.selection.selectWord()),p="wait",B()}C.addListener(l,"contextmenu",function(v){r&&c.textInput.getElement().focus()},c),C.addListener(l,"touchstart",function(v){var $=v.touches;if(a||1<$.length)clearTimeout(a),a=null,i=-1,p="zoom";else{r=c.$mouseHandler.isMousePressed=!0;var y=c.renderer.layerConfig.lineHeight,L=c.renderer.layerConfig.lineHeight,H=v.timeStamp,G=(o=H,$[0]),Y=G.clientX,G=G.clientY,Y=(Math.abs(n-Y)+Math.abs(s-G)>y&&(i=-1),n=v.clientX=Y,s=v.clientY=G,x=E=0,new I(v,c));if(t=Y.getDocumentPosition(),H-i<500&&$.length==1&&!g)A++,v.preventDefault(),v.button=0,a=null,clearTimeout(a),c.selection.moveToPosition(t),(G=2<=A?c.selection.getLineRange(t.row):c.session.getBracketRange(t))&&!G.isEmpty()?c.selection.setRange(G):c.selection.selectWord(),p="wait";else{A=0;var Y=c.selection.cursor,$=c.selection.isEmpty()?Y:c.selection.anchor,G=c.renderer.$cursorLayer.getPixelPosition(Y,!0),Y=c.renderer.$cursorLayer.getPixelPosition($,!0),$=c.renderer.scroller.getBoundingClientRect(),Q=c.renderer.layerConfig.offset,z=c.renderer.scrollLeft,ee=function(b,k){return(b/=L)*b+(k=k/y-.75)*k};if(v.clientX<$.left)return void(p="zoom");G=ee(v.clientX-$.left-G.left+z,v.clientY-$.top-G.top+Q),ee=ee(v.clientX-$.left-Y.left+z,v.clientY-$.top-Y.top+Q),G<3.5&&ee<3.5&&(p=ee<G?"cursor":"anchor"),p=ee<3.5?"anchor":G<3.5?"cursor":"scroll",a=setTimeout(u,450)}i=H}},c),C.addListener(l,"touchend",function(v){r=c.$mouseHandler.isMousePressed=!1,e&&clearInterval(e),p=="zoom"?(p="",g=0):(a?(c.selection.moveToPosition(t),g=0,B):p=="scroll"?(g+=60,e=setInterval(function(){g--<=0&&(clearInterval(e),e=null),Math.abs(x)<.01&&(x=0),Math.abs(E)<.01&&(E=0),g<20&&(x*=.9),g<20&&(E*=.9);var $=c.session.getScrollTop();c.renderer.scrollBy(10*x,10*E),$==c.session.getScrollTop()&&(g=0)},10),V):B)(),clearTimeout(a),a=null},c),C.addListener(l,"touchmove",function(v){a&&(clearTimeout(a),a=null);var $=v.touches;if(!(1<$.length||p=="zoom")){var $=$[0],y=n-$.clientX,L=s-$.clientY;if(p=="wait"){if(!(4<y*y+L*L))return v.preventDefault();p="cursor"}n=$.clientX,s=$.clientY,v.clientX=$.clientX,v.clientY=$.clientY;var $=v.timeStamp,H=$-o;o=$,p=="scroll"?(($=new I(v,c)).speed=1,$.wheelX=y,$.wheelY=L,10*Math.abs(y)<Math.abs(L)&&(y=0),10*Math.abs(L)<Math.abs(y)&&(L=0),H!=0&&(x=y/H,E=L/H),c._emit("mousewheel",$),$.propagationStopped||(x=E=0)):(y=new I(v,c).getDocumentPosition(),p=="cursor"?c.selection.moveCursorToPosition(y):p=="anchor"&&c.selection.setSelectionAnchor(y.row,y.column),c.renderer.scrollCursorIntoView(y),v.preventDefault())}},c)}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(i,f,_){var I=i("../lib/event"),C=i("../lib/useragent"),h=i("./default_handlers").DefaultHandlers,l=i("./default_gutter_handler").GutterHandler,c=i("./mouse_event").MouseEvent,n=i("./dragdrop_handler").DragdropHandler,s=i("./touch_handler").addTouchListeners,i=i("../config"),o=(a.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new c(t,this.editor))},a.prototype.onMouseMove=function(e,t){var r=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;r&&r.length&&this.editor._emit(e,new c(t,this.editor))},a.prototype.onMouseWheel=function(e,t){var r=new c(t,this.editor);r.speed=2*this.$scrollSpeed,r.wheelX=t.wheelX,r.wheelY=t.wheelY,this.editor._emit(e,r)},a.prototype.setState=function(e){this.state=e},a.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;function r(B){if(B){if(C.isWebKit&&!B.which&&x.releaseMouse)return x.releaseMouse();x.x=B.clientX,x.y=B.clientY,t&&t(B),x.mouseEvent=new c(B,x.editor),x.$mouseMoved=!0}}function d(B){g.off("beforeEndOperation",E),clearInterval(W),g.session&&p(),x[x.state+"End"]&&x[x.state+"End"](B),x.state="",x.isMousePressed=A.$isMousePressed=!1,A.$keepTextAreaAtCursor&&A.$moveTextAreaToCursor(),x.$onCaptureMouseMove=x.releaseMouse=null,B&&x.onMouseEvent("mouseup",B),g.endOperation()}function p(){x[x.state]&&x[x.state](),x.$mouseMoved=!1}var g=this.editor,A=this.editor.renderer,x=(A.$isMousePressed=!0,this);if(C.isOldIE&&e.domEvent.type=="dblclick")return setTimeout(function(){d(e)});var E=function(B){x.releaseMouse&&g.curOp.command.name&&g.curOp.selectionChanged&&(x[x.state+"End"]&&x[x.state+"End"](),x.state="",x.releaseMouse())},W=(g.on("beforeEndOperation",E),g.startOperation({command:{name:"mouse"}}),x.$onCaptureMouseMove=r,x.releaseMouse=I.capture(this.editor.container,r,d),setInterval(p,20))},a.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&t.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&I.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},a.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},a);function a(e){function t(g){document.hasFocus&&document.hasFocus()&&(e.isFocused()||document.activeElement!=(e.textInput&&e.textInput.getElement()))||window.focus(),e.focus(),setTimeout(function(){e.isFocused()||e.focus()})}var r=this,d=(this.editor=e,new h(this),new l(this),new n(this),e.renderer.getMouseEventTarget()),p=(I.addListener(d,"click",this.onMouseEvent.bind(this,"click"),e),I.addListener(d,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),I.addMultiMouseDownListener([d,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),I.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),s(e.container,e),e.renderer.$gutter);I.addListener(p,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),I.addListener(p,"click",this.onMouseEvent.bind(this,"gutterclick"),e),I.addListener(p,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),I.addListener(p,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),I.addListener(d,"mousedown",t,e),I.addListener(p,"mousedown",t,e),C.isIE&&e.renderer.scrollBarV&&(I.addListener(e.renderer.scrollBarV.element,"mousedown",t,e),I.addListener(e.renderer.scrollBarH.element,"mousedown",t,e)),e.on("mousemove",function(g){var A,x;r.state||r.$dragDelay||!r.$dragEnabled||(g=e.renderer.screenToTextCoordinates(g.x,g.y),A=e.session.selection.getRange(),x=e.renderer,!A.isEmpty()&&A.insideStart(g.row,g.column)?x.setCursorStyle("default"):x.setCursorStyle(""))},e)}o.prototype.releaseMouse=null,i.defineOptions(o.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:C.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),f.MouseHandler=o}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(w,f,_){var I=w("../lib/dom");f.FoldHandler=function(C){C.on("click",function(h){var c=h.getDocumentPosition(),l=C.session,c=l.getFoldAt(c.row,c.column,1),c=(c&&(h.getAccelKey()?l.removeFold(c):l.expandFold(c),h.stop()),h.domEvent&&h.domEvent.target);c&&I.hasCssClass(c,"ace_inline_button")&&I.hasCssClass(c,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),C.renderer.scrollCursorIntoView())}),C.on("gutterclick",function(h){var l,c;C.renderer.$gutterLayer.getRegion(h)=="foldWidgets"&&(l=h.getDocumentPosition().row,(c=C.session).foldWidgets&&c.foldWidgets[l]&&C.session.onFoldWidgetClick(l,h),C.isFocused()||C.focus(),h.stop())}),C.on("gutterdblclick",function(h){var l,c,n;C.renderer.$gutterLayer.getRegion(h)=="foldWidgets"&&(n=h.getDocumentPosition().row,(c=(c=(l=C.session).getParentFoldRangeData(n,!0)).range||c.firstRange)&&(n=c.start.row,(n=l.getFoldAt(n,l.getLine(n).length,1))?l.removeFold(n):(l.addFold("...",c),C.renderer.scrollCursorIntoView({row:c.start.row,column:0}))),h.stop())})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(w,f,_){var I=w("../lib/keys"),C=w("../lib/event");function h(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands)}h.prototype.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0)},h.prototype.setKeyboardHandler=function(l){var c=this.$handlers;if(c[c.length-1]!=l){for(;c[c.length-1]&&c[c.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(c[c.length-1]);this.addKeyboardHandler(l,1)}},h.prototype.addKeyboardHandler=function(l,c){var n;l&&(typeof l!="function"||l.handleKeyboard||(l.handleKeyboard=l),(n=this.$handlers.indexOf(l))!=-1&&this.$handlers.splice(n,1),c==null?this.$handlers.push(l):this.$handlers.splice(c,0,l),n==-1)&&l.attach&&l.attach(this.$editor)},h.prototype.removeKeyboardHandler=function(l){var c=this.$handlers.indexOf(l);return c!=-1&&(this.$handlers.splice(c,1),l.detach&&l.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var l=this.$data,c=l.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(c,l)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(l,c,n,s){for(var i,o=!1,a=this.$editor.commands,e=this.$handlers.length;e--&&!((i=this.$handlers[e].handleKeyboard(this.$data,l,c,n,s))&&i.command&&((o=i.command=="null"||a.exec(i.command,this.$editor,i.args,s))&&s&&l!=-1&&i.passEvent!=1&&i.command.passEvent!=1&&C.stopEvent(s),o)););return o||l!=-1||(i={command:"insertstring"},o=a.exec("insertstring",this.$editor,c)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),o},h.prototype.onCommandKey=function(l,c,n){var s=I.keyCodeToString(n);return this.$callKeyboardHandlers(c,s,n,l)},h.prototype.onTextInput=function(l){return this.$callKeyboardHandlers(-1,l)},f.KeyBinding=h}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(w,f,_){var I=0,C=0,h=!1,l=!1,c=!1,n=[[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]],s=[[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]],i=0,o=1,a=2,e=3,t=4,r=5,d=6,p=7,g=8,A=9,x=10,E=11,W=12,B=13,V=14,u=15,v=16,$=17,y=18,L=[y,y,y,y,y,y,y,y,y,d,r,d,g,r,y,y,y,y,y,y,y,y,y,y,y,y,y,y,r,r,r,d,g,t,t,E,E,E,t,t,t,t,t,x,A,x,A,A,a,a,a,a,a,a,a,a,a,a,A,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,t,t,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,t,t,t,t,y,y,y,y,y,y,r,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,A,t,E,E,E,E,t,t,t,t,i,t,t,y,t,t,E,E,a,a,t,i,t,t,t,a,i,t,t,t,t,t],H=[g,g,g,g,g,g,g,g,g,g,g,y,y,y,i,o,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,g,r,B,V,u,v,$,A,E,E,E,E,E,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,A,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,g];function G(z,ee,T,P){var Z,b,k,R=I?s:n,D=0,J=-1,ne=null,me=null,Ce=[];if(!P)for(ne=0,P=[];ne<T;ne++)P[ne]=Q(z[ne]);for(C=I,c=l=h=!1,me=0;me<T;me++){if(k=D,Ce[me]=Z=function(ke,Se,Te,Re){var Le,le,oe,pe=Se[Re];switch(pe){case i:case o:h=!1;case t:case e:return pe;case a:return h?e:a;case p:return h=!0,o;case g:return t;case A:return Re<1||Re+1>=Se.length||(Le=Te[Re-1])!=a&&Le!=e||(Me=Se[Re+1])!=a&&Me!=e?t:(Me=h?e:Me)==Le?Me:t;case x:return(Le=0<Re?Te[Re-1]:r)==a&&Re+1<Se.length&&Se[Re+1]==a?a:t;case E:if(0<Re&&Te[Re-1]==a)return a;if(h)return t;for(oe=Re+1,le=Se.length;oe<le&&Se[oe]==E;)oe++;return oe<le&&Se[oe]==a?a:t;case W:for(le=Se.length,oe=Re+1;oe<le&&Se[oe]==W;)oe++;if(oe<le){var Me=ke[Re],Me=1425<=Me&&Me<=2303||Me==64286;if(Le=Se[oe],Me&&(Le==o||Le==p))return o}return Re<1||(Le=Se[Re-1])==r?t:Te[Re-1];case r:return l=!(h=!1),I;case d:return c=!0,t;case B:case V:case v:case $:case u:h=!1;case y:return t}}(z,P,Ce,me),k=240&(D=R[k][Z]),D&=15,ee[me]=b=R[D][5],0<k){if(k==16)for(ne=J;ne<me;ne++)ee[ne]=1;J=-1}if(R[D][6])J==-1&&(J=me);else if(-1<J){for(ne=J;ne<me;ne++)ee[ne]=b;J=-1}P[me]==r&&(ee[me]=0),C|=b}if(c){for(ne=0;ne<T;ne++)if(P[ne]==d){ee[ne]=I;for(var Ie=ne-1;0<=Ie&&P[Ie]==g;Ie--)ee[Ie]=I}}}function Y(z,ee,T){if(!(C<z))if(z!=1||I!=1||l)for(var P,Z,b,k,R=T.length,D=0;D<R;){if(ee[D]>=z){for(P=D+1;P<R&&ee[P]>=z;)P++;for(Z=D,b=P-1;Z<b;Z++,b--)k=T[Z],T[Z]=T[b],T[b]=k;D=P}D++}else T.reverse()}function Q(z){var ee=z.charCodeAt(0),T=ee>>8;return T==0?191<ee?i:L[ee]:T==5?/[\u0591-\u05f4]/.test(z)?o:i:T==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(z)?W:/[\u0660-\u0669\u066b-\u066c]/.test(z)?e:ee==1642?E:/[\u06f0-\u06f9]/.test(z)?a:p:T==32&&ee<=8287?H[255&ee]:T==254&&65136<=ee?p:t}f.L=i,f.R=o,f.EN=a,f.ON_R=3,f.AN=4,f.R_H=5,f.B=6,f.RLE=7,f.DOT="\xB7",f.doBidiReorder=function(z,ee,T){if(z.length<2)return{};var P=z.split(""),Z=new Array(P.length),b=new Array(P.length),k=[];I=T?1:0,G(P,k,P.length,ee);for(var R=0;R<Z.length;Z[R]=R,R++);for(Y(2,k,Z),Y(1,k,Z),R=0;R<Z.length-1;R++)ee[R]===e?k[R]=f.AN:k[R]===o&&(ee[R]>p&&ee[R]<B||ee[R]===t||ee[R]===y)?k[R]=f.ON_R:0<R&&P[R-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(P[R])&&(k[R-1]=k[R]=f.R_H,R++);for(P[P.length-1]===f.DOT&&(k[P.length-1]=f.B),P[0]==="\u202B"&&(k[0]=f.RLE),R=0;R<Z.length;R++)b[R]=k[Z[R]];return{logicalFromVisual:Z,bidiLevels:b}},f.hasBidiCharacters=function(z,ee){for(var T=!1,P=0;P<z.length;P++)ee[P]=Q(z.charAt(P)),T||ee[P]!=o&&ee[P]!=p&&ee[P]!=e||(T=!0);return T},f.getVisualFromLogicalIdx=function(z,ee){for(var T=0;T<ee.logicalFromVisual.length;T++)if(ee.logicalFromVisual[T]==z)return T;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(w,f,_){var I=w("./lib/bidiutil"),C=w("./lib/lang"),h=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;function l(c){this.session=c,this.bidiMap={},this.currentRow=null,this.bidiUtil=I,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=h.test(c.getValue())}l.prototype.isBidiRow=function(c,n,s){return!!this.seenBidi&&(c!==this.currentRow&&(this.currentRow=c,this.updateRowLine(n,s),this.updateBidiMap()),this.bidiMap.bidiLevels)},l.prototype.onChange=function(c){this.seenBidi?this.currentRow=null:c.action=="insert"&&h.test(c.lines.join(`
|
|
`))&&(this.seenBidi=!0,this.currentRow=null)},l.prototype.getDocumentRow=function(){var c=0,n=this.session.$screenRowCache;return c=n.length&&0<=(n=this.session.$getRowCacheIndex(n,this.currentRow))?this.session.$docRowCache[n]:c},l.prototype.getSplitIndex=function(){var c=0,n=this.session.$screenRowCache;if(n.length)for(var s,i=this.session.$getRowCacheIndex(n,this.currentRow);0<this.currentRow-c&&(s=this.session.$getRowCacheIndex(n,this.currentRow-c-1))===i;)i=s,c++;else c=this.currentRow;return c},l.prototype.updateRowLine=function(c,n){var s,i=(c=c===void 0?this.getDocumentRow():c)===this.session.getLength()-1?this.EOF:this.EOL,o=(this.wrapIndent=0,this.line=this.session.getLine(c),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,(!this.session.$useWrapMode||(c=this.session.$wrapData[c])&&(0<(n=n===void 0?this.getSplitIndex():n)&&c.length?(this.wrapIndent=c.indent,this.wrapOffset=this.wrapIndent*this.charWidths[I.L],this.line=n<c.length?this.line.substring(c[n-1],c[n]):this.line.substring(c[c.length-1])):this.line=this.line.substring(0,c[n]),n==c.length))&&(this.line+=this.showInvisibles?i:I.DOT),this.session),a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return e===" "||o.isFullWidth(e.charCodeAt(0))?(s=e===" "?o.getScreenTabSize(t+a):2,a+=s-1,C.stringRepeat(I.DOT,s)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==I.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},l.prototype.updateBidiMap=function(){var c=[];I.hasBidiCharacters(this.line,c)||this.isRtlDir?this.bidiMap=I.doBidiReorder(this.line,c,this.isRtlDir):this.bidiMap={}},l.prototype.markAsDirty=function(){this.currentRow=null},l.prototype.updateCharacterWidths=function(c){var n;this.characterWidth!==c.$characterSize.width&&(this.fontMetrics=c,n=this.characterWidth=c.$characterSize.width,c=c.$measureCharWidth("\u05D4"),this.charWidths[I.L]=this.charWidths[I.EN]=this.charWidths[I.ON_R]=n,this.charWidths[I.R]=this.charWidths[I.AN]=c,this.charWidths[I.R_H]=.45*c,this.charWidths[I.B]=this.charWidths[I.RLE]=0,this.currentRow=null)},l.prototype.setShowInvisibles=function(c){this.showInvisibles=c,this.currentRow=null},l.prototype.setEolChar=function(c){this.EOL=c},l.prototype.setContentWidth=function(c){this.contentWidth=c},l.prototype.isRtlLine=function(c){return!!this.$isRtl||(c!=null?this.session.getLine(c).charAt(0)==this.RLE:this.isRtlDir)},l.prototype.setRtlDirection=function(c,n){for(var s=c.getCursorPosition(),i=c.selection.getSelectionAnchor().row;i<=s.row;i++)n||c.session.getLine(i).charAt(0)!==c.session.$bidiHandler.RLE?n&&c.session.getLine(i).charAt(0)!==c.session.$bidiHandler.RLE&&c.session.doc.insert({column:0,row:i},c.session.$bidiHandler.RLE):c.session.doc.removeInLine(i,0,1)},l.prototype.getPosLeft=function(c){c-=this.wrapIndent;var n=this.line.charAt(0)===this.RLE?1:0,s=n<c?this.session.getOverwrite()?c:c-1:n,i=I.getVisualFromLogicalIdx(s,this.bidiMap),o=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&c<=n&&o[i]%2!=0&&i++;for(var e=0;e<i;e++)a+=this.charWidths[o[e]];return!this.session.getOverwrite()&&n<c&&o[i]%2==0&&(a+=this.charWidths[o[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},l.prototype.getSelections=function(c,n){var s,i=this.bidiMap,o=i.bidiLevels,a=[],e=0,t=Math.min(c,n)-this.wrapIndent,r=Math.max(c,n)-this.wrapIndent,d=!1,p=!1,g=0;this.wrapIndent&&(e+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var A,x=0;x<o.length;x++)A=i.logicalFromVisual[x],s=o[x],(d=t<=A&&A<r)&&!p?g=e:!d&&p&&a.push({left:g,width:e-g}),e+=this.charWidths[s],p=d;if(d&&x===o.length&&a.push({left:g,width:e-g}),this.isRtlDir)for(var E=0;E<a.length;E++)a[E].left+=this.rtlLineOffset;return a},l.prototype.offsetToCol=function(s){this.isRtlDir&&(s-=this.rtlLineOffset);var n=0,s=Math.max(s,0),i=0,o=0,a=this.bidiMap.bidiLevels,e=this.charWidths[a[o]];for(this.wrapIndent&&(s-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i+e/2<s;){if(i+=e,o===a.length-1){e=0;break}e=this.charWidths[a[++o]]}return(n=0<o&&a[o-1]%2!=0&&a[o]%2==0?(s<i&&o--,this.bidiMap.logicalFromVisual[o]):0<o&&a[o-1]%2==0&&a[o]%2!=0?1+(i<s?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===a.length-1&&e===0&&a[o-1]%2==0||!this.isRtlDir&&o===0&&a[o]%2!=0?1+this.bidiMap.logicalFromVisual[o]:(0<o&&a[o-1]%2!=0&&e!==0&&o--,this.bidiMap.logicalFromVisual[o]))===0&&this.isRtlDir&&n++,n+this.wrapIndent},f.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(c,f,_){var I=c("./lib/oop"),C=c("./lib/lang"),h=c("./lib/event_emitter").EventEmitter,l=c("./range").Range,c=(n.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},n.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},n.prototype.getCursor=function(){return this.lead.getPosition()},n.prototype.setAnchor=function(s,i){this.$isEmpty=!1,this.anchor.setPosition(s,i)},n.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},n.prototype.getSelectionLead=function(){return this.lead.getPosition()},n.prototype.isBackwards=function(){var s=this.anchor,i=this.lead;return s.row>i.row||s.row==i.row&&s.column>i.column},n.prototype.getRange=function(){var s=this.anchor,i=this.lead;return this.$isEmpty?l.fromPoints(i,i):this.isBackwards()?l.fromPoints(i,s):l.fromPoints(s,i)},n.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},n.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},n.prototype.setRange=function(s,a){var o=a?s.end:s.start,a=a?s.start:s.end;this.$setSelection(o.row,o.column,a.row,a.column)},n.prototype.$setSelection=function(s,i,o,a){var e,t;!this.$silent&&(e=this.$isEmpty,t=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(s,i),this.cursor.setPosition(o,a),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||e!=this.$isEmpty||t)&&this._emit("changeSelection")},n.prototype.$moveSelection=function(s){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),s.call(this)},n.prototype.selectTo=function(s,i){this.$moveSelection(function(){this.moveCursorTo(s,i)})},n.prototype.selectToPosition=function(s){this.$moveSelection(function(){this.moveCursorToPosition(s)})},n.prototype.moveTo=function(s,i){this.clearSelection(),this.moveCursorTo(s,i)},n.prototype.moveToPosition=function(s){this.clearSelection(),this.moveCursorToPosition(s)},n.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},n.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},n.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},n.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},n.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},n.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},n.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},n.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},n.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},n.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},n.prototype.getWordRange=function(s,i){var o;return i===void 0&&(s=(o=s||this.lead).row,i=o.column),this.session.getWordRange(s,i)},n.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},n.prototype.selectAWord=function(){var s=this.getCursor(),s=this.session.getAWordRange(s.row,s.column);this.setSelectionRange(s)},n.prototype.getLineRange=function(o,i){var o=typeof o=="number"?o:this.lead.row,a=this.session.getFoldLine(o),a=a?(o=a.start.row,a.end.row):o;return i===!0?new l(o,0,a,this.session.getLine(a).length):new l(o,0,a+1,0)},n.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},n.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},n.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},n.prototype.wouldMoveIntoSoftTab=function(s,i,o){var a=s.column,e=s.column+i;return o<0&&(a=s.column-i,e=s.column),this.session.isTabStop(s)&&this.doc.getLine(s.row).slice(a,e).split(" ").length-1==i},n.prototype.moveCursorLeft=function(){var s,i=this.lead.getPosition();(s=this.session.getFoldAt(i.row,i.column,-1))?this.moveCursorTo(s.start.row,s.start.column):i.column===0?0<i.row&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length):(s=this.session.getTabSize(),this.wouldMoveIntoSoftTab(i,s,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-s):this.moveCursorBy(0,-1))},n.prototype.moveCursorRight=function(){var s,i=this.lead.getPosition();(s=this.session.getFoldAt(i.row,i.column,1))?this.moveCursorTo(s.end.row,s.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):(s=this.session.getTabSize(),i=this.lead,this.wouldMoveIntoSoftTab(i,s,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,s):this.moveCursorBy(0,1))},n.prototype.moveCursorLineStart=function(){var o=this.lead.row,s=this.lead.column,i=this.session.documentToScreenRow(o,s),i=this.session.screenToDocumentPosition(i,0),o=this.session.getDisplayLine(o,null,i.row,i.column).match(/^\s*/);o[0].length==s||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},n.prototype.moveCursorLineEnd=function(){var s,i=this.lead,i=this.session.getDocumentLastRowColumnPosition(i.row,i.column);this.lead.column==i.column&&(s=this.session.getLine(i.row),i.column==s.length)&&0<(s=s.search(/\s+$/))&&(i.column=s),this.moveCursorTo(i.row,i.column)},n.prototype.moveCursorFileEnd=function(){var s=this.doc.getLength()-1,i=this.doc.getLine(s).length;this.moveCursorTo(s,i)},n.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},n.prototype.moveCursorLongWordRight=function(){var s=this.lead.row,i=this.lead.column,o=this.doc.getLine(s),a=o.substring(i),e=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.getFoldAt(s,i,1));e?this.moveCursorTo(e.end.row,e.end.column):(this.session.nonTokenRe.exec(a)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,a=o.substring(i)),i>=o.length?(this.moveCursorTo(s,o.length),this.moveCursorRight(),s<this.doc.getLength()-1&&this.moveCursorWordRight()):(this.session.tokenRe.exec(a)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(s,i)))},n.prototype.moveCursorLongWordLeft=function(){var s,i=this.lead.row,o=this.lead.column;(s=this.session.getFoldAt(i,o,-1))?this.moveCursorTo(s.start.row,s.start.column):((s=this.session.getFoldStringAt(i,o,-1))==null&&(s=this.doc.getLine(i).substring(0,o)),s=C.stringReverse(s),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(o-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),o<=0?(this.moveCursorTo(i,0),this.moveCursorLeft(),0<i&&this.moveCursorWordLeft()):(this.session.tokenRe.exec(s)&&(o-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,o)))},n.prototype.$shortWordEndIndex=function(s){var i,o=0,a=/\s/,e=this.session.tokenRe;if(e.lastIndex=0,this.session.tokenRe.exec(s))o=this.session.tokenRe.lastIndex;else{for(;(i=s[o])&&a.test(i);)o++;if(o<1){for(e.lastIndex=0;(i=s[o])&&!e.test(i);)if(e.lastIndex=0,o++,a.test(i)){if(2<o){o--;break}for(;(i=s[o])&&a.test(i);)o++;if(2<o)break}}}return e.lastIndex=0,o},n.prototype.moveCursorShortWordRight=function(){var s=this.lead.row,i=this.lead.column,o=this.doc.getLine(s),a=o.substring(i),e=this.session.getFoldAt(s,i,1);if(e)return this.moveCursorTo(e.end.row,e.end.column);if(i==o.length){for(var t=this.doc.getLength();a=this.doc.getLine(++s),s<t&&/^\s*$/.test(a););/^\s+/.test(a)||(a=""),i=0}e=this.$shortWordEndIndex(a),this.moveCursorTo(s,i+e)},n.prototype.moveCursorShortWordLeft=function(){var s=this.lead.row,i=this.lead.column;if(a=this.session.getFoldAt(s,i,-1))return this.moveCursorTo(a.start.row,a.start.column);var o=this.session.getLine(s).substring(0,i);if(i===0){for(;o=this.doc.getLine(--s),0<s&&/^\s*$/.test(o););i=o.length,/\s+$/.test(o)||(o="")}var a=C.stringReverse(o),a=this.$shortWordEndIndex(a);return this.moveCursorTo(s,i-a)},n.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},n.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},n.prototype.moveCursorBy=function(s,i){var o,a=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e=(i===0&&(s!==0&&(this.session.$bidiHandler.isBidiRow(a.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(a.column),a.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=a.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?a.column=this.$desiredColumn:this.$desiredColumn=a.column),s!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(e=this.session.lineWidgets[this.lead.row],s<0?s-=e.rowsAbove||0:0<s&&(s+=e.rowCount-(e.rowsAbove||0))),this.session.screenToDocumentPosition(a.row+s,a.column,o));s!==0&&i===0&&e.row===this.lead.row&&(e.column,this.lead.column),this.moveCursorTo(e.row,e.column+i,i===0)},n.prototype.moveCursorToPosition=function(s){this.moveCursorTo(s.row,s.column)},n.prototype.moveCursorTo=function(s,i,o){var a=this.session.getFoldAt(s,i,1),a=(a&&(s=a.start.row,i=a.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(s));/[\uDC00-\uDFFF]/.test(a.charAt(i))&&a.charAt(i-1)&&(this.lead.row==s&&this.lead.column==i+1?i-=1:i+=1),this.lead.setPosition(s,i),this.$keepDesiredColumnOnChange=!1,o||(this.$desiredColumn=null)},n.prototype.moveCursorToScreen=function(s,i,o){s=this.session.screenToDocumentPosition(s,i),this.moveCursorTo(s.row,s.column,o)},n.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},n.prototype.fromOrientedRange=function(s){this.setSelectionRange(s,s.cursor==s.start),this.$desiredColumn=s.desiredColumn||this.$desiredColumn},n.prototype.toOrientedRange=function(s){var i=this.getRange();return s?(s.start.column=i.start.column,s.start.row=i.start.row,s.end.column=i.end.column,s.end.row=i.end.row):s=i,s.cursor=this.isBackwards()?s.start:s.end,s.desiredColumn=this.$desiredColumn,s},n.prototype.getRangeOfMovements=function(s){var i=this.getCursor();try{s(this);var o=this.getCursor();return l.fromPoints(i,o)}catch{return l.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},n.prototype.toJSON=function(){var s;return this.rangeCount?s=this.ranges.map(function(i){var o=i.clone();return o.isBackwards=i.cursor==i.start,o}):(s=this.getRange()).isBackwards=this.isBackwards(),s},n.prototype.fromJSON=function(s){if(s.start==null){if(this.rangeList&&1<s.length){this.toSingleRange(s[0]);for(var i=s.length;i--;){var o=l.fromPoints(s[i].start,s[i].end);s[i].isBackwards&&(o.cursor=o.start),this.addRange(o,!0)}return}s=s[0]}this.rangeList&&this.toSingleRange(s),this.setSelectionRange(s,s.isBackwards)},n.prototype.isEqual=function(s){if((s.length||this.rangeCount)&&s.length!=this.rangeCount)return!1;if(!s.length||!this.ranges)return this.getRange().isEqual(s);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(s[i]))return!1;return!0},n);function n(s){this.session=s,this.doc=s.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(o){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),i.$isEmpty||i.$silent||i._emit("changeSelection"),i.$keepDesiredColumnOnChange||o.old.column==o.value.column||(i.$desiredColumn=null)}),this.anchor.on("change",function(){i.$anchorChanged=!0,i.$isEmpty||i.$silent||i._emit("changeSelection")})}c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,I.implement(c.prototype,h),f.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(I,f,_){var I=I("./lib/report_error").reportError,C=2e3,h=(l.prototype.$setMaxTokenCount=function(c){C=0|c},l.prototype.$applyToken=function(c){var n=this.splitRegex.exec(c).slice(1),s=this.token.apply(this,n);if(typeof s=="string")return[{type:s,value:c}];for(var i=[],o=0,a=s.length;o<a;o++)n[o]&&(i[i.length]={type:s[o],value:n[o]});return i},l.prototype.$arrayTokens=function(c){if(!c)return[];var n=this.splitRegex.exec(c);if(!n)return"text";for(var s=[],i=this.tokenArray,o=0,a=i.length;o<a;o++)n[o+1]&&(s[s.length]={type:i[o],value:n[o+1]});return s},l.prototype.removeCapturingGroups=function(c){return c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(n,s){return s?"(?:":n})},l.prototype.createSplitterRegexp=function(c,n){var s,i,o;return(c=(c=c.indexOf("(?=")!=-1&&(s=0,i=!1,o={},c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,e,t,r,d,p){return i?i=d!="]":d?i=!0:r?(s==o.stack&&(o.end=p+1,o.stack=-1),s--):t&&(s++,t.length!=1)&&(o.stack=s,o.start=p),a}),o.end!=null)&&/^\)*$/.test(c.substr(o.end))?c.substring(0,o.start)+c.substr(o.end):c).charAt(0)!="^"?"^"+c:c).charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(n||"").replace("g",""))},l.prototype.getLineTokens=function(c,n){n&&typeof n!="string"?(n=(s=n.slice(0))[0])==="#tmp"&&(s.shift(),n=s.shift()):s=[];for(var s,i,o=n||"start",a=(a=this.states[o])||this.states[o="start"],e=this.matchMappings[o],t=this.regExps[o],r=[],d=t.lastIndex=0,p=0,g={type:null,value:""};i=t.exec(c);){var A,x=e.defaultToken,E=null,W=i[0],B=t.lastIndex;B-W.length>d&&(A=c.substring(d,B-W.length),g.type==x?g.value+=A:(g.type&&r.push(g),g={type:x,value:A}));for(var V=0;V<i.length-2;V++)if(i[V+1]!==void 0){x=(E=a[e[V]]).onMatch?E.onMatch(W,o,s,c):E.token,E.next&&(o=typeof E.next=="string"?E.next:E.next(o,s),(a=this.states[o])||(this.reportError("state doesn't exist",o),a=this.states[o="start"]),e=this.matchMappings[o],(t=this.regExps[o]).lastIndex=d=B),E.consumeLineEnd&&(d=B);break}if(W){if(typeof x=="string")E&&E.merge===!1||g.type!==x?(g.type&&r.push(g),g={type:x,value:W}):g.value+=W;else if(x)for(g.type&&r.push(g),g={type:null,value:""},V=0;V<x.length;V++)r.push(x[V])}if(d==c.length)break;if(d=B,p++>C){for(p>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:n,line:c});d<c.length;)g.type&&r.push(g),g={value:c.substring(d,d+=500),type:"overflow"};o="start",s=[];break}}return g.type&&r.push(g),1<s.length&&s[0]!==o&&s.unshift("#tmp",o),{tokens:r,state:s.length?s:o}},l);function l(c){for(var n in this.states=c,this.regExps={},this.matchMappings={},this.states){for(var s=this.states[n],i=[],o=0,a=this.matchMappings[n]={defaultToken:"text"},e="g",t=[],r=0;r<s.length;r++){var d,p,g=s[r];g.defaultToken&&(a.defaultToken=g.defaultToken),g.caseInsensitive&&e.indexOf("i")===-1&&(e+="i"),g.unicode&&e.indexOf("u")===-1&&(e+="u"),g.regex==null||(g.regex instanceof RegExp&&(g.regex=g.regex.toString().slice(1,-1)),d=g.regex,p=new RegExp("(?:("+d+")|(.))").exec("a").length-2,Array.isArray(g.token)?g.token.length==1||p==1?g.token=g.token[0]:p-1!=g.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:g,groupCount:p-1}),g.token=g.token[0]):(g.tokenArray=g.token,g.token=null,g.onMatch=this.$arrayTokens):typeof g.token!="function"||g.onMatch||(g.onMatch=1<p?this.$applyToken:g.token),1<p&&(d=/\\\d/.test(g.regex)?g.regex.replace(/\\([0-9]+)/g,function(A,x){return"\\"+(parseInt(x,10)+o+1)}):(p=1,this.removeCapturingGroups(g.regex)),g.splitRegex||typeof g.token=="string"||t.push(g)),a[o]=r,o+=p,i.push(d),g.onMatch)||(g.onMatch=null)}i.length||(a[0]=0,i.push("$")),t.forEach(function(A){A.splitRegex=this.createSplitterRegexp(A.regex,e)},this),this.regExps[n]=new RegExp("("+i.join(")|(")+")|($)",e)}}h.prototype.reportError=I,f.Tokenizer=h}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(w,f,_){function I(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}var C=w("../lib/deep_copy").deepCopy;(function(){this.addRules=function(c,n){if(n)for(var s in c){for(var i=c[s],o=0;o<i.length;o++){var a=i[o];(a.next||a.onMatch)&&(typeof a.next=="string"&&a.next.indexOf(n)!==0&&(a.next=n+a.next),a.nextState)&&a.nextState.indexOf(n)!==0&&(a.nextState=n+a.nextState)}this.$rules[n+s]=i}else for(var s in c)this.$rules[s]=c[s]},this.getRules=function(){return this.$rules},this.embedRules=function(c,n,s,i,o){if(c=typeof c=="function"?new c().getRules():c,i)for(var a=0;a<i.length;a++)i[a]=n+i[a];else for(var e in i=[],c)i.push(n+e);if(this.addRules(c,n),s)for(var t=Array.prototype[o?"push":"unshift"],a=0;a<i.length;a++)t.apply(this.$rules[i[a]],C(s));this.$embeds||(this.$embeds=[]),this.$embeds.push(n)},this.getEmbeds=function(){return this.$embeds};function h(c,n){return c=="start"&&!n.length||n.unshift(this.nextState,c),this.nextState}function l(c,n){return n.shift(),n.shift()||"start"}this.normalizeRules=function(){var c=0,n=this.$rules;Object.keys(n).forEach(function s(i){var o=n[i];o.processed=!0;for(var a=0;a<o.length;a++){var e=o[a],t=null,r=(Array.isArray(e)&&(t=e,e={}),!e.regex&&e.start&&(e.regex=e.start,e.next||(e.next=[]),e.next.push({defaultToken:e.token},{token:e.token+".end",regex:e.end||e.start,next:"pop"}),e.token=e.token+".start",e.push=!0),e.next||e.push);if(r&&Array.isArray(r)?((p=e.stateName)||(typeof(p=e.token)!="string"&&(p=p[0]||""),n[p]&&(p+=c++)),n[p]=r,s(e.next=p)):r=="pop"&&(e.next=l),e.push&&(e.nextState=e.next||e.push,e.next=h,delete e.push),e.rules)for(var d in e.rules)n[d]?n[d].push&&n[d].push.apply(n[d],e.rules[d]):n[d]=e.rules[d];var p=typeof e=="string"?e:e.include;p&&(p==="$self"&&(p="start"),t=Array.isArray(p)?p.map(function(g){return n[g]}):n[p]),t&&(r=[a,1].concat(t),e.noEscape&&(r=r.filter(function(g){return!g.next})),o.splice.apply(o,r),a--),e.keywordMap&&(e.token=this.createKeywordMapper(e.keywordMap,e.defaultToken||"text",e.caseInsensitive),delete e.defaultToken)}},this)},this.createKeywordMapper=function(c,n,s,i){var o=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(a){for(var e=c[a].split(i||"|"),t=e.length;t--;){var r=e[t];this.$keywordList.push(r),s&&(r=r.toLowerCase()),o[r]=a}},this),c=null,s?function(a){return o[a.toLowerCase()]||n}:function(a){return o[a]||n}},this.getKeywords=function(){return this.$keywords}}).call(I.prototype),f.TextHighlightRules=I}),ace.define("ace/mode/behaviour",["require","exports","module"],function(w,f,_){function I(){this.$behaviours={}}(function(){this.add=function(C,h,l){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[C]:this.$behaviours[C]={}}this.$behaviours[C][h]=l},this.addBehaviours=function(C){for(var h in C)for(var l in C[h])this.add(h,l,C[h][l])},this.remove=function(C){this.$behaviours&&this.$behaviours[C]&&delete this.$behaviours[C]},this.inherit=function(C,h){C=(typeof C=="function"?new C:C).getBehaviours(h),this.addBehaviours(C)},this.getBehaviours=function(C){if(C){for(var h={},l=0;l<C.length;l++)this.$behaviours[C[l]]&&(h[C[l]]=this.$behaviours[C[l]]);return h}return this.$behaviours}}).call(I.prototype),f.Behaviour=I}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(w,f,_){var I=w("./range").Range;function C(h,l,c){this.$session=h,this.$row=l,this.$rowTokens=h.getTokens(l),h=h.getTokenAt(l,c),this.$tokenIndex=h?h.index:-1}C.prototype.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},C.prototype.stepForward=function(){var h;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h=h||this.$session.getLength(),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},C.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},C.prototype.getCurrentTokenRow=function(){return this.$row},C.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,l=this.$tokenIndex,c=h[l].start;if(c===void 0)for(c=0;0<l;)c+=h[--l].value.length;return c},C.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},C.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new I(this.$row,l,this.$row,l+h.value.length)},f.TokenIterator=C}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(w,f,_){function I(r){var d=-1;if((e=r.multiSelect&&(d=r.selection.index,e.rangeCount!=r.multiSelect.rangeCount)?{rangeCount:r.multiSelect.rangeCount}:e)[d])return l=e[d];l=e[d]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function C(r,d,p,g){var A=r.end.row-r.start.row;return{text:p+d+g,selection:[0,r.start.column+1,A,r.end.column+(A?0:1)]}}function h(r){r=r||{},this.add("braces","insertion",function(d,p,g,A,x){var E=g.getCursorPosition(),W=A.doc.getLine(E.row);if(x=="{")return I(g),V=g.getSelectionRange(),(u=A.doc.getTextRange(V))!==""&&u!=="{"&&g.getWrapBehavioursEnabled()?C(V,u,"{","}"):h.isSaneInsertion(g,A)?/[\]\}\)]/.test(W[E.column])||g.inMultiSelectMode||r.braces?(h.recordAutoInsert(g,A,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(g,A,"{"),{text:"{",selection:[1,1]}):void 0;if(x=="}"){I(g);var B=W.substring(E.column,E.column+1);if(B=="}"&&A.$findOpeningBracket("}",{column:E.column+1,row:E.row})!==null&&h.isAutoInsertedClosing(E,W,x))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if(x==`
|
|
`||x==`\r
|
|
`){I(g);var V="";if(h.isMaybeInsertedClosing(E,W)&&(V=i.stringRepeat("}",l.maybeInsertedBrackets),h.clearMaybeInsertedClosing()),(B=W.substring(E.column,E.column+1))==="}"){var u=A.findMatchingBracket({row:E.row,column:E.column+1},"}");if(!u)return null;var v=this.$getIndent(A.getLine(u.row))}else{if(!V)return void h.clearMaybeInsertedClosing();v=this.$getIndent(W)}return x=v+A.getTabString(),{text:`
|
|
`+x+`
|
|
`+v+V,selection:[1,x.length,1,x.length]}}h.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(d,p,g,A,x){var E=A.doc.getTextRange(x);if(!x.isMultiLine()&&E=="{"){if(I(g),A.doc.getLine(x.start.row).substring(x.end.column,x.end.column+1)=="}")return x.end.column++,x;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(d,p,g,A,x){if(x=="(")return I(g),E=g.getSelectionRange(),(W=A.doc.getTextRange(E))!==""&&g.getWrapBehavioursEnabled()?C(E,W,"(",")"):h.isSaneInsertion(g,A)?(h.recordAutoInsert(g,A,")"),{text:"()",selection:[1,1]}):void 0;if(x==")"){I(g);var E=g.getCursorPosition(),W=A.doc.getLine(E.row),g=W.substring(E.column,E.column+1);if(g==")"&&A.$findOpeningBracket(")",{column:E.column+1,row:E.row})!==null&&h.isAutoInsertedClosing(E,W,x))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(d,p,g,A,x){var E=A.doc.getTextRange(x);if(!x.isMultiLine()&&E=="("&&(I(g),A.doc.getLine(x.start.row).substring(x.start.column+1,x.start.column+2)==")"))return x.end.column++,x}),this.add("brackets","insertion",function(d,p,g,A,x){if(x=="[")return I(g),E=g.getSelectionRange(),(W=A.doc.getTextRange(E))!==""&&g.getWrapBehavioursEnabled()?C(E,W,"[","]"):h.isSaneInsertion(g,A)?(h.recordAutoInsert(g,A,"]"),{text:"[]",selection:[1,1]}):void 0;if(x=="]"){I(g);var E=g.getCursorPosition(),W=A.doc.getLine(E.row),g=W.substring(E.column,E.column+1);if(g=="]"&&A.$findOpeningBracket("]",{column:E.column+1,row:E.row})!==null&&h.isAutoInsertedClosing(E,W,x))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(d,p,g,A,x){var E=A.doc.getTextRange(x);if(!x.isMultiLine()&&E=="["&&(I(g),A.doc.getLine(x.start.row).substring(x.start.column+1,x.start.column+2)=="]"))return x.end.column++,x}),this.add("string_dquotes","insertion",function(d,p,g,A,x){var E=A.$mode.$quotes||t;if(x.length==1&&E[x]&&(!this.lineCommentStart||this.lineCommentStart.indexOf(x)==-1)){I(g);var W=g.getSelectionRange(),B=A.doc.getTextRange(W);if(!(B===""||B.length==1&&E[B])&&g.getWrapBehavioursEnabled())return C(W,B,x,x);if(!B){var E=g.getCursorPosition(),W=A.doc.getLine(E.row),B=W.substring(E.column-1,E.column),g=W.substring(E.column,E.column+1),v=A.getTokenAt(E.row,E.column),V=A.getTokenAt(E.row,E.column+1);if(B=="\\"&&v&&/escape/.test(v.type))return null;var u,v=v&&/string|escape/.test(v.type),$=!V||/string|escape/.test(V.type);if(g==x)(u=v!==$)&&/string\.end/.test(V.type)&&(u=!1);else{if(v&&!$||v&&$||(V=A.$mode.tokenRe,v=(V.lastIndex=0,V.test(B)),$=(V.lastIndex=0,V.test(g)),A=A.$mode.$pairQuotesAfter,!(A&&A[x]&&A[x].test(B))&&v||$)||g&&!/[\s;,.})\]\\]/.test(g)||(A=W[E.column-2],B==x&&(A==x||V.test(A))))return null;u=!0}return{text:u?x+x:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(d,p,g,A,x){var E=A.$mode.$quotes||t,W=A.doc.getTextRange(x);if(!x.isMultiLine()&&E.hasOwnProperty(W)&&(I(g),A.doc.getLine(x.start.row).substring(x.start.column+1,x.start.column+2)==W))return x.end.column++,x}),r.closeDocComment!==!1&&this.add("doc comment end","insertion",function(d,p,g,A,x){var E;if(d==="doc-start"&&(x===`
|
|
`||x===`\r
|
|
`)&&g.selection.isEmpty())return d=g.getCursorPosition(),g=A.doc.getLine(d.row),A=A.doc.getLine(d.row+1),E=this.$getIndent(g),/\s*\*/.test(A)?/^\s*\*/.test(g)?{text:x+E+"* ",selection:[1,3+E.length,1,3+E.length]}:{text:x+E+" * ",selection:[1,3+E.length,1,3+E.length]}:/\/\*\*/.test(g.substring(0,d.column))?{text:x+E+" * "+x+" "+E+"*/",selection:[1,4+E.length,1,4+E.length]}:void 0})}var l,c=w("../../lib/oop"),n=w("../behaviour").Behaviour,s=w("../../token_iterator").TokenIterator,i=w("../../lib/lang"),o=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],e={},t={'"':'"',"'":"'"};h.isSaneInsertion=function(r,d){var p=r.getCursorPosition(),g=new s(d,p.row,p.column);if(!this.$matchTokenType(g.getCurrentToken()||"text",o)){if(/[)}\]]/.test(r.session.getLine(p.row)[p.column]))return!0;if(r=new s(d,p.row,p.column+1),!this.$matchTokenType(r.getCurrentToken()||"text",o))return!1}return g.stepForward(),g.getCurrentTokenRow()!==p.row||this.$matchTokenType(g.getCurrentToken()||"text",a)},h.$matchTokenType=function(r,d){return-1<d.indexOf(r.type||r)},h.recordAutoInsert=function(r,d,p){r=r.getCursorPosition(),d=d.doc.getLine(r.row),this.isAutoInsertedClosing(r,d,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=r.row,l.autoInsertedLineEnd=p+d.substr(r.column),l.autoInsertedBrackets++},h.recordMaybeInsert=function(r,d,p){r=r.getCursorPosition(),d=d.doc.getLine(r.row),this.isMaybeInsertedClosing(r,d)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=r.row,l.maybeInsertedLineStart=d.substr(0,r.column)+p,l.maybeInsertedLineEnd=d.substr(r.column),l.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(r,d,p){return 0<l.autoInsertedBrackets&&r.row===l.autoInsertedRow&&p===l.autoInsertedLineEnd[0]&&d.substr(r.column)===l.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(r,d){return 0<l.maybeInsertedBrackets&&r.row===l.maybeInsertedRow&&d.substr(r.column)===l.maybeInsertedLineEnd&&d.substr(0,r.column)==l.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},c.inherits(h,n),f.CstyleBehaviour=h}),ace.define("ace/unicode",["require","exports","module"],function(w,f,_){for(var I=[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],C=0,h=[],l=0;l<I.length;l+=2)h.push(C+=I[l]),I[l+1]&&h.push(45,C+=I[l+1]);f.wordChars=String.fromCharCode.apply(null,h)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(w,f,_){function I(){this.HighlightRules=l}var C=w("../config"),h=w("../tokenizer").Tokenizer,l=w("./text_highlight_rules").TextHighlightRules,c=w("./behaviour/cstyle").CstyleBehaviour,n=w("../unicode"),s=w("../lib/lang"),i=w("../token_iterator").TokenIterator,o=w("../range").Range;(function(){this.$defaultBehaviour=new c,this.tokenRe=new RegExp("^["+n.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+n.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new h(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,e,t,r){var d=e.doc,p=!0,g=!0,A=1/0,x=e.getTabSize(),E=!1;if(this.lineCommentStart){$=Array.isArray(this.lineCommentStart)?(L=this.lineCommentStart.map(s.escapeRegExp).join("|"),this.lineCommentStart[0]):(L=s.escapeRegExp(this.lineCommentStart),this.lineCommentStart),L=new RegExp("^(\\s*)(?:"+L+") ?"),E=e.getUseSoftTabs();var W=function(Q,z){var ee,T,P=Q.match(L);P&&(ee=P[1].length,T=P[0].length,v(Q,ee,T)||P[0][T-1]!=" "||T--,d.removeInLine(z,ee,T))},B=$+" ",V=function(Q,z){p&&!/\S/.test(Q)||(v(Q,A,A)?d.insertInLine({row:z,column:A},B):d.insertInLine({row:z,column:A},$))},u=function(Q,z){return L.test(Q)},v=function(Q,z,ee){for(var T=0;z--&&Q.charAt(z)==" ";)T++;if(T%x!=0)return!1;for(T=0;Q.charAt(ee++)==" ";)T++;return 2<x?T%x!=x-1:T%x==0}}else{if(!this.blockComment)return!1;var $=this.blockComment.start,y=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+s.escapeRegExp($)+")"),H=new RegExp("(?:"+s.escapeRegExp(y)+")\\s*$"),V=function(T,P){u(T,P)||p&&!/\S/.test(T)||(d.insertInLine({row:P,column:T.length},y),d.insertInLine({row:P,column:A},$))},W=function(T,P){var Z;(Z=T.match(H))&&d.removeInLine(P,T.length-Z[0].length,T.length),(Z=T.match(L))&&d.removeInLine(P,Z[1].length,Z[0].length)},u=function(T,P){if(L.test(T))return!0;for(var Z=e.getTokens(P),b=0;b<Z.length;b++)if(Z[b].type==="comment")return!0}}function G(Q){for(var z=t;z<=r;z++)Q(d.getLine(z),z)}var Y=1/0;G(function(Q,z){var ee=Q.search(/\S/);ee!==-1?(ee<A&&(A=ee),g&&!u(Q,z)&&(g=!1)):Y>Q.length&&(Y=Q.length)}),A==1/0&&(A=Y,g=p=!1),E&&A%x!=0&&(A=Math.floor(A/x)*x),G(g?W:V)},this.toggleBlockComment=function(a,e,t,r){var d=this.blockComment;if(d){!d.start&&d[0]&&(d=d[0]);var p,g,A=(V=new i(e,r.row,r.column)).getCurrentToken(),x=(e.selection,e.selection.toOrientedRange());if(A&&/comment/.test(A.type)){for(;A&&/comment/.test(A.type);){if((u=A.value.indexOf(d.start))!=-1){var E=V.getCurrentTokenRow(),W=V.getCurrentTokenColumn()+u,B=new o(E,W,E,W+d.start.length);break}A=V.stepBackward()}for(var V,u,A=(V=new i(e,r.row,r.column)).getCurrentToken();A&&/comment/.test(A.type);){if((u=A.value.indexOf(d.end))!=-1){var E=V.getCurrentTokenRow(),W=V.getCurrentTokenColumn()+u,v=new o(E,W,E,W+d.end.length);break}A=V.stepForward()}v&&e.remove(v),B&&(e.remove(B),p=B.start.row,g=-d.start.length)}else g=d.start.length,p=t.start.row,e.insert(t.end,d.end),e.insert(t.start,d.start);x.start.row==p&&(x.start.column+=g),x.end.row==p&&(x.end.column+=g),e.selection.fromOrientedRange(x)}},this.getNextLineIndent=function(a,e,t){return this.$getIndent(e)},this.checkOutdent=function(a,e,t){return!1},this.autoOutdent=function(a,e,t){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(a){return null},this.createModeDelegates=function(a){for(var e in this.$embeds=[],this.$modes={},a){var t,r,d;a[e]&&(r=(t=a[e]).prototype.$id,(d=C.$modes[r])||(C.$modes[r]=d=new t),C.$modes[e]||(C.$modes[e]=d),this.$embeds.push(e),this.$modes[e]=d)}for(var p=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],e=0;e<p.length;e++)(function(A){var x=p[e],E=A[x];A[p[e]]=function(){return this.$delegator(x,arguments,E)}})(this)},this.$delegator=function(a,e,t){var r=e[0]||"start";if(typeof r!="string"){if(Array.isArray(r[2])){var d=r[2][r[2].length-1];if(g=this.$modes[d])return g[a].apply(g,[r[1]].concat([].slice.call(e,1)))}r=r[0]||"start"}for(var p=0;p<this.$embeds.length;p++)if(this.$modes[this.$embeds[p]]){var g,A=r.split(this.$embeds[p]);if(!A[0]&&A[1])return e[0]=A[1],(g=this.$modes[this.$embeds[p]])[a].apply(g,e)}return d=t.apply(this,e),t?d:void 0},this.transformAction=function(a,e,t,r,d){if(this.$behaviour){var p,g=this.$behaviour.getBehaviours();for(p in g)if(g[p][e]){var A=g[p][e].apply(this,arguments);if(A)return A}}},this.getKeywords=function(a){if(!this.completionKeywords){var e=this.$tokenizer.rules,t=[];for(g in e)for(var r=e[g],d=0,p=r.length;d<p;d++)if(typeof r[d].token=="string")/keyword|support|storage/.test(r[d].token)&&t.push(r[d].regex);else if(typeof r[d].token=="object")for(var g,A=0,x=r[d].token.length;A<x;A++)/keyword|support|storage/.test(r[d].token[A])&&(g=r[d].regex.match(/\(.+?\)/g)[A],t.push(g.substr(1,g.length-2)));this.completionKeywords=t}return a?t.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(a,e,t,r){return(this.$keywordList||this.$createKeywordList()).map(function(d){return{name:d,value:d,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(I.prototype),f.Mode=I}),ace.define("ace/apply_delta",["require","exports","module"],function(w,f,_){f.applyDelta=function(I,C,h){var l=C.start.row,c=C.start.column,n=I[l]||"";switch(C.action){case"insert":C.lines.length===1?I[l]=n.substring(0,c)+C.lines[0]+n.substring(c):(s=[l,1].concat(C.lines),I.splice.apply(I,s),I[l]=n.substring(0,c)+I[l],I[l+C.lines.length-1]+=n.substring(c));break;case"remove":var s=C.end.column,i=C.end.row;l===i?I[l]=n.substring(0,c)+n.substring(s):I.splice(l,i-l+1,n.substring(0,c)+I[i].substring(s))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(C,f,_){var I=C("./lib/oop"),C=C("./lib/event_emitter").EventEmitter,h=(l.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},l.prototype.getDocument=function(){return this.document},l.prototype.onChange=function(n){n.start.row==n.end.row&&n.start.row!=this.row||n.start.row>this.row||(n=function(s,i,o){var r=s.action=="insert",a=(r?1:-1)*(s.end.row-s.start.row),e=(r?1:-1)*(s.end.column-s.start.column),t=s.start,r=r?t:s.end;return c(i,t,o)?{row:i.row,column:i.column}:c(r,i,!o)?{row:i.row+a,column:i.column+(i.row==r.row?e:0)}:{row:t.row,column:t.column}}(n,{row:this.row,column:this.column},this.$insertRight),this.setPosition(n.row,n.column,!0))},l.prototype.setPosition=function(n,s,i){i=i?{row:n,column:s}:this.$clipPositionToDocument(n,s),this.row==i.row&&this.column==i.column||(n={row:this.row,column:this.column},this.row=i.row,this.column=i.column,this._signal("change",{old:n,value:i}))},l.prototype.detach=function(){this.document.off("change",this.$onChange)},l.prototype.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},l.prototype.$clipPositionToDocument=function(n,s){var i={};return n>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):n<0?(i.row=0,i.column=0):(i.row=n,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,s))),s<0&&(i.column=0),i},l);function l(n,s,i){this.$onChange=this.onChange.bind(this),this.attach(n),i===void 0?this.setPosition(s.row,s.column):this.setPosition(s,i)}function c(n,s,i){return i=i?n.column<=s.column:n.column<s.column,n.row<s.row||n.row==s.row&&i}h.prototype.$insertRight=!1,I.implement(h.prototype,C),f.Anchor=h}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,f,_){var I=n("./lib/oop"),C=n("./apply_delta").applyDelta,h=n("./lib/event_emitter").EventEmitter,l=n("./range").Range,c=n("./anchor").Anchor,n=(s.prototype.setValue=function(i){var o=this.getLength()-1;this.remove(new l(0,0,o,this.getLine(o).length)),this.insert({row:0,column:0},i||"")},s.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},s.prototype.createAnchor=function(i,o){return new c(this,i,o)},s.prototype.$detectNewLine=function(i){i=i.match(/^.*?(\r\n|\r|\n)/m),this.$autoNewLine=i?i[1]:`
|
|
`,this._signal("changeNewLineMode")},s.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
`;case"unix":return`
|
|
`;default:return this.$autoNewLine||`
|
|
`}},s.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"))},s.prototype.getNewLineMode=function(){return this.$newLineMode},s.prototype.isNewLine=function(i){return i==`\r
|
|
`||i=="\r"||i==`
|
|
`},s.prototype.getLine=function(i){return this.$lines[i]||""},s.prototype.getLines=function(i,o){return this.$lines.slice(i,o+1)},s.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},s.prototype.getLength=function(){return this.$lines.length},s.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},s.prototype.getLinesForRange=function(i){var o,a;return i.start.row===i.end.row?o=[this.getLine(i.start.row).substring(i.start.column,i.end.column)]:((o=this.getLines(i.start.row,i.end.row))[0]=(o[0]||"").substring(i.start.column),a=o.length-1,i.end.row-i.start.row==a&&(o[a]=o[a].substring(0,i.end.column))),o},s.prototype.insertLines=function(i,o){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,o)},s.prototype.removeLines=function(i,o){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,o)},s.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},s.prototype.insert=function(i,o){return this.getLength()<=1&&this.$detectNewLine(o),this.insertMergedLines(i,this.$split(o))},s.prototype.insertInLine=function(e,o){var a=this.clippedPos(e.row,e.column),e=this.pos(e.row,e.column+o.length);return this.applyDelta({start:a,end:e,action:"insert",lines:[o]},!0),this.clonePos(e)},s.prototype.clippedPos=function(i,o){var a=this.getLength(),a=(i===void 0?i=a:i<0?i=0:a<=i&&(i=a-1,o=void 0),this.getLine(i));return o==null&&(o=a.length),{row:i,column:o=Math.min(Math.max(o,0),a.length)}},s.prototype.clonePos=function(i){return{row:i.row,column:i.column}},s.prototype.pos=function(i,o){return{row:i,column:o}},s.prototype.$clipPosition=function(i){var o=this.getLength();return i.row>=o?(i.row=Math.max(0,o-1),i.column=this.getLine(o-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},s.prototype.insertFullLines=function(i,o){var a=0,a=(i=Math.min(Math.max(i,0),this.getLength()))<this.getLength()?(o=o.concat([""]),0):(o=[""].concat(o),this.$lines[--i].length);this.insertMergedLines({row:i,column:a},o)},s.prototype.insertMergedLines=function(a,o){var a=this.clippedPos(a.row,a.column),e={row:a.row+o.length-1,column:(o.length==1?a.column:0)+o[o.length-1].length};return this.applyDelta({start:a,end:e,action:"insert",lines:o}),this.clonePos(e)},s.prototype.remove=function(a){var o=this.clippedPos(a.start.row,a.start.column),a=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:o,end:a,action:"remove",lines:this.getLinesForRange({start:o,end:a})}),this.clonePos(o)},s.prototype.removeInLine=function(i,o,a){return o=this.clippedPos(i,o),i=this.clippedPos(i,a),this.applyDelta({start:o,end:i,action:"remove",lines:this.getLinesForRange({start:o,end:i})},!0),this.clonePos(o)},s.prototype.removeFullLines=function(i,o){i=Math.min(Math.max(0,i),this.getLength()-1);var r=(o=Math.min(Math.max(0,o),this.getLength()-1))==this.getLength()-1&&0<i,e=o<this.getLength()-1,t=r?i-1:i,r=r?this.getLine(t).length:0,a=e?o+1:o,e=e?0:this.getLine(a).length,t=new l(t,r,a,e),r=this.$lines.slice(i,o+1);return this.applyDelta({start:t.start,end:t.end,action:"remove",lines:this.getLinesForRange(t)}),r},s.prototype.removeNewLine=function(i){i<this.getLength()-1&&0<=i&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},s.prototype.replace=function(i,o){return i instanceof l||(i=l.fromPoints(i.start,i.end)),o.length===0&&i.isEmpty()?i.start:o==this.getTextRange(i)?i.end:(this.remove(i),o?this.insert(i.start,o):i.start)},s.prototype.applyDeltas=function(i){for(var o=0;o<i.length;o++)this.applyDelta(i[o])},s.prototype.revertDeltas=function(i){for(var o=i.length-1;0<=o;o--)this.revertDelta(i[o])},s.prototype.applyDelta=function(i,o){var a=i.action=="insert";(a?i.lines.length<=1&&!i.lines[0]:!l.comparePoints(i.start,i.end))||(a&&2e4<i.lines.length?this.$splitAndapplyLargeDelta(i,2e4):(C(this.$lines,i,o),this._signal("change",i)))},s.prototype.$safeApplyDelta=function(i){var o=this.$lines.length;(i.action=="remove"&&i.start.row<o&&i.end.row<o||i.action=="insert"&&i.start.row<=o)&&this.applyDelta(i)},s.prototype.$splitAndapplyLargeDelta=function(i,o){for(var a=i.lines,e=a.length-o+1,t=i.start.row,r=i.start.column,d=0,p=0;d<e;d=p){p+=o-1;var g=a.slice(d,p);g.push(""),this.applyDelta({start:this.pos(t+d,r),end:this.pos(t+p,r=0),action:i.action,lines:g},!0)}i.lines=a.slice(d),i.start.row=t+d,i.start.column=r,this.applyDelta(i,!0)},s.prototype.revertDelta=function(i){this.$safeApplyDelta({start:this.clonePos(i.start),end:this.clonePos(i.end),action:i.action=="insert"?"remove":"insert",lines:i.lines.slice()})},s.prototype.indexToPosition=function(i,o){for(var a=this.$lines||this.getAllLines(),e=this.getNewLineCharacter().length,t=o||0,r=a.length;t<r;t++)if((i-=a[t].length+e)<0)return{row:t,column:i+a[t].length+e};return{row:r-1,column:i+a[r-1].length+e}},s.prototype.positionToIndex=function(i,o){for(var a=this.$lines||this.getAllLines(),e=this.getNewLineCharacter().length,t=0,r=Math.min(i.row,a.length),d=o||0;d<r;++d)t+=a[d].length+e;return t+i.column},s.prototype.$split=function(i){return i.split(/\r\n|\r|\n/)},s);function s(i){this.$lines=[""],i.length===0?this.$lines=[""]:Array.isArray(i)?this.insertMergedLines({row:0,column:0},i):this.insert({row:0,column:0},i)}n.prototype.$autoNewLine="",n.prototype.$newLineMode="auto",I.implement(n.prototype,h),f.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(C,f,_){var I=C("./lib/oop"),C=C("./lib/event_emitter").EventEmitter,h=(l.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(c,n){this._signal("update",{data:{first:c,last:n}})},l.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(c){var n=c.start.row,s=c.end.row-n;s==0?this.lines[n]=null:c.action=="remove"?(this.lines.splice(n,1+s,null),this.states.splice(n,1+s,null)):((c=Array(1+s)).unshift(n,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)),this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},l.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},l.prototype.$tokenizeRow=function(c){var s=this.doc.getLine(c),n=this.states[c-1],s=this.tokenizer.getLineTokens(s,n,c);return this.states[c]+""!=s.state+""?(this.states[c]=s.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=s.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l);function l(c,n){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var s=this;this.$worker=function(){if(s.running){for(var i=new Date,o=s.currentLine,a=-1,e=s.doc,t=o;s.lines[o];)o++;var r=e.getLength(),d=0;for(s.running=!1;o<r;){for(s.$tokenizeRow(o),a=o;o++,s.lines[o];);if(++d%5==0&&20<new Date-i){s.running=setTimeout(s.$worker,20);break}}s.currentLine=o,t<=(a=a==-1?o:a)&&s.fireUpdateEvent(t,a)}}}I.implement(h.prototype,C),f.BackgroundTokenizer=h}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(h,f,_){var I=h("./lib/lang"),C=h("./range").Range,h=(l.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},l.prototype.update=function(c,n,s,i){if(this.regExp)for(var o=i.firstRow,a=i.lastRow,e={},t=o;t<=a;t++){var r=this.cache[t];r==null&&(r=(r=(r=I.getMatchOffsets(s.getLine(t),this.regExp)).length>this.MAX_RANGES?r.slice(0,this.MAX_RANGES):r).map(function(A){return new C(t,A.offset,t,A.offset+A.length)}),this.cache[t]=r.length?r:"");for(var d=r.length;d--;){var p=r[d].toScreenRange(s),g=p.toString();e[g]||(e[g]=!0,n.drawSingleLineMarker(c,p,this.clazz,i))}}},l);function l(c,n,s){s===void 0&&(s="text"),this.setRegexp(c),this.clazz=n,this.type=s}h.prototype.MAX_RANGES=500,f.SearchHighlight=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(w,f,_){var I=w("../range").Range;function C(h,l){this.foldData=h,Array.isArray(l)?this.folds=l:l=this.folds=[l],h=l[l.length-1],this.range=new I(l[0].start.row,l[0].start.column,h.end.row,h.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(c){c.setFoldLine(this)},this)}C.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(l){l.start.row+=h,l.end.row+=h})},C.prototype.addFold=function(h){if(h.sameRow){if(h.start.row<this.startRow||h.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(l,c){return-l.range.compareEnd(c.start.row,c.start.column)}),0<this.range.compareEnd(h.start.row,h.start.column)?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else{if(h.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column}h.foldLine=this},C.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},C.prototype.walk=function(h,l,c){var n,s,i=0,o=this.folds,a=!0;l==null&&(l=this.end.row,c=this.end.column);for(var e=0;e<o.length;e++){if((s=(n=o[e]).range.compareStart(l,c))==-1)return void h(null,l,c,i,a);if(!h(null,n.start.row,n.start.column,i,a)&&h(n.placeholder,n.start.row,n.start.column,i)||s===0)return;a=!n.sameRow,i=n.end.column}h(null,l,c,i,a)},C.prototype.getNextFoldTo=function(h,l){for(var c,n,s=0;s<this.folds.length;s++){if((n=(c=this.folds[s]).range.compareEnd(h,l))==-1)return{fold:c,kind:"after"};if(n===0)return{fold:c,kind:"inside"}}return null},C.prototype.addRemoveChars=function(h,l,c){var n,s=this.getNextFoldTo(h,l);if(s){if(n=s.fold,s.kind=="inside"&&n.start.column!=l&&n.start.row!=h)window.console&&window.console.log(h,l,n);else if(n.start.row==h){var i,o=(i=this.folds).indexOf(n);for(o===0&&(this.start.column+=c);o<i.length;o++){if((n=i[o]).start.column+=c,!n.sameRow)return;n.end.column+=c}this.end.column+=c}}},C.prototype.split=function(s,l){var c,n,s=this.getNextFoldTo(s,l);return s&&s.kind!="inside"?(l=s.fold,s=this.folds,c=this.foldData,l=s.indexOf(l),n=s[l-1],this.end.row=n.end.row,this.end.column=n.end.column,n=new C(c,s=s.splice(l,s.length-l)),c.splice(c.indexOf(this)+1,0,n),n):null},C.prototype.merge=function(h){for(var l=h.folds,c=0;c<l.length;c++)this.addFold(l[c]);var n=this.foldData;n.splice(n.indexOf(h),1)},C.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(l){h.push(" "+l.toString())}),h.push("]"),h.join(`
|
|
`)},C.prototype.idxToPosition=function(h){for(var l=0,c=0;c<this.folds.length;c++){var n=this.folds[c];if((h-=n.start.column-l)<0)return{row:n.start.row,column:n.start.column+h};if((h-=n.placeholder.length)<0)return n.start;l=n.end.column}return{row:this.end.row,column:this.end.column+h}},f.FoldLine=C}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(C,f,_){var I=C("./range").Range.comparePoints,C=(h.prototype.pointIndex=function(l,c,n){for(var s=this.ranges,i=n||0;i<s.length;i++){var o=s[i],a=I(l,o.end);if(!(0<a))return o=I(l,o.start),a===0?c&&o!==0?-i-2:i:0<o||o===0&&!c?i:-i-1}return-i-1},h.prototype.add=function(l){var n=!l.isEmpty(),c=this.pointIndex(l.start,n),n=this.pointIndex(l.end,n,c=c<0?-c-1:c);return n<0?n=-n-1:n++,this.ranges.splice(c,n-c,l)},h.prototype.addList=function(l){for(var c=[],n=l.length;n--;)c.push.apply(c,this.add(l[n]));return c},h.prototype.substractPoint=function(l){if(l=this.pointIndex(l),0<=l)return this.ranges.splice(l,1)},h.prototype.merge=function(){for(var l=[],c=this.ranges,n=(c=c.sort(function(a,e){return I(a.start,e.start)}))[0],s=1;s<c.length;s++){var i=n,n=c[s],o=I(i.end,n.start);o<0||(o!=0||i.isEmpty()||n.isEmpty())&&(I(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),c.splice(s,1),l.push(n),n=i,s--)}return this.ranges=c,l},h.prototype.contains=function(l,c){return 0<=this.pointIndex({row:l,column:c})},h.prototype.containsPoint=function(l){return 0<=this.pointIndex(l)},h.prototype.rangeAtPoint=function(l){if(l=this.pointIndex(l),0<=l)return this.ranges[l]},h.prototype.clipRows=function(l,c){var n=this.ranges;if(n[0].start.row>c||n[n.length-1].start.row<l)return[];for(var l=this.pointIndex({row:l,column:0}),s=this.pointIndex({row:c,column:0},l=l<0?-l-1:l),i=(s<0&&(s=-s-1),[]),o=l;o<s;o++)i.push(n[o]);return i},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(l){this.session&&this.detach(),this.session=l,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(l){for(var c=l.start,n=l.end,s=c.row,i=n.row,o=this.ranges,a=0,e=o.length;a<e&&!((d=o[a]).end.row>=s);a++);if(l.action=="insert")for(var t=i-s,r=-c.column+n.column;a<e&&!((d=o[a]).start.row>s);a++)d.start.row==s&&d.start.column>=c.column&&(d.start.column==c.column&&this.$bias<=0||(d.start.column+=r,d.start.row+=t)),d.end.row==s&&d.end.column>=c.column&&(d.end.column==c.column&&this.$bias<0||(d.end.column==c.column&&0<r&&a<e-1&&d.end.column>d.start.column&&d.end.column==o[a+1].start.column&&(d.end.column-=r),d.end.column+=r,d.end.row+=t));else for(var d,t=s-i,r=c.column-n.column;a<e&&!((d=o[a]).start.row>i);a++)d.end.row<i&&(s<d.end.row||s==d.end.row&&c.column<d.end.column)?(d.end.row=s,d.end.column=c.column):d.end.row==i?d.end.column<=n.column?(t||d.end.column>c.column)&&(d.end.column=c.column,d.end.row=c.row):(d.end.column+=r,d.end.row+=t):d.end.row>i&&(d.end.row+=t),d.start.row<i&&(s<d.start.row||s==d.start.row&&c.column<d.start.column)?(d.start.row=s,d.start.column=c.column):d.start.row==i?d.start.column<=n.column?(t||d.start.column>c.column)&&(d.start.column=c.column,d.start.row=c.row):(d.start.column+=r,d.start.row+=t):d.start.row>i&&(d.start.row+=t);if(t!=0&&a<e)for(;a<e;a++)(d=o[a]).start.row+=t,d.end.row+=t},h);function h(){this.ranges=[],this.$bias=1}C.prototype.comparePoints=I,f.RangeList=C}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(h,f,_){var I,C,l=this&&this.__extends||(I=function(i,o){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(a,e){a.__proto__=e}:function(a,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t])}))(i,o)},function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function a(){this.constructor=i}I(i,o),i.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}),h=h("../range_list").RangeList,l=(l(c,C=h),c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(o){o.setFoldLine(i)})},c.prototype.clone=function(){var i=new c(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(o){i.subFolds.push(o.clone())}),i.collapseChildren=this.collapseChildren,i},c.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){r=i,d=this.start,n(r.start,d),n(r.end,d);for(var o=i.start.row,a=i.start.column,e=0,t=-1;e<this.subFolds.length&&(t=this.subFolds[e].range.compare(o,a))==1;e++);var r=this.subFolds[e],d=0;if(t==0){if(r.range.containsRange(i))return r.addSubFold(i);d=1}for(var o=i.range.end.row,a=i.range.end.column,p=e,t=-1;p<this.subFolds.length&&(t=this.subFolds[p].range.compare(o,a))==1;p++);t==0&&p++;for(var g=this.subFolds.splice(e,p-e,i),A=t==0?g.length-1:g.length,x=d;x<A;x++)i.addSubFold(g[x]);return i.setFoldLine(this.foldLine),i}},c.prototype.restoreRange=function(i){return i=i,o=this.start,s(i.start,o),void s(i.end,o);var o},c);function c(i,o){var a=C.call(this)||this;return a.foldLine=null,a.placeholder=o,a.range=i,a.start=i.start,a.end=i.end,a.sameRow=i.start.row==i.end.row,a.subFolds=a.ranges=[],a}function n(i,o){i.row-=o.row,i.row==0&&(i.column-=o.column)}function s(i,o){i.row==0&&(i.column+=o.column),i.row+=o.row}f.Fold=l}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(w,f,_){var I=w("../range").Range,C=w("./fold_line").FoldLine,h=w("./fold").Fold,l=w("../token_iterator").TokenIterator,c=w("../mouse/mouse_event").MouseEvent;f.Folding=function(){this.getFoldAt=function(n,s,i){var o=this.getFoldLine(n);if(!o)return null;for(var a=o.folds,e=0;e<a.length;e++){var t=a[e].range;if(t.contains(n,s)&&(i!=1||!t.isEnd(n,s)||t.isEmpty())&&(i!=-1||!t.isStart(n,s)||t.isEmpty()))return a[e]}},this.getFoldsInRange=function(n){var s=n.start,i=n.end,o=this.$foldData,a=[];s.column+=1,--i.column;for(var e=0;e<o.length;e++){var t=o[e].range.compareRange(n);if(t!=2){if(t==-2)break;for(var r=o[e].folds,d=0;d<r.length;d++){var p=r[d];if((t=p.range.compareRange(n))==-2)break;if(t!=2){if(t==42)break;a.push(p)}}}}return--s.column,i.column+=1,a},this.getFoldsInRangeList=function(n){var s;return Array.isArray(n)?(s=[],n.forEach(function(i){s=s.concat(this.getFoldsInRange(i))},this)):s=this.getFoldsInRange(n),s},this.getAllFolds=function(){for(var n=[],s=this.$foldData,i=0;i<s.length;i++)for(var o=0;o<s[i].folds.length;o++)n.push(s[i].folds[o]);return n},this.getFoldStringAt=function(n,s,i,o){if(!(o=o||this.getFoldLine(n)))return null;for(var a,e={end:{column:0}},t=0;t<o.folds.length;t++){var r,d=(r=o.folds[t]).range.compareEnd(n,s);if(d==-1){a=this.getLine(r.start.row).substring(e.end.column,r.start.column);break}if(d===0)return null;e=r}return a=a||this.getLine(r.start.row).substring(e.end.column),i==-1?a.substring(0,s-e.end.column):i==1?a.substring(s-e.end.column):a},this.getFoldLine=function(n,s){var i=this.$foldData,o=0;for((o=s?i.indexOf(s):o)==-1&&(o=0);o<i.length;o++){var a=i[o];if(a.start.row<=n&&a.end.row>=n)return a;if(a.end.row>n)return null}return null},this.getNextFoldLine=function(n,s){var i=this.$foldData,o=0;for((o=s?i.indexOf(s):o)==-1&&(o=0);o<i.length;o++){var a=i[o];if(a.end.row>=n)return a}return null},this.getFoldedRowCount=function(n,s){for(var i=this.$foldData,o=s-n+1,a=0;a<i.length;a++){var t=i[a],e=t.end.row,t=t.start.row;if(s<=e){t<s&&(n<=t?o-=s-t:o=0);break}n<=e&&(o-=n<=t?e-t:e-n+1)}return o},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort(function(s,i){return s.start.row-i.start.row}),n},this.addFold=function(t,d){var i,o=this.$foldData,a=!1,e=(t instanceof h?i=t:(i=new h(d,t)).collapseChildren=d.collapseChildren,this.$clipRangeToDocument(i.range),i.start.row),t=i.start.column,r=i.end.row,d=i.end.column,p=this.getFoldAt(e,t,1),g=this.getFoldAt(r,d,-1);if(p&&g==p)return p.addSubFold(i);p&&!p.range.isStart(e,t)&&this.removeFold(p),g&&!g.range.isEnd(r,d)&&this.removeFold(g),t=this.getFoldsInRange(i.range),0<t.length&&(this.removeFolds(t),i.collapseChildren||t.forEach(function(W){i.addSubFold(W)}));for(var A=0;A<o.length;A++){var x=o[A];if(r==x.start.row){x.addFold(i),a=!0;break}if(e==x.end.row){if(x.addFold(i),a=!0,!i.sameRow){var E=o[A+1];if(E&&E.start.row==r){x.merge(E);break}}break}if(r<=x.start.row)break}return a||(x=this.$addFoldLine(new C(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(x.start.row,x.start.row):this.$updateRowLengthCache(x.start.row,x.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(n){n.forEach(function(s){this.addFold(s)},this)},this.removeFold=function(n){var s=n.foldLine,i=s.start.row,o=s.end.row,a=this.$foldData,e=s.folds;e.length==1?a.splice(a.indexOf(s),1):s.range.isEnd(n.end.row,n.end.column)?(e.pop(),s.end.row=e[e.length-1].end.row,s.end.column=e[e.length-1].end.column):s.range.isStart(n.start.row,n.start.column)?(e.shift(),s.start.row=e[0].start.row,s.start.column=e[0].start.column):n.sameRow?e.splice(e.indexOf(n),1):((e=(a=s.split(n.start.row,n.start.column)).folds).shift(),a.start.row=e[0].start.row,a.start.column=e[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(i,o):this.$updateRowLengthCache(i,o)),this.$modified=!0,this._signal("changeFold",{data:n,action:"remove"})},this.removeFolds=function(n){for(var s=[],i=0;i<n.length;i++)s.push(n[i]);s.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(n){this.removeFold(n),n.subFolds.forEach(function(s){n.restoreRange(s),this.addFold(s)},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(s){this.expandFold(s)},this)},this.unfold=function(n,s){var i;if(n==null)i=new I(0,0,this.getLength(),0),s==null&&(s=!0);else if(typeof n=="number")i=new I(n,0,n,this.getLine(n).length);else if("row"in n)i=I.fromPoints(n,n);else{if(Array.isArray(n))return o=[],n.forEach(function(a){o=o.concat(this.unfold(a))},this),o;i=n}for(var o,n=o=this.getFoldsInRangeList(i);o.length==1&&I.comparePoints(o[0].start,i.start)<0&&0<I.comparePoints(o[0].end,i.end);)this.expandFolds(o),o=this.getFoldsInRangeList(i);if(s!=0?this.removeFolds(o):this.expandFolds(o),n.length)return n},this.isRowFolded=function(n,s){return!!this.getFoldLine(n,s)},this.getRowFoldEnd=function(n,s){return s=this.getFoldLine(n,s),s?s.end.row:n},this.getRowFoldStart=function(n,s){return s=this.getFoldLine(n,s),s?s.start.row:n},this.getFoldDisplayLine=function(n,s,i,o,a){o==null&&(o=n.start.row),a==null&&(a=0),s==null&&(s=n.end.row),i==null&&(i=this.getLine(s).length);var e=this.doc,t="";return n.walk(function(r,d,p,g){if(!(d<o)){if(d==o){if(p<a)return;g=Math.max(a,g)}t+=r!=null?r:e.getLine(d).substring(g,p)}},s,i),t},this.getDisplayLine=function(n,s,i,o){var a=this.getFoldLine(n);return a?this.getFoldDisplayLine(a,n,s,i,o):(a=this.doc.getLine(n)).substring(o||0,s||a.length)},this.$cloneFoldData=function(){var n=[];return n=this.$foldData.map(function(s){return s=s.folds.map(function(i){return i.clone()}),new C(n,s)})},this.toggleFold=function(n){var s=this.selection.getRange();if(s.isEmpty()){var i,o=s.start;if(i=this.getFoldAt(o.row,o.column))return void this.expandFold(i);(a=this.findMatchingBracket(o))?s.comparePoint(a)==1?s.end=a:(s.start=a,s.start.column++,s.end.column--):(a=this.findMatchingBracket({row:o.row,column:o.column+1}))?(s.comparePoint(a)==1?s.end=a:s.start=a,s.start.column++):s=this.getCommentFoldRange(o.row,o.column)||s}else{var a=this.getFoldsInRange(s);if(n&&a.length)return void this.expandFolds(a);a.length==1&&(i=a[0])}if((i=i||this.getFoldAt(s.start.row,s.start.column))&&i.range.toString()==s.toString())this.expandFold(i);else{if(o="...",!s.isMultiLine()){if((o=this.getTextRange(s)).length<4)return;o=o.trim().substring(0,2)+".."}this.addFold(o,s)}},this.getCommentFoldRange=function(n,s,i){var o=new l(this,n,s),a=o.getCurrentToken(),e=a&&a.type;if(a&&/^comment|string/.test(e)){(e=e.match(/comment|string/)[0])=="comment"&&(e+="|doc-start|\\.doc");var t=new RegExp(e),e=new I;if(i!=1){for(;(a=o.stepBackward())&&t.test(a.type)&&!/^comment.end/.test(a.type););a=o.stepForward()}if(e.start.row=o.getCurrentTokenRow(),e.start.column=o.getCurrentTokenColumn()+(/^comment.start/.test(a.type)?a.value.length:2),o=new l(this,n,s),i!=-1){var r=-1;do if(a=o.stepForward(),r==-1){var d=this.getState(o.$row);t.test(d)||(r=o.$row)}else if(o.$row>r)break;while(a&&t.test(a.type)&&!/^comment.start/.test(a.type));a=o.stepBackward()}else a=o.getCurrentToken();return e.end.row=o.getCurrentTokenRow(),e.end.column=o.getCurrentTokenColumn(),/^comment.end/.test(a.type)||(e.end.column+=a.value.length-2),e}},this.foldAll=function(n,s,i,o){i==null&&(i=1e5);var a=this.foldWidgets;if(a){s=s||this.getLength();for(var e,t=n=n||0;t<s;t++)a[t]==null&&(a[t]=this.getFoldWidget(t)),a[t]!="start"||o&&!o(t)||(e=this.getFoldWidgetRange(t))&&e.isMultiLine()&&e.end.row<=s&&e.start.row>=n&&(t=e.end.row,e.collapseChildren=i,this.addFold("...",e))}},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(s){for(var i=n.getTokens(s),o=0;o<i.length;o++){var a=i[o];if(a.type!="text"||!/^\s+$/.test(a.value))return!!/comment/.test(a.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,s){var i=this.foldWidgets;if(!i||s&&i[n])return{};for(var o=n-1;0<=o;){var a=i[o];if((a=a==null?i[o]=this.getFoldWidget(o):a)=="start"){var e=this.getFoldWidgetRange(o),t=t||e;if(e&&e.end.row>=n)break}o--}return{range:o!==-1&&e,firstRange:t}},this.onFoldWidgetClick=function(n,s){var i={children:(s=s instanceof c?s.domEvent:s).shiftKey,all:s.ctrlKey||s.metaKey,siblings:s.altKey};this.$toggleFoldWidget(n,i)||(n=s.target||s.srcElement)&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")},this.$toggleFoldWidget=function(n,s){var i,o,a,e;if(this.getFoldWidget)return i=this.getFoldWidget(n),o=this.getLine(n),(o=this.getFoldAt(n,(i=i==="end"?-1:1)==-1?0:o.length,i))?(s.children||s.all?this.removeFold(o):this.expandFold(o),o):(i=this.getFoldWidgetRange(n,!0))&&!i.isMultiLine()&&(o=this.getFoldAt(i.start.row,i.start.column,1))&&i.isEqual(o.range)?(this.removeFold(o),o):(s.siblings?((o=this.getParentFoldRangeData(n)).range&&(a=o.range.start.row+1,e=o.range.end.row),this.foldAll(a,e,s.all?1e4:0)):s.children?(e=i?i.end.row:this.getLength(),this.foldAll(n+1,e,s.all?1e4:0)):i&&(s.all&&(i.collapseChildren=1e4),this.addFold("...",i)),i)},this.toggleFoldWidget=function(n){var s,i=this.selection.getCursor().row;i=this.getRowFoldStart(i),!this.$toggleFoldWidget(i,{})&&(s=(s=this.getParentFoldRangeData(i,!0)).range||s.firstRange)&&(i=s.start.row,(i=this.getFoldAt(i,this.getLine(i).length,1))?this.removeFold(i):this.addFold("...",s))},this.updateFoldWidgets=function(n){var s=n.start.row,i=n.end.row-s;i==0?this.foldWidgets[s]=null:n.action=="remove"?this.foldWidgets.splice(s,1+i,null):((n=Array(1+i)).unshift(s,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(w,f,_){var I=w("../token_iterator").TokenIterator,C=w("../range").Range;f.BracketMatch=function(){this.findMatchingBracket=function(h,l){return h.column!=0&&(l=l||this.getLine(h.row).charAt(h.column-1))!=""&&(l=l.match(/([\(\[\{])|([\)\]\}])/))?l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h):null},this.getBracketRange=function(h){var l,c,n=this.getLine(h.row),s=!0,i=n.charAt(h.column-1),o=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(o||(i=n.charAt(h.column),h={row:h.row,column:h.column+1},o=i&&i.match(/([\(\[\{])|([\)\]\}])/),s=!1),!o)return null;if(o[1]){if(!(c=this.$findClosingBracket(o[1],h)))return null;l=C.fromPoints(h,c),s||(l.end.column++,l.start.column--),l.cursor=l.end}else{if(!(c=this.$findOpeningBracket(o[2],h)))return null;l=C.fromPoints(c,h),s||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(h,l){var c=this.getLine(h.row),n=/([\(\[\{])|([\)\]\}])/,s=!l&&c.charAt(h.column-1),i=s&&s.match(n);return i||(s=(l===void 0||l)&&c.charAt(h.column),h={row:h.row,column:h.column+1},i=s&&s.match(n)),i?(l=new C(h.row,h.column-1,h.row,h.column),(c=i[1]?this.$findClosingBracket(i[1],h):this.$findOpeningBracket(i[2],h))?[l,new C(c.row,c.column,c.row,c.column+1)]:[l]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,l,c){var n=this.$brackets[h],s=1,i=new I(this,l.row,l.column),o=i.getCurrentToken();if(o=o||i.stepForward()){c=c||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+");for(var a=l.column-i.getCurrentTokenColumn()-2,e=o.value;;){for(;0<=a;){var t=e.charAt(a);if(t==n){if(--s==0)return{row:i.getCurrentTokenRow(),column:a+i.getCurrentTokenColumn()}}else t==h&&(s+=1);--a}for(;(o=i.stepBackward())&&!c.test(o.type););if(o==null)break;a=(e=o.value).length-1}return null}},this.$findClosingBracket=function(h,l,c){var n=this.$brackets[h],s=1,i=new I(this,l.row,l.column),o=i.getCurrentToken();if(o=o||i.stepForward()){c=c||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+");for(var a=l.column-i.getCurrentTokenColumn();;){for(var e=o.value,t=e.length;a<t;){var r=e.charAt(a);if(r==n){if(--s==0)return{row:i.getCurrentTokenRow(),column:a+i.getCurrentTokenColumn()}}else r==h&&(s+=1);a+=1}for(;(o=i.stepForward())&&!c.test(o.type););if(o==null)break;a=0}return null}},this.getMatchingTags=function(l){var l=new I(this,l.row,l.column),c=this.$findTagName(l);if(c)return l.stepBackward().value==="<"?this.$findClosingTag(l,c):this.$findOpeningTag(l,c)},this.$findTagName=function(h){var l=h.getCurrentToken(),c=!1,n=!1;if(l&&l.type.indexOf("tag-name")===-1)for(;(l=n?h.stepBackward():h.stepForward())&&(l.value==="/>"?n=!0:l.type.indexOf("tag-name")!==-1&&(c=!0)),l&&!c;);return l},this.$findClosingTag=function(h,l){var c=l.value,n=l.value,s=0,i=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1),o=(l=h.stepForward(),new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+l.value.length)),a=!1;do{var e,t=l;if(l=h.stepForward())if(l.value!==">"||a||(e=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1),a=!0),l.type.indexOf("tag-name")!==-1){if(n===(c=l.value)){if(t.value==="<")s++;else if(t.value==="</"&&--s<0){h.stepBackward();var r=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),d=(l=h.stepForward(),new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+l.value.length));if(!(l=h.stepForward())||l.value!==">")return;var p=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}}else n===c&&l.value==="/>"&&--s<0&&(p=d=r=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),e=new C(o.end.row,o.end.column,o.end.row,o.end.column+1))}while(l&&0<=s);if(i&&e&&r&&p&&o&&d)return{openTag:new C(i.start.row,i.start.column,e.end.row,e.end.column),closeTag:new C(r.start.row,r.start.column,p.end.row,p.end.column),openTagName:o,closeTagName:d}},this.$findOpeningTag=function(h,l){var c,n=h.getCurrentToken(),s=l.value,i=0,o=h.getCurrentTokenRow(),a=h.getCurrentTokenColumn(),e=new C(o,a,o,a+2),t=(h.stepForward(),new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+l.value.length));if((l=h.stepForward())&&l.value===">"){var r=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(l=n,o=h.getCurrentTokenRow(),c=(a=h.getCurrentTokenColumn())+l.value.length,n=h.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(s===l.value)if(n.value==="<"){if(0<++i){for(var d=new C(o,a,o,c),p=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);(l=h.stepForward())&&l.value!==">";);var g=new C(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else n.value==="</"&&i--}else if(l.value==="/>"){for(var A=0,x=n;x;){if(x.type.indexOf("tag-name")!==-1&&x.value===s){i--;break}if(x.value==="<")break;x=h.stepBackward(),A++}for(var E=0;E<A;E++)h.stepForward()}}while(n&&i<=0);return p&&g&&e&&r&&d&&t?{openTag:new C(p.start.row,p.start.column,g.end.row,g.end.column),closeTag:new C(e.start.row,e.start.column,r.end.row,r.end.column),openTagName:d,closeTagName:t}:void 0}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(w,f,_){var I=w("./lib/oop"),C=w("./lib/lang"),h=w("./bidihandler").BidiHandler,l=w("./config"),c=w("./lib/event_emitter").EventEmitter,n=w("./selection").Selection,s=w("./mode/text").Mode,i=w("./range").Range,o=w("./document").Document,a=w("./background_tokenizer").BackgroundTokenizer,e=w("./search_highlight").SearchHighlight,t=(r.prototype.setDocument=function(u){this.doc&&this.doc.off("change",this.$onChange),(this.doc=u).on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},r.prototype.getDocument=function(){return this.doc},r.prototype.$resetRowCache=function(u){var v;u?(v=this.$docRowCache.length,(u=this.$getRowCacheIndex(this.$docRowCache,u)+1)<v&&(this.$docRowCache.splice(u,v),this.$screenRowCache.splice(u,v))):(this.$docRowCache=[],this.$screenRowCache=[])},r.prototype.$getRowCacheIndex=function(u,v){for(var $=0,y=u.length-1;$<=y;){var L=$+y>>1,H=u[L];if(H<v)$=1+L;else{if(!(v<H))return L;y=L-1}}return $-1},r.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},r.prototype.onChangeFold=function(u){u=u.data,this.$resetRowCache(u.start.row)},r.prototype.onChange=function(u){this.$modified=!0,this.$bidiHandler.onChange(u),this.$resetRowCache(u.start.row);var v=this.$updateInternalDataOnChange(u);!this.$fromUndo&&this.$undoManager&&(v&&v.length&&(this.$undoManager.add({action:"removeFolds",folds:v},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(u,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(u),this._signal("change",u)},r.prototype.setValue=function(u){this.doc.setValue(u),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},r.prototype.toString=function(){return this.doc.getValue()},r.prototype.getSelection=function(){return this.selection},r.prototype.getState=function(u){return this.bgTokenizer.getState(u)},r.prototype.getTokens=function(u){return this.bgTokenizer.getTokens(u)},r.prototype.getTokenAt=function(u,v){var $=this.bgTokenizer.getTokens(u),L=0;if(v==null)var y=$.length-1,L=this.getLine(u).length;else for(y=0;y<$.length&&!(v<=(L+=$[y].value.length));y++);return(u=$[y])?(u.index=y,u.start=L-u.value.length,u):null},r.prototype.setUndoManager=function(u){var v;this.$undoManager=u,this.$informUndoManager&&this.$informUndoManager.cancel(),u?(u.addSession(v=this),this.$syncInformUndoManager=function(){v.$informUndoManager.cancel(),v.mergeUndoDeltas=!1},this.$informUndoManager=C.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},r.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},r.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},r.prototype.getTabString=function(){return this.getUseSoftTabs()?C.stringRepeat(" ",this.getTabSize()):" "},r.prototype.setUseSoftTabs=function(u){this.setOption("useSoftTabs",u)},r.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},r.prototype.setTabSize=function(u){this.setOption("tabSize",u)},r.prototype.getTabSize=function(){return this.$tabSize},r.prototype.isTabStop=function(u){return this.$useSoftTabs&&u.column%this.$tabSize==0},r.prototype.setNavigateWithinSoftTabs=function(u){this.setOption("navigateWithinSoftTabs",u)},r.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},r.prototype.setOverwrite=function(u){this.setOption("overwrite",u)},r.prototype.getOverwrite=function(){return this.$overwrite},r.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},r.prototype.addGutterDecoration=function(u,v){this.$decorations[u]||(this.$decorations[u]=""),this.$decorations[u]+=" "+v,this._signal("changeBreakpoint",{})},r.prototype.removeGutterDecoration=function(u,v){this.$decorations[u]=(this.$decorations[u]||"").replace(" "+v,""),this._signal("changeBreakpoint",{})},r.prototype.getBreakpoints=function(){return this.$breakpoints},r.prototype.setBreakpoints=function(u){this.$breakpoints=[];for(var v=0;v<u.length;v++)this.$breakpoints[u[v]]="ace_breakpoint";this._signal("changeBreakpoint",{})},r.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},r.prototype.setBreakpoint=function(u,v){(v=v===void 0?"ace_breakpoint":v)?this.$breakpoints[u]=v:delete this.$breakpoints[u],this._signal("changeBreakpoint",{})},r.prototype.clearBreakpoint=function(u){delete this.$breakpoints[u],this._signal("changeBreakpoint",{})},r.prototype.addMarker=function(H,v,$,y){var L=this.$markerId++,H={range:H,type:$||"line",renderer:typeof $=="function"?$:null,clazz:v,inFront:!!y,id:L};return y?(this.$frontMarkers[L]=H,this._signal("changeFrontMarker")):(this.$backMarkers[L]=H,this._signal("changeBackMarker")),L},r.prototype.addDynamicMarker=function(u,v){var $;if(u.update)return $=this.$markerId++,u.id=$,u.inFront=!!v,v?(this.$frontMarkers[$]=u,this._signal("changeFrontMarker")):(this.$backMarkers[$]=u,this._signal("changeBackMarker")),u},r.prototype.removeMarker=function(u){var v=this.$frontMarkers[u]||this.$backMarkers[u];v&&(delete(v.inFront?this.$frontMarkers:this.$backMarkers)[u],this._signal(v.inFront?"changeFrontMarker":"changeBackMarker"))},r.prototype.getMarkers=function(u){return u?this.$frontMarkers:this.$backMarkers},r.prototype.highlight=function(u){var v;this.$searchHighlight||(v=new e(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(v)),this.$searchHighlight.setRegexp(u)},r.prototype.highlightLines=function(u,v,$,y){return typeof v!="number"&&($=v,v=u),$=$||"ace_step",u=new i(u,0,v,1/0),u.id=this.addMarker(u,$,"fullLine",y),u},r.prototype.setAnnotations=function(u){this.$annotations=u,this._signal("changeAnnotation",{})},r.prototype.getAnnotations=function(){return this.$annotations||[]},r.prototype.clearAnnotations=function(){this.setAnnotations([])},r.prototype.$detectNewLine=function(u){u=u.match(/^.*?(\r?\n)/m),this.$autoNewLine=u?u[1]:`
|
|
`},r.prototype.getWordRange=function(u,v){var $,y=this.getLine(u),L=!1,H=($=(L=(L=0<v?!!y.charAt(v-1).match(this.tokenRe):L)||!!y.charAt(v).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(y.slice(v-1,v+1))?/\s/:this.nonTokenRe,v);if(0<H){for(;0<=--H&&y.charAt(H).match($););H++}for(var G=v;G<y.length&&y.charAt(G).match($);)G++;return new i(u,H,u,G)},r.prototype.getAWordRange=function(u,v){for(var $=this.getWordRange(u,v),y=this.getLine($.end.row);y.charAt($.end.column).match(/[ \t]/);)$.end.column+=1;return $},r.prototype.setNewLineMode=function(u){this.doc.setNewLineMode(u)},r.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},r.prototype.setUseWorker=function(u){this.setOption("useWorker",u)},r.prototype.getUseWorker=function(){return this.$useWorker},r.prototype.onReloadTokenizer=function(u){var v=u.data;this.bgTokenizer.start(v.first),this._signal("tokenizerUpdate",u)},r.prototype.setMode=function(u,v){if(u&&typeof u=="object"){if(u.getTokenizer)return this.$onChangeMode(u);var $=u,y=$.path}else y=u||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new s),this.$modes[y]&&!$?(this.$onChangeMode(this.$modes[y]),v&&v()):(this.$modeId=y,l.loadModule(["mode",y],function(L){if(this.$modeId!==y)return v&&v();this.$modes[y]&&!$?this.$onChangeMode(this.$modes[y]):L&&L.Mode&&(L=new L.Mode($),$||((this.$modes[y]=L).$id=y),this.$onChangeMode(L)),v&&v()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0))},r.prototype.$onChangeMode=function(u,v){var $,y,L;v||(this.$modeId=u.$id),this.$mode===u||($=this.$mode,this.$mode=u,this.$stopWorker(),this.$useWorker&&this.$startWorker(),(y=u.getTokenizer()).on!==void 0&&(L=this.onReloadTokenizer.bind(this),y.on("update",L)),this.bgTokenizer.setTokenizer(y),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=u.tokenRe,this.nonTokenRe=u.nonTokenRe,v)||(u.attachToSession&&u.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(u.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:$,mode:u}))},r.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},r.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(u){l.warn("Could not load worker",u),this.$worker=null}},r.prototype.getMode=function(){return this.$mode},r.prototype.setScrollTop=function(u){this.$scrollTop===u||isNaN(u)||(this.$scrollTop=u,this._signal("changeScrollTop",u))},r.prototype.getScrollTop=function(){return this.$scrollTop},r.prototype.setScrollLeft=function(u){this.$scrollLeft===u||isNaN(u)||(this.$scrollLeft=u,this._signal("changeScrollLeft",u))},r.prototype.getScrollLeft=function(){return this.$scrollLeft},r.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},r.prototype.getLineWidgetMaxWidth=function(){var u;return this.lineWidgetsWidth!=null?this.lineWidgetsWidth:(u=0,this.lineWidgets.forEach(function(v){v&&v.screenWidth>u&&(u=v.screenWidth)}),this.lineWidgetWidth=u)},r.prototype.$computeWidth=function(u){if(this.$modified||u){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var v=this.doc.getAllLines(),$=this.$rowLengthCache,y=0,L=0,H=this.$foldData[L],G=H?H.start.row:1/0,Y=v.length,Q=0;Q<Y;Q++){if(G<Q){if(Y<=(Q=H.end.row+1))break;G=(H=this.$foldData[L++])?H.start.row:1/0}$[Q]==null&&($[Q]=this.$getStringScreenWidth(v[Q])[0]),$[Q]>y&&(y=$[Q])}this.screenWidth=y}},r.prototype.getLine=function(u){return this.doc.getLine(u)},r.prototype.getLines=function(u,v){return this.doc.getLines(u,v)},r.prototype.getLength=function(){return this.doc.getLength()},r.prototype.getTextRange=function(u){return this.doc.getTextRange(u||this.selection.getRange())},r.prototype.insert=function(u,v){return this.doc.insert(u,v)},r.prototype.remove=function(u){return this.doc.remove(u)},r.prototype.removeFullLines=function(u,v){return this.doc.removeFullLines(u,v)},r.prototype.undoChanges=function(u,v){if(u.length){this.$fromUndo=!0;for(var $=u.length-1;$!=-1;$--){var y=u[$];y.action=="insert"||y.action=="remove"?this.doc.revertDelta(y):y.folds&&this.addFolds(y.folds)}!v&&this.$undoSelect&&(u.selectionBefore?this.selection.fromJSON(u.selectionBefore):this.selection.setRange(this.$getUndoSelection(u,!0))),this.$fromUndo=!1}},r.prototype.redoChanges=function(u,v){if(u.length){this.$fromUndo=!0;for(var $=0;$<u.length;$++){var y=u[$];y.action!="insert"&&y.action!="remove"||this.doc.$safeApplyDelta(y)}!v&&this.$undoSelect&&(u.selectionAfter?this.selection.fromJSON(u.selectionAfter):this.selection.setRange(this.$getUndoSelection(u,!1))),this.$fromUndo=!1}},r.prototype.setUndoSelect=function(u){this.$undoSelect=u},r.prototype.$getUndoSelection=function(u,v){function $(Y){return v?Y.action!=="insert":Y.action==="insert"}for(var y,L,H=0;H<u.length;H++){var G=u[H];G.start&&(y?$(G)?(L=G.start,y.compare(L.row,L.column)==-1&&y.setStart(L),L=G.end,y.compare(L.row,L.column)==1&&y.setEnd(L)):(L=G.start,y.compare(L.row,L.column)==-1&&(y=i.fromPoints(G.start,G.start))):y=$(G)?i.fromPoints(G.start,G.end):i.fromPoints(G.start,G.start))}return y},r.prototype.replace=function(u,v){return this.doc.replace(u,v)},r.prototype.moveText=function(u,Q,$){var y,L,H,G=this.getTextRange(u),Y=this.getFoldsInRange(u),Q=i.fromPoints(Q,Q);return $||(this.remove(u),L=u.start.row-u.end.row,(H=L?-u.end.column:u.start.column-u.end.column)&&(Q.start.row==u.end.row&&Q.start.column>u.end.column&&(Q.start.column+=H),Q.end.row==u.end.row)&&Q.end.column>u.end.column&&(Q.end.column+=H),L&&Q.start.row>=u.end.row&&(Q.start.row+=L,Q.end.row+=L)),Q.end=this.insert(Q.start,G),Y.length&&(y=u.start,$=Q.start,L=$.row-y.row,H=$.column-y.column,this.addFolds(Y.map(function(z){return(z=z.clone()).start.row==y.row&&(z.start.column+=H),z.end.row==y.row&&(z.end.column+=H),z.start.row+=L,z.end.row+=L,z}))),Q},r.prototype.indentRows=function(u,v,$){$=$.replace(/\t/g,this.getTabString());for(var y=u;y<=v;y++)this.doc.insertInLine({row:y,column:0},$)},r.prototype.outdentRows=function(u){for(var v=u.collapseRows(),$=new i(0,0,0,0),y=this.getTabSize(),L=v.start.row;L<=v.end.row;++L){var H=this.getLine(L);$.start.row=L,$.end.row=L;for(var G=0;G<y&&H.charAt(G)==" ";++G);G<y&&H.charAt(G)==" "?($.start.column=G,$.end.column=G+1):($.start.column=0,$.end.column=G),this.remove($)}},r.prototype.$moveLines=function(u,v,H){if(u=this.getRowFoldStart(u),v=this.getRowFoldEnd(v),H<0){if((L=this.getRowFoldStart(u+H))<0)return 0;var y=L-u}else if(0<H){if((L=this.getRowFoldEnd(v+H))>this.doc.getLength()-1)return 0;y=L-v}else u=this.$clipRowToDocument(u),y=(v=this.$clipRowToDocument(v))-u+1;var L=new i(u,0,v,Number.MAX_VALUE),L=this.getFoldsInRange(L).map(function(G){return(G=G.clone()).start.row+=y,G.end.row+=y,G}),H=H==0?this.doc.getLines(u,v):this.doc.removeFullLines(u,v);return this.doc.insertFullLines(u+y,H),L.length&&this.addFolds(L),y},r.prototype.moveLinesUp=function(u,v){return this.$moveLines(u,v,-1)},r.prototype.moveLinesDown=function(u,v){return this.$moveLines(u,v,1)},r.prototype.duplicateLines=function(u,v){return this.$moveLines(u,v,0)},r.prototype.$clipRowToDocument=function(u){return Math.max(0,Math.min(u,this.doc.getLength()-1))},r.prototype.$clipColumnToRow=function(u,v){return v<0?0:Math.min(this.doc.getLine(u).length,v)},r.prototype.$clipPositionToDocument=function(u,v){var $;return v=Math.max(0,v),v=u<0?u=0:($=this.doc.getLength())<=u?this.doc.getLine(u=$-1).length:Math.min(this.doc.getLine(u).length,v),{row:u,column:v}},r.prototype.$clipRangeToDocument=function(u){u.start.row<0?(u.start.row=0,u.start.column=0):u.start.column=this.$clipColumnToRow(u.start.row,u.start.column);var v=this.doc.getLength()-1;return u.end.row>v?(u.end.row=v,u.end.column=this.doc.getLine(v).length):u.end.column=this.$clipColumnToRow(u.end.row,u.end.column),u},r.prototype.setUseWrapMode=function(u){u!=this.$useWrapMode&&(this.$useWrapMode=u,this.$modified=!0,this.$resetRowCache(0),u&&(u=this.getLength(),this.$wrapData=Array(u),this.$updateWrapData(0,u-1)),this._signal("changeWrapMode"))},r.prototype.getUseWrapMode=function(){return this.$useWrapMode},r.prototype.setWrapLimitRange=function(u,v){this.$wrapLimitRange.min===u&&this.$wrapLimitRange.max===v||(this.$wrapLimitRange={min:u,max:v},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},r.prototype.adjustWrapLimit=function(u,y){var $=this.$wrapLimitRange,y=($.max<0&&($={min:y,max:y}),this.$constrainWrapLimit(u,$.min,$.max));return y!=this.$wrapLimit&&1<y&&(this.$wrapLimit=y,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},r.prototype.$constrainWrapLimit=function(u,v,$){return v&&(u=Math.max(v,u)),u=$?Math.min($,u):u},r.prototype.getWrapLimit=function(){return this.$wrapLimit},r.prototype.setWrapLimit=function(u){this.setWrapLimitRange(u,u)},r.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},r.prototype.$updateInternalDataOnChange=function(u){var v=this.$useWrapMode,$=u.action,y=u.start,L=u.end,H=y.row,G=L.row,Y=G-H,Q=null;if(this.$updating=!0,Y!=0)if($==="remove"){this[v?"$wrapData":"$rowLengthCache"].splice(H,Y);var z=this.$foldData,Q=this.getFoldsInRange(u);this.removeFolds(Q);var ee=0;for((Z=this.getFoldLine(L.row))&&(Z.addRemoveChars(L.row,L.column,y.column-L.column),Z.shiftRow(-Y),(T=this.getFoldLine(H))&&T!==Z&&(T.merge(Z),Z=T),ee=z.indexOf(Z)+1);ee<z.length;ee++)(Z=z[ee]).start.row>=L.row&&Z.shiftRow(-Y);G=H}else{var T=Array(Y),P=(T.unshift(H,0),v?this.$wrapData:this.$rowLengthCache),z=(P.splice.apply(P,T),this.$foldData),ee=0;for((Z=this.getFoldLine(H))&&((P=Z.range.compareInside(y.row,y.column))==0?(Z=Z.split(y.row,y.column))&&(Z.shiftRow(Y),Z.addRemoveChars(G,0,L.column-y.column)):P==-1&&(Z.addRemoveChars(H,0,L.column-y.column),Z.shiftRow(Y)),ee=z.indexOf(Z)+1);ee<z.length;ee++)(Z=z[ee]).start.row>=H&&Z.shiftRow(Y)}else{var Z,Y=Math.abs(u.start.column-u.end.column);$==="remove"&&(Q=this.getFoldsInRange(u),this.removeFolds(Q),Y=-Y),(Z=this.getFoldLine(H))&&Z.addRemoveChars(H,y.column,Y)}return v&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,v?this.$updateWrapData(H,G):this.$updateRowLengthCache(H,G),Q},r.prototype.$updateRowLengthCache=function(u,v,$){this.$rowLengthCache[u]=null,this.$rowLengthCache[v]=null},r.prototype.$updateWrapData=function(u,v){var $,y,L=this.doc.getAllLines(),H=this.getTabSize(),G=this.$wrapData,Y=this.$wrapLimit,Q=u;for(v=Math.min(v,L.length-1);Q<=v;)(y=this.getFoldLine(Q,y))?($=[],y.walk(function(z,ee,T,P){var Z;if(z!=null){(Z=this.$getDisplayTokens(z,$.length))[0]=g;for(var b=1;b<Z.length;b++)Z[b]=A}else Z=this.$getDisplayTokens(L[ee].substring(P,T),$.length);$=$.concat(Z)}.bind(this),y.end.row,L[y.end.row].length+1),G[y.start.row]=this.$computeWrapSplits($,Y,H),Q=y.end.row+1):($=this.$getDisplayTokens(L[Q]),G[Q]=this.$computeWrapSplits($,Y,H),Q++)},r.prototype.$computeWrapSplits=function(u,v,$){if(u.length==0)return[];var y=[],L=u.length,H=0,G=0,Y=this.$wrapAsCode,Q=this.$indentedSoftWrap,z=v<=Math.max(2*$,8)||Q===!1?0:Math.floor(v/2);function ee(b){for(var k=b-H,R=H;R<b;R++){var D=u[R];D!==12&&D!==2||--k}y.length||(T=function(){var J=0;if(z===0)return J;if(Q)for(var ne=0;ne<u.length;ne++){var me=u[ne];if(me==E)J+=1;else if(me==W)J+=$;else if(me!=B)break}return Y&&Q!==!1&&(J+=$),Math.min(J,z)}(),y.indent=T),G+=k,y.push(G),H=b}for(var T=0;v-T<L-H;){var P=H+v-T;if(u[P-1]>=E&&u[P]>=E)ee(P);else if(u[P]==g||u[P]==A){for(;P!=H-1&&u[P]!=g;P--);if(!(H<P)){for(P=H+v;P<u.length&&u[P]==A;P++);if(P==u.length)break}ee(P)}else{for(var Z=Math.max(P-(v-(v>>2)),H-1);Z<P&&u[P]<g;)P--;if(Y){for(;Z<P&&u[P]<g;)P--;for(;Z<P&&u[P]==x;)P--}else for(;Z<P&&u[P]<E;)P--;Z<P?ee(++P):(u[P=H+v]==p&&P--,ee(P-T))}}return y},r.prototype.$getDisplayTokens=function(u,v){var $,y=[];v=v||0;for(var L=0;L<u.length;L++){var H=u.charCodeAt(L);if(H==9){$=this.getScreenTabSize(y.length+v),y.push(W);for(var G=1;G<$;G++)y.push(B)}else H==32?y.push(E):39<H&&H<48||57<H&&H<64?y.push(x):4352<=H&&V(H)?y.push(d,p):y.push(d)}return y},r.prototype.$getStringScreenWidth=function(u,v,$){if(v==0)return[0,0];var y,L;for(v==null&&(v=1/0),$=$||0,L=0;L<u.length&&((y=u.charCodeAt(L))==9?$+=this.getScreenTabSize($):4352<=y&&V(y)?$+=2:$+=1,!(v<$));L++);return[$,L]},r.prototype.getRowLength=function(u){var v=1;return this.lineWidgets&&(v+=this.lineWidgets[u]&&this.lineWidgets[u].rowCount||0),this.$useWrapMode&&this.$wrapData[u]?this.$wrapData[u].length+v:v},r.prototype.getRowLineCount=function(u){return this.$useWrapMode&&this.$wrapData[u]?this.$wrapData[u].length+1:1},r.prototype.getRowWrapIndent=function(u){var v;return this.$useWrapMode&&(u=this.screenToDocumentPosition(u,Number.MAX_VALUE),(v=this.$wrapData[u.row]).length)&&v[0]<u.column?v.indent:0},r.prototype.getScreenLastRowColumn=function(u){return u=this.screenToDocumentPosition(u,Number.MAX_VALUE),this.documentToScreenColumn(u.row,u.column)},r.prototype.getDocumentLastRowColumn=function(u,v){return u=this.documentToScreenRow(u,v),this.getScreenLastRowColumn(u)},r.prototype.getDocumentLastRowColumnPosition=function(u,v){return u=this.documentToScreenRow(u,v),this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},r.prototype.getRowSplitData=function(u){if(this.$useWrapMode)return this.$wrapData[u]},r.prototype.getScreenTabSize=function(u){return this.$tabSize-(u%this.$tabSize|0)},r.prototype.screenToDocumentRow=function(u,v){return this.screenToDocumentPosition(u,v).row},r.prototype.screenToDocumentColumn=function(u,v){return this.screenToDocumentPosition(u,v).column},r.prototype.screenToDocumentPosition=function(u,v,$){if(u<0)return{row:0,column:0};for(var y,L,H,G=0,Y=0,Q=0,z=0,ee=this.$screenRowCache,T=this.$getRowCacheIndex(ee,u),P=ee.length,Z=(H=P&&0<=T?(Q=ee[T],G=this.$docRowCache[T],u>ee[P-1]):!P,this.getLength()-1),b=this.getNextFoldLine(G),k=b?b.start.row:1/0;Q<=u&&!(u<Q+(z=this.getRowLength(G))||Z<=G);)Q+=z,k<++G&&(G=b.end.row+1,k=(b=this.getNextFoldLine(G,b))?b.start.row:1/0),H&&(this.$docRowCache.push(G),this.$screenRowCache.push(Q));if(b&&b.start.row<=G)y=this.getFoldDisplayLine(b),G=b.start.row;else{if(Q+z<=u||Z<G)return{row:Z,column:this.getLine(Z).length};y=this.getLine(G),b=null}return T=0,ee=Math.floor(u-Q),this.$useWrapMode&&(P=this.$wrapData[G])&&(L=P[ee],0<ee)&&P.length&&(T=P.indent,Y=P[ee-1]||P[P.length-1],y=y.substring(Y)),$!==void 0&&this.$bidiHandler.isBidiRow(Q+ee,G,ee)&&(v=this.$bidiHandler.offsetToCol($)),Y+=this.$getStringScreenWidth(y,v-T)[1],this.$useWrapMode&&L<=Y&&(Y=L-1),b?b.idxToPosition(Y):{row:G,column:Y}},r.prototype.documentToScreenPosition=function(u,v){var T=v===void 0?this.$clipPositionToDocument(u.row,u.column):this.$clipPositionToDocument(u,v),$=(u=T.row,v=T.column,0),T=null;(G=this.getFoldAt(u,v,1))&&(u=G.start.row,v=G.start.column);for(var y,L,H=0,G=this.$docRowCache,P=this.$getRowCacheIndex(G,u),Y=G.length,Q=(L=Y&&0<=P?(H=G[P],$=this.$screenRowCache[P],u>G[Y-1]):!Y,this.getNextFoldLine(H)),z=Q?Q.start.row:1/0;H<u;){if(z<=H){if(u<(y=Q.end.row+1))break;z=(Q=this.getNextFoldLine(y,Q))?Q.start.row:1/0}else y=H+1;$+=this.getRowLength(H),H=y,L&&(this.$docRowCache.push(H),this.$screenRowCache.push($))}var ee="",T=Q&&z<=H?(ee=this.getFoldDisplayLine(Q,u,v),Q.start.row):(ee=this.getLine(u).substring(0,v),u),P=0;if(this.$useWrapMode){var Z=this.$wrapData[T];if(Z){for(var b=0;ee.length>=Z[b];)$++,b++;ee=ee.substring(Z[b-1]||0,ee.length),P=0<b?Z.indent:0}}return this.lineWidgets&&this.lineWidgets[H]&&this.lineWidgets[H].rowsAbove&&($+=this.lineWidgets[H].rowsAbove),{row:$,column:P+this.$getStringScreenWidth(ee)[0]}},r.prototype.documentToScreenColumn=function(u,v){return this.documentToScreenPosition(u,v).column},r.prototype.documentToScreenRow=function(u,v){return this.documentToScreenPosition(u,v).row},r.prototype.getScreenLength=function(){var u=0,v=null;if(this.$useWrapMode)for(var $=this.$wrapData.length,y=0,L=0,H=(v=this.$foldData[L++])?v.start.row:1/0;y<$;){var G=this.$wrapData[y];u+=G?G.length+1:1,H<++y&&(y=v.end.row+1,H=(v=this.$foldData[L++])?v.start.row:1/0)}else for(var u=this.getLength(),Y=this.$foldData,L=0;L<Y.length;L++)u-=(v=Y[L]).end.row-v.start.row;return this.lineWidgets&&(u+=this.$getWidgetScreenLength()),u},r.prototype.$setFontMetrics=function(u){this.$enableVarChar&&(this.$getStringScreenWidth=function(v,$,y){if($===0)return[0,0];var L,H;for($=$||1/0,y=y||0,H=0;H<v.length&&!($<(y+=(L=v.charAt(H))===" "?this.getScreenTabSize(y):u.getCharacterWidth(L)));H++);return[y,H]})},r.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},r);function r(u,v){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++r.$uid,this.$foldData.toString=function(){return this.join(`
|
|
`)},this.bgTokenizer=new a(new s().getTokenizer(),this);var $=this;this.bgTokenizer.on("update",function(y){$._signal("tokenizerUpdate",y)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),typeof u=="object"&&u.getLine||(u=new o(u)),this.setDocument(u),this.selection=new n(this),this.$bidiHandler=new h(this),l.resetOptions(this),this.setMode(v),l._signal("session",this),this.destroyed=!1}t.$uid=0,t.prototype.$modes=l.$modes,t.prototype.getValue=t.prototype.toString,t.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},t.prototype.$overwrite=!1,t.prototype.$mode=null,t.prototype.$modeId=null,t.prototype.$scrollTop=0,t.prototype.$scrollLeft=0,t.prototype.$wrapLimit=80,t.prototype.$useWrapMode=!1,t.prototype.$wrapLimitRange={min:null,max:null},t.prototype.lineWidgets=null,t.prototype.isFullWidth=V,I.implement(t.prototype,c);var d=1,p=2,g=3,A=4,x=9,E=10,W=11,B=12;function V(u){return!(u<4352)&&(4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12288<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510)}w("./edit_session/folding").Folding.call(t.prototype),w("./edit_session/bracket_match").BracketMatch.call(t.prototype),l.defineOptions(t.prototype,"session",{wrap:{set:function(u){u&&u!="off"?u=="free"?u=!0:u=="printMargin"?u=-1:typeof u=="string"&&(u=parseInt(u,10)||!1):u=!1,this.$wrap!=u&&((this.$wrap=u)?(this.setWrapLimitRange(u=typeof u=="number"?u:null,u),this.setUseWrapMode(!0)):this.setUseWrapMode(!1))},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(u){(u=u=="auto"?this.$mode.type!="text":u!="text")!=this.$wrapAsCode&&(this.$wrapAsCode=u,this.$useWrapMode)&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(u){this.$useWorker=u,this.$stopWorker(),u&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(u){0<(u=parseInt(u))&&this.$tabSize!==u&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=u,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(u){this.setFoldStyle(u)},handlesSet:!0},overwrite:{set:function(u){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(u){this.doc.setNewLineMode(u)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(u){this.setMode(u)},get:function(){return this.$modeId},handlesSet:!0}}),f.EditSession=t}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(w,f,_){var I=w("./lib/lang"),C=w("./lib/oop"),h=w("./range").Range;function l(){this.$options={}}l.prototype.set=function(c){return C.mixin(this.$options,c),this},l.prototype.getOptions=function(){return I.copyObject(this.$options)},l.prototype.setOptions=function(c){this.$options=c},l.prototype.find=function(i){var n,s=this.$options,i=this.$matchIterator(i,s);return!!i&&(n=null,i.forEach(function(o,a,e,t){return n=new h(o,a,e,t),!(a==t&&s.start&&s.start.start&&s.skipCurrent!=0&&n.isEqual(s.start)&&(n=null,1))}),n)},l.prototype.findAll=function(c){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var s=n.range,i=s?c.getLines(s.start.row,s.end.row):c.doc.getAllLines(),o=[],a=n.re;if(n.$isMultiLine){var e,t=a.length,r=i.length-t;e:for(var d=a.offset||0;d<=r;d++){for(var p=0;p<t;p++)if(i[d+p].search(a[p])==-1)continue e;var g=i[d],A=i[d+t-1],g=g.length-g.match(a[0])[0].length,A=A.match(a[t-1])[0].length;e&&e.end.row===d&&e.end.column>g||(o.push(e=new h(d,g,d+t-1,A)),2<t&&(d=d+t-2))}}else for(var x=0;x<i.length;x++)for(var E=I.getMatchOffsets(i[x],a),p=0;p<E.length;p++){var W=E[p];o.push(new h(x,W.offset,x,W.offset+W.length))}if(s){for(var B=s.start.column,V=s.end.column,x=0,p=o.length-1;x<p&&o[x].start.column<B&&o[x].start.row==0;)x++;for(var u=s.end.row-s.start.row;x<p&&o[p].end.column>V&&o[p].end.row==u;)p--;for(o=o.slice(x,p+1),x=0,p=o.length;x<p;x++)o[x].start.row+=s.start.row,o[x].end.row+=s.start.row}return o},l.prototype.replace=function(c,n){var s=this.$options,i=this.$assembleRegExp(s);if(s.$isMultiLine)return n;if(i){var o=i.exec(c);if(!o||o[0].length!=c.length)return null;if(n=c.replace(i,n),s.preserveCase){n=n.split("");for(var a=Math.min(c.length,c.length);a--;){var e=c[a];e&&e.toLowerCase()!=e?n[a]=n[a].toUpperCase():n[a]=n[a].toLowerCase()}n=n.join("")}return n}},l.prototype.$assembleRegExp=function(c,n){if(c.needle instanceof RegExp)return c.re=c.needle;var s,i,o,a,e=c.needle;if(!c.needle)return c.re=!1;c.$supportsUnicodeFlag===void 0&&(c.$supportsUnicodeFlag=I.supportsUnicodeFlag());try{new RegExp(e,"u")}catch{c.$supportsUnicodeFlag=!1}function t(p,g){return g===void 0&&(g=!0),(o&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(p)||i.regExp?o&&i.$supportsUnicodeFlag?g?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}c.regExp||(e=I.escapeRegExp(e)),c.wholeWord&&(s=e,i=c,o=I.supportsLookbehind(),a=Array.from(s),r=a[0],a=a[a.length-1],e=t(r)+s+t(a,!1));var r=c.caseSensitive?"gm":"gmi";if(c.$supportsUnicodeFlag&&(r+="u"),c.$isMultiLine=!n&&/[\n\r]/.test(e),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(e,r);try{var d=new RegExp(e,r)}catch{d=!1}return c.re=d},l.prototype.$assembleMultilineRegExp=function(c,n){for(var s=c.replace(/\r\n|\r|\n/g,`$
|
|
^`).split(`
|
|
`),i=[],o=0;o<s.length;o++)try{i.push(new RegExp(s[o],n))}catch{return!1}return i},l.prototype.$matchIterator=function(c,n){var s,i,o,a,e,t,r,d,p=this.$assembleRegExp(n);return!!p&&(s=n.backwards==1,i=n.skipCurrent!=0,o=n.range,(a=(a=n.start)||(o?o[s?"end":"start"]:c.selection.getRange())).start&&(a=a[i!=s?"end":"start"]),e=o?o.start.row:0,t=o?o.end.row:c.getLength()-1,d=n.$isMultiLine?(r=p.length,function(g,A,x){var E=s?g-r+1:g;if(!(E<0||E+r>c.getLength())){var W=c.getLine(E),g=W.search(p[0]);if(!(!s&&g<A||g===-1)){for(var B=1;B<r;B++)if((W=c.getLine(E+B)).search(p[B])==-1)return;var V=W.match(p[r-1])[0].length;if(!(s&&A<V))return!!x(E,g,E+r-1,V)||void 0}}}):s?function(g,A,x){var E,W=c.getLine(g),B=[];for(p.lastIndex=0;E=p.exec(W);){var V=E[0].length,u=E.index;if(!V){if(u>=W.length)break;p.lastIndex=u+=1}if(E.index+V>A)break;B.push(E.index,V)}for(var v=B.length-1;0<=v;v-=2){var $=B[v-1];if(x(g,$,g,$+(V=B[v])))return!0}}:function(g,A,x){var E=c.getLine(g);for(p.lastIndex=A;W=p.exec(E);){var W,B=W[0].length;if(x(g,W=W.index,g,W+B))return!0;if(!B&&(p.lastIndex=W+=1,W>=E.length))return!1}},{forEach:s?function(g){var A=a.row;if(!d(A,a.column,g)){for(A--;e<=A;A--)if(d(A,Number.MAX_VALUE,g))return;if(n.wrap!=0){for(A=t,e=a.row;e<=A;A--)if(d(A,Number.MAX_VALUE,g))return}}}:function(g){var A=a.row;if(!d(A,a.column,g)){for(A+=1;A<=t;A++)if(d(A,0,g))return;if(n.wrap!=0){for(A=e,t=a.row;A<=t;A++)if(d(A,0,g))return}}}})},f.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,f,_){var I,C=this&&this.__extends||(I=function(t,r){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(d,p){d.__proto__=p}:function(d,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(d[g]=p[g])}))(t,r)},function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function d(){this.constructor=t}I(t,r),t.prototype=r===null?Object.create(r):(d.prototype=r.prototype,new d)}),h=a("../lib/keys"),l=a("../lib/useragent"),c=h.KEY_MODS,n=(s.prototype.$init=function(t,r,d){this.platform=r||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=d},s.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),(this.commands[t.name]=t).bindKey&&this._buildKeyHash(t)},s.prototype.removeCommand=function(t,r){var d,p=t&&(typeof t=="string"?t:t.name),g=(t=this.commands[p],r||delete this.commands[p],this.commandKeyBinding);for(d in g){var A,x=g[d];x==t?delete g[d]:Array.isArray(x)&&(A=x.indexOf(t))!=-1&&(x.splice(A,1),x.length==1)&&(g[d]=x[0])}},s.prototype.bindKey=function(t,r,d){if(typeof t=="object"&&t&&(d==null&&(d=t.position),t=t[this.platform]),t)return typeof r=="function"?this.addCommand({exec:r,bindKey:t,name:r.name||t}):void t.split("|").forEach(function(x){var g="",A=(x.indexOf(" ")!=-1&&(x=(A=x.split(/\s+/)).pop(),A.forEach(function(E){E=this.parseKeys(E),E=c[E.hashId]+E.key,g+=(g?" ":"")+E,this._addCommandToBinding(g,"chainKeys")},this),g+=" "),this.parseKeys(x)),x=c[A.hashId]+A.key;this._addCommandToBinding(g+x,r,d)},this)},s.prototype._addCommandToBinding=function(t,r,d){var p=this.commandKeyBinding;if(r)if(!p[t]||this.$singleCommand)p[t]=r;else{Array.isArray(p[t])?(A=p[t].indexOf(r))!=-1&&p[t].splice(A,1):p[t]=[p[t]],typeof d!="number"&&(d=i(r));for(var g=p[t],A=0;A<g.length&&!(d<i(g[A]));A++);g.splice(A,0,r)}else delete p[t]},s.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(r){var d=t[r];if(d){if(typeof d=="string")return this.bindKey(d,r);typeof(d=typeof d=="function"?{exec:d}:d)=="object"&&(d.name||(d.name=r),this.addCommand(d))}},this)},s.prototype.removeCommands=function(t){Object.keys(t).forEach(function(r){this.removeCommand(t[r])},this)},s.prototype.bindKeys=function(t){Object.keys(t).forEach(function(r){this.bindKey(r,t[r])},this)},s.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},s.prototype.parseKeys=function(t){var r=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(E){return E}),d=r.pop(),p=h[d];if(h.FUNCTION_KEYS[p])d=h.FUNCTION_KEYS[p].toLowerCase();else{if(!r.length)return{key:d,hashId:-1};if(r.length==1&&r[0]=="shift")return{key:d.toUpperCase(),hashId:-1}}for(var g=0,A=r.length;A--;){var x=h.KEY_MODS[r[A]];if(x==null)return typeof console!="undefined"&&console.error("invalid modifier "+r[A]+" in "+t),!1;g|=x}return{key:d,hashId:g}},s.prototype.findKeyCommand=function(t,r){return t=c[t]+r,this.commandKeyBinding[t]},s.prototype.handleKeyboard=function(t,r,d,p){var g,A;if(!(p<0))return g=c[r]+d,A=this.commandKeyBinding[g],t.$keyChain&&(t.$keyChain+=" "+g,A=this.commandKeyBinding[t.$keyChain]||A),!A||A!="chainKeys"&&A[A.length-1]!="chainKeys"?(t.$keyChain&&(r&&r!=4||d.length!=1?(r==-1||0<p)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-g.length-1)),{command:A}):(t.$keyChain=t.$keyChain||g,{command:"null"})},s.prototype.getStatusText=function(t,r){return r.$keyChain||""},s);function s(t,r){this.$init(t,r,!1)}function i(t){return typeof t=="object"&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}C(e,o=n);var o,a=e;function e(t,r){return t=o.call(this,t,r)||this,t.$singleCommand=!0,t}a.call=function(t,r,d){n.prototype.$init.call(t,r,d,!0)},n.call=function(t,r,d){n.prototype.$init.call(t,r,d,!1)},f.HashHandler=a,f.MultiHashHandler=n}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(c,f,_){var I,C,n=this&&this.__extends||(I=function(i,o){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(a,e){a.__proto__=e}:function(a,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t])}))(i,o)},function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function a(){this.constructor=i}I(i,o),i.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}),h=c("../lib/oop"),l=c("../keyboard/hash_handler").MultiHashHandler,c=c("../lib/event_emitter").EventEmitter,n=(n(s,C=l),s.prototype.exec=function(i,o,a){if(Array.isArray(i)){for(var e=i.length;e--;)if(this.exec(i[e],o,a))return!0;return!1}var t;return!!(i=typeof i=="string"?this.commands[i]:i)&&!(o&&o.$readOnly&&!i.readOnly||this.$checkCommandState!=0&&i.isAvailable&&!i.isAvailable(o)||((t={editor:o,command:i,args:a}).returnValue=this._emit("exec",t),this._signal("afterExec",t),t.returnValue===!1))},s.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._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(o){this.macro.push([o.command,o.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},s.prototype.replay=function(i){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(o){typeof o=="string"?this.exec(o,i):this.exec(o[0],i,o[1])},this)}finally{this.$inReplay=!1}}},s.prototype.trimMacro=function(i){return i.map(function(o){return typeof o[0]!="string"&&(o[0]=o[0].name),o=o[1]?o:o[0]})},s);function s(i,o){return o=C.call(this,o,i)||this,o.byName=o.commands,o.setDefaultHandler("exec",function(a){return a.args?a.command.exec(a.editor,a.args,a.event,!1):a.command.exec(a.editor,{},a.event,!0)}),o}h.implement(n.prototype,c),f.CommandManager=n}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(w,f,_){var I=w("../lib/lang"),C=w("../config"),h=w("../range").Range;function l(n,s){return{win:n,mac:s}}f.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(n){C.loadModule("ace/ext/settings_menu",function(s){s.init(n),n.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(n){C.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(n,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(n){C.loadModule("ace/ext/error_marker",function(s){s.showErrorMarker(n,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(n){n.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(n){n.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(n,s){typeof s!="number"||isNaN(s)||n.gotoLine(s),n.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(n){n.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(n){n.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(n){n.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(n){n.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(n){n.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(n){n.session.foldAll(),n.session.unfold(n.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(n){n.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(n){n.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(n){n.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(n){n.selection.isEmpty()?n.selection.selectWord():n.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(n){C.loadModule("ace/ext/searchbox",function(s){s.Search(n)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(n){n.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(n){n.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(n){n.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(n){n.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(n,s){n.navigateUp(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(n){n.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(n){n.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(n){n.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(n,s){n.navigateDown(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(n){n.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(n){n.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(n){n.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(n){n.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(n,s){n.navigateLeft(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(n){n.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(n){n.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(n){n.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(n){n.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(n,s){n.navigateRight(s.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(n){n.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(n){n.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(n){n.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(n){n.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(n){n.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(n){n.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(n){n.renderer.scrollBy(0,-2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(n){n.renderer.scrollBy(0,2*n.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(n){n.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(n){n.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(n){n.commands.toggleRecording(n)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(n){n.commands.replay(n)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(n){n.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(n){n.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(n){n.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(n){},readOnly:!0},{name:"cut",description:"Cut",exec:function(n){var s=n.$copyWithEmptySelection&&n.selection.isEmpty()?n.selection.getLineRange():n.selection.getRange();n._emit("cut",s),s.isEmpty()||n.session.remove(s),n.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(n,s){n.$handlePaste(s)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(n){n.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(n){n.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(n){n.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(n){n.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(n){n.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(n){n.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(n){n.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(n){C.loadModule("ace/ext/searchbox",function(s){s.Search(n,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(n){n.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(n){n.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(n){n.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(n){n.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(n){n.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(n){n.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(n){n.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(n){n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(n){if(!n.selection.isEmpty())return!1;n.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(n){n.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(n){n.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(n){var s=n.selection.getRange();s.start.column=0,n.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(n){var s=n.selection.getRange();s.end.column=Number.MAX_VALUE,n.session.remove(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(n){n.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(n){n.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(n){n.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(n){n.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(n){n.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(n){n.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(n,s){n.insert(s)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(n,s){n.insert(I.stringRepeat(s.text||"",s.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(n){n.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(n){n.transposeLetters()},multiSelectAction:function(n){n.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(n){n.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(n){n.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(n){n.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(n){var s=n.selection.getRange();s.start.column=s.end.column=0,s.end.row++,n.selection.setRange(s,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(n){n.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(n){for(var o=n.selection.isBackwards(),s=o?n.selection.getSelectionLead():n.selection.getSelectionAnchor(),i=o?n.selection.getSelectionAnchor():n.selection.getSelectionLead(),o=n.session.doc.getLine(s.row).length,a=n.session.doc.getTextRange(n.selection.getRange()).replace(/\n\s*/," ").length,e=n.session.doc.getLine(s.row),t=s.row+1;t<=i.row+1;t++){var r=I.stringTrimLeft(I.stringTrimRight(n.session.doc.getLine(t)));e+=r=r.length!==0?" "+r:r}i.row+1<n.session.doc.getLength()-1&&(e+=n.session.doc.getNewLineCharacter()),n.clearSelection(),n.session.doc.replace(new h(s.row,0,i.row+2,0),e),0<a?(n.selection.moveCursorTo(s.row,s.column),n.selection.selectTo(s.row,s.column+a)):(o=n.session.doc.getLine(s.row).length>o?o+1:o,n.selection.moveCursorTo(s.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(n){var s=n.session.doc.getLength()-1,i=n.session.doc.getLine(s).length,o=n.selection.rangeList.ranges,a=[];o.length<1&&(o=[n.selection.getRange()]);for(var e=0;e<o.length;e++)e!=o.length-1||o[e].end.row===s&&o[e].end.column===i||a.push(new h(o[e].end.row,o[e].end.column,s,i)),e===0?o[e].start.row===0&&o[e].start.column===0||a.push(new h(0,0,o[e].start.row,o[e].start.column)):a.push(new h(o[e-1].end.row,o[e-1].end.column,o[e].start.row,o[e].start.column));for(n.exitMultiSelectMode(),n.clearSelection(),e=0;e<a.length;e++)n.selection.addRange(a[e],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(n){n.selection.clearSelection(),n.navigateLineEnd(),n.insert(`
|
|
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(n){n.selection.clearSelection();var s=n.getCursorPosition();n.selection.moveTo(s.row-1,Number.MAX_VALUE),n.insert(`
|
|
`),s.row===0&&n.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:l("F1","F1"),exec:function(n){n.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:l(null,null),exec:function(n){n.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)f.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(n){n.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(w,f,_){var I=w("./lib/dom");function C(h){this.session=h,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}C.prototype.getRowLength=function(h){var l=this.lineWidgets&&this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0;return this.$useWrapMode&&this.$wrapData[h]?this.$wrapData[h].length+1+l:1+l},C.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(h+=l.rowCount)}),h},C.prototype.$onChangeEditor=function(h){this.attach(h.editor)},C.prototype.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h)&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets))},C.prototype.detach=function(h){var l=this.editor;l&&(this.editor=null,l.widgetManager=null,l.renderer.off("beforeRender",this.measureWidgets),l.renderer.off("afterRender",this.renderWidgets),l=this.session.lineWidgets)&&l.forEach(function(c){c&&c.el&&c.el.parentNode&&(c._inDocument=!1,c.el.parentNode.removeChild(c.el))})},C.prototype.updateOnFold=function(h,l){var c=l.lineWidgets;if(c&&h.action){for(var l=h.data,n=l.start.row,s=l.end.row,i=h.action=="add",o=n+1;o<s;o++)c[o]&&(c[o].hidden=i);c[s]&&(i?c[n]?c[s].hidden=i:c[n]=c[s]:(c[n]==c[s]&&(c[n]=void 0),c[s].hidden=i))}},C.prototype.updateOnChange=function(h){var l,c,n,s=this.session.lineWidgets;s&&(l=h.start.row,(c=h.end.row-l)!=0)&&(h.action=="remove"?(n=s.splice(l+1,c),!s[l]&&n[n.length-1]&&(s[l]=n.pop()),n.forEach(function(i){i&&this.removeLineWidget(i)},this)):(n=new Array(c),s[l]&&s[l].column!=null&&h.start.column>s[l].column&&l++,n.unshift(l,0),s.splice.apply(s,n)),this.$updateRows())},C.prototype.$updateRows=function(){var h,l=this.session.lineWidgets;l&&(h=!0,l.forEach(function(c,n){if(c)for(h=!1,c.row=n;c.$oldWidget;)c.$oldWidget.row=n,c=c.$oldWidget}),h)&&(this.session.lineWidgets=null)},C.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[h.row];return l&&(h.$oldWidget=l).el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1),this.session.lineWidgets[h.row]=h},C.prototype.addLineWidget=function(h){var l,c,n;return this.$registerLineWidget(h),h.session=this.session,this.editor&&(l=this.editor.renderer,h.html&&!h.el&&(h.el=I.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=I.createElement("div"),h.el.textContent=h.text),h.el&&(I.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&I.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex=5,l.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex=3),h.pixelHeight==null)&&(h.pixelHeight=h.el.offsetHeight),h.rowCount==null&&(h.rowCount=h.pixelHeight/l.layerConfig.lineHeight),c=this.session.getFoldAt(h.row,0),(h.$fold=c)&&(n=this.session.lineWidgets,h.row!=c.end.row||n[c.start.row]?h.hidden=!0:n[c.start.row]=h),this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(h)),h},C.prototype.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[h.row];if(l==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;l;){if(l.$oldWidget==h){l.$oldWidget=h.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},C.prototype.getWidgetsAtRow=function(h){for(var l=this.session.lineWidgets,c=l&&l[h],n=[];c;)n.push(c),c=c.$oldWidget;return n},C.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},C.prototype.measureWidgets=function(h,l){var c=this.session._changedWidgets,n=l.layerConfig;if(c&&c.length){for(var s=1/0,i=0;i<c.length;i++){var o=c[i];if(o&&o.el&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,l.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/n.characterWidth));var a=o.h/n.lineHeight;o.coverLine&&(a-=this.session.getRowLineCount(o.row))<0&&(a=0),o.rowCount!=a&&(o.rowCount=a,o.row<s)&&(s=o.row)}}s!=1/0&&(this.session._emit("changeFold",{data:{start:{row:s}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},C.prototype.renderWidgets=function(h,l){var c=l.layerConfig,n=this.session.lineWidgets;if(n){for(var s=Math.min(this.firstRow,c.firstRow),i=Math.max(this.lastRow,c.lastRow,n.length);0<s&&!n[s];)s--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,l.$cursorLayer.config=c;for(var o=s;o<=i;o++){var a,e=n[o];e&&e.el&&(e.hidden?e.el.style.top=-100-(e.pixelHeight||0)+"px":(e._inDocument||(e._inDocument=!0,l.container.appendChild(e.el)),a=l.$cursorLayer.getPixelPosition({row:o,column:0},!0).top,e.coverLine||(a+=c.lineHeight*this.session.getRowLineCount(e.row)),e.el.style.top=a-c.offset+"px",a=e.coverGutter?0:l.gutterWidth,e.fixedWidth||(a-=l.scrollLeft),e.el.style.left=a+"px",e.fullWidth&&e.screenWidth&&(e.el.style.minWidth=c.width+2*c.padding+"px"),e.fixedWidth?e.el.style.right=l.scrollBar.getWidth()+"px":e.el.style.right=""))}}},f.LineWidgets=C}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(w,f,_){var I=w("../lib/keys"),C=w("../mouse/default_gutter_handler").GutterTooltip;function h(n){this.editor=n,this.gutterLayer=n.renderer.$gutterLayer,this.element=n.renderer.$gutter,this.lines=n.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new C(this.editor)}h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(n){var s;this.annotationTooltip.isOpen?(n.preventDefault(),n.keyCode===I.escape&&this.annotationTooltip.hideTooltip()):n.target===this.element?n.keyCode==I.enter&&(n.preventDefault(),s=this.editor.getCursorPosition().row,this.editor.isRowVisible(s)||this.editor.scrollToLine(s,!0,!0),setTimeout(function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),o=this.$findNearestFoldWidget(i),a=this.$findNearestAnnotation(i);o===null&&a===null||(o===null&&a!==null||(o===null||a!==null)&&Math.abs(a-i)<Math.abs(o-i)?(this.activeRowIndex=a,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=o,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex)))}.bind(this),10)):(this.$handleGutterKeyboardInteraction(n),setTimeout(function(){this.editor._signal("gutterkeydown",new l(n,this))}.bind(this),10))},h.prototype.$handleGutterKeyboardInteraction=function(n){if(n.keyCode===I.tab)n.preventDefault();else if(n.keyCode===I.escape)n.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;else if(n.keyCode===I.up)switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}else if(n.keyCode===I.down)switch(n.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else if(n.keyCode===I.left)n.preventDefault(),this.$switchLane("annotation");else if(n.keyCode===I.right)n.preventDefault(),this.$switchLane("fold");else if(n.keyCode===I.enter||n.keyCode===I.space)switch(n.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var s=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),n),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==s&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(s),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=i.right+"px",o.top=i.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},h.prototype.$isFoldWidgetVisible=function(i){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),i=this.$getFoldWidget(i).style.display!=="none";return s&&i},h.prototype.$isAnnotationVisible=function(i){var s=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),i=this.$getAnnotation(i).style.display!=="none";return s&&i},h.prototype.$getFoldWidget=function(n){return this.lines.get(n).element.childNodes[1]},h.prototype.$getAnnotation=function(n){return this.lines.get(n).element.childNodes[2]},h.prototype.$findNearestFoldWidget=function(n){if(this.$isFoldWidgetVisible(n))return n;for(var s=0;0<n-s||n+s<this.lines.getLength()-1;){if(0<=n-++s&&this.$isFoldWidgetVisible(n-s))return n-s;if(n+s<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(n+s))return n+s}return null},h.prototype.$findNearestAnnotation=function(n){if(this.$isAnnotationVisible(n))return n;for(var s=0;0<n-s||n+s<this.lines.getLength()-1;){if(0<=n-++s&&this.$isAnnotationVisible(n-s))return n-s;if(n+s<=this.lines.getLength()-1&&this.$isAnnotationVisible(n+s))return n+s}return null},h.prototype.$focusFoldWidget=function(n){n!=null&&((n=this.$getFoldWidget(n)).classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())},h.prototype.$focusAnnotation=function(n){n!=null&&((n=this.$getAnnotation(n)).classList.add(this.editor.renderer.keyboardFocusClassName),n.focus())},h.prototype.$blurFoldWidget=function(n){n=this.$getFoldWidget(n),n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},h.prototype.$blurAnnotation=function(n){n=this.$getAnnotation(n),n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var n=this.activeRowIndex;0<n;)if(this.$isFoldWidgetVisible(--n))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,void this.$focusFoldWidget(this.activeRowIndex)},h.prototype.$moveFoldWidgetDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(this.$isFoldWidgetVisible(++n))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,void this.$focusFoldWidget(this.activeRowIndex)},h.prototype.$moveAnnotationUp=function(){for(var n=this.activeRowIndex;0<n;)if(this.$isAnnotationVisible(--n))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,void this.$focusAnnotation(this.activeRowIndex)},h.prototype.$moveAnnotationDown=function(){for(var n=this.activeRowIndex;n<this.lines.getLength()-1;)if(this.$isAnnotationVisible(++n))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,void this.$focusAnnotation(this.activeRowIndex)},h.prototype.$switchLane=function(n){switch(n){case"annotation":this.activeLane!=="annotation"&&(s=this.$findNearestAnnotation(this.activeRowIndex))!=null&&(this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex));break;case"fold":var s;this.activeLane!=="fold"&&(s=this.$findNearestFoldWidget(this.activeRowIndex))!=null&&(this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex))}},h.prototype.$rowIndexToRow=function(n){return n=this.lines.get(n),n?n.row:null},h.prototype.$rowToRowIndex=function(n){for(var s=0;s<this.lines.getLength();s++)if(this.lines.get(s).row==n)return s;return null},f.GutterKeyboardHandler=h,c.prototype.getKey=function(){return I.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"};var l=c;function c(n,s){this.gutterKeyboardHandler=s,this.domEvent=n}f.GutterKeyboardEvent=l}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(u,f,_){var I=this&&this.__values||function(y){var L=typeof Symbol=="function"&&Symbol.iterator,H=L&&y[L],G=0;if(H)return H.call(y);if(y&&typeof y.length=="number")return{next:function(){return{value:(y=y&&G>=y.length?void 0:y)&&y[G++],done:!y}}};throw new TypeError(L?"Object is not iterable.":"Symbol.iterator is not defined.")},C=u("./lib/oop"),h=u("./lib/dom"),l=u("./lib/lang"),c=u("./lib/useragent"),n=u("./keyboard/textinput").TextInput,s=u("./mouse/mouse_handler").MouseHandler,i=u("./mouse/fold_handler").FoldHandler,o=u("./keyboard/keybinding").KeyBinding,a=u("./edit_session").EditSession,e=u("./search").Search,t=u("./range").Range,r=u("./lib/event_emitter").EventEmitter,d=u("./commands/command_manager").CommandManager,p=u("./commands/default_commands").commands,g=u("./config"),A=u("./token_iterator").TokenIterator,x=u("./line_widgets").LineWidgets,E=u("./keyboard/gutter_handler").GutterKeyboardHandler,W=u("./config").nls,B=u("./clipboard"),V=u("./lib/keys"),u=(v.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=l.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)},v.prototype.startOperation=function(y){if(this.curOp){if(!y||this.curOp.command)return;this.prevOp=this.curOp}y||(this.previousCommand=null,y={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:y.command||{},args:y.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},v.prototype.endOperation=function(y){if(this.curOp&&this.session){if(y&&y.returnValue===!1||!this.session)return this.curOp=null;if((y!=1||!this.curOp.command||this.curOp.command.name!="mouse")&&(this._signal("beforeEndOperation"),this.curOp)){var y=this.curOp.command,L=y&&y.scrollIntoView;if(L){switch(L){case"center-animate":L="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var H=this.selection.getRange(),G=this.renderer.layerConfig;(H.start.row>=G.lastRow||H.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}L=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}y=this.selection.toJSON(),this.curOp.selectionAfter=y,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(y),this.prevOp=this.curOp,this.curOp=null}}},v.prototype.$historyTracker=function(y){var L,H,G,Y;this.$mergeUndoDeltas&&(L=this.prevOp,H=this.$mergeableCommands,G=L.command&&y.command.name==L.command.name,y.command.name=="insertstring"?(Y=y.args,this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),G=G&&this.mergeNextCommand&&(!/\s/.test(Y)||/\s/.test(L.args)),this.mergeNextCommand=!0):G=G&&H.indexOf(y.command.name)!==-1,(G=this.$mergeUndoDeltas!="always"&&2e3<Date.now()-this.sequenceStartTime?!1:G)?this.session.mergeUndoDeltas=!0:H.indexOf(y.command.name)!==-1&&(this.sequenceStartTime=Date.now()))},v.prototype.setKeyboardHandler=function(y,L){var H;y&&typeof y=="string"&&y!="ace"?(this.$keybindingId=y,H=this,g.loadModule(["keybinding",y],function(G){H.$keybindingId==y&&H.keyBinding.setKeyboardHandler(G&&G.handler),L&&L()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(y),L&&L())},v.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},v.prototype.setSession=function(y){var L,H;this.session!=y&&(this.curOp&&this.endOperation(),this.curOp={},(L=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),(H=this.session.getSelection()).off("changeCursor",this.$onCursorChange),H.off("changeSelection",this.$onSelectionChange)),(this.session=y)?(this.$onDocumentChange=this.onDocumentChange.bind(this),y.on("change",this.$onDocumentChange),this.renderer.setSession(y),this.$onChangeMode=this.onChangeMode.bind(this),y.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),y.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),y.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),y.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),y.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),y.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=y.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(y)),this._signal("changeSession",{session:y,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),y&&y._signal("changeEditor",{editor:this}),y)&&!y.destroyed&&y.bgTokenizer.scheduleStart()},v.prototype.getSession=function(){return this.session},v.prototype.setValue=function(y,L){return this.session.doc.setValue(y),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),y},v.prototype.getValue=function(){return this.session.getValue()},v.prototype.getSelection=function(){return this.selection},v.prototype.resize=function(y){this.renderer.onResize(y)},v.prototype.setTheme=function(y,L){this.renderer.setTheme(y,L)},v.prototype.getTheme=function(){return this.renderer.getTheme()},v.prototype.setStyle=function(y){this.renderer.setStyle(y)},v.prototype.unsetStyle=function(y){this.renderer.unsetStyle(y)},v.prototype.getFontSize=function(){return this.getOption("fontSize")||h.computedStyle(this.container).fontSize},v.prototype.setFontSize=function(y){this.setOption("fontSize",y)},v.prototype.$highlightBrackets=function(){var y;this.$highlightPending||((y=this).$highlightPending=!0,setTimeout(function(){y.$highlightPending=!1;var L,H,G,Y,Q=y.session;Q&&!Q.destroyed&&(Q.$bracketHighlight&&(Q.$bracketHighlight.markerIds.forEach(function(z){Q.removeMarker(z)}),Q.$bracketHighlight=null),L=y.getCursorPosition(),H=(H=y.getKeyboardHandler())&&H.$getDirectionForHighlight&&H.$getDirectionForHighlight(y),(H=Q.getMatchingBracketRanges(L,H))||(G=new A(Q,L.row,L.column).getCurrentToken())&&/\b(?:tag-open|tag-name)/.test(G.type)&&(G=Q.getMatchingTags(L))&&(H=[G.openTagName,G.closeTagName]),(H=!H&&Q.$mode.getMatching?Q.$mode.getMatching(y.session):H)&&(Y="ace_bracket",Array.isArray(H)?H.length==1&&(Y="ace_error_bracket"):H=[H],H.length==2&&(t.comparePoints(H[0].end,H[1].start)==0?H=[t.fromPoints(H[0].start,H[1].end)]:t.comparePoints(H[0].start,H[1].end)==0&&(H=[t.fromPoints(H[1].start,H[0].end)])),Q.$bracketHighlight={ranges:H,markerIds:H.map(function(z){return Q.addMarker(z,Y,"text")})}),y.getHighlightIndentGuides())&&y.renderer.$textLayer.$highlightIndentGuide()},50))},v.prototype.focus=function(){this.textInput.focus()},v.prototype.isFocused=function(){return this.textInput.isFocused()},v.prototype.blur=function(){this.textInput.blur()},v.prototype.onFocus=function(y){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",y))},v.prototype.onBlur=function(y){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",y))},v.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},v.prototype.onDocumentChange=function(y){var L=this.session.$useWrapMode,H=y.start.row==y.end.row?y.end.row:1/0;this.renderer.updateLines(y.start.row,H,L),this._signal("change",y),this.$cursorChange()},v.prototype.onTokenizerUpdate=function(y){y=y.data,this.renderer.updateLines(y.first,y.last)},v.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},v.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},v.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},v.prototype.$updateHighlightActiveLine=function(){var y,L,H=this.getSession();this.$highlightActiveLine&&(this.$selectionStyle=="line"&&this.selection.isMultiLine()||(y=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(y=!1),!this.renderer.$maxLines||this.session.getLength()!==1||1<this.renderer.$minLines||(y=!1)),H.$highlightLineMarker&&!y?(H.removeMarker(H.$highlightLineMarker.id),H.$highlightLineMarker=null):!H.$highlightLineMarker&&y?((L=new t(y.row,y.column,y.row,1/0)).id=H.addMarker(L,"ace_active-line","screenLine"),H.$highlightLineMarker=L):y&&(H.$highlightLineMarker.start.row=y.row,H.$highlightLineMarker.end.row=y.row,H.$highlightLineMarker.start.column=y.column,H._signal("changeBackMarker"))},v.prototype.onSelectionChange=function(y){var L,H,G=this.session,G=(G.$selectionMarker&&G.removeMarker(G.$selectionMarker),G.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(L=this.selection.getRange(),H=this.getSelectionStyle(),G.$selectionMarker=G.addMarker(L,"ace_selection",H)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(G),this._signal("changeSelection")},v.prototype.$getSelectionHighLightRegexp=function(){var y=this.session,L=this.getSelectionRange();if(!L.isEmpty()&&!L.isMultiLine()){var H=L.start.column,G=L.end.column,y=y.getLine(L.start.row),L=y.substring(H,G);if(!(5e3<L.length)&&/[\w\d]/.test(L)&&(L=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:L}),y=y.substring(H-1,G+1),L.test(y)))return L}},v.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},v.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},v.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},v.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},v.prototype.onChangeMode=function(y){this.renderer.updateText(),this._emit("changeMode",y)},v.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},v.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},v.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},v.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},v.prototype.getCopyText=function(){var y=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),H=!1;if(!y&&this.$copyWithEmptySelection)for(var H=!0,G=this.selection.getAllRanges(),Y=0;Y<G.length;Y++){var Q=G[Y];Y&&G[Y-1].start.row==Q.start.row||(y+=this.session.getLine(Q.start.row)+L)}var z={text:y};return this._signal("copy",z),B.lineMode=!!H&&z.text,z.text},v.prototype.onCopy=function(){this.commands.exec("copy",this)},v.prototype.onCut=function(){this.commands.exec("cut",this)},v.prototype.onPaste=function(y,L){this.commands.exec("paste",this,{text:y,event:L})},v.prototype.$handlePaste=function(H){this._signal("paste",H=typeof H=="string"?{text:H}:H);var L=H.text,H=L===B.lineMode,G=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)H?G.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(H)this.selection.rangeList.ranges.forEach(function(T){G.insert({row:T.start.row,column:0},L)});else{var Y=L.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,H=!(Y.length!=2||Y[0]&&Y[1]);if(Y.length!=Q.length||H)return this.commands.exec("insertstring",this,L);for(var z=Q.length;z--;){var ee=Q[z];ee.isEmpty()||G.remove(ee),G.insert(ee.start,Y[z])}}},v.prototype.execCommand=function(y,L){return this.commands.exec(y,this,L)},v.prototype.insert=function(y,ee){var H,G=this.session,Y=G.getMode(),Q=this.getCursorPosition(),z=(this.getBehavioursEnabled()&&!ee&&(H=Y.transformAction(G.getState(Q.row),"insertion",this,G,y))&&(y===H.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),y=H.text),y==" "&&(y=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&y.indexOf(`
|
|
`)==-1&&((z=new t.fromPoints(Q,Q)).end.column+=y.length,this.session.remove(z)):(z=this.getSelectionRange(),Q=this.session.remove(z),this.clearSelection()),y!=`
|
|
`&&y!=`\r
|
|
`||(T=G.getLine(Q.row),Q.column>T.search(/\S|$/)&&(ee=T.substr(Q.column).search(/\S|$/),G.doc.removeInLine(Q.row,Q.column,Q.column+ee))),this.clearSelection(),Q.column),ee=G.getState(Q.row),T=G.getLine(Q.row),P=Y.checkOutdent(ee,T,y);G.insert(Q,y),H&&H.selection&&(H.selection.length==2?this.selection.setSelectionRange(new t(Q.row,z+H.selection[0],Q.row,z+H.selection[1])):this.selection.setSelectionRange(new t(Q.row+H.selection[0],H.selection[1],Q.row+H.selection[2],H.selection[3]))),this.$enableAutoIndent&&(G.getDocument().isNewLine(y)&&(z=Y.getNextLineIndent(ee,T.slice(0,Q.column),G.getTabString()),G.insert({row:Q.row+1,column:0},z)),P)&&Y.autoOutdent(ee,G,Q.row)},v.prototype.autoIndent=function(){for(var y,L,H,G,Y,Q=this.session,z=Q.getMode(),ee=(H=this.selection.isEmpty()?(L=0,Q.doc.getLength()-1):(L=(y=this.getSelectionRange()).start.row,y.end.row),""),T="",P=Q.getTabString(),Z=L;Z<=H;Z++)0<Z&&(ee=Q.getState(Z-1),G=Q.getLine(Z-1),T=z.getNextLineIndent(ee,G,P)),G=Q.getLine(Z),T!==(Y=z.$getIndent(G))&&(0<Y.length&&(Y=new t(Z,0,Z,Y.length),Q.remove(Y)),0<T.length)&&Q.insert({row:Z,column:0},T),z.autoOutdent(ee,Q,Z)},v.prototype.onTextInput=function(y,L){if(!L)return this.keyBinding.onTextInput(y);this.startOperation({command:{name:"insertstring"}}),y=this.applyComposition.bind(this,y,L),this.selection.rangeCount?this.forEachSelection(y):y(),this.endOperation()},v.prototype.applyComposition=function(y,L){var H;(L.extendLeft||L.extendRight)&&((H=this.selection.getRange()).start.column-=L.extendLeft,H.end.column+=L.extendRight,H.start.column<0&&(H.start.row--,H.start.column+=this.session.getLine(H.start.row).length+1),this.selection.setRange(H),y||H.isEmpty()||this.remove()),!y&&this.selection.isEmpty()||this.insert(y,!0),(L.restoreStart||L.restoreEnd)&&((H=this.selection.getRange()).start.column-=L.restoreStart,H.end.column-=L.restoreEnd,this.selection.setRange(H))},v.prototype.onCommandKey=function(y,L,H){return this.keyBinding.onCommandKey(y,L,H)},v.prototype.setOverwrite=function(y){this.session.setOverwrite(y)},v.prototype.getOverwrite=function(){return this.session.getOverwrite()},v.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},v.prototype.setScrollSpeed=function(y){this.setOption("scrollSpeed",y)},v.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},v.prototype.setDragDelay=function(y){this.setOption("dragDelay",y)},v.prototype.getDragDelay=function(){return this.getOption("dragDelay")},v.prototype.setSelectionStyle=function(y){this.setOption("selectionStyle",y)},v.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},v.prototype.setHighlightActiveLine=function(y){this.setOption("highlightActiveLine",y)},v.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},v.prototype.setHighlightGutterLine=function(y){this.setOption("highlightGutterLine",y)},v.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},v.prototype.setHighlightSelectedWord=function(y){this.setOption("highlightSelectedWord",y)},v.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},v.prototype.setAnimatedScroll=function(y){this.renderer.setAnimatedScroll(y)},v.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},v.prototype.setShowInvisibles=function(y){this.renderer.setShowInvisibles(y)},v.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},v.prototype.setDisplayIndentGuides=function(y){this.renderer.setDisplayIndentGuides(y)},v.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},v.prototype.setHighlightIndentGuides=function(y){this.renderer.setHighlightIndentGuides(y)},v.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},v.prototype.setShowPrintMargin=function(y){this.renderer.setShowPrintMargin(y)},v.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},v.prototype.setPrintMarginColumn=function(y){this.renderer.setPrintMarginColumn(y)},v.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},v.prototype.setReadOnly=function(y){this.setOption("readOnly",y)},v.prototype.getReadOnly=function(){return this.getOption("readOnly")},v.prototype.setBehavioursEnabled=function(y){this.setOption("behavioursEnabled",y)},v.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},v.prototype.setWrapBehavioursEnabled=function(y){this.setOption("wrapBehavioursEnabled",y)},v.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},v.prototype.setShowFoldWidgets=function(y){this.setOption("showFoldWidgets",y)},v.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},v.prototype.setFadeFoldWidgets=function(y){this.setOption("fadeFoldWidgets",y)},v.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},v.prototype.remove=function(Y){this.selection.isEmpty()&&(Y=="left"?this.selection.selectLeft():this.selection.selectRight());var L,H,G,Y=this.getSelectionRange();this.getBehavioursEnabled()&&(H=(L=this.session).getState(Y.start.row),H=L.getMode().transformAction(H,"deletion",this,L,Y),Y.end.column===0&&(G=L.getTextRange(Y))[G.length-1]==`
|
|
`&&(G=L.getLine(Y.end.row),/^\s+$/.test(G))&&(Y.end.column=G.length),H)&&(Y=H),this.session.remove(Y),this.clearSelection()},v.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},v.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},v.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},v.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var y=this.getSelectionRange();y.start.column==y.end.column&&y.start.row==y.end.row&&(y.end.column=0,y.end.row++),this.session.remove(y),this.clearSelection()},v.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var y=this.getCursorPosition();this.insert(`
|
|
`),this.moveCursorToPosition(y)},v.prototype.setGhostText=function(y,L){this.session.widgetManager||(this.session.widgetManager=new x(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(y,L)},v.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},v.prototype.transposeLetters=function(){var y,L,H,G;this.selection.isEmpty()&&(L=(y=this.getCursorPosition()).column)!==0&&(G=L<(G=this.session.getLine(y.row)).length?(H=G.charAt(L)+G.charAt(L-1),new t(y.row,L-1,y.row,L+1)):(H=G.charAt(L-1)+G.charAt(L-2),new t(y.row,L-2,y.row,L)),this.session.replace(G,H),this.session.selection.moveToPosition(G.end))},v.prototype.toLowerCase=function(){var y=this.getSelectionRange(),L=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),H=this.session.getTextRange(L);this.session.replace(L,H.toLowerCase()),this.selection.setSelectionRange(y)},v.prototype.toUpperCase=function(){var y=this.getSelectionRange(),L=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),H=this.session.getTextRange(L);this.session.replace(L,H.toUpperCase()),this.selection.setSelectionRange(y)},v.prototype.indent=function(){var y=this.session,L=this.getSelectionRange();if(!(L.start.row<L.end.row)){if(L.start.column<L.end.column){var H,Q=y.getTextRange(L);if(!/^\s+$/.test(Q))return H=this.$getSelectedRows(),void y.indentRows(H.first,H.last," ")}var G=y.getLine(L.start.row),Q=L.start,Y=y.getTabSize(),Q=y.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var z=Y-Q%Y,ee=l.stringRepeat(" ",z);else{for(z=Q%Y;G[L.start.column-1]==" "&&z;)L.start.column--,z--;this.selection.setSelectionRange(L),ee=" "}return this.insert(ee)}H=this.$getSelectedRows(),y.indentRows(H.first,H.last," ")},v.prototype.blockIndent=function(){var y=this.$getSelectedRows();this.session.indentRows(y.first,y.last," ")},v.prototype.blockOutdent=function(){var y=this.session.getSelection();this.session.outdentRows(y.getRange())},v.prototype.sortLines=function(){for(var y=this.$getSelectedRows(),L=this.session,H=[],G=y.first;G<=y.last;G++)H.push(L.getLine(G));H.sort(function(z,ee){return z.toLowerCase()<ee.toLowerCase()?-1:z.toLowerCase()>ee.toLowerCase()?1:0});for(var Y=new t(0,0,0,0),G=y.first;G<=y.last;G++){var Q=L.getLine(G);Y.start.row=G,Y.end.row=G,Y.end.column=Q.length,L.replace(Y,H[G-y.first])}},v.prototype.toggleCommentLines=function(){var y=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(y,this.session,L.first,L.last)},v.prototype.toggleBlockComment=function(){var y=this.getCursorPosition(),L=this.session.getState(y.row),H=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,H,y)},v.prototype.getNumberAt=function(y,L){for(var H=/[\-]?[0-9]+(?:\.[0-9]+)?/g,G=(H.lastIndex=0,this.session.getLine(y));H.lastIndex<L;){var Y=H.exec(G);if(Y.index<=L&&Y.index+Y[0].length>=L)return{value:Y[0],start:Y.index,end:Y.index+Y[0].length}}return null},v.prototype.modifyNumber=function(y){var L,H,G,Y=this.selection.getCursor().row,Q=this.selection.getCursor().column,z=new t(Y,Q-1,Y,Q),z=this.session.getTextRange(z);!isNaN(parseFloat(z))&&isFinite(z)?(z=this.getNumberAt(Y,Q))&&(G=0<=z.value.indexOf(".")?z.start+z.value.indexOf(".")+1:z.end,L=z.start+z.value.length-G,H=parseFloat(z.value),H*=Math.pow(10,L),G!==z.end&&Q<G?y*=Math.pow(10,z.end-Q-1):y*=Math.pow(10,z.end-Q),G=(H=(H+=y)/Math.pow(10,L)).toFixed(L),y=new t(Y,z.start,Y,z.end),this.session.replace(y,G),this.moveCursorTo(Y,Math.max(z.start+1,Q+G.length-z.value.length))):this.toggleWord()},v.prototype.toggleWord=function(){for(var y,L=this.selection.getCursor().row,H=this.selection.getCursor().column,G=(this.selection.selectWord(),this.getSelectedText()),Y=this.selection.getWordRange().start.column,Q=G.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),z=H-Y-1,ee=(z<0&&(z=0),0),T=this,P=(G.match(/[A-Za-z0-9_]+/)&&Q.forEach(function(J,ne){y=ee+J.length,ee<=z&&z<=y&&(G=J,T.selection.clearSelection(),T.moveCursorTo(L,ee+Y),T.selection.selectTo(L,y+Y)),ee=y}),this.$toggleWordPairs),Z=0;Z<P.length;Z++)for(var b=P[Z],k=0;k<=1;k++){var R=+!k,D=G.match(new RegExp("^\\s?_?("+l.escapeRegExp(b[k])+")\\s?$","i"));D&&G.match(new RegExp("([_]|^|\\s)("+l.escapeRegExp(D[1])+")($|\\s)","g"))&&(D=G.replace(new RegExp(l.escapeRegExp(b[k]),"i"),function(J){var ne=b[R];return J.toUpperCase()==J?ne=ne.toUpperCase():J.charAt(0).toUpperCase()==J.charAt(0)&&(ne=ne.substr(0,0)+b[R].charAt(0).toUpperCase()+ne.substr(1)),ne}),this.insert(D))}},v.prototype.findLinkAt=function(Q,L){var H,G,Y,Q=this.session.getLine(Q).split(/((?:https?|ftp):\/\/[\S]+)/),z=L,ee=(z<0&&(z=0),0);try{for(var T=I(Q),P=T.next();!P.done;P=T.next()){var Z=P.value,b=ee+Z.length;if(ee<=z&&z<=b&&Z.match(/((?:https?|ftp):\/\/[\S]+)/)){Y=Z.replace(/[\s:.,'";}\]]+$/,"");break}ee=b}}catch(k){H={error:k}}finally{try{P&&!P.done&&(G=T.return)&&G.call(T)}finally{if(H)throw H.error}}return Y},v.prototype.openLink=function(){var y=this.selection.getCursor(),y=this.findLinkAt(y.row,y.column);return y&&window.open(y,"_blank"),y!=null},v.prototype.removeLines=function(){var y=this.$getSelectedRows();this.session.removeFullLines(y.first,y.last),this.clearSelection()},v.prototype.duplicateSelection=function(){var y,L=this.selection,H=this.session,G=L.getRange(),Y=L.isBackwards();G.isEmpty()?(y=G.start.row,H.duplicateLines(y,y)):(y=Y?G.start:G.end,H=H.insert(y,H.getTextRange(G),!1),G.start=y,G.end=H,L.setSelectionRange(G,Y))},v.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},v.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},v.prototype.moveText=function(y,L,H){return this.session.moveText(y,L,H)},v.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},v.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},v.prototype.$moveLines=function(y,L){var H=this.selection;if(!H.inMultiSelectMode||this.inVirtualSelectionMode){var G=H.toOrientedRange(),Y=this.$getSelectedRows(G),Q=this.session.$moveLines(Y.first,Y.last,L?0:y);G.moveBy(Q=L&&y==-1?0:Q,0),H.fromOrientedRange(G)}else{for(var z=H.rangeList.ranges,ee=(H.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),T=0,P=z.length,Z=0;Z<P;Z++){for(var b=Z,k=(z[Z].moveBy(ee,0),(Y=this.$getSelectedRows(z[Z])).first),R=Y.last;++Z<P;){T&&z[Z].moveBy(T,0);var D=this.$getSelectedRows(z[Z]);if(L&&D.first!=R||!L&&D.first>R+1)break;R=D.last}for(Z--,ee=this.session.$moveLines(k,R,L?0:y),L&&y==-1&&(b=Z+1);b<=Z;)z[b].moveBy(ee,0),b++;T+=ee=L?ee:0}H.fromOrientedRange(H.ranges[0]),H.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},v.prototype.$getSelectedRows=function(y){return y=(y||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(y.start.row),last:this.session.getRowFoldEnd(y.end.row)}},v.prototype.onCompositionStart=function(y){this.renderer.showComposition(y)},v.prototype.onCompositionUpdate=function(y){this.renderer.setCompositionText(y)},v.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},v.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},v.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},v.prototype.isRowVisible=function(y){return y>=this.getFirstVisibleRow()&&y<=this.getLastVisibleRow()},v.prototype.isRowFullyVisible=function(y){return y>=this.renderer.getFirstFullyVisibleRow()&&y<=this.renderer.getLastFullyVisibleRow()},v.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},v.prototype.$moveByPage=function(Q,L){var H=this.renderer,G=this.renderer.layerConfig,Y=Q*Math.floor(G.height/G.lineHeight),Q=(L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(Y,0)}):L===!1&&(this.selection.moveCursorBy(Y,0),this.selection.clearSelection()),H.scrollTop);H.scrollBy(0,Y*G.lineHeight),L!=null&&H.scrollCursorIntoView(null,.5),H.animateScrolling(Q)},v.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},v.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},v.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},v.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},v.prototype.scrollPageDown=function(){this.$moveByPage(1)},v.prototype.scrollPageUp=function(){this.$moveByPage(-1)},v.prototype.scrollToRow=function(y){this.renderer.scrollToRow(y)},v.prototype.scrollToLine=function(y,L,H,G){this.renderer.scrollToLine(y,L,H,G)},v.prototype.centerSelection=function(){var y=this.getSelectionRange(),y={row:Math.floor(y.start.row+(y.end.row-y.start.row)/2),column:Math.floor(y.start.column+(y.end.column-y.start.column)/2)};this.renderer.alignCursor(y,.5)},v.prototype.getCursorPosition=function(){return this.selection.getCursor()},v.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},v.prototype.getSelectionRange=function(){return this.selection.getRange()},v.prototype.selectAll=function(){this.selection.selectAll()},v.prototype.clearSelection=function(){this.selection.clearSelection()},v.prototype.moveCursorTo=function(y,L){this.selection.moveCursorTo(y,L)},v.prototype.moveCursorToPosition=function(y){this.selection.moveCursorToPosition(y)},v.prototype.jumpToMatching=function(y,L){var H=this.getCursorPosition(),G=new A(this.session,H.row,H.column),Y=G.getCurrentToken(),Q=0,z=(Y=Y&&Y.type.indexOf("tag-name")!==-1?G.stepBackward():Y)||G.stepForward();if(z){var ee,T,P=!1,Z={},b=H.column-z.start,k={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do if(z.value.match(/[{}()\[\]]/g)){for(;b<z.value.length&&!P;b++)if(k[z.value[b]])switch(T=k[z.value[b]]+"."+z.type.replace("rparen","lparen"),isNaN(Z[T])&&(Z[T]=0),z.value[b]){case"(":case"[":case"{":Z[T]++;break;case")":case"]":case"}":Z[T]--,Z[T]===-1&&(ee="bracket",P=!0)}}else z.type.indexOf("tag-name")!==-1&&(isNaN(Z[z.value])&&(Z[z.value]=0),Y.value==="<"&&1<Q?Z[z.value]++:Y.value==="</"&&Z[z.value]--,Z[z.value]===-1)&&(ee="tag",P=!0);while(P||(Y=z,Q++,z=G.stepForward(),b=0),z&&!P);if(ee){if(ee==="bracket")!(D=this.session.getBracketRange(H))&&(J=(D=new t(G.getCurrentTokenRow(),G.getCurrentTokenColumn()+b-1,G.getCurrentTokenRow(),G.getCurrentTokenColumn()+b-1)).start,L||J.row===H.row&&Math.abs(J.column-H.column)<2)&&(D=this.session.getBracketRange(J));else if(ee==="tag"){if(!z||z.type.indexOf("tag-name")===-1)return;var R,D,J=(J=(D=new t(G.getCurrentTokenRow(),G.getCurrentTokenColumn()-2,G.getCurrentTokenRow(),G.getCurrentTokenColumn()-2)).compare(H.row,H.column)===0&&(R=this.session.getMatchingTags(H))?R.openTag.contains(H.row,H.column)?(D=R.closeTag).start:(D=R.openTag,R.closeTag.start.row===H.row&&R.closeTag.start.column===H.column?D.end:D.start):J)||D.start}(J=D&&D.cursor||J)&&(y?D&&L?this.selection.setRange(D):D&&D.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(J.row,J.column):this.selection.moveTo(J.row,J.column))}}},v.prototype.gotoLine=function(y,L,H){this.selection.clearSelection(),this.session.unfold({row:y-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(y-1,L||0),this.isRowFullyVisible(y-1)||this.scrollToLine(y-1,!0,H)},v.prototype.navigateTo=function(y,L){this.selection.moveTo(y,L)},v.prototype.navigateUp=function(y){var L;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return L=this.selection.anchor.getPosition(),this.moveCursorToPosition(L);this.selection.clearSelection(),this.selection.moveCursorBy(-y||-1,0)},v.prototype.navigateDown=function(y){var L;if(this.selection.isMultiLine()&&this.selection.isBackwards())return L=this.selection.anchor.getPosition(),this.moveCursorToPosition(L);this.selection.clearSelection(),this.selection.moveCursorBy(y||1,0)},v.prototype.navigateLeft=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},v.prototype.navigateRight=function(y){if(this.selection.isEmpty())for(y=y||1;y--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}this.clearSelection()},v.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},v.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},v.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},v.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},v.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},v.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},v.prototype.replace=function(y,H){H&&this.$search.set(H);var H=this.$search.find(this.session),G=0;return H&&(this.$tryReplace(H,y)&&(G=1),this.selection.setSelectionRange(H),this.renderer.scrollSelectionIntoView(H.start,H.end)),G},v.prototype.replaceAll=function(y,L){L&&this.$search.set(L);var H=this.$search.findAll(this.session),G=0;if(H.length){L=this.getSelectionRange(),this.selection.moveTo(0,0);for(var Y=H.length-1;0<=Y;--Y)this.$tryReplace(H[Y],y)&&G++;this.selection.setSelectionRange(L)}return G},v.prototype.$tryReplace=function(y,L){var H=this.session.getTextRange(y);return(L=this.$search.replace(H,L))!==null?(y.end=this.session.replace(y,L),y):null},v.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},v.prototype.find=function(Y,L,H){L=L||{},typeof Y=="string"||Y instanceof RegExp?L.needle=Y:typeof Y=="object"&&C.mixin(L,Y);var G=this.selection.getRange(),Y=(L.needle==null&&((Y=this.session.getTextRange(G)||this.$search.$options.needle)||(G=this.session.getWordRange(G.start.row,G.start.column),Y=this.session.getTextRange(G)),this.$search.set({needle:Y})),this.$search.set(L),L.start||this.$search.set({start:G}),this.$search.find(this.session));return L.preventScroll?Y:Y?(this.revealRange(Y,H),Y):(L.backwards?G.start=G.end:G.end=G.start,void this.selection.setRange(G))},v.prototype.findNext=function(y,L){this.find({skipCurrent:!0,backwards:!1},y,L)},v.prototype.findPrevious=function(y,L){this.find(y,{skipCurrent:!0,backwards:!0},L)},v.prototype.revealRange=function(y,L){this.session.unfold(y),this.selection.setSelectionRange(y);var H=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(y.start,y.end,.5),L!==!1&&this.renderer.animateScrolling(H)},v.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},v.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},v.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(y){y.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()},v.prototype.setAutoScrollEditorIntoView=function(y){var L,H,G,Y,Q,z,ee;y&&(G=!1,(H=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(Y=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(Y,this.container.firstChild),Q=this.on("changeSelection",function(){G=!0}),z=this.renderer.on("beforeRender",function(){G&&(L=H.renderer.container.getBoundingClientRect())}),ee=this.renderer.on("afterRender",function(){var T,P,Z;G&&L&&(H.isFocused()||H.searchBox&&H.searchBox.isFocused())&&(T=(P=H.renderer).$cursorLayer.$pixelPos,P=P.layerConfig,Z=T.top-P.offset,(G=0<=T.top&&Z+L.top<0||!(T.top<P.height&&T.top+L.top+P.lineHeight>window.innerHeight)&&null)!=null&&(Y.style.top=Z+"px",Y.style.left=T.left+"px",Y.style.height=P.lineHeight+"px",Y.scrollIntoView(G)),G=L=null)}),this.setAutoScrollEditorIntoView=function(T){T||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",ee),this.renderer.off("beforeRender",z))})},v.prototype.$resetCursorStyle=function(){var y=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(y)),L.isBlinking=!this.$readOnly&&y!="wide",h.setCssClass(L.element,"ace_slim-cursors",/slim/.test(y)))},v.prototype.prompt=function(y,L,H){var G=this;g.loadModule("ace/ext/prompt",function(Y){Y.prompt(G,y,L,H)})},v);function v(y,L,H){this.$toDestroy=[];var G=y.getContainerElement();this.container=G,this.renderer=y,this.id="editor"+ ++v.$uid,this.commands=new d(c.isMac?"mac":"win",p),typeof document=="object"&&(this.textInput=new n(y.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new s(this),new i(this)),this.keyBinding=new o(this),this.$search=new e().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(Y,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(L||H&&H.session||new a("")),g.resetOptions(this),H&&this.setOptions(H),g._signal("editor",this)}u.$uid=0,u.prototype.curOp=null,u.prototype.prevOp={},u.prototype.$mergeableCommands=["backspace","del","insertstring"],u.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],C.implement(u.prototype,r),g.defineOptions(u.prototype,"editor",{selectionStyle:{set:function(y){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:y})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(y){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(y){this.textInput.setReadOnly(y),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(y){this.textInput.setCopyWithEmptySelection(y)},initialValue:!1},cursorStyle:{set:function(y){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(y){this.setAutoScrollEditorIntoView(y)}},keyboardHandler:{set:function(y){this.setKeyboardHandler(y)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(y){this.session.setValue(y)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(y){this.setSession(y)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(y){this.renderer.$gutterLayer.setShowLineNumbers(y),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),y&&this.$relativeLineNumbers?$.attach(this):$.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(y){this.$showLineNumbers&&y?$.attach(this):$.detach(this)}},placeholder:{set:function(y){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var L=this.session&&(this.renderer.$composition||1<this.session.getLength()||0<this.session.getLine(0).length);L&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),h.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):L||this.renderer.placeholderNode?!L&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),h.addCssClass(this.container,"ace_hasPlaceholder"),(L=h.createElement("div")).className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(y){function L(Y){Y.target==this.renderer.scroller&&Y.keyCode===V.enter&&(Y.preventDefault(),Y=this.getCursorPosition().row,this.isRowVisible(Y)||this.scrollToLine(Y,!0,!0),this.focus())}var H,G={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(Y){Y.blur(),Y.renderer.scroller.focus()},readOnly:!0};y?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",W("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",W("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(G),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",W("editor")),this.renderer.$gutter.setAttribute("aria-label",W("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),(H=H||new E(this)).addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(G),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),H&&H.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var $={getText:function(y,L){return(Math.abs(y.selection.lead.row-L)||L+1+(L<9?"\xB7":""))+""},getWidth:function(y,L,H){return Math.max(L.toString().length,(H.lastRow+1).toString().length,2)*H.characterWidth},update:function(y,L){L.renderer.$loop.schedule(L.renderer.CHANGE_GUTTER)},attach:function(y){y.renderer.$gutterLayer.$renderer=this,y.on("changeSelection",this.update),this.update(null,y)},detach:function(y){y.renderer.$gutterLayer.$renderer==this&&(y.renderer.$gutterLayer.$renderer=null),y.off("changeSelection",this.update),this.update(null,y)}};f.Editor=u}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(w,f,_){C.prototype.addSession=function(t){this.$session=t},C.prototype.add=function(t,r,d){this.$fromUndo||t!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),r!==!1&&this.lastDeltas||(this.lastDeltas=[],(r=this.$undoStack.length)>this.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev),t.action!="remove"&&t.action!="insert"||(this.$lastDelta=t),this.lastDeltas.push(t))},C.prototype.addSelection=function(t,r){this.selections.push({value:t,rev:r||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(t,r){r==null&&(r=this.$rev+1);for(var d=this.$undoStack,p=d.length;p--;){var g=d[p][0];if(g.id<=t)break;g.id<r&&(g.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(t,r){for(var d=this.selections,p=d.length;p--;){var g=d[p];if(g.rev<t)return g=r?d[p+1]:g}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(t,r){r==null&&(r=this.$rev+1);for(var d=this.$undoStack,p=null,g=0,A=d.length;A--;){var x=d[A][0];if(x.id<r&&!p&&(p=A+1),x.id<=t){g=A+1;break}}return d.slice(g,p)},C.prototype.getChangedRanges=function(t,r){r==null&&this.$rev},C.prototype.getChangedLines=function(t,r){r==null&&this.$rev},C.prototype.undo=function(t,r){this.lastDeltas=null;var d,p=this.$undoStack;if(function(g,A){for(var x=A;x--;){var E=g[x];if(E&&!E[0].ignore){for(;x<A-1;){var W=function(B,V){for(var u=B.length;u--;)for(var v=0;v<V.length;v++)if(!i(B[u],V[v])){for(;u<B.length;){for(;v--;)i(V[v],B[u]);v=V.length,u++}return[B,V]}return B.selectionBefore=V.selectionBefore=B.selectionAfter=V.selectionAfter=null,[V,B]}(g[x],g[x+1]);g[x]=W[0],g[x+1]=W[1],x++}return 1}}}(p,p.length))return t=t||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,d=null,(p=p.pop())&&(d=t.undoChanges(p,r),this.$redoStack.push(p),this.$syncRev()),this.$fromUndo=!1,d},C.prototype.redo=function(t,r){if(this.lastDeltas=null,t=t||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var $=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),d=this.$redoStack,p=$,g=0;g<p.length;g++)for(var A=p[g],x=0;x<A.length;x++){E=void 0,W=void 0,B=void 0,V=void 0,u=void 0,v=void 0;var E=d,W=A[x];W=function(H){return{start:c(H.start),end:c(H.end),action:H.action,lines:H.lines.slice()}}(W);for(var B=E.length;B--;){for(var V=E[B],u=0;u<V.length;u++){var v=function(H,G){var Y,Q,z=H.action=="insert",ee=G.action=="insert";if(z&&ee)l(H.start,G.start)<0?o(G,H,1):o(H,G,1);else if(z&&!ee)0<=l(H.start,G.end)?o(H,G,-1):(l(H.start,G.start)<=0||o(H,h.fromPoints(G.start,H.start),-1),o(G,H,1));else if(!z&&ee)0<=l(G.start,H.end)?o(G,H,-1):(l(G.start,H.start)<=0||o(G,h.fromPoints(H.start,G.start),-1),o(H,G,1));else if(!z&&!ee)if(0<=l(G.start,H.end))o(G,H,-1);else{if(!(l(G.end,H.start)<=0))return l(H.start,G.start)<0&&(H=e(Y=H,G.start)),0<l(H.end,G.end)&&(Q=e(H,G.end)),a(G.end,H.start,H.end,-1),Q&&!Y&&(H.lines=Q.lines,H.start=Q.start,H.end=Q.end,Q=H),[G,Y,Q].filter(Boolean);o(H,G,-1)}return[G,H]}(V[u],W);W=v[0],v.length!=2&&(v[2]?(V.splice(u+1,1,v[1],v[2]),u++):v[1]||(V.splice(u,1),u--))}V.length||E.splice(B,1)}}this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(L){L[0].id=++this.$maxRev},this)}var $=this.$redoStack.pop(),y=null;return $&&(y=t.redoChanges($,r),this.$undoStack.push($),this.$syncRev()),this.$fromUndo=!1,y},C.prototype.$syncRev=function(){var t=this.$undoStack,t=t[t.length-1],t=t&&t[0].id||0;this.$redoStackBaseRev=t,this.$rev=t},C.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},C.prototype.canUndo=function(){return 0<this.$undoStack.length},C.prototype.canRedo=function(){return 0<this.$redoStack.length},C.prototype.bookmark=function(t){t==null&&(t=this.$rev),this.mark=t},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){},C.prototype.fromJSON=function(){},C.prototype.$prettyPrint=function(t){return t?n(t):n(this.$undoStack)+`
|
|
---
|
|
`+n(this.$redoStack)};var I=C;function C(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}I.prototype.hasUndo=I.prototype.canUndo,I.prototype.hasRedo=I.prototype.canRedo,I.prototype.isClean=I.prototype.isAtBookmark,I.prototype.markClean=I.prototype.bookmark;var h=w("./range").Range,l=h.comparePoints;h.comparePoints;function c(t){return{row:t.row,column:t.column}}function n(t){var r;return t=t||this,Array.isArray(t)?t.map(n).join(`
|
|
`):(r="",t.action?(r=t.action=="insert"?"+":"-",r+="["+t.lines+"]"):t.value&&(r=Array.isArray(t.value)?t.value.map(s).join(`
|
|
`):s(t.value)),t.start&&(r+=s(t)),(t.id||t.rev)&&(r+=" ("+(t.id||t.rev)+")"),r)}function s(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function i(t,r){var d=t.action=="insert",p=r.action=="insert";if(d&&p)if(0<=l(r.start,t.end))o(r,t,-1);else{if(!(l(r.start,t.start)<=0))return;o(t,r,1)}else if(d&&!p)if(0<=l(r.start,t.end))o(r,t,-1);else{if(!(l(r.end,t.start)<=0))return;o(t,r,-1)}else if(!d&&p)if(0<=l(r.start,t.start))o(r,t,1);else{if(!(l(r.start,t.start)<=0))return;o(t,r,1)}else if(!d&&!p)if(0<=l(r.start,t.start))o(r,t,1);else{if(!(l(r.end,t.start)<=0))return;o(t,r,-1)}return 1}function o(t,r,d){a(t.start,r.start,r.end,d),a(t.end,r.start,r.end,d)}function a(t,r,d,p){t.row==(p==1?r:d).row&&(t.column+=p*(d.column-r.column)),t.row+=p*(d.row-r.row)}function e(t,r){var d=t.lines,p=t.end,A=(t.end=c(r),t.end.row-t.start.row),g=d.splice(A,d.length),A=A?r.column:r.column-t.start.column;return d.push(g[0].substring(0,A)),g[0]=g[0].substr(A),{start:c(r),end:p,lines:g,action:t.action}}f.UndoManager=I}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(w,f,_){var I=w("../lib/dom");function C(h,l){this.element=h,this.canvasHeight=l||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}C.prototype.moveContainer=function(h){I.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},C.prototype.pageChanged=function(h,l){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},C.prototype.computeLineTop=function(h,l,c){var n=l.firstRowScreen*l.lineHeight,n=Math.floor(n/this.canvasHeight);return c.documentToScreenRow(h,0)*l.lineHeight-n*this.canvasHeight},C.prototype.computeLineHeight=function(h,l,c){return l.lineHeight*c.getRowLineCount(h)},C.prototype.getLength=function(){return this.cells.length},C.prototype.get=function(h){return this.cells[h]},C.prototype.shift=function(){this.$cacheCell(this.cells.shift())},C.prototype.pop=function(){this.$cacheCell(this.cells.pop())},C.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var l=I.createFragment(this.element),c=0;c<h.length;c++)l.appendChild(h[c].element);this.element.appendChild(l)}else this.cells.push(h),this.element.appendChild(h.element)},C.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var l=I.createFragment(this.element),c=0;c<h.length;c++)l.appendChild(h[c].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},C.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},C.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},C.prototype.createCell=function(h,l,c,n){var s,i=this.cellCache.pop();return i||(s=I.createElement("div"),n&&n(s),this.element.appendChild(s),i={element:s,text:"",row:h}),i.row=h,i},f.Lines=C}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(s,f,_){var I=s("../lib/dom"),C=s("../lib/oop"),h=s("../lib/lang"),l=s("../lib/event_emitter").EventEmitter,c=s("./lines").Lines,n=s("../config").nls,s=(i.prototype.setSession=function(a){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=a)&&a.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(a,e){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,e)},i.prototype.removeGutterDecoration=function(a,e){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,e)},i.prototype.setAnnotations=function(a){this.$annotations=[];for(var e=0;e<a.length;e++){var t=a[e],p=t.row,r=(r=this.$annotations[p])||(this.$annotations[p]={text:[],type:[]}),p=t.text,d=t.type,p=p?h.escapeHTML(p):t.html||"",p=(r.text.indexOf(p)===-1&&(r.text.push(p),r.type.push(d)),t.className);p?r.className=p:d=="error"?r.className=" ace_error":d=="warning"&&r.className!=" ace_error"?r.className=" ace_warning":d!="info"||r.className||(r.className=" ace_info")}},i.prototype.$updateAnnotations=function(a){var e,t;this.$annotations.length&&(e=a.start.row,(t=a.end.row-e)!=0)&&(a.action=="remove"?this.$annotations.splice(e,1+t,null):((a=new Array(1+t)).unshift(e,1),this.$annotations.splice.apply(this.$annotations,a)))},i.prototype.update=function(a){this.config=a;for(var e=this.session,t=a.firstRow,r=Math.min(a.lastRow+a.gutterOffset,e.getLength()-1),d=(this.oldLastRow=r,this.config=a,this.$lines.moveContainer(a),this.$updateCursorRow(),e.getNextFoldLine(t)),p=d?d.start.row:1/0,g=null,A=-1,x=t;;){if(p<x&&(x=d.end.row+1,p=(d=e.getNextFoldLine(x,d))?d.start.row:1/0),r<x){for(;this.$lines.getLength()>A+1;)this.$lines.pop();break}(g=this.$lines.get(++A))?g.row=x:(g=this.$lines.createCell(x,a,this.session,o),this.$lines.push(g)),this.$renderCell(g,a,d,x),x++}this._signal("afterRender"),this.$updateGutterWidth(a)},i.prototype.$updateGutterWidth=function(a){var e=this.session,d=e.gutterRenderer||this.$renderer,r=e.$firstLineNumber,t=this.$lines.last()?this.$lines.last().text:"",r=((this.$fixedWidth||e.$useWrapMode)&&(t=e.getLength()+r-1),d?d.getWidth(e,t,a):t.toString().length*a.characterWidth),d=this.$padding||this.$computePadding();(r+=d.left+d.right)===this.gutterWidth||isNaN(r)||(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},i.prototype.$updateCursorRow=function(){var a;this.$highlightGutterLine&&(a=this.session.selection.getCursor(),this.$cursorRow!==a.row)&&(this.$cursorRow=a.row)},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var a=this.session.selection.cursor.row;if(this.$cursorRow=a,!this.$cursorCell||this.$cursorCell.row!=a){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var e=this.$lines.cells;this.$cursorCell=null;for(var t=0;t<e.length;t++){var r=e[t];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var d=this.session.getFoldLine(this.$cursorRow);if(!(0<t&&d&&d.start.row==e[t-1].row))break;r=e[t-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}}}},i.prototype.scrollLines=function(a){var e=this.config;if(this.config=a,this.$updateCursorRow(),this.$lines.pageChanged(e,a))return this.update(a);this.$lines.moveContainer(a);var t=Math.min(a.lastRow+a.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=t,!e||r<a.firstRow)return this.update(a);if(t<e.firstRow)return this.update(a);if(e.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(e.firstRow,a.firstRow-1);0<d;d--)this.$lines.shift();if(t<r)for(d=this.session.getFoldedRowCount(t+1,r);0<d;d--)this.$lines.pop();a.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLines(a,a.firstRow,e.firstRow-1)),r<t&&this.$lines.push(this.$renderLines(a,r+1,t)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(a)},i.prototype.$renderLines=function(a,e,t){for(var r=[],d=e,p=this.session.getNextFoldLine(d),g=p?p.start.row:1/0;g<d&&(d=p.end.row+1,g=(p=this.session.getNextFoldLine(d,p))?p.start.row:1/0),!(t<d);){var A=this.$lines.createCell(d,a,this.session,o);this.$renderCell(A,a,p,d),r.push(A),d++}return r},i.prototype.$renderCell=function(a,e,t,r){var d,p=a.element,g=this.session,A=p.childNodes[0],x=p.childNodes[1],E=p.childNodes[2],W=E.firstChild,B=g.$firstLineNumber,V=g.$breakpoints,u=g.$decorations,G=g.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&g.foldWidgets,$=t?t.start.row:Number.MAX_VALUE,y=e.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",H=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",G=(G?G.getText(g,r):r+B).toString();if(this.$highlightGutterLine&&(r==this.$cursorRow||t&&r<this.$cursorRow&&$<=r&&this.$cursorRow<=t.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=a)&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=a),V[r]&&(L+=V[r]),u[r]&&(L+=u[r]),this.$annotations[r]&&r!==$&&(L+=this.$annotations[r].className),d=v&&(d=v[r])==null?v[r]=g.getFoldWidget(r):d){if(B="ace_fold-widget ace_"+d,V=d=="start"&&r==$&&r<t.end.row,V){B+=" ace_closed";for(var Y="",Q=!1,z=r+1;z<=t.end.row;z++)if(this.$annotations[z]){if(this.$annotations[z].className===" ace_error"){Q=!0,Y=" ace_error_fold";break}this.$annotations[z].className===" ace_warning"&&(Q=!0,Y=" ace_warning_fold")}L+=Y}else B+=" ace_open";x.className!=B&&(x.className=B),I.setStyle(x.style,"height",y),I.setStyle(x.style,"display","inline-block"),x.setAttribute("role","button"),x.setAttribute("tabindex","-1"),u=g.getFoldWidgetRange(r),u?x.setAttribute("aria-label",n("Toggle code folding, rows $0 through $1",[u.start.row+1,u.end.row+1])):t?x.setAttribute("aria-label",n("Toggle code folding, rows $0 through $1",[t.start.row+1,t.end.row+1])):x.setAttribute("aria-label",n("Toggle code folding, row $0",[r+1])),V?(x.setAttribute("aria-expanded","false"),x.setAttribute("title",n("Unfold code"))):(x.setAttribute("aria-expanded","true"),x.setAttribute("title",n("Fold code")))}else x&&(I.setStyle(x.style,"display","none"),x.setAttribute("tabindex","0"),x.removeAttribute("role"),x.removeAttribute("aria-label"));return Q&&this.$showFoldedAnnotations?(E.className="ace_gutter_annotation",W.className=H,W.className+=Y,I.setStyle(W.style,"height",y),I.setStyle(E.style,"display","block"),I.setStyle(E.style,"height",y),E.setAttribute("aria-label",n("Read annotations row $0",[G])),E.setAttribute("tabindex","-1"),E.setAttribute("role","button")):this.$annotations[r]?(E.className="ace_gutter_annotation",W.className=H,this.$useSvgGutterIcons?W.className+=this.$annotations[r].className:p.classList.add(this.$annotations[r].className.replace(" ","")),I.setStyle(W.style,"height",y),I.setStyle(E.style,"display","block"),I.setStyle(E.style,"height",y),E.setAttribute("aria-label",n("Read annotations row $0",[G])),E.setAttribute("tabindex","-1"),E.setAttribute("role","button")):(I.setStyle(E.style,"display","none"),E.removeAttribute("aria-label"),E.removeAttribute("role"),E.setAttribute("tabindex","0")),G!==A.data&&(A.data=G),p.className!=L&&(p.className=L),I.setStyle(a.element.style,"height",this.$lines.computeLineHeight(r,e,g)+"px"),I.setStyle(a.element.style,"top",this.$lines.computeLineTop(r,e,g)+"px"),a.text=G,E.style.display==="none"&&x.style.display==="none"?a.element.setAttribute("aria-hidden",!0):a.element.setAttribute("aria-hidden",!1),a},i.prototype.setHighlightGutterLine=function(a){this.$highlightGutterLine=a},i.prototype.setShowLineNumbers=function(a){this.$renderer=!a&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.prototype.setShowFoldWidgets=function(a){a?I.addCssClass(this.element,"ace_folding-enabled"):I.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=a,this.$padding=null},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$computePadding=function(){var a;return this.element.firstChild?(a=I.computedStyle(this.element.firstChild),this.$padding={},this.$padding.left=(parseInt(a.borderLeftWidth)||0)+(parseInt(a.paddingLeft)||0)+1,this.$padding.right=(parseInt(a.borderRightWidth)||0)+(parseInt(a.paddingRight)||0),this.$padding):{left:0,right:0}},i.prototype.getRegion=function(a){var e=this.$padding||this.$computePadding(),t=this.element.getBoundingClientRect();return a.x<e.left+t.left?"markers":this.$showFoldWidgets&&a.x>t.right-e.right?"foldWidgets":void 0},i);function i(a){this.element=I.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}function o(a){var e=document.createTextNode(""),e=(a.appendChild(e),I.createElement("span")),e=(a.appendChild(e),I.createElement("span")),t=(a.appendChild(e),I.createElement("span"));return e.appendChild(t),a}s.prototype.$fixedWidth=!1,s.prototype.$highlightGutterLine=!0,s.prototype.$renderer="",s.prototype.$showLineNumbers=!0,s.prototype.$showFoldWidgets=!0,C.implement(s.prototype,l),f.Gutter=s}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(h,f,_){var I=h("../range").Range,C=h("../lib/dom"),h=(l.prototype.setPadding=function(c){this.$padding=c},l.prototype.setSession=function(c){this.session=c},l.prototype.setMarkers=function(c){this.markers=c},l.prototype.elt=function(c,n){var s=this.i!=-1&&this.element.childNodes[this.i];s?this.i++:(s=document.createElement("div"),this.element.appendChild(s),this.i=-1),s.style.cssText=n,s.className=c},l.prototype.update=function(c){if(c){var n,s;for(s in this.config=c,this.i=0,this.markers){var i,o,a,e=this.markers[s];e.range?(a=e.range.clipRows(c.firstRow,c.lastRow)).isEmpty()||(a=a.toScreenRange(this.session),e.renderer?(i=this.$getTop(a.start.row,c),o=this.$padding+a.start.column*c.characterWidth,e.renderer(n,a,o,i,c)):e.type=="fullLine"?this.drawFullLineMarker(n,a,e.clazz,c):e.type=="screenLine"?this.drawScreenLineMarker(n,a,e.clazz,c):a.isMultiLine()?e.type=="text"?this.drawTextMarker(n,a,e.clazz,c):this.drawMultiLineMarker(n,a,e.clazz,c):this.drawSingleLineMarker(n,a,e.clazz+" ace_start ace_br15",c)):e.update(n,this,this.session,c)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},l.prototype.$getTop=function(c,n){return(c-n.firstRowScreen)*n.lineHeight},l.prototype.drawTextMarker=function(c,n,s,i,o){for(var a,e=this.session,t=n.start.row,r=n.end.row,d=t,p=0,g=e.getScreenLastRowColumn(d),A=new I(d,n.start.column,d,p);d<=r;d++)A.start.row=A.end.row=d,A.start.column=d==t?n.start.column:e.getRowWrapIndent(d),A.end.column=g,a=p,p=g,g=d+1<r?e.getScreenLastRowColumn(d+1):d==r?0:n.end.column,this.drawSingleLineMarker(c,A,s+(d==t?" ace_start":"")+" ace_br"+((d==t||d==t+1&&n.start.column?1:0)|(a<p?2:0)|(g<p?4:0)|(d==r?8:0)),i,d==r?0:1,o)},l.prototype.drawMultiLineMarker=function(c,n,s,i,o){var a,e=this.$padding,t=i.lineHeight,r=this.$getTop(n.start.row,i),d=e+n.start.column*i.characterWidth;o=o||"",this.session.$bidiHandler.isBidiRow(n.start.row)?((a=n.clone()).end.row=a.start.row,a.end.column=this.session.getLine(a.start.row).length,this.drawBidiSingleLineMarker(c,a,s+" ace_br1 ace_start",i,null,o)):this.elt(s+" ace_br1 ace_start","height:"+t+"px;right:0;top:"+r+"px;left:"+d+"px;"+(o||"")),this.session.$bidiHandler.isBidiRow(n.end.row)?((a=n.clone()).start.row=a.end.row,a.start.column=0,this.drawBidiSingleLineMarker(c,a,s+" ace_br12",i,null,o)):(r=this.$getTop(n.end.row,i),d=n.end.column*i.characterWidth,this.elt(s+" ace_br12","height:"+t+"px;width:"+d+"px;top:"+r+"px;left:"+e+"px;"+(o||""))),(t=(n.end.row-n.start.row-1)*i.lineHeight)<=0||(r=this.$getTop(n.start.row+1,i),c=(n.start.column?1:0)|(n.end.column?0:8),this.elt(s+(c?" ace_br"+c:""),"height:"+t+"px;right:0;top:"+r+"px;left:"+e+"px;"+(o||"")))},l.prototype.drawSingleLineMarker=function(e,d,s,i,t,a){if(this.session.$bidiHandler.isBidiRow(d.start.row))return this.drawBidiSingleLineMarker(e,d,s,i,t,a);var e=i.lineHeight,t=(d.end.column+(t||0)-d.start.column)*i.characterWidth,r=this.$getTop(d.start.row,i),d=this.$padding+d.start.column*i.characterWidth;this.elt(s,"height:"+e+"px;width:"+t+"px;top:"+r+"px;left:"+d+"px;"+(a||""))},l.prototype.drawBidiSingleLineMarker=function(c,n,s,i,o,a){var e=i.lineHeight,t=this.$getTop(n.start.row,i),r=this.$padding;this.session.$bidiHandler.getSelections(n.start.column,n.end.column).forEach(function(d){this.elt(s,"height:"+e+"px;width:"+(d.width+(o||0))+"px;top:"+t+"px;left:"+(r+d.left)+"px;"+(a||""))},this)},l.prototype.drawFullLineMarker=function(c,n,s,i,o){var a=this.$getTop(n.start.row,i),e=i.lineHeight;n.start.row!=n.end.row&&(e+=this.$getTop(n.end.row,i)-a),this.elt(s,"height:"+e+"px;top:"+a+"px;left:0;right:0;"+(o||""))},l.prototype.drawScreenLineMarker=function(c,n,s,i,o){n=this.$getTop(n.start.row,i),i=i.lineHeight,this.elt(s,"height:"+i+"px;top:"+n+"px;left:0;right:0;"+(o||""))},l);function l(c){this.element=C.createElement("div"),this.element.className="ace_layer ace_marker-layer",c.appendChild(this.element)}h.prototype.$padding=0,f.Marker=h}),ace.define("ace/layer/text_util",["require","exports","module"],function(w,f,_){var I=new Set(["text","rparen","lparen"]);f.isTextToken=function(C){return I.has(C)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(i,f,_){var I=i("../lib/oop"),C=i("../lib/dom"),h=i("../lib/lang"),l=i("./lines").Lines,c=i("../lib/event_emitter").EventEmitter,n=i("../config").nls,s=i("./text_util").isTextToken,i=(o.prototype.$updateEolChar=function(){var a=this.session.doc,a=a.getNewLineCharacter()==`
|
|
`&&a.getNewLineMode()!="windows"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},o.prototype.setPadding=function(a){this.$padding=a,this.element.style.margin="0 "+a+"px"},o.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},o.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},o.prototype.$setFontMetrics=function(a){this.$fontMetrics=a,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},o.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},o.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},o.prototype.setSession=function(a){(this.session=a)&&this.$computeTabString()},o.prototype.setShowInvisibles=function(a){return this.showInvisibles!=a&&(typeof(this.showInvisibles=a)=="string"?(this.showSpaces=/tab/i.test(a),this.showTabs=/space/i.test(a),this.showEOL=/eol/i.test(a)):this.showSpaces=this.showTabs=this.showEOL=a,this.$computeTabString(),!0)},o.prototype.setDisplayIndentGuides=function(a){return this.displayIndentGuides!=a&&(this.displayIndentGuides=a,this.$computeTabString(),!0)},o.prototype.setHighlightIndentGuides=function(a){return this.$highlightIndentGuides!==a&&(this.$highlightIndentGuides=a)},o.prototype.$computeTabString=function(){for(var a,e,t,r,d,p,g=this.session.getTabSize(),A=(this.tabSize=g,this.$tabStrings=[0]),x=1;x<g+1;x++)this.showTabs?((p=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",p.textContent=h.stringRepeat(this.TAB_CHAR,x),A.push(p)):A.push(this.dom.createTextNode(h.stringRepeat(" ",x),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,a="ace_indent-guide",e=this.showSpaces?" ace_invisible ace_invisible_space":"",t=this.showSpaces?h.stringRepeat(this.SPACE_CHAR,this.tabSize):h.stringRepeat(" ",this.tabSize),r=this.showTabs?" ace_invisible ace_invisible_tab":"",d=this.showTabs?h.stringRepeat(this.TAB_CHAR,this.tabSize):t,(p=this.dom.createElement("span")).className=a+e,p.textContent=t,this.$tabStrings[" "]=p,(p=this.dom.createElement("span")).className=a+r,p.textContent=d,this.$tabStrings[" "]=p)},o.prototype.updateLines=function(a,e,t){if(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)return this.update(a);this.config=a;for(var r=Math.max(e,a.firstRow),d=Math.min(t,a.lastRow),p=this.element.childNodes,g=0,A=a.firstRow;A<r;A++){if(x=this.session.getFoldLine(A)){if(x.containsRow(r)){r=x.start.row;break}A=x.end.row}g++}for(var x,E=!1,A=r,W=(x=this.session.getNextFoldLine(A))?x.start.row:1/0;W<A&&(A=x.end.row+1,W=(x=this.session.getNextFoldLine(A,x))?x.start.row:1/0),!(d<A);){var B,V=p[g++];V&&(this.dom.removeChildren(V),this.$renderLine(V,A,A==W&&x),E&&(V.style.top=this.$lines.computeLineTop(A,a,this.session)+"px"),B=a.lineHeight*this.session.getRowLength(A)+"px",V.style.height!=B)&&(E=!0,V.style.height=B),A++}if(E)for(;g<this.$lines.cells.length;){var u=this.$lines.cells[g++];u.element.style.top=this.$lines.computeLineTop(u.row,a,this.session)+"px"}},o.prototype.scrollLines=function(a){var e=this.config;if(this.config=a,this.$lines.pageChanged(e,a))return this.update(a);this.$lines.moveContainer(a);var t=a.lastRow,r=e?e.lastRow:-1;if(!e||r<a.firstRow)return this.update(a);if(t<e.firstRow)return this.update(a);if(!e||e.lastRow<a.firstRow)return this.update(a);if(a.lastRow<e.firstRow)return this.update(a);if(e.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(e.firstRow,a.firstRow-1);0<d;d--)this.$lines.shift();if(e.lastRow>a.lastRow)for(d=this.session.getFoldedRowCount(a.lastRow+1,e.lastRow);0<d;d--)this.$lines.pop();a.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLinesFragment(a,a.firstRow,e.firstRow-1)),a.lastRow>e.lastRow&&this.$lines.push(this.$renderLinesFragment(a,e.lastRow+1,a.lastRow)),this.$highlightIndentGuide()},o.prototype.$renderLinesFragment=function(a,e,t){for(var r=[],d=e,p=this.session.getNextFoldLine(d),g=p?p.start.row:1/0;g<d&&(d=p.end.row+1,g=(p=this.session.getNextFoldLine(d,p))?p.start.row:1/0),!(t<d);){var A=this.$lines.createCell(d,a,this.session),x=A.element;this.dom.removeChildren(x),C.setStyle(x.style,"height",this.$lines.computeLineHeight(d,a,this.session)+"px"),C.setStyle(x.style,"top",this.$lines.computeLineTop(d,a,this.session)+"px"),this.$renderLine(x,d,d==g&&p),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",r.push(A),d++}return r},o.prototype.update=function(a){this.$lines.moveContainer(a);for(var e=(this.config=a).firstRow,t=a.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(a,e,t))},o.prototype.$renderToken=function(a,e,t,r){for(var d,p,g=this,A=/(\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,x=this.dom.createFragment(this.element),E=0;d=A.exec(r);){var W,B,V=d[1],u=d[2],v=d[3],$=d[4],y=d[5];!g.showSpaces&&u||(W=E!=d.index?r.slice(E,d.index):"",E=d.index+d[0].length,W&&x.appendChild(this.dom.createTextNode(W,this.element)),V?(W=g.session.getScreenTabSize(e+d.index),x.appendChild(g.$tabStrings[W].cloneNode(!0)),e+=W-1):u?g.showSpaces?((B=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",B.textContent=h.stringRepeat(g.SPACE_CHAR,u.length),x.appendChild(B)):x.appendChild(this.dom.createTextNode(u,this.element)):v?((B=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",B.textContent=h.stringRepeat(g.SPACE_CHAR,v.length),x.appendChild(B)):$?(e+=1,(B=this.dom.createElement("span")).style.width=2*g.config.characterWidth+"px",B.className=g.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",B.textContent=g.showSpaces?g.SPACE_CHAR:$,x.appendChild(B)):y&&(e+=1,(B=this.dom.createElement("span")).style.width=2*g.config.characterWidth+"px",B.className="ace_cjk",B.textContent=y,x.appendChild(B)))}return x.appendChild(this.dom.createTextNode(E?r.slice(E):r,this.element)),s(t.type)?a.appendChild(x):(p="ace_"+t.type.replace(/\./g," ace_"),B=this.dom.createElement("span"),t.type=="fold"&&(B.style.width=t.value.length*this.config.characterWidth+"px",B.setAttribute("title",n("Unfold code"))),B.className=p,B.appendChild(x),a.appendChild(B)),e+r.length},o.prototype.renderIndentGuide=function(a,e,t){var r=e.search(this.$indentGuideRe);if(!(r<=0||t<=r)){if(e[0]==" "){for(var d=(r-=r%this.tabSize)/this.tabSize,p=0;p<d;p++)a.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(r)}if(e[0]==" "){for(p=0;p<r;p++)a.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),e.substr(r)}this.$highlightIndentGuide()}return e},o.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var a=this.session.doc.$lines;if(a){var e=this.session.selection.getCursor(),t=/^\s*/.exec(this.session.doc.getLine(e.row))[0].length,r=Math.floor(t/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:e.row},this.session.$bracketHighlight){for(var d=this.session.$bracketHighlight.ranges,p=0;p<d.length;p++)if(e.row!==d[p].start.row){this.$highlightIndentGuideMarker.end=d[p].start.row,e.row>d[p].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&a[e.row]!==""&&e.column===a[e.row].length)for(this.$highlightIndentGuideMarker.dir=1,p=e.row+1;p<a.length;p++){var g=a[p],A=/^\s*/.exec(g)[0].length;if(g!==""&&(this.$highlightIndentGuideMarker.end=p,A<=t))break}this.$renderHighlightIndentGuide()}}},o.prototype.$clearActiveIndentGuide=function(){for(var a=this.$lines.cells,e=0;e<a.length;e++){var t=a[e].element.childNodes;if(0<t.length){for(var r=0;r<t.length;r++)if(t[r].classList&&t[r].classList.contains("ace_indent-guide-active")){t[r].classList.remove("ace_indent-guide-active");break}}}},o.prototype.$setIndentGuideActive=function(a,e){this.session.doc.getLine(a.row)!==""&&(a=a.element.childNodes)&&(a=a[e-1])&&a.classList&&a.classList.contains("ace_indent-guide")&&a.classList.add("ace_indent-guide-active")},o.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var a=this.$lines.cells,e=(this.$clearActiveIndentGuide(),this.$highlightIndentGuideMarker.indentLevel);if(e!==0){if(this.$highlightIndentGuideMarker.dir===1)for(var t=0;t<a.length;t++){var r=a[t];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,e)}}else for(t=a.length-1;0<=t;t--)if(r=a[t],this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,e)}}}},o.prototype.$createLineElement=function(a){var e=this.dom.createElement("div");return e.className="ace_line",e.style.height=this.config.lineHeight+"px",e},o.prototype.$renderWrappedLine=function(a,e,t){var r=0,d=0,p=t[0],g=0,A=this.$createLineElement();a.appendChild(A);for(var x=0;x<e.length;x++){var E=e[x],W=E.value;if(x==0&&this.displayIndentGuides){if(r=W.length,!(W=this.renderIndentGuide(A,W,p)))continue;r-=W.length}if(r+W.length<p)g=this.$renderToken(A,g,E,W),r+=W.length;else{for(;r+W.length>=p;)g=this.$renderToken(A,g,E,W.substring(0,p-r)),W=W.substring(p-r),r=p,A=this.$createLineElement(),a.appendChild(A),A.appendChild(this.dom.createTextNode(h.stringRepeat("\xA0",t.indent),this.element)),g=0,p=t[++d]||Number.MAX_VALUE;W.length!=0&&(r+=W.length,g=this.$renderToken(A,g,E,W))}}t[t.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(A,g,null,"",!0)},o.prototype.$renderSimpleLine=function(a,e){for(var t=0,r=0;r<e.length;r++){var d=e[r],p=d.value;if(r!=0||!this.displayIndentGuides||(p=this.renderIndentGuide(a,p))){if(t+p.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(a,t,d,p);t=this.$renderToken(a,t,d,p)}}},o.prototype.$renderOverflowMessage=function(a,e,t,r,d){t&&this.$renderToken(a,e,t,r.slice(0,this.MAX_LINE_LENGTH-e)),t=this.dom.createElement("span"),t.className="ace_inline_button ace_keyword ace_toggle_wrap",t.textContent=d?"<hide>":"<click to see more...>",a.appendChild(t)},o.prototype.$renderLine=function(a,e,t){var r,d,p=a;(r=(t=t||t==0?t:this.session.getFoldLine(e))?this.$getFoldLineTokens(e,t):this.session.getTokens(e)).length?(d=this.session.getRowSplitData(e))&&d.length?(this.$renderWrappedLine(a,r,d),p=a.lastChild):(p=a,this.$useLineGroups()&&(p=this.$createLineElement(),a.appendChild(p)),this.$renderSimpleLine(p,r)):this.$useLineGroups()&&(p=this.$createLineElement(),a.appendChild(p)),this.showEOL&&p&&(t&&(e=t.end.row),(d=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",d.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,p.appendChild(d))},o.prototype.$getFoldLineTokens=function(a,e){var t=this.session,r=[],d=t.getTokens(a);return e.walk(function(p,g,A,x,E){if(p!=null)r.push({type:"fold",value:p});else if((d=E?t.getTokens(g):d).length){for(var W,B=d,V=x,u=A,v=0,$=0;$+B[v].value.length<V;)if($+=B[v].value.length,++v==B.length)return;for($!=V&&((W=B[v].value.substring(V-$)).length>u-V&&(W=W.substring(0,u-V)),r.push({type:B[v].type,value:W}),$=V+W.length,v+=1);$<u&&v<B.length;)(W=B[v].value).length+$>u?r.push({type:B[v].type,value:W.substring(0,u-$)}):r.push(B[v]),$+=W.length,v+=1}},e.end.row,this.session.getLine(e.end.row).length),r},o.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},o);function o(a){this.dom=C,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}i.prototype.EOF_CHAR="\xB6",i.prototype.EOL_CHAR_LF="\xAC",i.prototype.EOL_CHAR_CRLF="\xA4",i.prototype.EOL_CHAR=i.prototype.EOL_CHAR_LF,i.prototype.TAB_CHAR="\u2014",i.prototype.SPACE_CHAR="\xB7",i.prototype.$padding=0,i.prototype.MAX_LINE_LENGTH=1e4,i.prototype.showInvisibles=!1,i.prototype.showSpaces=!1,i.prototype.showTabs=!1,i.prototype.showEOL=!1,i.prototype.displayIndentGuides=!0,i.prototype.$highlightIndentGuides=!0,i.prototype.$tabStrings=[],i.prototype.destroy={},i.prototype.onChangeTabSize=i.prototype.$computeTabString,I.implement(i.prototype,c),f.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(C,f,_){var I=C("../lib/dom"),C=(h.prototype.$updateOpacity=function(l){for(var c=this.cursors,n=c.length;n--;)I.setStyle(c[n].style,"opacity",l?"":"0")},h.prototype.$startCssAnimation=function(){for(var l=this.cursors,c=l.length;c--;)l[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&I.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},h.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,I.removeCssClass(this.element,"ace_animate-blinking")},h.prototype.setPadding=function(l){this.$padding=l},h.prototype.setSession=function(l){this.session=l},h.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},h.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},h.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,I.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},h.prototype.addCursor=function(){var l=I.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},h.prototype.removeCursor=function(){var l;if(1<this.cursors.length)return(l=this.cursors.pop()).parentNode.removeChild(l),l},h.prototype.hideCursor=function(){this.isVisible=!1,I.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},h.prototype.showCursor=function(){this.isVisible=!0,I.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},h.prototype.restartTimer=function(){var l,c=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,I.removeCssClass(this.element,"ace_smooth-blinking")),c(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&I.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),I.HAS_CSS_ANIMATION?this.$startCssAnimation():(l=function(){this.timeoutId=setTimeout(function(){c(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){c(!0),l()},this.blinkInterval),l())):this.$stopCssAnimation()},h.prototype.getPixelPosition=function(l,c){if(!this.config||!this.session)return{left:0,top:0};l=l||this.session.selection.getCursor();var n=this.session.documentToScreenPosition(l);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,l.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight}},h.prototype.isCursorInView=function(l,c){return 0<=l.top&&l.top<c.maxHeight},h.prototype.update=function(l){this.config=l;for(var c=this.session.$selectionMarkers,s=0,n=0,s=0,i=(c=c!==void 0&&c.length!==0?c:[{cursor:null}]).length;s<i;s++){var o,a,e=this.getPixelPosition(c[s].cursor,!0);(e.top>l.height+l.offset||e.top<0)&&1<s||(a=(o=this.cursors[n++]||this.addCursor()).style,this.drawCursor?this.drawCursor(o,e,l,c[s],this.session):this.isCursorInView(e,l)?(I.setStyle(a,"display","block"),I.translate(o,e.left,e.top),I.setStyle(a,"width",Math.round(l.characterWidth)+"px"),I.setStyle(a,"height",l.lineHeight+"px")):I.setStyle(a,"display","none"))}for(;this.cursors.length>n;)this.removeCursor();var t=this.session.getOverwrite();this.$setOverwrite(t),this.$pixelPos=e,this.restartTimer()},h.prototype.$setOverwrite=function(l){l!=this.overwrite&&((this.overwrite=l)?I.addCssClass(this.element,"ace_overwrite-cursors"):I.removeCssClass(this.element,"ace_overwrite-cursors"))},h.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},h);function h(l){this.element=I.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),I.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}C.prototype.$padding=0,C.prototype.drawCursor=null,f.Cursor=C}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,f,_){var I,C=this&&this.__extends||(I=function(r,d){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(p,g){p.__proto__=g}:function(p,g){for(var A in g)Object.prototype.hasOwnProperty.call(g,A)&&(p[A]=g[A])}))(r,d)},function(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function p(){this.constructor=r}I(r,d),r.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}),i=e("./lib/oop"),h=e("./lib/dom"),l=e("./lib/event"),e=e("./lib/event_emitter").EventEmitter,c=(n.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},n);function n(r,d){this.element=h.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+d,this.inner=h.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}i.implement(c.prototype,e),C(o,s=c),o.prototype.onScroll=function(){var r;this.skipEvent||(this.scrollTop=this.element.scrollTop,this.coeff!=1&&(r=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-r)/(this.coeff-r)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(r){this.element.style.height=r+"px"},o.prototype.setScrollHeight=function(r){32768<(this.scrollHeight=r)?(this.coeff=32768/r,r=32768):this.coeff!=1&&(this.coeff=1),this.inner.style.height=r+"px"},o.prototype.setScrollTop=function(r){this.scrollTop!=r&&(this.skipEvent=!0,this.scrollTop=r,this.element.scrollTop=r*this.coeff)};var s,i=o;function o(r,d){var p=s.call(this,r,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,d.$scrollbarWidth=p.width=h.scrollbarWidth(r.ownerDocument),p.inner.style.width=p.element.style.width=(p.width||15)+5+"px",p.$minWidth=0,p}i.prototype.setInnerHeight=i.prototype.setScrollHeight,C(t,a=c),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(r){this.element.style.width=r+"px"},t.prototype.setInnerWidth=function(r){this.inner.style.width=r+"px"},t.prototype.setScrollWidth=function(r){this.inner.style.width=r+"px"},t.prototype.setScrollLeft=function(r){this.scrollLeft!=r&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=r)};var a,e=t;function t(r,d){return r=a.call(this,r,"-h")||this,r.scrollLeft=0,r.height=d.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+"px",r}f.ScrollBar=i,f.ScrollBarV=i,f.ScrollBarH=e,f.VScrollBar=i,f.HScrollBar=e}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,f,_){var I,C=this&&this.__extends||(I=function(r,d){return(I=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(p,g){p.__proto__=g}:function(p,g){for(var A in g)Object.prototype.hasOwnProperty.call(g,A)&&(p[A]=g[A])}))(r,d)},function(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function p(){this.constructor=r}I(r,d),r.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}),i=e("./lib/oop"),h=e("./lib/dom"),l=e("./lib/event"),e=e("./lib/event_emitter").EventEmitter,c=(h.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
position: absolute;
|
|
background: rgba(128, 128, 128, 0.6);
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border: 1px solid #bbb;
|
|
border-radius: 2px;
|
|
z-index: 8;
|
|
}
|
|
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
position: absolute;
|
|
z-index: 6;
|
|
background: none;
|
|
overflow: hidden!important;
|
|
}
|
|
.ace_editor>.ace_sb-v {
|
|
z-index: 6;
|
|
right: 0;
|
|
top: 0;
|
|
width: 12px;
|
|
}
|
|
.ace_editor>.ace_sb-v div {
|
|
z-index: 8;
|
|
right: 0;
|
|
width: 100%;
|
|
}
|
|
.ace_editor>.ace_sb-h {
|
|
bottom: 0;
|
|
left: 0;
|
|
height: 12px;
|
|
}
|
|
.ace_editor>.ace_sb-h div {
|
|
bottom: 0;
|
|
height: 100%;
|
|
}
|
|
.ace_editor>.ace_sb_grabbed {
|
|
z-index: 8;
|
|
background: #000;
|
|
}`,"ace_scrollbar.css",!1),n.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},n);function n(r,d){this.element=h.createElement("div"),this.element.className="ace_sb"+d,this.inner=h.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}i.implement(c.prototype,e),C(o,s=c),o.prototype.onMouseDown=function(r,d){var p,g,A,x,E;if(r==="mousedown"&&l.getButton(d)===0&&d.detail!==2)return d.target===this.inner?(p=this,g=d.clientY,A=d.clientY,x=this.thumbTop,l.capture(this.inner,function(W){g=W.clientY},function(){clearInterval(E)}),E=setInterval(function(){var W;g!==void 0&&(W=p.scrollTopFromThumbTop(x+g-A))!==p.scrollTop&&p._emit("scroll",{data:W})},20)):(r=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2,this._emit("scroll",{data:this.scrollTopFromThumbTop(r)})),l.preventDefault(d)},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(r){return r=r*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight),(r>>=0)<0?r=0:r>this.pageHeight-this.viewHeight&&(r=this.pageHeight-this.viewHeight),r},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(r){this.height=Math.max(0,r),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(r,d){(this.pageHeight!==r||d)&&(this.pageHeight=r,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight)&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop}))},o.prototype.setScrollTop=function(r){this.scrollTop=r,this.thumbTop=(r=r<0?0:r)*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"};var s,i=o;function o(r,d){var p=s.call(this,r,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,p.parent=r,p.width=p.VScrollWidth,p.renderer=d,p.inner.style.width=p.element.style.width=(p.width||15)+"px",p.$minWidth=0,p}i.prototype.setInnerHeight=i.prototype.setScrollHeight,C(t,a=c),t.prototype.onMouseDown=function(r,d){var p,g,A,x,E;if(r==="mousedown"&&l.getButton(d)===0&&d.detail!==2)return d.target===this.inner?(p=this,g=d.clientX,A=d.clientX,x=this.thumbLeft,l.capture(this.inner,function(W){g=W.clientX},function(){clearInterval(E)}),E=setInterval(function(){var W;g!==void 0&&(W=p.scrollLeftFromThumbLeft(x+g-A))!==p.scrollLeft&&p._emit("scroll",{data:W})},20)):(r=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2,this._emit("scroll",{data:this.scrollLeftFromThumbLeft(r)})),l.preventDefault(d)},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(r){return r=r*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth),(r>>=0)<0?r=0:r>this.pageWidth-this.viewWidth&&(r=this.pageWidth-this.viewWidth),r},t.prototype.setWidth=function(r){this.width=Math.max(0,r),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(r,d){(this.pageWidth!==r||d)&&(this.pageWidth=r,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth)&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft}))},t.prototype.setScrollLeft=function(r){this.scrollLeft=r,this.thumbLeft=(r=r<0?0:r)*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"};var a,e=t;function t(r,d){return r=a.call(this,r,"-h")||this,r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+"px",r.renderer=d,r}e.prototype.setInnerWidth=e.prototype.setScrollWidth,f.ScrollBar=i,f.ScrollBarV=i,f.ScrollBarH=e,f.VScrollBar=i,f.HScrollBar=e}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(w,f,_){var I=w("./lib/event");function C(h,l){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var c=this;this._flush=function(n){c.pending=!1;var s=c.changes;s&&(I.blockIdle(100),c.changes=0,c.onRender(s)),c.changes?c.$recursionLimit--<0||c.schedule():c.$recursionLimit=2}}C.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(I.nextFrame(this._flush),this.pending=!0)},C.prototype.clear=function(h){var l=this.changes;return this.changes=0,l},f.RenderLoop=C}),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(n,f,_){var I=n("../lib/oop"),C=n("../lib/dom"),h=n("../lib/lang"),l=n("../lib/event"),c=n("../lib/useragent"),n=n("../lib/event_emitter").EventEmitter,s=typeof ResizeObserver=="function",i=(o.prototype.$setMeasureNodeStyles=function(a,e){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",c.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=e?"hidden":"visible"},o.prototype.checkForSizeChanges=function(a){var e;!(a=a===void 0?this.$measureSizes():a)||this.$characterSize.width===a.width&&this.$characterSize.height===a.height||(this.$measureNode.style.fontWeight="bold",e=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=e&&e.width===a.width&&e.height===a.height,this._emit("changeCharacterSize",{data:a}))},o.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(e){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},o.prototype.$pollSizeChanges=function(){var a;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(a=this).$pollSizeChangesTimer=l.onIdle(function e(){a.checkForSizeChanges(),l.onIdle(e,500)},500)},o.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(a){return a={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/512},a.width===0||a.height===0?null:a},o.prototype.$measureCharWidth=function(a){return this.$main.textContent=h.stringRepeat(a,512),this.$main.getBoundingClientRect().width/512},o.prototype.getCharacterWidth=function(a){var e=this.charSizes[a];return e=e===void 0?this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width:e},o.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},o.prototype.$getZoom=function(a){return a&&a.parentElement?(window.getComputedStyle(a).zoom||1)*this.$getZoom(a.parentElement):1},o.prototype.$initTransformMeasureNodes=function(){function a(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=C.buildDom([a(0,0),a(200,0),a(0,200),a(200,200)],this.el)},o.prototype.transformCoordinates=function(a,e){function t(V,u,v){var $=V[1]*u[0]-V[0]*u[1];return[(-u[1]*v[0]+u[0]*v[1])/$,(+V[1]*v[0]-V[0]*v[1])/$]}function r(V,u){return[V[0]-u[0],V[1]-u[1]]}function d(V,u){return[V[0]+u[0],V[1]+u[1]]}function p(V,u){return[V*u[0],V*u[1]]}function g(V){return V=V.getBoundingClientRect(),[V.left,V.top]}a=a&&p(1/this.$getZoom(this.el),a),this.els||this.$initTransformMeasureNodes();var A,x=g(this.els[0]),W=g(this.els[1]),B=g(this.els[2]),E=g(this.els[3]),E=t(r(E,W),r(E,B),r(d(W,B),d(E,x))),W=p(1+E[0],r(W,x)),B=p(1+E[1],r(B,x));return e?(A=E[0]*e[0]/200+E[1]*e[1]/200+1,e=d(p(e[0],W),p(e[1],B)),d(p(1/A/200,e),x)):(A=r(a,x),e=t(r(W,p(E[0],A)),r(B,p(E[1],A)),A),p(200,e))},o);function o(a){this.el=C.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=C.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=C.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=h.stringRepeat("X",512),this.$characterSize={width:0,height:0},s?this.$addObserver():this.checkForSizeChanges()}i.prototype.$characterSize={width:0,height:0},I.implement(i.prototype,n),f.FontMetrics=i}),ace.define("ace/css/editor-css",["require","exports","module"],function(w,f,_){_.exports=`
|
|
.ace_br1 {border-top-left-radius : 3px;}
|
|
.ace_br2 {border-top-right-radius : 3px;}
|
|
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
|
|
|
|
.ace_editor {
|
|
position: relative;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
direction: ltr;
|
|
text-align: left;
|
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
}
|
|
|
|
.ace_scroller {
|
|
position: absolute;
|
|
overflow: hidden;
|
|
top: 0;
|
|
bottom: 0;
|
|
background-color: inherit;
|
|
-ms-user-select: none;
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
cursor: text;
|
|
}
|
|
|
|
.ace_content {
|
|
position: absolute;
|
|
box-sizing: border-box;
|
|
min-width: 100%;
|
|
contain: style size layout;
|
|
font-variant-ligatures: no-common-ligatures;
|
|
}
|
|
|
|
.ace_keyboard-focus:focus {
|
|
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
outline: none;
|
|
}
|
|
|
|
.ace_dragging .ace_scroller:before{
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
content: '';
|
|
background: rgba(250, 250, 250, 0.01);
|
|
z-index: 1000;
|
|
}
|
|
.ace_dragging.ace_dark .ace_scroller:before{
|
|
background: rgba(0, 0, 0, 0.01);
|
|
}
|
|
|
|
.ace_gutter {
|
|
position: absolute;
|
|
overflow : hidden;
|
|
width: auto;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
cursor: default;
|
|
z-index: 4;
|
|
-ms-user-select: none;
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
contain: style size layout;
|
|
}
|
|
|
|
.ace_gutter-active-line {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.ace_scroller.ace_scroll-left:after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding-left: 19px;
|
|
padding-right: 6px;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
margin-left: -14px;
|
|
float: left;
|
|
}
|
|
|
|
.ace_gutter-cell .ace_gutter_annotation {
|
|
margin-left: -19px;
|
|
float: left;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
|
background-repeat: no-repeat;
|
|
background-position: 2px center;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
|
background-repeat: no-repeat;
|
|
background-position: 2px center;
|
|
}
|
|
|
|
.ace_gutter-cell.ace_info, .ace_icon.ace_info {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
background-repeat: no-repeat;
|
|
background-position: 2px center;
|
|
}
|
|
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
}
|
|
|
|
.ace_icon_svg.ace_error {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
background-color: crimson;
|
|
}
|
|
.ace_icon_svg.ace_warning {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
background-color: darkorange;
|
|
}
|
|
.ace_icon_svg.ace_info {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
background-color: royalblue;
|
|
}
|
|
|
|
.ace_icon_svg.ace_error_fold {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
background-color: crimson;
|
|
}
|
|
.ace_icon_svg.ace_warning_fold {
|
|
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
background-color: darkorange;
|
|
}
|
|
|
|
.ace_scrollbar {
|
|
contain: strict;
|
|
position: absolute;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 6;
|
|
}
|
|
|
|
.ace_scrollbar-inner {
|
|
position: absolute;
|
|
cursor: text;
|
|
left: 0;
|
|
top: 0;
|
|
}
|
|
|
|
.ace_scrollbar-v{
|
|
overflow-x: hidden;
|
|
overflow-y: scroll;
|
|
top: 0;
|
|
}
|
|
|
|
.ace_scrollbar-h {
|
|
overflow-x: scroll;
|
|
overflow-y: hidden;
|
|
left: 0;
|
|
}
|
|
|
|
.ace_print-margin {
|
|
position: absolute;
|
|
height: 100%;
|
|
}
|
|
|
|
.ace_text-input {
|
|
position: absolute;
|
|
z-index: 0;
|
|
width: 0.5em;
|
|
height: 1em;
|
|
opacity: 0;
|
|
background: transparent;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
border: none;
|
|
resize: none;
|
|
outline: none;
|
|
overflow: hidden;
|
|
font: inherit;
|
|
padding: 0 1px;
|
|
margin: 0 -1px;
|
|
contain: strict;
|
|
-ms-user-select: text;
|
|
-moz-user-select: text;
|
|
-webkit-user-select: text;
|
|
user-select: text;
|
|
/*with \`pre-line\` chrome inserts instead of space*/
|
|
white-space: pre!important;
|
|
}
|
|
.ace_text-input.ace_composition {
|
|
background: transparent;
|
|
color: inherit;
|
|
z-index: 1000;
|
|
opacity: 1;
|
|
}
|
|
.ace_composition_placeholder { color: transparent }
|
|
.ace_composition_marker {
|
|
border-bottom: 1px solid;
|
|
position: absolute;
|
|
border-radius: 0;
|
|
margin-top: 1px;
|
|
}
|
|
|
|
[ace_nocontext=true] {
|
|
transform: none!important;
|
|
filter: none!important;
|
|
clip-path: none!important;
|
|
mask : none!important;
|
|
contain: none!important;
|
|
perspective: none!important;
|
|
mix-blend-mode: initial!important;
|
|
z-index: auto;
|
|
}
|
|
|
|
.ace_layer {
|
|
z-index: 1;
|
|
position: absolute;
|
|
overflow: hidden;
|
|
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
word-wrap: normal;
|
|
white-space: pre;
|
|
height: 100%;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
during scroll, will break mouse wheel scrolling in Safari */
|
|
pointer-events: none;
|
|
}
|
|
|
|
.ace_gutter-layer {
|
|
position: relative;
|
|
width: auto;
|
|
text-align: right;
|
|
pointer-events: auto;
|
|
height: 1000000px;
|
|
contain: style size layout;
|
|
}
|
|
|
|
.ace_text-layer {
|
|
font: inherit !important;
|
|
position: absolute;
|
|
height: 1000000px;
|
|
width: 1000000px;
|
|
contain: style size layout;
|
|
}
|
|
|
|
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
contain: style size layout;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.ace_hidpi .ace_text-layer,
|
|
.ace_hidpi .ace_gutter-layer,
|
|
.ace_hidpi .ace_content,
|
|
.ace_hidpi .ace_gutter {
|
|
contain: strict;
|
|
}
|
|
.ace_hidpi .ace_text-layer > .ace_line,
|
|
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
contain: strict;
|
|
}
|
|
|
|
.ace_cjk {
|
|
display: inline-block;
|
|
text-align: center;
|
|
}
|
|
|
|
.ace_cursor-layer {
|
|
z-index: 4;
|
|
}
|
|
|
|
.ace_cursor {
|
|
z-index: 4;
|
|
position: absolute;
|
|
box-sizing: border-box;
|
|
border-left: 2px solid;
|
|
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
transform: translatez(0);
|
|
}
|
|
|
|
.ace_multiselect .ace_cursor {
|
|
border-left-width: 1px;
|
|
}
|
|
|
|
.ace_slim-cursors .ace_cursor {
|
|
border-left-width: 1px;
|
|
}
|
|
|
|
.ace_overwrite-cursors .ace_cursor {
|
|
border-left-width: 0;
|
|
border-bottom: 1px solid;
|
|
}
|
|
|
|
.ace_hidden-cursors .ace_cursor {
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
opacity: 0;
|
|
}
|
|
|
|
.ace_smooth-blinking .ace_cursor {
|
|
transition: opacity 0.18s;
|
|
}
|
|
|
|
.ace_animate-blinking .ace_cursor {
|
|
animation-duration: 1000ms;
|
|
animation-timing-function: step-end;
|
|
animation-name: blink-ace-animate;
|
|
animation-iteration-count: infinite;
|
|
}
|
|
|
|
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
animation-duration: 1000ms;
|
|
animation-timing-function: ease-in-out;
|
|
animation-name: blink-ace-animate-smooth;
|
|
}
|
|
|
|
@keyframes blink-ace-animate {
|
|
from, to { opacity: 1; }
|
|
60% { opacity: 0; }
|
|
}
|
|
|
|
@keyframes blink-ace-animate-smooth {
|
|
from, to { opacity: 1; }
|
|
45% { opacity: 1; }
|
|
60% { opacity: 0; }
|
|
85% { opacity: 0; }
|
|
}
|
|
|
|
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
position: absolute;
|
|
z-index: 3;
|
|
}
|
|
|
|
.ace_marker-layer .ace_selection {
|
|
position: absolute;
|
|
z-index: 5;
|
|
}
|
|
|
|
.ace_marker-layer .ace_bracket {
|
|
position: absolute;
|
|
z-index: 6;
|
|
}
|
|
|
|
.ace_marker-layer .ace_error_bracket {
|
|
position: absolute;
|
|
border-bottom: 1px solid #DE5555;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.ace_marker-layer .ace_active-line {
|
|
position: absolute;
|
|
z-index: 2;
|
|
}
|
|
|
|
.ace_marker-layer .ace_selected-word {
|
|
position: absolute;
|
|
z-index: 4;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.ace_line .ace_fold {
|
|
box-sizing: border-box;
|
|
|
|
display: inline-block;
|
|
height: 11px;
|
|
margin-top: -2px;
|
|
vertical-align: middle;
|
|
|
|
background-image:
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
background-repeat: no-repeat, repeat-x;
|
|
background-position: center center, top left;
|
|
color: transparent;
|
|
|
|
border: 1px solid black;
|
|
border-radius: 2px;
|
|
|
|
cursor: pointer;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.ace_dark .ace_fold {
|
|
}
|
|
|
|
.ace_fold:hover{
|
|
background-image:
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
}
|
|
|
|
.ace_tooltip {
|
|
background-color: #f5f5f5;
|
|
border: 1px solid gray;
|
|
border-radius: 1px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
color: black;
|
|
max-width: 100%;
|
|
padding: 3px 4px;
|
|
position: fixed;
|
|
z-index: 999999;
|
|
box-sizing: border-box;
|
|
cursor: default;
|
|
white-space: pre;
|
|
word-wrap: break-word;
|
|
line-height: normal;
|
|
font-style: normal;
|
|
font-weight: normal;
|
|
letter-spacing: normal;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.ace_tooltip.ace_dark {
|
|
background-color: #636363;
|
|
color: #fff;
|
|
}
|
|
|
|
.ace_tooltip:focus {
|
|
outline: 1px solid #5E9ED6;
|
|
}
|
|
|
|
.ace_icon {
|
|
display: inline-block;
|
|
width: 18px;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.ace_icon_svg {
|
|
display: inline-block;
|
|
width: 12px;
|
|
vertical-align: top;
|
|
-webkit-mask-repeat: no-repeat;
|
|
-webkit-mask-size: 12px;
|
|
-webkit-mask-position: center;
|
|
}
|
|
|
|
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
padding-right: 13px;
|
|
}
|
|
|
|
.ace_fold-widget {
|
|
box-sizing: border-box;
|
|
|
|
margin: 0 -12px 0 1px;
|
|
display: none;
|
|
width: 11px;
|
|
vertical-align: top;
|
|
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
|
|
border-radius: 3px;
|
|
|
|
border: 1px solid transparent;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ace_folding-enabled .ace_fold-widget {
|
|
display: inline-block;
|
|
}
|
|
|
|
.ace_fold-widget.ace_end {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
}
|
|
|
|
.ace_fold-widget.ace_closed {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
}
|
|
|
|
.ace_fold-widget:hover {
|
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.ace_fold-widget:active {
|
|
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
}
|
|
/**
|
|
* Dark version for fold widgets
|
|
*/
|
|
.ace_dark .ace_fold-widget {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
}
|
|
.ace_dark .ace_fold-widget.ace_end {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
}
|
|
.ace_dark .ace_fold-widget.ace_closed {
|
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
}
|
|
.ace_dark .ace_fold-widget:hover {
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
.ace_dark .ace_fold-widget:active {
|
|
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.ace_inline_button {
|
|
border: 1px solid lightgray;
|
|
display: inline-block;
|
|
margin: -1px 8px;
|
|
padding: 0 5px;
|
|
pointer-events: auto;
|
|
cursor: pointer;
|
|
}
|
|
.ace_inline_button:hover {
|
|
border-color: gray;
|
|
background: rgba(200,200,200,0.2);
|
|
display: inline-block;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.ace_fold-widget.ace_invalid {
|
|
background-color: #FFB4B4;
|
|
border-color: #DE5555;
|
|
}
|
|
|
|
.ace_fade-fold-widgets .ace_fold-widget {
|
|
transition: opacity 0.4s ease 0.05s;
|
|
opacity: 0;
|
|
}
|
|
|
|
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
transition: opacity 0.05s ease 0.05s;
|
|
opacity:1;
|
|
}
|
|
|
|
.ace_underline {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.ace_bold {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.ace_nobold .ace_bold {
|
|
font-weight: normal;
|
|
}
|
|
|
|
.ace_italic {
|
|
font-style: italic;
|
|
}
|
|
|
|
|
|
.ace_error-marker {
|
|
background-color: rgba(255, 0, 0,0.2);
|
|
position: absolute;
|
|
z-index: 9;
|
|
}
|
|
|
|
.ace_highlight-marker {
|
|
background-color: rgba(255, 255, 0,0.2);
|
|
position: absolute;
|
|
z-index: 8;
|
|
}
|
|
|
|
.ace_mobile-menu {
|
|
position: absolute;
|
|
line-height: 1.5;
|
|
border-radius: 4px;
|
|
-ms-user-select: none;
|
|
-moz-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
background: white;
|
|
box-shadow: 1px 3px 2px grey;
|
|
border: 1px solid #dcdcdc;
|
|
color: black;
|
|
}
|
|
.ace_dark > .ace_mobile-menu {
|
|
background: #333;
|
|
color: #ccc;
|
|
box-shadow: 1px 3px 2px grey;
|
|
border: 1px solid #444;
|
|
|
|
}
|
|
.ace_mobile-button {
|
|
padding: 2px;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
}
|
|
.ace_mobile-button:hover {
|
|
background-color: #eee;
|
|
opacity:1;
|
|
}
|
|
.ace_mobile-button:active {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
.ace_placeholder {
|
|
font-family: arial;
|
|
transform: scale(0.9);
|
|
transform-origin: left;
|
|
white-space: pre;
|
|
opacity: 0.7;
|
|
margin: 0 10px;
|
|
}
|
|
|
|
.ace_ghost_text {
|
|
opacity: 0.5;
|
|
font-style: italic;
|
|
white-space: pre;
|
|
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(h,f,_){var I=h("../lib/dom"),C=h("../lib/oop"),h=h("../lib/event_emitter").EventEmitter,l=(c.prototype.$updateDecorators=function(n){var s=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light,i=(n&&(this.maxHeight=n.maxHeight,this.lineHeight=n.lineHeight,this.canvasHeight=n.height,(n.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight),this.canvas.getContext("2d")),o=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),o)for(var a={info:1,warning:2,error:3},e=(o.forEach(function(x){x.priority=a[x.type]||null}),o=o.sort(function(x,E){return x.priority<E.priority?-1:x.priority>E.priority?1:0}),this.renderer.session.$foldData),t=0;t<o.length;t++){var r,A=o[t].row,d=this.compensateFoldRows(A,e),p=Math.round((A-d)*this.lineHeight*this.heightRatio),g=Math.round((A-d)*this.lineHeight*this.heightRatio),A=Math.round(((A-d)*this.lineHeight+this.lineHeight)*this.heightRatio);A-g<this.minDecorationHeight&&((r=(g+A)/2|0)<this.halfMinDecorationHeight?r=this.halfMinDecorationHeight:r+this.halfMinDecorationHeight>this.canvasHeight&&(r=this.canvasHeight-this.halfMinDecorationHeight),g=Math.round(r-this.halfMinDecorationHeight),A=Math.round(r+this.halfMinDecorationHeight)),i.fillStyle=s[o[t].type]||null,i.fillRect(0,p,this.canvasWidth,A-g)}n=this.renderer.session.selection.getCursor(),n&&(d=this.compensateFoldRows(n.row,e),p=Math.round((n.row-d)*this.lineHeight*this.heightRatio),i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,p,this.canvasWidth,2))},c.prototype.compensateFoldRows=function(n,s){var i=0;if(s&&0<s.length)for(var o=0;o<s.length;o++)n>s[o].start.row&&n<s[o].end.row?i+=n-s[o].start.row:n>=s[o].end.row&&(i+=s[o].end.row-s[o].start.row);return i},c);function c(n,s){this.canvas=I.createElement("canvas"),this.renderer=s,this.pixelRatio=1,this.maxHeight=s.layerConfig.maxHeight,this.lineHeight=s.layerConfig.lineHeight,this.canvasHeight=n.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=n.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},n.element.appendChild(this.canvas)}C.implement(l.prototype,h),f.Decorator=l}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(E,f,_){var I=E("./lib/oop"),C=E("./lib/dom"),h=E("./lib/lang"),l=E("./config"),c=E("./layer/gutter").Gutter,n=E("./layer/marker").Marker,s=E("./layer/text").Text,i=E("./layer/cursor").Cursor,o=E("./scrollbar").HScrollBar,a=E("./scrollbar").VScrollBar,e=E("./scrollbar_custom").HScrollBar,t=E("./scrollbar_custom").VScrollBar,r=E("./renderloop").RenderLoop,d=E("./layer/font_metrics").FontMetrics,p=E("./lib/event_emitter").EventEmitter,g=E("./css/editor-css"),A=E("./layer/decorators").Decorator,x=E("./lib/useragent"),E=(C.importCssString(g,"ace_editor.css",!1),W.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),C.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},W.prototype.setSession=function(B){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=B)&&this.scrollMargin.top&&B.getScrollTop()<=0&&B.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(B),this.$markerBack.setSession(B),this.$markerFront.setSession(B),this.$gutterLayer.setSession(B),this.$textLayer.setSession(B),B&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},W.prototype.updateLines=function(B,V,u){if(V===void 0&&(V=1/0),this.$changedLines?(this.$changedLines.firstRow>B&&(this.$changedLines.firstRow=B),this.$changedLines.lastRow<V&&(this.$changedLines.lastRow=V)):this.$changedLines={firstRow:B,lastRow:V},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!u)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},W.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},W.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},W.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},W.prototype.updateFull=function(B){B?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},W.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},W.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},W.prototype.onResize=function(B,V,u,v){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=B?1:0;var $=this.container,$=(v=v||$.clientHeight||$.scrollHeight,u=u||$.clientWidth||$.scrollWidth,this.$updateCachedSize(B,V,u,v));if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!u&&!v)return this.resizing=0;B&&(this.$gutterLayer.$padding=null),B?this.$renderChanges($|this.$changes,!0):this.$loop.schedule($|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},W.prototype.$updateCachedSize=function(B,V,u,v){v-=this.$extraHeight||0;var $=0,y=this.$size,L={width:y.width,height:y.height,scrollerHeight:y.scrollerHeight,scrollerWidth:y.scrollerWidth};return v&&(B||y.height!=v)&&(y.height=v,$|=this.CHANGE_SIZE,y.scrollerHeight=y.height,this.$horizScroll&&(y.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(y.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$|=this.CHANGE_SCROLL),u&&(B||y.width!=u)&&($|=this.CHANGE_SIZE,y.width=u,V==null&&(V=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=V,C.setStyle(this.scrollBarH.element.style,"left",V+"px"),C.setStyle(this.scroller.style,"left",V+this.margin.left+"px"),y.scrollerWidth=Math.max(0,u-V-this.scrollBarV.getWidth()-this.margin.h),C.setStyle(this.$gutter.style,"left",this.margin.left+"px"),V=this.scrollBarV.getWidth()+"px",C.setStyle(this.scrollBarH.element.style,"right",V),C.setStyle(this.scroller.style,"right",V),C.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(y.scrollerWidth),this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||B)&&($|=this.CHANGE_FULL),y.$dirty=!u||!v,$&&this._signal("resize",L),$},W.prototype.onGutterResize=function(B){B=this.$showGutter?B:0,B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},W.prototype.adjustWrapLimit=function(){var B=this.$size.scrollerWidth-2*this.$padding,B=Math.floor(B/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},W.prototype.setAnimatedScroll=function(B){this.setOption("animatedScroll",B)},W.prototype.getAnimatedScroll=function(){return this.$animatedScroll},W.prototype.setShowInvisibles=function(B){this.setOption("showInvisibles",B),this.session.$bidiHandler.setShowInvisibles(B)},W.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},W.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},W.prototype.setDisplayIndentGuides=function(B){this.setOption("displayIndentGuides",B)},W.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},W.prototype.setHighlightIndentGuides=function(B){this.setOption("highlightIndentGuides",B)},W.prototype.setShowPrintMargin=function(B){this.setOption("showPrintMargin",B)},W.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},W.prototype.setPrintMarginColumn=function(B){this.setOption("printMarginColumn",B)},W.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},W.prototype.getShowGutter=function(){return this.getOption("showGutter")},W.prototype.setShowGutter=function(B){return this.setOption("showGutter",B)},W.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},W.prototype.setFadeFoldWidgets=function(B){this.setOption("fadeFoldWidgets",B)},W.prototype.setHighlightGutterLine=function(B){this.setOption("highlightGutterLine",B)},W.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},W.prototype.$updatePrintMargin=function(){var B;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((B=C.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=C.createElement("div"),this.$printMarginEl.className="ace_print-margin",B.appendChild(this.$printMarginEl),this.content.insertBefore(B,this.content.firstChild)),(B=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.visibility=this.$showPrintMargin?"visible":"hidden",this.session)&&this.session.$wrap==-1&&this.adjustWrapLimit()},W.prototype.getContainerElement=function(){return this.container},W.prototype.getMouseEventTarget=function(){return this.scroller},W.prototype.getTextAreaContainer=function(){return this.container},W.prototype.$moveTextAreaToCursor=function(){var B,V,u,v,$,y,L;this.$isMousePressed||(B=this.textarea.style,y=this.$composition,this.$keepTextAreaAtCursor||y?(u=this.$cursorLayer.$pixelPos)&&(y&&y.markerRange&&(u=this.$cursorLayer.getPixelPosition(y.markerRange.start,!0)),L=this.layerConfig,V=u.top,u=u.left,V-=L.offset,v=y&&y.useTextareaForIME||x.isMobile?this.lineHeight:1,V<0||V>L.height-v?C.translate(this.textarea,0,0):(L=1,$=this.$size.height-v,y?y.useTextareaForIME?(y=this.textarea.value,L=this.characterWidth*this.session.$getStringScreenWidth(y)[0]):V+=this.lineHeight+2:V+=this.lineHeight,(u-=this.scrollLeft)>this.$size.scrollerWidth-L&&(u=this.$size.scrollerWidth-L),u+=this.gutterWidth+this.margin.left,C.setStyle(B,"height",v+"px"),C.setStyle(B,"width",L+"px"),C.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-L),Math.min(V,$)))):C.translate(this.textarea,-100,0))},W.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},W.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},W.prototype.getLastFullyVisibleRow=function(){var B=this.layerConfig,V=B.lastRow;return this.session.documentToScreenRow(V,0)*B.lineHeight-this.session.getScrollTop()>B.height-B.lineHeight?V-1:V},W.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},W.prototype.setPadding=function(B){this.$padding=B,this.$textLayer.setPadding(B),this.$cursorLayer.setPadding(B),this.$markerFront.setPadding(B),this.$markerBack.setPadding(B),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},W.prototype.setScrollMargin=function(B,V,u,v){var $=this.scrollMargin;$.top=0|B,$.bottom=0|V,$.right=0|v,$.left=0|u,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},W.prototype.setMargin=function(B,V,u,v){var $=this.margin;$.top=0|B,$.bottom=0|V,$.right=0|v,$.left=0|u,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},W.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},W.prototype.setHScrollBarAlwaysVisible=function(B){this.setOption("hScrollBarAlwaysVisible",B)},W.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},W.prototype.setVScrollBarAlwaysVisible=function(B){this.setOption("vScrollBarAlwaysVisible",B)},W.prototype.$updateScrollBarV=function(){var B=this.layerConfig.maxHeight,V=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(B-=(V-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>B-V)&&(B=this.scrollTop+V,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(B+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},W.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},W.prototype.freeze=function(){this.$frozen=!0},W.prototype.unfreeze=function(){this.$frozen=!1},W.prototype.$renderChanges=function(B,V){if(this.$changes&&(B|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(B||V)){if(this.$size.$dirty)return this.$changes|=B,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",B),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var u,v,V=this.layerConfig;(B&this.CHANGE_FULL||B&this.CHANGE_SIZE||B&this.CHANGE_TEXT||B&this.CHANGE_LINES||B&this.CHANGE_SCROLL||B&this.CHANGE_H_SCROLL)&&(B|=this.$computeLayerConfig()|this.$loop.clear(),V.firstRow!=this.layerConfig.firstRow&&V.firstRowScreen==this.layerConfig.firstRowScreen&&0<(u=this.scrollTop+(V.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight)&&(this.scrollTop=u,B=(B|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),V=this.layerConfig,this.$updateScrollBarV(),B&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),C.translate(this.content,-this.scrollLeft,-V.offset),u=V.width+2*this.$padding+"px",v=V.minHeight+"px",C.setStyle(this.content.style,"width",u),C.setStyle(this.content.style,"height",v)),B&this.CHANGE_H_SCROLL&&(C.translate(this.content,-this.scrollLeft,-V.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility)&&(this.scroller.className+=this.keyboardFocusClassName),B&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(V),this.$showGutter&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V),this.$markerBack.update(V),this.$markerFront.update(V),this.$cursorLayer.update(V),this.$moveTextAreaToCursor()):B&this.CHANGE_SCROLL?(this.$changedLines=null,B&this.CHANGE_TEXT||B&this.CHANGE_LINES?this.$textLayer.update(V):this.$textLayer.scrollLines(V),this.$showGutter&&(B&this.CHANGE_GUTTER||B&this.CHANGE_LINES?this.$gutterLayer.update(V):this.$gutterLayer.scrollLines(V)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V),this.$markerBack.update(V),this.$markerFront.update(V),this.$cursorLayer.update(V),this.$moveTextAreaToCursor()):(B&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(V),this.$showGutter&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V)):B&this.CHANGE_LINES?((this.$updateLines()||B&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V)):B&this.CHANGE_TEXT||B&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(V),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(V)):B&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(V),this.$customScrollbar)&&this.$scrollDecorator.$updateDecorators(V),B&this.CHANGE_CURSOR&&(this.$cursorLayer.update(V),this.$moveTextAreaToCursor()),B&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(V),B&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(V)),this._signal("afterRender",B)}else this.$changes|=B},W.prototype.$autosize=function(){var B=this.session.getScreenLength()*this.lineHeight,V=this.$maxLines*this.lineHeight,u=Math.min(V,Math.max((this.$minLines||1)*this.lineHeight,B))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(u+=this.scrollBarH.getHeight()),V=!((u=this.$maxPixelHeight&&u>this.$maxPixelHeight?this.$maxPixelHeight:u)<=2*this.lineHeight)&&V<B,u==this.desiredHeight&&this.$size.height==this.desiredHeight&&V==this.$vScroll||(V!=this.$vScroll&&(this.$vScroll=V,this.scrollBarV.setVisible(V)),B=this.container.clientWidth,this.container.style.height=u+"px",this.$updateCachedSize(!0,this.$gutterWidth,B,u),this.desiredHeight=u,this._signal("autosize"))},W.prototype.$computeLayerConfig=function(){var B,ee=this.session,V=this.$size,Q=V.height<=2*this.lineHeight,u=this.session.getScreenLength()*this.lineHeight,v=this.$getLongestLine(),G=!Q&&(this.$hScrollBarAlwaysVisible||V.scrollerWidth-v-2*this.$padding<0),$=this.$horizScroll!==G,G=($&&(this.$horizScroll=G,this.scrollBarH.setVisible(G)),this.$vScroll),y=(this.$maxLines&&1<this.lineHeight&&this.$autosize(),V.scrollerHeight+this.lineHeight),L=!this.$maxLines&&this.$scrollPastEnd?(V.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,H=(u+=L,this.scrollMargin),Q=(this.session.setScrollTop(Math.max(-H.top,Math.min(this.scrollTop,u-V.scrollerHeight+H.bottom))),this.session.setScrollLeft(Math.max(-H.left,Math.min(this.scrollLeft,v+2*this.$padding-V.scrollerWidth+H.right))),!Q&&(this.$vScrollBarAlwaysVisible||V.scrollerHeight-u+L<0||this.scrollTop>H.top)),L=G!==Q,H=(L&&(this.$vScroll=Q,this.scrollBarV.setVisible(Q)),this.scrollTop%this.lineHeight),G=Math.ceil(y/this.lineHeight)-1,G=(Q=Math.max(0,Math.round((this.scrollTop-H)/this.lineHeight)))+G,Y=this.lineHeight,Q=ee.screenToDocumentRow(Q,0),z=ee.getFoldLine(Q),ee=(z&&(Q=z.start.row),z=ee.documentToScreenRow(Q,0),B=ee.getRowLength(Q)*Y,G=Math.min(ee.screenToDocumentRow(G,0),ee.getLength()-1),y=V.scrollerHeight+ee.getRowLength(G)*Y+B,H=this.scrollTop-z*Y,0);return this.layerConfig.width==v&&!$||(ee=this.CHANGE_H_SCROLL),($||L)&&(ee|=this.$updateCachedSize(!0,this.gutterWidth,V.width,V.height),this._signal("scrollbarVisibilityChanged"),L)&&(v=this.$getLongestLine()),this.layerConfig={width:v,padding:this.$padding,firstRow:Q,firstRowScreen:z,lastRow:G,lineHeight:Y,characterWidth:this.characterWidth,minHeight:y,maxHeight:u,offset:H,gutterOffset:Y?Math.max(0,Math.ceil((H+V.height-V.scrollerHeight)/Y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),ee},W.prototype.$updateLines=function(){if(this.$changedLines){var B=this.$changedLines.firstRow,V=this.$changedLines.lastRow,u=(this.$changedLines=null,this.layerConfig);if(!(B>u.lastRow+1||V<u.firstRow)){if(V!==1/0)return this.$textLayer.updateLines(u,B,V),!0;this.$showGutter&&this.$gutterLayer.update(u),this.$textLayer.update(u)}}},W.prototype.$getLongestLine=function(){var B=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(B+=1),this.$textLayer&&B>this.$textLayer.MAX_LINE_LENGTH&&(B=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(B*this.characterWidth))},W.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},W.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},W.prototype.addGutterDecoration=function(B,V){this.$gutterLayer.addGutterDecoration(B,V)},W.prototype.removeGutterDecoration=function(B,V){this.$gutterLayer.removeGutterDecoration(B,V)},W.prototype.updateBreakpoints=function(B){this.$loop.schedule(this.CHANGE_GUTTER)},W.prototype.setAnnotations=function(B){this.$gutterLayer.setAnnotations(B),this.$loop.schedule(this.CHANGE_GUTTER)},W.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},W.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},W.prototype.showCursor=function(){this.$cursorLayer.showCursor()},W.prototype.scrollSelectionIntoView=function(B,V,u){this.scrollCursorIntoView(B,u),this.scrollCursorIntoView(V,u)},W.prototype.scrollCursorIntoView=function(B,V,u){var v,$,y;this.$size.scrollerHeight!==0&&(v=(B=this.$cursorLayer.getPixelPosition(B)).left,B=B.top,$=u&&u.top||0,u=u&&u.bottom||0,this.$scrollAnimation&&(this.$stopAnimation=!0),B<(y=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+$?(V&&y+$>B+this.lineHeight&&(B-=V*this.$size.scrollerHeight),B===0&&(B=-this.scrollMargin.top),this.session.setScrollTop(B)):y+this.$size.scrollerHeight-u<B+this.lineHeight&&(V&&y+this.$size.scrollerHeight-u<B-this.lineHeight&&(B+=V*this.$size.scrollerHeight),this.session.setScrollTop(B+this.lineHeight+u-this.$size.scrollerHeight)),$=this.scrollLeft,v-(y=2*this.layerConfig.characterWidth)<$?((v-=y)<this.$padding+y&&(v=-this.scrollMargin.left),this.session.setScrollLeft(v)):$+this.$size.scrollerWidth<(v+=y)+this.characterWidth?this.session.setScrollLeft(Math.round(v+this.characterWidth-this.$size.scrollerWidth)):$<=this.$padding&&v-$<this.characterWidth&&this.session.setScrollLeft(0))},W.prototype.getScrollTop=function(){return this.session.getScrollTop()},W.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},W.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},W.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},W.prototype.scrollToRow=function(B){this.session.setScrollTop(B*this.lineHeight)},W.prototype.alignCursor=function(v,V){var v=this.$cursorLayer.getPixelPosition(v=typeof v=="number"?{row:v,column:0}:v),u=this.$size.scrollerHeight-this.lineHeight,v=v.top-u*(V||0);return this.session.setScrollTop(v),v},W.prototype.$calcSteps=function(B,V){for(var u,v,L=0,$=this.STEPS,y=[],L=0;L<$;++L)y.push((u=L/this.STEPS,(V-(v=B))*(Math.pow(u-1,3)+1)+v));return y},W.prototype.scrollToLine=function(B,V,u,v){B=this.$cursorLayer.getPixelPosition({row:B,column:0}).top,V&&(B-=this.$size.scrollerHeight/2),V=this.scrollTop,this.session.setScrollTop(B),u!==!1&&this.animateScrolling(V,v)},W.prototype.animateScrolling=function(B,V){var u=this.scrollTop;if(this.$animatedScroll){var v=this;if(B!=u){if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(B=$[0])==u)return}var y=v.$calcSteps(B,u);this.$scrollAnimation={from:B,to:u,steps:y},clearInterval(this.$timer),v.session.setScrollTop(y.shift()),v.session.$scrollTop=u,this.$timer=setInterval(function(){if(!v.$stopAnimation)return v.session?void(y.length?(v.session.setScrollTop(y.shift()),v.session.$scrollTop=u):u!=null?(v.session.$scrollTop=-1,v.session.setScrollTop(u),u=null):L()):clearInterval(v.$timer);L()},10)}}function L(){v.$timer=clearInterval(v.$timer),v.$scrollAnimation=null,v.$stopAnimation=!1,V&&V()}},W.prototype.scrollToY=function(B){this.scrollTop!==B&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=B)},W.prototype.scrollToX=function(B){this.scrollLeft!==B&&(this.scrollLeft=B),this.$loop.schedule(this.CHANGE_H_SCROLL)},W.prototype.scrollTo=function(B,V){this.session.setScrollTop(V),this.session.setScrollLeft(B)},W.prototype.scrollBy=function(B,V){V&&this.session.setScrollTop(this.session.getScrollTop()+V),B&&this.session.setScrollLeft(this.session.getScrollLeft()+B)},W.prototype.isScrollableBy=function(B,V){return V<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<V&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||B<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<B&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},W.prototype.pixelToScreenCoordinates=function(v,$){this.$hasCssTransforms?(y={top:0,left:0},v=(u=this.$fontMetrics.transformCoordinates([v,$]))[1]-this.gutterWidth-this.margin.left,$=u[0]):y=this.scroller.getBoundingClientRect();var u=v+this.scrollLeft-y.left-this.$padding,v=u/this.characterWidth,$=Math.floor(($+this.scrollTop-y.top)/this.lineHeight),y=this.$blockCursor?Math.floor(v):Math.round(v);return{row:$,column:y,side:0<v-y?1:-1,offsetX:u}},W.prototype.screenToTextCoordinates=function($,y){this.$hasCssTransforms?(u={top:0,left:0},$=(v=this.$fontMetrics.transformCoordinates([$,y]))[1]-this.gutterWidth-this.margin.left,y=v[0]):u=this.scroller.getBoundingClientRect();var u,v=$+this.scrollLeft-u.left-this.$padding,$=v/this.characterWidth,$=this.$blockCursor?Math.floor($):Math.round($),y=Math.floor((y+this.scrollTop-u.top)/this.lineHeight);return this.session.screenToDocumentPosition(y,Math.max($,0),v)},W.prototype.textToScreenCoordinates=function(v,$){var u=this.scroller.getBoundingClientRect(),$=this.session.documentToScreenPosition(v,$),v=this.$padding+(this.session.$bidiHandler.isBidiRow($.row,v)?this.session.$bidiHandler.getPosLeft($.column):Math.round($.column*this.characterWidth)),$=$.row*this.lineHeight;return{pageX:u.left+v-this.scrollLeft,pageY:u.top+$-this.scrollTop}},W.prototype.visualizeFocus=function(){C.addCssClass(this.container,"ace_focus")},W.prototype.visualizeBlur=function(){C.removeCssClass(this.container,"ace_focus")},W.prototype.showComposition=function(B){(this.$composition=B).cssText||(B.cssText=this.textarea.style.cssText),B.useTextareaForIME==null&&(B.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(C.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):B.markerId=this.session.addMarker(B.markerRange,"ace_composition_marker","text")},W.prototype.setCompositionText=function(B){var V=this.session.selection.cursor;this.addToken(B,"composition_placeholder",V.row,V.column),this.$moveTextAreaToCursor()},W.prototype.hideComposition=function(){var B;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),C.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,B=this.session.selection.cursor,this.removeExtraToken(B.row,B.column),this.$composition=null,this.$cursorLayer.element.style.display="")},W.prototype.setGhostText=function(B,u){var v=this.session.selection.cursor,u=u||{row:v.row,column:v.column},v=(this.removeGhostText(),B.split(`
|
|
`));this.addToken(v[0],"ghost_text",u.row,u.column),this.$ghostText={text:B,position:{row:u.row,column:u.column}},1<v.length&&(this.$ghostTextWidget={text:v.slice(1).join(`
|
|
`),row:u.row,column:u.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},W.prototype.removeGhostText=function(){var B;this.$ghostText&&(B=this.$ghostText.position,this.removeExtraToken(B.row,B.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null)},W.prototype.addToken=function(B,V,u,v){var $=this.session,y=($.bgTokenizer.lines[u]=null,{type:V,value:B}),L=$.getTokens(u);if(v!=null&&L.length)for(var H=0,G=0;G<L.length;G++){var Y=L[G];if(v<=(H+=Y.value.length)){var z=Y.value.length-(H-v),Q=Y.value.slice(0,z),z=Y.value.slice(z);L.splice(G,1,{type:Y.type,value:Q},y,{type:Y.type,value:z});break}}else L.push(y);this.updateLines(u,u)},W.prototype.removeExtraToken=function(B,V){this.session.bgTokenizer.lines[B]=null,this.updateLines(B,B)},W.prototype.setTheme=function(B,V){var u,v=this;function $(y){if(v.$themeId!=B)return V&&V();if(!y||!y.cssClass)throw new Error("couldn't load module "+B+" or it didn't call define");y.$id&&(v.$themeId=y.$id),C.importCssString(y.cssText,y.cssClass,v.container),v.theme&&C.removeCssClass(v.container,v.theme.cssClass);var L="padding"in y?y.padding:"padding"in(v.theme||{})?4:v.$padding;v.$padding&&L!=v.$padding&&v.setPadding(L),v.$theme=y.cssClass,v.theme=y,C.addCssClass(v.container,y.cssClass),C.setCssClass(v.container,"ace_dark",y.isDark),v.$size&&(v.$size.width=0,v.$updateSizeAsync()),v._dispatchEvent("themeLoaded",{theme:y}),V&&V()}this.$themeId=B,v._dispatchEvent("themeChange",{theme:B}),B&&typeof B!="string"?$(B):(u=B||this.$options.theme.initialValue,l.loadModule(["theme",u],$))},W.prototype.getTheme=function(){return this.$themeId},W.prototype.setStyle=function(B,V){C.setCssClass(this.container,B,V!==!1)},W.prototype.unsetStyle=function(B){C.removeCssClass(this.container,B)},W.prototype.setCursorStyle=function(B){C.setStyle(this.scroller.style,"cursor",B)},W.prototype.setMouseCursor=function(B){C.setStyle(this.scroller.style,"cursor",B)},W.prototype.attachToShadowRoot=function(){C.importCssString(g,"ace_editor.css",this.container)},W.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},W.prototype.$updateCustomScrollbar=function(B){var V=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,B===!0?(this.scrollBarV=new t(this.container,this),this.scrollBarH=new e(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(u){V.$scrollAnimation||V.session.setScrollTop(u.data-V.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(u){V.$scrollAnimation||V.session.setScrollLeft(u.data-V.scrollMargin.left)}),this.$scrollDecorator=new A(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new a(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.addEventListener("scroll",function(u){V.$scrollAnimation||V.session.setScrollTop(u.data-V.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(u){V.$scrollAnimation||V.session.setScrollLeft(u.data-V.scrollMargin.left)}))},W.prototype.$addResizeObserver=function(){var B;window.ResizeObserver&&!this.$resizeObserver&&((B=this).$resizeTimer=h.delayedCall(function(){B.destroyed||B.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(v){var u=v[0].contentRect.width,v=v[0].contentRect.height;1<Math.abs(B.$size.width-u)||1<Math.abs(B.$size.height-v)?B.$resizeTimer.delay():B.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container))},W);function W(v,V){var u=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(V),l.get("useStrictCSP")==null&&l.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 c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new n(this.content),this.$textLayer=new s(this.content));this.canvas=v.element,this.$markerFront=new n(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new a(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.on("scroll",function($){u.$scrollAnimation||u.session.setScrollTop($.data-u.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){u.$scrollAnimation||u.session.setScrollLeft($.data-u.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new d(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function($){u.updateCharacterSize(),u.onResize(!0,u.gutterWidth,u.$size.width,u.$size.height),u._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new r(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}E.prototype.CHANGE_CURSOR=1,E.prototype.CHANGE_MARKER=2,E.prototype.CHANGE_GUTTER=4,E.prototype.CHANGE_SCROLL=8,E.prototype.CHANGE_LINES=16,E.prototype.CHANGE_TEXT=32,E.prototype.CHANGE_SIZE=64,E.prototype.CHANGE_MARKER_BACK=128,E.prototype.CHANGE_MARKER_FRONT=256,E.prototype.CHANGE_FULL=512,E.prototype.CHANGE_H_SCROLL=1024,E.prototype.$changes=0,E.prototype.$padding=null,E.prototype.$frozen=!1,E.prototype.STEPS=8,I.implement(E.prototype,p),l.defineOptions(E.prototype,"renderer",{useResizeObserver:{set:function(B){!B&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):B&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(B){this.$textLayer.setShowInvisibles(B)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(B){typeof B=="number"&&(this.$printMarginColumn=B),this.$showPrintMargin=!!B,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(B){this.$gutter.style.display=B?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(B){this.$gutterLayer.$useSvgGutterIcons=B},initialValue:!1},showFoldedAnnotations:{set:function(B){this.$gutterLayer.$showFoldedAnnotations=B},initialValue:!1},fadeFoldWidgets:{set:function(B){C.setCssClass(this.$gutter,"ace_fade-fold-widgets",B)},initialValue:!1},showFoldWidgets:{set:function(B){this.$gutterLayer.setShowFoldWidgets(B),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(B){this.$textLayer.setDisplayIndentGuides(B)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(B){this.$textLayer.setHighlightIndentGuides(B)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(B){this.$gutterLayer.setHighlightGutterLine(B),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(B){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(B){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(B){typeof B=="number"&&(B+="px"),this.container.style.fontSize=B,this.updateFontSize()},initialValue:12},fontFamily:{set:function(B){this.container.style.fontFamily=B,this.updateFontSize()}},maxLines:{set:function(B){this.updateFull()}},minLines:{set:function(B){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(B){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(B){this.$scrollPastEnd!=(B=+B||0)&&(this.$scrollPastEnd=B,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(B){this.$gutterLayer.$fixedWidth=!!B,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(B){this.$updateCustomScrollbar(B)},initialValue:!1},theme:{set:function(B){this.setTheme(B)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),f.VirtualRenderer=E}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(w,f,_){var I=w("../lib/oop"),C=w("../lib/net"),h=w("../lib/event_emitter").EventEmitter,l=w("../config");function c(s){var i;return typeof Worker=="undefined"?{postMessage:function(){},terminate:function(){}}:l.get("loadWorkerFromBlob")?(i=function(o){o="importScripts('"+C.qualifyURL(o)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return a.append(o),a.getBlob("application/javascript")}}(s),i=(window.URL||window.webkitURL).createObjectURL(i),new Worker(i)):new Worker(s)}function n(s){s.postMessage||(s=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=s,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(){I.implement(this,h),this.$createWorkerFromOldConfig=function(s,i,o,a,e){var t,r;return w.nameToUrl&&!w.toUrl&&(w.toUrl=w.nameToUrl),l.get("packaged")||!w.toUrl?a=a||l.moduleUrl(i,"worker"):(t=this.$normalizePath,a=a||t(w.toUrl("ace/worker/worker.js",null,"_")),r={},s.forEach(function(d){r[d]=t(w.toUrl(d,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=c(a),e&&this.send("importScripts",e),this.$worker.postMessage({init:!0,tlns:r,module:i,classname:o}),this.$worker},this.onMessage=function(s){var i=s.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var o=this.callbacks[i.id];o&&(o(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data)}},this.reportError=function(s){window.console&&console.error&&console.error(s)},this.$normalizePath=function(s){return C.qualifyURL(s)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(s){s.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(s,i){this.$worker.postMessage({command:s,args:i})},this.call=function(s,i,o){var a;o&&(a=this.callbackId++,this.callbacks[a]=o,i.push(a)),this.send(s,i)},this.emit=function(s,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:s,data:{data:i.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(s){this.$doc&&this.terminate(),this.$doc=s,this.call("setValue",[s.getValue()]),s.on("change",this.changeListener,!0)},this.changeListener=function(s){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),s.action=="insert"?this.deltaQueue.push(s.start,s.lines):this.deltaQueue.push(s.start,s.end)},this.$sendDeltaQueue=function(){var s=this.deltaQueue;s&&(this.deltaQueue=null,50<s.length&&s.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:s}))}}).call(n.prototype),f.UIWorkerClient=function(s,i,o){var a=null,e=!1,t=Object.create(h),r=[],d=new n({messageBuffer:r,terminate:function(){},postMessage:function(g){r.push(g),a&&(e?setTimeout(p):p())}}),p=(d.setEmitSync=function(g){e=g},function(){var g=r.shift();g.command?a[g.command].apply(a,g.args):g.event&&t._signal(g.event,g.data)});return t.postMessage=function(g){d.onMessage({data:g})},t.callback=function(g,A){this.postMessage({type:"call",id:A,data:g})},t.emit=function(g,A){this.postMessage({type:"event",name:g,data:A})},l.loadModule(["worker",i],function(g){for(a=new g[o](t);r.length;)p()}),d},f.WorkerClient=n,f.createWorker=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(h,f,_){var I=h("./range").Range,C=h("./lib/event_emitter").EventEmitter,h=h("./lib/oop"),l=(c.prototype.setup=function(){var n=this,s=this.doc,i=this.session,o=(this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=s.createAnchor(this.$pos.row,this.$pos.column),this.pos);o.$insertRight=!0,o.detach(),o.markerId=i.addMarker(new I(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(a){a=s.createAnchor(a.row,a.column),a.$insertRight=!0,a.detach(),n.others.push(a)}),i.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){var n,s;this.othersActive||(n=this.session,(s=this).othersActive=!0,this.others.forEach(function(i){i.markerId=n.addMarker(new I(i.row,i.column,i.row,i.column+s.length),s.othersClass,null,!1)}))},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var n=0;n<this.others.length;n++)this.session.removeMarker(this.others[n].markerId)}},c.prototype.onUpdate=function(n){if(this.$updating)return this.updateAnchors(n);var s=n;if(s.start.row===s.end.row&&s.start.row===this.pos.row){this.$updating=!0;var i=n.action==="insert"?s.end.column-s.start.column:s.start.column-s.end.column,o=s.start.column>=this.pos.column&&s.start.column<=this.pos.column+this.length+1,a=s.start.column-this.pos.column;if(this.updateAnchors(n),o&&(this.length+=i),o&&!this.session.$fromUndo){if(n.action==="insert")for(var e=this.others.length-1;0<=e;e--){var t={row:(r=this.others[e]).row,column:r.column+a};this.doc.insertMergedLines(t,n.lines)}else if(n.action==="remove")for(e=this.others.length-1;0<=e;e--){var r,t={row:(r=this.others[e]).row,column:r.column+a};this.doc.remove(new I(t.row,t.column,t.row,t.column-i))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(n){this.pos.onChange(n);for(var s=this.others.length;s--;)this.others[s].onChange(n);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var n=this,s=this.session,i=function(a,e){s.removeMarker(a.markerId),a.markerId=s.addMarker(new I(a.row,a.column,a.row,a.column+n.length),e,null,!1)};i(this.pos,this.mainClass);for(var o=this.others.length;o--;)i(this.others[o],this.othersClass)}},c.prototype.onCursorChange=function(n){var s;!this.$updating&&this.session&&((s=this.session.selection.getCursor()).row===this.pos.row&&s.column>=this.pos.column&&s.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",n)):(this.hideOtherMarkers(),this._emit("cursorLeave",n)))},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var n=this.session.getUndoManager(),s=(n.$undoStack||n.$undostack).length-this.$undoStackDepth,i=0;i<s;i++)n.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c);function c(n,r,i,o,a,e){var t=this,r=(this.length=r,this.session=n,this.doc=n.getDocument(),this.mainClass=a,this.othersClass=e,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=o,this.$onCursorChange=function(){setTimeout(function(){t.onCursorChange()})},this.$pos=i,n.getUndoManager().$undoStack||n.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=r.length,this.setup(),n.selection.on("changeCursor",this.$onCursorChange)}h.implement(l.prototype,C),f.PlaceHolder=l}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(w,f,_){var I=w("../lib/event"),C=w("../lib/useragent");function h(l,c){return l.row==c.row&&l.column==c.column}f.onMouseDown=function(l){var c=l.domEvent,n=c.altKey,s=c.shiftKey,i=c.ctrlKey,o=l.getAccelKey(),a=l.getButton();if(i&&C.isMac&&(a=c.button),l.editor.inMultiSelectMode&&a==2)l.editor.textInput.onContextMenu(l.domEvent);else if(i||n||o){if(a===0){var e,t,r,d,p,g,A,x,E=l.editor,W=E.selection,B=E.inMultiSelectMode,V=l.getDocumentPosition(),u=W.getCursor(),u=l.inSelection()||W.isEmpty()&&h(V,u),v=l.x,$=l.y,y=E.session,L=E.renderer.pixelToScreenCoordinates(v,$),H=L;if(E.$mouseHandler.$enableJumpToDef)i&&n||o&&n?e=s?"block":"add":n&&E.$blockSelectEnabled&&(e="block");else if(o&&!n){if(e="add",!B&&s)return}else n&&E.$blockSelectEnabled&&(e="block");if(e&&C.isMac&&c.ctrlKey&&E.$mouseHandler.cancelContextMenu(),e=="add")!B&&u||(B||(t=W.toOrientedRange(),E.addSelectionMarker(t)),r=W.rangeList.rangeAtPoint(V),E.inVirtualSelectionMode=!0,s&&(r=null,t=W.ranges[0]||t,E.removeSelectionMarker(t)),E.once("mouseup",function(){var G=W.toOrientedRange();r&&G.isEmpty()&&h(r.cursor,G.cursor)?W.substractPoint(G.cursor):(s?W.substractPoint(t.cursor):t&&(E.removeSelectionMarker(t),W.addRange(t)),W.addRange(G)),E.inVirtualSelectionMode=!1}));else if(e=="block")return l.stop(),E.inVirtualSelectionMode=!0,p=[],g=function(){var G=E.renderer.pixelToScreenCoordinates(v,$),Y=y.screenToDocumentPosition(G.row,G.column,G.offsetX);h(H,G)&&h(Y,W.lead)||(H=G,E.selection.moveToPosition(Y),E.renderer.scrollCursorIntoView(),E.removeSelectionMarkers(p),p=W.rectangularRangeBlock(H,L),E.$mouseHandler.$clickSelection&&p.length==1&&p[0].isEmpty()&&(p[0]=E.$mouseHandler.$clickSelection.clone()),p.forEach(E.addSelectionMarker,E),E.updateSelectionMarkers())},B&&!o?W.toSingleRange():!B&&o&&(d=W.toOrientedRange(),E.addSelectionMarker(d)),s?L=y.documentToScreenPosition(W.lead):W.moveToPosition(V),H={row:-1,column:-1},A=g,I.capture(E.container,function(G){v=G.clientX,$=G.clientY},function(G){g(),clearInterval(x),E.removeSelectionMarkers(p),p.length||(p=[W.toOrientedRange()]),d&&(E.removeSelectionMarker(d),W.toSingleRange(d));for(var Y=0;Y<p.length;Y++)W.addRange(p[Y]);E.inVirtualSelectionMode=!1,E.$mouseHandler.$clickSelection=null}),x=setInterval(function(){A()},20),l.preventDefault()}}else a===0&&l.editor.inMultiSelectMode&&l.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(w,f,_){f.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(I){I.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(I){I.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(I){I.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(I){I.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(I){I.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(I){I.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(I){I.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(I){I.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(I){1<I.multiSelect.rangeCount?I.multiSelect.joinSelections():I.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(I){I.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(I){I.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(I){I.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],f.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(I){I.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(I){return I&&I.inMultiSelectMode}}],w=w("../keyboard/hash_handler").HashHandler,f.keyboardHandler=new w(f.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(w,f,_){var I=w("./range_list").RangeList,C=w("./range").Range,h=w("./selection").Selection,l=w("./mouse/multi_select_handler").onMouseDown,c=w("./lib/event"),n=w("./lib/lang"),s=w("./commands/multi_select_commands");f.commands=s.defaultCommands.concat(s.multiSelectCommands);var i=new(w("./search")).Search,o=w("./edit_session").EditSession,o=(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&this.rangeCount===0){var r=this.toOrientedRange();if(this.rangeList.add(r),this.rangeList.add(e),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(r),this.$onAddRange(r)}return e.cursor||(e.cursor=e.end),r=this.rangeList.add(e),this.$onAddRange(e),r.length&&this.$onRemoveRange(r),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){if(e=this.rangeList.substractPoint(e),e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){var t;this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode&&(t=this.rangeList.ranges.pop(),e.push(t),this.rangeCount=0);for(var r=e.length;r--;){var d=this.ranges.indexOf(e[r]);this.ranges.splice(d,1)}this._signal("removeRange",{ranges:e}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new I,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],r=0;r<e.length;r++){var d=e[r],p=d.start.row,g=d.end.row;if(p===g)t.push(d.clone());else{for(t.push(new C(p,d.start.column,p,this.session.getLine(p).length));++p<g;)t.push(this.getLineRange(p,!0));t.push(new C(g,0,g,d.end.column))}r!=0||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),r=t.length;r--;)this.addRange(t[r])},this.joinSelections=function(){var t=this.rangeList.ranges,e=t[t.length-1],t=C.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(t,e.cursor==e.start)},this.toggleBlockSelection=function(){var e,t;1<this.rangeCount?(t=(e=this.rangeList.ranges)[e.length-1],e=C.fromPoints(e[0].start,t.end),this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)):(e=this.session.documentToScreenPosition(this.cursor),t=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(e,t).forEach(this.addRange,this))},this.rectangularRangeBlock=function(e,t,r){var d,p,g,A,x,E,W,B=[],V=e.column<t.column,u=(A=(V?(d=e.column,p=t.column,g=e.offsetX,t):(d=t.column,p=e.column,g=t.offsetX,e)).offsetX,e.row<t.row);E=(u?(x=e.row,t):(x=t.row,e)).row,d<0&&(d=0),(x=x<0?0:x)==E&&(r=!0);for(var v,$,y=x;y<=E;y++){var L=C.fromPoints(this.session.screenToDocumentPosition(y,d,g),this.session.screenToDocumentPosition(y,p,A));if(L.isEmpty()){if(W&&(v=L.end,$=W,v.row==$.row)&&v.column==$.column)break;W=L.end}L.cursor=V?L.start:L.end,B.push(L)}if(u&&B.reverse(),!r){for(var H=B.length-1;B[H].isEmpty()&&0<H;)H--;if(0<H)for(var G=0;B[G].isEmpty();)G++;for(var Y=H;G<=Y;Y--)B[Y].isEmpty()&&B.splice(Y,1)}return B}}.call(h.prototype),w("./editor").Editor);function a(e){var t,r;function d(p){r&&(t.renderer.setMouseCursor(""),r=!1)}e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=f.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",l),e.commands.addCommands(s.defaultCommands),(t=e).textInput&&(e=t.textInput.getElement(),r=!1,c.addListener(e,"keydown",function(p){p=p.keyCode==18&&!(p.ctrlKey||p.shiftKey||p.metaKey),t.$blockSelectEnabled&&p?r||(t.renderer.setMouseCursor("crosshair"),r=!0):r&&d()},t),c.addListener(e,"keyup",d,t),c.addListener(e,"blur",d,t)))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){e.marker&&(this.session.removeMarker(e.marker),(e=this.session.$selectionMarkers.indexOf(e))!=-1&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,r=e.length;r--;){var d=e[r];d.marker&&(this.session.removeMarker(d.marker),(d=t.indexOf(d))!=-1)&&t.splice(d,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(s.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(s.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t,r=e.command,d=e.editor;if(d.multiSelect)return r.multiSelectAction?t=r.multiSelectAction=="forEach"?d.forEachSelection(r,e.args):r.multiSelectAction=="forEachLine"?d.forEachSelection(r,e.args,!0):r.multiSelectAction=="single"?(d.exitMultiSelectMode(),r.exec(d,e.args||{})):r.multiSelectAction(d,e.args||{}):(t=r.exec(d,e.args||{}),d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()),t},this.forEachSelection=function(e,t,r){if(!this.inVirtualSelectionMode){var d,E=r&&r.keepOrder,p=r==1||r&&r.$byLines,g=this.session,r=this.selection,A=r.rangeList,x=(E?r:A).ranges;if(!x.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var E=r._eventRegistry,W=(r._eventRegistry={},new h(g));this.inVirtualSelectionMode=!0;for(var B=x.length;B--;){if(p)for(;0<B&&x[B].start.row==x[B-1].end.row;)B--;W.fromOrientedRange(x[B]),W.index=B,this.selection=g.selection=W;var V=e.exec?e.exec(this,t||{}):e(this,t||{});d||V===void 0||(d=V),W.toOrientedRange(x[B])}return W.detach(),this.selection=g.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=E,r.mergeOverlappingRanges(),r.ranges[0]&&r.fromOrientedRange(r.ranges[0]),A=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),A&&A.from==A.to&&this.renderer.animateScrolling(A.from),d}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,r=[],d=0;d<t.length;d++)r.push(this.session.getTextRange(t[d]));var p=this.session.getDocument().getNewLineCharacter();(e=r.join(p)).length==(r.length-1)*p.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){var r;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(r=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&t==this.multiSelect.anchor||((r=t==this.multiSelect.anchor?r.cursor==r.start?r.end:r.start:r.cursor).row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(e,t,r){(t=t||{}).needle=e||t.needle,t.needle==null&&(d=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),t.needle=this.session.getTextRange(d)),this.$search.set(t);var d,p=this.$search.findAll(this.session);if(!p.length)return 0;var g=this.multiSelect;r||g.toSingleRange(p[0]);for(var A=p.length;A--;)g.addRange(p[A],!0);return d&&g.rangeList.rangeAtPoint(d.start)&&g.addRange(d,!0),p.length},this.selectMoreLines=function(e,t){var r,d,p,g=this.selection.toOrientedRange(),A=g.cursor==g.end,x=this.session.documentToScreenPosition(g.cursor),E=(this.selection.$desiredColumn&&(x.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(x.row+e,x.column));e=g.isEmpty()?E:(r=this.session.documentToScreenPosition(A?g.end:g.start),this.session.screenToDocumentPosition(r.row+e,r.column)),A?(d=C.fromPoints(E,e)).cursor=d.start:(d=C.fromPoints(e,E)).cursor=d.end,d.desiredColumn=x.column,this.selection.inMultiSelectMode?t&&(p=g.cursor):this.selection.addRange(g),this.selection.addRange(d),p&&this.selection.substractPoint(p)},this.transposeSelections=function(e){for(var t=this.session,r=t.multiSelect,d=r.ranges,p=d.length;p--;)(A=d[p]).isEmpty()&&(x=t.getWordRange(A.start.row,A.start.column),A.start.row=x.start.row,A.start.column=x.start.column,A.end.row=x.end.row,A.end.column=x.end.column);r.mergeOverlappingRanges();for(var g=[],p=d.length;p--;){var A=d[p];g.unshift(t.getTextRange(A))}for(e<0?g.unshift(g.pop()):g.push(g.shift()),p=d.length;p--;){var x=(A=d[p]).clone();t.replace(A,g[p]),A.start.row=x.start.row,A.start.column=x.start.column}r.fromOrientedRange(r.ranges[0])},this.selectMore=function(e,t,r){var d,p=this.session,g=p.multiSelect.toOrientedRange();g.isEmpty()&&((g=p.getWordRange(g.start.row,g.start.column)).cursor=e==-1?g.start:g.end,this.multiSelect.addRange(g),r)||(r=p.getTextRange(g),p=p,r=r,d=e,i.$options.wrap=!0,i.$options.needle=r,i.$options.backwards=d==-1,(r=i.find(p))&&(r.cursor=e==-1?r.start:r.end,this.session.unfold(r),this.multiSelect.addRange(r),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(g.cursor))},this.alignCursors=function(){var e=this.session,t=e.multiSelect,r=t.ranges,d=-1,p=r.filter(function(v){if(v.cursor.row==d)return!0;d=v.cursor.row});if(r.length&&p.length!=r.length-1){p.forEach(function(v){t.substractPoint(v.cursor)});var g=0,A=1/0,x=r.map(function($){var $=$.cursor,y=e.getLine($.row).substr($.column).search(/\S/g);return $.column>g&&(g=$.column),(y=y==-1?0:y)<A&&(A=y),y});r.forEach(function(v,H){var y=v.cursor,L=g-y.column,H=x[H]-A;H<L?e.insert(y,n.stringRepeat(" ",L-H)):e.remove(new C(y.row,y.column,y.row,y.column-L+H)),v.start.column=v.end.column=g,v.start.row=v.end.row=y.row,v.cursor=v.end}),t.fromOrientedRange(r[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var p=this.selection.getRange(),E=p.start.row,W=p.end.row,r=E==W;if(r){for(var B,V=this.session.getLength();B=this.session.getLine(W),/[=:]/.test(B)&&++W<V;);for(;B=this.session.getLine(E),/[=:]/.test(B)&&0<--E;);E<0&&(E=0),V<=W&&(W=V-1)}var u=this.session.removeFullLines(E,W),u=this.$reAlignText(u,r);this.session.insert({row:E,column:0},u.join(`
|
|
`)+`
|
|
`),r||(p.start.column=0,p.end.column=u[u.length-1].length),this.selection.setRange(p)}},this.$reAlignText=function(e,t){var r,d,p,g=!0,A=!0;return e.map(function(W){var B=W.match(/(\s*)(.*?)(\s*)([=:].*)/);return B?(r==null?(r=B[1].length,d=B[2].length,p=B[3].length):(r+d+p!=B[1].length+B[2].length+B[3].length&&(A=!1),r!=B[1].length&&(g=!1),r>B[1].length&&(r=B[1].length),d<B[2].length&&(d=B[2].length),p>B[3].length&&(p=B[3].length)),B):[W]}).map(t?E:g?A?function(W){return W[2]?x(r+d-W[2].length)+W[2]+x(p)+W[4].replace(/^([=:])\s+/,"$1 "):W[0]}:E:function(W){return W[2]?x(r)+W[2]+x(p)+W[4].replace(/^([=:])\s+/,"$1 "):W[0]});function x(W){return n.stringRepeat(" ",W)}function E(W){return W[2]?x(r)+W[2]+x(d-W[2].length+p)+W[4].replace(/^([=:])\s+/,"$1 "):W[0]}}}).call(o.prototype),f.onSessionChange=function(r){var t=r.session,r=(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,r.oldSession);r&&(r.multiSelect.off("addRange",this.$onAddRange),r.multiSelect.off("removeRange",this.$onRemoveRange),r.multiSelect.off("multiSelect",this.$onMultiSelect),r.multiSelect.off("singleSelect",this.$onSingleSelect),r.multiSelect.lead.off("change",this.$checkMultiselectChange),r.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},f.MultiSelect=a,w("./config").defineOptions(o.prototype,"editor",{enableMultiselect:{set:function(e){a(this),e?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(C,f,_){var I=C("../../range").Range,C=f.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(h,l,c){return h=h.getLine(c),this.foldingStartMarker.test(h)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(h)?"end":""},this.getFoldWidgetRange=function(h,l,c){return null},this.indentationBlock=function(h,l,c){var n=/\S/,s=h.getLine(l),i=s.search(n);if(i!=-1){for(var o,c=c||s.length,a=h.getLength(),s=l,e=l;++l<a;){var t=h.getLine(l).search(n);if(t!=-1){if(t<=i&&(t=h.getTokenAt(l,0),!t||t.type!=="string"))break;e=l}}return s<e?(o=h.getLine(e).length,new I(s,c,e,o)):void 0}},this.openingBracketBlock=function(h,l,c,n,s){if(c={row:c,column:n+1},n=h.$findClosingBracket(l,c,s),n)return(l=(l=h.foldWidgets[n.row])==null?h.getFoldWidget(n.row):l)=="start"&&n.row>c.row&&(n.row--,n.column=h.getLine(n.row).length),I.fromPoints(c,n)},this.closingBracketBlock=function(h,l,c,n,s){if(c={row:c,column:n},n=h.$findOpeningBracket(l,c),n)return n.column++,c.column--,I.fromPoints(n,c)}}).call(C.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(w,f,_){var I=w("../line_widgets").LineWidgets,C=w("../lib/dom"),h=w("../range").Range,l=w("../config").nls;function c(n,s,i){var o=n.getAnnotations().sort(h.comparePoints);if(o.length){var a=function(r,d,p){for(var g=0,A=r.length-1;g<=A;){var x=g+A>>1,E=p(d,r[x]);if(0<E)g=1+x;else{if(!(E<0))return x;A=x-1}}return-(g+1)}(o,{row:s,column:-1},h.comparePoints),e=((a=a<0?-a-1:a)>=o.length?a=0<i?0:o.length-1:a===0&&i<0&&(a=o.length-1),o[a]);if(e&&i){if(e.row===s){for(;(e=o[a+=i])&&e.row===s;);if(!e)return o.slice()}var t=[];for(s=e.row;t[i<0?"unshift":"push"](e),(e=o[a+=i])&&e.row==s;);return t.length&&t}}}f.showErrorMarker=function(n,d){var i,o=n.session,a=(o.widgetManager||(o.widgetManager=new I(o),o.widgetManager.attach(n)),n.getCursorPosition()),r=a.row,p=o.widgetManager.getWidgetsAtRow(r).filter(function(g){return g.type=="errorMarker"})[0],r=(p?p.destroy():r-=d,c(o,r,d));if(r)d=r[0],a.column=(d.pos&&typeof d.column!="number"?d.pos.sc:d.column)||0,a.row=d.row,i=n.renderer.$gutterLayer.$annotations[a.row];else{if(p)return;i={text:[l("Looks good!")],className:"ace_ok"}}n.session.unfold(a.row),n.selection.moveToPosition(a);function e(g,A,x){if(A===0&&(x==="esc"||x==="return"))return t.destroy(),{command:"null"}}var t={row:a.row,fixedWidth:!0,coverGutter:!0,el:C.createElement("div"),type:"errorMarker"},r=t.el.appendChild(C.createElement("div")),d=t.el.appendChild(C.createElement("div")),p=(d.className="error_widget_arrow "+i.className,n.renderer.$cursorLayer.getPixelPosition(a).left);d.style.left=p+n.renderer.gutterWidth-5+"px",t.el.className="error_widget_wrapper",r.className="error_widget "+i.className,r.innerHTML=i.text.join("<br>"),r.appendChild(C.createElement("div")),t.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(e),o.widgetManager.removeLineWidget(t),n.off("changeSelection",t.destroy),n.off("changeSession",t.destroy),n.off("mouseup",t.destroy),n.off("change",t.destroy))},n.keyBinding.addKeyboardHandler(e),n.on("changeSelection",t.destroy),n.on("changeSession",t.destroy),n.on("mouseup",t.destroy),n.on("change",t.destroy),n.session.widgetManager.addLineWidget(t),t.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:t.el.offsetHeight})},C.importCssString(`
|
|
.error_widget_wrapper {
|
|
background: inherit;
|
|
color: inherit;
|
|
border:none
|
|
}
|
|
.error_widget {
|
|
border-top: solid 2px;
|
|
border-bottom: solid 2px;
|
|
margin: 5px 0;
|
|
padding: 10px 40px;
|
|
white-space: pre-wrap;
|
|
}
|
|
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
border-color: #ff5a5a
|
|
}
|
|
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
border-color: #F1D817
|
|
}
|
|
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
border-color: #5a5a5a
|
|
}
|
|
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
border-color: #5aaa5a
|
|
}
|
|
.error_widget_arrow {
|
|
position: absolute;
|
|
border: solid 5px;
|
|
border-top-color: transparent!important;
|
|
border-right-color: transparent!important;
|
|
border-left-color: transparent!important;
|
|
top: -5px;
|
|
}
|
|
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(w,f,_){w("./loader_build")(f);var I=w("./lib/dom"),C=w("./range").Range,h=w("./editor").Editor,l=w("./edit_session").EditSession,c=w("./undomanager").UndoManager,n=w("./virtual_renderer").VirtualRenderer;w("./worker/worker_client"),w("./keyboard/hash_handler"),w("./placeholder"),w("./multi_select"),w("./mode/folding/fold_mode"),w("./theme/textmate"),w("./ext/error_marker"),f.config=w("./config"),f.edit=function(s,i){if(typeof s=="string"){var o=s;if(!(s=document.getElementById(o)))throw new Error("ace.edit can't find div #"+o)}var a,e;return s&&s.env&&s.env.editor instanceof h?s.env.editor:(o="",s&&/input|textarea/i.test(s.tagName)?(o=(a=s).value,s=I.createElement("pre"),a.parentNode.replaceChild(s,a)):s&&(o=s.textContent,s.innerHTML=""),o=f.createEditSession(o),s=new h(new n(s),o,i),e={document:o,editor:s,onResize:s.resize.bind(s,null)},a&&(e.textarea=a),s.on("destroy",function(){e.editor.container.env=null}),s.container.env=s.env=e,s)},f.createEditSession=function(s,i){return s=new l(s,i),s.setUndoManager(new c),s},f.Range=C,f.Editor=h,f.EditSession=l,f.UndoManager=c,f.VirtualRenderer=n,f.version=f.config.version}),ace.require(["ace/ace"],function(w){w&&(w.config.init(!0),w.define=ace.define);var f,_=function(){return this}();for(f in(_=(_=_||typeof window=="undefined"?_:window)||typeof self=="undefined"?_:self).ace||(_.ace=w),w)w.hasOwnProperty(f)&&(_.ace[f]=w[f]);_.ace.default=_.ace,ae&&(ae.exports=_.ace)})},4317:function(ae,m,O){ae=O.nmd(ae),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(U,S,M){var K=U("./lib/dom"),a=U("./lib/oop"),j=U("./lib/event_emitter").EventEmitter,X=U("./lib/lang"),F=U("./range").Range,N=U("./range_list").RangeList,w=U("./keyboard/hash_handler").HashHandler,f=U("./tokenizer").Tokenizer,_=U("./clipboard"),I={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,r){return e=e.session.getTextRange(),r?e.replace(/\n\r?([ \t]*\S)/g,`
|
|
`+r+"$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 _.getText&&_.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:C.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:C.bind(null,{year:"2-digit"}),CURRENT_MONTH:C.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:C.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:C.bind(null,{month:"short"}),CURRENT_DATE:C.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:C.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:C.bind(null,{weekday:"short"}),CURRENT_HOUR:C.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:C.bind(null,{minute:"2-digit"}),CURRENT_SECOND:C.bind(null,{second:"2-digit"})};function C(e){return e=new Date().toLocaleString("en-us",e),e.length==1?"0"+e:e}I.SELECTED_TEXT=I.SELECTION,l.prototype.getTokenizer=function(){return l.$tokenizer||this.createTokenizer()},l.prototype.createTokenizer=function(){function e(d){return d=d.substr(1),/^\d+$/.test(d)?[{tabstopId:parseInt(d,10)}]:[{text:d}]}function t(d){return"(?:[^\\\\"+d+"]|\\\\.)"}var r={regex:"/("+t("/")+"+)/",onMatch:function(d,p,g){return g=g[0],g.fmtString=!0,g.guard=d.slice(1,-1),g.flag=""},next:"formatString"};return l.$tokenizer=new f({start:[{regex:/\\./,onMatch:function(d,p,g){var A=d[1];return[d=A=="}"&&g.length||"`$\\".indexOf(A)!=-1?A:d]}},{regex:/}/,onMatch:function(d,p,g){return[g.length?g.shift():d]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(d,p,g){return d=e(d.substr(1)),g.unshift(d[0]),d},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(d,p,g){return d=d.slice(1,-1).replace(/\\[,|\\]|,/g,function(A){return A.length==2?A[1]:"\0"}).split("\0").map(function(A){return{value:A}}),[(g[0].choices=d)[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(d,p,g){return g.length&&g[0].expectElse?(g[0].expectElse=!1,g[0].ifEnd={elseEnd:g[0]},[g[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(d,p,g){var A=d[1];return A=="}"&&g.length||"`$\\".indexOf(A)!=-1?d=A:A=="n"?d=`
|
|
`:A=="t"?d=" ":"ulULE".indexOf(A)!=-1&&(d={changeCase:A,local:"a"<A}),[d]}},{regex:"/\\w*}",onMatch:function(d,p,g){return g=g.shift(),g&&(g.flag=d.slice(1,-1)),this.next=g&&g.tabstopId?"start":"",[g||d]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(d,p,g){return[{text:d.slice(1)}]}},{regex:/\${\w+/,onMatch:function(d,p,g){return d={text:d.slice(2)},g.unshift(d),[d]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(d,p,g){return g=g.shift(),this.next=g&&g.tabstopId?"start":"",[g||d]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(d,p,g){return g[0].formatFunction=d.slice(2,-1),[g.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(d,p,g){d[1]=="+"&&(g[0].ifEnd=g[0]),d[1]=="?"&&(g[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},l.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(r){return r.value||r})},l.prototype.getVariableValue=function(e,t,r){var d;return/^\d+$/.test(t)?(this.variables.__||{})[t]||"":/^[A-Z]\d+$/.test(t)?(this.variables[t[0]+"__"]||{})[t.substr(1)]||"":(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t)||(d=typeof(d=this.variables[t])=="function"?this.variables[t](e,t,r):d)==null?"":d)},l.prototype.tmStrFormat=function(e,t,r){var d,p,g,A;return t.fmt?(d=t.flag||"",p=t.guard,p=new RegExp(p,d.replace(/[^gim]/g,"")),g=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,A=this,e.replace(p,function(){for(var x=A.variables.__,E=(A.variables.__=[].slice.call(arguments),A.resolveVariables(g,r)),W="E",B=0;B<E.length;B++){var V,u=E[B];typeof u=="object"?(E[B]="",u.changeCase&&u.local?(V=E[B+1])&&typeof V=="string"&&(u.changeCase=="u"?E[B]=V[0].toUpperCase():E[B]=V[0].toLowerCase(),E[B+1]=V.substr(1)):u.changeCase&&(W=u.changeCase)):W=="U"?E[B]=u.toUpperCase():W=="L"&&(E[B]=u.toLowerCase())}return A.variables.__=x,E.join("")})):e},l.prototype.tmFormatFunction=function(e,t,r){return t.formatFunction=="upcase"?e.toUpperCase():t.formatFunction=="downcase"?e.toLowerCase():e},l.prototype.resolveVariables=function(e,t){for(var r=[],d="",p=!0,g=0;g<e.length;g++){var A,x=e[g];typeof x=="string"?(r.push(x),x==`
|
|
`?(p=!0,d=""):p&&(d=/^\t*/.exec(x)[0],p=/\S/.test(x))):x&&(p=!1,x.fmtString&&((A=e.indexOf(x,g+1))==-1&&(A=e.length),x.fmt=e.slice(g+1,A),g=A),x.text?(A=this.getVariableValue(t,x.text,d)+"",x.fmtString&&(A=this.tmStrFormat(A,x,t)),(A=x.formatFunction?this.tmFormatFunction(A,x,t):A)&&!x.ifEnd?(r.push(A),E(x)):!A&&x.ifEnd&&E(x.ifEnd)):x.elseEnd?E(x.elseEnd):x.tabstopId==null&&x.changeCase==null||r.push(x))}function E(W){W=e.indexOf(W,g+1),W!=-1&&(g=W)}return r},l.prototype.getDisplayTextForSnippet=function(e,t){return c.call(this,e,t).text},l.prototype.insertSnippetForSelection=function(x,d,p){var d=c.call(this,x,d,p=p===void 0?{}:p),p=x.getSelectionRange(),g=x.session.replace(p,d.text),A=new n(x),x=x.inVirtualSelectionMode&&x.selection.index;A.addTabstops(d.tabstops,p.start,g,x)},l.prototype.insertSnippet=function(e,t,r){r===void 0&&(r={});var d=this;if(e.inVirtualSelectionMode)return d.insertSnippetForSelection(e,t,r);e.forEachSelection(function(){d.insertSnippetForSelection(e,t,r)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},l.prototype.$getScope=function(e){var t,r=e.session.$mode.$id||"";return(r=r.split("/").pop())!=="html"&&r!=="php"||(r!=="php"||e.session.$mode.inlinePhp||(r="html"),t=e.getCursorPosition(),(e=typeof(e=e.session.getState(t.row))=="object"?e[0]:e).substring&&(e.substring(0,3)=="js-"?r="javascript":e.substring(0,4)=="css-"?r="css":e.substring(0,4)=="php-"&&(r="php"))),r},l.prototype.getActiveScopes=function(t){var t=this.$getScope(t),r=[t],d=this.snippetMap;return d[t]&&d[t].includeScopes&&r.push.apply(r,d[t].includeScopes),r.push("_"),r},l.prototype.expandWithTab=function(e,t){var r=this,d=e.forEachSelection(function(){return r.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return d&&e.tabstopManager&&e.tabstopManager.tabNext(),d},l.prototype.expandSnippetForSelection=function(e,t){var r,d=e.getCursorPosition(),p=e.session.getLine(d.row),g=p.substring(0,d.column),A=p.substr(d.column),x=this.snippetMap;return this.getActiveScopes(e).some(function(E){return E=x[E],!!(r=E?this.findMatchingSnippet(E,g,A):r)},this),!!r&&(t&&t.dryRun||(e.session.doc.removeInLine(d.row,d.column-r.replaceBefore.length,d.column+r.replaceAfter.length),this.variables.M__=r.matchBefore,this.variables.T__=r.matchAfter,this.insertSnippetForSelection(e,r.content),this.variables.M__=this.variables.T__=null),!0)},l.prototype.findMatchingSnippet=function(e,t,r){for(var d=e.length;d--;){var p=e[d];if((!p.startRe||p.startRe.test(t))&&(!p.endRe||p.endRe.test(r))&&(p.startRe||p.endRe))return p.matchBefore=p.startRe?p.startRe.exec(t):[""],p.matchAfter=p.endRe?p.endRe.exec(r):[""],p.replaceBefore=p.triggerRe?p.triggerRe.exec(t)[0]:"",p.replaceAfter=p.endTriggerRe?p.endTriggerRe.exec(r)[0]:"",p}},l.prototype.register=function(e,t){var r=this.snippetMap,d=this.snippetNameMap,p=this;function g(E){return(E=E&&!/^\^?\(.*\)\$?$|^\\b$/.test(E)?"(?:"+E+")":E)||""}function A(E,W,B){return E=g(E),W=g(W),B?(E=W+E)&&E[E.length-1]!="$"&&(E+="$"):(E+=W)&&E[0]!="^"&&(E="^"+E),new RegExp(E)}function x(E){E.scope||(E.scope=t||"_"),t=E.scope,r[t]||(r[t]=[],d[t]={});var W,B=d[t];E.name&&((W=B[E.name])&&p.unregister(W),B[E.name]=E),r[t].push(E),E.prefix&&(E.tabTrigger=E.prefix),!E.content&&E.body&&(E.content=Array.isArray(E.body)?E.body.join(`
|
|
`):E.body),E.tabTrigger&&!E.trigger&&(!E.guard&&/^\w/.test(E.tabTrigger)&&(E.guard="\\b"),E.trigger=X.escapeRegExp(E.tabTrigger)),(E.trigger||E.guard||E.endTrigger||E.endGuard)&&(E.startRe=A(E.trigger,E.guard,!0),E.triggerRe=new RegExp(E.trigger),E.endRe=A(E.endTrigger,E.endGuard,!0),E.endTriggerRe=new RegExp(E.endTrigger))}e=e||[],Array.isArray(e)?e.forEach(x):Object.keys(e).forEach(function(E){x(e[E])}),this._signal("registerSnippets",{scope:t})},l.prototype.unregister=function(e,t){var r=this.snippetMap,d=this.snippetNameMap;function p(g){var A=d[g.scope||t];A&&A[g.name]&&(delete A[g.name],0<=(g=(A=r[g.scope||t])&&A.indexOf(g)))&&A.splice(g,1)}e.content?p(e):Array.isArray(e)&&e.forEach(p)},l.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,r,d,p=[],g={},A=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;r=A.exec(e);){if(r[1])try{g=JSON.parse(r[1]),p.push(g)}catch{}r[4]?(g.content=r[4].replace(/^\t/gm,""),p.push(g),g={}):(t=r[2],r=r[3],t=="regex"?(g.guard=(d=/\/((?:[^\/\\]|\\.)*)|$/g).exec(r)[1],g.trigger=d.exec(r)[1],g.endTrigger=d.exec(r)[1],g.endGuard=d.exec(r)[1]):t=="snippet"?(g.tabTrigger=r.match(/^\S*/)[0],g.name||(g.name=r)):t&&(g[t]=r))}return p},l.prototype.getSnippetByName=function(e,t){var r,d=this.snippetNameMap;return this.getActiveScopes(t).some(function(p){return p=d[p],!!(r=p?p[e]:r)},this),r};var h=l;function l(){this.snippetMap={},this.snippetNameMap={},this.variables=I}a.implement(h.prototype,j);var c=function(e,t,r){r===void 0&&(r={});for(var d=e.getCursorPosition(),p=e.session.getLine(d.row),g=e.session.getTabString(),A=p.match(/^\s*/)[0],x=(d.column<A.length&&(A=A.slice(0,d.column)),t=t.replace(/\r/g,""),this.tokenizeTmSnippet(t)),E=(x=(x=this.resolveVariables(x,e)).map(function(G){return G!=`
|
|
`||r.excludeExtraIndent?typeof G=="string"?G.replace(/\t/g,g):G:G+A}),[]),W=(x.forEach(function(G,Y){var Q,z,ee;typeof G=="object"&&(ee=G.tabstopId,(Q=E[ee])||((Q=E[ee]=[]).index=ee,Q.value="",Q.parents={}),Q.indexOf(G)===-1)&&(G.choices&&!Q.choices&&(Q.choices=G.choices),Q.push(G),(z=x.indexOf(G,Y+1))!==-1)&&((ee=x.slice(Y+1,z)).some(function(T){return typeof T=="object"})&&!Q.value?Q.value=ee:!ee.length||Q.value&&typeof Q.value=="string"||(Q.value=ee.join("")))}),E.forEach(function(G){G.length=0}),{}),B=0;B<x.length;B++){var V,u,v,$=x[B];typeof $=="object"&&(v=$.tabstopId,V=E[v],u=x.indexOf($,B+1),W[v]?W[v]===$&&(delete W[v],Object.keys(W).forEach(function(G){V.parents[G]=!0})):(W[v]=$,typeof(v=V.value)!="string"?v=function(G){for(var Y=[],Q=0;Q<G.length;Q++){if(typeof(z=G[Q])=="object"){if(W[z.tabstopId])continue;var z=Y[G.lastIndexOf(z,Q-1)]||{tabstopId:z.tabstopId}}Y[Q]=z}return Y}(v):$.fmt&&(v=this.tmStrFormat(v,$,e)),x.splice.apply(x,[B+1,Math.max(0,u-B)].concat(v,$)),V.indexOf($)===-1&&V.push($)))}var y=0,L=0,H="";return x.forEach(function(G){var Y;typeof G=="string"?(1<(Y=G.split(`
|
|
`)).length?(L=Y[Y.length-1].length,y+=Y.length-1):L+=G.length,H+=G):G&&(G.start?G.end={row:y,column:L}:G.start={row:y,column:L})}),{text:H,tabstops:E,tokens:x}},n=(s.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,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)},s.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},s.prototype.onChange=function(e){for(var t=e.action[0]=="r",r=this.selectedTabstop||{},d=r.parents||{},p=this.tabstops.slice(),g=0;g<p.length;g++){var A=p[g],x=A==r||d[A.index];if(A.rangeList.$bias=x?0:1,e.action=="remove"&&A!==r)for(var x=A.parents&&A.parents[r.index],E=(E=A.rangeList.pointIndex(e.start,x))<0?-E-1:E+1,x=A.rangeList.pointIndex(e.end,x),W=A.rangeList.ranges.slice(E,x<0?-x-1:x-1),B=0;B<W.length;B++)this.removeRange(W[B]);A.rangeList.$onChange(e)}var V=this.session;this.$inChange||!t||V.getLength()!=1||V.getValue()||this.detach()},s.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var t=this.session,r=t.getTextRange(e.firstNonLinked),d=0;d<e.length;d++){var p,g=e[d];g.linked&&(p=g.original,p=S.snippetManager.tmStrFormat(r,p,this.editor),t.replace(g,p))}this.$inChange=!1}},s.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},s.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,r=this.editor.selection.isEmpty(),d=0;d<this.ranges.length;d++)if(!this.ranges[d].linked){var p=this.ranges[d].contains(e.row,e.column),g=r||this.ranges[d].contains(t.row,t.column);if(p&&g)return}this.detach()}},s.prototype.onChangeSession=function(){this.detach()},s.prototype.tabNext=function(r){var t=this.tabstops.length,r=this.index+(r||1),r=Math.min(Math.max(r,1),t);this.selectTabstop(r=r==t?0:r),r===0&&this.detach()},s.prototype.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){if(e=(this.selectedTabstop=t).firstNonLinked||t,t.choices&&(e.cursor=e.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(e);else{var r=this.editor.multiSelect;r.toSingleRange(e);for(var d=0;d<t.length;d++)t.hasLinkedRanges&&t[d].linked||r.addRange(t[d].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},s.prototype.addTabstops=function(e,t,r){var d=this.useLink||!this.editor.getOption("enableMultiselect");this.$openTabstops||(this.$openTabstops=[]),e[0]||(r=F.fromPoints(r,r),o(r.start,t),o(r.end,t),e[0]=[r],e[0].index=0);var p=[this.index+1,0],g=this.ranges;e.forEach(function(A,x){for(var E=this.$openTabstops[x]||A,W=0;W<A.length;W++){var B=A[W],V=F.fromPoints(B.start,B.end||B.start);i(V.start,t),i(V.end,t),V.original=B,V.tabstop=E,g.push(V),E!=A?E.unshift(V):E[W]=V,B.fmtString||E.firstNonLinked&&d?(V.linked=!0,E.hasLinkedRanges=!0):E.firstNonLinked||(E.firstNonLinked=V)}E.firstNonLinked||(E.hasLinkedRanges=!1),E===A&&(p.push(E),this.$openTabstops[x]=E),this.addTabstopMarkers(E),E.rangeList=E.rangeList||new N,E.rangeList.$bias=0,E.rangeList.addList(E)},this),2<p.length&&(this.tabstops.length&&p.push(p.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,p))},s.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(r){r.markerId||(r.markerId=t.addMarker(r,"ace_snippet-marker","text"))})},s.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(r){t.removeMarker(r.markerId),r.markerId=null})},s.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),(t=this.ranges.indexOf(e))!=-1&&this.ranges.splice(t,1),(t=e.tabstop.rangeList.ranges.indexOf(e))!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||((t=this.tabstops.indexOf(e.tabstop))!=-1&&this.tabstops.splice(t,1),this.tabstops.length)||this.detach()},s);function s(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;(e.tabstopManager=this).$onChange=this.onChange.bind(this),this.$onChangeSelection=X.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}n.prototype.keyboardHandler=new w,n.prototype.keyboardHandler.bindKeys({Tab:function(e){S.snippetManager&&S.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var i=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},o=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row},a=(K.importCssString(`
|
|
.ace_snippet-marker {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
background: rgba(194, 193, 208, 0.09);
|
|
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
position: absolute;
|
|
}`,"snippets.css",!1),S.snippetManager=new h,U("./editor").Editor);(function(){this.insertSnippet=function(e,t){return S.snippetManager.insertSnippet(this,e,t)},this.expandSnippet=function(e){return S.snippetManager.expandWithTab(this,e)}}).call(a.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(U,S,M){function K(h){return"suggest-aria-id:".concat(h)}function j(h){return(h=new F(h)).$maxLines=4,(h=new N(h)).setHighlightActiveLine(!1),h.setShowPrintMargin(!1),h.renderer.setShowGutter(!1),h.renderer.setHighlightGutterLine(!1),h.$mouseHandler.$focusTimeout=0,h.$highlightTagPending=!0,h}function X(h){function l(){}function c(){e(-1)}var n,s=I.createElement("div"),i=new j(s),o=(h&&h.appendChild(s),s.style.display="none",i.renderer.content.style.cursor="default",i.renderer.setStyle("ace_autocomplete"),i.renderer.$textLayer.element.setAttribute("role","listbox"),i.renderer.$textLayer.element.setAttribute("aria-label",C("Autocomplete suggestions")),i.renderer.textarea.setAttribute("aria-hidden","true"),i.setOption("displayIndentGuides",!1),i.setOption("dragDelay",150),i.focus=l,i.$isFocused=!0,i.renderer.$cursorLayer.restartTimer=l,i.renderer.$cursorLayer.element.style.opacity=0,i.renderer.$maxLines=8,i.renderer.$keepTextAreaAtCursor=!1,i.setHighlightActiveLine(!1),i.session.highlight(""),i.session.$searchHighlight.clazz="ace_highlight-marker",i.on("mousedown",function(t){var r=t.getDocumentPosition();i.selection.moveToPosition(r),a.start.row=a.end.row=r.row,t.stop()}),new w(-1,0,-1,1/0)),a=new w(-1,0,-1,1/0),e=(a.id=i.session.addMarker(a,"ace_active-line","fullLine"),i.setSelectOnHover=function(t){t?o.id&&(i.session.removeMarker(o.id),o.id=null):o.id=i.session.addMarker(o,"ace_line-hover","fullLine")},i.setSelectOnHover(!1),i.on("mousemove",function(t){var r;n?n.x==t.x&&n.y==t.y||((n=t).scrollTop=i.renderer.scrollTop,r=n.getDocumentPosition().row,o.start.row!=r&&(o.id||i.setRow(r),e(r))):n=t}),i.renderer.on("beforeRender",function(){var t;n&&o.start.row!=-1&&(n.$pos=null,t=n.getDocumentPosition().row,o.id||i.setRow(t),e(t,!0))}),i.renderer.on("afterRender",function(){var t,r=i.getRow(),d=i.renderer.$textLayer,p=d.element.childNodes[r-d.config.firstRow],g=document.activeElement;p!==d.selectedNode&&d.selectedNode&&(I.removeCssClass(d.selectedNode,"ace_selected"),g.removeAttribute("aria-activedescendant"),d.selectedNode.removeAttribute("id")),(d.selectedNode=p)&&(I.addCssClass(p,"ace_selected"),t=K(r),p.id=t,d.element.setAttribute("aria-activedescendant",t),g.setAttribute("aria-activedescendant",t),p.setAttribute("role","option"),p.setAttribute("aria-label",i.getData(r).value),p.setAttribute("aria-setsize",i.data.length),p.setAttribute("aria-posinset",r+1),p.setAttribute("aria-describedby","doc-tooltip"))}),function(t,r){t!==o.start.row&&(o.start.row=o.end.row=t,r||i.session._emit("changeBackMarker"),i._emit("changeHoverMarker"))});return i.getHoveredRow=function(){return o.start.row},f.addListener(i.container,"mouseout",c),i.on("hide",c),i.on("changeSelection",c),i.session.doc.getLength=function(){return i.data.length},i.session.doc.getLine=function(t){return t=i.data[t],typeof t=="string"?t:t&&t.value||""},(h=i.session.bgTokenizer).$tokenizeRow=function(t){var r=i.data[t],d=[];if(r){for(var p,g,A=(r=typeof r=="string"?{value:r}:r).caption||r.value||r.name,x=A.toLowerCase(),E=(i.filterText||"").toLowerCase(),W=0,B=0,V=0;V<=E.length;V++)V!=B&&(r.matchMask&1<<V||V==E.length)&&(p=E.slice(B,V),B=V,(g=x.indexOf(p,W))!=-1)&&(u(A.slice(W,g),""),W=g+p.length,u(A.slice(g,W),"completion-highlight"));u(A.slice(W,A.length),""),d.push({type:"completion-spacer",value:" "}),r.meta&&d.push({type:"completion-meta",value:r.meta}),r.message&&d.push({type:"completion-message",value:r.message})}return d;function u(v,$){v&&d.push({type:(r.className||"")+($||""),value:v})}},h.$updateOnChange=l,h.start=l,i.session.$computeWidth=function(){return this.screenWidth=0},i.isOpen=!1,i.isTopdown=!1,i.autoSelect=!0,i.filterText="",i.data=[],i.setData=function(t,r){i.filterText=r||"",i.setValue(_.stringRepeat(`
|
|
`,t.length),-1),i.data=t||[],i.setRow(0)},i.getData=function(t){return i.data[t]},i.getRow=function(){return a.start.row},i.setRow=function(t){t=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,t)),a.start.row!=t&&(i.selection.clearSelection(),a.start.row=a.end.row=t||0,i.session._emit("changeBackMarker"),i.moveCursorTo(t||0,0),i.isOpen)&&i._signal("select")},i.on("changeSelection",function(){i.isOpen&&i.setRow(i.selection.lead.row),i.renderer.scrollCursorIntoView()}),i.hide=function(){this.container.style.display="none",i.anchorPos=null,i.anchor=null,i.isOpen&&(i.isOpen=!1,this._signal("hide"))},i.tryShow=function(t,r,d,p){if(p||!i.isOpen||!i.anchorPos||!i.anchor||i.anchorPos.top!==t.top||i.anchorPos.left!==t.left||i.anchor!==d){var g=this.container,A=window.innerHeight,x=window.innerWidth,E=this.renderer,W=E.$maxLines*r*1.4,B={top:0,bottom:0,left:0},V=A-t.top-3*this.$borderSize-r,u=t.top-3*this.$borderSize,r=((d=d||(u<=V||W<=V?"bottom":"top"))==="top"?(B.bottom=t.top-this.$borderSize,B.top=B.bottom-W):d==="bottom"&&(B.top=t.top+r+this.$borderSize,B.bottom=B.top+W),0<=B.top&&B.bottom<=A);if(!p&&!r)return!1;E.$maxPixelHeight=r?null:d==="top"?u:V,d==="top"?(g.style.top="",g.style.bottom=A-B.bottom+"px",i.isTopdown=!1):(g.style.top=B.top+"px",g.style.bottom="",i.isTopdown=!0),g.style.display="",W=t.left,W+g.offsetWidth>x&&(W=x-g.offsetWidth),g.style.left=W+"px",g.style.right="",i.isOpen||(i.isOpen=!0,this._signal("show"),n=null),i.anchorPos=t,i.anchor=d}return!0},i.show=function(t,r,d){this.tryShow(t,r,d?"bottom":void 0,!0)},i.goTo=function(t){var r=this.getRow(),d=this.session.getLength()-1;switch(t){case"up":r=r<=0?d:r-1;break;case"down":r=d<=r?-1:r+1;break;case"start":r=0;break;case"end":r=d}this.setRow(r)},i.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},i.$imageSize=0,i.$borderSize=1,i}var F=U("../virtual_renderer").VirtualRenderer,N=U("../editor").Editor,w=U("../range").Range,f=U("../lib/event"),_=U("../lib/lang"),I=U("../lib/dom"),C=U("../config").nls;I.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-left: 0.9em;
|
|
}
|
|
.ace_completion-message {
|
|
color: blue;
|
|
}
|
|
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
color: #2d69c7;
|
|
}
|
|
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
color: #93ca12;
|
|
}
|
|
.ace_editor.ace_autocomplete {
|
|
width: 300px;
|
|
z-index: 200000;
|
|
border: 1px lightgray solid;
|
|
position: fixed;
|
|
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
line-height: 1.4;
|
|
background: #fefefe;
|
|
color: #111;
|
|
}
|
|
.ace_dark.ace_editor.ace_autocomplete {
|
|
border: 1px #484747 solid;
|
|
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
line-height: 1.4;
|
|
background: #25282c;
|
|
color: #c1c1c1;
|
|
}
|
|
.ace_autocomplete .ace_text-layer {
|
|
width: calc(100% - 8px);
|
|
}
|
|
.ace_autocomplete .ace_line {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.ace_autocomplete .ace_line > * {
|
|
min-width: 0;
|
|
flex: 0 0 auto;
|
|
}
|
|
.ace_autocomplete .ace_line .ace_ {
|
|
flex: 0 1 auto;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.ace_autocomplete .ace_completion-spacer {
|
|
flex: 1;
|
|
}
|
|
`,"autocompletion.css",!1),S.AcePopup=X,S.$singleLineEditor=j,S.getAriaId=K}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(U,S,M){var K=U("../snippets").snippetManager;function j(){this.editor=null}j.prototype.show=function(X,F,N){var w;return N=N||"",X&&this.editor&&this.editor!==X&&(this.hide(),this.editor=null),!(!X||!F||(w=F.snippet?K.getDisplayTextForSnippet(X,F.snippet):F.value,F.hideInlinePreview)||!w||!w.startsWith(N)||(this.editor=X,(w=w.slice(N.length))===""?X.removeGhostText():X.setGhostText(w),0))},j.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},j.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},j.prototype.destroy=function(){this.hide(),this.editor=null},S.AceInline=j}),ace.define("ace/autocomplete/util",["require","exports","module"],function(U,S,M){S.parForEach=function(j,X,F){var N=0,w=j.length;w===0&&F();for(var f=0;f<w;f++)X(j[f],function(_,I){++N===w&&F(_,I)})};var K=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;S.retrievePrecedingIdentifier=function(j,X,F){F=F||K;for(var N=[],w=X-1;0<=w&&F.test(j[w]);w--)N.push(j[w]);return N.reverse().join("")},S.retrieveFollowingIdentifier=function(j,X,F){F=F||K;for(var N=[],w=X;w<j.length&&F.test(j[w]);w++)N.push(j[w]);return N},S.getCompletionPrefix=function(j){var X,F=j.getCursorPosition(),N=j.session.getLine(F.row);return j.completers.forEach(function(w){w.identifierRegexps&&w.identifierRegexps.forEach(function(f){!X&&f&&(X=this.retrievePrecedingIdentifier(N,F.column,f))}.bind(this))}.bind(this)),X||this.retrievePrecedingIdentifier(N,F.column)},S.triggerAutocomplete=function(j){var X=j.getCursorPosition(),F=j.session.getLine(X.row)[X.column===0?0:X.column-1];return j.completers.some(function(N){if(N.triggerCharacters&&Array.isArray(N.triggerCharacters))return N.triggerCharacters.includes(F)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],function(U,S,M){function K(o,a){a.completer&&a.completer.destroy()}var j=U("./keyboard/hash_handler").HashHandler,X=U("./autocomplete/popup").AcePopup,F=U("./autocomplete/inline").AceInline,N=U("./autocomplete/popup").getAriaId,w=U("./autocomplete/util"),f=U("./lib/lang"),_=U("./lib/dom"),I=U("./snippets").snippetManager,C=U("./config"),h=(l.prototype.$init=function(){return this.popup=new X(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(o){this.insertMatch(),o.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupChange.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},l.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new F,this.inlineRenderer},l.prototype.getPopup=function(){return this.popup||this.$init()},l.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip()},l.prototype.$onPopupChange=function(o){var a;this.inlineRenderer&&this.inlineEnabled&&(o=o?null:this.popup.getData(this.popup.getRow()),a=w.getCompletionPrefix(this.editor),this.inlineRenderer.show(this.editor,o,a)||this.inlineRenderer.hide(),this.$updatePopupPosition()),this.tooltipTimer.call(null,null)},l.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var o=this.editor.container.parentNode,a=[];o;)a.push(o),o.addEventListener("scroll",this.onLayoutChange,{passive:!0}),o=o.parentNode;this.$elements=a}},l.prototype.unObserveLayoutChanges=function(){var o=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(a){a.removeEventListener("scroll",o.onLayoutChange,{passive:!0})}),this.$elements=null},l.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},l.prototype.$updatePopupPosition=function(){var o=this.editor,a=o.renderer,e=a.layerConfig.lineHeight,t=a.$cursorLayer.getPixelPosition(this.base,!0),r=(t.left-=this.popup.getTextLeftOffset(),o.container.getBoundingClientRect()),r=(t.top+=r.top-a.layerConfig.offset,t.left+=r.left-o.renderer.scrollLeft,t.left+=a.gutterWidth,{top:t.top,left:t.left});a.$ghostText&&a.$ghostTextWidget&&this.base.row===a.$ghostText.position.row&&(r.top+=a.$ghostTextWidget.el.offsetHeight),this.popup.tryShow(r,e,"bottom")||this.popup.tryShow(t,e,"top")||this.popup.show(t,e)},l.prototype.openPopup=function(o,a,e){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover),this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:N(this.popup.getRow()),inline:this.inlineEnabled}),o.keyBinding.addKeyboardHandler(this.keyboardHandler),this.popup.setRow(this.autoSelect?0:-1),e?a||this.detach():(this.popup.setTheme(o.getTheme()),this.popup.setFontSize(o.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},l.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},l.prototype.changeListener=function(o){var a=this.editor.selection.lead;(a.row!=this.base.row||a.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},l.prototype.blurListener=function(o){var a=document.activeElement,e=this.editor.textInput.getElement(),t=o.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(o.relatedTarget),r=this.popup&&this.popup.container;a==e||a.parentNode==r||t||a==this.tooltipNode||o.relatedTarget==e||this.detach()},l.prototype.mousedownListener=function(o){this.detach()},l.prototype.mousewheelListener=function(o){this.detach()},l.prototype.goTo=function(o){this.popup.goTo(o)},l.prototype.insertMatch=function(o,a){var e;return!!(o=o||this.popup.getData(this.popup.getRow()))&&(o.value===""?this.detach():(e=this.completions,o=this.getCompletionProvider().insertMatch(this.editor,o,e.filterText,a),this.completions==e&&this.detach(),o))},l.prototype.showPopup=function(o,a){this.editor&&this.detach(),this.activated=!0,(this.editor=o).completer!=this&&(o.completer&&o.completer.detach(),o.completer=this),o.on("changeSelection",this.changeListener),o.on("blur",this.blurListener),o.on("mousedown",this.mousedownListener),o.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,a)},l.prototype.getCompletionProvider=function(o){return this.completionProvider||(this.completionProvider=new c(o)),this.completionProvider},l.prototype.gatherCompletions=function(o,a){return this.getCompletionProvider().gatherCompletions(o,a)},l.prototype.updateCompletions=function(o,a){var e,t;return o&&this.base&&this.completions?(e=this.editor.getCursorPosition(),(t=this.editor.session.getTextRange({start:this.base,end:e}))==this.completions.filterText?void 0:(this.completions.setFilter(t),this.completions.filtered.length&&(this.completions.filtered.length!=1||this.completions.filtered[0].value!=t||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,t,o):this.detach())):a&&a.matches?(e=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(e.row,e.column),this.base.$insertRight=!0,this.completions=new s(a.matches),this.openPopup(this.editor,"",o)):(a=this.editor.getSession(),e=this.editor.getCursorPosition(),t=w.getCompletionPrefix(this.editor),this.base=a.doc.createAnchor(e.row,e.column-t.length),this.base.$insertRight=!0,a={exactMatch:this.exactMatch},void this.getCompletionProvider({prefix:t,pos:e}).provideCompletions(this.editor,a,function(r,d,p){var g=d.filtered,A=w.getCompletionPrefix(this.editor);if(p){if(!g.length)return(p=typeof(p=!this.autoShown&&this.emptyMessage)=="function"?this.emptyMessage(A):p)?(p=[{caption:this.emptyMessage(A),value:""}],this.completions=new s(p),void this.openPopup(this.editor,A,o)):this.detach();if(g.length==1&&g[0].value==A&&!g[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&g.length==1)return this.insertMatch(g[0])}this.completions=d,this.openPopup(this.editor,A,o)}.bind(this)))},l.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},l.prototype.updateDocTooltip=function(){var o=this.popup,a=o.data,e=a&&(a[o.getHoveredRow()]||a[o.getRow()]),t=null;if(!e||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var r=this.editor.completers.length,d=0;d<r;d++){var p=this.editor.completers[d];if(p.getDocTooltip&&e.completerId===p.id){t=p.getDocTooltip(e);break}}if(!(t=typeof(t=t||typeof e=="string"?t:e)=="string"?{docText:t}:t)||!t.docHTML&&!t.docText)return this.hideDocTooltip();this.showDocTooltip(t)},l.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=_.createElement("div"),this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"));var a=this.editor.renderer.theme,a=(this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(a.isDark?"ace_dark ":"")+(a.cssClass||""),this.tooltipNode),e=(e.docHTML?a.innerHTML=e.docHTML:e.docText&&(a.textContent=e.docText),a.parentNode||this.popup.container.appendChild(this.tooltipNode),this.popup),t=e.container.getBoundingClientRect();a.style.top=e.container.style.top,a.style.bottom=e.container.style.bottom,a.style.display="block",window.innerWidth-t.right<320?t.left<320?(e.isTopdown?a.style.top=t.bottom+"px":a.style.top=e.container.offsetTop-a.offsetHeight+"px",a.style.left=t.left+"px",a.style.right="",a.style.bottom=""):(a.style.right=window.innerWidth-t.left+"px",a.style.left=""):(a.style.left=t.right+1+"px",a.style.right="")},l.prototype.hideDocTooltip=function(){var o;this.tooltipTimer.cancel(),this.tooltipNode&&(o=this.tooltipNode,this.editor.isFocused()||document.activeElement!=o||this.editor.focus(),this.tooltipNode=null,o.parentNode)&&o.parentNode.removeChild(o)},l.prototype.onTooltipClick=function(o){for(var a=o.target;a&&a!=this.tooltipNode;){if(a.nodeName=="A"&&a.href){a.rel="noreferrer",a.target="_blank";break}a=a.parentNode}},l.prototype.destroy=function(){var o;this.detach(),this.popup&&(this.popup.destroy(),o=this.popup.container)&&o.parentNode&&o.parentNode.removeChild(o),this.editor&&this.editor.completer==this&&(this.editor.off("destroy",K),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},l);function l(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new j,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,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.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=f.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=f.delayedCall(this.updateDocTooltip.bind(this),50)}h.prototype.commands={Up:function(o){o.completer.goTo("up")},Down:function(o){o.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(o){o.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(o){o.completer.goTo("end")},Esc:function(o){o.completer.detach()},Return:function(o){return o.completer.insertMatch()},"Shift-Return":function(o){o.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(o){var a=o.completer.insertMatch();if(a||o.tabstopManager)return a;o.completer.goTo("down")},PageUp:function(o){o.completer.popup.gotoPageUp()},PageDown:function(o){o.completer.popup.gotoPageDown()}},h.for=function(o){return o.completer instanceof h||(o.completer&&(o.completer.destroy(),o.completer=null),C.get("sharedPopups")?(h.$sharedInstance||(h.$sharedInstance=new h),o.completer=h.$sharedInstance):(o.completer=new h,o.once("destroy",K))),o.completer},h.startCommand={name:"startAutocomplete",exec:function(o,a){var e=h.for(o);e.autoInsert=!1,e.autoSelect=!0,e.autoShown=!1,e.showPopup(o,a),e.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"},n.prototype.insertByIndex=function(o,a,e){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(o,this.completions.filtered[a],e)},n.prototype.insertMatch=function(o,a,e){if(!a)return!1;if(o.startOperation({command:{name:"insertMatch"}}),a.completer&&a.completer.insertMatch)a.completer.insertMatch(o,a);else{if(!this.completions)return!1;var t=this.completions.filterText.length,r=0;if(a.range&&a.range.start.row===a.range.end.row&&(t=(t-=this.initialPosition.prefix.length)+(this.initialPosition.pos.column-a.range.start.column),r+=a.range.end.column-this.initialPosition.pos.column),t||r)for(var d,p=o.selection.getAllRanges?o.selection.getAllRanges():[o.getSelectionRange()],g=0;d=p[g];g++)d.start.column-=t,d.end.column+=r,o.session.remove(d);a.snippet?I.insertSnippet(o,a.snippet):this.$insertString(o,a),a.command&&a.command==="startAutocomplete"&&o.execCommand(a.command)}return o.endOperation(),!0},n.prototype.$insertString=function(o,a){a=a.value||a,o.execCommand("insertstring",a)},n.prototype.gatherCompletions=function(o,a){var e=o.getSession(),t=o.getCursorPosition(),r=w.getCompletionPrefix(o),d=[],p=(this.completers=o.completers,o.completers.length);return o.completers.forEach(function(g,A){g.getCompletions(o,e,t,r,function(x,E){g.hideInlinePreview&&(E=E.map(function(W){return Object.assign(W,{hideInlinePreview:g.hideInlinePreview})})),!x&&E&&(d=d.concat(E)),a(null,{prefix:w.getCompletionPrefix(o),matches:d,finished:--p==0})})}),!0},n.prototype.provideCompletions=function(o,a,e){var t=function(p){var g=p.prefix,A=p.matches;this.completions=new s(A),a.exactMatch&&(this.completions.exactMatch=!0),a.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(g),(p.finished||this.completions.filtered.length)&&e(null,this.completions,p.finished)}.bind(this),r=!0,d=null;this.gatherCompletions(o,function(p,g){this.active&&(p&&(e(p,[],!0),this.detach()),g.prefix.indexOf(g.prefix)===0)&&(r?d=g:t(g))}.bind(this)),r=!1,d&&(o=d,d=null,t(o))},n.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(o){typeof o.cancel=="function"&&o.cancel()})};var c=n;function n(o){this.initialPosition=o,this.active=!0}i.prototype.setFilter=function(o){a=o.length>this.filterText&&o.lastIndexOf(this.filterText,0)===0?this.filtered:this.all,this.filterText=o,a=(a=this.filterCompletions(a,this.filterText)).sort(function(t,r){return r.exactMatch-t.exactMatch||r.$score-t.$score||(t.caption||t.value).localeCompare(r.caption||r.value)});var a,e=null;a=a.filter(function(t){return t=t.snippet||t.caption||t.value,t!==e&&(e=t,!0)}),this.filtered=a},i.prototype.filterCompletions=function(o,a){var e=[],t=a.toUpperCase(),r=a.toLowerCase();e:for(var d,p=0;d=o[p];p++){var g=!this.ignoreCaption&&d.caption||d.value||d.snippet;if(g){var A=-1,x=0,E=0;if(this.exactMatch){if(a!==g.substr(0,a.length))continue}else{var W=g.toLowerCase().indexOf(r);if(-1<W)E=W;else for(var B=0;B<a.length;B++){var V=g.indexOf(r[B],A+1),u=g.indexOf(t[B],A+1);if((V=0<=V&&(u<0||V<u)?V:u)<0)continue e;0<(u=V-A-1)&&(A===-1&&(E+=10),E+=u,x|=1<<B),A=V}}d.matchMask=x,d.exactMatch=E?0:1,d.$score=(d.score||0)-E,e.push(d)}}return e};var s=i;function i(o,a){this.all=o,this.filtered=o,this.filterText=a||"",this.exactMatch=!1,this.ignoreCaption=!1}S.Autocomplete=h,S.CompletionProvider=c,S.FilteredList=s}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(U,S,M){var K=U("../range").Range,j=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function X(F,N){var w=F.getTextRange(K.fromPoints({row:0,column:0},N)).split(j).length-1,f=F.getValue().split(j),_=Object.create(null),I=f[w];return f.forEach(function(C,h){C&&C!==I&&(h=Math.abs(w-h),h=f.length-h,_[C]?_[C]=Math.max(h,_[C]):_[C]=h)}),_}S.getCompletions=function(F,N,w,f,_){var I=X(N,w);_(null,Object.keys(I).map(function(C){return{caption:C,value:C,score:I[C],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(U,S,M){function K(a,e){c(e.session.$mode)}function j(a){var e=a.editor,t=e.completer&&e.completer.activated;a.command.name==="backspace"?t&&!_.getCompletionPrefix(e)&&e.completer.detach():a.command.name!=="insertstring"||t||((e=(X=a).editor.$liveAutocompletionDelay)?s.delay(e):i(a))}var X,F=U("../snippets").snippetManager,N=U("../autocomplete").Autocomplete,w=U("../config"),f=U("../lib/lang"),_=U("../autocomplete/util"),o=U("../autocomplete/text_completer"),I={getCompletions:function(a,e,t,r,d){if(e.$mode.completer)return e.$mode.completer.getCompletions(a,e,t,r,d);a=a.session.getState(t.row),d(null,e.$mode.getCompletions(a,e,t,r).map(function(p){return p.completerId=I.id,p}))},id:"keywordCompleter"},C={getCompletions:function(a,g,t,r,d){var p=[],g=g.getTokenAt(t.row,t.column),A=(g&&g.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?p.push("html-tag"):p=F.getActiveScopes(a),F.snippetMap),x=[];p.forEach(function(E){for(var W=A[E]||[],B=W.length;B--;){var V=W[B],u=V.name||V.tabTrigger;u&&x.push({caption:u,snippet:V.content,meta:V.tabTrigger&&!V.name?V.tabTrigger+"\u21E5 ":"snippet",completerId:C.id})}},this),d(null,x)},getDocTooltip:function(a){var e;a.snippet&&!a.docHTML&&(a.docHTML=["<b>",f.escapeHTML(a.caption),"</b>","<hr></hr>",f.escapeHTML((a=a.snippet,e={},a.replace(/\${(\d+)(:(.*?))?}/g,function(t,r,d,p){return e[r]=p||""}).replace(/\$(\d+?)/g,function(t,r){return e[r]})))].join(""))},id:"snippetCompleter"},h=[C,o,I],l=(S.setCompleters=function(a){h.length=0,a&&h.push.apply(h,a)},S.addCompleter=function(a){h.push(a)},S.textCompleter=o,S.keyWordCompleter=I,S.snippetCompleter=C,{name:"expandSnippet",exec:function(a){return F.expandWithTab(a)},bindKey:"Tab"}),c=function(a){(a=typeof a=="string"?w.$modes[a]:a)&&(F.files||(F.files={}),n(a.$id,a.snippetFileId),a.modes)&&a.modes.forEach(c)},n=function(a,e){e&&a&&!F.files[a]&&(F.files[a]={},w.loadModule(e,function(t){t&&(!(F.files[a]=t).snippets&&t.snippetText&&(t.snippets=F.parseSnippetFile(t.snippetText)),F.register(t.snippets||[],t.scope),t.includeScopes)&&(F.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(r){c("ace/mode/"+r)}))}))},s=f.delayedCall(function(){i(X)},0),i=function(e){var e=e.editor,t=_.getCompletionPrefix(e),r=_.triggerAutocomplete(e);(t&&t.length>=e.$liveAutocompletionThreshold||r)&&((t=N.for(e)).autoShown=!0,t.showPopup(e))},o=U("../editor").Editor;U("../config").defineOptions(o.prototype,"editor",{enableBasicAutocompletion:{set:function(a){a?(this.completers||(this.completers=Array.isArray(a)?a:h),this.commands.addCommand(N.startCommand)):this.commands.removeCommand(N.startCommand)},value:!1},enableLiveAutocompletion:{set:function(a){a?(this.completers||(this.completers=Array.isArray(a)?a:h),this.commands.on("afterExec",j)):this.commands.off("afterExec",j)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(a){a?(this.commands.addCommand(l),this.on("changeMode",K),K(0,this)):(this.commands.removeCommand(l),this.off("changeMode",K))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(U){ae&&(ae.exports=U)})},3330:function(ae,m,O){ae=O.nmd(ae),ace.define("ace/ext/searchbox-css",["require","exports","module"],function(U,S,M){M.exports=`
|
|
|
|
/* ------------------------------------------------------------------------------------------
|
|
* Editor Search Form
|
|
* --------------------------------------------------------------------------------------- */
|
|
.ace_search {
|
|
background-color: #ddd;
|
|
color: #666;
|
|
border: 1px solid #cbcbcb;
|
|
border-top: 0 none;
|
|
overflow: hidden;
|
|
margin: 0;
|
|
padding: 4px 6px 0 4px;
|
|
position: absolute;
|
|
top: 0;
|
|
z-index: 99;
|
|
white-space: normal;
|
|
}
|
|
.ace_search.left {
|
|
border-left: 0 none;
|
|
border-radius: 0px 0px 5px 0px;
|
|
left: 0;
|
|
}
|
|
.ace_search.right {
|
|
border-radius: 0px 0px 0px 5px;
|
|
border-right: 0 none;
|
|
right: 0;
|
|
}
|
|
|
|
.ace_search_form, .ace_replace_form {
|
|
margin: 0 20px 4px 0;
|
|
overflow: hidden;
|
|
line-height: 1.9;
|
|
}
|
|
.ace_replace_form {
|
|
margin-right: 0;
|
|
}
|
|
.ace_search_form.ace_nomatch {
|
|
outline: 1px solid red;
|
|
}
|
|
|
|
.ace_search_field {
|
|
border-radius: 3px 0 0 3px;
|
|
background-color: white;
|
|
color: black;
|
|
border: 1px solid #cbcbcb;
|
|
border-right: 0 none;
|
|
outline: 0;
|
|
padding: 0;
|
|
font-size: inherit;
|
|
margin: 0;
|
|
line-height: inherit;
|
|
padding: 0 6px;
|
|
min-width: 17em;
|
|
vertical-align: top;
|
|
min-height: 1.8em;
|
|
box-sizing: content-box;
|
|
}
|
|
.ace_searchbtn {
|
|
border: 1px solid #cbcbcb;
|
|
line-height: inherit;
|
|
display: inline-block;
|
|
padding: 0 6px;
|
|
background: #fff;
|
|
border-right: 0 none;
|
|
border-left: 1px solid #dcdcdc;
|
|
cursor: pointer;
|
|
margin: 0;
|
|
position: relative;
|
|
color: #666;
|
|
}
|
|
.ace_searchbtn:last-child {
|
|
border-radius: 0 3px 3px 0;
|
|
border-right: 1px solid #cbcbcb;
|
|
}
|
|
.ace_searchbtn:disabled {
|
|
background: none;
|
|
cursor: default;
|
|
}
|
|
.ace_searchbtn:hover {
|
|
background-color: #eef1f6;
|
|
}
|
|
.ace_searchbtn.prev, .ace_searchbtn.next {
|
|
padding: 0px 0.7em
|
|
}
|
|
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
|
content: "";
|
|
border: solid 2px #888;
|
|
width: 0.5em;
|
|
height: 0.5em;
|
|
border-width: 2px 0 0 2px;
|
|
display:inline-block;
|
|
transform: rotate(-45deg);
|
|
}
|
|
.ace_searchbtn.next:after {
|
|
border-width: 0 2px 2px 0 ;
|
|
}
|
|
.ace_searchbtn_close {
|
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
|
border-radius: 50%;
|
|
border: 0 none;
|
|
color: #656565;
|
|
cursor: pointer;
|
|
font: 16px/16px Arial;
|
|
padding: 0;
|
|
height: 14px;
|
|
width: 14px;
|
|
top: 9px;
|
|
right: 7px;
|
|
position: absolute;
|
|
}
|
|
.ace_searchbtn_close:hover {
|
|
background-color: #656565;
|
|
background-position: 50% 100%;
|
|
color: white;
|
|
}
|
|
|
|
.ace_button {
|
|
margin-left: 2px;
|
|
cursor: pointer;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-o-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
overflow: hidden;
|
|
opacity: 0.7;
|
|
border: 1px solid rgba(100,100,100,0.23);
|
|
padding: 1px;
|
|
box-sizing: border-box!important;
|
|
color: black;
|
|
}
|
|
|
|
.ace_button:hover {
|
|
background-color: #eee;
|
|
opacity:1;
|
|
}
|
|
.ace_button:active {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
.ace_button.checked {
|
|
border-color: #3399ff;
|
|
opacity:1;
|
|
}
|
|
|
|
.ace_search_options{
|
|
margin-bottom: 3px;
|
|
text-align: right;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-o-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
clear: both;
|
|
}
|
|
|
|
.ace_search_counter {
|
|
float: left;
|
|
font-family: arial;
|
|
padding: 0 8px;
|
|
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(U,S,M){var K=U("../lib/dom"),j=U("../lib/lang"),X=U("../lib/event"),F=U("./searchbox-css"),N=U("../keyboard/hash_handler").HashHandler,w=U("../lib/keys"),f=U("../config").nls,_=(K.importCssString(F,"ace_searchbox",!1),I.prototype.setEditor=function(C){C.searchBox=this,C.renderer.scroller.appendChild(this.element),this.editor=C},I.prototype.setSession=function(C){this.searchRange=null,this.$syncOptions(!0)},I.prototype.$initElements=function(C){this.searchBox=C.querySelector(".ace_search_form"),this.replaceBox=C.querySelector(".ace_replace_form"),this.searchOption=C.querySelector("[action=searchInSelection]"),this.replaceOption=C.querySelector("[action=toggleReplace]"),this.regExpOption=C.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=C.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=C.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=C.querySelector(".ace_search_counter")},I.prototype.$init=function(){var C=this.element,h=(this.$initElements(C),this);X.addListener(C,"mousedown",function(l){setTimeout(function(){h.activeInput.focus()},0),X.stopPropagation(l)}),X.addListener(C,"click",function(l){var c=(l.target||l.srcElement).getAttribute("action");c&&h[c]?h[c]():h.$searchBarKb.commands[c]&&h.$searchBarKb.commands[c].exec(h),X.stopPropagation(l)}),X.addCommandKeyListener(C,function(l,c,n){n=w.keyCodeToString(n),c=h.$searchBarKb.findKeyCommand(c,n),c&&c.exec&&(c.exec(h),X.stopEvent(l))}),this.$onChange=j.delayedCall(function(){h.find(!1,!1)}),X.addListener(this.searchInput,"input",function(){h.$onChange.schedule(20)}),X.addListener(this.searchInput,"focus",function(){h.activeInput=h.searchInput,h.searchInput.value&&h.highlight()}),X.addListener(this.replaceInput,"focus",function(){h.activeInput=h.replaceInput,h.searchInput.value&&h.highlight()})},I.prototype.setSearchRange=function(C){(this.searchRange=C)?this.searchRangeMarker=this.editor.session.addMarker(C,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},I.prototype.$syncOptions=function(C){K.setCssClass(this.replaceOption,"checked",this.searchRange),K.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",K.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),K.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),K.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var h=this.editor.getReadOnly();this.replaceOption.style.display=h?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!h?"":"none",this.find(!1,!1,C)},I.prototype.highlight=function(C){this.editor.session.highlight(C||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},I.prototype.find=function(C,h,l){C=!this.editor.find(this.searchInput.value,{skipCurrent:C,backwards:h,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:l,range:this.searchRange})&&this.searchInput.value,K.setCssClass(this.searchBox,"ace_nomatch",C),this.editor._emit("findSearchBox",{match:!C}),this.highlight(),this.updateCounter()},I.prototype.updateCounter=function(){var C=this.editor,h=C.$search.$options.re,l=0,c=0;if(h){var n,s,i=this.searchRange?C.session.getTextRange(this.searchRange):C.getValue(),o=C.session.doc.positionToIndex(C.selection.anchor);for(this.searchRange&&(o-=C.session.doc.positionToIndex(this.searchRange.start)),h.lastIndex=0;(s=h.exec(i))&&((n=s.index)<=o&&c++,!(999<++l))&&(s[0]||(h.lastIndex=n+=1,!(n>=i.length))););}this.searchCounter.textContent=f("$0 of $1",[c,999<l?"999+":l])},I.prototype.findNext=function(){this.find(!0,!1)},I.prototype.findPrev=function(){this.find(!0,!0)},I.prototype.findAll=function(){var C=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;K.setCssClass(this.searchBox,"ace_nomatch",C),this.editor._emit("findSearchBox",{match:!C}),this.highlight(),this.hide()},I.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},I.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},I.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},I.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},I.prototype.show=function(C,h){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=h,C&&(this.searchInput.value=C),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},I.prototype.isFocused=function(){var C=document.activeElement;return C==this.searchInput||C==this.replaceInput},I);function I(C,h,l){var c=K.createElement("div");K.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:f("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"},f("All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:f("Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},f("Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},f("All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:f("Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:f("RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:f("CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:f("Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:f("Search In Selection")},"S"]]],c),this.element=c.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(C),K.importCssString(F,"ace_searchbox",C.container)}U=new N,U.bindKeys({"Ctrl-f|Command-f":function(C){var h=C.isReplace=!C.isReplace;C.replaceBox.style.display=h?"":"none",C.replaceOption.checked=!1,C.$syncOptions(),C.searchInput.focus()},"Ctrl-H|Command-Option-F":function(C){C.editor.getReadOnly()||(C.replaceOption.checked=!0,C.$syncOptions(),C.replaceInput.focus())},"Ctrl-G|Command-G":function(C){C.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(C){C.findPrev()},esc:function(C){setTimeout(function(){C.hide()})},Return:function(C){C.activeInput==C.replaceInput&&C.replace(),C.findNext()},"Shift-Return":function(C){C.activeInput==C.replaceInput&&C.replace(),C.findPrev()},"Alt-Return":function(C){C.activeInput==C.replaceInput&&C.replaceAll(),C.findAll()},Tab:function(C){(C.activeInput==C.replaceInput?C.searchInput:C.replaceInput).focus()}}),U.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(C){C.regExpOption.checked=!C.regExpOption.checked,C.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(C){C.caseSensitiveOption.checked=!C.caseSensitiveOption.checked,C.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(C){C.wholeWordOption.checked=!C.wholeWordOption.checked,C.$syncOptions()}},{name:"toggleReplace",exec:function(C){C.replaceOption.checked=!C.replaceOption.checked,C.$syncOptions()}},{name:"searchInSelection",exec:function(C){C.searchOption.checked=!C.searchRange,C.setSearchRange(C.searchOption.checked&&C.editor.getSelectionRange()),C.$syncOptions()}}]),N=new N([{bindKey:"Esc",name:"closeSearchBar",exec:function(C){C.searchBox.hide()}}]),_.prototype.$searchBarKb=U,_.prototype.$closeSearchBarKb=N,S.SearchBox=_,S.Search=function(C,h){(C.searchBox||new _(C)).show(C.session.getTextRange(),h)}}),ace.require(["ace/ext/searchbox"],function(U){ae&&(ae.exports=U)})},4091:function(ae,m,O){ae=O.nmd(ae),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(X,S,M){function K(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}}var j=X("../lib/oop"),X=X("./text_highlight_rules").TextHighlightRules;j.inherits(K,X),S.JsonHighlightRules=K}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(U,S,M){function K(){}var j=U("../range").Range;(function(){this.checkOutdent=function(X,F){return!!/^\s+$/.test(X)&&/^\s*\}/.test(F)},this.autoOutdent=function(X,F){var N,w=X.getLine(F).match(/^(\s*\})/);return w&&(w=w[1].length,N=X.findMatchingBracket({row:F,column:w}))&&N.row!=F?(N=this.$getIndent(X.getLine(N.row)),void X.replace(new j(F,0,F,w-1),N)):0},this.$getIndent=function(X){return X.match(/^\s*/)[0]}}).call(K.prototype),S.MatchingBraceOutdent=K}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(X,F,M){var K=X("../../lib/oop"),j=X("../../range").Range,X=X("./fold_mode").FoldMode,F=F.FoldMode=function(N){N&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+N.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+N.end)))};K.inherits(F,X),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(N,w,f){var _=N.getLine(f);return!this.singleLineBlockCommentRe.test(_)||this.startRegionRe.test(_)||this.tripleStarBlockCommentRe.test(_)?!(N=this._getFoldWidgetBase(N,w,f))&&this.startRegionRe.test(_)?"start":N:""},this.getFoldWidgetRange=function(N,w,f,_){var I,C,h,l=N.getLine(f);return this.startRegionRe.test(l)?this.getCommentRegionBlock(N,l,f):(C=l.match(this.foldingStartMarker))?(h=C.index,C[1]?this.openingBracketBlock(N,C[1],f,h):((I=N.getCommentFoldRange(f,h+C[0].length,1))&&!I.isMultiLine()&&(_?I=this.getSectionRange(N,f):w!="all"&&(I=null)),I)):w!=="markbegin"&&(C=l.match(this.foldingStopMarker))?(h=C.index+C[0].length,C[1]?this.closingBracketBlock(N,C[1],f,h):N.getCommentFoldRange(f,h,-1)):void 0},this.getSectionRange=function(N,w){for(var f=(l=N.getLine(w)).search(/\S/),_=w,I=l.length,C=w+=1,h=N.getLength();++w<h;){var l,c=(l=N.getLine(w)).search(/\S/);if(c!==-1){if(c<f)break;var n=this.getFoldWidgetRange(N,"all",w);if(n){if(n.start.row<=_)break;if(n.isMultiLine())w=n.end.row;else if(f==c)break}C=w}}return new j(_,I,C,N.getLine(C).length)},this.getCommentRegionBlock=function(N,w,f){for(var _=w.search(/\s*$/),I=N.getLength(),C=f,h=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++f<I;){w=N.getLine(f);var c=h.exec(w);if(c&&(c[1]?l--:l++,!l))break}if(C<f)return new j(C,_,f,w.length)}}.call(F.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/folding/cstyle","ace/worker/worker_client"],function(U,S,M){function K(){this.HighlightRules=F,this.$outdent=new N,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new w}var j=U("../lib/oop"),X=U("./text").Mode,F=U("./json_highlight_rules").JsonHighlightRules,N=U("./matching_brace_outdent").MatchingBraceOutdent,w=U("./folding/cstyle").FoldMode,f=U("../worker/worker_client").WorkerClient;j.inherits(K,X),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(_,I,C){var h=this.$getIndent(I);return _=="start"&&I.match(/^.*[\{\(\[]\s*$/)&&(h+=C),h},this.checkOutdent=function(_,I,C){return this.$outdent.checkOutdent(I,C)},this.autoOutdent=function(_,I,C){this.$outdent.autoOutdent(I,C)},this.createWorker=function(_){var I=new f(["ace"],"ace/mode/json_worker","JsonWorker");return I.attachToDocument(_.getDocument()),I.on("annotate",function(C){_.setAnnotations(C.data)}),I.on("terminate",function(){_.clearAnnotations()}),I},this.$id="ace/mode/json"}.call(K.prototype),S.Mode=K}),ace.require(["ace/mode/json"],function(U){ae&&(ae.exports=U)})},8903:function(f,m,O){var U=O(5689),S=O(3969),M=O(5255),K=O(4293),j=O(3508),X=O(3368),F=O(742),N=O(9394),w=O(3724),f=((f.exports=h).prototype.validate=function(e,t){var r;if(typeof e=="string"){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else e=this._addSchema(e),r=e.validate||this._compile(e);return e=r(t),r.$async!==!0&&(this.errors=r.errors),e},h.prototype.compile=function(e,t){return e=this._addSchema(e,void 0,t),e.validate||this._compile(e)},h.prototype.addSchema=function(e,t,r,d){if(Array.isArray(e))for(var p=0;p<e.length;p++)this.addSchema(e[p],void 0,r,d);else{var g=this._getId(e);if(g!==void 0&&typeof g!="string")throw new Error("schema id must be string");o(this,t=S.normalizeId(t||g)),this._schemas[t]=this._addSchema(e,r,d,!0)}return this},h.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},h.prototype.validateSchema=function(e,t){var r=e.$schema;if(r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(!(r=r||this._opts.defaultMeta||function(d){var p=d._opts.meta;return d._opts.defaultMeta=typeof p=="object"?d._getId(p)||p:d.getSchema(_)?_:void 0,d._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);if(r=this.validate(r,e),!r&&t){if(e="schema is invalid: "+this.errorsText(),this._opts.validateSchema!="log")throw new Error(e);this.logger.error(e)}return r},h.prototype.getSchema=function(e){var t=l(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(r,d){var p=S.schema.call(r,{schema:{}},d);{var g,A,x;if(p)return g=p.schema,A=p.root,p=p.baseId,x=U.call(r,g,A,void 0,p),r._fragments[d]=new K({ref:d,fragment:!0,schema:g,root:A,baseId:p,validate:x}),x}}(this,e)}},h.prototype.removeSchema=function(e){if(e instanceof RegExp)c(this,this._schemas,e),c(this,this._refs,e);else switch(typeof e){case"undefined":return c(this,this._schemas),c(this,this._refs),this._cache.clear(),this;case"string":var t=l(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":t=this._opts.serialize,t=t?t(e):e,t=(this._cache.del(t),this._getId(e)),t&&(t=S.normalizeId(t),delete this._schemas[t],delete this._refs[t])}return this},h.prototype.addFormat=function(e,t){return typeof t=="string"&&(t=new RegExp(t)),this._formats[e]=t,this},h.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=(t=t||{}).separator===void 0?", ":t.separator,d=t.dataVar===void 0?"data":t.dataVar,p="",g=0;g<e.length;g++){var A=e[g];A&&(p+=d+A.dataPath+" "+A.message+r)}return p.slice(0,-r.length)},h.prototype._addSchema=function(e,x,r,d){if(typeof e!="object"&&typeof e!="boolean")throw new Error("schema should be object or boolean");var p=this._opts.serialize,p=p?p(e):e,g=this._cache.get(p);if(g)return g;d=d||this._opts.addUsedSchema!==!1,g=S.normalizeId(this._getId(e)),g&&d&&o(this,g);var A,x=this._opts.validateSchema!==!1&&!x;x&&!(A=g&&g==S.normalizeId(e.$schema))&&this.validateSchema(e,!0);var E=S.ids.call(this,e),E=new K({id:g,schema:e,localRefs:E,cacheKey:p,meta:r});return g[0]!="#"&&d&&(this._refs[g]=E),this._cache.put(p,E),x&&A&&this.validateSchema(e,!0),E},h.prototype._compile=function(e,t){if(e.compiling)return(e.validate=p).schema=e.schema,p.errors=null,p.root=t||p,e.schema.$async===!0&&(p.$async=!0),p;var r,d;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{d=U.call(this,e.schema,t,e.localRefs)}catch(g){throw delete e.validate,g}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=d,e.refs=d.refs,e.refVal=d.refVal,e.root=d.root,d;function p(){var g=e.validate,A=g.apply(this,arguments);return p.errors=g.errors,A}},h.prototype.compileAsync=O(9677),O(7931)),f=(h.prototype.addKeyword=f.add,h.prototype.getKeyword=f.get,h.prototype.removeKeyword=f.remove,h.prototype.validateKeyword=f.validate,O(5359)),_=(h.ValidationError=f.Validation,h.MissingRefError=f.MissingRef,h.$dataMetaSchema=N,"http://json-schema.org/draft-07/schema"),I=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],C=["/properties"];function h(e){if(!(this instanceof h))return new h(e);e=this._opts=w.copy(e)||{};var W=this,t=W._opts.logger;if(t===!1)W.logger={log:a,warn:a,error:a};else{if(!(typeof(t=t===void 0?console:t)=="object"&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");W.logger=t}if(this._schemas={},this._refs={},this._fragments={},this._formats=X(e.format),this._cache=e.cache||new M,this._loadingSchemas={},this._compilations=[],this.RULES=F(),this._getId=function(v){switch(v.schemaId){case"auto":return i;case"id":return n;default:return s}}(e),e.loopRequired=e.loopRequired||1/0,e.errorDataPath=="property"&&(e._errorDataPathProperty=!0),e.serialize===void 0&&(e.serialize=j),this._metaOpts=function(v){for(var $=w.copy(v._opts),y=0;y<I.length;y++)delete $[I[y]];return $}(this),e.formats){var r,d=this;for(r in d._opts.formats){var p=d._opts.formats[r];d.addFormat(r,p)}}if(e.keywords){var g,A=this;for(g in A._opts.keywords){var x=A._opts.keywords[g];A.addKeyword(g,x)}}var E,W=this,B=(W._opts.$data&&(E=O(894),W.addMetaSchema(E,E.$id,!0)),W._opts.meta!==!1&&(E=O(6680),W._opts.$data&&(E=N(E,C)),W.addMetaSchema(E,_,!0),W._refs["http://json-schema.org/schema"]=_),typeof e.meta=="object"&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),this),V=B._opts.schemas;if(V)if(Array.isArray(V))B.addSchema(V);else for(var u in V)B.addSchema(V[u],u)}function l(e,t){return t=S.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function c(e,t,r){for(var d in t){var p=t[d];p.meta||r&&!r.test(d)||(e._cache.del(p.cacheKey),delete t[d])}}function n(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function s(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function i(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function o(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function a(){}},5255:function(ae){ae=ae.exports=function(){this._cache={}},ae.prototype.put=function(m,O){this._cache[m]=O},ae.prototype.get=function(m){return this._cache[m]},ae.prototype.del=function(m){delete this._cache[m]},ae.prototype.clear=function(){this._cache={}}},9677:function(ae,m,O){var U=O(5359).MissingRef;function S(M,K,j){var X=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof K=="function"&&(j=K,K=void 0);var F=N(M).then(function(){var w=X._addSchema(M,void 0,K);return w.validate||function f(_){try{return X._compile(_)}catch(C){if(C instanceof U)return I(C);throw C}function I(C){var h=C.missingSchema;if(c(h))throw new Error("Schema "+h+" is loaded but "+C.missingRef+" cannot be resolved");return C=X._loadingSchemas[h],C||(C=X._loadingSchemas[h]=X._opts.loadSchema(h)).then(l,l),C.then(function(n){if(!c(h))return N(n).then(function(){c(h)||X.addSchema(n,h,void 0,K)})}).then(function(){return f(_)});function l(){delete X._loadingSchemas[h]}function c(n){return X._refs[n]||X._schemas[n]}}}(w)});return j&&F.then(function(w){j(null,w)},j),F;function N(w){return w=w.$schema,w&&!X.getSchema(w)?S.call(X,{$ref:w},!0):Promise.resolve()}}ae.exports=S},5359:function(ae,m,O){var U=O(3969);function S(K,j,X){this.message=X||S.message(K,j),this.missingRef=U.url(K,j),this.missingSchema=U.normalizeId(U.fullPath(this.missingRef))}function M(K){return K.prototype=Object.create(Error.prototype),K.prototype.constructor=K}ae.exports={Validation:M(function(K){this.message="validation failed",this.errors=K,this.ajv=this.validation=!0}),MissingRef:M(S)},S.message=function(K,j){return"can't resolve reference "+j+" from id "+K}},3368:function(ae,m,j){var U=j(3724),S=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,M=[0,31,28,31,30,31,30,31,31,30,31,30,31],K=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,j=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,X=/^(?:[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,F=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,N=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,w=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,f=/^(?:\/(?:[^~/]|~0|~1)*)*$/,_=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,I=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function C(o){return U.copy(C[o=o=="full"?"full":"fast"])}function h(t){var a,e,t=t.match(S);return!!t&&(a=+t[1],e=+t[2],t=+t[3],1<=e)&&e<=12&&1<=t&&t<=(e!=2||(t=a)%4!=0||t%100==0&&t%400!=0?M[e]:29)}function l(d,a){var e,t,r,d=d.match(K);return!!d&&(e=d[1],t=d[2],r=d[3],d=d[5],e<=23&&t<=59&&r<=59||e==23&&t==59&&r==60)&&(!a||d)}(ae.exports=C).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":F,url:N,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:j,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:w,"json-pointer":f,"json-pointer-uri-fragment":_,"relative-json-pointer":I},C.full={date:h,time:l,"date-time":function(o){return o=o.split(c),o.length==2&&h(o[0])&&l(o[1],!0)},uri:function(o){return n.test(o)&&X.test(o)},"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":F,url:N,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:j,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:w,"json-pointer":f,"json-pointer-uri-fragment":_,"relative-json-pointer":I};var c=/t|\s/i,n=/\/|:/,s=/[^\\]\\Z/;function i(o){if(s.test(o))return!1;try{return new RegExp(o),!0}catch{return!1}}},5689:function(ae,m,O){var U=O(3969),S=O(3724),M=O(5359),K=O(3508),j=O(1869),X=S.ucs2length,F=O(2303),N=M.Validation;function w(c,n,s,i){var o=this,a=this._opts,e=[void 0],t={},r=[],d={},p=[],g={},A=[],x=(n=n||{schema:c,refVal:e,refs:t},function(z,ee,T){var P=f.call(this,z,ee,T);return 0<=P?{index:P,compiling:!0}:(P=this._compilations.length,this._compilations[P]={schema:z,root:ee,baseId:T},{index:P,compiling:!1})}.call(this,c,n,i)),E=this._compilations[x.index];if(x.compiling)return E.callValidate=v;var W=this._formats,B=this.RULES;try{var V=$(c,n,s,i),u=(E.validate=V,E.callValidate);return u&&(u.schema=V.schema,u.errors=null,u.refs=V.refs,u.refVal=V.refVal,u.root=V.root,u.$async=V.$async,a.sourceCode)&&(u.source=V.source),V}finally{(function(z,ee,T){z=f.call(this,z,ee,T),0<=z&&this._compilations.splice(z,1)}).call(this,c,n,i)}function v(){var z=E.validate,ee=z.apply(this,arguments);return v.errors=z.errors,ee}function $(z,ee,T,P){var Z=!ee||ee.schema==z;if(ee.schema!=n.schema)return w.call(o,z,ee,T,P);T=z.$async===!0,P=j({isTop:!0,schema:z,isRoot:Z,baseId:P,root:ee,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:M.MissingRef,RULES:B,validate:j,util:S,resolve:U,resolveRef:y,usePattern:G,useDefault:Y,useCustomRule:Q,opts:a,formats:W,logger:o.logger,self:o}),P=l(e,C)+l(r,_)+l(p,I)+l(A,h)+P,a.processCode&&(P=a.processCode(P,z));try{var b=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",P)(o,B,W,n,e,p,A,F,X,N);e[0]=b}catch(k){throw o.logger.error("Error compiling schema, function code:",P),k}return b.schema=z,b.errors=null,b.refs=t,b.refVal=e,b.root=Z?b:ee,T&&(b.$async=!0),a.sourceCode===!0&&(b.source={code:P,patterns:r,defaults:p}),b}function y(z,ee,k){ee=U.url(z,ee);var P=t[ee];if(P!==void 0)return H(Z=e[P],b="refVal["+P+"]");if(!k&&n.refs&&(P=n.refs[ee],P!==void 0))return H(Z=n.refVal[P],b=L(ee,Z));var Z,b=L(ee),k=U.call(o,$,n,ee);if((k=k===void 0&&(P=s&&s[ee])?U.inlineRef(P,a.inlineRefs)?P:w.call(o,P,n,s,z):k)!==void 0)return Z=k,P=t[P=ee],e[P]=Z,H(k,b);delete t[ee]}function L(z,ee){var T=e.length;return e[T]=ee,"refVal"+(t[z]=T)}function H(z,ee){return typeof z=="object"||typeof z=="boolean"?{code:ee,schema:z,inline:!0}:{code:ee,$async:z&&!!z.$async}}function G(z){var ee=d[z];return ee===void 0&&(ee=d[z]=r.length,r[ee]=z),"pattern"+ee}function Y(z){switch(typeof z){case"boolean":case"number":return""+z;case"string":return S.toQuotedString(z);case"object":var ee,T;return z===null?"null":(ee=K(z),(T=g[ee])===void 0&&(T=g[ee]=p.length,p[T]=z),"default"+T)}}function Q(z,ee,T,P){if(o._opts.validateSchema!==!1){var b=z.definition.dependencies;if(b&&!b.every(function(J){return Object.prototype.hasOwnProperty.call(T,J)}))throw new Error("parent schema must have all required keywords: "+b.join(","));if(b=z.definition.validateSchema,b&&!b(ee)){if(b="keyword schema is invalid: "+o.errorsText(b.errors),o._opts.validateSchema!="log")throw new Error(b);o.logger.error(b)}}var Z,b=z.definition.compile,k=z.definition.inline,R=z.definition.macro;if(b)Z=b.call(o,ee,T,P);else if(R)Z=R.call(o,ee,T,P),a.validateSchema!==!1&&o.validateSchema(Z,!0);else if(k)Z=k.call(o,P,z.keyword,ee,T);else if(!(Z=z.definition.validate))return;if(Z===void 0)throw new Error('custom keyword "'+z.keyword+'"failed to compile');return b=A.length,{code:"customRule"+b,validate:A[b]=Z}}}function f(c,n,s){for(var i=0;i<this._compilations.length;i++){var o=this._compilations[i];if(o.schema==c&&o.root==n&&o.baseId==s)return i}return-1}function _(c,n){return"var pattern"+c+" = new RegExp("+S.toQuotedString(n[c])+");"}function I(c){return"var default"+c+" = defaults["+c+"];"}function C(c,n){return n[c]===void 0?"":"var refVal"+c+" = refVal["+c+"];"}function h(c){return"var customRule"+c+" = customRules["+c+"];"}function l(c,n){if(!c.length)return"";for(var s="",i=0;i<c.length;i++)s+=n(i,c);return s}ae.exports=w},3969:function(ae,m,O){var U=O(7533),S=O(2303),M=O(3724),K=O(4293),j=O(500);function X(n,s,i){var o,a,e,t=this._refs[i];if(typeof t=="string"){if(!this._refs[t])return X.call(this,n,s,t);t=this._refs[t]}return(t=t||this._schemas[i])instanceof K?_(t.schema,this._opts.inlineRefs)?t.schema:t.validate||this._compile(t):((t=F.call(this,s,i))&&(o=t.schema,s=t.root,e=t.baseId),o instanceof K?a=o.validate||n.call(this,o.schema,s,void 0,e):o!==void 0&&(a=_(o,this._opts.inlineRefs)?o:n.call(this,o,s,void 0,e)),a)}function F(n,s){var i=U.parse(s),o=C(i),a=I(this._getId(n.schema));if(Object.keys(n.schema).length===0||o!==a){var o=l(o),e=this._refs[o];if(typeof e=="string")return function(r,d,p){d=F.call(this,r,d);{var g,A;if(d)return g=d.schema,A=d.baseId,r=d.root,(d=this._getId(g))&&(A=c(A,d)),w.call(this,p,A,g,r)}}.call(this,n,e,i);if(e instanceof K)e.validate||this._compile(e);else{if(!((e=this._schemas[o])instanceof K))return;if(e.validate||this._compile(e),o==l(s))return{schema:e,root:n,baseId:a}}if(!(n=e).schema)return;a=I(this._getId(n.schema))}return w.call(this,i,a,n.schema,n)}(ae.exports=X).normalizeId=l,X.fullPath=I,X.url=c,X.ids=function(n){var s=l(this._getId(n)),i={"":s},o={"":I(s,!1)},a={},e=this;return j(n,{allKeys:!0},function(t,r,d,p,g,A,x){if(r!==""){var E=e._getId(t),W=i[p],p=o[p]+"/"+g;if(x!==void 0&&(p+="/"+(typeof x=="number"?x:M.escapeFragment(x))),typeof E=="string"){if(E=W=l(W?U.resolve(W,E):E),g=e._refs[E],(g=typeof g=="string"?e._refs[g]:g)&&g.schema){if(!S(t,g.schema))throw new Error('id "'+E+'" resolves to more than one schema')}else if(E!=l(p))if(E[0]=="#"){if(a[E]&&!S(t,a[E]))throw new Error('id "'+E+'" resolves to more than one schema');a[E]=t}else e._refs[E]=p}i[r]=W,o[r]=p}}),a},X.inlineRef=_,X.schema=F;var N=M.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function w(n,s,i,o){if(n.fragment=n.fragment||"",n.fragment.slice(0,1)=="/"){for(var a=n.fragment.split("/"),e=1;e<a.length;e++){var t=a[e];if(t){if((i=i[t=M.unescapeFragment(t)])===void 0)break;N[t]||((t=this._getId(i))&&(s=c(s,t)),i.$ref&&(t=c(s,i.$ref),t=F.call(this,o,t))&&(i=t.schema,o=t.root,s=t.baseId))}}return i!==void 0&&i!==o.schema?{schema:i,root:o,baseId:s}:void 0}}var f=M.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function _(n,s){return s!==!1&&(s===void 0||s===!0?function i(o){var a;if(Array.isArray(o)){for(var e=0;e<o.length;e++)if(typeof(a=o[e])=="object"&&!i(a))return!1}else for(var t in o)if(t=="$ref"||typeof(a=o[t])=="object"&&!i(a))return!1;return!0}(n):s?function i(o){var a,e=0;if(Array.isArray(o)){for(var t=0;t<o.length;t++)if(typeof(a=o[t])=="object"&&(e+=i(a)),e==1/0)return 1/0}else for(var r in o){if(r=="$ref")return 1/0;if(f[r])e++;else if(typeof(a=o[r])=="object"&&(e+=i(a)+1),e==1/0)return 1/0}return e}(n)<=s:void 0)}function I(n,s){return s!==!1&&(n=l(n)),C(U.parse(n))}function C(n){return U.serialize(n).split("#")[0]+"#"}var h=/#\/?$/;function l(n){return n?n.replace(h,""):""}function c(n,s){return s=l(s),U.resolve(n,s)}},742:function(ae,m,O){var U=O(9646),S=O(3724).toHash;ae.exports=function(){var M=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],K=["type","$comment"];return M.all=S(K),M.types=S(["number","integer","string","array","object","boolean","null"]),M.forEach(function(j){j.rules=j.rules.map(function(X){var F,N;return typeof X=="object"&&(N=X[F=Object.keys(X)[0]],X=F,N.forEach(function(w){K.push(w),M.all[w]=!0})),K.push(X),M.all[X]={keyword:X,code:U[X],implements:N}}),M.all.$comment={keyword:"$comment",code:U.$comment},j.type&&(M.types[j.type]=j)}),M.keywords=S(K.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),M.custom={},M}},4293:function(ae,m,O){var U=O(3724);ae.exports=function(S){U.copy(S,this)}},6887:function(ae){ae.exports=function(m){for(var O,U=0,S=m.length,M=0;M<S;)U++,55296<=(O=m.charCodeAt(M++))&&O<=56319&&M<S&&(64512&m.charCodeAt(M))==56320&&M++;return U}},3724:function(ae,m,O){function U(h,l,c,n){var s=n?" !== ":" === ",i=n?" || ":" && ",o=n?"!":"",a=n?"":"!";switch(h){case"null":return l+s+"null";case"array":return o+"Array.isArray("+l+")";case"object":return"("+o+l+i+"typeof "+l+s+'"object"'+i+a+"Array.isArray("+l+"))";case"integer":return"(typeof "+l+s+'"number"'+i+a+"("+l+" % 1)"+i+l+s+l+(c?i+o+"isFinite("+l+")":"")+")";case"number":return"(typeof "+l+s+'"'+h+'"'+(c?i+o+"isFinite("+l+")":"")+")";default:return"typeof "+l+s+'"'+h+'"'}}ae.exports={copy:function(h,l){for(var c in l=l||{},h)l[c]=h[c];return l},checkDataType:U,checkDataTypes:function(h,l,c){{if(h.length===1)return U(h[0],l,c,!0);var n,s="",h=M(h);for(n in h.array&&h.object&&(s=h.null?"(":"(!"+l+" || ",s+="typeof "+l+' !== "object")',delete h.null,delete h.array,delete h.object),h.number&&delete h.integer,h)s+=(s?" && ":"")+U(n,l,c,!0);return s}},coerceToTypes:function(h,l){{if(!Array.isArray(l))return S[l]?[l]:h==="array"&&l==="array"?["array"]:void 0;for(var c=[],n=0;n<l.length;n++){var s=l[n];(S[s]||h==="array"&&s==="array")&&(c[c.length]=s)}return c.length?c:void 0}},toHash:M,getProperty:X,escapeQuotes:F,equal:O(2303),ucs2length:O(6887),varOccurences:function(h,l){return l+="[^0-9]",h=h.match(new RegExp(l,"g")),h?h.length:0},varReplace:function(h,l,c){return l+="([^0-9])",c=c.replace(/\$/g,"$$$$"),h.replace(new RegExp(l,"g"),c+"$1")},schemaHasRules:function(h,l){if(typeof h=="boolean")return!h;for(var c in h)if(l[c])return!0},schemaHasRulesExcept:function(h,l,c){if(typeof h=="boolean")return!h&&c!="not";for(var n in h)if(n!=c&&l[n])return!0},schemaUnknownRules:function(h,l){if(typeof h!="boolean"){for(var c in h)if(!l[c])return c}},toQuotedString:N,getPathExpr:function(h,l,c,n){return _(h,c?"'/' + "+l+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+l+" + ']'":"'[\\'' + "+l+" + '\\']'")},getPath:function(h,l,c){return c=N(c?"/"+I(l):X(l)),_(h,c)},getData:function(h,l,c){var n,s,i;if(h==="")return"rootData";if(h[0]=="/"){if(!w.test(h))throw new Error("Invalid JSON-pointer: "+h);n=h,s="rootData"}else{if(!(i=h.match(f)))throw new Error("Invalid JSON-pointer: "+h);if(h=+i[1],(n=i[2])=="#"){if(l<=h)throw new Error("Cannot access property/index "+h+" levels up, current level is "+l);return c[l-h]}if(l<h)throw new Error("Cannot access data "+h+" levels up, current level is "+l);if(s="data"+(l-h||""),!n)return s}for(var o=s,a=n.split("/"),e=0;e<a.length;e++){var t=a[e];t&&(s+=X(C(t)),o+=" && "+s)}return o},unescapeFragment:function(h){return C(decodeURIComponent(h))},unescapeJsonPointer:C,escapeFragment:function(h){return encodeURIComponent(I(h))},escapeJsonPointer:I};var S=M(["string","number","integer","boolean","null"]);function M(h){for(var l={},c=0;c<h.length;c++)l[h[c]]=!0;return l}var K=/^[a-z$_][a-z$_0-9]*$/i,j=/'|\\/g;function X(h){return typeof h=="number"?"["+h+"]":K.test(h)?"."+h:"['"+F(h)+"']"}function F(h){return h.replace(j,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function N(h){return"'"+F(h)+"'"}var w=/^\/(?:[^~]|~0|~1)*$/,f=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function _(h,l){return h=='""'?l:(h+" + "+l).replace(/([^\\])' \+ '/g,"$1")}function I(h){return h.replace(/~/g,"~0").replace(/\//g,"~1")}function C(h){return h.replace(/~1/g,"/").replace(/~0/g,"~")}},9394:function(ae){var m=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];ae.exports=function(O,U){for(var S=0;S<U.length;S++){O=JSON.parse(JSON.stringify(O));for(var M=U[S].split("/"),K=O,j=1;j<M.length;j++)K=K[M[j]];for(j=0;j<m.length;j++){var X=m[j],F=K[X];F&&(K[X]={anyOf:[F,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return O}},5868:function(ae,m,O){O=O(6680),ae.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:O.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:O.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(ae){ae.exports=function(m,O,U){var S,M,K,j,X,F=" ",N=m.level,w=m.dataLevel,f=m.schema[O],_=m.schemaPath+m.util.getProperty(O),I=m.errSchemaPath+"/"+O,C=!m.opts.allErrors,h="data"+(w||""),l=m.opts.$data&&f&&f.$data,c=l?(F+=" var schema"+N+" = "+m.util.getData(f.$data,w,m.dataPathArr)+"; ","schema"+N):f,n=O=="maximum",s=n?"exclusiveMaximum":"exclusiveMinimum",i=m.schema[s],o=m.opts.$data&&i&&i.$data,a=n?"<":">",e=n?">":"<",t=void 0;if(!l&&typeof f!="number"&&f!==void 0)throw new Error(O+" must be number");if(!o&&i!==void 0&&typeof i!="number"&&typeof i!="boolean")throw new Error(s+" must be number or boolean");o?(w=m.util.getData(i.$data,w,m.dataPathArr),K="exclIsNumber"+N,j="' + "+(X="op"+N)+" + '",t=s,(r=r||[]).push(F=F+(" var schemaExcl"+N+" = "+w+"; ")+(" var "+(S="exclusive"+N)+"; var "+(M="exclType"+N)+" = typeof "+(w="schemaExcl"+N)+"; if ("+M+" != 'boolean' && "+M+" != 'undefined' && "+M+" != 'number') { ")),F="",m.createErrors!==!1?(F+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(I)+" , params: {} ",m.opts.messages!==!1&&(F+=" , message: '"+s+" should be boolean' "),m.opts.verbose&&(F+=" , schema: validate.schema"+_+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+h+" "),F+=" } "):F+=" {} ",d=F,F=r.pop(),!m.compositeRule&&C?m.async?F+=" throw new ValidationError(["+d+"]); ":F+=" validate.errors = ["+d+"]; return false; ":F+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F+=" } else if ( ",l&&(F+=" ("+c+" !== undefined && typeof "+c+" != 'number') || "),F+=" "+M+" == 'number' ? ( ("+S+" = "+c+" === undefined || "+w+" "+a+"= "+c+") ? "+h+" "+e+"= "+w+" : "+h+" "+e+" "+c+" ) : ( ("+S+" = "+w+" === true) ? "+h+" "+e+"= "+c+" : "+h+" "+e+" "+c+" ) || "+h+" !== "+h+") { var op"+N+" = "+S+" ? '"+a+"' : '"+a+"='; ",f===void 0&&(I=m.errSchemaPath+"/"+(t=s),c=w,l=o)):(j=a,(K=typeof i=="number")&&l?(X="'"+j+"'",F+=" if ( ",l&&(F+=" ("+c+" !== undefined && typeof "+c+" != 'number') || "),F+=" ( "+c+" === undefined || "+i+" "+a+"= "+c+" ? "+h+" "+e+"= "+i+" : "+h+" "+e+" "+c+" ) || "+h+" !== "+h+") { "):(K&&f===void 0?(S=!0,I=m.errSchemaPath+"/"+(t=s),c=i,e+="="):(K&&(c=Math[n?"min":"max"](i,f)),i===(!K||c)?(S=!0,I=m.errSchemaPath+"/"+(t=s),e+="="):(S=!1,j+="=")),X="'"+j+"'",F+=" if ( ",l&&(F+=" ("+c+" !== undefined && typeof "+c+" != 'number') || "),F+=" "+h+" "+e+" "+c+" || "+h+" !== "+h+") { ")),t=t||O,(r=r||[]).push(F),F="",m.createErrors!==!1?(F+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(I)+" , params: { comparison: "+X+", limit: "+c+", exclusive: "+S+" } ",m.opts.messages!==!1&&(F=F+" , message: 'should be "+j+" "+(l?"' + "+c:c+"'")),m.opts.verbose&&(F=(F+=" , schema: ")+(l?"validate.schema"+_:""+f)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+h+" "),F+=" } "):F+=" {} ";var r,d=F;return F=r.pop(),!m.compositeRule&&C?m.async?F+=" throw new ValidationError(["+d+"]); ":F+=" validate.errors = ["+d+"]; return false; ":F+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F+=" } ",C&&(F+=" else { "),F}},2407:function(ae){ae.exports=function(m,O,U){var S,M=" ",K=m.level,_=m.dataLevel,j=m.schema[O],X=m.schemaPath+m.util.getProperty(O),F=m.errSchemaPath+"/"+O,N=!m.opts.allErrors,w="data"+(_||""),f=m.opts.$data&&j&&j.$data,_=f?(M+=" var schema"+K+" = "+m.util.getData(j.$data,_,m.dataPathArr)+"; ","schema"+K):j;if(f||typeof j=="number")return M+="if ( ",f&&(M+=" ("+_+" !== undefined && typeof "+_+" != 'number') || "),(K=[]).push(M+=" "+w+".length "+((S=O)=="maxItems"?">":"<")+" "+_+") { "),M="",m.createErrors!==!1?(M+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { limit: "+_+" } ",m.opts.messages!==!1&&(M=(M=(M+=" , message: 'should NOT have ")+(O=="maxItems"?"more":"fewer")+" than ")+(f?"' + "+_+" + '":""+j)+" items' "),m.opts.verbose&&(M=(M+=" , schema: ")+(f?"validate.schema"+X:""+j)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),M+=" } "):M+=" {} ",S=M,M=K.pop(),!m.compositeRule&&N?m.async?M+=" throw new ValidationError(["+S+"]); ":M+=" validate.errors = ["+S+"]; return false; ":M+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+="} ",N&&(M+=" else { "),M;throw new Error(O+" must be number")}},1250:function(ae){ae.exports=function(m,O,U){var S,M=" ",K=m.level,_=m.dataLevel,j=m.schema[O],X=m.schemaPath+m.util.getProperty(O),F=m.errSchemaPath+"/"+O,N=!m.opts.allErrors,w="data"+(_||""),f=m.opts.$data&&j&&j.$data,_=f?(M+=" var schema"+K+" = "+m.util.getData(j.$data,_,m.dataPathArr)+"; ","schema"+K):j;if(f||typeof j=="number")return M+="if ( ",f&&(M+=" ("+_+" !== undefined && typeof "+_+" != 'number') || "),m.opts.unicode===!1?M+=" "+w+".length ":M+=" ucs2length("+w+") ",(K=[]).push(M+=" "+((S=O)=="maxLength"?">":"<")+" "+_+") { "),M="",m.createErrors!==!1?(M+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { limit: "+_+" } ",m.opts.messages!==!1&&(M=(M=(M+=" , message: 'should NOT be ")+(O=="maxLength"?"longer":"shorter")+" than ")+(f?"' + "+_+" + '":""+j)+" characters' "),m.opts.verbose&&(M=(M+=" , schema: ")+(f?"validate.schema"+X:""+j)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),M+=" } "):M+=" {} ",S=M,M=K.pop(),!m.compositeRule&&N?m.async?M+=" throw new ValidationError(["+S+"]); ":M+=" validate.errors = ["+S+"]; return false; ":M+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+="} ",N&&(M+=" else { "),M;throw new Error(O+" must be number")}},2596:function(ae){ae.exports=function(m,O,U){var S,M=" ",K=m.level,_=m.dataLevel,j=m.schema[O],X=m.schemaPath+m.util.getProperty(O),F=m.errSchemaPath+"/"+O,N=!m.opts.allErrors,w="data"+(_||""),f=m.opts.$data&&j&&j.$data,_=f?(M+=" var schema"+K+" = "+m.util.getData(j.$data,_,m.dataPathArr)+"; ","schema"+K):j;if(f||typeof j=="number")return M+="if ( ",f&&(M+=" ("+_+" !== undefined && typeof "+_+" != 'number') || "),(K=[]).push(M+=" Object.keys("+w+").length "+((S=O)=="maxProperties"?">":"<")+" "+_+") { "),M="",m.createErrors!==!1?(M+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { limit: "+_+" } ",m.opts.messages!==!1&&(M=(M=(M+=" , message: 'should NOT have ")+(O=="maxProperties"?"more":"fewer")+" than ")+(f?"' + "+_+" + '":""+j)+" properties' "),m.opts.verbose&&(M=(M+=" , schema: ")+(f?"validate.schema"+X:""+j)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),M+=" } "):M+=" {} ",S=M,M=K.pop(),!m.compositeRule&&N?m.async?M+=" throw new ValidationError(["+S+"]); ":M+=" validate.errors = ["+S+"]; return false; ":M+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+="} ",N&&(M+=" else { "),M;throw new Error(O+" must be number")}},9486:function(ae){ae.exports=function(m,O,U){var S=" ",M=m.schema[O],K=m.schemaPath+m.util.getProperty(O),j=m.errSchemaPath+"/"+O,X=!m.opts.allErrors,F=m.util.copy(m),N="",w=(F.level++,"valid"+F.level),f=F.baseId,_=!0,I=M;if(I)for(var C,h=-1,l=I.length-1;h<l;)C=I[h+=1],(m.opts.strictKeywords?typeof C=="object"&&0<Object.keys(C).length||C===!1:m.util.schemaHasRules(C,m.RULES.all))&&(_=!1,F.schema=C,F.schemaPath=K+"["+h+"]",F.errSchemaPath=j+"/"+h,S+=" "+m.validate(F)+" ",F.baseId=f,X)&&(S+=" if ("+w+") { ",N+="}");return X&&(S+=_?" if (true) { ":" "+N.slice(0,-1)+" "),S}},5347:function(ae){ae.exports=function(m,X,U){var S=" ",w=m.level,F=m.dataLevel,M=m.schema[X],K=m.schemaPath+m.util.getProperty(X),j=m.errSchemaPath+"/"+X,X=!m.opts.allErrors,F="data"+(F||""),N="valid"+w,w="errs__"+w,f=m.util.copy(m),_="",I=(f.level++,"valid"+f.level);if(M.every(function(i){return m.opts.strictKeywords?typeof i=="object"&&0<Object.keys(i).length||i===!1:m.util.schemaHasRules(i,m.RULES.all)})){var C=f.baseId,h=(S+=" var "+w+" = errors; var "+N+" = false; ",m.compositeRule),l=(m.compositeRule=f.compositeRule=!0,M);if(l)for(var c,n=-1,s=l.length-1;n<s;)c=l[n+=1],f.schema=c,f.schemaPath=K+"["+n+"]",f.errSchemaPath=j+"/"+n,S+=" "+m.validate(f)+" ",f.baseId=C,S+=" "+N+" = "+N+" || "+I+"; if (!"+N+") { ",_+="}";m.compositeRule=f.compositeRule=h,S+=" "+_+" if (!"+N+") { var err = ",m.createErrors!==!1?(S+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(j)+" , params: {} ",m.opts.messages!==!1&&(S+=" , message: 'should match some schema in anyOf' "),m.opts.verbose&&(S+=" , schema: validate.schema"+K+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+F+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&X&&(m.async?S+=" throw new ValidationError(vErrors); ":S+=" validate.errors = vErrors; return false; "),S+=" } else { errors = "+w+"; if (vErrors !== null) { if ("+w+") vErrors.length = "+w+"; else vErrors = null; } ",m.opts.allErrors&&(S+=" } ")}else X&&(S+=" if (true) { ");return S}},923:function(ae){ae.exports=function(m,M,U){var S=" ",K=m.schema[M],M=m.errSchemaPath+"/"+M,K=(m.opts.allErrors,m.util.toQuotedString(K));return m.opts.$comment===!0?S+=" console.log("+K+");":typeof m.opts.$comment=="function"&&(S+=" self._opts.$comment("+K+", "+m.util.toQuotedString(M)+", validate.root.schema);"),S}},2617:function(ae){ae.exports=function(m,K,U){var _=" ",S=m.level,f=m.dataLevel,w=m.schema[K],M=m.schemaPath+m.util.getProperty(K),K=m.errSchemaPath+"/"+K,j=!m.opts.allErrors,X="data"+(f||""),F="valid"+S,N=m.opts.$data&&w&&w.$data,w=(N&&(_+=" var schema"+S+" = "+m.util.getData(w.$data,f,m.dataPathArr)+"; "),N||(_+=" var schema"+S+" = validate.schema"+M+";"),[]),f=(w.push(_+="var "+F+" = equal("+X+", schema"+S+"); if (!"+F+") { "),_="",m.createErrors!==!1?(_+=" { keyword: 'const' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(K)+" , params: { allowedValue: schema"+S+" } ",m.opts.messages!==!1&&(_+=" , message: 'should be equal to constant' "),m.opts.verbose&&(_+=" , schema: validate.schema"+M+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+X+" "),_+=" } "):_+=" {} ",_),_=w.pop();return!m.compositeRule&&j?m.async?_+=" throw new ValidationError(["+f+"]); ":_+=" validate.errors = ["+f+"]; return false; ":_+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",_+=" }",j&&(_+=" else { "),_}},2119:function(ae){ae.exports=function(m,K,U){var c=" ",h=m.level,X=m.dataLevel,S=m.schema[K],M=m.schemaPath+m.util.getProperty(K),K=m.errSchemaPath+"/"+K,j=!m.opts.allErrors,X="data"+(X||""),F="valid"+h,N="errs__"+h,w=m.util.copy(m),f=(w.level++,"valid"+w.level),h="i"+h,_=w.dataLevel=m.dataLevel+1,I="data"+_,l=m.baseId,C=m.opts.strictKeywords?typeof S=="object"&&0<Object.keys(S).length||S===!1:m.util.schemaHasRules(S,m.RULES.all),h=(c+="var "+N+" = errors;var "+F+";",C?(F=m.compositeRule,m.compositeRule=w.compositeRule=!0,w.schema=S,w.schemaPath=M,w.errSchemaPath=K,c+=" var "+f+" = false; for (var "+h+" = 0; "+h+" < "+X+".length; "+h+"++) { ",w.errorPath=m.util.getPathExpr(m.errorPath,h,m.opts.jsonPointers,!0),S=X+"["+h+"]",w.dataPathArr[_]=h,_=m.validate(w),w.baseId=l,m.util.varOccurences(_,I)<2?c+=" "+m.util.varReplace(_,I,S)+" ":c+=" var "+I+" = "+S+"; "+_+" ",c+=" if ("+f+") break; } ",m.compositeRule=w.compositeRule=F,c+=" if (!"+f+") {"):c+=" if ("+X+".length == 0) {",[]),l=(h.push(c),c="",m.createErrors!==!1?(c+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(K)+" , params: {} ",m.opts.messages!==!1&&(c+=" , message: 'should contain a valid item' "),m.opts.verbose&&(c+=" , schema: validate.schema"+M+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+X+" "),c+=" } "):c+=" {} ",c),c=h.pop();return!m.compositeRule&&j?m.async?c+=" throw new ValidationError(["+l+"]); ":c+=" validate.errors = ["+l+"]; return false; ":c+=" var err = "+l+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else { ",C&&(c+=" errors = "+N+"; if (vErrors !== null) { if ("+N+") vErrors.length = "+N+"; else vErrors = null; } "),m.opts.allErrors&&(c+=" } "),c}},1793:function(ae){ae.exports=function(m,p,U){var S,M,K,j=" ",X=m.level,F=m.dataLevel,g=m.schema[p],N=m.schemaPath+m.util.getProperty(p),w=m.errSchemaPath+"/"+p,f=!m.opts.allErrors,_="data"+(F||""),I="valid"+X,C="errs__"+X,h=m.opts.$data&&g&&g.$data,l=h?(j+=" var schema"+X+" = "+m.util.getData(g.$data,F,m.dataPathArr)+"; ","schema"+X):g,c="definition"+X,n=this.definition,s="";if(h&&n.$data){var i="keywordValidate"+X,o=n.validateSchema;j+=" var "+c+" = RULES.custom['"+p+"'].definition; var "+i+" = "+c+".validate;"}else{if(!(r=m.useCustomRule(this,g,m.schema,m)))return;l="validate.schema"+N,i=r.code,S=n.compile,M=n.inline,K=n.macro}var a,e,t,r,d,p=i+".errors",g="i"+X,A="ruleErr"+X,x=n.async;if(x&&!m.async)throw new Error("async keyword in sync schema");return M||K||(j+=p+" = null;"),j+="var "+C+" = errors;var "+I+";",h&&n.$data&&(s+="}",j+=" if ("+l+" === undefined) { "+I+" = true; } else { ",o)&&(s+="}",j+=" "+I+" = "+c+".validateSchema("+l+"); if ("+I+") { "),M?n.statements?j+=" "+r.validate+" ":j+=" "+I+" = "+r.validate+"; ":K?(s="",(h=m.util.copy(m)).level++,a="valid"+h.level,h.schema=r.validate,h.schemaPath="",o=m.compositeRule,m.compositeRule=h.compositeRule=!0,c=m.validate(h).replace(/validate\.schema/g,i),m.compositeRule=h.compositeRule=o,j+=" "+c):((d=d||[]).push(j),j="",j+=" "+i+".call( ",m.opts.passContext?j+="this":j+="self",S||n.schema===!1?j+=" , "+_+" ":j+=" , "+l+" , "+_+" , validate.schema"+m.schemaPath+" ",j+=" , (dataPath || '')",m.errorPath!='""'&&(j+=" + "+m.errorPath),r=j+=" , "+(e=F?"data"+(F-1||""):"parentData")+" , "+(t=F?m.dataPathArr[F]:"parentDataProperty")+" , rootData ) ",j=d.pop(),n.errors===!1?(j+=" "+I+" = ",x&&(j+="await "),j+=r+"; "):j+=x?" var "+(p="customErrors"+X)+" = null; try { "+I+" = await "+r+"; } catch (e) { "+I+" = false; if (e instanceof ValidationError) "+p+" = e.errors; else throw e; } ":" "+p+" = null; "+I+" = "+r+"; "),n.modifying&&(j+=" if ("+e+") "+_+" = "+e+"["+t+"];"),j+=""+s,n.valid?f&&(j+=" if (true) { "):(j+=" if ( ",n.valid===void 0?j=j+" !"+(K?""+a:I):j+=" "+!n.valid+" ",h=this.keyword,(d=d||[]).push(j+=") { "),(d=d||[]).push(j=""),j="",m.createErrors!==!1?(j+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(w)+" , params: { keyword: '"+this.keyword+"' } ",m.opts.messages!==!1&&(j+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),m.opts.verbose&&(j+=" , schema: validate.schema"+N+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+_+" "),j+=" } "):j+=" {} ",o=j,j=d.pop(),!m.compositeRule&&f?m.async?j+=" throw new ValidationError(["+o+"]); ":j+=" validate.errors = ["+o+"]; return false; ":j+=" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=j,j=d.pop(),M?n.errors?n.errors!="full"&&(j+=" for (var "+g+"="+C+"; "+g+"<errors; "+g+"++) { var "+A+" = vErrors["+g+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+m.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+w+'"; } ',m.opts.verbose&&(j+=" "+A+".schema = "+l+"; "+A+".data = "+_+"; "),j+=" } "):n.errors===!1?j+=" "+c+" ":(j+=" if ("+C+" == errors) { "+c+" } else { for (var "+g+"="+C+"; "+g+"<errors; "+g+"++) { var "+A+" = vErrors["+g+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+m.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+w+'"; } ',m.opts.verbose&&(j+=" "+A+".schema = "+l+"; "+A+".data = "+_+"; "),j+=" } } "):K?(j+=" var err = ",m.createErrors!==!1?(j+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(w)+" , params: { keyword: '"+this.keyword+"' } ",m.opts.messages!==!1&&(j+=` , message: 'should pass "`+this.keyword+`" keyword validation' `),m.opts.verbose&&(j+=" , schema: validate.schema"+N+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+_+" "),j+=" } "):j+=" {} ",j+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&f&&(m.async?j+=" throw new ValidationError(vErrors); ":j+=" validate.errors = vErrors; return false; ")):n.errors===!1?j+=" "+c+" ":(j+=" if (Array.isArray("+p+")) { if (vErrors === null) vErrors = "+p+"; else vErrors = vErrors.concat("+p+"); errors = vErrors.length; for (var "+g+"="+C+"; "+g+"<errors; "+g+"++) { var "+A+" = vErrors["+g+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+m.errorPath+"; "+A+'.schemaPath = "'+w+'"; ',m.opts.verbose&&(j+=" "+A+".schema = "+l+"; "+A+".data = "+_+"; "),j+=" } } else { "+c+" } "),j+=" } ",f&&(j+=" else { ")),j}},9115:function(ae){ae.exports=function(m,_,U){var S,M=" ",K=m.level,j=m.dataLevel,X=m.schema[_],F=m.schemaPath+m.util.getProperty(_),N=m.errSchemaPath+"/"+_,w=!m.opts.allErrors,f="data"+(j||""),_="errs__"+K,I=m.util.copy(m),C="",h=(I.level++,"valid"+I.level),l={},c={},n=m.opts.ownProperties;for(W in X)W!="__proto__"&&(V=X[W],(S=Array.isArray(V)?c:l)[W]=V);var s=m.errorPath;for(W in M=M+("var "+_+" = errors;")+("var missing"+K+";"),c)if((S=c[W]).length){if(M+=" if ( "+f+m.util.getProperty(W)+" !== undefined ",n&&(M+=" && Object.prototype.hasOwnProperty.call("+f+", '"+m.util.escapeQuotes(W)+"') "),w){M+=" && ( ";var i=S;if(i)for(var o=-1,a=i.length-1;o<a;)p=i[o+=1],o&&(M+=" || "),M+=" ( ( "+(E=f+(x=m.util.getProperty(p)))+" === undefined ",n&&(M+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+m.util.escapeQuotes(p)+"') "),M+=") && (missing"+K+" = "+m.util.toQuotedString(m.opts.jsonPointers?p:x)+") ) ";M+=")) { ";var r="missing"+K,e="' + "+r+" + '",t=(m.opts._errorDataPathProperty&&(m.errorPath=m.opts.jsonPointers?m.util.getPathExpr(s,r,!0):s+" + "+r),t||[]),r=(t.push(M),M="",m.createErrors!==!1?(M+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(N)+" , params: { property: '"+m.util.escapeQuotes(W)+"', missingProperty: '"+e+"', depsCount: "+S.length+", deps: '"+m.util.escapeQuotes(S.length==1?S[0]:S.join(", "))+"' } ",m.opts.messages!==!1&&(M+=" , message: 'should have ",S.length==1?M+="property "+m.util.escapeQuotes(S[0]):M+="properties "+m.util.escapeQuotes(S.join(", ")),M+=" when property "+m.util.escapeQuotes(W)+" is present' "),m.opts.verbose&&(M+=" , schema: validate.schema"+F+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+f+" "),M+=" } "):M+=" {} ",M),M=t.pop();!m.compositeRule&&w?m.async?M+=" throw new ValidationError(["+r+"]); ":M+=" validate.errors = ["+r+"]; return false; ":M+=" var err = "+r+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{M+=" ) { ";var d=S;if(d)for(var p,g=-1,A=d.length-1;g<A;){p=d[g+=1];var x=m.util.getProperty(p),e=m.util.escapeQuotes(p),E=f+x;m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPath(s,p,m.opts.jsonPointers)),M+=" if ( "+E+" === undefined ",n&&(M+=" || ! Object.prototype.hasOwnProperty.call("+f+", '"+m.util.escapeQuotes(p)+"') "),M+=") { var err = ",m.createErrors!==!1?(M+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(N)+" , params: { property: '"+m.util.escapeQuotes(W)+"', missingProperty: '"+e+"', depsCount: "+S.length+", deps: '"+m.util.escapeQuotes(S.length==1?S[0]:S.join(", "))+"' } ",m.opts.messages!==!1&&(M+=" , message: 'should have ",S.length==1?M+="property "+m.util.escapeQuotes(S[0]):M+="properties "+m.util.escapeQuotes(S.join(", ")),M+=" when property "+m.util.escapeQuotes(W)+" is present' "),m.opts.verbose&&(M+=" , schema: validate.schema"+F+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+f+" "),M+=" } "):M+=" {} ",M+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}M+=" } ",w&&(C+="}",M+=" else { ")}m.errorPath=s;var W,B=I.baseId;for(W in l){var V=l[W];(m.opts.strictKeywords?typeof V=="object"&&0<Object.keys(V).length||V===!1:m.util.schemaHasRules(V,m.RULES.all))&&(M+=" "+h+" = true; if ( "+f+m.util.getProperty(W)+" !== undefined ",n&&(M+=" && Object.prototype.hasOwnProperty.call("+f+", '"+m.util.escapeQuotes(W)+"') "),M+=") { ",I.schema=V,I.schemaPath=F+m.util.getProperty(W),I.errSchemaPath=N+"/"+m.util.escapeFragment(W),M+=" "+m.validate(I)+" ",I.baseId=B,M+=" } ",w)&&(M+=" if ("+h+") { ",C+="}")}return w&&(M+=" "+C+" if ("+_+" == errors) {"),M}},9317:function(ae){ae.exports=function(m,K,U){var _=" ",S=m.level,w=m.dataLevel,f=m.schema[K],M=m.schemaPath+m.util.getProperty(K),K=m.errSchemaPath+"/"+K,j=!m.opts.allErrors,X="data"+(w||""),F="valid"+S,N=m.opts.$data&&f&&f.$data,f=(N&&(_+=" var schema"+S+" = "+m.util.getData(f.$data,w,m.dataPathArr)+"; "),"i"+S),w="schema"+S,w=(N||(_+=" var "+w+" = validate.schema"+M+";"),_+="var "+F+";",N&&(_+=" if (schema"+S+" === undefined) "+F+" = true; else if (!Array.isArray(schema"+S+")) "+F+" = false; else {"),_+=F+" = false;for (var "+f+"=0; "+f+"<"+w+".length; "+f+"++) if (equal("+X+", "+w+"["+f+"])) { "+F+" = true; break; }",N&&(_+=" } "),[]),f=(w.push(_+=" if (!"+F+") { "),_="",m.createErrors!==!1?(_+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(K)+" , params: { allowedValues: schema"+S+" } ",m.opts.messages!==!1&&(_+=" , message: 'should be equal to one of the allowed values' "),m.opts.verbose&&(_+=" , schema: validate.schema"+M+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+X+" "),_+=" } "):_+=" {} ",_),_=w.pop();return!m.compositeRule&&j?m.async?_+=" throw new ValidationError(["+f+"]); ":_+=" validate.errors = ["+f+"]; return false; ":_+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",_+=" }",j&&(_+=" else { "),_}},8327:function(ae){ae.exports=function(m,F,U){var S=" ",M=m.level,K=m.dataLevel,j=m.schema[F],X=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,N=!m.opts.allErrors,w="data"+(K||"");if(m.opts.format===!1)N&&(S+=" if (true) { ");else{var f,_=m.opts.$data&&j&&j.$data,K=_?(S+=" var schema"+M+" = "+m.util.getData(j.$data,K,m.dataPathArr)+"; ","schema"+M):j,I=m.opts.unknownFormats,C=Array.isArray(I);if(_)S+=" var "+(f="format"+M)+" = formats["+K+"]; var "+(h="isObject"+M)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(c="formatType"+M)+" = "+h+" && "+f+".type || 'string'; if ("+h+") { ",m.async&&(S+=" var async"+M+" = "+f+".async; "),S+=" "+f+" = "+f+".validate; } if ( ",_&&(S+=" ("+K+" !== undefined && typeof "+K+" != 'string') || "),S+=" (",I!="ignore"&&(S+=" ("+K+" && !"+f+" ",C&&(S+=" && self._opts.unknownFormats.indexOf("+K+") == -1 "),S+=") || "),S+=" ("+f+" && "+c+" == '"+U+"' && !(typeof "+f+" == 'function' ? ",m.async?S+=" (async"+M+" ? await "+f+"("+w+") : "+f+"("+w+")) ":S+=" "+f+"("+w+") ",S+=" : "+f+".test("+w+"))))) {";else{if(!(f=m.formats[j])){if(I=="ignore")return m.logger.warn('unknown format "'+j+'" ignored in schema at path "'+m.errSchemaPath+'"'),N&&(S+=" if (true) { "),S;if(C&&0<=I.indexOf(j))return N&&(S+=" if (true) { "),S;throw new Error('unknown format "'+j+'" is used in schema at path "'+m.errSchemaPath+'"')}var h,l,c=(h=typeof f=="object"&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(h&&(l=f.async===!0,f=f.validate),c!=U)return N&&(S+=" if (true) { "),S;if(l){if(!m.async)throw new Error("async format in sync schema");S+=" if (!(await "+(n="formats"+m.util.getProperty(j)+".validate")+"("+w+"))) { "}else{S+=" if (! ";var n="formats"+m.util.getProperty(j);h&&(n+=".validate"),S=S+(typeof f=="function"?" "+n+"("+w+") ":" "+n+".test("+w+") ")+") { "}}M=[],C=(M.push(S),S="",m.createErrors!==!1?(S=(S+=" { keyword: 'format' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { format: ")+(_?""+K:""+m.util.toQuotedString(j))+" } ",m.opts.messages!==!1&&(S=(S+=` , message: 'should match format "`)+(_?"' + "+K+" + '":""+m.util.escapeQuotes(j))+`"' `),m.opts.verbose&&(S=(S=(S+=" , schema: ")+(_?"validate.schema"+X:""+m.util.toQuotedString(j)))+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),S+=" } "):S+=" {} ",S),S=M.pop(),!m.compositeRule&&N?m.async?S+=" throw new ValidationError(["+C+"]); ":S+=" validate.errors = ["+C+"]; return false; ":S+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } ",N&&(S+=" else { ")}return S}},5926:function(ae){ae.exports=function(m,F,U){var S,M=" ",K=m.level,w=m.dataLevel,j=m.schema[F],X=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,N=!m.opts.allErrors,w="data"+(w||""),f="valid"+K,_="errs__"+K,I=m.util.copy(m),C=(I.level++,"valid"+I.level),h=m.schema.then,l=m.schema.else,h=h!==void 0&&(m.opts.strictKeywords?typeof h=="object"&&0<Object.keys(h).length||h===!1:m.util.schemaHasRules(h,m.RULES.all)),l=l!==void 0&&(m.opts.strictKeywords?typeof l=="object"&&0<Object.keys(l).length||l===!1:m.util.schemaHasRules(l,m.RULES.all)),c=I.baseId;return h||l?(I.createErrors=!1,I.schema=j,I.schemaPath=X,I.errSchemaPath=F,M+=" var "+_+" = errors; var "+f+" = true; ",j=m.compositeRule,m.compositeRule=I.compositeRule=!0,M+=" "+m.validate(I)+" ",I.baseId=c,I.createErrors=!0,M+=" errors = "+_+"; if (vErrors !== null) { if ("+_+") vErrors.length = "+_+"; else vErrors = null; } ",m.compositeRule=I.compositeRule=j,h?(M+=" if ("+C+") { ",I.schema=m.schema.then,I.schemaPath=m.schemaPath+".then",I.errSchemaPath=m.errSchemaPath+"/then",M+=" "+m.validate(I)+" ",I.baseId=c,M+=" "+f+" = "+C+"; ",h&&l?M+=" var "+(S="ifClause"+K)+" = 'then'; ":S="'then'",M+=" } ",l&&(M+=" else { ")):M+=" if (!"+C+") { ",l&&(I.schema=m.schema.else,I.schemaPath=m.schemaPath+".else",I.errSchemaPath=m.errSchemaPath+"/else",M+=" "+m.validate(I)+" ",I.baseId=c,M+=" "+f+" = "+C+"; ",h&&l?M+=" var "+(S="ifClause"+K)+" = 'else'; ":S="'else'",M+=" } "),M+=" if (!"+f+") { var err = ",m.createErrors!==!1?(M+=" { keyword: 'if' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { failingKeyword: "+S+" } ",m.opts.messages!==!1&&(M+=` , message: 'should match "' + `+S+` + '" schema' `),m.opts.verbose&&(M+=" , schema: validate.schema"+X+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),M+=" } "):M+=" {} ",M+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&N&&(m.async?M+=" throw new ValidationError(vErrors); ":M+=" validate.errors = vErrors; return false; "),M+=" } ",N&&(M+=" else { ")):N&&(M+=" if (true) { "),M}},9646:function(ae,m,O){ae.exports={$ref:O(2331),allOf:O(9486),anyOf:O(5347),$comment:O(923),const:O(2617),contains:O(2119),dependencies:O(9115),enum:O(9317),format:O(8327),if:O(5926),items:O(392),maximum:O(1796),minimum:O(1796),maxItems:O(2407),minItems:O(2407),maxLength:O(1250),minLength:O(1250),maxProperties:O(2596),minProperties:O(2596),multipleOf:O(6039),not:O(7946),oneOf:O(9344),pattern:O(9737),properties:O(2537),propertyNames:O(2127),required:O(1204),uniqueItems:O(1985),validate:O(1869)}},392:function(ae){ae.exports=function(m,N,U){var S=" ",C=m.level,w=m.dataLevel,M=m.schema[N],K=m.schemaPath+m.util.getProperty(N),j=m.errSchemaPath+"/"+N,X=!m.opts.allErrors,F="data"+(w||""),N="valid"+C,w="errs__"+C,f=m.util.copy(m),_="",I=(f.level++,"valid"+f.level),C="i"+C,h=f.dataLevel=m.dataLevel+1,l="data"+h,c=m.baseId;if(S+="var "+w+" = errors;var "+N+";",Array.isArray(M)){var n,s,i=m.schema.additionalItems,o=(i===!1&&(S+=" "+N+" = "+F+".length <= "+M.length+"; ",n=j,j=m.errSchemaPath+"/additionalItems",(s=s||[]).push(S+=" if (!"+N+") { "),S="",m.createErrors!==!1?(S+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(j)+" , params: { limit: "+M.length+" } ",m.opts.messages!==!1&&(S+=" , message: 'should NOT have more than "+M.length+" items' "),m.opts.verbose&&(S+=" , schema: false , parentSchema: validate.schema"+m.schemaPath+" , data: "+F+" "),S+=" } "):S+=" {} ",N=S,S=s.pop(),!m.compositeRule&&X?m.async?S+=" throw new ValidationError(["+N+"]); ":S+=" validate.errors = ["+N+"]; return false; ":S+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } ",j=n,X)&&(_+="}",S+=" else { "),M);if(o)for(var a=-1,e=o.length-1;a<e;){var t,r,d=o[a+=1];(m.opts.strictKeywords?typeof d=="object"&&0<Object.keys(d).length||d===!1:m.util.schemaHasRules(d,m.RULES.all))&&(S+=" "+I+" = true; if ("+F+".length > "+a+") { ",t=F+"["+a+"]",f.schema=d,f.schemaPath=K+"["+a+"]",f.errSchemaPath=j+"/"+a,f.errorPath=m.util.getPathExpr(m.errorPath,a,m.opts.jsonPointers,!0),f.dataPathArr[h]=a,r=m.validate(f),f.baseId=c,m.util.varOccurences(r,l)<2?S+=" "+m.util.varReplace(r,l,t)+" ":S+=" var "+l+" = "+t+"; "+r+" ",S+=" } ",X)&&(S+=" if ("+I+") { ",_+="}")}typeof i=="object"&&(m.opts.strictKeywords?typeof i=="object"&&0<Object.keys(i).length||i===!1:m.util.schemaHasRules(i,m.RULES.all))&&(f.schema=i,f.schemaPath=m.schemaPath+".additionalItems",f.errSchemaPath=m.errSchemaPath+"/additionalItems",S+=" "+I+" = true; if ("+F+".length > "+M.length+") { for (var "+C+" = "+M.length+"; "+C+" < "+F+".length; "+C+"++) { ",f.errorPath=m.util.getPathExpr(m.errorPath,C,m.opts.jsonPointers,!0),t=F+"["+C+"]",f.dataPathArr[h]=C,r=m.validate(f),f.baseId=c,m.util.varOccurences(r,l)<2?S+=" "+m.util.varReplace(r,l,t)+" ":S+=" var "+l+" = "+t+"; "+r+" ",X&&(S+=" if (!"+I+") break; "),S+=" } } ",X)&&(S+=" if ("+I+") { ",_+="}")}else(m.opts.strictKeywords?typeof M=="object"&&0<Object.keys(M).length||M===!1:m.util.schemaHasRules(M,m.RULES.all))&&(f.schema=M,f.schemaPath=K,f.errSchemaPath=j,S+=" for (var "+C+" = 0; "+C+" < "+F+".length; "+C+"++) { ",f.errorPath=m.util.getPathExpr(m.errorPath,C,m.opts.jsonPointers,!0),t=F+"["+C+"]",f.dataPathArr[h]=C,r=m.validate(f),f.baseId=c,m.util.varOccurences(r,l)<2?S+=" "+m.util.varReplace(r,l,t)+" ":S+=" var "+l+" = "+t+"; "+r+" ",X&&(S+=" if (!"+I+") break; "),S+=" }");return X&&(S+=" "+_+" if ("+w+" == errors) {"),S}},6039:function(ae){ae.exports=function(m,O,U){var S=" ",M=m.level,f=m.dataLevel,K=m.schema[O],j=m.schemaPath+m.util.getProperty(O),X=m.errSchemaPath+"/"+O,F=!m.opts.allErrors,N="data"+(f||""),w=m.opts.$data&&K&&K.$data,f=w?(S+=" var schema"+M+" = "+m.util.getData(K.$data,f,m.dataPathArr)+"; ","schema"+M):K;if(!w&&typeof K!="number")throw new Error(O+" must be number");return S+="var division"+M+";if (",w&&(S+=" "+f+" !== undefined && ( typeof "+f+" != 'number' || "),S+=" (division"+M+" = "+N+" / "+f+", ",m.opts.multipleOfPrecision?S+=" Math.abs(Math.round(division"+M+") - division"+M+") > 1e-"+m.opts.multipleOfPrecision+" ":S+=" division"+M+" !== parseInt(division"+M+") ",S+=" ) ",w&&(S+=" ) "),O=[],O.push(S+=" ) { "),S="",m.createErrors!==!1?(S+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { multipleOf: "+f+" } ",m.opts.messages!==!1&&(S=S+" , message: 'should be multiple of "+(w?"' + "+f:f+"'")),m.opts.verbose&&(S=(S+=" , schema: ")+(w?"validate.schema"+j:""+K)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",M=S,S=O.pop(),!m.compositeRule&&F?m.async?S+=" throw new ValidationError(["+M+"]); ":S+=" validate.errors = ["+M+"]; return false; ":S+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+="} ",F&&(S+=" else { "),S}},7946:function(ae){ae.exports=function(m,F,U){var S,M,K=" ",f=m.level,w=m.dataLevel,j=m.schema[F],X=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,N=!m.opts.allErrors,w="data"+(w||""),f="errs__"+f,_=m.util.copy(m),I=(_.level++,"valid"+_.level);return(m.opts.strictKeywords?typeof j=="object"&&0<Object.keys(j).length||j===!1:m.util.schemaHasRules(j,m.RULES.all))?(_.schema=j,_.schemaPath=X,_.errSchemaPath=F,K+=" var "+f+" = errors; ",j=m.compositeRule,m.compositeRule=_.compositeRule=!0,_.createErrors=!1,_.opts.allErrors&&(M=_.opts.allErrors,_.opts.allErrors=!1),K+=" "+m.validate(_)+" ",_.createErrors=!0,M&&(_.opts.allErrors=M),m.compositeRule=_.compositeRule=j,(S=S||[]).push(K+=" if ("+I+") { "),K="",m.createErrors!==!1?(K+=" { keyword: 'not' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: {} ",m.opts.messages!==!1&&(K+=" , message: 'should NOT be valid' "),m.opts.verbose&&(K+=" , schema: validate.schema"+X+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),K+=" } "):K+=" {} ",M=K,K=S.pop(),!m.compositeRule&&N?m.async?K+=" throw new ValidationError(["+M+"]); ":K+=" validate.errors = ["+M+"]; return false; ":K+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",K+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",m.opts.allErrors&&(K+=" } ")):(K+=" var err = ",m.createErrors!==!1?(K+=" { keyword: 'not' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: {} ",m.opts.messages!==!1&&(K+=" , message: 'should NOT be valid' "),m.opts.verbose&&(K+=" , schema: validate.schema"+X+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),K+=" } "):K+=" {} ",K+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N&&(K+=" if (false) { ")),K}},9344:function(ae){ae.exports=function(m,X,U){var S=" ",c=m.level,F=m.dataLevel,M=m.schema[X],K=m.schemaPath+m.util.getProperty(X),j=m.errSchemaPath+"/"+X,X=!m.opts.allErrors,F="data"+(F||""),N="valid"+c,w="errs__"+c,f=m.util.copy(m),_="",I=(f.level++,"valid"+f.level),C=f.baseId,h="prevValid"+c,l="passingSchemas"+c,c=(S+="var "+w+" = errors , "+h+" = false , "+N+" = false , "+l+" = null; ",m.compositeRule),n=(m.compositeRule=f.compositeRule=!0,M);if(n)for(var s,i=-1,o=n.length-1;i<o;)s=n[i+=1],(m.opts.strictKeywords?typeof s=="object"&&0<Object.keys(s).length||s===!1:m.util.schemaHasRules(s,m.RULES.all))?(f.schema=s,f.schemaPath=K+"["+i+"]",f.errSchemaPath=j+"/"+i,S+=" "+m.validate(f)+" ",f.baseId=C):S+=" var "+I+" = true; ",i&&(S+=" if ("+I+" && "+h+") { "+N+" = false; "+l+" = ["+l+", "+i+"]; } else { ",_+="}"),S+=" if ("+I+") { "+N+" = "+h+" = true; "+l+" = "+i+"; }";return m.compositeRule=f.compositeRule=c,S+=_+"if (!"+N+") { var err = ",m.createErrors!==!1?(S+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(j)+" , params: { passingSchemas: "+l+" } ",m.opts.messages!==!1&&(S+=" , message: 'should match exactly one schema in oneOf' "),m.opts.verbose&&(S+=" , schema: validate.schema"+K+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+F+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&X&&(m.async?S+=" throw new ValidationError(vErrors); ":S+=" validate.errors = vErrors; return false; "),S+="} else { errors = "+w+"; if (vErrors !== null) { if ("+w+") vErrors.length = "+w+"; else vErrors = null; }",m.opts.allErrors&&(S+=" } "),S}},9737:function(ae){ae.exports=function(m,K,U){var _=" ",f=m.level,N=m.dataLevel,S=m.schema[K],M=m.schemaPath+m.util.getProperty(K),K=m.errSchemaPath+"/"+K,j=!m.opts.allErrors,X="data"+(N||""),F=m.opts.$data&&S&&S.$data,N=F?(_+=" var schema"+f+" = "+m.util.getData(S.$data,N,m.dataPathArr)+"; ","schema"+f):S,f=F?"(new RegExp("+N+"))":m.usePattern(S),w=(_+="if ( ",F&&(_+=" ("+N+" !== undefined && typeof "+N+" != 'string') || "),[]),f=(w.push(_+=" !"+f+".test("+X+") ) { "),_="",m.createErrors!==!1?(_=(_+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(K)+" , params: { pattern: ")+(F?""+N:""+m.util.toQuotedString(S))+" } ",m.opts.messages!==!1&&(_=(_+=` , message: 'should match pattern "`)+(F?"' + "+N+" + '":""+m.util.escapeQuotes(S))+`"' `),m.opts.verbose&&(_=(_=(_+=" , schema: ")+(F?"validate.schema"+M:""+m.util.toQuotedString(S)))+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+X+" "),_+=" } "):_+=" {} ",_),_=w.pop();return!m.compositeRule&&j?m.async?_+=" throw new ValidationError(["+f+"]); ":_+=" validate.errors = ["+f+"]; return false; ":_+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",_+="} ",j&&(_+=" else { "),_}},2537:function(ae){ae.exports=function(m,f,U){var S,M=" ",K=m.level,i=m.dataLevel,j=m.schema[f],X=m.schemaPath+m.util.getProperty(f),F=m.errSchemaPath+"/"+f,N=!m.opts.allErrors,w="data"+(i||""),f="errs__"+K,_=m.util.copy(m),I="",C=(_.level++,"valid"+_.level),h="key"+K,l="idx"+K,c=_.dataLevel=m.dataLevel+1,n="data"+c,s="dataProperties"+K,i=Object.keys(j||{}).filter(W),o=m.schema.patternProperties||{},a=Object.keys(o).filter(W),e=m.schema.additionalProperties,t=i.length||a.length,r=e===!1,d=typeof e=="object"&&Object.keys(e).length,p=m.opts.removeAdditional,g=r||d||p,A=m.opts.ownProperties,x=m.baseId,E=m.schema.required;function W(ke){return ke!=="__proto__"}if(E&&(!m.opts.$data||!E.$data)&&E.length<m.opts.loopRequired&&(S=m.util.toHash(E)),M+="var "+f+" = errors;var "+C+" = true;",A&&(M+=" var "+s+" = undefined;"),g){if(M+=A?" "+s+" = "+s+" || Object.keys("+w+"); for (var "+l+"=0; "+l+"<"+s+".length; "+l+"++) { var "+h+" = "+s+"["+l+"]; ":" for (var "+h+" in "+w+") { ",t){if(M+=" var isAdditional"+K+" = !(false ",i.length)if(8<i.length)M+=" || validate.schema"+X+".hasOwnProperty("+h+") ";else{var B=i;if(B)for(var V=-1,u=B.length-1;V<u;)G=B[V+=1],M+=" || "+h+" == "+m.util.toQuotedString(G)+" "}if(a.length){var v=a;if(v)for(var $=-1,y=v.length-1;$<y;)J=v[$+=1],M+=" || "+m.usePattern(J)+".test("+h+") "}M+=" ); if (isAdditional"+K+") { "}p=="all"?M+=" delete "+w+"["+h+"]; ":(T=m.errorPath,E="' + "+h+" + '",m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPathExpr(m.errorPath,h,m.opts.jsonPointers)),r?p?M+=" delete "+w+"["+h+"]; ":(P=F,F=m.errSchemaPath+"/additionalProperties",(b=b||[]).push(M+=" "+C+" = false; "),M="",m.createErrors!==!1?(M+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { additionalProperty: '"+E+"' } ",m.opts.messages!==!1&&(M+=" , message: '",m.opts._errorDataPathProperty?M+="is an invalid additional property":M+="should NOT have additional properties",M+="' "),m.opts.verbose&&(M+=" , schema: false , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),M+=" } "):M+=" {} ",k=M,M=b.pop(),!m.compositeRule&&N?m.async?M+=" throw new ValidationError(["+k+"]); ":M+=" validate.errors = ["+k+"]; return false; ":M+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F=P,N&&(M+=" break; ")):d&&(p=="failing"?(M+=" var "+f+" = errors; ",g=m.compositeRule,m.compositeRule=_.compositeRule=!0,_.schema=e,_.schemaPath=m.schemaPath+".additionalProperties",_.errSchemaPath=m.errSchemaPath+"/additionalProperties",_.errorPath=m.opts._errorDataPathProperty?m.errorPath:m.util.getPathExpr(m.errorPath,h,m.opts.jsonPointers),Ce=w+"["+h+"]",_.dataPathArr[c]=h,Ie=m.validate(_),_.baseId=x,m.util.varOccurences(Ie,n)<2?M+=" "+m.util.varReplace(Ie,n,Ce)+" ":M+=" var "+n+" = "+Ce+"; "+Ie+" ",M+=" if (!"+C+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+w+"["+h+"]; } ",m.compositeRule=_.compositeRule=g):(_.schema=e,_.schemaPath=m.schemaPath+".additionalProperties",_.errSchemaPath=m.errSchemaPath+"/additionalProperties",_.errorPath=m.opts._errorDataPathProperty?m.errorPath:m.util.getPathExpr(m.errorPath,h,m.opts.jsonPointers),Ce=w+"["+h+"]",_.dataPathArr[c]=h,Ie=m.validate(_),_.baseId=x,m.util.varOccurences(Ie,n)<2?M+=" "+m.util.varReplace(Ie,n,Ce)+" ":M+=" var "+n+" = "+Ce+"; "+Ie+" ",N&&(M+=" if (!"+C+") break; "))),m.errorPath=T),t&&(M+=" } "),M+=" } ",N&&(M+=" if ("+C+") { ",I+="}")}var L=m.opts.useDefaults&&!m.compositeRule;if(i.length){var H=i;if(H)for(var G,Y=-1,Q=H.length-1;Y<Q;){var z,ee,T,P,Z,b,k,R=j[G=H[Y+=1]];(m.opts.strictKeywords?typeof R=="object"&&0<Object.keys(R).length||R===!1:m.util.schemaHasRules(R,m.RULES.all))&&(Ce=w+(Z=m.util.getProperty(G)),z=L&&R.default!==void 0,_.schema=R,_.schemaPath=X+Z,_.errSchemaPath=F+"/"+m.util.escapeFragment(G),_.errorPath=m.util.getPath(m.errorPath,G,m.opts.jsonPointers),_.dataPathArr[c]=m.util.toQuotedString(G),Ie=m.validate(_),_.baseId=x,m.util.varOccurences(Ie,n)<2?(Ie=m.util.varReplace(Ie,n,Ce),ee=Ce):M+=" var "+(ee=n)+" = "+Ce+"; ",z?M+=" "+Ie+" ":(S&&S[G]?(M+=" if ( "+ee+" === undefined ",A&&(M+=" || ! Object.prototype.hasOwnProperty.call("+w+", '"+m.util.escapeQuotes(G)+"') "),M+=") { "+C+" = false; ",T=m.errorPath,P=F,Z=m.util.escapeQuotes(G),m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPath(T,G,m.opts.jsonPointers)),F=m.errSchemaPath+"/required",(b=b||[]).push(M),M="",m.createErrors!==!1?(M+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { missingProperty: '"+Z+"' } ",m.opts.messages!==!1&&(M+=" , message: '",m.opts._errorDataPathProperty?M+="is a required property":M+="should have required property \\'"+Z+"\\'",M+="' "),m.opts.verbose&&(M+=" , schema: validate.schema"+X+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),M+=" } "):M+=" {} ",k=M,M=b.pop(),!m.compositeRule&&N?m.async?M+=" throw new ValidationError(["+k+"]); ":M+=" validate.errors = ["+k+"]; return false; ":M+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F=P,m.errorPath=T,M+=" } else { "):N?(M+=" if ( "+ee+" === undefined ",A&&(M+=" || ! Object.prototype.hasOwnProperty.call("+w+", '"+m.util.escapeQuotes(G)+"') "),M+=") { "+C+" = true; } else { "):(M+=" if ("+ee+" !== undefined ",A&&(M+=" && Object.prototype.hasOwnProperty.call("+w+", '"+m.util.escapeQuotes(G)+"') "),M+=" ) { "),M+=" "+Ie+" } ")),N&&(M+=" if ("+C+") { ",I+="}")}}if(a.length){var D=a;if(D)for(var J,ne=-1,me=D.length-1;ne<me;){var Ce,Ie,R=o[J=D[ne+=1]];(m.opts.strictKeywords?typeof R=="object"&&0<Object.keys(R).length||R===!1:m.util.schemaHasRules(R,m.RULES.all))&&(_.schema=R,_.schemaPath=m.schemaPath+".patternProperties"+m.util.getProperty(J),_.errSchemaPath=m.errSchemaPath+"/patternProperties/"+m.util.escapeFragment(J),M=(M+=A?" "+s+" = "+s+" || Object.keys("+w+"); for (var "+l+"=0; "+l+"<"+s+".length; "+l+"++) { var "+h+" = "+s+"["+l+"]; ":" for (var "+h+" in "+w+") { ")+" if ("+m.usePattern(J)+".test("+h+")) { ",_.errorPath=m.util.getPathExpr(m.errorPath,h,m.opts.jsonPointers),Ce=w+"["+h+"]",_.dataPathArr[c]=h,Ie=m.validate(_),_.baseId=x,m.util.varOccurences(Ie,n)<2?M+=" "+m.util.varReplace(Ie,n,Ce)+" ":M+=" var "+n+" = "+Ce+"; "+Ie+" ",N&&(M+=" if (!"+C+") break; "),M+=" } ",N&&(M+=" else "+C+" = true; "),M+=" } ",N)&&(M+=" if ("+C+") { ",I+="}")}}return N&&(M+=" "+I+" if ("+f+" == errors) {"),M}},2127:function(ae){ae.exports=function(m,C,U){var S,M,K,j,X,F,N,w=" ",f=m.level,l=m.dataLevel,_=m.schema[C],I=m.schemaPath+m.util.getProperty(C),C=m.errSchemaPath+"/"+C,h=!m.opts.allErrors,l="data"+(l||""),c="errs__"+f,n=m.util.copy(m),s=(n.level++,"valid"+n.level);return w+="var "+c+" = errors;",(m.opts.strictKeywords?typeof _=="object"&&0<Object.keys(_).length||_===!1:m.util.schemaHasRules(_,m.RULES.all))&&(n.schema=_,n.schemaPath=I,n.errSchemaPath=C,_="idx"+f,M="i"+f,K="' + "+(S="key"+f)+" + '",j="data"+(n.dataLevel=m.dataLevel+1),N="dataProperties"+f,F=m.opts.ownProperties,X=m.baseId,F&&(w+=" var "+N+" = undefined; "),w=w+(F?" "+N+" = "+N+" || Object.keys("+l+"); for (var "+_+"=0; "+_+"<"+N+".length; "+_+"++) { var "+S+" = "+N+"["+_+"]; ":" for (var "+S+" in "+l+") { ")+" var startErrs"+f+" = errors; ",F=S,N=m.compositeRule,m.compositeRule=n.compositeRule=!0,_=m.validate(n),n.baseId=X,m.util.varOccurences(_,j)<2?w+=" "+m.util.varReplace(_,j,F)+" ":w+=" var "+j+" = "+F+"; "+_+" ",m.compositeRule=n.compositeRule=N,w+=" if (!"+s+") { for (var "+M+"=startErrs"+f+"; "+M+"<errors; "+M+"++) { vErrors["+M+"].propertyName = "+S+"; } var err = ",m.createErrors!==!1?(w+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(C)+" , params: { propertyName: '"+K+"' } ",m.opts.messages!==!1&&(w+=" , message: 'property name \\'"+K+"\\' is invalid' "),m.opts.verbose&&(w+=" , schema: validate.schema"+I+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+l+" "),w+=" } "):w+=" {} ",w+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!m.compositeRule&&h&&(m.async?w+=" throw new ValidationError(vErrors); ":w+=" validate.errors = vErrors; return false; "),h&&(w+=" break; "),w+=" } }"),h&&(w+=" if ("+c+" == errors) {"),w}},2331:function(ae){ae.exports=function(m,F,U){var S,M,K=" ",f=m.level,j=m.dataLevel,X=m.schema[F],F=m.errSchemaPath+"/"+F,N=!m.opts.allErrors,w="data"+(j||""),f="valid"+f;if(X=="#"||X=="#/")M=m.isRoot?(S=m.async,"validate"):(S=m.root.schema.$async===!0,"root.refVal[0]");else{var _=m.resolveRef(m.baseId,X,m.isRoot);if(_===void 0){var I=m.MissingRefError.message(m.baseId,X);if(m.opts.missingRefs=="fail")m.logger.error(I),(C=C||[]).push(K),K="",m.createErrors!==!1?(K+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { ref: '"+m.util.escapeQuotes(X)+"' } ",m.opts.messages!==!1&&(K+=" , message: 'can\\'t resolve reference "+m.util.escapeQuotes(X)+"' "),m.opts.verbose&&(K+=" , schema: "+m.util.toQuotedString(X)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),K+=" } "):K+=" {} ",F=K,K=C.pop(),!m.compositeRule&&N?m.async?K+=" throw new ValidationError(["+F+"]); ":K+=" validate.errors = ["+F+"]; return false; ":K+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",N&&(K+=" if (false) { ");else{if(m.opts.missingRefs!="ignore")throw new m.MissingRefError(m.baseId,X,I);m.logger.warn(I),N&&(K+=" if (true) { ")}}else _.inline?((F=m.util.copy(m)).level++,I="valid"+F.level,F.schema=_.schema,F.schemaPath="",F.errSchemaPath=X,K+=" "+m.validate(F).replace(/validate\.schema/g,_.code)+" ",N&&(K+=" if ("+I+") { ")):(S=_.$async===!0||m.async&&_.$async!==!1,M=_.code)}if(M){(C=C||[]).push(K),K="",m.opts.passContext?K+=" "+M+".call(this, ":K+=" "+M+"( ",K+=" "+w+", (dataPath || '')",m.errorPath!='""'&&(K+=" + "+m.errorPath);var C,X=j?"data"+(j-1||""):"parentData",F=K+=" , "+X+" , "+(j?m.dataPathArr[j]:"parentDataProperty")+", rootData) ";if(K=C.pop(),S){if(!m.async)throw new Error("async schema referenced by sync schema");N&&(K+=" var "+f+"; "),K+=" try { await "+F+"; ",N&&(K+=" "+f+" = true; "),K+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",N&&(K+=" "+f+" = false; "),K+=" } ",N&&(K+=" if ("+f+") { ")}else K+=" if (!"+F+") { if (vErrors === null) vErrors = "+M+".errors; else vErrors = vErrors.concat("+M+".errors); errors = vErrors.length; } ",N&&(K+=" else { ")}return K}},1204:function(ae){ae.exports=function(m,F,U){var S=" ",M=m.level,_=m.dataLevel,K=m.schema[F],j=m.schemaPath+m.util.getProperty(F),X=m.errSchemaPath+"/"+F,F=!m.opts.allErrors,N="data"+(_||""),w="valid"+M,f=m.opts.$data&&K&&K.$data,_=(f&&(S+=" var schema"+M+" = "+m.util.getData(K.$data,_,m.dataPathArr)+"; "),"schema"+M);if(!f)if(K.length<m.opts.loopRequired&&m.schema.properties&&Object.keys(m.schema.properties).length){var I=[],C=K;if(C)for(var h=-1,l=C.length-1;h<l;){var c=C[h+=1],n=m.schema.properties[c];n&&(m.opts.strictKeywords?typeof n=="object"&&0<Object.keys(n).length||n===!1:m.util.schemaHasRules(n,m.RULES.all))||(I[I.length]=c)}}else I=K;if(f||I.length){var s=m.errorPath,K=f||I.length>=m.opts.loopRequired,i=m.opts.ownProperties;if(F){if(S+=" var missing"+M+"; ",K){f||(S+=" var "+_+" = validate.schema"+j+"; ");var o="' + "+(p="schema"+M+"["+(t="i"+M)+"]")+" + '";m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPathExpr(s,p,m.opts.jsonPointers)),S+=" var "+w+" = true; ",f&&(S+=" if (schema"+M+" === undefined) "+w+" = true; else if (!Array.isArray(schema"+M+")) "+w+" = false; else {"),S+=" for (var "+t+" = 0; "+t+" < "+_+".length; "+t+"++) { "+w+" = "+N+"["+_+"["+t+"]] !== undefined ",i&&(S+=" && Object.prototype.hasOwnProperty.call("+N+", "+_+"["+t+"]) "),S+="; if (!"+w+") break; } ",f&&(S+=" } "),(d=d||[]).push(S+=" if (!"+w+") { "),S="",m.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { missingProperty: '"+o+"' } ",m.opts.messages!==!1&&(S+=" , message: '",m.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+o+"\\'",S+="' "),m.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ";var a=S,S=d.pop()}else{S+=" if ( ";var e=I;if(e)for(var t=-1,r=e.length-1;t<r;)A=e[t+=1],t&&(S+=" || "),S+=" ( ( "+(B=N+(W=m.util.getProperty(A)))+" === undefined ",i&&(S+=" || ! Object.prototype.hasOwnProperty.call("+N+", '"+m.util.escapeQuotes(A)+"') "),S+=") && (missing"+M+" = "+m.util.toQuotedString(m.opts.jsonPointers?A:W)+") ) ";S+=") { ",o="' + "+(p="missing"+M)+" + '",m.opts._errorDataPathProperty&&(m.errorPath=m.opts.jsonPointers?m.util.getPathExpr(s,p,!0):s+" + "+p),(d=d||[]).push(S),S="",m.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { missingProperty: '"+o+"' } ",m.opts.messages!==!1&&(S+=" , message: '",m.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+o+"\\'",S+="' "),m.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ";var d,a=S;S=d.pop()}!m.compositeRule&&F?m.async?S+=" throw new ValidationError(["+a+"]); ":S+=" validate.errors = ["+a+"]; return false; ":S+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } else { "}else if(K){f||(S+=" var "+_+" = validate.schema"+j+"; ");var p,o="' + "+(p="schema"+M+"["+(t="i"+M)+"]")+" + '";m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPathExpr(s,p,m.opts.jsonPointers)),f&&(S+=" if ("+_+" && !Array.isArray("+_+")) { var err = ",m.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { missingProperty: '"+o+"' } ",m.opts.messages!==!1&&(S+=" , message: '",m.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+o+"\\'",S+="' "),m.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+_+" !== undefined) { "),S+=" for (var "+t+" = 0; "+t+" < "+_+".length; "+t+"++) { if ("+N+"["+_+"["+t+"]] === undefined ",i&&(S+=" || ! Object.prototype.hasOwnProperty.call("+N+", "+_+"["+t+"]) "),S+=") { var err = ",m.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { missingProperty: '"+o+"' } ",m.opts.messages!==!1&&(S+=" , message: '",m.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+o+"\\'",S+="' "),m.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",f&&(S+=" } ")}else{var g=I;if(g)for(var A,x=-1,E=g.length-1;x<E;){A=g[x+=1];var W=m.util.getProperty(A),o=m.util.escapeQuotes(A),B=N+W;m.opts._errorDataPathProperty&&(m.errorPath=m.util.getPath(s,A,m.opts.jsonPointers)),S+=" if ( "+B+" === undefined ",i&&(S+=" || ! Object.prototype.hasOwnProperty.call("+N+", '"+m.util.escapeQuotes(A)+"') "),S+=") { var err = ",m.createErrors!==!1?(S+=" { keyword: 'required' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(X)+" , params: { missingProperty: '"+o+"' } ",m.opts.messages!==!1&&(S+=" , message: '",m.opts._errorDataPathProperty?S+="is a required property":S+="should have required property \\'"+o+"\\'",S+="' "),m.opts.verbose&&(S+=" , schema: validate.schema"+j+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+N+" "),S+=" } "):S+=" {} ",S+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}m.errorPath=s}else F&&(S+=" if (true) {");return S}},1985:function(ae){ae.exports=function(m,F,U){var S,M=" ",K=m.level,I=m.dataLevel,j=m.schema[F],X=m.schemaPath+m.util.getProperty(F),F=m.errSchemaPath+"/"+F,N=!m.opts.allErrors,w="data"+(I||""),f="valid"+K,_=m.opts.$data&&j&&j.$data,I=_?(M+=" var schema"+K+" = "+m.util.getData(j.$data,I,m.dataPathArr)+"; ","schema"+K):j;return(j||_)&&m.opts.uniqueItems!==!1?(_&&(M+=" var "+f+"; if ("+I+" === false || "+I+" === undefined) "+f+" = true; else if (typeof "+I+" != 'boolean') "+f+" = false; else { "),M+=" var i = "+w+".length , "+f+" = true , j; if (i > 1) { ",K=m.schema.items&&m.schema.items.type,I=Array.isArray(K),!K||K=="object"||K=="array"||I&&(0<=K.indexOf("object")||0<=K.indexOf("array"))?M+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+w+"[i], "+w+"[j])) { "+f+" = false; break outer; } } } ":(M=(M+=" var itemIndices = {}, item; for (;i--;) { var item = "+w+"[i]; ")+" if ("+m.util["checkDataType"+(I?"s":"")](K,"item",m.opts.strictNumbers,!0)+") continue; ",I&&(M+=` if (typeof item == 'string') item = '"' + item; `),M+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),M+=" } ",_&&(M+=" } "),(S=S||[]).push(M+=" if (!"+f+") { "),M="",m.createErrors!==!1?(M+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(F)+" , params: { i: i, j: j } ",m.opts.messages!==!1&&(M+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),m.opts.verbose&&(M=(M+=" , schema: ")+(_?"validate.schema"+X:""+j)+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+w+" "),M+=" } "):M+=" {} ",K=M,M=S.pop(),!m.compositeRule&&N?m.async?M+=" throw new ValidationError(["+K+"]); ":M+=" validate.errors = ["+K+"]; return false; ":M+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",M+=" } ",N&&(M+=" else { ")):N&&(M+=" if (true) { "),M}},1869:function(ae){ae.exports=function(m,O,U){var S="",M=m.schema.$async===!0,K=m.util.schemaHasRulesExcept(m.schema,m.RULES.all,"$ref"),j=m.self._getId(m.schema);if(m.opts.strictKeywords){var X=m.util.schemaUnknownRules(m.schema,m.RULES.keywords);if(X){if(X="unknown keyword: "+X,m.opts.strictKeywords!=="log")throw new Error(X);m.logger.warn(X)}}if(m.isTop&&(S+=" var validate = ",M&&(m.async=!0,S+="async "),S+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",j)&&(m.opts.sourceCode||m.opts.processCode)&&(S+=" /*# sourceURL="+j+" */ "),typeof m.schema=="boolean"||!K&&!m.schema.$ref)N=m.level,w=m.dataLevel,B=m.schema[O="false schema"],o=m.schemaPath+m.util.getProperty(O),a=m.errSchemaPath+"/"+O,C=!m.opts.allErrors,f="data"+(w||""),I="valid"+N,m.schema===!1?(m.isTop?C=!0:S+=" var "+I+" = false; ",(Y=Y||[]).push(S),S="",m.createErrors!==!1?(S+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: {} ",m.opts.messages!==!1&&(S+=" , message: 'boolean schema is false' "),m.opts.verbose&&(S+=" , schema: false , parentSchema: validate.schema"+m.schemaPath+" , data: "+f+" "),S+=" } "):S+=" {} ",A=S,S=Y.pop(),!m.compositeRule&&C?m.async?S+=" throw new ValidationError(["+A+"]); ":S+=" validate.errors = ["+A+"]; return false; ":S+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):m.isTop?S+=M?" return data; ":" validate.errors = null; return true; ":S+=" var "+I+" = true; ",m.isTop&&(S+=" }; return validate; ");else{if(m.isTop){var F=m.isTop,N=m.level=0,w=m.dataLevel=0,f="data";if(m.rootId=m.resolve.fullPath(m.self._getId(m.root.schema)),m.baseId=m.baseId||m.rootId,delete m.isTop,m.dataPathArr=[""],m.schema.default!==void 0&&m.opts.useDefaults&&m.opts.strictDefaults){var _="default is ignored in the schema root";if(m.opts.strictDefaults!=="log")throw new Error(_);m.logger.warn(_)}S=(S+=" var vErrors = null; ")+" var errors = 0; if (rootData === undefined) rootData = data; "}else{if(N=m.level,f="data"+((w=m.dataLevel)||""),j&&(m.baseId=m.resolve.url(m.baseId,j)),M&&!m.async)throw new Error("async schema in sync schema");S+=" var errs_"+N+" = errors;"}var I="valid"+N,C=!m.opts.allErrors,h="",l="",c=m.schema.type,n=Array.isArray(c);if(c&&m.opts.nullable&&m.schema.nullable===!0&&(n?c.indexOf("null")==-1&&(c=c.concat("null")):c!="null"&&(c=[c,"null"],n=!0)),n&&c.length==1&&(c=c[0],n=!1),m.schema.$ref&&K){if(m.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+m.errSchemaPath+'" (see option extendRefs)');m.opts.extendRefs!==!0&&(K=!1,m.logger.warn('$ref: keywords ignored in schema at path "'+m.errSchemaPath+'"'))}if(m.schema.$comment&&m.opts.$comment&&(S+=" "+m.RULES.all.$comment.code(m,"$comment")),c){m.opts.coerceTypes&&(s=m.util.coerceToTypes(m.opts.coerceTypes,c));var s,i=m.RULES.types[c];if(s||n||i===!0||i&&!P(i)){var o=m.schemaPath+".type",a=m.errSchemaPath+"/type",o=m.schemaPath+".type",a=m.errSchemaPath+"/type";if(S+=" if ("+m.util[n?"checkDataTypes":"checkDataType"](c,f,m.opts.strictNumbers,!0)+") { ",s){var e="dataType"+N,t="coerced"+N,r=(S+=" var "+e+" = typeof "+f+"; var "+t+" = undefined; ",m.opts.coerceTypes=="array"&&(S+=" if ("+e+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+e+" = typeof "+f+"; if ("+m.util.checkDataType(m.schema.type,f,m.opts.strictNumbers)+") "+t+" = "+f+"; } "),S+=" if ("+t+" !== undefined) ; ",s);if(r)for(var d,p=-1,g=r.length-1;p<g;)(d=r[p+=1])=="string"?S+=" else if ("+e+" == 'number' || "+e+" == 'boolean') "+t+" = '' + "+f+"; else if ("+f+" === null) "+t+" = ''; ":d=="number"||d=="integer"?(S+=" else if ("+e+" == 'boolean' || "+f+" === null || ("+e+" == 'string' && "+f+" && "+f+" == +"+f+" ",d=="integer"&&(S+=" && !("+f+" % 1)"),S+=")) "+t+" = +"+f+"; "):d=="boolean"?S+=" else if ("+f+" === 'false' || "+f+" === 0 || "+f+" === null) "+t+" = false; else if ("+f+" === 'true' || "+f+" === 1) "+t+" = true; ":d=="null"?S+=" else if ("+f+" === '' || "+f+" === 0 || "+f+" === false) "+t+" = null; ":m.opts.coerceTypes=="array"&&d=="array"&&(S+=" else if ("+e+" == 'string' || "+e+" == 'number' || "+e+" == 'boolean' || "+f+" == null) "+t+" = ["+f+"]; ");(Y=Y||[]).push(S+=" else { "),S="",m.createErrors!==!1?(S=(S+=" { keyword: 'type' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: { type: '")+(n?""+c.join(","):""+c)+"' } ",m.opts.messages!==!1&&(S=(S+=" , message: 'should be ")+(n?""+c.join(","):""+c)+"' "),m.opts.verbose&&(S+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+f+" "),S+=" } "):S+=" {} ";var A=S,X=(S=Y.pop(),!m.compositeRule&&C?m.async?S+=" throw new ValidationError(["+A+"]); ":S+=" validate.errors = ["+A+"]; return false; ":S+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",w?"data"+(w-1||""):"parentData");S=S+(" } if ("+t+" !== undefined) { ")+(" "+f+" = "+t+"; "),w||(S+="if ("+X+" !== undefined)"),S+=" "+X+"["+(w?m.dataPathArr[w]:"parentDataProperty")+"] = "+t+"; } "}else A=((Y=Y||[]).push(S),S="",m.createErrors!==!1?(S=(S+=" { keyword: 'type' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: { type: '")+(n?""+c.join(","):""+c)+"' } ",m.opts.messages!==!1&&(S=(S+=" , message: 'should be ")+(n?""+c.join(","):""+c)+"' "),m.opts.verbose&&(S+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+f+" "),S+=" } "):S+=" {} ",S),S=Y.pop(),!m.compositeRule&&C?m.async?S+=" throw new ValidationError(["+A+"]); ":S+=" validate.errors = ["+A+"]; return false; ":S+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";S+=" } "}}if(m.schema.$ref&&!K)S+=" "+m.RULES.all.$ref.code(m,"$ref")+" ",C&&(S=(S+=" } if (errors === ")+(F?"0":"errs_"+N)+") { ",l+="}");else{var x=m.RULES;if(x){for(var E=-1,W=x.length-1;E<W;)if(P(i=x[E+=1])){if(i.type&&(S+=" if ("+m.util.checkDataType(i.type,f,m.opts.strictNumbers)+") { "),m.opts.useDefaults){if(i.type=="object"&&m.schema.properties){var B=m.schema.properties,V=Object.keys(B);if(V){for(var u,v=-1,$=V.length-1;v<$;)if((H=B[u=V[v+=1]]).default!==void 0){var y=f+m.util.getProperty(u);if(m.compositeRule){if(m.opts.strictDefaults){if(_="default is ignored for: "+y,m.opts.strictDefaults!=="log")throw new Error(_);m.logger.warn(_)}}else S+=" if ("+y+" === undefined ",m.opts.useDefaults=="empty"&&(S+=" || "+y+" === null || "+y+" === '' "),S+=" ) "+y+" = ",m.opts.useDefaults=="shared"?S+=" "+m.useDefault(H.default)+" ":S+=" "+JSON.stringify(H.default)+" ",S+="; "}}}else if(i.type=="array"&&Array.isArray(m.schema.items)){var L=m.schema.items;if(L){for(var H,p=-1,G=L.length-1;p<G;)if((H=L[p+=1]).default!==void 0)if(y=f+"["+p+"]",m.compositeRule){if(m.opts.strictDefaults){if(_="default is ignored for: "+y,m.opts.strictDefaults!=="log")throw new Error(_);m.logger.warn(_)}}else S+=" if ("+y+" === undefined ",m.opts.useDefaults=="empty"&&(S+=" || "+y+" === null || "+y+" === '' "),S+=" ) "+y+" = ",m.opts.useDefaults=="shared"?S+=" "+m.useDefault(H.default)+" ":S+=" "+JSON.stringify(H.default)+" ",S+="; "}}}var Y,Q=i.rules;if(Q)for(var z,ee=-1,T=Q.length-1;ee<T;)Z(z=Q[ee+=1])&&(z=z.code(m,z.keyword,i.type))&&(S+=" "+z+" ",C)&&(h+="}");C&&(S+=" "+h+" ",h=""),i.type&&(S+=" } ",c)&&c===i.type&&!s&&(S+=" else { ",o=m.schemaPath+".type",a=m.errSchemaPath+"/type",(Y=Y||[]).push(S),S="",m.createErrors!==!1?(S=(S+=" { keyword: 'type' , dataPath: (dataPath || '') + "+m.errorPath+" , schemaPath: "+m.util.toQuotedString(a)+" , params: { type: '")+(n?""+c.join(","):""+c)+"' } ",m.opts.messages!==!1&&(S=(S+=" , message: 'should be ")+(n?""+c.join(","):""+c)+"' "),m.opts.verbose&&(S+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+m.schemaPath+" , data: "+f+" "),S+=" } "):S+=" {} ",A=S,S=Y.pop(),!m.compositeRule&&C?m.async?S+=" throw new ValidationError(["+A+"]); ":S+=" validate.errors = ["+A+"]; return false; ":S+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",S+=" } "),C&&(S=(S+=" if (errors === ")+(F?"0":"errs_"+N)+") { ",l+="}")}}}C&&(S+=" "+l+" "),F?S=S+(M?" if (errors === 0) return data; else throw new ValidationError(vErrors); ":" validate.errors = vErrors; return errors === 0; ")+" }; return validate;":S+=" var "+I+" = errors === errs_"+N+";"}return S;function P(b){for(var k=b.rules,R=0;R<k.length;R++)if(Z(k[R]))return 1}function Z(b){return m.schema[b.keyword]!==void 0||b.implements&&function(k){for(var R=k.implements,D=0;D<R.length;D++)if(m.schema[R[D]]!==void 0)return 1}(b)}}},7931:function(ae,m,O){var U=/^[a-z_$][a-z0-9_$-]*$/i,S=O(1793),M=O(5868);function K(j,X){K.errors=null;var F=this._validateKeyword=this._validateKeyword||this.compile(M,!0);if(F(j))return!0;if(K.errors=F.errors,X)throw new Error("custom keyword definition is invalid: "+this.errorsText(F.errors));return!1}ae.exports={add:function(j,X){var F=this.RULES;if(F.keywords[j])throw new Error("Keyword "+j+" is already defined");if(!U.test(j))throw new Error("Keyword "+j+" is not a valid identifier");if(X){this.validateKeyword(X,!0);var N=X.type;if(Array.isArray(N))for(var w=0;w<N.length;w++)_(j,N[w],X);else _(j,N,X);var f=X.metaSchema;f&&(X.$data&&this._opts.$data&&(f={anyOf:[f,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),X.validateSchema=this.compile(f,!0))}function _(I,C,h){for(var l,c=0;c<F.length;c++){var n=F[c];if(n.type==C){l=n;break}}l||F.push(l={type:C,rules:[]}),h={keyword:I,definition:h,custom:!0,code:S,implements:h.implements},l.rules.push(h),F.custom[I]=h}return F.keywords[j]=F.all[j]=!0,this},get:function(j){var X=this.RULES.custom[j];return X?X.definition:this.RULES.keywords[j]||!1},remove:function(j){var X=this.RULES;delete X.keywords[j],delete X.all[j],delete X.custom[j];for(var F=0;F<X.length;F++)for(var N=X[F].rules,w=0;w<N.length;w++)if(N[w].keyword==j){N.splice(w,1);break}return this},validate:K}},2303:function(ae){ae.exports=function m(O,U){if(O===U)return!0;if(O&&U&&typeof O=="object"&&typeof U=="object"){if(O.constructor!==U.constructor)return!1;var S,M,K;if(Array.isArray(O)){if((S=O.length)!=U.length)return!1;for(M=S;M--!=0;)if(!m(O[M],U[M]))return!1}else{if(O.constructor===RegExp)return O.source===U.source&&O.flags===U.flags;if(O.valueOf!==Object.prototype.valueOf)return O.valueOf()===U.valueOf();if(O.toString!==Object.prototype.toString)return O.toString()===U.toString();if((S=(K=Object.keys(O)).length)!==Object.keys(U).length)return!1;for(M=S;M--!=0;)if(!Object.prototype.hasOwnProperty.call(U,K[M]))return!1;for(M=S;M--!=0;){var j=K[M];if(!m(O[j],U[j]))return!1}}return!0}return O!=O&&U!=U}},3508:function(ae){ae.exports=function(m,O){var U,S=typeof(O=typeof(O=O||{})=="function"?{cmp:O}:O).cycles=="boolean"&&O.cycles,M=O.cmp&&(U=O.cmp,function(j){return function(X,F){return X={key:X,value:j[X]},F={key:F,value:j[F]},U(X,F)}}),K=[];return function j(X){if((X=X&&X.toJSON&&typeof X.toJSON=="function"?X.toJSON():X)!==void 0){if(typeof X=="number")return isFinite(X)?""+X:"null";if(typeof X!="object")return JSON.stringify(X);if(Array.isArray(X)){for(w="[",f=0;f<X.length;f++)f&&(w+=","),w+=j(X[f])||"null";return w+"]"}if(X===null)return"null";if(K.indexOf(X)!==-1){if(S)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var F=K.push(X)-1,N=Object.keys(X).sort(M&&M(X)),w="",f=0;f<N.length;f++){var _=N[f],I=j(X[_]);I&&(w&&(w+=","),w+=JSON.stringify(_)+":"+I)}return K.splice(F,1),"{"+w+"}"}}(m)}},233:function(ae){ae.exports=function m(N,w){function S(c){return m.insensitive&&(""+c).toLowerCase()||""+c}var M,K,C=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,I=/(^[ ]*|[ ]*$)/g,j=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,X=/^0x[0-9a-f]+$/i,F=/^0/,N=S(N).replace(I,"")||"",w=S(w).replace(I,"")||"",f=N.replace(C,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),_=w.replace(C,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),I=parseInt(N.match(X),16)||f.length!==1&&N.match(j)&&Date.parse(N),C=parseInt(w.match(X),16)||I&&w.match(j)&&Date.parse(w)||null;if(C){if(I<C)return-1;if(C<I)return 1}for(var h=0,l=Math.max(f.length,_.length);h<l;h++){if(M=!(f[h]||"").match(F)&&parseFloat(f[h])||f[h]||0,K=!(_[h]||"").match(F)&&parseFloat(_[h])||_[h]||0,isNaN(M)!==isNaN(K))return isNaN(M)?1:-1;if(typeof M!=typeof K&&(M+="",K+=""),M<K)return-1;if(K<M)return 1}return 0}},5156:function(ae,m){(function(O){function U(u){return u!==null&&Object.prototype.toString.call(u)==="[object Array]"}function S(u){return u!==null&&Object.prototype.toString.call(u)==="[object Object]"}function M(u,v){if(u!==v){if(Object.prototype.toString.call(u)!==Object.prototype.toString.call(v))return!1;if(U(u)===!0){if(u.length!==v.length)return!1;for(var $=0;$<u.length;$++)if(M(u[$],v[$])===!1)return!1}else{if(S(u)!==!0)return!1;var y,L,H={};for(y in u)if(hasOwnProperty.call(u,y)){if(M(u[y],v[y])===!1)return!1;H[y]=!0}for(L in v)if(hasOwnProperty.call(v,L)&&H[L]!==!0)return!1}}return!0}function K(u){if(u===""||u===!1||u===null||U(u)&&u.length===0)return!0;if(S(u)){for(var v in u)if(u.hasOwnProperty(v))return!1;return!0}return!1}var j=typeof String.prototype.trimLeft=="function"?function(u){return u.trimLeft()}:function(u){return u.match(/^\s*(.*)/)[1]},X={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},F="UnquotedIdentifier",N="QuotedIdentifier",w="Rbracket",f="Rparen",_="Comma",I="Colon",C="Rbrace",h="Number",l="Current",c="Expref",n="Pipe",s="Flatten",i="Star",o="Filter",a="Lbrace",e="Lbracket",t="Lparen",r="Literal",d={".":"Dot","*":i,",":_,":":I,"{":a,"}":C,"]":w,"(":t,")":f,"@":l},p={"<":!0,">":!0,"=":!0,"!":!0},g={" ":!0," ":!0,"\n":!0};function A(u){return"0"<=u&&u<="9"||u==="-"}function x(){}x.prototype={tokenize:function(u){var v,$,y=[];for(this._current=0;this._current<u.length;)if("a"<=(H=u[this._current])&&H<="z"||"A"<=H&&H<="Z"||H==="_")L=this._current,v=this._consumeUnquotedIdentifier(u),y.push({type:F,value:v,start:L});else if(d[u[this._current]]!==void 0)y.push({type:d[u[this._current]],value:u[this._current],start:this._current}),this._current++;else if(A(u[this._current]))$=this._consumeNumber(u),y.push($);else if(u[this._current]==="[")$=this._consumeLBracket(u),y.push($);else if(u[this._current]==='"')L=this._current,v=this._consumeQuotedIdentifier(u),y.push({type:N,value:v,start:L});else if(u[this._current]==="'")L=this._current,v=this._consumeRawStringLiteral(u),y.push({type:r,value:v,start:L});else if(u[this._current]==="`"){var L=this._current,H=this._consumeLiteral(u);y.push({type:r,value:H,start:L})}else if(p[u[this._current]]!==void 0)y.push(this._consumeOperator(u));else if(g[u[this._current]]!==void 0)this._current++;else if(u[this._current]==="&")L=this._current,this._current++,u[this._current]==="&"?(this._current++,y.push({type:"And",value:"&&",start:L})):y.push({type:c,value:"&",start:L});else{if(u[this._current]!=="|")throw(H=new Error("Unknown character:"+u[this._current])).name="LexerError",H;L=this._current,this._current++,u[this._current]==="|"?(this._current++,y.push({type:"Or",value:"||",start:L})):y.push({type:n,value:"|",start:L})}return y},_consumeUnquotedIdentifier:function(u){var v,$=this._current;for(this._current++;this._current<u.length&&("a"<=(v=u[this._current])&&v<="z"||"A"<=v&&v<="Z"||"0"<=v&&v<="9"||v==="_");)this._current++;return u.slice($,this._current)},_consumeQuotedIdentifier:function(u){for(var v=this._current,$=(this._current++,u.length);u[this._current]!=='"'&&this._current<$;){var y=this._current;u[y]!=="\\"||u[y+1]!=="\\"&&u[y+1]!=='"'?y++:y+=2,this._current=y}return this._current++,JSON.parse(u.slice(v,this._current))},_consumeRawStringLiteral:function(u){for(var v=this._current,$=(this._current++,u.length);u[this._current]!=="'"&&this._current<$;){var y=this._current;u[y]!=="\\"||u[y+1]!=="\\"&&u[y+1]!=="'"?y++:y+=2,this._current=y}return this._current++,u.slice(v+1,this._current-1).replace("\\'","'")},_consumeNumber:function(u){for(var v=this._current,$=(this._current++,u.length);A(u[this._current])&&this._current<$;)this._current++;var y=parseInt(u.slice(v,this._current));return{type:h,value:y,start:v}},_consumeLBracket:function(u){var v=this._current;return this._current++,u[this._current]==="?"?(this._current++,{type:o,value:"[?",start:v}):u[this._current]==="]"?(this._current++,{type:s,value:"[]",start:v}):{type:e,value:"[",start:v}},_consumeOperator:function(u){var v=this._current,$=u[v];return this._current++,$==="!"?u[this._current]==="="?(this._current++,{type:"NE",value:"!=",start:v}):{type:"Not",value:"!",start:v}:$==="<"?u[this._current]==="="?(this._current++,{type:"LTE",value:"<=",start:v}):{type:"LT",value:"<",start:v}:$===">"?u[this._current]==="="?(this._current++,{type:"GTE",value:">=",start:v}):{type:"GT",value:">",start:v}:$==="="&&u[this._current]==="="?(this._current++,{type:"EQ",value:"==",start:v}):void 0},_consumeLiteral:function(u){this._current++;for(var v=this._current,$=u.length;u[this._current]!=="`"&&this._current<$;){var y=this._current;u[y]!=="\\"||u[y+1]!=="\\"&&u[y+1]!=="`"?y++:y+=2,this._current=y}return v=(v=j(u.slice(v,this._current))).replace("\\`","`"),v=this._looksLikeJSON(v)?JSON.parse(v):JSON.parse('"'+v+'"'),this._current++,v},_looksLikeJSON:function(u){if(u==="")return!1;if(0<='[{"'.indexOf(u[0])||0<=["true","false","null"].indexOf(u))return!0;if(!(0<="-0123456789".indexOf(u[0])))return!1;try{return JSON.parse(u),!0}catch{return!1}}};var E={};function W(){}function B(u){this.runtime=u}function V(u){this._interpreter=u,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[0]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[0]}]},contains:{_func:this._functionContains,_signature:[{types:[2,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[2]},{types:[2]}]},floor:{_func:this._functionFloor,_signature:[{types:[0]}]},length:{_func:this._functionLength,_signature:[{types:[2,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[2]},{types:[2]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[2]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[2,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}E.EOF=0,E[F]=0,E[N]=0,E[w]=0,E[f]=0,E[_]=0,E[C]=0,E[h]=0,E[l]=0,E[c]=0,E.Pipe=1,E.Or=2,E.And=3,E.EQ=5,E.GT=5,E.LT=5,E.GTE=5,E.LTE=5,E.NE=5,E[s]=9,E.Star=20,E[o]=21,E.Dot=40,E.Not=45,E[a]=50,E[e]=55,E[t]=60,W.prototype={parse:function($){this._loadTokens($),this.index=0;var v,$=this.expression(0);if(this._lookahead(0)!=="EOF")throw v=this._lookaheadToken(0),(v=new Error("Unexpected token type: "+v.type+", value: "+v.value)).name="ParserError",v;return $},_loadTokens:function(u){var v=new x().tokenize(u);v.push({type:"EOF",value:"",start:u.length}),this.tokens=v},expression:function(u){for(var v=this._lookaheadToken(0),$=(this._advance(),this.nud(v)),y=this._lookahead(0);u<E[y];)this._advance(),$=this.led(y,$),y=this._lookahead(0);return $},_lookahead:function(u){return this.tokens[this.index+u].type},_lookaheadToken:function(u){return this.tokens[this.index+u]},_advance:function(){this.index++},nud:function(u){var v,$;switch(u.type){case r:return{type:"Literal",value:u.value};case F:return{type:"Field",name:u.value};case N:var y={type:"Field",name:u.value};if(this._lookahead(0)===t)throw new Error("Quoted identifier not allowed for function names.");return y;case"Not":return{type:"NotExpression",children:[v=this.expression(E.Not)]};case i:return v=null,{type:"ValueProjection",children:[{type:"Identity"},v=this._lookahead(0)===w?{type:"Identity"}:this._parseProjectionRHS(E.Star)]};case o:return this.led(u.type,{type:"Identity"});case a:return this._parseMultiselectHash();case s:return{type:"Projection",children:[{type:s,children:[{type:"Identity"}]},v=this._parseProjectionRHS(E.Flatten)]};case e:return this._lookahead(0)===h||this._lookahead(0)===I?(v=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},v)):this._lookahead(0)===i&&this._lookahead(1)===w?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},v=this._parseProjectionRHS(E.Star)]}):this._parseMultiselectList();case l:return{type:l};case c:return{type:"ExpressionReference",children:[$=this.expression(E.Expref)]};case t:for(var L=[];this._lookahead(0)!==f;)this._lookahead(0)===l?($={type:l},this._advance()):$=this.expression(0),L.push($);return this._match(f),L[0];default:this._errorToken(u)}},led:function(u,v){var $;switch(u){case"Dot":var y=E.Dot;return this._lookahead(0)!==i?{type:"Subexpression",children:[v,$=this._parseDotRHS(y)]}:(this._advance(),{type:"ValueProjection",children:[v,$=this._parseProjectionRHS(y)]});case n:return $=this.expression(E.Pipe),{type:n,children:[v,$]};case"Or":return{type:"OrExpression",children:[v,$=this.expression(E.Or)]};case"And":return{type:"AndExpression",children:[v,$=this.expression(E.And)]};case t:for(var L,y=v.name,H=[];this._lookahead(0)!==f;)this._lookahead(0)===l?(L={type:l},this._advance()):L=this.expression(0),this._lookahead(0)===_&&this._match(_),H.push(L);return this._match(f),{type:"Function",name:y,children:H};case o:return y=this.expression(0),this._match(w),{type:"FilterProjection",children:[v,$=this._lookahead(0)===s?{type:"Identity"}:this._parseProjectionRHS(E.Filter),y]};case s:return{type:"Projection",children:[{type:s,children:[v]},this._parseProjectionRHS(E.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(v,u);case e:return y=this._lookaheadToken(0),y.type===h||y.type===I?($=this._parseIndexExpression(),this._projectIfSlice(v,$)):(this._match(i),this._match(w),{type:"Projection",children:[v,$=this._parseProjectionRHS(E.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(u){var v;if(this._lookahead(0)!==u)throw v=this._lookaheadToken(0),(u=new Error("Expected "+u+", got: "+v.type)).name="ParserError",u;this._advance()},_errorToken:function(u){throw u=new Error("Invalid token ("+u.type+'): "'+u.value+'"'),u.name="ParserError",u},_parseIndexExpression:function(){var u;return this._lookahead(0)===I||this._lookahead(1)===I?this._parseSliceExpression():(u={type:"Index",value:this._lookaheadToken(0).value},this._advance(),this._match(w),u)},_projectIfSlice:function(u,v){return u={type:"IndexExpression",children:[u,v]},v.type==="Slice"?{type:"Projection",children:[u,this._parseProjectionRHS(E.Star)]}:u},_parseSliceExpression:function(){for(var u,v=[null,null,null],$=0,y=this._lookahead(0);y!==w&&$<3;){if(y===I)$++;else{if(y!==h)throw u=this._lookahead(0),(u=new Error("Syntax error, unexpected token: "+u.value+"("+u.type+")")).name="Parsererror",u;v[$]=this._lookaheadToken(0).value}this._advance(),y=this._lookahead(0)}return this._match(w),{type:"Slice",children:v}},_parseComparator:function(u,v){return{type:"Comparator",name:v,children:[u,this.expression(E[v])]}},_parseDotRHS:function(u){var v=this._lookahead(0);return 0<=[F,N,i].indexOf(v)?this.expression(u):v===e?(this._match(e),this._parseMultiselectList()):v===a?(this._match(a),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(u){var v,$;if(E[this._lookahead(0)]<10)v={type:"Identity"};else if(this._lookahead(0)===e)v=this.expression(u);else if(this._lookahead(0)===o)v=this.expression(u);else{if(this._lookahead(0)!=="Dot")throw $=this._lookaheadToken(0),($=new Error("Sytanx error, unexpected token: "+$.value+"("+$.type+")")).name="ParserError",$;this._match("Dot"),v=this._parseDotRHS(u)}return v},_parseMultiselectList:function(){for(var u=[];this._lookahead(0)!==w;){var v=this.expression(0);if(u.push(v),this._lookahead(0)===_&&(this._match(_),this._lookahead(0)===w))throw new Error("Unexpected token Rbracket")}return this._match(w),{type:"MultiSelectList",children:u}},_parseMultiselectHash:function(){for(var u,v,$=[],y=[F,N];;){if(u=this._lookaheadToken(0),y.indexOf(u.type)<0)throw new Error("Expecting an identifier token, got: "+u.type);if(u=u.value,this._advance(),this._match(I),v=this.expression(0),$.push({type:"KeyValuePair",name:u,value:v}),this._lookahead(0)===_)this._match(_);else if(this._lookahead(0)===C){this._match(C);break}}return{type:"MultiSelectHash",children:$}}},B.prototype={search:function(u,v){return this.visit(u,v)},visit:function(u,v){var $,y,L,H,G,Y;switch(u.type){case"Field":return v!==null&&S(v)?(Q=v[u.name])===void 0?null:Q:null;case"Subexpression":for(P=this.visit(u.children[0],v),R=1;R<u.children.length;R++)if((P=this.visit(u.children[1],P))===null)return null;return P;case"IndexExpression":return G=this.visit(u.children[0],v),this.visit(u.children[1],G);case"Index":return U(v)?(P=v[Q=(Q=u.value)<0?v.length+Q:Q])===void 0?null:P:null;case"Slice":if(!U(v))return null;var Q=u.children.slice(0),Q=this.computeSliceParams(v.length,Q),z=Q[0],ee=Q[1],T=Q[2],P=[];if(0<T)for(R=z;R<ee;R+=T)P.push(v[R]);else for(R=z;ee<R;R+=T)P.push(v[R]);return P;case"Projection":var Z=this.visit(u.children[0],v);if(!U(Z))return null;for(b=[],R=0;R<Z.length;R++)(y=this.visit(u.children[1],Z[R]))!==null&&b.push(y);return b;case"ValueProjection":if(!S(Z=this.visit(u.children[0],v)))return null;for(var b=[],k=function(ke){for(var Se=Object.keys(ke),Te=[],Re=0;Re<Se.length;Re++)Te.push(ke[Se[Re]]);return Te}(Z),R=0;R<k.length;R++)(y=this.visit(u.children[1],k[R]))!==null&&b.push(y);return b;case"FilterProjection":if(!U(Z=this.visit(u.children[0],v)))return null;var D=[],J=[];for(R=0;R<Z.length;R++)K($=this.visit(u.children[2],Z[R]))||D.push(Z[R]);for(var ne=0;ne<D.length;ne++)(y=this.visit(u.children[1],D[ne]))!==null&&J.push(y);return J;case"Comparator":switch(L=this.visit(u.children[0],v),H=this.visit(u.children[1],v),u.name){case"EQ":P=M(L,H);break;case"NE":P=!M(L,H);break;case"GT":P=H<L;break;case"GTE":P=H<=L;break;case"LT":P=L<H;break;case"LTE":P=L<=H;break;default:throw new Error("Unknown comparator: "+u.name)}return P;case s:var me=this.visit(u.children[0],v);if(!U(me))return null;var Ce=[];for(R=0;R<me.length;R++)U(y=me[R])?Ce.push.apply(Ce,y):Ce.push(y);return Ce;case"Identity":return v;case"MultiSelectList":if(v===null)return null;for(b=[],R=0;R<u.children.length;R++)b.push(this.visit(u.children[R],v));return b;case"MultiSelectHash":if(v===null)return null;for(b={},R=0;R<u.children.length;R++)b[(Y=u.children[R]).name]=this.visit(Y.value,v);return b;case"OrExpression":return $=K($=this.visit(u.children[0],v))?this.visit(u.children[1],v):$;case"AndExpression":return K(L=this.visit(u.children[0],v))===!0?L:this.visit(u.children[1],v);case"NotExpression":return K(L=this.visit(u.children[0],v));case"Literal":return u.value;case n:return G=this.visit(u.children[0],v),this.visit(u.children[1],G);case l:return v;case"Function":var Ie=[];for(R=0;R<u.children.length;R++)Ie.push(this.visit(u.children[R],v));return this.runtime.callFunction(u.name,Ie);case"ExpressionReference":return Q=u.children[0],Q.jmespathType=c,Q;default:throw new Error("Unknown node type: "+u.type)}},computeSliceParams:function(u,$){var H=$[0],G=$[1],$=$[2],y=[null,null,null];if($===null)$=1;else if($===0)throw(L=new Error("Invalid slice, step cannot be 0")).name="RuntimeError",L;var L=$<0,H=H===null?L?u-1:0:this.capSliceRange(u,H,$),G=G===null?L?-1:u:this.capSliceRange(u,G,$);return y[0]=H,y[1]=G,y[2]=$,y},capSliceRange:function(u,v,$){return v<0?(v+=u)<0&&(v=$<0?-1:0):u<=v&&(v=$<0?u-1:u),v}},V.prototype={callFunction:function(u,v){var $=this.functionTable[u];if($===void 0)throw new Error("Unknown function: "+u+"()");return this._validateArgs(u,v,$._signature),$._func.call(this,v)},_validateArgs:function(u,v,$){var y;if($[$.length-1].variadic){if(v.length<$.length)throw y=$.length===1?" argument":" arguments",new Error("ArgumentError: "+u+"() takes at least"+$.length+y+" but received "+v.length)}else if(v.length!==$.length)throw y=$.length===1?" argument":" arguments",new Error("ArgumentError: "+u+"() takes "+$.length+y+" but received "+v.length);for(var L=0;L<$.length;L++){for(var H,G=!1,Y=$[L].types,Q=this._getTypeName(v[L]),z=0;z<Y.length;z++)if(this._typeMatches(Q,Y[z],v[L])){G=!0;break}if(!G)throw H=Y.map(function(ee){return X[ee]}).join(","),new Error("TypeError: "+u+"() expected argument "+(L+1)+" to be type "+H+" but received type "+X[Q]+" instead.")}},_typeMatches:function(u,v,$){if(v===1)return!0;if(v!==9&&v!==8&&v!==3)return u===v;if(v===3)return u===3;if(u===3){var y;v===8?y=0:v===9&&(y=2);for(var L=0;L<$.length;L++)if(!this._typeMatches(this._getTypeName($[L]),y,$[L]))return!1;return!0}},_getTypeName:function(u){switch(Object.prototype.toString.call(u)){case"[object String]":return 2;case"[object Number]":return 0;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return u.jmespathType===c?6:4}},_functionStartsWith:function(u){return u[0].lastIndexOf(u[1])===0},_functionEndsWith:function($){var v=$[0],$=$[1];return v.indexOf($,v.length-$.length)!==-1},_functionReverse:function(u){var v;if(this._getTypeName(u[0])!==2)return(v=u[0].slice(0)).reverse(),v;for(var $=u[0],y="",L=$.length-1;0<=L;L--)y+=$[L];return y},_functionAbs:function(u){return Math.abs(u[0])},_functionCeil:function(u){return Math.ceil(u[0])},_functionAvg:function(u){for(var v=0,$=u[0],y=0;y<$.length;y++)v+=$[y];return v/$.length},_functionContains:function(u){return 0<=u[0].indexOf(u[1])},_functionFloor:function(u){return Math.floor(u[0])},_functionLength:function(u){return(S(u[0])?Object.keys(u[0]):u[0]).length},_functionMap:function(u){for(var v=[],$=this._interpreter,y=u[0],L=u[1],H=0;H<L.length;H++)v.push($.visit(y,L[H]));return v},_functionMerge:function(u){for(var v={},$=0;$<u.length;$++){var y,L=u[$];for(y in L)v[y]=L[y]}return v},_functionMax:function(u){if(0<u[0].length){if(this._getTypeName(u[0][0])===0)return Math.max.apply(Math,u[0]);for(var v=u[0],$=v[0],y=1;y<v.length;y++)$.localeCompare(v[y])<0&&($=v[y]);return $}return null},_functionMin:function(u){if(0<u[0].length){if(this._getTypeName(u[0][0])===0)return Math.min.apply(Math,u[0]);for(var v=u[0],$=v[0],y=1;y<v.length;y++)v[y].localeCompare($)<0&&($=v[y]);return $}return null},_functionSum:function(u){for(var v=0,$=u[0],y=0;y<$.length;y++)v+=$[y];return v},_functionType:function(u){switch(this._getTypeName(u[0])){case 0:return"number";case 2:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(u){return Object.keys(u[0])},_functionValues:function(u){for(var v=u[0],$=Object.keys(v),y=[],L=0;L<$.length;L++)y.push(v[$[L]]);return y},_functionJoin:function(u){var v=u[0];return u[1].join(v)},_functionToArray:function(u){return this._getTypeName(u[0])===3?u[0]:[u[0]]},_functionToString:function(u){return this._getTypeName(u[0])===2?u[0]:JSON.stringify(u[0])},_functionToNumber:function(u){var v=this._getTypeName(u[0]);return v===0?u[0]:v!==2||(v=+u[0],isNaN(v))?null:v},_functionNotNull:function(u){for(var v=0;v<u.length;v++)if(this._getTypeName(u[v])!==7)return u[v];return null},_functionSort:function(u){return u=u[0].slice(0),u.sort(),u},_functionSortBy:function(u){var v=u[0].slice(0);if(v.length!==0){var $=this._interpreter,y=u[1],L=this._getTypeName($.visit(y,v[0]));if([0,2].indexOf(L)<0)throw new Error("TypeError");for(var H=this,G=[],Y=0;Y<v.length;Y++)G.push([Y,v[Y]]);G.sort(function(z,ee){var T=$.visit(y,z[1]),P=$.visit(y,ee[1]);if(H._getTypeName(T)!==L)throw new Error("TypeError: expected "+L+", received "+H._getTypeName(T));if(H._getTypeName(P)!==L)throw new Error("TypeError: expected "+L+", received "+H._getTypeName(P));return P<T?1:T<P?-1:z[0]-ee[0]});for(var Q=0;Q<G.length;Q++)v[Q]=G[Q][1]}return v},_functionMaxBy:function(u){for(var v,$,y=u[1],L=u[0],H=this.createKeyFunction(y,[0,2]),G=-1/0,Y=0;Y<L.length;Y++)G<($=H(L[Y]))&&(G=$,v=L[Y]);return v},_functionMinBy:function(u){for(var v,$,y=u[1],L=u[0],H=this.createKeyFunction(y,[0,2]),G=1/0,Y=0;Y<L.length;Y++)($=H(L[Y]))<G&&(G=$,v=L[Y]);return v},createKeyFunction:function(u,v){var $=this,y=this._interpreter;return function(G){var H,G=y.visit(u,G);if(v.indexOf($._getTypeName(G))<0)throw H="TypeError: expected one of "+v+", received "+$._getTypeName(G),new Error(H);return G}}},O.tokenize=function(u){return new x().tokenize(u)},O.compile=function(u){return new W().parse(u)},O.search=function(u,v){var $=new W,y=new B(L=new V),L=(L._interpreter=y,$.parse(v));return y.search(L,u)},O.strictDeepEqual=M})(m)},500:function(ae){var m=ae.exports=function(U,S,M){typeof S=="function"&&(M=S,S={}),function K(j,X,F,N,w,f,_,I,C,h){if(N&&typeof N=="object"&&!Array.isArray(N)){for(var l in X(N,w,f,_,I,C,h),N){var c=N[l];if(Array.isArray(c)){if(l in m.arrayKeywords)for(var n=0;n<c.length;n++)K(j,X,F,c[n],w+"/"+l+"/"+n,f,w,l,N,n)}else if(l in m.propsKeywords){if(c&&typeof c=="object")for(var s in c)K(j,X,F,c[s],w+"/"+l+"/"+O(s),f,w,l,N,s)}else(l in m.keywords||j.allKeys&&!(l in m.skipKeywords))&&K(j,X,F,c,w+"/"+l,f,w,l,N)}F(N,w,f,_,I,C,h)}}(S,typeof(M=S.cb||M)=="function"?M:M.pre||function(){},M.post||function(){},U,"",U)};function O(U){return U.replace(/~/g,"~0").replace(/\//g,"~1")}m.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},m.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},m.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},m.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(ae,m){var O={b:"\b",f:"\f",n:`
|
|
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},U="a".charCodeAt(),S=(m.parse=function(h,l,c){var n={},s=0,i=0,o=0,a=c&&c.bigint&&typeof BigInt!="undefined";return{data:e("",!0),pointers:n};function e(v,$){t(),x(v,"value");var y,L=p();switch(L){case"t":d("rue"),y=!0;break;case"f":d("alse"),y=!1;break;case"n":d("ull"),y=null;break;case'"':y=r();break;case"[":y=function(H){t();var G=[],Y=0;if(p()!="]")for(g();;){G.push(e(H+"/"+Y)),t();var Q=p();if(Q=="]")break;Q!=","&&V(),t(),Y++}return G}(v);break;case"{":y=function(H){t();var G={};if(p()!="}")for(g();;){var z=W(),Y=(p()!='"'&&V(),r()),Q=H+"/"+C(Y),z=(E(Q,"key",z),x(Q,"keyEnd"),t(),p()!=":"&&V(),t(),G[Y]=e(Q),t(),p());if(z=="}")break;z!=","&&V(),t()}return G}(v);break;default:g(),0<="-0123456789".indexOf(L)?y=function(){var H="",G=!0;h[o]=="-"&&(H+=p()),H+=(h[o]=="0"?p:A)(),h[o]=="."&&(H+=p()+A(),G=!1),h[o]!="e"&&h[o]!="E"||(H+=p(),h[o]!="+"&&h[o]!="-"||(H+=p()),H+=A(),G=!1);var Y=+H;return a&&G&&(Y>Number.MAX_SAFE_INTEGER||Y<Number.MIN_SAFE_INTEGER)?BigInt(H):Y}():B()}return x(v,"valueEnd"),t(),$&&o<h.length&&B(),y}function t(){e:for(;o<h.length;){switch(h[o]){case" ":i++;break;case" ":i+=4;break;case"\r":i=0;break;case`
|
|
`:i=0,s++;break;default:break e}o++}}function r(){for(var v,$="";(v=p())!='"';)v=="\\"?(v=p())in O?$+=O[v]:v=="u"?$+=function(){for(var y=4,L=0;y--;){L<<=4;var H=p().toLowerCase();"a"<=H&&H<="f"?L+=H.charCodeAt()-U+10:"0"<=H&&H<="9"?L+=+H:V()}return String.fromCharCode(L)}():V():$+=v;return $}function d(v){for(var $=0;$<v.length;$++)p()!==v[$]&&V()}function p(){u();var v=h[o];return o++,i++,v}function g(){o--,i--}function A(){for(var v="";"0"<=h[o]&&h[o]<="9";)v+=p();if(v.length)return v;u(),B()}function x(v,$){E(v,$,W())}function E(v,$,y){n[v]=n[v]||{},n[v][$]=y}function W(){return{line:s,column:i,pos:o}}function B(){throw new SyntaxError("Unexpected token "+h[o]+" in JSON at position "+o)}function V(){g(),B()}function u(){if(o>=h.length)throw new SyntaxError("Unexpected end of JSON input")}},m.stringify=function(h,l,c){if(M(h)){var n=0;switch(typeof(i=typeof c=="object"?c.space:c)){case"number":var s=10<i?10:i<0?0:Math.floor(i),i=s&&B(s," "),o=s,a=s;break;case"string":i=i.slice(0,10);for(var e=a=o=0;e<i.length;e++){switch(i[e]){case" ":a++;break;case" ":a+=4;break;case"\r":a=0;break;case`
|
|
`:a=0,n++;break;default:throw new Error("whitespace characters not allowed in JSON")}o++}break;default:i=void 0}var t="",r={},d=0,p=0,g=0,A=c&&c.es6&&typeof Map=="function";return function V(u,v,$){switch(W($,"value"),typeof u){case"number":case"bigint":case"boolean":x(""+u);break;case"string":x(f(u));break;case"object":u===null?x("null"):typeof u.toJSON=="function"?x(f(u.toJSON())):Array.isArray(u)?y():A?u.constructor.BYTES_PER_ELEMENT?y():u instanceof Map?H():u instanceof Set?H(!0):L():L()}W($,"valueEnd");function y(){if(u.length){x("[");for(var G=v+1,Y=0;Y<u.length;Y++){Y&&x(","),E(G);var Q=M(u[Y])?u[Y]:null,z=$+"/"+Y;V(Q,G,z)}E(v),x("]")}else x("[]")}function L(){var G=Object.keys(u);if(G.length){x("{");for(var Y=v+1,Q=0;Q<G.length;Q++){var z,ee=G[Q],T=u[ee];M(T)&&(Q&&x(","),z=$+"/"+C(ee),E(Y),W(z,"key"),x(f(ee)),W(z,"keyEnd"),x(":"),i&&x(" "),V(T,Y,z))}E(v),x("}")}else x("{}")}function H(G){if(u.size){x("{");for(var Y=v+1,Q=!0,z=u.entries(),ee=z.next();!ee.done;){var T,Z=ee.value,P=Z[0],Z=!!G||Z[1];M(Z)&&(Q||x(","),Q=!1,T=$+"/"+C(P),E(Y),W(T,"key"),x(f(P)),W(T,"keyEnd"),x(":"),i&&x(" "),V(Z,Y,T)),ee=z.next()}E(v),x("}")}else x("{}")}}(h,0,""),{json:t,pointers:r}}function x(V){p+=V.length,g+=V.length,t+=V}function E(V){if(i){for(t+=`
|
|
`+B(V,i),d++,p=0;V--;)n?(d+=n,p=a):p+=a,g+=o;g+=1}}function W(V,u){r[V]=r[V]||{},r[V][u]={line:d,column:p,pos:g}}function B(V,u){return Array(V+1).join(u)}},["number","bigint","boolean","string","object"]);function M(h){return 0<=S.indexOf(typeof h)}var K=/"|\\/g,j=/[\b]/g,X=/\f/g,F=/\n/g,N=/\r/g,w=/\t/g;function f(h){return'"'+(h=h.replace(K,"\\$&").replace(X,"\\f").replace(j,"\\b").replace(F,"\\n").replace(N,"\\r").replace(w,"\\t"))+'"'}var _=/~/g,I=/\//g;function C(h){return h.replace(_,"~0").replace(I,"~1")}},483:function(ae,m){var O,U;(function(){U=[],(U=typeof(O=function(){function S(c){return typeof Node=="object"?c instanceof Node:c&&typeof c=="object"&&typeof c.nodeType=="number"}function M(c){return typeof c=="string"}function K(){var c=[];return{watch:c.push.bind(c),trigger:function(n,s){for(var i=!0,o={detail:s,preventDefault:function(){i=!1}},a=0;a<c.length;a++)c[a](n,o);return i}}}function j(c){return window.getComputedStyle(c).display==="none"}function X(c){this.elem=c}function F(c,n){return X.make(c("parent")).clazz("pico-overlay").clazz(c("overlayClass","")).stylize({display:"none",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).stylize(c("overlayStyles",{opacity:.5,background:"#000"})).onClick(function(){c("overlayClose",!0)&&n()})}X.make=function(c,n){typeof c=="string"&&(c=document.querySelector(c));var s=document.createElement(n||"div");return(c||document.body).appendChild(s),new X(s)},X.prototype={child:function(c){return X.make(this.elem,c)},stylize:function(c){c=c||{},typeof c.opacity!="undefined"&&(c.filter="alpha(opacity="+c.opacity*100+")");for(var n in c)c.hasOwnProperty(n)&&(this.elem.style[n]=c[n]);return this},clazz:function(c){return this.elem.className+=" "+c,this},html:function(c){return S(c)?this.elem.appendChild(c):this.elem.innerHTML=c,this},onClick:function(c){return this.elem.addEventListener("click",c),this},destroy:function(){this.elem.parentNode.removeChild(this.elem)},hide:function(){this.elem.style.display="none"},show:function(){this.elem.style.display="block"},attr:function(c,n){return n!==void 0&&this.elem.setAttribute(c,n),this},anyAncestor:function(c){for(var n=this.elem;n;){if(c(new X(n)))return!0;n=n.parentNode}return!1},isVisible:function(){return!j(this.elem)}};var N=1;function w(c,n){var s=c("width","auto");typeof s=="number"&&(s=""+s+"px");var i=c("modalId","pico-"+N++),o=X.make(c("parent")).clazz("pico-content").clazz(c("modalClass","")).stylize({display:"none",position:"fixed",zIndex:10001,left:"50%",top:"38.1966%",maxHeight:"90%",boxSizing:"border-box",width:s,"-ms-transform":"translate(-50%,-38.1966%)","-moz-transform":"translate(-50%,-38.1966%)","-webkit-transform":"translate(-50%,-38.1966%)","-o-transform":"translate(-50%,-38.1966%)",transform:"translate(-50%,-38.1966%)"}).stylize(c("modalStyles",{overflow:"auto",backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(c("content")).attr("id",i).attr("role","dialog").attr("aria-labelledby",c("ariaLabelledBy")).attr("aria-describedby",c("ariaDescribedBy",i)).onClick(function(a){var e=new X(a.target).anyAncestor(function(t){return/\bpico-close\b/.test(t.elem.className)});e&&n()});return o}function f(c,n){if(n("closeButton",!0))return c.child("button").html(n("closeHtml","×")).clazz("pico-close").clazz(n("closeClass","")).stylize(n("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",n("close-label","Close"))}function _(c){return function(){return c().elem}}var I=K(),C=K();function h(c,n){function s(t,r){var d=t.msMatchesSelector||t.webkitMatchesSelector||t.matches;return d.call(t,r)}function i(t){return j(t)||s(t,":disabled")||t.hasAttribute("contenteditable")?!1:t.hasAttribute("tabindex")||s(t,"input,select,textarea,button,a[href],area[href],iframe")}function o(t){for(var r=t.getElementsByTagName("*"),d=0;d<r.length;d++)if(i(r[d]))return r[d]}function a(t){for(var r=t.getElementsByTagName("*"),d=r.length;d--;)if(i(r[d]))return r[d]}var e;c.beforeShow(function(){e=document.activeElement}),c.afterShow(function(){if(n()){var r=o(c.modalElem());r&&r.focus()}}),c.afterClose(function(){n()&&e&&e.focus(),e=null}),C.watch(function(r){if(n()&&c.isVisible()){var d=o(c.modalElem()),p=a(c.modalElem()),g=r.shiftKey?d:p;g===document.activeElement&&((r.shiftKey?p:d).focus(),r.preventDefault())}})}function l(c,n){var s,i=new X(document.body);c.beforeShow(function(){s=i.elem.style.overflow,n()&&i.stylize({overflow:"hidden"})}),c.afterClose(function(){i.stylize({overflow:s})})}return document.documentElement.addEventListener("keydown",function(n){var s=n.which||n.keyCode;s===27?I.trigger():s===9&&C.trigger(n)}),function(n){(M(n)||S(n))&&(n={content:n});var s=K(),i=K(),o=K(),a=K(),e=K();function t(V,u){var v=n[V];return typeof v=="function"&&(v=v(u)),v===void 0?u:v}var r=B.bind(window,"modal"),d=B.bind(window,"overlay"),p=B.bind(window,"close"),g;function A(V){d().hide(),r().hide(),e.trigger(g,V)}function x(V){a.trigger(g,V)&&A(V)}function E(V){return function(){return V.apply(this,arguments),g}}var W;function B(V,u){if(!W){var v=w(t,x);W={modal:v,overlay:F(t,x),close:f(v,t)},s.trigger(g,u)}return W[V]}return g={modalElem:_(r),closeElem:_(p),overlayElem:_(d),buildDom:E(B.bind(null,null)),isVisible:function(){return!!(W&&r&&r().isVisible())},show:function(V){return i.trigger(g,V)&&(d().show(),p(),r().show(),o.trigger(g,V)),this},close:E(x),forceClose:E(A),destroy:function(){r().destroy(),d().destroy(),d=r=p=void 0},options:function(V){Object.keys(V).map(function(u){n[u]=V[u]})},afterCreate:E(s.watch),beforeShow:E(i.watch),afterShow:E(o.watch),beforeClose:E(a.watch),afterClose:E(e.watch)},h(g,t.bind(null,"focus",!0)),l(g,t.bind(null,"bodyOverflow",!0)),I.watch(function(){t("escCloses",!0)&&g.isVisible()&&g.close()}),g}})=="function"?O.apply(m,U):O)!==void 0&&(ae.exports=U)})()},7533:function(ae,m){/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(O){function U(){for(var ie=arguments.length,te=Array(ie),se=0;se<ie;se++)te[se]=arguments[se];if(te.length>1){te[0]=te[0].slice(0,-1);for(var ge=te.length-1,de=1;de<ge;++de)te[de]=te[de].slice(1,-1);return te[ge]=te[ge].slice(1),te.join("")}else return te[0]}function S(ie){return"(?:"+ie+")"}function M(ie){return ie===void 0?"undefined":ie===null?"null":Object.prototype.toString.call(ie).split(" ").pop().split("]").shift().toLowerCase()}function K(ie){return ie.toUpperCase()}function j(ie){return ie!=null?ie instanceof Array?ie:typeof ie.length!="number"||ie.split||ie.setInterval||ie.call?[ie]:Array.prototype.slice.call(ie):[]}function X(ie,te){var se=ie;if(te)for(var ge in te)se[ge]=te[ge];return se}function F(ie){var te="[A-Za-z]",se="[0-9]",ge=U(se,"[A-Fa-f]"),de=S(S("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+S("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+S("%"+ge+ge)),Ne="[\\:\\/\\?\\#\\[\\]\\@]",Be="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Ve=U(Ne,Be),Ye=ie?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",qe=ie?"[\\uE000-\\uF8FF]":"[]",Fe=U(te,se,"[\\-\\.\\_\\~]",Ye);S(te+U(te,se,"[\\+\\-\\.]")+"*"),S(S(de+"|"+U(Fe,Be,"[\\:]"))+"*");var Ke=S(S("25[0-5]")+"|"+S("2[0-4]"+se)+"|"+S("1"+se+se)+"|"+S("0?[1-9]"+se)+"|0?0?"+se),et=S(Ke+"\\."+Ke+"\\."+Ke+"\\."+Ke),He=S(ge+"{1,4}"),Je=S(S(He+"\\:"+He)+"|"+et),tt=S(S(He+"\\:")+"{6}"+Je),Ue=S("\\:\\:"+S(He+"\\:")+"{5}"+Je),Ct=S(S(He)+"?\\:\\:"+S(He+"\\:")+"{4}"+Je),ht=S(S(S(He+"\\:")+"{0,1}"+He)+"?\\:\\:"+S(He+"\\:")+"{3}"+Je),dt=S(S(S(He+"\\:")+"{0,2}"+He)+"?\\:\\:"+S(He+"\\:")+"{2}"+Je),At=S(S(S(He+"\\:")+"{0,3}"+He)+"?\\:\\:"+He+"\\:"+Je),vt=S(S(S(He+"\\:")+"{0,4}"+He)+"?\\:\\:"+Je),at=S(S(S(He+"\\:")+"{0,5}"+He)+"?\\:\\:"+He),ut=S(S(S(He+"\\:")+"{0,6}"+He)+"?\\:\\:"),It=S([tt,Ue,Ct,ht,dt,At,vt,at,ut].join("|")),mt=S(S(Fe+"|"+de)+"+");S("[vV]"+ge+"+\\."+U(Fe,Be,"[\\:]")+"+"),S(S(de+"|"+U(Fe,Be))+"*");var xt=S(de+"|"+U(Fe,Be,"[\\:\\@]"));return S(S(de+"|"+U(Fe,Be,"[\\@]"))+"+"),S(S(xt+"|"+U("[\\/\\?]",qe))+"*"),{NOT_SCHEME:new RegExp(U("[^]",te,se,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(U("[^\\%\\:]",Fe,Be),"g"),NOT_HOST:new RegExp(U("[^\\%\\[\\]\\:]",Fe,Be),"g"),NOT_PATH:new RegExp(U("[^\\%\\/\\:\\@]",Fe,Be),"g"),NOT_PATH_NOSCHEME:new RegExp(U("[^\\%\\/\\@]",Fe,Be),"g"),NOT_QUERY:new RegExp(U("[^\\%]",Fe,Be,"[\\:\\@\\/\\?]",qe),"g"),NOT_FRAGMENT:new RegExp(U("[^\\%]",Fe,Be,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(U("[^]",Fe,Be),"g"),UNRESERVED:new RegExp(Fe,"g"),OTHER_CHARS:new RegExp(U("[^\\%]",Fe,Ve),"g"),PCT_ENCODED:new RegExp(de,"g"),IPV4ADDRESS:new RegExp("^("+et+")$"),IPV6ADDRESS:new RegExp("^\\[?("+It+")"+S(S("\\%25|\\%(?!"+ge+"{2})")+"("+mt+")")+"?\\]?$")}}var N=F(!1),w=F(!0),f=function(){function ie(te,se){var ge=[],de=!0,Ne=!1,Be=void 0;try{for(var Ve=te[Symbol.iterator](),Ye;!(de=(Ye=Ve.next()).done)&&(ge.push(Ye.value),!(se&&ge.length===se));de=!0);}catch(qe){Ne=!0,Be=qe}finally{try{!de&&Ve.return&&Ve.return()}finally{if(Ne)throw Be}}return ge}return function(te,se){if(Array.isArray(te))return te;if(Symbol.iterator in Object(te))return ie(te,se);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(ie){if(Array.isArray(ie)){for(var te=0,se=Array(ie.length);te<ie.length;te++)se[te]=ie[te];return se}else return Array.from(ie)},I=2147483647,C=36,h=1,l=26,c=38,n=700,s=72,i=128,o="-",a=/^xn--/,e=/[^\0-\x7E]/,t=/[\x2E\u3002\uFF0E\uFF61]/g,r={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=C-h,p=Math.floor,g=String.fromCharCode;function A(ie){throw new RangeError(r[ie])}function x(ie,te){for(var se=[],ge=ie.length;ge--;)se[ge]=te(ie[ge]);return se}function E(ie,te){var se=ie.split("@"),ge="";se.length>1&&(ge=se[0]+"@",ie=se[1]),ie=ie.replace(t,".");var de=ie.split("."),Ne=x(de,te).join(".");return ge+Ne}function W(ie){for(var te=[],se=0,ge=ie.length;se<ge;){var de=ie.charCodeAt(se++);if(de>=55296&&de<=56319&&se<ge){var Ne=ie.charCodeAt(se++);(Ne&64512)==56320?te.push(((de&1023)<<10)+(Ne&1023)+65536):(te.push(de),se--)}else te.push(de)}return te}var B=function(te){return te-48<10?te-22:te-65<26?te-65:te-97<26?te-97:C},V=function(te,se){return te+22+75*(te<26)-((se!=0)<<5)},u=function(te,se,ge){var de=0;for(te=ge?p(te/n):te>>1,te+=p(te/se);te>d*l>>1;de+=C)te=p(te/d);return p(de+(d+1)*te/(te+c))},v=function(te){var se=[],ge=te.length,de=0,Ne=i,Be=s,Ve=te.lastIndexOf(o);Ve<0&&(Ve=0);for(var Ye=0;Ye<Ve;++Ye)te.charCodeAt(Ye)>=128&&A("not-basic"),se.push(te.charCodeAt(Ye));for(var qe=Ve>0?Ve+1:0;qe<ge;){for(var Fe=de,Ke=1,et=C;;et+=C){qe>=ge&&A("invalid-input");var He=B(te.charCodeAt(qe++));(He>=C||He>p((I-de)/Ke))&&A("overflow"),de+=He*Ke;var Je=et<=Be?h:et>=Be+l?l:et-Be;if(He<Je)break;var tt=C-Je;Ke>p(I/tt)&&A("overflow"),Ke*=tt}var Ue=se.length+1;Be=u(de-Fe,Ue,Fe==0),p(de/Ue)>I-Ne&&A("overflow"),Ne+=p(de/Ue),de%=Ue,se.splice(de++,0,Ne)}return String.fromCodePoint.apply(String,se)},$=function(te){var se=[];te=W(te);var ge=te.length,de=i,Ne=0,Be=s,Ve=!0,Ye=!1,qe=void 0;try{for(var Fe=te[Symbol.iterator](),Ke;!(Ve=(Ke=Fe.next()).done);Ve=!0){var et=Ke.value;et<128&&se.push(g(et))}}catch(St){Ye=!0,qe=St}finally{try{!Ve&&Fe.return&&Fe.return()}finally{if(Ye)throw qe}}var He=se.length,Je=He;for(He&&se.push(o);Je<ge;){var tt=I,Ue=!0,Ct=!1,ht=void 0;try{for(var dt=te[Symbol.iterator](),At;!(Ue=(At=dt.next()).done);Ue=!0){var vt=At.value;vt>=de&&vt<tt&&(tt=vt)}}catch(St){Ct=!0,ht=St}finally{try{!Ue&&dt.return&&dt.return()}finally{if(Ct)throw ht}}var at=Je+1;tt-de>p((I-Ne)/at)&&A("overflow"),Ne+=(tt-de)*at,de=tt;var ut=!0,It=!1,mt=void 0;try{for(var xt=te[Symbol.iterator](),Nt;!(ut=(Nt=xt.next()).done);ut=!0){var Bt=Nt.value;if(Bt<de&&++Ne>I&&A("overflow"),Bt==de){for(var Et=Ne,_t=C;;_t+=C){var Tt=_t<=Be?h:_t>=Be+l?l:_t-Be;if(Et<Tt)break;var Wt=Et-Tt,Mt=C-Tt;se.push(g(V(Tt+Wt%Mt,0))),Et=p(Wt/Mt)}se.push(g(V(Et,0))),Be=u(Ne,at,Je==He),Ne=0,++Je}}}catch(St){It=!0,mt=St}finally{try{!ut&&xt.return&&xt.return()}finally{if(It)throw mt}}++Ne,++de}return se.join("")},y={version:"2.1.0",ucs2:{decode:W,encode:function(te){return String.fromCodePoint.apply(String,_(te))}},decode:v,encode:$,toASCII:function(te){return E(te,function(se){return e.test(se)?"xn--"+$(se):se})},toUnicode:function(te){return E(te,function(se){return a.test(se)?v(se.slice(4).toLowerCase()):se})}},L={};function H(ie){var te=ie.charCodeAt(0),se=void 0;return te<16?se="%0"+te.toString(16).toUpperCase():te<128?se="%"+te.toString(16).toUpperCase():te<2048?se="%"+(te>>6|192).toString(16).toUpperCase()+"%"+(te&63|128).toString(16).toUpperCase():se="%"+(te>>12|224).toString(16).toUpperCase()+"%"+(te>>6&63|128).toString(16).toUpperCase()+"%"+(te&63|128).toString(16).toUpperCase(),se}function G(ie){for(var te="",se=0,ge=ie.length;se<ge;){var de=parseInt(ie.substr(se+1,2),16);if(de<128)te+=String.fromCharCode(de),se+=3;else if(de>=194&&de<224){if(ge-se>=6){var Ne=parseInt(ie.substr(se+4,2),16);te+=String.fromCharCode((de&31)<<6|Ne&63)}else te+=ie.substr(se,6);se+=6}else if(de>=224){if(ge-se>=9){var Be=parseInt(ie.substr(se+4,2),16),Ve=parseInt(ie.substr(se+7,2),16);te+=String.fromCharCode((de&15)<<12|(Be&63)<<6|Ve&63)}else te+=ie.substr(se,9);se+=9}else te+=ie.substr(se,3),se+=3}return te}function Y(ie,te){function se(ge){var de=G(ge);return de.match(te.UNRESERVED)?de:ge}return ie.scheme&&(ie.scheme=String(ie.scheme).replace(te.PCT_ENCODED,se).toLowerCase().replace(te.NOT_SCHEME,"")),ie.userinfo!==void 0&&(ie.userinfo=String(ie.userinfo).replace(te.PCT_ENCODED,se).replace(te.NOT_USERINFO,H).replace(te.PCT_ENCODED,K)),ie.host!==void 0&&(ie.host=String(ie.host).replace(te.PCT_ENCODED,se).toLowerCase().replace(te.NOT_HOST,H).replace(te.PCT_ENCODED,K)),ie.path!==void 0&&(ie.path=String(ie.path).replace(te.PCT_ENCODED,se).replace(ie.scheme?te.NOT_PATH:te.NOT_PATH_NOSCHEME,H).replace(te.PCT_ENCODED,K)),ie.query!==void 0&&(ie.query=String(ie.query).replace(te.PCT_ENCODED,se).replace(te.NOT_QUERY,H).replace(te.PCT_ENCODED,K)),ie.fragment!==void 0&&(ie.fragment=String(ie.fragment).replace(te.PCT_ENCODED,se).replace(te.NOT_FRAGMENT,H).replace(te.PCT_ENCODED,K)),ie}function Q(ie){return ie.replace(/^0*(.*)/,"$1")||"0"}function z(ie,te){var se=ie.match(te.IPV4ADDRESS)||[],ge=f(se,2),de=ge[1];return de?de.split(".").map(Q).join("."):ie}function ee(ie,te){var se=ie.match(te.IPV6ADDRESS)||[],ge=f(se,3),de=ge[1],Ne=ge[2];if(de){for(var Be=de.toLowerCase().split("::").reverse(),Ve=f(Be,2),Ye=Ve[0],qe=Ve[1],Fe=qe?qe.split(":").map(Q):[],Ke=Ye.split(":").map(Q),et=te.IPV4ADDRESS.test(Ke[Ke.length-1]),He=et?7:8,Je=Ke.length-He,tt=Array(He),Ue=0;Ue<He;++Ue)tt[Ue]=Fe[Ue]||Ke[Je+Ue]||"";et&&(tt[He-1]=z(tt[He-1],te));var Ct=tt.reduce(function(at,ut,It){if(!ut||ut==="0"){var mt=at[at.length-1];mt&&mt.index+mt.length===It?mt.length++:at.push({index:It,length:1})}return at},[]),ht=Ct.sort(function(at,ut){return ut.length-at.length})[0],dt=void 0;if(ht&&ht.length>1){var At=tt.slice(0,ht.index),vt=tt.slice(ht.index+ht.length);dt=At.join(":")+"::"+vt.join(":")}else dt=tt.join(":");return Ne&&(dt+="%"+Ne),dt}else return ie}var T=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,P="".match(/(){0}/)[1]===void 0;function Z(ie){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se={},ge=te.iri!==!1?w:N;te.reference==="suffix"&&(ie=(te.scheme?te.scheme+":":"")+"//"+ie);var de=ie.match(T);if(de){P?(se.scheme=de[1],se.userinfo=de[3],se.host=de[4],se.port=parseInt(de[5],10),se.path=de[6]||"",se.query=de[7],se.fragment=de[8],isNaN(se.port)&&(se.port=de[5])):(se.scheme=de[1]||void 0,se.userinfo=ie.indexOf("@")!==-1?de[3]:void 0,se.host=ie.indexOf("//")!==-1?de[4]:void 0,se.port=parseInt(de[5],10),se.path=de[6]||"",se.query=ie.indexOf("?")!==-1?de[7]:void 0,se.fragment=ie.indexOf("#")!==-1?de[8]:void 0,isNaN(se.port)&&(se.port=ie.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?de[4]:void 0)),se.host&&(se.host=ee(z(se.host,ge),ge)),se.scheme===void 0&&se.userinfo===void 0&&se.host===void 0&&se.port===void 0&&!se.path&&se.query===void 0?se.reference="same-document":se.scheme===void 0?se.reference="relative":se.fragment===void 0?se.reference="absolute":se.reference="uri",te.reference&&te.reference!=="suffix"&&te.reference!==se.reference&&(se.error=se.error||"URI is not a "+te.reference+" reference.");var Ne=L[(te.scheme||se.scheme||"").toLowerCase()];if(!te.unicodeSupport&&(!Ne||!Ne.unicodeSupport)){if(se.host&&(te.domainHost||Ne&&Ne.domainHost))try{se.host=y.toASCII(se.host.replace(ge.PCT_ENCODED,G).toLowerCase())}catch(Be){se.error=se.error||"Host's domain name can not be converted to ASCII via punycode: "+Be}Y(se,N)}else Y(se,ge);Ne&&Ne.parse&&Ne.parse(se,te)}else se.error=se.error||"URI can not be parsed.";return se}function b(ie,te){var se=te.iri!==!1?w:N,ge=[];return ie.userinfo!==void 0&&(ge.push(ie.userinfo),ge.push("@")),ie.host!==void 0&&ge.push(ee(z(String(ie.host),se),se).replace(se.IPV6ADDRESS,function(de,Ne,Be){return"["+Ne+(Be?"%25"+Be:"")+"]"})),(typeof ie.port=="number"||typeof ie.port=="string")&&(ge.push(":"),ge.push(String(ie.port))),ge.length?ge.join(""):void 0}var k=/^\.\.?\//,R=/^\/\.(\/|$)/,D=/^\/\.\.(\/|$)/,J=/^\/?(?:.|\n)*?(?=\/|$)/;function ne(ie){for(var te=[];ie.length;)if(ie.match(k))ie=ie.replace(k,"");else if(ie.match(R))ie=ie.replace(R,"/");else if(ie.match(D))ie=ie.replace(D,"/"),te.pop();else if(ie==="."||ie==="..")ie="";else{var se=ie.match(J);if(se){var ge=se[0];ie=ie.slice(ge.length),te.push(ge)}else throw new Error("Unexpected dot segment condition")}return te.join("")}function me(ie){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=te.iri?w:N,ge=[],de=L[(te.scheme||ie.scheme||"").toLowerCase()];if(de&&de.serialize&&de.serialize(ie,te),ie.host&&!se.IPV6ADDRESS.test(ie.host)){if(te.domainHost||de&&de.domainHost)try{ie.host=te.iri?y.toUnicode(ie.host):y.toASCII(ie.host.replace(se.PCT_ENCODED,G).toLowerCase())}catch(Ve){ie.error=ie.error||"Host's domain name can not be converted to "+(te.iri?"Unicode":"ASCII")+" via punycode: "+Ve}}Y(ie,se),te.reference!=="suffix"&&ie.scheme&&(ge.push(ie.scheme),ge.push(":"));var Ne=b(ie,te);if(Ne!==void 0&&(te.reference!=="suffix"&&ge.push("//"),ge.push(Ne),ie.path&&ie.path.charAt(0)!=="/"&&ge.push("/")),ie.path!==void 0){var Be=ie.path;!te.absolutePath&&(!de||!de.absolutePath)&&(Be=ne(Be)),Ne===void 0&&(Be=Be.replace(/^\/\//,"/%2F")),ge.push(Be)}return ie.query!==void 0&&(ge.push("?"),ge.push(ie.query)),ie.fragment!==void 0&&(ge.push("#"),ge.push(ie.fragment)),ge.join("")}function Ce(ie,te){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ge=arguments[3],de={};return ge||(ie=Z(me(ie,se),se),te=Z(me(te,se),se)),se=se||{},!se.tolerant&&te.scheme?(de.scheme=te.scheme,de.userinfo=te.userinfo,de.host=te.host,de.port=te.port,de.path=ne(te.path||""),de.query=te.query):(te.userinfo!==void 0||te.host!==void 0||te.port!==void 0?(de.userinfo=te.userinfo,de.host=te.host,de.port=te.port,de.path=ne(te.path||""),de.query=te.query):(te.path?(te.path.charAt(0)==="/"?de.path=ne(te.path):((ie.userinfo!==void 0||ie.host!==void 0||ie.port!==void 0)&&!ie.path?de.path="/"+te.path:ie.path?de.path=ie.path.slice(0,ie.path.lastIndexOf("/")+1)+te.path:de.path=te.path,de.path=ne(de.path)),de.query=te.query):(de.path=ie.path,te.query!==void 0?de.query=te.query:de.query=ie.query),de.userinfo=ie.userinfo,de.host=ie.host,de.port=ie.port),de.scheme=ie.scheme),de.fragment=te.fragment,de}function Ie(ie,te,se){var ge=X({scheme:"null"},se);return me(Ce(Z(ie,ge),Z(te,ge),ge,!0),ge)}function ke(ie,te){return typeof ie=="string"?ie=me(Z(ie,te),te):M(ie)==="object"&&(ie=Z(me(ie,te),te)),ie}function Se(ie,te,se){return typeof ie=="string"?ie=me(Z(ie,se),se):M(ie)==="object"&&(ie=me(ie,se)),typeof te=="string"?te=me(Z(te,se),se):M(te)==="object"&&(te=me(te,se)),ie===te}function Te(ie,te){return ie&&ie.toString().replace(!te||!te.iri?N.ESCAPE:w.ESCAPE,H)}function Re(ie,te){return ie&&ie.toString().replace(!te||!te.iri?N.PCT_ENCODED:w.PCT_ENCODED,G)}var Le={scheme:"http",domainHost:!0,parse:function(te,se){return te.host||(te.error=te.error||"HTTP URIs must have a host."),te},serialize:function(te,se){var ge=String(te.scheme).toLowerCase()==="https";return(te.port===(ge?443:80)||te.port==="")&&(te.port=void 0),te.path||(te.path="/"),te}},le={scheme:"https",domainHost:Le.domainHost,parse:Le.parse,serialize:Le.serialize};function oe(ie){return typeof ie.secure=="boolean"?ie.secure:String(ie.scheme).toLowerCase()==="wss"}var pe={scheme:"ws",domainHost:!0,parse:function(te,se){var ge=te;return ge.secure=oe(ge),ge.resourceName=(ge.path||"/")+(ge.query?"?"+ge.query:""),ge.path=void 0,ge.query=void 0,ge},serialize:function(te,se){if((te.port===(oe(te)?443:80)||te.port==="")&&(te.port=void 0),typeof te.secure=="boolean"&&(te.scheme=te.secure?"wss":"ws",te.secure=void 0),te.resourceName){var ge=te.resourceName.split("?"),de=f(ge,2),Ne=de[0],Be=de[1];te.path=Ne&&Ne!=="/"?Ne:void 0,te.query=Be,te.resourceName=void 0}return te.fragment=void 0,te}},Me={scheme:"wss",domainHost:pe.domainHost,parse:pe.parse,serialize:pe.serialize},Pe={},he="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ue="[0-9A-Fa-f]",ye=S(S("%[EFef]"+ue+"%"+ue+ue+"%"+ue+ue)+"|"+S("%[89A-Fa-f]"+ue+"%"+ue+ue)+"|"+S("%"+ue+ue)),ve="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=U("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Ee="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ge=new RegExp(he,"g"),q=new RegExp(ye,"g"),re=new RegExp(U("[^]",ve,"[\\.]",'[\\"]',be),"g"),ce=new RegExp(U("[^]",he,Ee),"g"),fe=ce;function Ae(ie){var te=G(ie);return te.match(Ge)?te:ie}var we={scheme:"mailto",parse:function(te,se){var ge=te,de=ge.to=ge.path?ge.path.split(","):[];if(ge.path=void 0,ge.query){for(var Ne=!1,Be={},Ve=ge.query.split("&"),Ye=0,qe=Ve.length;Ye<qe;++Ye){var Fe=Ve[Ye].split("=");switch(Fe[0]){case"to":for(var Ke=Fe[1].split(","),et=0,He=Ke.length;et<He;++et)de.push(Ke[et]);break;case"subject":ge.subject=Re(Fe[1],se);break;case"body":ge.body=Re(Fe[1],se);break;default:Ne=!0,Be[Re(Fe[0],se)]=Re(Fe[1],se);break}}Ne&&(ge.headers=Be)}ge.query=void 0;for(var Je=0,tt=de.length;Je<tt;++Je){var Ue=de[Je].split("@");if(Ue[0]=Re(Ue[0]),se.unicodeSupport)Ue[1]=Re(Ue[1],se).toLowerCase();else try{Ue[1]=y.toASCII(Re(Ue[1],se).toLowerCase())}catch(Ct){ge.error=ge.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ct}de[Je]=Ue.join("@")}return ge},serialize:function(te,se){var ge=te,de=j(te.to);if(de){for(var Ne=0,Be=de.length;Ne<Be;++Ne){var Ve=String(de[Ne]),Ye=Ve.lastIndexOf("@"),qe=Ve.slice(0,Ye).replace(q,Ae).replace(q,K).replace(re,H),Fe=Ve.slice(Ye+1);try{Fe=se.iri?y.toUnicode(Fe):y.toASCII(Re(Fe,se).toLowerCase())}catch(Je){ge.error=ge.error||"Email address's domain name can not be converted to "+(se.iri?"Unicode":"ASCII")+" via punycode: "+Je}de[Ne]=qe+"@"+Fe}ge.path=de.join(",")}var Ke=te.headers=te.headers||{};te.subject&&(Ke.subject=te.subject),te.body&&(Ke.body=te.body);var et=[];for(var He in Ke)Ke[He]!==Pe[He]&&et.push(He.replace(q,Ae).replace(q,K).replace(ce,H)+"="+Ke[He].replace(q,Ae).replace(q,K).replace(fe,H));return et.length&&(ge.query=et.join("&")),ge}},We=/^([^\:]+)\:(.*)/,Xe={scheme:"urn",parse:function(te,se){var ge=te.path&&te.path.match(We),de=te;if(ge){var Ne=se.scheme||de.scheme||"urn",Be=ge[1].toLowerCase(),Ve=ge[2],Ye=Ne+":"+(se.nid||Be),qe=L[Ye];de.nid=Be,de.nss=Ve,de.path=void 0,qe&&(de=qe.parse(de,se))}else de.error=de.error||"URN can not be parsed.";return de},serialize:function(te,se){var ge=se.scheme||te.scheme||"urn",de=te.nid,Ne=ge+":"+(se.nid||de),Be=L[Ne];Be&&(te=Be.serialize(te,se));var Ve=te,Ye=te.nss;return Ve.path=(de||se.nid)+":"+Ye,Ve}},Oe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,nt={scheme:"urn:uuid",parse:function(te,se){var ge=te;return ge.uuid=ge.nss,ge.nss=void 0,!se.tolerant&&(!ge.uuid||!ge.uuid.match(Oe))&&(ge.error=ge.error||"UUID is not valid."),ge},serialize:function(te,se){var ge=te;return ge.nss=(te.uuid||"").toLowerCase(),ge}};L[Le.scheme]=Le,L[le.scheme]=le,L[pe.scheme]=pe,L[Me.scheme]=Me,L[we.scheme]=we,L[Xe.scheme]=Xe,L[nt.scheme]=nt,O.SCHEMES=L,O.pctEncChar=H,O.pctDecChars=G,O.parse=Z,O.removeDotSegments=ne,O.serialize=me,O.resolveComponents=Ce,O.resolve=Ie,O.normalize=ke,O.equal=Se,O.escapeComponent=Te,O.unescapeComponent=Re,Object.defineProperty(O,"__esModule",{value:!0})})(m)},4049:function(ae){ae.exports=function(){var m=function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")},O=function(){function s(i,o){for(var a=0;a<o.length;a++){var e=o[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(i,e.key,e)}}return function(i,o,a){return o&&s(i.prototype,o),a&&s(i,a),i}}(),U=function(){function s(i,o){var a=[],e=!0,t=!1,r=void 0;try{for(var d=i[Symbol.iterator](),p;!(e=(p=d.next()).done)&&(a.push(p.value),!(o&&a.length===o));e=!0);}catch(g){t=!0,r=g}finally{try{!e&&d.return&&d.return()}finally{if(t)throw r}}return a}return function(i,o){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return s(i,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=(String.prototype.startsWith=String.prototype.startsWith||function(s){return this.indexOf(s)===0},String.prototype.padStart=String.prototype.padStart||function(s,i){for(var o=this;o.length<s;)o=i+o;return o},{cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"});function M(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,o=i>0?s.toFixed(i).replace(/0+$/,"").replace(/\.$/,""):s.toString();return o||"0"}var K=function(){function s(i,o,a,e){m(this,s);var t=this;function r(p){if(p.startsWith("hsl")){var g=p.match(/([\-\d\.e]+)/g).map(Number),A=U(g,4),x=A[0],E=A[1],W=A[2],B=A[3];B===void 0&&(B=1),x/=360,E/=100,W/=100,t.hsla=[x,E,W,B]}else if(p.startsWith("rgb")){var V=p.match(/([\-\d\.e]+)/g).map(Number),u=U(V,4),v=u[0],$=u[1],y=u[2],L=u[3];L===void 0&&(L=1),t.rgba=[v,$,y,L]}else p.startsWith("#")?t.rgba=s.hexToRgb(p):t.rgba=s.nameToRgb(p)||s.hexToRgb(p)}if(i!==void 0)if(Array.isArray(i))this.rgba=i;else if(a===void 0){var d=i&&""+i;d&&r(d.toLowerCase())}else this.rgba=[i,o,a,e===void 0?1:e]}return O(s,[{key:"printRGB",value:function(o){var a=o?this.rgba:this.rgba.slice(0,3),e=a.map(function(t,r){return M(t,r===3?3:0)});return o?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(o){var a=[360,100,100,1],e=["","%","%",""],t=o?this.hsla:this.hsla.slice(0,3),r=t.map(function(d,p){return M(d*a[p],p===3?3:1)+e[p]});return o?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(o){var a=this.hex;return o?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=s.hslToRgb(this._hsla)},set:function(o){o.length===3&&(o[3]=1),this._rgba=o,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=s.rgbToHsl(this._rgba)},set:function(o){o.length===3&&(o[3]=1),this._hsla=o,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var o=this.rgba,a=o.map(function(e,t){return t<3?e.toString(16):Math.round(e*255).toString(16)});return"#"+a.map(function(e){return e.padStart(2,"0")}).join("")},set:function(o){this.rgba=s.hexToRgb(o)}}],[{key:"hexToRgb",value:function(o){var a=(o.startsWith("#")?o.slice(1):o).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; "+o);var e=a.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(t){return parseInt(t,16)});return e[3]=e[3]/255,e}},{key:"nameToRgb",value:function(o){var a=o.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),e=S[a];return e===void 0?e:s.hexToRgb(e.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(o){var a=U(o,4),e=a[0],t=a[1],r=a[2],d=a[3];e/=255,t/=255,r/=255;var p=Math.max(e,t,r),g=Math.min(e,t,r),A=void 0,x=void 0,E=(p+g)/2;if(p===g)A=x=0;else{var W=p-g;switch(x=E>.5?W/(2-p-g):W/(p+g),p){case e:A=(t-r)/W+(t<r?6:0);break;case t:A=(r-e)/W+2;break;case r:A=(e-t)/W+4;break}A/=6}return[A,x,E,d]}},{key:"hslToRgb",value:function(o){var a=U(o,4),e=a[0],t=a[1],r=a[2],d=a[3],p=void 0,g=void 0,A=void 0;if(t===0)p=g=A=r;else{var x=function(u,v,$){return $<0&&($+=1),$>1&&($-=1),$<.16666666666666666?u+(v-u)*6*$:$<.5?v:$<.6666666666666666?u+(v-u)*(.6666666666666666-$)*6:u},E=r<.5?r*(1+t):r+t-r*t,W=2*r-E;p=x(W,E,e+1/3),g=x(W,E,e),A=x(W,E,e-1/3)}var B=[p*255,g*255,A*255].map(Math.round);return B[3]=d,B}}]),s}(),j=function(){function s(){m(this,s),this._events=[]}return O(s,[{key:"add",value:function(o,a,e){o.addEventListener(a,e,!1),this._events.push({target:o,type:a,handler:e})}},{key:"remove",value:function(o,a,e){this._events=this._events.filter(function(t){var r=!0;return o&&o!==t.target&&(r=!1),a&&a!==t.type&&(r=!1),e&&e!==t.handler&&(r=!1),r&&s._doRemove(t.target,t.type,t.handler),!r})}},{key:"destroy",value:function(){this._events.forEach(function(o){return s._doRemove(o.target,o.type,o.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(o,a,e){o.removeEventListener(a,e,!1)}}]),s}();function X(s){var i=document.createElement("div");return i.innerHTML=s,i.firstElementChild}function F(s,i,o){var a=!1;function e(p,g,A){return Math.max(g,Math.min(p,A))}function t(p,g,A){if(A&&(a=!0),!!a){p.preventDefault();var x=i.getBoundingClientRect(),E=x.width,W=x.height,B=g.clientX,V=g.clientY,u=e(B-x.left,0,E),v=e(V-x.top,0,W);o(u/E,v/W)}}function r(p,g){var A=p.buttons===void 0?p.which:p.buttons;A===1?t(p,p,g):a=!1}function d(p,g){p.touches.length===1?t(p,p.touches[0],g):a=!1}s.add(i,"mousedown",function(p){r(p,!0)}),s.add(i,"touchstart",function(p){d(p,!0)}),s.add(window,"mousemove",r),s.add(i,"touchmove",d),s.add(window,"mouseup",function(p){a=!1}),s.add(i,"touchend",function(p){a=!1}),s.add(i,"touchcancel",function(p){a=!1})}var N=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
|
|
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,w=360,f="keydown",_="mousedown",I="focusin";function C(s,i){return(i||document).querySelector(s)}function h(s){s.preventDefault(),s.stopPropagation()}function l(s,i,o,a,e){s.add(i,f,function(t){o.indexOf(t.key)>=0&&(e&&h(t),a(t))})}var c=function(){function s(i){m(this,s),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new j,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(i)}return O(s,[{key:"setOptions",value:function(o){var a=this;if(!o)return;var e=this.settings;function t(g,A,x){for(var E in g)x&&x.indexOf(E)>=0||(A[E]=g[E])}if(o instanceof HTMLElement)e.parent=o;else{e.parent&&o.parent&&e.parent!==o.parent&&(this._events.remove(e.parent),this._popupInited=!1),t(o,e),o.onChange&&(this.onChange=o.onChange),o.onDone&&(this.onDone=o.onDone),o.onOpen&&(this.onOpen=o.onOpen),o.onClose&&(this.onClose=o.onClose);var r=o.color||o.colour;r&&this._setColor(r)}var d=e.parent;if(d&&e.popup&&!this._popupInited){var p=function(A){return a.openHandler(A)};this._events.add(d,"click",p),l(this._events,d,[" ","Spacebar","Enter"],p),this._popupInited=!0}else o.parent&&!e.popup&&this.show()}},{key:"openHandler",value:function(o){if(this.show()){o&&o.preventDefault(),this.settings.parent.style.pointerEvents="none";var a=o&&o.type===f?this._domEdit:this.domElement;setTimeout(function(){return a.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(o){var a=o&&o.type,e=!1;if(!o)e=!0;else if(a===_||a===I){var t=(this.__containedEvent||0)+100;o.timeStamp>t&&(e=!0)}else h(o),e=!0;e&&this.hide()&&(this.settings.parent.style.pointerEvents="",a!==_&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(o,a){this.closeHandler(),this.setOptions(o),a&&this.openHandler()}},{key:"setColor",value:function(o,a){this._setColor(o,{silent:a})}},{key:"_setColor",value:function(o,a){if(typeof o=="string"&&(o=o.trim()),!!o){a=a||{};var e=void 0;try{e=new K(o)}catch(r){if(a.failSilently)return;throw r}if(!this.settings.alpha){var t=e.hsla;t[3]=1,e.hsla=t}this.colour=this.color=e,this._setHSLA(null,null,null,null,a)}}},{key:"setColour",value:function(o,a){this.setColor(o,a)}},{key:"show",value:function(){var o=this.settings.parent;if(!o)return!1;if(this.domElement){var a=this._toggleDOM(!0);return this._setPosition(),a}var e=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>',t=X(e);return this.domElement=t,this._domH=C(".picker_hue",t),this._domSL=C(".picker_sl",t),this._domA=C(".picker_alpha",t),this._domEdit=C(".picker_editor input",t),this._domSample=C(".picker_sample",t),this._domOkay=C(".picker_done button",t),this._domCancel=C(".picker_cancel button",t),t.classList.add("layout_"+this.settings.layout),this.settings.alpha||t.classList.add("no_alpha"),this.settings.editor||t.classList.add("no_editor"),this.settings.cancelButton||t.classList.add("no_cancel"),this._ifPopup(function(){return t.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 o=this,a=this,e=this.domElement,t=this._events;function r(g,A,x){t.add(g,A,x)}r(e,"click",function(g){return g.preventDefault()}),F(t,this._domH,function(g,A){return a._setHSLA(g)}),F(t,this._domSL,function(g,A){return a._setHSLA(null,g,1-A)}),this.settings.alpha&&F(t,this._domA,function(g,A){return a._setHSLA(null,null,null,1-A)});var d=this._domEdit;r(d,"input",function(g){a._setColor(this.value,{fromEditor:!0,failSilently:!0})}),r(d,"focus",function(g){var A=this;A.selectionStart===A.selectionEnd&&A.select()}),this._ifPopup(function(){var g=function(E){return o.closeHandler(E)};r(window,_,g),r(window,I,g),l(t,e,["Esc","Escape"],g);var A=function(E){o.__containedEvent=E.timeStamp};r(e,_,A),r(e,I,A),r(o._domCancel,"click",g)});var p=function(A){o._ifPopup(function(){return o.closeHandler(A)}),o.onDone&&o.onDone(o.colour)};r(this._domOkay,"click",p),l(t,e,["Enter"],p)}},{key:"_setPosition",value:function(){var o=this.settings.parent,a=this.domElement;o!==a.parentNode&&o.appendChild(a),this._ifPopup(function(e){getComputedStyle(o).position==="static"&&(o.style.position="relative");var t=e===!0?"popup_right":"popup_"+e;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(r){r===t?a.classList.add(r):a.classList.remove(r)}),a.classList.add(t)})}},{key:"_setHSLA",value:function(o,a,e,t,r){r=r||{};var d=this.colour,p=d.hsla;[o,a,e,t].forEach(function(g,A){(g||g===0)&&(p[A]=g)}),d.hsla=p,this._updateUI(r),this.onChange&&!r.silent&&this.onChange(d)}},{key:"_updateUI",value:function(o){if(!this.domElement)return;o=o||{};var a=this.colour,e=a.hsla,t="hsl("+e[0]*w+", 100%, 50%)",r=a.hslString,d=a.hslaString,p=this._domH,g=this._domSL,A=this._domA,x=C(".picker_selector",p),E=C(".picker_selector",g),W=C(".picker_selector",A);function B(G,Y,Q){Y.style.left=Q*100+"%"}function V(G,Y,Q){Y.style.top=Q*100+"%"}B(p,x,e[0]),this._domSL.style.backgroundColor=this._domH.style.color=t,B(g,E,e[1]),V(g,E,1-e[2]),g.style.color=r,V(A,W,1-e[3]);var u=r,v=u.replace("hsl","hsla").replace(")",", 0)"),$="linear-gradient("+[u,v]+")";if(this._domA.style.background=$+", "+N,!o.fromEditor){var y=this.settings.editorFormat,L=this.settings.alpha,H=void 0;switch(y){case"rgb":H=a.printRGB(L);break;case"hsl":H=a.printHSL(L);break;default:H=a.printHex(L)}this._domEdit.value=H}this._domSample.style.color=d}},{key:"_ifPopup",value:function(o,a){this.settings.parent&&this.settings.popup?o&&o(this.settings.popup):a&&a()}},{key:"_toggleDOM",value:function(o){var a=this.domElement;if(!a)return!1;var e=o?"":"none",t=a.style.display!==e;return t&&(a.style.display=e),t}}]),s}(),n=document.createElement("style");return n.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(n),c.StyleElement=n,c}()},1262:function(ae,m,O){O.d(m,{K:function(){return Le}});class U extends Error{constructor(oe,pe){super(oe+" at position "+pe),this.position=pe}}const S=92,M=47,K=42,j=123,X=125,F=91,N=93,w=40,f=41,_=32,I=10,C=9,h=13,l=8,c=12,n=34,s=43,i=45,o=39,a=48,e=49,t=57,r=44,d=46,p=58,g=59,A=65,x=97,E=69,W=101,B=70,V=102,u=160,v=8192,$=8202,y=8239,L=8287,H=12288,G=8220,Y=8221,Q=8216,z=8217,ee=96,T=180;function P(le){return le>=a&&le<=t||le>=A&&le<=B||le>=x&&le<=V}function Z(le){return le>=a&&le<=t}function b(le){return k.test(le)||le&&ne(le.charCodeAt(0))}const k=/^[,:[\]{}()\n]$/;function R(le){return D.test(le)||le&&ne(le.charCodeAt(0))}const D=/^[[{\w-]$/;function J(le){return le===_||le===I||le===C||le===h}function ne(le){return me(le)||Ie(le)}function me(le){return le===n||le===G||le===Y}function Ce(le){return le===n}function Ie(le){return le===o||le===Q||le===z||le===ee||le===T}function ke(le,oe,pe){return pe=2<arguments.length&&pe!==void 0&&pe,oe=le.lastIndexOf(oe),oe!==-1?le.substring(0,oe)+(pe?"":le.substring(oe+1)):le}function Se(le,oe){let pe=le.length;if(!J(le.charCodeAt(pe-1)))return le+oe;for(;J(le.charCodeAt(pe-1));)pe--;return le.substring(0,pe)+oe+le.substring(pe)}const Te={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Re={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
`,r:"\r",t:" "};function Le(le){let oe=0,pe="";if(!Pe())throw new U("Unexpected end of json string",le.length);var Me=ye(r);if(Me&&he(),R(le[oe])&&/[,\n][ \t\r]*$/.test(pe)){Me||(pe=Se(pe,","));{let fe=!0,Ae=!0;for(;Ae;)fe?fe=!1:ye(r)||(pe=Se(pe,",")),Ae=Pe();Ae||(pe=ke(pe,",")),pe=`[
|
|
`.concat(pe,`
|
|
]`)}}else Me&&(pe=ke(pe,","));if(oe>=le.length)return pe;throw new U("Unexpected character "+JSON.stringify(le[oe]),oe);function Pe(){he();var fe=function(){if(le.charCodeAt(oe)!==j)return!1;{pe+="{",oe++,he();let We=!0;for(;oe<le.length&&le.charCodeAt(oe)!==X;){if(We?We=!1:(ye(r)||(pe=Se(pe,",")),he()),!(be()||Ge())){le.charCodeAt(oe)===X||le.charCodeAt(oe)===j||le.charCodeAt(oe)===N||le.charCodeAt(oe)===F||le[oe]===void 0?pe=ke(pe,","):function(){throw new U("Object key expected",oe)}();break}he();var Ae=ye(p),we=(Ae||(R(le[oe])?pe=Se(pe,":"):ce()),Pe());we||(Ae?pe+="null":ce())}return le.charCodeAt(oe)===X?(pe+="}",oe++):pe=Se(pe,"}"),!0}}()||function(){if(le.charCodeAt(oe)!==F)return!1;{pe+="[",oe++,he();let we=!0;for(;oe<le.length&&le.charCodeAt(oe)!==N;){we?we=!1:ye(r)||(pe=Se(pe,","));var Ae=Pe();if(!Ae){pe=ke(pe,",");break}}return le.charCodeAt(oe)===N?(pe+="]",oe++):pe=Se(pe,"]"),!0}}()||be()||function(){var Ae=oe;if(le.charCodeAt(oe)===i&&(oe++,re(Ae)))return!0;if(le.charCodeAt(oe)===a)(function(we){if(Z(le.charCodeAt(oe)))throw new U("Invalid number, unexpected leading zero",we)})(++oe-1);else if(function(we){return we>=e&&we<=t}(le.charCodeAt(oe)))for(oe++;Z(le.charCodeAt(oe));)oe++;if(le.charCodeAt(oe)===d){if(oe++,re(Ae))return!0;for(;Z(le.charCodeAt(oe));)oe++}if(le.charCodeAt(oe)===W||le.charCodeAt(oe)===E){if(oe++,le.charCodeAt(oe)!==i&&le.charCodeAt(oe)!==s||oe++,re(Ae))return!0;for(;Z(le.charCodeAt(oe));)oe++}return oe>Ae?(pe+=le.slice(Ae,oe),!0):!1}()||Ee("true","true")||Ee("false","false")||Ee("null","null")||Ee("True","true")||Ee("False","false")||Ee("None","null")||Ge();return he(),fe}function he(){for(ue();function(){if(le.charCodeAt(oe)===M&&le.charCodeAt(oe+1)===K){for(;oe<le.length&&!function(fe,Ae){return fe[Ae]==="*"&&fe[Ae+1]==="/"}(le,oe);)oe++;oe+=2}else{if(le.charCodeAt(oe)!==M||le.charCodeAt(oe+1)!==M)return!1;for(;oe<le.length&&le.charCodeAt(oe)!==I;)oe++}return!0}()&&ue(););}function ue(){let fe="";for(var Ae,we;(Ae=J(le.charCodeAt(oe)))||(we=le.charCodeAt(oe))===u||we>=v&&we<=$||we===y||we===L||we===H;)fe+=Ae?le[oe]:" ",oe++;return 0<fe.length&&(pe+=fe,!0)}function ye(fe){return le.charCodeAt(oe)===fe&&(pe+=le[oe],oe++,!0)}function ve(){return fe=S,le.charCodeAt(oe)===fe&&(oe++,!0);var fe}function be(){let fe=le.charCodeAt(oe)===S;if(fe&&(oe++,fe=!0),ne(le.charCodeAt(oe))){var Ae=Ie(le.charCodeAt(oe))?Ie:Ce(le.charCodeAt(oe))?Ce:me;for(pe+='"',oe++;oe<le.length&&!Ae(le.charCodeAt(oe))&&le.charCodeAt(oe)!==I;){if(le.charCodeAt(oe)===S){var we=le[oe+1];if(Re[we]!==void 0)pe+=le.slice(oe,oe+2),oe+=2;else if(we==="u"){if(!(P(le.charCodeAt(oe+2))&&P(le.charCodeAt(oe+3))&&P(le.charCodeAt(oe+4))&&P(le.charCodeAt(oe+5)))){We=void 0;var We=oe;let nt=We+2;for(;/\w/.test(le[nt]);)nt++;throw We=le.slice(We,nt),new U('Invalid unicode character "'.concat(We,'"'),oe)}pe+=le.slice(oe,oe+6),oe+=6}else pe+=we,oe+=2}else{if(We=le[oe],we=le.charCodeAt(oe),we===n&&le.charCodeAt(oe-1)!==S)pe+="\\"+We;else if((Oe=we)===I||Oe===h||Oe===C||Oe===l||Oe===c)pe+=Te[We];else{if(!(32<=(Oe=we)&&Oe<=1114111))throw Oe=void 0,Oe=We,new U("Invalid character "+JSON.stringify(Oe),oe);pe+=We}oe++}fe&&ve()}if(ne(le.charCodeAt(oe)))le.charCodeAt(oe),pe+='"',oe++;else{let nt=0;for(;0<oe&&(b(le[oe-1])||J(le.charCodeAt(oe-1)));)oe--,nt++;pe=pe.substring(0,pe.length-nt)+'"'}for(he();le.charCodeAt(oe)===s;){oe++,he();var Xe=(pe=ke(pe,'"',!0)).length;be(),pe=function(nt,ie,te){return nt.substring(0,ie)+nt.substring(ie+te)}(pe,Xe,1)}return!0}var Oe;return!1}function Ee(fe,Ae){return le.slice(oe,oe+fe.length)===fe&&(pe+=Ae,oe+=fe.length,!0)}function Ge(){for(var fe=oe;oe<le.length&&!b(le[oe]);)oe++;if(oe>fe){if(le.charCodeAt(oe)===w)oe++,Pe(),le.charCodeAt(oe)===f&&(oe++,le.charCodeAt(oe)===g)&&oe++;else{for(;J(le.charCodeAt(oe-1))&&0<oe;)oe--;fe=le.slice(fe,oe),pe+=fe==="undefined"?"null":JSON.stringify(fe),le.charCodeAt(oe)===n&&oe++}return!0}}function q(fe){if(!Z(le.charCodeAt(oe)))throw fe=le.slice(fe,oe),new U("Invalid number '".concat(fe,"', expecting a digit ").concat(le[oe]?"but got '".concat(le[oe],"'"):"but reached end of input"),oe)}function re(fe){if(oe>=le.length)return pe+=le.slice(fe,oe)+"0",1;q(fe)}function ce(){throw new U("Colon expected",oe)}}},894:function(ae){ae.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(ae){ae.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(ae){ae.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(ae){ae.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},lt={},De.amdD=function(){throw new Error("define cannot be used indirect")},De.n=function(ae){var m=ae&&ae.__esModule?function(){return ae.default}:function(){return ae};return De.d(m,{a:m}),m},De.d=function(ae,m){for(var O in m)De.o(m,O)&&!De.o(ae,O)&&Object.defineProperty(ae,O,{enumerable:!0,get:m[O]})},De.o=function(ae,m){return Object.prototype.hasOwnProperty.call(ae,m)},De.r=function(ae){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ae,"__esModule",{value:!0})},De.nmd=function(ae){return ae.paths=[],ae.children||(ae.children=[]),ae},De(3161);function De(ae){var m=lt[ae];return m!==void 0||(m=lt[ae]={id:ae,loaded:!1,exports:{}},st[ae].call(m.exports,m,m.exports,De),m.loaded=!0),m.exports}var st,lt})})(Ft);var dn=sn(Ft.exports);const un={editor:null,name:"json-editor-vue",internalChange:!1,props:{modelValue:Object,options:Object,currentMode:{type:String,default:"code"},modeList:{type:Array,default:()=>["tree","code","form","text","view"]},language:{type:String,default:"en"}},data(){return{json:this.modelValue,expandedModes:["tree","view","form"],isFullScreen:!1,hasLogo:!0,showFullScreen:!1}},watch:{modelValue:{immediate:!0,deep:!0,handler(ze){this.internalChange||(this.setEditorContent(ze),this.$nextTick(()=>{this.expandAll()}))}}},mounted(){this.init();const ze=document.querySelector(".jsoneditor-menu .jsoneditor-poweredBy");this.hasLogo=ze&&window.getComputedStyle(ze).display!=="none",this.showFullScreen=!0},unmounted(){var ze;(ze=this.editor)==null||ze.destroy(),this.editor=null},methods:{toggleFullScreen(){this.isFullScreen=!this.isFullScreen,this.$nextTick(()=>{const ze=new Event("resize");window.dispatchEvent(ze)})},init(){const{currentMode:ze,modeList:Qe,options:De}=this,st=()=>{const K=X=>{this.json=X,this.$emit("update:modelValue",X),this.$emit("change",X),this.internalChange=!0,this.$nextTick(()=>{this.internalChange=!1})};if(!this.editor.getText()){K({});return}try{const X=this.editor.get();K(X)}catch{}},lt=()=>{this.expandAll()},ae=(K,j,X)=>{this.$emit("textSelectionChange",this.editor,K,j,X)},m=(K,j)=>{this.$emit("selectionChange",this.editor,K,j)},O=(K,j,X)=>{this.$emit("colorPicker",this.editor,K,j,X)},U=({target:K})=>{this.$emit("focus",this.editor,K)},S=async({target:K})=>{this.$emit("blur",this.editor,K)},M={...De,indentation:2,language:this.language,mode:ze,modes:Qe,onChange:st,onModeChange:lt,onTextSelectionChange:ae,onSelectionChange:m,onColorPicker:O,onFocus:U,onBlur:S};this.editor=new dn(this.$refs.jsonEditorVue,M,this.json)},expandAll(){var ze,Qe;this.expandedModes.includes((ze=this.editor)==null?void 0:ze.getMode())&&((Qe=this.editor)==null||Qe.expandAll())},setEditorContent(ze){var Qe;(Qe=this.editor)==null||Qe.set(ze)}}},gn={ref:"jsonEditorVue",class:"json-editor-vue"};function pn(ze,Qe,De,st,lt,ae){return je(),rt("div",{class:Ht(["container",{"full-screen-container":lt.isFullScreen}])},[Ze("div",gn,null,512),Ze("div",{class:Ht(["full-screen",{show:lt.showFullScreen,right:!lt.hasLogo}]),onClick:Qe[0]||(Qe[0]=(...m)=>ae.toggleFullScreen&&ae.toggleFullScreen(...m))},null,2)],2)}var bt=Pt(un,[["render",pn],["__scopeId","data-v-d51cd76c"]]);bt.install=function(Qe){Qe.component(bt.name,bt)};typeof window!="undefined"&&window.Vue&&window.Vue.component(bt.name,bt);const yt=ze=>(on("data-v-70a74aad"),ze=ze(),rn(),ze),mn=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u540D\u79F0",-1)),fn=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u7C7B\u578B",-1)),Cn=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u5185\u5BB9",-1)),yn={key:1,class:"config_image_wrapper"},vn={class:"config_image_item_wrapper","m-1":""},In={key:0},bn={class:"config_image_cover_wrapper"},An=["src"],wn={class:"config_image_wrapper"},xn={class:"config_image_cover_wrapper"},Sn=["onClick"],kn=["onClick"],En=["src"],_n=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u5907\u6CE8",-1)),Tn=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u540D\u79F0",-1)),Rn=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u7C7B\u578B",-1)),$n=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u5185\u5BB9",-1)),Ln={key:1,class:"config_image_wrapper"},Nn={class:"config_image_item_wrapper","m-1":""},Bn={key:0},Wn={class:"config_image_cover_wrapper"},Mn=["src"],Hn={class:"config_image_wrapper"},Gn=["onClick"],Pn={class:"config_image_cover_wrapper"},Fn=["onClick"],Vn=["onClick"],Zn=["src"],On=yt(()=>Ze("div",{class:"form_tag_wrapper"},"\u5907\u6CE8",-1)),Vt={__name:"config",setup(ze){Zt(()=>{st()});const Qe=ft([]),De=ft([]),st=async()=>{const e=await Ot();kt(e,()=>{De.value=e.data.list})},lt=["","\u6587\u5B57","\u56FE\u7247","\u6587\u5B57\u6570\u7EC4","\u56FE\u7247\u6570\u7EC4","JSON"],ae=[{type:"selection",multiple:!1},{type:"expand",renderExpand:e=>{switch(e.type){case 1:return pt("div",{class:["config_text_wrapper"]},{default:()=>e.value});case 2:return pt("div",{class:["config_image_wrapper"]},[pt("div",{class:["config_image_item_wrapper"]},[pt("img",{src:wt(e.value_turn)},{default:()=>{}})])]);case 3:return pt("div",{},e.value_turn.map(t=>pt("div",{class:["config_text_wrapper"]},{default:()=>t})));case 4:return pt("div",{class:["config_image_wrapper"]},e.value_turn.map(t=>pt("div",{class:["config_image_item_wrapper","m-1"]},[pt("img",{src:wt(t)},{default:()=>{}})])));case 5:return pt(ct,{type:"textarea",disabled:!0,autosize:{minRows:8},value:JSON.stringify(e.value_turn,null,4)},{default:()=>e.value})}}},{title:"\u540D\u79F0",key:"label"},{title:"\u7C7B\u578B",key:"type",render(e){return lt[e.type]}},{title:"\u5907\u6CE8",key:"remark"}],m=["","","",[],[],{}],O=ft(!1),U={label:"",value:"",value_edit:"",value_push:"",type:1,remark:""},S=ft(JSON.parse(JSON.stringify(U))),M=async()=>{const e=await Dt({label:S.value.label,value:[3,4,5].indexOf(S.value.type)!==-1?JSON.stringify(S.value.value_edit):S.value.value_edit,type:S.value.type,remark:S.value.remark});kt(e,()=>{window.$message().success(e.message),O.value=!1,S.value=JSON.parse(JSON.stringify(U)),st()})},K=()=>{S.value=JSON.parse(JSON.stringify(U)),O.value=!0},j=e=>{O.value?(S.value.value_edit=JSON.parse(JSON.stringify(m[e])),S.value.value_push="",S.value.type=e):(l.value.value_edit=JSON.parse(JSON.stringify(m[e])),l.value.value_push="",l.value.type=e)},X=()=>{if(O.value){const e=JSON.parse(JSON.stringify(S.value.value_push));S.value.value_push="",S.value.value_edit.push(e)}else{const e=JSON.parse(JSON.stringify(l.value.value_push));l.value.value_push="",l.value.value_edit.push(e)}},F=e=>{O.value?S.value.value_edit.splice(e,1):l.value.value_edit.splice(e,1)},N=ft(null),w=e=>{N.value=e},f=ft(-2),_=async e=>{const t=e.target.files[0];N.value.value=null;const r=await Kt(t),d=await jt(r);kt(d,()=>{let p=d.data.url;O.value?f.value===-2?S.value.value_edit=p:f.value===-1?S.value.value_edit.push(p):S.value.value_edit[f.value]=p:f.value===-2?l.value.value_edit=p:f.value===-1?l.value.value_edit.push(p):l.value.value_edit[f.value]=p})},I=e=>{f.value=e,N.value.click()},C=ft(!1),h={id:0,label:"",value:"",value_edit:"",value_push:"",type:1,remark:""},l=ft(JSON.parse(JSON.stringify(h))),c=async()=>{const e=await zt({config_id:l.value.id,label:l.value.label,value:[3,4,5].indexOf(l.value.type)!==-1?JSON.stringify(l.value.value_edit):l.value.value_edit,type:l.value.type,remark:l.value.remark});kt(e,()=>{window.$message().success(e.message),C.value=!1,l.value=JSON.parse(JSON.stringify(h)),st()})},n=()=>{if(Qe.value.length!==1)return window.$message().error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u914D\u7F6E");l.value=JSON.parse(JSON.stringify(h));for(let e=0;e<De.value.length;e++)if(Qe.value[0]===De.value[e].id){l.value={id:De.value[e].id,label:De.value[e].label,value:De.value[e].value,value_edit:De.value[e].value_turn,value_push:"",type:De.value[e].type,remark:De.value[e].remark},C.value=!0;return}},s=e=>{O.value?e===-2?S.value.value_edit="":S.value.value_edit.splice(e,1):e===-2?l.value.value_edit="":l.value.value_edit.splice(e,1)},i=ft(!1),o=()=>{if(Qe.value.length!==1)return window.$message().error("\u8BF7\u9009\u62E9\u4E00\u4E2A\u914D\u7F6E");i.value=!0},a=async()=>{const e=await Xt(Qe.value[0]);kt(e,()=>{window.$message().success(e.message),i.value=!1,Qe.value=[],st()})};return(e,t)=>{const r=Yt,d=Jt,p=Ut,g=Qt,A=qt,x=en,E=tn,W=an,B=ln,V=hn,u=cn,v=nn;return je(),rt("div",null,[xe(x,{show:_e(i),"onUpdate:show":t[2]||(t[2]=$=>Rt(i)?i.value=$:null),preset:"card",style:{width:"400px"},title:"\u5220\u9664\u786E\u8BA4","auto-focus":!1,bordered:!1},{default:$e(()=>[Ze("div",null,[xe(p,{title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"alarm"})]),_:1})]),_:1}),xe(p,{"mt-2":"",title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"alarm"})]),_:1})]),_:1}),xe(p,{"mt-2":"",title:"\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u4E14\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"alarm"})]),_:1})]),_:1}),xe(A,{"mt-2":"",justify:"center"},{default:$e(()=>[xe(g,{onClick:t[0]||(t[0]=$=>a()),type:"info"},{default:$e(()=>[it("\u786E\u5B9A")]),_:1}),xe(g,{onClick:t[1]||(t[1]=$=>i.value=!1)},{default:$e(()=>[it("\u53D6\u6D88")]),_:1})]),_:1})])]),_:1},8,["show"]),xe(x,{show:_e(C),"onUpdate:show":t[14]||(t[14]=$=>Rt(C)?C.value=$:null),preset:"card",style:{width:"1000px"},title:"\u4FEE\u6539","auto-focus":!1,bordered:!1},{default:$e(()=>[Ze("div",null,[xe(A,{align:"center"},{default:$e(()=>[xe(E,null,{default:$e(()=>[mn]),_:1}),xe(_e(ct),{class:"form_input_wrapper",value:_e(l).label,"onUpdate:value":t[3]||(t[3]=$=>_e(l).label=$)},null,8,["value"])]),_:1}),xe(A,{"mt-2":"",align:"center"},{default:$e(()=>[xe(E,null,{default:$e(()=>[fn]),_:1}),xe(B,{value:_e(l).type,"onUpdate:value":[t[4]||(t[4]=$=>_e(l).type=$),j],name:"type_radio"},{default:$e(()=>[xe(A,null,{default:$e(()=>[xe(W,{value:1},{default:$e(()=>[it("\u6587\u5B57")]),_:1}),xe(W,{value:2},{default:$e(()=>[it("\u56FE\u7247")]),_:1}),xe(W,{value:3},{default:$e(()=>[it("\u6587\u5B57\u6570\u7EC4")]),_:1}),xe(W,{value:4},{default:$e(()=>[it("\u56FE\u7247\u6570\u7EC4")]),_:1}),xe(W,{value:5},{default:$e(()=>[it("JSON")]),_:1})]),_:1})]),_:1},8,["value"])]),_:1}),xe(A,{"mt-2":""},{default:$e(()=>[xe(E,{"mt-1":""},{default:$e(()=>[Cn]),_:1}),_e(l).type===1?(je(),gt(_e(ct),{key:0,class:"form_input_wrapper",value:_e(l).value_edit,"onUpdate:value":t[5]||(t[5]=$=>_e(l).value_edit=$)},null,8,["value"])):ot("",!0),_e(l).type===2?(je(),rt("div",yn,[Ze("div",vn,[_e(l).value_edit?ot("",!0):(je(),rt("span",In,"\u6682\u65E0\u56FE\u7247")),Ze("div",bn,[Ze("div",{class:"config_image_cover_upload_wrapper","cursor-pointer":"",onClick:t[6]||(t[6]=$=>I(-2))},[xe(r,{type:"upload-three"})]),_e(l).value_edit?(je(),rt("div",{key:0,"cursor-pointer":"",class:"config_image_cover_delete_wrapper",onClick:t[7]||(t[7]=$=>s(-2))},[xe(r,{type:"delete-one"})])):ot("",!0)]),_e(l).value_edit?(je(),rt("img",{key:1,src:_e(wt)(_e(l).value_edit),alt:""},null,8,An)):ot("",!0)])])):ot("",!0),_e(l).type===3?(je(),gt(V,{key:2,style:{"max-height":"500px"}},{default:$e(()=>[(je(!0),rt($t,null,Lt(_e(l).value_edit,($,y)=>(je(),gt(A,{"mb-2":"",key:y,align:"center"},{default:$e(()=>[xe(_e(ct),{class:"form_input_wrapper",value:_e(l).value_edit[y],"onUpdate:value":L=>_e(l).value_edit[y]=L},null,8,["value","onUpdate:value"]),xe(g,{onClick:L=>F(y),quaternary:"",circle:"",type:"error"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"minus"})]),_:1})]),_:2},1032,["onClick"])]),_:2},1024))),128)),xe(A,{align:"center"},{default:$e(()=>[xe(_e(ct),{class:"form_input_wrapper",value:_e(l).value_push,"onUpdate:value":t[8]||(t[8]=$=>_e(l).value_push=$)},null,8,["value"]),xe(g,{onClick:t[9]||(t[9]=$=>X()),quaternary:"",circle:"",type:"info"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"plus"})]),_:1})]),_:1})]),_:1})]),_:1})):ot("",!0),_e(l).type===4?(je(),gt(V,{key:3,style:{"max-height":"500px"}},{default:$e(()=>[Ze("div",wn,[(je(!0),rt($t,null,Lt(_e(l).value_edit,($,y)=>(je(),rt("div",{key:y,class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},[Ze("div",xn,[Ze("div",{class:"config_image_cover_upload_wrapper",onClick:L=>I(y)},[xe(r,{type:"upload-three"})],8,Sn),Ze("div",{class:"config_image_cover_delete_wrapper",onClick:L=>s(y)},[xe(r,{type:"delete-one"})],8,kn)]),Ze("img",{src:_e(wt)($),alt:""},null,8,En)]))),128)),Ze("div",{onClick:t[10]||(t[10]=$=>I(-1)),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},"\u4E0A\u4F20\u56FE\u7247")])]),_:1})):ot("",!0),_e(l).type===5?(je(),gt(_e(bt),{key:4,style:{width:"840px",height:"500px"},modelValue:_e(l).value_edit,"onUpdate:modelValue":t[11]||(t[11]=$=>_e(l).value_edit=$),language:"zh-CN",modeList:[]},null,8,["modelValue"])):ot("",!0)]),_:1}),xe(A,{"mt-2":"",align:"center"},{default:$e(()=>[xe(E,null,{default:$e(()=>[_n]),_:1}),xe(_e(ct),{class:"form_input_wrapper",value:_e(l).remark,"onUpdate:value":t[12]||(t[12]=$=>_e(l).remark=$)},null,8,["value"])]),_:1}),xe(A,{"mt-2":""},{default:$e(()=>[xe(g,{onClick:t[13]||(t[13]=$=>c()),type:"info"},{default:$e(()=>[it("\u786E\u5B9A")]),_:1})]),_:1})])]),_:1},8,["show"]),xe(x,{show:_e(O),"onUpdate:show":t[26]||(t[26]=$=>Rt(O)?O.value=$:null),preset:"card",style:{width:"1000px"},title:"\u65B0\u5EFA","auto-focus":!1,bordered:!1},{default:$e(()=>[Ze("div",null,[xe(A,{align:"center"},{default:$e(()=>[xe(E,null,{default:$e(()=>[Tn]),_:1}),xe(_e(ct),{class:"form_input_wrapper",value:_e(S).label,"onUpdate:value":t[15]||(t[15]=$=>_e(S).label=$)},null,8,["value"])]),_:1}),xe(A,{"mt-2":"",align:"center"},{default:$e(()=>[xe(E,null,{default:$e(()=>[Rn]),_:1}),xe(B,{value:_e(S).type,"onUpdate:value":[t[16]||(t[16]=$=>_e(S).type=$),j],name:"type_radio"},{default:$e(()=>[xe(A,null,{default:$e(()=>[xe(W,{value:1},{default:$e(()=>[it("\u6587\u5B57")]),_:1}),xe(W,{value:2},{default:$e(()=>[it("\u56FE\u7247")]),_:1}),xe(W,{value:3},{default:$e(()=>[it("\u6587\u5B57\u6570\u7EC4")]),_:1}),xe(W,{value:4},{default:$e(()=>[it("\u56FE\u7247\u6570\u7EC4")]),_:1}),xe(W,{value:5},{default:$e(()=>[it("JSON")]),_:1})]),_:1})]),_:1},8,["value"])]),_:1}),xe(A,{"mt-2":""},{default:$e(()=>[xe(E,{"mt-1":""},{default:$e(()=>[$n]),_:1}),_e(S).type===1?(je(),gt(_e(ct),{key:0,class:"form_input_wrapper",value:_e(S).value_edit,"onUpdate:value":t[17]||(t[17]=$=>_e(S).value_edit=$)},null,8,["value"])):ot("",!0),_e(S).type===2?(je(),rt("div",Ln,[Ze("div",Nn,[_e(S).value_edit?ot("",!0):(je(),rt("span",Bn,"\u6682\u65E0\u56FE\u7247")),Ze("div",Wn,[Ze("div",{class:"config_image_cover_upload_wrapper","cursor-pointer":"",onClick:t[18]||(t[18]=$=>I(-2))},[xe(r,{type:"upload-three"})]),_e(S).value_edit?(je(),rt("div",{key:0,"cursor-pointer":"",class:"config_image_cover_delete_wrapper",onClick:t[19]||(t[19]=$=>s(-2))},[xe(r,{type:"delete-one"})])):ot("",!0)]),_e(S).value_edit?(je(),rt("img",{key:1,src:_e(wt)(_e(S).value_edit),alt:""},null,8,Mn)):ot("",!0)])])):ot("",!0),_e(S).type===3?(je(),gt(V,{key:2,style:{"max-height":"500px"}},{default:$e(()=>[(je(!0),rt($t,null,Lt(_e(S).value_edit,($,y)=>(je(),gt(A,{"mb-2":"",key:y,align:"center"},{default:$e(()=>[xe(_e(ct),{class:"form_input_wrapper",value:_e(S).value_edit[y],"onUpdate:value":L=>_e(S).value_edit[y]=L},null,8,["value","onUpdate:value"]),xe(g,{onClick:L=>F(y),quaternary:"",circle:"",type:"error"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"minus"})]),_:1})]),_:2},1032,["onClick"])]),_:2},1024))),128)),xe(A,{align:"center"},{default:$e(()=>[xe(_e(ct),{class:"form_input_wrapper",value:_e(S).value_push,"onUpdate:value":t[20]||(t[20]=$=>_e(S).value_push=$)},null,8,["value"]),xe(g,{onClick:t[21]||(t[21]=$=>X()),quaternary:"",circle:"",type:"info"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"plus"})]),_:1})]),_:1})]),_:1})]),_:1})):ot("",!0),_e(S).type===4?(je(),gt(V,{key:3,style:{"max-height":"500px"}},{default:$e(()=>[Ze("div",Hn,[(je(!0),rt($t,null,Lt(_e(S).value_edit,($,y)=>(je(),rt("div",{key:y,onClick:L=>I(y),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},[Ze("div",Pn,[Ze("div",{class:"config_image_cover_upload_wrapper",onClick:L=>I(y)},[xe(r,{type:"upload-three"})],8,Fn),Ze("div",{class:"config_image_cover_delete_wrapper",onClick:L=>s(y)},[xe(r,{type:"delete-one"})],8,Vn)]),Ze("img",{src:_e(wt)($),alt:""},null,8,Zn)],8,Gn))),128)),Ze("div",{onClick:t[22]||(t[22]=$=>I(-1)),class:"config_image_item_wrapper","m-1":"","cursor-pointer":""},"\u4E0A\u4F20\u56FE\u7247")])]),_:1})):ot("",!0),_e(S).type===5?(je(),gt(_e(bt),{key:4,style:{width:"840px",height:"500px"},modelValue:_e(S).value_edit,"onUpdate:modelValue":t[23]||(t[23]=$=>_e(S).value_edit=$),language:"zh-CN",modeList:[]},null,8,["modelValue"])):ot("",!0)]),_:1}),xe(A,{"mt-2":"",align:"center"},{default:$e(()=>[xe(E,null,{default:$e(()=>[On]),_:1}),xe(_e(ct),{class:"form_input_wrapper",value:_e(S).remark,"onUpdate:value":t[24]||(t[24]=$=>_e(S).remark=$)},null,8,["value"])]),_:1}),xe(A,{"mt-2":""},{default:$e(()=>[xe(g,{onClick:t[25]||(t[25]=$=>M()),type:"info"},{default:$e(()=>[it("\u786E\u5B9A")]),_:1})]),_:1})])]),_:1},8,["show"]),Ze("input",{class:"upload_input_wrapper",accept:"image/*",onChange:_,type:"file",ref:w},null,32),xe(v,{title:"\u540E\u53F0\u914D\u7F6E"},{default:$e(()=>[Ze("div",null,[xe(A,null,{default:$e(()=>[xe(g,{onClick:t[27]||(t[27]=$=>K()),type:"success"},{default:$e(()=>[it("\u65B0\u5EFA")]),_:1}),xe(g,{onClick:t[28]||(t[28]=$=>o()),type:"error"},{default:$e(()=>[it("\u5220\u9664")]),_:1}),xe(g,{onClick:t[29]||(t[29]=$=>n()),type:"info"},{default:$e(()=>[it("\u4FEE\u6539")]),_:1})]),_:1}),xe(p,{"mt-2":"",title:"\u5728\u4FEE\u6539\u548C\u5220\u9664\u524D\uFF0C\u8BF7\u786E\u4FDD\u60A8\u5DF2\u7ECF\u5145\u5206\u7406\u89E3\u8BE5\u914D\u7F6E\u7684\u542B\u4E49\u53CA\u7528\u6CD5\uFF0C\u76F2\u76EE\u4FEE\u6539\u6216\u5220\u9664\u53EF\u80FD\u4F1A\u5F15\u53D1\u4E25\u91CDBUG\uFF01",type:"error"},{icon:$e(()=>[xe(d,null,{default:$e(()=>[xe(r,{type:"alarm"})]),_:1})]),_:1}),xe(u,{"mt-2":"","checked-row-keys":_e(Qe),"onUpdate:checkedRowKeys":t[30]||(t[30]=$=>Rt(Qe)?Qe.value=$:null),columns:ae,"row-key":$=>$.id,data:_e(De)},null,8,["checked-row-keys","row-key","data"])])]),_:1})])}}};typeof Gt=="function"&&Gt(Vt);var ei=Pt(Vt,[["__scopeId","data-v-70a74aad"]]);export{ei as default};
|