var Ae=Object.defineProperty,Re=Object.defineProperties;var Fe=Object.getOwnPropertyDescriptors;var Me=Object.getOwnPropertySymbols;var Ne=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable;var Le=(t,d,e)=>d in t?Ae(t,d,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[d]=e,Se=(t,d)=>{for(var e in d||(d={}))Ne.call(d,e)&&Le(t,e,d[e]);if(Me)for(var e of Me(d))Ie.call(d,e)&&Le(t,e,d[e]);return t},ke=(t,d)=>Re(t,Fe(d));(function(t,d){typeof exports=="object"&&typeof module!="undefined"?module.exports=d(require("vue")):typeof define=="function"&&define.amd?define(["vue"],d):(t=typeof globalThis!="undefined"?globalThis:t||self,t.VFormDesigner=d(t.Vue))})(this,function(require$$0$1){"use strict";function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var require$$0__default=_interopDefaultLegacy(require$$0$1),commonjsGlobal=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var axios$2={exports:{}},bind$2=function(d,e){return function(){for(var m=new Array(arguments.length),g=0;g=0)return;h==="set-cookie"?e[h]=(e[h]?e[h]:[]).concat([m]):e[h]=e[h]?e[h]+", "+m:m}}),e},utils$7=utils$d,isURLSameOrigin$1=utils$7.isStandardBrowserEnv()?function(){var d=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a"),h;function m(g){var a=g;return d&&(e.setAttribute("href",a),a=e.href),e.setAttribute("href",a),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return h=m(window.location.href),function(a){var u=utils$7.isString(a)?m(a):a;return u.protocol===h.protocol&&u.host===h.host}}():function(){return function(){return!0}}();function Cancel$3(t){this.message=t}Cancel$3.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel$3.prototype.__CANCEL__=!0;var Cancel_1=Cancel$3,utils$6=utils$d,settle=settle$1,cookies=cookies$1,buildURL$1=buildURL$2,buildFullPath=buildFullPath$1,parseHeaders=parseHeaders$1,isURLSameOrigin=isURLSameOrigin$1,createError=createError$2,defaults$5=defaults_1,Cancel$2=Cancel_1,xhr=function(d){return new Promise(function(h,m){var g=d.data,a=d.headers,u=d.responseType,r;function f(){d.cancelToken&&d.cancelToken.unsubscribe(r),d.signal&&d.signal.removeEventListener("abort",r)}utils$6.isFormData(g)&&delete a["Content-Type"];var l=new XMLHttpRequest;if(d.auth){var n=d.auth.username||"",i=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";a.Authorization="Basic "+btoa(n+":"+i)}var o=buildFullPath(d.baseURL,d.url);l.open(d.method.toUpperCase(),buildURL$1(o,d.params,d.paramsSerializer),!0),l.timeout=d.timeout;function s(){if(!!l){var p="getAllResponseHeaders"in l?parseHeaders(l.getAllResponseHeaders()):null,$=!u||u==="text"||u==="json"?l.responseText:l.response,v={data:$,status:l.status,statusText:l.statusText,headers:p,config:d,request:l};settle(function(y){h(y),f()},function(y){m(y),f()},v),l=null}}if("onloadend"in l?l.onloadend=s:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(s)},l.onabort=function(){!l||(m(createError("Request aborted",d,"ECONNABORTED",l)),l=null)},l.onerror=function(){m(createError("Network Error",d,null,l)),l=null},l.ontimeout=function(){var $=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",v=d.transitional||defaults$5.transitional;d.timeoutErrorMessage&&($=d.timeoutErrorMessage),m(createError($,d,v.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",l)),l=null},utils$6.isStandardBrowserEnv()){var c=(d.withCredentials||isURLSameOrigin(o))&&d.xsrfCookieName?cookies.read(d.xsrfCookieName):void 0;c&&(a[d.xsrfHeaderName]=c)}"setRequestHeader"in l&&utils$6.forEach(a,function($,v){typeof g=="undefined"&&v.toLowerCase()==="content-type"?delete a[v]:l.setRequestHeader(v,$)}),utils$6.isUndefined(d.withCredentials)||(l.withCredentials=!!d.withCredentials),u&&u!=="json"&&(l.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&l.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(r=function(p){!l||(m(!p||p&&p.type?new Cancel$2("canceled"):p),l.abort(),l=null)},d.cancelToken&&d.cancelToken.subscribe(r),d.signal&&(d.signal.aborted?r():d.signal.addEventListener("abort",r))),g||(g=null),l.send(g)})},utils$5=utils$d,normalizeHeaderName=normalizeHeaderName$1,enhanceError=enhanceError$2,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(t,d){!utils$5.isUndefined(t)&&utils$5.isUndefined(t["Content-Type"])&&(t["Content-Type"]=d)}function getDefaultAdapter(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=xhr),t}function stringifySafely(t,d,e){if(utils$5.isString(t))try{return(d||JSON.parse)(t),utils$5.trim(t)}catch(h){if(h.name!=="SyntaxError")throw h}return(e||JSON.stringify)(t)}var defaults$4={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:getDefaultAdapter(),transformRequest:[function(d,e){return normalizeHeaderName(e,"Accept"),normalizeHeaderName(e,"Content-Type"),utils$5.isFormData(d)||utils$5.isArrayBuffer(d)||utils$5.isBuffer(d)||utils$5.isStream(d)||utils$5.isFile(d)||utils$5.isBlob(d)?d:utils$5.isArrayBufferView(d)?d.buffer:utils$5.isURLSearchParams(d)?(setContentTypeIfUnset(e,"application/x-www-form-urlencoded;charset=utf-8"),d.toString()):utils$5.isObject(d)||e&&e["Content-Type"]==="application/json"?(setContentTypeIfUnset(e,"application/json"),stringifySafely(d)):d}],transformResponse:[function(d){var e=this.transitional||defaults$4.transitional,h=e&&e.silentJSONParsing,m=e&&e.forcedJSONParsing,g=!h&&this.responseType==="json";if(g||m&&utils$5.isString(d)&&d.length)try{return JSON.parse(d)}catch(a){if(g)throw a.name==="SyntaxError"?enhanceError(a,this,"E_JSON_PARSE"):a}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils$5.forEach(["delete","get","head"],function(d){defaults$4.headers[d]={}}),utils$5.forEach(["post","put","patch"],function(d){defaults$4.headers[d]=utils$5.merge(DEFAULT_CONTENT_TYPE)});var defaults_1=defaults$4,utils$4=utils$d,defaults$3=defaults_1,transformData$1=function(d,e,h){var m=this||defaults$3;return utils$4.forEach(h,function(a){d=a.call(m,d,e)}),d},isCancel$1=function(d){return!!(d&&d.__CANCEL__)},utils$3=utils$d,transformData=transformData$1,isCancel=isCancel$1,defaults$2=defaults_1,Cancel$1=Cancel_1;function throwIfCancellationRequested(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Cancel$1("canceled")}var dispatchRequest$1=function(d){throwIfCancellationRequested(d),d.headers=d.headers||{},d.data=transformData.call(d,d.data,d.headers,d.transformRequest),d.headers=utils$3.merge(d.headers.common||{},d.headers[d.method]||{},d.headers),utils$3.forEach(["delete","get","head","post","put","patch","common"],function(m){delete d.headers[m]});var e=d.adapter||defaults$2.adapter;return e(d).then(function(m){return throwIfCancellationRequested(d),m.data=transformData.call(d,m.data,m.headers,d.transformResponse),m},function(m){return isCancel(m)||(throwIfCancellationRequested(d),m&&m.response&&(m.response.data=transformData.call(d,m.response.data,m.response.headers,d.transformResponse))),Promise.reject(m)})},utils$2=utils$d,mergeConfig$2=function(d,e){e=e||{};var h={};function m(l,n){return utils$2.isPlainObject(l)&&utils$2.isPlainObject(n)?utils$2.merge(l,n):utils$2.isPlainObject(n)?utils$2.merge({},n):utils$2.isArray(n)?n.slice():n}function g(l){if(utils$2.isUndefined(e[l])){if(!utils$2.isUndefined(d[l]))return m(void 0,d[l])}else return m(d[l],e[l])}function a(l){if(!utils$2.isUndefined(e[l]))return m(void 0,e[l])}function u(l){if(utils$2.isUndefined(e[l])){if(!utils$2.isUndefined(d[l]))return m(void 0,d[l])}else return m(void 0,e[l])}function r(l){if(l in e)return m(d[l],e[l]);if(l in d)return m(void 0,d[l])}var f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:r};return utils$2.forEach(Object.keys(d).concat(Object.keys(e)),function(n){var i=f[n]||g,o=i(n);utils$2.isUndefined(o)&&i!==r||(h[n]=o)}),h},data={version:"0.24.0"},VERSION=data.version,validators$1={};["object","boolean","number","function","string","symbol"].forEach(function(t,d){validators$1[t]=function(h){return typeof h===t||"a"+(d<1?"n ":" ")+t}});var deprecatedWarnings={};validators$1.transitional=function(d,e,h){function m(g,a){return"[Axios v"+VERSION+"] Transitional option '"+g+"'"+a+(h?". "+h:"")}return function(g,a,u){if(d===!1)throw new Error(m(a," has been removed"+(e?" in "+e:"")));return e&&!deprecatedWarnings[a]&&(deprecatedWarnings[a]=!0,console.warn(m(a," has been deprecated since v"+e+" and will be removed in the near future"))),d?d(g,a,u):!0}};function assertOptions(t,d,e){if(typeof t!="object")throw new TypeError("options must be an object");for(var h=Object.keys(t),m=h.length;m-- >0;){var g=h[m],a=d[g];if(a){var u=t[g],r=u===void 0||a(u,g,t);if(r!==!0)throw new TypeError("option "+g+" must be "+r);continue}if(e!==!0)throw Error("Unknown option "+g)}}var validator$1={assertOptions,validators:validators$1},utils$1=utils$d,buildURL=buildURL$2,InterceptorManager=InterceptorManager_1,dispatchRequest=dispatchRequest$1,mergeConfig$1=mergeConfig$2,validator=validator$1,validators=validator.validators;function Axios$1(t){this.defaults=t,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios$1.prototype.request=function(d){typeof d=="string"?(d=arguments[1]||{},d.url=arguments[0]):d=d||{},d=mergeConfig$1(this.defaults,d),d.method?d.method=d.method.toLowerCase():this.defaults.method?d.method=this.defaults.method.toLowerCase():d.method="get";var e=d.transitional;e!==void 0&&validator.assertOptions(e,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1);var h=[],m=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(d)===!1||(m=m&&i.synchronous,h.unshift(i.fulfilled,i.rejected))});var g=[];this.interceptors.response.forEach(function(i){g.push(i.fulfilled,i.rejected)});var a;if(!m){var u=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(u,h),u=u.concat(g),a=Promise.resolve(d);u.length;)a=a.then(u.shift(),u.shift());return a}for(var r=d;h.length;){var f=h.shift(),l=h.shift();try{r=f(r)}catch(n){l(n);break}}try{a=dispatchRequest(r)}catch(n){return Promise.reject(n)}for(;g.length;)a=a.then(g.shift(),g.shift());return a},Axios$1.prototype.getUri=function(d){return d=mergeConfig$1(this.defaults,d),buildURL(d.url,d.params,d.paramsSerializer).replace(/^\?/,"")},utils$1.forEach(["delete","get","head","options"],function(d){Axios$1.prototype[d]=function(e,h){return this.request(mergeConfig$1(h||{},{method:d,url:e,data:(h||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(d){Axios$1.prototype[d]=function(e,h,m){return this.request(mergeConfig$1(m||{},{method:d,url:e,data:h}))}});var Axios_1=Axios$1,Cancel=Cancel_1;function CancelToken(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var d;this.promise=new Promise(function(m){d=m});var e=this;this.promise.then(function(h){if(!!e._listeners){var m,g=e._listeners.length;for(m=0;mhtml text",customClass:"",onCreated:"",onMounted:""}},{type:"button",icon:"button",formItemFlag:!1,options:{name:"",label:"",columnWidth:"200px",size:"",displayStyle:"block",disabled:!1,hidden:!1,type:"",plain:!1,round:!1,circle:!1,icon:null,customClass:"",onCreated:"",onMounted:"",onClick:""}},{type:"divider",icon:"divider",formItemFlag:!1,options:{name:"",label:"",columnWidth:"200px",direction:"horizontal",contentPosition:"center",hidden:!1,customClass:"",onCreated:"",onMounted:""}}],advancedFields=[{type:"picture-upload",icon:"picture-upload-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",disabled:!1,hidden:!1,required:!1,requiredHint:"",customRule:"",customRuleHint:"",uploadURL:"",uploadTip:"",withCredentials:!1,multipleSelect:!1,showFileList:!0,limit:3,fileMaxSize:5,fileTypes:["jpg","jpeg","png"],customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,onCreated:"",onMounted:"",onBeforeUpload:"",onUploadSuccess:"",onUploadError:"",onFileRemove:"",onValidate:""}},{type:"file-upload",icon:"file-upload-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",disabled:!1,hidden:!1,required:!1,requiredHint:"",customRule:"",customRuleHint:"",uploadURL:"",uploadTip:"",withCredentials:!1,multipleSelect:!1,showFileList:!0,limit:3,fileMaxSize:5,fileTypes:["doc","docx","xls","xlsx"],customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,onCreated:"",onMounted:"",onBeforeUpload:"",onUploadSuccess:"",onUploadError:"",onFileRemove:"",onValidate:""}},{type:"rich-editor",icon:"rich-editor-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",placeholder:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",contentHeight:"200px",disabled:!1,hidden:!1,required:!1,requiredHint:"",customRule:"",customRuleHint:"",customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,minLength:null,maxLength:null,showWordLimit:!1,onCreated:"",onMounted:"",onValidate:""}},{type:"cascader",icon:"cascader-field",formItemFlag:!0,options:{name:"",label:"",labelAlign:"",defaultValue:"",placeholder:"",size:"",labelWidth:null,labelHidden:!1,columnWidth:"200px",disabled:!1,hidden:!1,clearable:!0,filterable:!1,multiple:!1,checkStrictly:!1,showAllLevels:!0,optionItems:[{label:"select 1",value:1,children:[{label:"child 1",value:11}]},{label:"select 2",value:2},{label:"select 3",value:3}],required:!1,requiredHint:"",customRule:"",customRuleHint:"",customClass:"",labelIconClass:null,labelIconPosition:"rear",labelTooltip:null,onCreated:"",onMounted:"",onChange:"",onFocus:"",onBlur:"",onValidate:""}}],customFields=[];function addContainerWidgetSchema(t){containers.push(t)}function addCustomWidgetSchema(t){customFields.push(t)}const formTemplates=[{title:"\u5355\u5217\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t1.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json1.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u591A\u5217\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t2.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json2.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u5206\u7EC4\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t3.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json3.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u6807\u7B7E\u9875\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t4.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json4.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u4E3B\u4ECE\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t5.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json5.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u54CD\u5E94\u5F0F\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t6.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json6.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u95EE\u5377\u8C03\u67E5\u8868",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t7.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json7.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."},{title:"\u56FA\u5B9A\u8868\u683C\u8868\u5355",imgUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/t8.png",jsonUrl:"https://ks3-cn-beijing.ksyuncs.com/vform-static/form-samples/json8.txt",description:"\u8868\u5355\u6A21\u677F\u8BE6\u7EC6\u8BF4\u660E..."}];var clipboard={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */(function(t,d){(function(h,m){t.exports=m()})(commonjsGlobal,function(){return function(){var e={686:function(g,a,u){u.d(a,{default:function(){return R}});var r=u(279),f=u.n(r),l=u(370),n=u.n(l),i=u(817),o=u.n(i);function s(B){try{return document.execCommand(B)}catch{return!1}}var c=function(N){var P=o()(N);return s("cut"),P},p=c;function $(B){var N=document.documentElement.getAttribute("dir")==="rtl",P=document.createElement("textarea");P.style.fontSize="12pt",P.style.border="0",P.style.padding="0",P.style.margin="0",P.style.position="absolute",P.style[N?"right":"left"]="-9999px";var j=window.pageYOffset||document.documentElement.scrollTop;return P.style.top="".concat(j,"px"),P.setAttribute("readonly",""),P.value=B,P}var v=function(N,P){var j=$(N);P.container.appendChild(j);var D=o()(j);return s("copy"),j.remove(),D},C=function(N){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},j="";return typeof N=="string"?j=v(N,P):N instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(N==null?void 0:N.type)?j=v(N.value,P):(j=o()(N),s("copy")),j},y=C;function _(B){return 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},_(B)}var b=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=N.action,j=P===void 0?"copy":P,D=N.container,W=N.target,H=N.text;if(j!=="copy"&&j!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(W!==void 0)if(W&&_(W)==="object"&&W.nodeType===1){if(j==="copy"&&W.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(j==="cut"&&(W.hasAttribute("readonly")||W.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(H)return y(H,{container:D});if(W)return j==="cut"?p(W):y(W,{container:D})},E=b;function x(B){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(P){return typeof P}:x=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},x(B)}function O(B,N){if(!(B instanceof N))throw new TypeError("Cannot call a class as a function")}function M(B,N){for(var P=0;P0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof D.action=="function"?D.action:this.defaultAction,this.target=typeof D.target=="function"?D.target:this.defaultTarget,this.text=typeof D.text=="function"?D.text:this.defaultText,this.container=x(D.container)==="object"?D.container:document.body}},{key:"listenClick",value:function(D){var W=this;this.listener=n()(D,"click",function(H){return W.onClick(H)})}},{key:"onClick",value:function(D){var W=D.delegateTarget||D.currentTarget,H=this.action(W)||"copy",z=E({action:H,container:this.container,target:this.target(W),text:this.text(W)});this.emit(z?"success":"error",{action:H,text:z,trigger:W,clearSelection:function(){W&&W.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(D){return F("action",D)}},{key:"defaultTarget",value:function(D){var W=F("target",D);if(W)return document.querySelector(W)}},{key:"defaultText",value:function(D){return F("text",D)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(D){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return y(D,W)}},{key:"cut",value:function(D){return p(D)}},{key:"isSupported",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],W=typeof D=="string"?[D]:D,H=!!document.queryCommandSupported;return W.forEach(function(z){H=H&&!!document.queryCommandSupported(z)}),H}}]),P}(f()),R=V},828:function(g){var a=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function r(f,l){for(;f&&f.nodeType!==a;){if(typeof f.matches=="function"&&f.matches(l))return f;f=f.parentNode}}g.exports=r},438:function(g,a,u){var r=u(828);function f(i,o,s,c,p){var $=n.apply(this,arguments);return i.addEventListener(s,$,p),{destroy:function(){i.removeEventListener(s,$,p)}}}function l(i,o,s,c,p){return typeof i.addEventListener=="function"?f.apply(null,arguments):typeof s=="function"?f.bind(null,document).apply(null,arguments):(typeof i=="string"&&(i=document.querySelectorAll(i)),Array.prototype.map.call(i,function($){return f($,o,s,c,p)}))}function n(i,o,s,c){return function(p){p.delegateTarget=r(p.target,o),p.delegateTarget&&c.call(i,p)}}g.exports=l},879:function(g,a){a.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},a.nodeList=function(u){var r=Object.prototype.toString.call(u);return u!==void 0&&(r==="[object NodeList]"||r==="[object HTMLCollection]")&&"length"in u&&(u.length===0||a.node(u[0]))},a.string=function(u){return typeof u=="string"||u instanceof String},a.fn=function(u){var r=Object.prototype.toString.call(u);return r==="[object Function]"}},370:function(g,a,u){var r=u(879),f=u(438);function l(s,c,p){if(!s&&!c&&!p)throw new Error("Missing required arguments");if(!r.string(c))throw new TypeError("Second argument must be a String");if(!r.fn(p))throw new TypeError("Third argument must be a Function");if(r.node(s))return n(s,c,p);if(r.nodeList(s))return i(s,c,p);if(r.string(s))return o(s,c,p);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function n(s,c,p){return s.addEventListener(c,p),{destroy:function(){s.removeEventListener(c,p)}}}function i(s,c,p){return Array.prototype.forEach.call(s,function($){$.addEventListener(c,p)}),{destroy:function(){Array.prototype.forEach.call(s,function($){$.removeEventListener(c,p)})}}}function o(s,c,p){return f(document.body,s,c,p)}g.exports=l},817:function(g){function a(u){var r;if(u.nodeName==="SELECT")u.focus(),r=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var f=u.hasAttribute("readonly");f||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),f||u.removeAttribute("readonly"),r=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var l=window.getSelection(),n=document.createRange();n.selectNodeContents(u),l.removeAllRanges(),l.addRange(n),r=l.toString()}return r}g.exports=a},279:function(g){function a(){}a.prototype={on:function(u,r,f){var l=this.e||(this.e={});return(l[u]||(l[u]=[])).push({fn:r,ctx:f}),this},once:function(u,r,f){var l=this;function n(){l.off(u,n),r.apply(f,arguments)}return n._=r,this.on(u,n,f)},emit:function(u){var r=[].slice.call(arguments,1),f=((this.e||(this.e={}))[u]||[]).slice(),l=0,n=f.length;for(l;l{t[e]=d[e]})},evalFn=function(t,d=null,e=null){return new Function("DSV","VFR","return "+t)(d,e)},addWindowResizeHandler=function(t){let d=window.onresize;typeof window.onresize!="function"?window.onresize=t:window.onresize=function(){d(),t()}},insertCustomCssToHead=function(t,d=""){let e=document.getElementsByTagName("head")[0],h=document.getElementById("vform-custom-css");h&&e.removeChild(h),d&&(h=document.getElementById("vform-custom-css-"+d),!!h&&e.removeChild(h));let m=document.createElement("style");m.type="text/css",m.rel="stylesheet",m.id=d?"vform-custom-css-"+d:"vform-custom-css";try{m.appendChild(document.createTextNode(t))}catch{m.styleSheet.cssText=t}e.appendChild(m)},insertGlobalFunctionsToHtml=function(t,d=""){let e=document.getElementsByTagName("body")[0],h=document.getElementById("v_form_global_functions");!!h&&e.removeChild(h),d&&(h=document.getElementById("v_form_global_functions-"+d),!!h&&e.removeChild(h));let m=document.createElement("script");m.id=d?"v_form_global_functions-"+d:"v_form_global_functions",m.type="text/javascript",m.innerHTML=t,e.appendChild(m)},loadRemoteScript=function(t,d){let e=encodeURIComponent(t);if(!document.getElementById(e)){let m=document.createElement("script");m.src=t,m.id=e,document.body.appendChild(m),m.onload=m.onreadystatechange=function(g,a){(a||!m.readyState||m.readyState==="loaded"||m.readyState==="complete")&&(m=m.onload=m.onreadystatechange=null,a||d())}}};function traverseFieldWidgets(t,d,e=null){!t||t.map(h=>{h.formItemFlag?d(h,e):h.type==="grid"?h.cols.map(m=>{traverseFieldWidgets(m.widgetList,d,h)}):h.type==="table"?h.rows.map(m=>{m.cols.map(g=>{traverseFieldWidgets(g.widgetList,d,h)})}):h.type==="tab"?h.tabs.map(m=>{traverseFieldWidgets(m.widgetList,d,h)}):(h.type==="sub-form"||h.category==="container")&&traverseFieldWidgets(h.widgetList,d,h)})}function traverseContainerWidgets(t,d){!t||t.map(e=>{e.category==="container"&&d(e),e.type==="grid"?e.cols.map(h=>{traverseContainerWidgets(h.widgetList,d)}):e.type==="table"?e.rows.map(h=>{h.cols.map(m=>{traverseContainerWidgets(m.widgetList,d)})}):e.type==="tab"?e.tabs.map(h=>{traverseContainerWidgets(h.widgetList,d)}):(e.type==="sub-form"||e.category==="container")&&traverseContainerWidgets(e.widgetList,d)})}function traverseAllWidgets(t,d){!t||t.map(e=>{d(e),e.type==="grid"?e.cols.map(h=>{d(h),traverseAllWidgets(h.widgetList,d)}):e.type==="table"?e.rows.map(h=>{h.cols.map(m=>{d(m),traverseAllWidgets(m.widgetList,d)})}):e.type==="tab"?e.tabs.map(h=>{traverseAllWidgets(h.widgetList,d)}):(e.type==="sub-form"||e.category==="container")&&traverseAllWidgets(e.widgetList,d)})}function handleWidgetForTraverse(t,d){t.category?traverseFieldWidgetsOfContainer(t,d):t.formItemFlag&&d(t)}function traverseFieldWidgetsOfContainer(t,d){t.type==="grid"?t.cols.forEach(e=>{e.widgetList.forEach(h=>{handleWidgetForTraverse(h,d)})}):t.type==="table"?t.rows.forEach(e=>{e.cols.forEach(h=>{h.widgetList.forEach(m=>{handleWidgetForTraverse(m,d)})})}):t.type==="tab"?t.tabs.forEach(e=>{e.widgetList.forEach(h=>{handleWidgetForTraverse(h,d)})}):t.type==="sub-form"?t.widgetList.forEach(e=>{handleWidgetForTraverse(e,d)}):t.category==="container"&&t.widgetList.forEach(e=>{handleWidgetForTraverse(e,d)})}function getAllFieldWidgets(t){if(!t)return[];let d=[];return traverseFieldWidgets(t,h=>{d.push({type:h.type,name:h.options.name,field:h})}),d}function getAllContainerWidgets(t){if(!t)return[];let d=[];return traverseContainerWidgets(t,h=>{d.push({type:h.type,name:h.options.name,container:h})}),d}function copyToClipboard(t,d,e,h,m){const g=new Clipboard(d.target,{text:()=>t});g.on("success",()=>{e.success(h),g.destroy()}),g.on("error",()=>{e.error(m),g.destroy()}),g.onClick(d)}function getQueryParam(t){let e=window.location.search.substring(1).split("&");for(let h=0;h{h=isDef(h)&&isDef(h[m])?h[m]:null}),h}let locale=require$$0$1.reactive({lang:localStorage.getItem("v_form_locale")||"zh-CN"});function createI18n(t){return{messages:t.messages,$st(d,...e){const h=get(this.messages[locale.lang],d);return typeof h=="function"?h(...e):h!==null?h:d},$st2(d,e){let h=this.messages[locale.lang];const m=get(h,d);return m!==null?m:get(h,e)},setLang(d){locale.lang=d}}}var enLocale={application:{"zh-CN":"\u7B80\u4F53\u4E2D\u6587","en-US":"English",productTitle:"Online Form Designer",github:"GitHub",document:"Docs",qqGroup:"WeChat Group",deployment:"Deployment",subscription:"Subscription"},designer:{componentLib:"Components",formLib:"Templates",containerTitle:"Container",dragHandlerHint:"drag container or field to layout center",dragAction:"drag",basicFieldTitle:"Basic Field",advancedFieldTitle:"Advanced Field",customFieldTitle:"Customized Field",noWidgetHint:"Please select a widget from the left list, drag and drop to this container.",widgetLabel:{grid:"Grid",table:"Table",tab:"Tab",section:"Section","sub-form":"SubForm","grid-col":"GridCol","table-cell":"TableCell","tab-pane":"TabPane","data-table":"DataTable",input:"Input",textarea:"Textarea",number:"InputNumber",radio:"Radio",checkbox:"Checkbox",select:"Select",time:"Time","time-range":"Time range",date:"Date","date-range":"Date range",switch:"Switch",rate:"Rate",color:"ColorPicker",slider:"Slider","static-text":"Text","html-text":"HTML",button:"Button",divider:"Divider","picture-upload":"Picture","file-upload":"File","rich-editor":"Rich Editor",cascader:"Cascader",slot:"Slot",custom:"Custom Component"},hint:{selectParentWidget:"Select parent of this widget",moveUpWidget:"Move up this widget",moveDownWidget:"Move down this widget",cloneWidget:"Clone this widget",insertRow:"Insert new row",insertColumn:"Insert new column",remove:"Remove this widget",cellSetting:"Cell setting",dragHandler:"Drag handler",copyField:"Copy field widget",onlyFieldWidgetAcceptable:"Only field widget can be dragged into sub-form",moveUpFirstChildHint:"First child can not be move up",moveDownLastChildHint:"Last child can not be move down",closePreview:"Close",copyJson:"Copy",saveFormJson:"Save As File",copyVueCode:"Copy Vue Code",copyHtmlCode:"Copy HTML Code",copyJsonSuccess:"Copy succeed",importJsonSuccess:"Import succeed",invalidJsonFormat:"Invalid JSON format",jsonVersionMismatch:"Version of JSON mismatch",copyJsonFail:"Copy failed",copyVueCodeSuccess:"Copy succeed",copyVueCodeFail:"Copy failed",copyHtmlCodeSuccess:"Copy succeed",copyHtmlCodeFail:"Copy failed",saveVueCode:"Save Vue File",saveHtmlCode:"Save Html File",getFormData:"Get Data",resetForm:"Reset",disableForm:"Disable",enableForm:"Enable",exportFormData:"Form Data",copyFormData:"Copy",saveFormData:"Save As File",copyVue2SFC:"Copy Vue2",copyVue3SFC:"Copy Vue3",copySFCFail:"Copy failed",copySFCSuccess:"Copy succeed",saveVue2SFC:"Save As Vue2",saveVue3SFC:"Save As Vue3",fileNameForSave:"File name:",saveFileTitle:"Save as File",fileNameInputPlaceholder:"Enter the file name",sampleLoadedSuccess:"Example loaded successfully",sampleLoadedFail:"Sample load failed",loadFormTemplate:"Load This",loadFormTemplateHint:"Are you sure to load this template?",loadFormTemplateSuccess:"Load form template success!",loadFormTemplateFailed:"Load form template failed.",currentNodeCannotBeSelected:"The current node cannot be selected.",widgetSetting:"Widget Config",formSetting:"Form Config",prompt:"Prompt",confirm:"OK",cancel:"Cancel",import:"Import",importJsonHint:"The code to be imported should have the following JSON format.",invalidOptionsData:"Invalid data of options:",lastPaneCannotBeDeleted:"The last pane cannot be deleted.",duplicateName:"Duplicate name: ",nameRequired:"Name required.",numberValidator:"Number",letterValidator:"Letter",letterAndNumberValidator:"LetterAndNumber",mobilePhoneValidator:"MobilePhone",emailValidator:"Email",urlValidator:"URL",noChineseValidator:"Non-Chinese",chineseValidator:"Chinese",rowspanNotConsistentForMergeEntireRow:"Cells in this row don't have the same rowspan, operation failed.",colspanNotConsistentForMergeEntireColumn:"Cells in this column don't have the same colspan, operation failed.",rowspanNotConsistentForDeleteEntireRow:"Cells in this row don't have the same rowspan, operation failed.",colspanNotConsistentForDeleteEntireColumn:"Cells in this column don't have the same colspan, operation failed.",lastColCannotBeDeleted:"The last col cannot be deleted.",lastRowCannotBeDeleted:"The last row cannot be deleted."},toolbar:{undoHint:"Undo",redoHint:"Redo",pcLayout:"PC",padLayout:"Pad",mobileLayout:"H5",nodeTreeHint:"Tree View Of Component Hierarchy",nodeTreeTitle:"Tree View Of Component Hierarchy",clear:"Clear",preview:"Preview",importJson:"Import",exportJson:"Export",exportCode:"Codes",generateCode:"Generate Code",generateSFC:"Generate SFC"},setting:{basicSetting:"Basic Setting",attributeSetting:"Attribute Setting",commonSetting:"Common Setting",advancedSetting:"Advanced Setting",eventSetting:"Event Setting",uniqueName:"Unique Name",editNameHelp:"Press enter to confirm the modification",label:"Label",displayType:"Type",defaultValue:"Default Value",placeholder:"Placeholder",startPlaceholder:"Start Placeholder",endPlaceholder:"End Placeholder",widgetColumnWidth:"Width",widgetSize:"Size",fontSize:"Font Size",textAlign:"Text Align",autoFullWidth:"Auto Full Width",showStops:"Show Stops",displayStyle:"Display Style",inlineLayout:"inline",blockLayout:"block",buttonStyle:"Show As Button",border:"Show Border",labelWidth:"Width Of Label",rows:"Rows",labelHidden:"Hide Label",required:"Required",requiredHint:"Failure Hint",validation:"Validation",validationHelp:"Regular expressions supported",validationHint:"Validation Hint",readonly:"Readonly",disabled:"Disabled",hidden:"Hidden",textContent:"Text",preWrap:"Line Wrap",htmlContent:"HTML",clearable:"Clearable",editable:"Editable",format:"Format",valueFormat:"Value Format",showPassword:"Show Reveal",filterable:"Filterable",allowCreate:"Allow Create",remote:"Remote Query",automaticDropdown:"Automatic Dropdown",multiple:"Multiple",multipleLimit:"Multiple Limit",checkStrictly:"Any Level Selectable",showAllLevels:"Show All Levels",contentPosition:"Content Position",plain:"Plain",round:"Round",circle:"Circle",icon:"Icon",optionsSetting:"Options Setting",addOption:"Add Option",importOptions:"Import Options",resetDefault:"Reset Default",uploadSetting:"Upload Setting",uploadURL:"Upload URL",uploadTip:"Tip Content",withCredentials:"Send Cookie",multipleSelect:"File Multi-select",showFileList:"Show File List",limit:"Max Upload Number",fileMaxSize:"Max Size(MB)",fileTypes:"Upload File Types",fileTypesHelp:"Allows to add more file types",headers:"Request Headers",cellWidth:"Width",cellHeight:"Height",wordBreak:"Line Wrap",gridColHeight:"Height Of Col(px)",gutter:"Gutter(px)",columnSetting:"Cols Setting",colsOfGrid:"Cols Of Grid:",colSpanTitle:"Spans Of Col",colOffsetTitle:"Offset Of Col",colPushTitle:"Push Of Col",colPullTitle:"Pull Of Col",addColumn:"Add Column",responsive:"Responsive",tabPaneSetting:"Tab Panes",addTabPane:"Add Tab Pane",paneActive:"Active",customLabelIcon:"Custom Label",labelIconClass:"Label Icon Class",labelIconPosition:"Label Icon Position",labelTooltip:"Label Tooltip",minValue:"Min Value",maxValue:"Max Value",precision:"Precision",step:"Step",controlsPosition:"Controls Position",minLength:"Min Length",maxLength:"Max Length",showWordLimit:"Show Word Limit",prefixIcon:"Prefix Icon",suffixIcon:"Suffix Icon",inputButton:"Input Button Setting",appendButton:"Append Button",appendButtonDisabled:"Button Disabled",appendButtonIcon:"Append Button Icon",buttonIcon:"Button Icon",switchWidth:"Width of Switch(px)",activeText:"Active Text",inactiveText:"Inactive Text",activeColor:"Active Color",inactiveColor:"Inactive Color",maxStars:"Stars Max Number",lowThreshold:"Low Threshold",highThreshold:"High Threshold",allowHalf:"Allow Half",showText:"Show Text",showScore:"Show Score",range:"Range",vertical:"Vertical",showBlankRow:"Show Blank Row",showRowNumber:"Show Row Number",contentHeight:"Content Area Height",insertColumnToLeft:"insert column to left",insertColumnToRight:"insert column to right",insertRowAbove:"insert row above",insertRowBelow:"insert row below",mergeLeftColumn:"merge left cell",mergeRightColumn:"merge right cell",mergeEntireRow:"merge entire row",mergeRowAbove:"merge cell above",mergeRowBelow:"merge cell below",mergeEntireColumn:"merge entire column",undoMergeCol:"undo merge column",undoMergeRow:"undo merge row",deleteEntireCol:"delete entire column",deleteEntireRow:"delete entire row",widgetName:"Unique Name",formSize:"Size",labelPosition:"Position Of Label",topPosition:"Top",leftPosition:"Left",labelAlign:"Label Align",leftAlign:"Left",centerAlign:"Center",rightAlign:"Right",formCss:"Form CSS",addCss:"Edit",customClass:"Custom Class",globalFunctions:"Global Functions",addEventHandler:"Edit",editWidgetEventHandler:"Edit Widget Event Handler",editFormEventHandler:"Edit Form Event Handler",formSFCSetting:"SFC Setting",formModelName:"Model Name",formRefName:"Ref Name",formRulesName:"Rules Name",syntaxCheckWarning:"Syntax error in the javascript codes, please check again!"}}},zhLocale={application:{"zh-CN":"\u7B80\u4F53\u4E2D\u6587","en-US":"English",productTitle:"\u8868\u5355\u8BBE\u8BA1\u5668",github:"GitHub",document:"\u6587\u6863",qqGroup:"\u6280\u672FWX\u7FA4",deployment:"\u79C1\u6709\u90E8\u7F72",subscription:"\u8BA2\u9605Pro"},designer:{componentLib:"\u7EC4\u4EF6\u5E93",formLib:"\u8868\u5355\u6A21\u677F",containerTitle:"\u5BB9\u5668",dragHandlerHint:"\u9F20\u6807\u62D6\u62FD\u5BB9\u5668\u7EC4\u4EF6\u6216\u5B57\u6BB5\u7EC4\u4EF6\u5E76\u653E\u7F6E\u4E8E\u8868\u5355\u4E2D",dragAction:"\u62D6\u52A8",basicFieldTitle:"\u57FA\u7840\u5B57\u6BB5",advancedFieldTitle:"\u9AD8\u7EA7\u5B57\u6BB5",customFieldTitle:"\u81EA\u5B9A\u4E49\u6269\u5C55\u5B57\u6BB5",noWidgetHint:"\u8BF7\u4ECE\u5DE6\u4FA7\u5217\u8868\u4E2D\u9009\u62E9\u4E00\u4E2A\u7EC4\u4EF6, \u7136\u540E\u7528\u9F20\u6807\u62D6\u52A8\u7EC4\u4EF6\u653E\u7F6E\u4E8E\u6B64\u5904.",widgetLabel:{grid:"\u6805\u683C",table:"\u8868\u683C",tab:"\u6807\u7B7E\u9875",section:"\u533A\u5757","sub-form":"\u5B50\u8868\u5355","grid-col":"\u6805\u683C\u5217","table-cell":"\u5355\u5143\u683C","tab-pane":"\u9009\u9879\u5361\u9875","data-table":"\u6570\u636E\u8868\u683C",input:"\u5355\u884C\u8F93\u5165",textarea:"\u591A\u884C\u8F93\u5165",number:"\u8BA1\u6570\u5668",radio:"\u5355\u9009\u9879",checkbox:"\u591A\u9009\u9879",select:"\u4E0B\u62C9\u9009\u9879",time:"\u65F6\u95F4","time-range":"\u65F6\u95F4\u8303\u56F4",date:"\u65E5\u671F","date-range":"\u65E5\u671F\u8303\u56F4",switch:"\u5F00\u5173",rate:"\u8BC4\u5206",color:"\u989C\u8272\u9009\u62E9\u5668",slider:"\u6ED1\u5757","static-text":"\u9759\u6001\u6587\u5B57","html-text":"HTML",button:"\u6309\u94AE",divider:"\u5206\u9694\u7EBF","picture-upload":"\u56FE\u7247","file-upload":"\u6587\u4EF6","rich-editor":"\u5BCC\u6587\u672C",cascader:"\u7EA7\u8054\u9009\u62E9",slot:"\u63D2\u69FD",custom:"Custom Component"},hint:{selectParentWidget:"\u9009\u4E2D\u7236\u7EC4\u4EF6",moveUpWidget:"\u4E0A\u79FB\u7EC4\u4EF6",moveDownWidget:"\u4E0B\u79FB\u7EC4\u4EF6",cloneWidget:"\u590D\u5236\u7EC4\u4EF6",insertRow:"\u63D2\u5165\u65B0\u884C",insertColumn:"\u63D2\u5165\u65B0\u5217",remove:"\u79FB\u9664\u7EC4\u4EF6",cellSetting:"\u5355\u5143\u683C\u64CD\u4F5C",dragHandler:"\u62D6\u62FD\u624B\u67C4",copyField:"\u590D\u5236\u5B57\u6BB5\u7EC4\u4EF6",onlyFieldWidgetAcceptable:"\u5B50\u8868\u5355\u53EA\u80FD\u63A5\u6536\u5B57\u6BB5\u7EC4\u4EF6",moveUpFirstChildHint:"\u5DF2\u7ECF\u79FB\u52A8\u5230\u6700\u4E0A\u9762",moveDownLastChildHint:"\u5DF2\u7ECF\u79FB\u52A8\u5230\u6700\u4E0B\u9762",closePreview:"\u5173\u95ED",copyJson:"\u590D\u5236JSON",saveFormJson:"\u4FDD\u5B58\u4E3A\u6587\u4EF6",copyVueCode:"\u590D\u5236Vue\u4EE3\u7801",copyHtmlCode:"\u590D\u5236HTML\u4EE3\u7801",copyJsonSuccess:"\u590D\u5236JSON\u6210\u529F",importJsonSuccess:"\u5BFC\u5165JSON\u6210\u529F",invalidJsonFormat:"\u65E0\u6548\u7684\u8868\u5355JSON\u683C\u5F0F",jsonVersionMismatch:"\u8868\u5355JSON\u7248\u672C\u53F7\u4E0D\u5339\u914D",copyJsonFail:"\u590D\u5236JSON\u5931\u8D25",copyVueCodeSuccess:"\u590D\u5236Vue\u4EE3\u7801\u6210\u529F",copyVueCodeFail:"\u590D\u5236Vue\u4EE3\u7801\u5931\u8D25",copyHtmlCodeSuccess:"\u590D\u5236HTML\u4EE3\u7801\u6210\u529F",copyHtmlCodeFail:"\u590D\u5236HTML\u4EE3\u7801\u5931\u8D25",saveVueCode:"\u4FDD\u5B58Vue\u6587\u4EF6",saveHtmlCode:"\u4FDD\u5B58Html\u6587\u4EF6",getFormData:"\u83B7\u53D6\u6570\u636E",resetForm:"\u91CD\u7F6E\u8868\u5355",disableForm:"\u7981\u7528\u7F16\u8F91",enableForm:"\u6062\u590D\u7F16\u8F91",exportFormData:"\u8868\u5355\u6570\u636E",copyFormData:"\u590D\u5236JSON",saveFormData:"\u4FDD\u5B58\u4E3A\u6587\u4EF6",copyVue2SFC:"\u590D\u5236Vue2\u4EE3\u7801",copyVue3SFC:"\u590D\u5236Vue3\u4EE3\u7801",copySFCFail:"\u590D\u5236SFC\u4EE3\u7801\u5931\u8D25",copySFCSuccess:"\u590D\u5236SFC\u4EE3\u7801\u6210\u529F",saveVue2SFC:"\u4FDD\u5B58\u4E3AVue2\u7EC4\u4EF6",saveVue3SFC:"\u4FDD\u5B58\u4E3AVue3\u7EC4\u4EF6",fileNameForSave:"\u6587\u4EF6\u540D\uFF1A",saveFileTitle:"\u4FDD\u5B58\u4E3A\u6587\u4EF6",fileNameInputPlaceholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D",sampleLoadedSuccess:"\u8868\u5355\u793A\u4F8B\u52A0\u8F7D\u6210\u529F",sampleLoadedFail:"\u8868\u5355\u793A\u4F8B\u52A0\u8F7D\u5931\u8D25",loadFormTemplate:"\u52A0\u8F7D\u6B64\u6A21\u677F",loadFormTemplateHint:"\u662F\u5426\u52A0\u8F7D\u8FD9\u4E2A\u6A21\u677F\uFF1F\u52A0\u8F7D\u540E\u4F1A\u8986\u76D6\u8BBE\u8BA1\u5668\u5F53\u524D\u8868\u5355\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u201C\u64A4\u9500\u201D\u529F\u80FD\u6062\u590D\u3002",loadFormTemplateSuccess:"\u8868\u5355\u6A21\u677F\u52A0\u8F7D\u6210\u529F",loadFormTemplateFailed:"\u8868\u5355\u6A21\u677F\u52A0\u8F7D\u5931\u8D25",currentNodeCannotBeSelected:"\u5F53\u524D\u7EC4\u4EF6\u8282\u70B9\u4E0D\u53EF\u9009\u62E9",widgetSetting:"\u7EC4\u4EF6\u8BBE\u7F6E",formSetting:"\u8868\u5355\u8BBE\u7F6E",prompt:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",import:"\u5BFC\u5165",importJsonHint:"\u5BFC\u5165\u7684JSON\u5185\u5BB9\u987B\u7B26\u5408\u4E0B\u8FF0\u683C\u5F0F\uFF0C\u4EE5\u4FDD\u8BC1\u987A\u5229\u5BFC\u5165.",invalidOptionsData:"\u65E0\u6548\u7684\u9009\u9879\u6570\u636E:",lastPaneCannotBeDeleted:"\u4EC5\u5269\u4E00\u4E2A\u9009\u9879\u5361\u9875\u4E0D\u53EF\u5220\u9664.",duplicateName:"\u7EC4\u4EF6\u540D\u79F0\u5DF2\u5B58\u5728: ",nameRequired:"\u7EC4\u4EF6\u540D\u79F0\u4E0D\u53EF\u4E3A\u7A7A",numberValidator:"\u6570\u5B57",letterValidator:"\u5B57\u6BCD",letterAndNumberValidator:"\u6570\u5B57\u5B57\u6BCD",mobilePhoneValidator:"\u624B\u673A\u53F7\u7801",emailValidator:"\u90AE\u7BB1",urlValidator:"\u7F51\u5740",noChineseValidator:"\u975E\u4E2D\u6587\u5B57\u7B26",chineseValidator:"\u4EC5\u4E2D\u6587\u5B57\u7B26",rowspanNotConsistentForMergeEntireRow:"\u5B58\u5728\u884C\u9AD8\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u65E0\u6CD5\u5408\u5E76\u6574\u884C.",colspanNotConsistentForMergeEntireColumn:"\u5B58\u5728\u5217\u5BBD\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u65E0\u6CD5\u5408\u5E76\u6574\u5217.",rowspanNotConsistentForDeleteEntireRow:"\u5B58\u5728\u884C\u9AD8\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u4E0D\u53EF\u5220\u9664\u6574\u884C.",colspanNotConsistentForDeleteEntireColumn:"\u5B58\u5728\u5217\u5BBD\u4E0D\u4E00\u81F4\u7684\u5355\u5143\u683C, \u4E0D\u53EF\u5220\u9664\u6574\u5217.",lastColCannotBeDeleted:"\u6700\u540E\u4E00\u5217\u4E0D\u53EF\u5220\u9664.",lastRowCannotBeDeleted:"\u6700\u540E\u4E00\u884C\u4E0D\u53EF\u5220\u9664."},toolbar:{undoHint:"\u64A4\u9500",redoHint:"\u91CD\u505A",pcLayout:"PC",padLayout:"Pad",mobileLayout:"H5",nodeTreeHint:"\u7EC4\u4EF6\u5C42\u6B21\u7ED3\u6784\u6811",nodeTreeTitle:"\u7EC4\u4EF6\u5C42\u6B21\u7ED3\u6784\u6811",clear:"\u6E05\u7A7A",preview:"\u9884\u89C8",importJson:"\u5BFC\u5165JSON",exportJson:"\u5BFC\u51FAJSON",exportCode:"\u5BFC\u51FA\u4EE3\u7801",generateCode:"\u751F\u6210\u4EE3\u7801",generateSFC:"\u751F\u6210SFC"},setting:{basicSetting:"\u57FA\u672C\u5C5E\u6027",attributeSetting:"\u5C5E\u6027\u8BBE\u7F6E",commonSetting:"\u5E38\u89C1\u5C5E\u6027",advancedSetting:"\u9AD8\u7EA7\u5C5E\u6027",eventSetting:"\u4E8B\u4EF6\u5C5E\u6027",uniqueName:"\u552F\u4E00\u540D\u79F0",editNameHelp:"\u4FEE\u6539\u540D\u79F0\u540E\u9700\u6309\u56DE\u8F66\u786E\u8BA4",label:"\u6807\u7B7E",displayType:"\u663E\u793A\u7C7B\u578B",defaultValue:"\u9ED8\u8BA4\u503C",placeholder:"\u5360\u4F4D\u5185\u5BB9",startPlaceholder:"\u8D77\u59CB\u5360\u4F4D\u5185\u5BB9",endPlaceholder:"\u622A\u6B62\u5360\u4F4D\u5185\u5BB9",widgetColumnWidth:"\u7EC4\u4EF6\u5217\u5BBD",widgetSize:"\u7EC4\u4EF6\u5927\u5C0F",fontSize:"\u5B57\u4F53\u5927\u5C0F",textAlign:"\u6587\u5B57\u5BF9\u9F50",autoFullWidth:"\u81EA\u52A8\u62C9\u4F38\u5BBD\u5EA6",showStops:"\u663E\u793A\u95F4\u65AD\u70B9",displayStyle:"\u663E\u793A\u6837\u5F0F",inlineLayout:"\u884C\u5185",blockLayout:"\u5757",buttonStyle:"\u663E\u793A\u4E3A\u6309\u94AE",border:"\u5E26\u6709\u8FB9\u6846",labelWidth:"\u6807\u7B7E\u5BBD\u5EA6",rows:"\u884C\u6570",labelHidden:"\u9690\u85CF\u5B57\u6BB5\u6807\u7B7E",required:"\u5FC5\u586B\u5B57\u6BB5",requiredHint:"\u5FC5\u586B\u6821\u9A8C\u63D0\u793A",validation:"\u5B57\u6BB5\u6821\u9A8C",validationHelp:"\u652F\u6301\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F",validationHint:"\u6821\u9A8C\u5931\u8D25\u63D0\u793A",readonly:"\u53EA\u8BFB",disabled:"\u7981\u7528",hidden:"\u9690\u85CF",textContent:"\u9759\u6001\u6587\u5B57",preWrap:"\u81EA\u52A8\u6362\u884C",htmlContent:"HTML",clearable:"\u53EF\u6E05\u9664",editable:"\u53EF\u8F93\u5165",format:"\u663E\u793A\u683C\u5F0F",valueFormat:"\u7ED1\u5B9A\u503C\u683C\u5F0F",showPassword:"\u53EF\u663E\u793A\u5BC6\u7801",filterable:"\u53EF\u641C\u7D22\u9009\u9879",allowCreate:"\u5141\u8BB8\u521B\u5EFA\u9009\u9879",remote:"\u53EF\u8FDC\u7A0B\u641C\u7D22",automaticDropdown:"\u81EA\u52A8\u5F39\u51FA\u9009\u9879",multiple:"\u9009\u9879\u53EF\u591A\u9009",multipleLimit:"\u591A\u9009\u6570\u91CF\u9650\u5236",checkStrictly:"\u4EFB\u610F\u7EA7\u8282\u70B9\u53EF\u9009",showAllLevels:"\u663E\u793A\u5B8C\u6574\u8DEF\u5F84",contentPosition:"\u6587\u5B57\u4F4D\u7F6E",plain:"\u6734\u7D20\u6309\u94AE",round:"\u5706\u89D2\u6309\u94AE",circle:"\u5706\u5F62\u6309\u94AE",icon:"\u56FE\u6807",optionsSetting:"\u9009\u9879\u8BBE\u7F6E",addOption:"\u589E\u52A0\u9009\u9879",importOptions:"\u5BFC\u5165\u9009\u9879",resetDefault:"\u91CD\u8BBE\u9009\u4E2D\u9879",uploadSetting:"\u4E0A\u4F20\u53C2\u6570\u8BBE\u7F6E",uploadURL:"\u4E0A\u4F20\u5730\u5740",uploadTip:"\u4E0A\u4F20\u63D0\u793A\u5185\u5BB9",withCredentials:"\u53D1\u9001cookie\u51ED\u8BC1",multipleSelect:"\u6587\u4EF6\u53EF\u591A\u9009",showFileList:"\u663E\u793A\u6587\u4EF6\u5217\u8868",limit:"\u6700\u5927\u4E0A\u4F20\u6570\u91CF",fileMaxSize:"\u6587\u4EF6\u5927\u5C0F\u9650\u5236(MB)",fileTypes:"\u4E0A\u4F20\u6587\u4EF6\u7C7B\u578B",fileTypesHelp:"\u652F\u6301\u6DFB\u52A0\u5176\u4ED6\u6587\u4EF6\u7C7B\u578B",headers:"\u4E0A\u4F20\u8BF7\u6C42\u5934",cellWidth:"\u5BBD\u5EA6",cellHeight:"\u9AD8\u5EA6",wordBreak:"\u6587\u5B57\u81EA\u52A8\u6362\u884C",gridColHeight:"\u6805\u683C\u5217\u7EDF\u4E00\u9AD8\u5EA6(px)",gutter:"\u6805\u683C\u95F4\u9694(px)",columnSetting:"\u6805\u683C\u5C5E\u6027\u8BBE\u7F6E",colsOfGrid:"\u5F53\u524D\u6805\u683C\u5217:",colSpanTitle:"\u6805\u683C\u5BBD\u5EA6",colOffsetTitle:"\u5DE6\u4FA7\u95F4\u9694\u683C\u6570",colPushTitle:"\u53F3\u79FB\u6805\u683C\u6570",colPullTitle:"\u5DE6\u79FB\u6805\u683C\u6570",addColumn:"\u589E\u52A0\u6805\u683C",responsive:"\u54CD\u5E94\u5F0F\u5E03\u5C40",tabPaneSetting:"\u9009\u9879\u5361\u8BBE\u7F6E",addTabPane:"\u589E\u52A0\u9009\u9879\u5361\u9875",paneActive:"\u6FC0\u6D3B",customLabelIcon:"\u5B9A\u5236\u5B57\u6BB5\u6807\u7B7E",labelIconClass:"\u6807\u7B7EIcon\u6837\u5F0F",labelIconPosition:"\u6807\u7B7EIcon\u4F4D\u7F6E",labelTooltip:"\u6807\u7B7E\u6587\u5B57\u63D0\u793A",minValue:"\u6700\u5C0F\u503C",maxValue:"\u6700\u5927\u503C",precision:"\u7CBE\u5EA6",step:"\u589E\u51CF\u6B65\u957F",controlsPosition:"\u63A7\u5236\u6309\u94AE\u4F4D\u7F6E",minLength:"\u6700\u5C0F\u957F\u5EA6",maxLength:"\u6700\u5927\u957F\u5EA6",showWordLimit:"\u663E\u793A\u5B57\u6570\u7EDF\u8BA1",prefixIcon:"\u5934\u90E8Icon",suffixIcon:"\u5C3E\u90E8Icon",inputButton:"\u8F93\u5165\u6846\u6309\u94AE\u8BBE\u7F6E",appendButton:"\u6DFB\u52A0\u540E\u7F6E\u6309\u94AE",appendButtonDisabled:"\u540E\u7F6E\u6309\u94AE\u7981\u7528",appendButtonIcon:"\u540E\u7F6E\u6309\u94AEIcon",buttonIcon:"\u6309\u94AEIcon",switchWidth:"\u5F00\u5173\u5BBD\u5EA6\uFF08\u50CF\u7D20\uFF09",activeText:"\u5F00\u542F\u65F6\u6587\u5B57\u63CF\u8FF0",inactiveText:"\u5173\u95ED\u65F6\u6587\u5B57\u63CF\u8FF0",activeColor:"\u5F00\u542F\u65F6\u80CC\u666F\u8272",inactiveColor:"\u5173\u95ED\u65F6\u80CC\u666F\u8272",maxStars:"\u6700\u5927\u8BC4\u5206\u503C",lowThreshold:"\u4F4E\u5206\u754C\u9650\u503C",highThreshold:"\u9AD8\u5206\u754C\u9650\u503C",allowHalf:"\u5141\u8BB8\u534A\u9009",showText:"\u663E\u793A\u8F85\u52A9\u6587\u5B57",showScore:"\u663E\u793A\u5F53\u524D\u5206\u6570",range:"\u662F\u5426\u4E3A\u8303\u56F4\u9009\u62E9",vertical:"\u662F\u5426\u7AD6\u5411\u663E\u793A",showBlankRow:"\u9ED8\u8BA4\u663E\u793A\u65B0\u884C",showRowNumber:"\u663E\u793A\u884C\u53F7",contentHeight:"\u5185\u5BB9\u533A\u9AD8\u5EA6",insertColumnToLeft:"\u63D2\u5165\u5DE6\u4FA7\u5217",insertColumnToRight:"\u63D2\u5165\u53F3\u4FA7\u5217",insertRowAbove:"\u63D2\u5165\u4E0A\u65B9\u884C",insertRowBelow:"\u63D2\u5165\u4E0B\u65B9\u884C",mergeLeftColumn:"\u5408\u5E76\u5DE6\u4FA7\u5355\u5143\u683C",mergeRightColumn:"\u5408\u5E76\u53F3\u4FA7\u5355\u5143\u683C",mergeEntireRow:"\u5408\u5E76\u6574\u884C",mergeRowAbove:"\u5408\u5E76\u4E0A\u65B9\u5355\u5143\u683C",mergeRowBelow:"\u5408\u5E76\u4E0B\u65B9\u5355\u5143\u683C",mergeEntireColumn:"\u5408\u5E76\u6574\u5217",undoMergeCol:"\u64A4\u9500\u5217\u5408\u5E76",undoMergeRow:"\u64A4\u9500\u884C\u5408\u5E76",deleteEntireCol:"\u5220\u9664\u6574\u5217",deleteEntireRow:"\u5220\u9664\u6574\u884C",widgetName:"\u7EC4\u4EF6\u552F\u4E00\u540D\u79F0",formSize:"\u5168\u5C40\u7EC4\u4EF6\u5927\u5C0F",labelPosition:"\u6807\u7B7E\u4F4D\u7F6E",topPosition:"\u9876\u90E8",leftPosition:"\u5DE6\u8FB9",labelAlign:"\u5B57\u6BB5\u6807\u7B7E\u5BF9\u9F50",leftAlign:"\u5C45\u5DE6",centerAlign:"\u5C45\u4E2D",rightAlign:"\u5C45\u53F3",formCss:"\u8868\u5355\u5168\u5C40CSS",addCss:"\u7F16\u5199CSS",customClass:"\u81EA\u5B9A\u4E49CSS\u6837\u5F0F",globalFunctions:"\u8868\u5355\u5168\u5C40\u51FD\u6570",addEventHandler:"\u7F16\u5199\u4EE3\u7801",editWidgetEventHandler:"\u7EC4\u4EF6\u4E8B\u4EF6\u5904\u7406",editFormEventHandler:"\u8868\u5355\u4E8B\u4EF6\u5904\u7406",formSFCSetting:"\u751F\u6210SFC\u8BBE\u7F6E",formModelName:"\u6570\u636E\u5BF9\u8C61\u540D\u79F0",formRefName:"\u5F15\u7528\u540D\u79F0",formRulesName:"\u9A8C\u8BC1\u89C4\u5219\u540D\u79F0",syntaxCheckWarning:"JS\u4EE3\u7801\u5B58\u5728\u8BED\u6CD5\u9519\u8BEF\uFF0C\u8BF7\u4ED4\u7EC6\u68C0\u67E5\uFF01"}}},enLocale_render={render:{hint:{prompt:"Prompt",confirm:"OK",cancel:"Cancel",selectPlaceholder:"Pick some item",timePlaceholder:"Select time",startTimePlaceholder:"Start time",endTimePlaceholder:"End time",datePlaceholder:"Select date",startDatePlaceholder:"Start date",endDatePlaceholder:"End date",blankCellContent:"--",uploadError:"Upload error: ",uploadExceed:"The maximum number(${uploadLimit}) of file uploads has been exceeded.",unsupportedFileType:"Unsupported format: ",fileSizeExceed:"File size out of limit: ",refNotFound:"Ref not found: ",fieldRequired:"Input value should be not null.",invalidNumber:"Invalid number format",selectFile:" File...",downloadFile:"Download",removeFile:"Remove",validationFailed:"Form validation failed",subFormAction:"Action",subFormAddAction:"Add",subFormAddActionHint:"add new row",insertSubFormRow:"insert new row",deleteSubFormRow:"delete this row",nonSubFormType:"The type of widget don't match sub-form"}}},zhLocale_render={render:{hint:{prompt:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",selectPlaceholder:"\u8BF7\u9009\u62E9",timePlaceholder:"\u9009\u62E9\u65F6\u95F4",startTimePlaceholder:"\u8D77\u59CB\u65F6\u95F4",endTimePlaceholder:"\u622A\u6B62\u65F6\u95F4",datePlaceholder:"\u9009\u62E9\u65E5\u671F",startDatePlaceholder:"\u8D77\u59CB\u65E5\u671F",endDatePlaceholder:"\u622A\u6B62\u65E5\u671F",blankCellContent:"--",uploadError:"\u4E0A\u4F20\u9519\u8BEF: ",uploadExceed:"\u6700\u5927\u4E0A\u4F20\u6570\u91CF(${uploadLimit})\u5DF2\u8D85\u51FA.",unsupportedFileType:"\u4E0D\u652F\u6301\u683C\u5F0F: ",fileSizeExceed:"\u6587\u4EF6\u5927\u5C0F\u5DF2\u8D85\u51FA: ",refNotFound:"\u7EC4\u4EF6\u672A\u627E\u5230: ",fieldRequired:"\u5B57\u6BB5\u503C\u4E0D\u53EF\u4E3A\u7A7A",invalidNumber:"\u6570\u636E\u683C\u5F0F\u9519\u8BEF",selectFile:" \u9009\u62E9\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D",removeFile:"\u79FB\u9664",validationFailed:"\u8868\u5355\u6570\u636E\u6821\u9A8C\u5931\u8D25",subFormAction:"\u64CD\u4F5C",subFormAddAction:"\u65B0\u589E",subFormAddActionHint:"\u65B0\u589E\u884C",insertSubFormRow:"\u63D2\u5165\u884C",deleteSubFormRow:"\u5220\u9664\u884C",nonSubFormType:"\u7EC4\u4EF6\u7C7B\u578B\u4E0D\u662F\u5B50\u8868\u5355"}}},enLocale_extension={extension:{widgetLabel:{card:"Card",alert:"Alert"},setting:{cardFolded:"Folded",cardShowFold:"Show Fold",cardWidth:"Width Of Card",cardShadow:"Shadow",alertTitle:"Title",alertType:"Type",description:"Description",closable:"Closable",closeText:"Text On Close Btn",center:"Center",showIcon:"Show Icon",effect:"Effect"}}},zhLocale_extension={extension:{widgetLabel:{card:"\u5361\u7247",alert:"\u63D0\u793A"},setting:{cardFolded:"\u662F\u5426\u6536\u8D77",cardShowFold:"\u663E\u793A\u6298\u53E0\u6309\u94AE",cardWidth:"\u5361\u7247\u5BBD\u5EA6",cardShadow:"\u663E\u793A\u9634\u5F71",alertTitle:"\u6807\u9898",alertType:"\u7C7B\u578B",description:"\u8F85\u52A9\u6027\u6587\u5B57",closable:"\u662F\u5426\u53EF\u5173\u95ED",closeText:"\u5173\u95ED\u6309\u94AE\u6587\u5B57",center:"\u6587\u5B57\u5C45\u4E2D",showIcon:"\u663E\u793A\u56FE\u6807",effect:"\u663E\u793A\u6548\u679C"}}};const langResources={"en-US":Se(Se(Se({something:{}},enLocale),enLocale_render),enLocale_extension),"zh-CN":Se(Se(Se({something:{}},zhLocale),zhLocale_render),zhLocale_extension)},i18n=createI18n({locale:localStorage.getItem("v_form_locale")||"zh-CN",messages:langResources}),changeLocale=function(t){i18n.setLang(t),localStorage.setItem("v_form_locale",t)},translate=function(t){return i18n.$st(t)};var i18n$1={methods:{i18nt(t){return i18n.$st(t)},i18n2t(t,d){return i18n.$st2(t,d)}}},index_vue_vue_type_style_index_0_scoped_true_lang$7="",_export_sfc$1=(t,d)=>{const e=t.__vccOpts||t;for(const[h,m]of d)e[h]=m;return e};const _sfc_main$39={name:"SvgIcon",props:{iconClass:{type:String,required:!0},className:{type:String},title:{type:String,default:""}},computed:{iconName(){return`#icon-${this.iconClass}`},svgClass(){return this.className?"svg-icon "+this.className:"svg-icon"}}},_hoisted_1$F=["xlink:href"],_hoisted_2$s={key:0};function _sfc_render$39(t,d,e,h,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("svg",{class:require$$0$1.normalizeClass(g.svgClass),"aria-hidden":"true"},[require$$0$1.createElementVNode("use",{"xlink:href":g.iconName},null,8,_hoisted_1$F),e.title?(require$$0$1.openBlock(),require$$0$1.createElementBlock("title",_hoisted_2$s,require$$0$1.toDisplayString(e.title),1)):require$$0$1.createCommentVNode("",!0)],2)}var SvgIcon=_export_sfc$1(_sfc_main$39,[["render",_sfc_render$39],["__scopeId","data-v-8002b89a"]]),index_vue_vue_type_style_index_0_scoped_true_lang$6="";const _sfc_main$38={name:"FieldPanel",mixins:[i18n$1],components:{SvgIcon},props:{designer:Object},inject:["getBannedWidgets","getDesignerConfig"],data(){return{designerConfig:this.getDesignerConfig(),firstTab:"componentLib",scrollerHeight:0,activeNames:["1","2","3","4"],containers:[],basicFields:[],advancedFields:[],customFields:[],formTemplates}},computed:{},created(){this.loadWidgets()},mounted(){console.log("designerdesigner",this.i18nt("designer")),this.scrollerHeight=window.innerHeight-56+"px",addWindowResizeHandler(()=>{this.$nextTick(()=>{this.scrollerHeight=window.innerHeight-56+"px"})})},methods:{isBanned(t){return this.getBannedWidgets().indexOf(t)>-1},showFormTemplates(){return this.designerConfig.formTemplates===void 0?!0:!!this.designerConfig.formTemplates},loadWidgets(){this.containers=containers.map(t=>ke(Se({key:generateId()},t),{displayName:this.i18n2t(`designer.widgetLabel.${t.type}`,`extension.widgetLabel.${t.type}`)})).filter(t=>!t.internal&&!this.isBanned(t.type)),this.basicFields=basicFields.map(t=>ke(Se({key:generateId()},t),{displayName:this.i18n2t(`designer.widgetLabel.${t.type}`,`extension.widgetLabel.${t.type}`)})).filter(t=>!this.isBanned(t.type)),this.advancedFields=advancedFields.map(t=>ke(Se({key:generateId()},t),{displayName:this.i18n2t(`designer.widgetLabel.${t.type}`,`extension.widgetLabel.${t.type}`)})).filter(t=>!this.isBanned(t.type)),this.customFields=customFields.map(t=>ke(Se({key:generateId()},t),{displayName:this.i18n2t(`designer.widgetLabel.${t.type}`,`extension.widgetLabel.${t.type}`)})).filter(t=>!this.isBanned(t.type))},handleContainerWidgetClone(t){return this.designer.copyNewContainerWidget(t)},handleFieldWidgetClone(t){return this.designer.copyNewFieldWidget(t)},checkContainerMove(t){return this.designer.checkWidgetMove(t)},checkFieldMove(t){return this.designer.checkFieldMove(t)},onContainerDragEnd(t){},addContainerByDbClick(t){this.designer.addContainerByDbClick(t)},addFieldByDbClick(t){this.designer.addFieldByDbClick(t)},loadFormTemplate(t){this.$confirm(this.i18nt("designer.hint.loadFormTemplateHint"),this.i18nt("render.hint.prompt"),{confirmButtonText:this.i18nt("render.hint.confirm"),cancelButtonText:this.i18nt("render.hint.cancel")}).then(()=>{axios.get(t).then(d=>{let e=!1;typeof d.data=="string"?e=this.designer.loadFormJson(JSON.parse(d.data)):d.data.constructor===Object&&(e=this.designer.loadFormJson(d.data)),e&&this.designer.emitHistoryChange(),this.$message.success(this.i18nt("designer.hint.loadFormTemplateSuccess"))}).catch(d=>{this.$message.error(this.i18nt("designer.hint.loadFormTemplateFailed")+":"+d)})}).catch(d=>{console.error(d)})}}},_hoisted_1$E={class:"panel-container"},_hoisted_2$r=["title","onDblclick"],_hoisted_3$m=["title","onDblclick"],_hoisted_4$f=["title","onDblclick"],_hoisted_5$d=["title","onDblclick"],_hoisted_6$c=["src"],_hoisted_7$9=["src"],_hoisted_8$6={class:"bottom clear-fix"},_hoisted_9$4={class:"ft-title"};function _sfc_render$38(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("svg-icon"),u=require$$0$1.resolveComponent("draggable"),r=require$$0$1.resolveComponent("el-collapse-item"),f=require$$0$1.resolveComponent("el-collapse"),l=require$$0$1.resolveComponent("el-tab-pane"),n=require$$0$1.resolveComponent("el-popover"),i=require$$0$1.resolveComponent("el-button"),o=require$$0$1.resolveComponent("el-card"),s=require$$0$1.resolveComponent("el-tabs"),c=require$$0$1.resolveComponent("el-scrollbar");return require$$0$1.openBlock(),require$$0$1.createBlock(c,{class:"side-scroll-bar",style:require$$0$1.normalizeStyle({height:m.scrollerHeight})},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$E,[require$$0$1.createVNode(s,{modelValue:m.firstTab,"onUpdate:modelValue":d[1]||(d[1]=p=>m.firstTab=p),class:"no-bottom-margin indent-left-margin"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(l,{name:"componentLib"},{label:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":"el-set-up"}),require$$0$1.createTextVNode(" "+require$$0$1.toDisplayString(t.i18nt("designer.componentLib")),1)])]),default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(f,{modelValue:m.activeNames,"onUpdate:modelValue":d[0]||(d[0]=p=>m.activeNames=p),class:"widget-collapse"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(r,{name:"1",title:t.i18nt("designer.containerTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{tag:"ul",list:m.containers,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},clone:g.handleContainerWidgetClone,"ghost-class":"ghost",sort:!1,move:g.checkContainerMove,onEnd:g.onContainerDragEnd},{item:require$$0$1.withCtx(({element:p})=>[require$$0$1.createElementVNode("li",{class:"container-widget-item",title:p.displayName,onDblclick:$=>g.addContainerByDbClick(p)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":p.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.i18n2t(`designer.widgetLabel.${p.type}`,`extension.widgetLabel.${p.type}`)),1)])],40,_hoisted_2$r)]),_:1},8,["list","clone","move","onEnd"])]),_:1},8,["title"]),require$$0$1.createVNode(r,{name:"2",title:t.i18nt("designer.basicFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{tag:"ul",list:m.basicFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:g.checkFieldMove,clone:g.handleFieldWidgetClone,"ghost-class":"ghost",sort:!1},{item:require$$0$1.withCtx(({element:p})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:p.displayName,onDblclick:$=>g.addFieldByDbClick(p)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":p.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.i18n2t(`designer.widgetLabel.${p.type}`,`extension.widgetLabel.${p.type}`)),1)])],40,_hoisted_3$m)]),_:1},8,["list","move","clone"])]),_:1},8,["title"]),require$$0$1.createVNode(r,{name:"3",title:t.i18nt("designer.advancedFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{tag:"ul",list:m.advancedFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:g.checkFieldMove,clone:g.handleFieldWidgetClone,"ghost-class":"ghost",sort:!1},{item:require$$0$1.withCtx(({element:p})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:p.displayName,onDblclick:$=>g.addFieldByDbClick(p)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":p.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.i18n2t(`designer.widgetLabel.${p.type}`,`extension.widgetLabel.${p.type}`)),1)])],40,_hoisted_4$f)]),_:1},8,["list","move","clone"])]),_:1},8,["title"]),require$$0$1.createVNode(r,{name:"4",title:t.i18nt("designer.customFieldTitle")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{tag:"ul",list:m.customFields,"item-key":"key",group:{name:"dragGroup",pull:"clone",put:!1},move:g.checkFieldMove,clone:g.handleFieldWidgetClone,"ghost-class":"ghost",sort:!1},{item:require$$0$1.withCtx(({element:p})=>[require$$0$1.createElementVNode("li",{class:"field-widget-item",title:p.displayName,onDblclick:$=>g.addFieldByDbClick(p)},[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":p.icon,"class-name":"color-svg-icon"},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.i18n2t(`designer.widgetLabel.${p.type}`,`extension.widgetLabel.${p.type}`)),1)])],40,_hoisted_5$d)]),_:1},8,["list","move","clone"])]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),g.showFormTemplates()?(require$$0$1.openBlock(),require$$0$1.createBlock(l,{key:0,name:"formLib",style:{padding:"8px"}},{label:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("span",null,[require$$0$1.createVNode(a,{"icon-class":"el-form-template"}),require$$0$1.createTextVNode(" "+require$$0$1.toDisplayString(t.i18nt("designer.formLib")),1)])]),default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(m.formTemplates,(p,$)=>(require$$0$1.openBlock(),require$$0$1.createBlock(o,{"bord-style":{padding:"0"},shadow:"hover",class:"ft-card"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(n,{placement:"right",trigger:"hover"},{reference:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:p.imgUrl,style:{width:"200px"}},null,8,_hoisted_6$c)]),default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("img",{src:p.imgUrl,style:{height:"600px",width:"720px"}},null,8,_hoisted_7$9)]),_:2},1024),require$$0$1.createElementVNode("div",_hoisted_8$6,[require$$0$1.createElementVNode("span",_hoisted_9$4,"#"+require$$0$1.toDisplayString($+1)+" "+require$$0$1.toDisplayString(p.title),1),require$$0$1.createVNode(i,{link:"",type:"primary",class:"right-button",onClick:v=>g.loadFormTemplate(p.jsonUrl)},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.i18nt("designer.hint.loadFormTemplate")),1)]),_:2},1032,["onClick"])])]),_:2},1024))),256))]),_:1})):require$$0$1.createCommentVNode("",!0)]),_:1},8,["modelValue"])])]),_:1},8,["style"])}var WidgetPanel=_export_sfc$1(_sfc_main$38,[["render",_sfc_render$38],["__scopeId","data-v-335b6326"]]),emitter={data(){return{vfEvents:{}}},methods:{emit$(t,d){this.vfEvents[t]&&this.vfEvents[t].forEach(e=>{e(d)})},on$(t,d){this.vfEvents[t]=this.vfEvents[t]||[],this.vfEvents[t].push(d)},off$(t,d){if(this.vfEvents[t]){if(d==null){this.vfEvents[t].length=0;return}for(let e=0;e{if(this.widgetRefList[m].$options.componentName===d){let a=this.widgetRefList[m];a.emit$.call(a,e,h)}}),this.refList&&Object.keys(this.refList).forEach(m=>{if(this.refList[m].$options.componentName===d){let a=this.refList[m];a.emit$.call(a,e,h)}})}}};const _sfc_main$37={name:"container-item-wrapper",props:{widget:Object},computed:{customClass(){return this.widget.options.customClass?this.widget.options.customClass.join(" "):""}}};function _sfc_render$37(t,d,e,h,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["container-wrapper",[g.customClass]])},[require$$0$1.renderSlot(t.$slots,"default")],2)}var ContainerItemWrapper=_export_sfc$1(_sfc_main$37,[["render",_sfc_render$37]]),__glob_0_0$3=Object.freeze(Object.defineProperty({__proto__:null,default:ContainerItemWrapper},Symbol.toStringTag,{value:"Module"})),refMixin={methods:{initRefList(){this.refList!==null&&!!this.widget.options.name&&(this.refList[this.widget.options.name]=this)},getWidgetRef(t,d){let e=this.refList[t];return!e&&!!d&&this.$message.error(this.i18nt("render.hint.refNotFound")+t),e},getFormRef(){return this.refList.v_form_ref},getComponentByContainer(t){return t.type==="grid"?"vf-grid-item":t.type+"-item"}}},staticContentWrapper_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$36={name:"static-content-wrapper",mixins:[i18n$1],components:{SvgIcon},props:{field:Object,designer:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designState:{type:Boolean,default:!1},displayStyle:{type:String,default:"block"},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},computed:{selected(){return!!this.designer&&this.field.id===this.designer.selectedId},customClass(){return this.field.options.customClass?this.field.options.customClass.join(" "):""}},methods:{selectField(t){this.designer&&(this.designer.setSelected(t),this.designer.emitEvent("field-selected",this.parentWidget))},selectParentWidget(){this.parentWidget?this.designer.setSelected(this.parentWidget):this.designer.clearSelected()},moveUpWidget(){this.designer.moveUpWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},moveDownWidget(){this.designer.moveDownWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},removeFieldWidget(){if(this.parentList){const t=this.designer.selectedWidgetName;let d=null;this.parentList.length===1?this.parentWidget&&(d=this.parentWidget):this.parentList.length===1+this.indexOfParentList?d=this.parentList[this.indexOfParentList-1]:d=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(d),this.designer.formWidget.deleteWidgetRef(t),this.designer.emitHistoryChange()})}}}},_hoisted_1$D={key:0,class:"field-action"},_hoisted_2$q=["title"],_hoisted_3$l=["title"],_hoisted_4$e=["title"],_hoisted_5$c=["title"],_hoisted_6$b={key:1,class:"drag-handler background-opacity"},_hoisted_7$8=["title"],_hoisted_8$5={key:0};function _sfc_render$36(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("svg-icon");return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["field-wrapper",{"design-time-bottom-margin":!!this.designer}]),style:require$$0$1.normalizeStyle({display:e.displayStyle})},[!e.field.options.hidden||e.designState===!0?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:0,class:require$$0$1.normalizeClass(["static-content-item",[g.selected?"selected":"",g.customClass]]),style:require$$0$1.normalizeStyle({display:e.displayStyle}),onClick:d[0]||(d[0]=require$$0$1.withModifiers(u=>g.selectField(e.field),["stop"]))},[require$$0$1.renderSlot(t.$slots,"default",{},void 0,!0)],6)):require$$0$1.createCommentVNode("",!0),this.designer?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$D,[require$$0$1.createElementVNode("i",{title:t.i18nt("designer.hint.selectParentWidget"),onClick:d[1]||(d[1]=require$$0$1.withModifiers(u=>g.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-back"})],8,_hoisted_2$q),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:0,title:t.i18nt("designer.hint.moveUpWidget"),onClick:d[2]||(d[2]=require$$0$1.withModifiers(u=>g.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-up"})],8,_hoisted_3$l)):require$$0$1.createCommentVNode("",!0),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:1,title:t.i18nt("designer.hint.moveDownWidget"),onClick:d[3]||(d[3]=require$$0$1.withModifiers(u=>g.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-down"})],8,_hoisted_4$e)):require$$0$1.createCommentVNode("",!0),require$$0$1.createElementVNode("i",{title:t.i18nt("designer.hint.remove"),onClick:d[4]||(d[4]=require$$0$1.withModifiers((...u)=>g.removeFieldWidget&&g.removeFieldWidget(...u),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-delete"})],8,_hoisted_5$c)])):require$$0$1.createCommentVNode("",!0),e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$b,[require$$0$1.createElementVNode("i",{title:t.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(a,{"icon-class":"el-drag-move"})],8,_hoisted_7$8),require$$0$1.createElementVNode("i",null,require$$0$1.toDisplayString(t.i18n2t(`designer.widgetLabel.${e.field.type}`,`extension.widgetLabel.${e.field.type}`)),1),e.field.options.hidden===!0?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",_hoisted_8$5,[require$$0$1.createVNode(a,{"icon-class":"el-hide"})])):require$$0$1.createCommentVNode("",!0)])):require$$0$1.createCommentVNode("",!0)],64)):require$$0$1.createCommentVNode("",!0)],6)}var StaticContentWrapper=_export_sfc$1(_sfc_main$36,[["render",_sfc_render$36],["__scopeId","data-v-41799baa"]]),__glob_0_19$1=Object.freeze(Object.defineProperty({__proto__:null,default:StaticContentWrapper},Symbol.toStringTag,{value:"Module"}));const getRegExp=function(t){return{number:"/^[-]?\\d+(\\.\\d+)?$/",letter:"/^[A-Za-z]+$/",letterAndNumber:"/^[A-Za-z0-9]+$/",mobilePhone:"/^[1][3-9][0-9]{9}$/",letterStartNumberIncluded:"/^[A-Za-z]+[A-Za-z\\d]*$/",noChinese:"/^[^\u4E00-\u9FA5]+$/",chinese:"/^[\u4E00-\u9FA5]+$/",email:"/^([-_A-Za-z0-9.]+)@([_A-Za-z0-9]+\\.)+[A-Za-z0-9]{2,3}$/",url:"/^([hH][tT]{2}[pP]:\\/\\/|[hH][tT]{2}[pP][sS]:\\/\\/)(([A-Za-z0-9-~]+)\\.)+([A-Za-z0-9-~\\/])+$/"}[t]},validateFn=function(validatorName,rule,value,callback,defaultErrorMsg){if(isNull(value)||value.length<=0){callback();return}const reg=eval(getRegExp(validatorName));if(reg.test(value))callback();else{let t=rule.errorMsg||defaultErrorMsg;callback(new Error(t))}},FormValidators={number(t,d,e){validateFn("number",t,d,e,"["+t.label+"]\u5305\u542B\u975E\u6570\u5B57\u5B57\u7B26")},letter(t,d,e){validateFn("letter",t,d,e,"["+t.label+"]\u5305\u542B\u975E\u5B57\u6BCD\u5B57\u7B26")},letterAndNumber(t,d,e){validateFn("letterAndNumber",t,d,e,"["+t.label+"]\u53EA\u80FD\u8F93\u5165\u5B57\u6BCD\u6216\u6570\u5B57")},mobilePhone(t,d,e){validateFn("mobilePhone",t,d,e,"["+t.label+"]\u624B\u673A\u53F7\u7801\u683C\u5F0F\u6709\u8BEF")},noBlankStart(t,d,e){},noBlankEnd(t,d,e){},letterStartNumberIncluded(t,d,e){validateFn("letterStartNumberIncluded",t,d,e,"["+t.label+"]\u5FC5\u987B\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF0C\u53EF\u5305\u542B\u6570\u5B57")},noChinese(t,d,e){validateFn("noChinese",t,d,e,"["+t.label+"]\u4E0D\u53EF\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},chinese(t,d,e){validateFn("chinese",t,d,e,"["+t.label+"]\u53EA\u80FD\u8F93\u5165\u4E2D\u6587\u5B57\u7B26")},email(t,d,e){validateFn("email",t,d,e,"["+t.label+"]\u90AE\u7BB1\u683C\u5F0F\u6709\u8BEF")},url(t,d,e){validateFn("url",t,d,e,"["+t.label+"]URL\u683C\u5F0F\u6709\u8BEF")},regExp(rule,value,callback){if(isNull(value)||value.length<=0){callback();return}const pattern=eval(rule.regExp);if(pattern.test(value))callback();else{let t=rule.errorMsg||"["+rule.label+"]invalid value";callback(new Error(t))}}};function mitt(t){return{all:t=t||new Map,on:function(d,e){var h=t.get(d);h?h.push(e):t.set(d,[e])},off:function(d,e){var h=t.get(d);h&&(e?h.splice(h.indexOf(e)>>>0,1):t.set(d,[]))},emit:function(d,e){var h=t.get(d);h&&h.slice().map(function(m){m(e)}),(h=t.get("*"))&&h.slice().map(function(m){m(d,e)})}}}const instance=mitt(),eventBus={};eventBus.$on=instance.on,eventBus.$off=instance.off,eventBus.$emit=instance.emit;var fieldMixin={inject:["refList","getFormConfig","getGlobalDsv","globalOptionData","globalModel","getOptionData"],computed:{formConfig(){return this.getFormConfig()},widgetSize(){return this.field.options.size||"default"},subFormName(){return this.parentWidget?this.parentWidget.options.name:""},subFormItemFlag(){return this.parentWidget?this.parentWidget.type==="sub-form":!1},formModel:{cache:!1,get(){return this.globalModel.formModel}}},methods:{getPropName(){return this.subFormItemFlag&&!this.designState?this.subFormName+"."+this.subFormRowIndex+"."+this.field.options.name+"":this.field.options.name},initFieldModel(){if(!!this.field.formItemFlag){if(!!this.subFormItemFlag&&!this.designState){let t=this.formModel[this.subFormName];(t===void 0||t[this.subFormRowIndex]===void 0||t[this.subFormRowIndex][this.field.options.name]===void 0)&&this.field.options.defaultValue!==void 0?(this.fieldModel=this.field.options.defaultValue,t[this.subFormRowIndex][this.field.options.name]=this.field.options.defaultValue):t[this.subFormRowIndex][this.field.options.name]===void 0?(this.fieldModel=null,t[this.subFormRowIndex][this.field.options.name]=null):this.fieldModel=t[this.subFormRowIndex][this.field.options.name],setTimeout(()=>{this.handleOnChangeForSubForm(this.fieldModel,this.oldFieldValue,t,this.subFormRowId)},800),this.oldFieldValue=deepClone(this.fieldModel),this.initFileList();return}this.formModel[this.field.options.name]===void 0&&this.field.options.defaultValue!==void 0?this.fieldModel=this.field.options.defaultValue:this.formModel[this.field.options.name]===void 0?this.formModel[this.field.options.name]=null:this.fieldModel=this.formModel[this.field.options.name],this.oldFieldValue=deepClone(this.fieldModel),this.initFileList()}},initFileList(){this.field.type!=="picture-upload"&&this.field.type!=="file-upload"||this.designState===!0||this.fieldModel&&(Array.isArray(this.fieldModel)?this.fileList=deepClone(this.fieldModel):this.fileList.splice(0,0,deepClone(this.fieldModel)))},initEventHandler(){this.on$("setFormData",t=>{console.log("formModel of globalModel----------",this.globalModel.formModel),this.subFormItemFlag||this.setValue(t[this.field.options.name])}),this.on$("field-value-changed",t=>{if(this.subFormItemFlag){let d=this.formModel[this.subFormName];this.handleOnChangeForSubForm(t[0],t[1],d,this.subFormRowId)}else this.handleOnChange(t[0],t[1])}),this.on$("reloadOptionItems",t=>{(t.length===0||t.indexOf(this.field.options.name)>-1)&&this.initOptionItems(!0)})},handleOnCreated(){this.field.options.onCreated&&new Function(this.field.options.onCreated).call(this)},handleOnMounted(){this.field.options.onMounted&&new Function(this.field.options.onMounted).call(this)},registerToRefList(t){this.refList!==null&&!!this.field.options.name&&(this.subFormItemFlag&&!this.designState?(t&&delete this.refList[t+"@row"+this.subFormRowId],this.refList[this.field.options.name+"@row"+this.subFormRowId]=this):(t&&delete this.refList[t],this.refList[this.field.options.name]=this))},unregisterFromRefList(){if(this.refList!==null&&!!this.field.options.name){let t=this.field.options.name;this.subFormItemFlag&&!this.designState?delete this.refList[t+"@row"+this.subFormRowId]:delete this.refList[t]}},initOptionItems(t){if(!this.designState&&(this.field.type==="radio"||this.field.type==="checkbox"||this.field.type==="select"||this.field.type==="cascader")){const d=this.getOptionData();!!d&&d.hasOwnProperty(this.field.options.name)&&(t?this.reloadOptions(d[this.field.options.name]):this.loadOptions(d[this.field.options.name]))}},refreshDefaultValue(){this.designState===!0&&this.field.options.defaultValue!==void 0&&(this.fieldModel=this.field.options.defaultValue)},clearFieldRules(){!this.field.formItemFlag||this.rules.splice(0,this.rules.length)},buildFieldRules(){if(!(!this.field.formItemFlag&&this.field.options.hidden)){if(this.rules.splice(0,this.rules.length),this.field.options.required&&this.rules.push({required:!0,trigger:["blur"],message:this.field.options.requiredHint||this.i18nt("render.hint.fieldRequired")}),this.field.options.validation){let t=this.field.options.validation;FormValidators[t]?this.rules.push({validator:FormValidators[t],trigger:["blur","change"],label:this.field.options.label,errorMsg:this.field.options.validationHint}):this.rules.push({validator:FormValidators.regExp,trigger:["blur","change"],regExp:t,label:this.field.options.label,errorMsg:this.field.options.validationHint})}if(this.field.options.onValidate){let t=(d,e,h)=>new Function("rule","value","callback",this.field.options.onValidate).call(this,d,e,h);this.rules.push({validator:t,trigger:["blur","change"],label:this.field.options.label})}}},disableChangeValidate(){!this.rules||this.rules.forEach(t=>{t.trigger&&t.trigger.splice(0,t.trigger.length)})},enableChangeValidate(){!this.rules||this.rules.forEach(t=>{t.trigger&&(t.trigger.push("blur"),t.trigger.push("change"))})},disableOptionOfList(t,d){!!t&&t.length>0&&t.forEach(e=>{e.value===d&&(e.disabled=!0)})},enableOptionOfList(t,d){!!t&&t.length>0&&t.forEach(e=>{e.value===d&&(e.disabled=!1)})},emitFieldDataChange(t,d){this.emit$("field-value-changed",[t,d]),this.dispatch("VFormRender","fieldChange",[this.field.options.name,t,d,this.subFormName,this.subFormRowIndex])},syncUpdateFormModel(t){if(!this.designState)if(this.subFormItemFlag){let e=(this.formModel[this.subFormName]||[{}])[this.subFormRowIndex];e&&(e[this.field.options.name]=t)}else this.formModel[this.field.options.name]=t},handleChangeEvent(t){this.syncUpdateFormModel(t),this.emitFieldDataChange(t,this.oldFieldValue),this.oldFieldValue=deepClone(t),this.dispatch("VFormRender","fieldValidation",[this.getPropName()])},handleFocusCustomEvent(t){this.oldFieldValue=deepClone(this.fieldModel),this.field.options.onFocus&&new Function("event",this.field.options.onFocus).call(this,t)},handleBlurCustomEvent(t){this.field.options.onBlur&&new Function("event",this.field.options.onBlur).call(this,t)},handleInputCustomEvent(t){this.syncUpdateFormModel(t),this.dispatch("VFormRender","fieldValidation",[this.getPropName()]),this.field.options.onInput&&new Function("value",this.field.options.onInput).call(this,t)},emitAppendButtonClick(){this.designState||(this.field.options.onAppendButtonClick?new Function(this.field.options.onAppendButtonClick).call(this):this.dispatch("VFormRender","appendButtonClick",[this]))},handleOnChange(t,d){this.field.options.onChange&&new Function("value","oldValue",this.field.options.onChange).call(this,t,d)},handleOnChangeForSubForm(t,d,e,h){this.field.options.onChange&&new Function("value","oldValue","subFormData","rowId",this.field.options.onChange).call(this,t,d,e,h)},handleButtonWidgetClick(){this.designState||(this.field.options.onClick?new Function(this.field.options.onClick).call(this):this.dispatch("VFormRender","buttonClick",[this]))},remoteQuery(t){this.field.options.onRemoteQuery&&new Function("keyword",this.field.options.onRemoteQuery).call(this,t)},getFormRef(){return this.refList.v_form_ref},getWidgetRef(t,d){let e=this.refList[t];return!e&&!!d&&this.$message.error(this.i18nt("render.hint.refNotFound")+t),e},getFieldEditor(){return this.$refs.fieldEditor},setValue(t){if(this.field.formItemFlag){let d=deepClone(this.fieldModel);this.fieldModel=t,this.initFileList(),this.syncUpdateFormModel(t),this.emitFieldDataChange(t,d)}},getValue(){return this.fieldModel},resetField(){let t=this.field.options.defaultValue;this.setValue(t),this.$nextTick(()=>{}),(this.field.type==="picture-upload"||this.field.type==="file-upload")&&(this.$refs.fieldEditor.clearFiles(),this.fileList.splice(0,this.fileList.length))},setWidgetOption(t,d){this.field.options.hasOwnProperty(t)&&(this.field.options[t]=d)},setReadonly(t){this.field.options.readonly=t},setDisabled(t){this.field.options.disabled=t},setAppendButtonVisible(t){this.field.options.appendButton=t},setAppendButtonDisabled(t){this.field.options.appendButtonDisabled=t},setHidden(t){this.field.options.hidden=t,t?this.clearFieldRules():this.buildFieldRules()},setRequired(t){this.field.options.required=t,this.buildFieldRules()},setLabel(t){this.field.options.label=t},focus(){!!this.getFieldEditor()&&!!this.getFieldEditor().focus&&this.getFieldEditor().focus()},clearSelectedOptions(){this.field.type!=="checkbox"&&this.field.type!=="radio"&&this.field.type!=="select"||(this.field.type==="checkbox"||this.field.type==="select"&&this.field.options.multiple?this.fieldModel=[]:this.fieldModel="")},loadOptions(t){this.field.options.optionItems=deepClone(t)},reloadOptions(t){this.field.options.optionItems=deepClone(t)},disableOption(t){this.disableOptionOfList(this.field.options.optionItems,t)},enableOption(t){this.enableOptionOfList(this.field.options.optionItems,t)},getOptionItems(){return this.field.options.optionItems},setUploadHeader(t,d){this.uploadHeaders[t]=d},setUploadData(t,d){this.uploadData[t]=d},setToolbar(t){this.customToolbar=t},isSubFormItem(){return this.parentWidget?this.parentWidget.type==="sub-form":!1},addCssClass(t){this.field.options.customClass?this.field.options.customClass.push(t):this.field.options.customClass=[t]},removeCssClass(t){if(!this.field.options.customClass)return;let d=-1;this.field.options.customClass.map((e,h)=>{e===t&&(d=h)}),d>-1&&this.field.options.customClass.splice(d,1)}}},buttonWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$35={name:"button-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$35(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-button"),u=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,"design-state":e.designState,"display-style":e.field.options.displayStyle,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",type:e.field.options.type,size:t.widgetSize,plain:e.field.options.plain,round:e.field.options.round,circle:e.field.options.circle,icon:e.field.options.icon,disabled:e.field.options.disabled,onClick:t.handleButtonWidgetClick},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(e.field.options.label),1)]),_:1},8,["type","size","plain","round","circle","icon","disabled","onClick"])]),_:1},8,["designer","field","design-state","display-style","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var buttonWidget=_export_sfc$1(_sfc_main$35,[["render",_sfc_render$35],["__scopeId","data-v-1ba2a127"]]),__glob_0_0$2=Object.freeze(Object.defineProperty({__proto__:null,default:buttonWidget},Symbol.toStringTag,{value:"Module"})),formItemWrapper_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$34={name:"form-item-wrapper",mixins:[i18n$1],components:{SvgIcon},props:{field:Object,designer:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""},rules:Array},inject:["getFormConfig"],computed:{formConfig(){return this.getFormConfig()},selected(){return!!this.designer&&this.field.id===this.designer.selectedId},label(){return this.field.options.labelHidden?"":this.field.options.label},labelWidth(){return this.field.options.labelHidden?0:this.field.options.labelWidth?this.field.options.labelWidth:this.designer?this.designer.formConfig.labelWidth:this.formConfig.labelWidth},labelAlign(){return this.field.options.labelAlign?this.field.options.labelAlign:this.designer?this.designer.formConfig.labelAlign||"label-left-align":this.formConfig.labelAlign||"label-left-align"},customClass(){return this.field.options.customClass?this.field.options.customClass.join(" "):""},subFormName(){return this.parentWidget?this.parentWidget.options.name:""},subFormItemFlag(){return this.parentWidget?this.parentWidget.type==="sub-form":!1}},created(){},methods:{selectField(t){this.designer&&(this.designer.setSelected(t),this.designer.emitEvent("field-selected",this.parentWidget))},selectParentWidget(){this.parentWidget?this.designer.setSelected(this.parentWidget):this.designer.clearSelected()},moveUpWidget(){this.designer.moveUpWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},moveDownWidget(){this.designer.moveDownWidget(this.parentList,this.indexOfParentList),this.designer.emitHistoryChange()},removeFieldWidget(){if(this.parentList){const t=this.designer.selectedWidgetName;let d=null;this.parentList.length===1?this.parentWidget&&(d=this.parentWidget):this.parentList.length===1+this.indexOfParentList?d=this.parentList[this.indexOfParentList-1]:d=this.parentList[this.indexOfParentList+1],this.$nextTick(()=>{this.parentList.splice(this.indexOfParentList,1),this.designer.setSelected(d),this.designer.formWidget.deleteWidgetRef(t),this.designer.emitHistoryChange()})}},getPropName(){return this.subFormItemFlag&&!this.designState?this.subFormName+"."+this.subFormRowIndex+"."+this.field.options.name+"":this.field.options.name}}},_hoisted_1$C={key:0,class:"custom-label"},_hoisted_2$p={key:0,class:"field-action"},_hoisted_3$k=["title"],_hoisted_4$d=["title"],_hoisted_5$b=["title"],_hoisted_6$a=["title"],_hoisted_7$7={key:1,class:"drag-handler background-opacity"},_hoisted_8$4=["title"],_hoisted_9$3={key:0};function _sfc_render$34(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("svg-icon"),u=require$$0$1.resolveComponent("el-tooltip"),r=require$$0$1.resolveComponent("el-form-item");return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{class:require$$0$1.normalizeClass(["field-wrapper",{"design-time-bottom-margin":!!this.designer}])},[!!e.field.formItemFlag&&(!e.field.options.hidden||e.designState===!0)?(require$$0$1.openBlock(),require$$0$1.createBlock(r,{key:0,label:g.label,"label-width":g.labelWidth+"px",title:e.field.options.labelTooltip,rules:e.rules,prop:g.getPropName(),class:require$$0$1.normalizeClass([g.selected?"selected":"",g.labelAlign,g.customClass,e.field.options.required?"required":""]),onClick:d[0]||(d[0]=require$$0$1.withModifiers(f=>g.selectField(e.field),["stop"]))},{label:require$$0$1.withCtx(()=>[e.field.options.labelIconClass?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_1$C,[e.field.options.labelIconPosition==="front"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[e.field.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createVNode(u,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"])]),_:1},8,["content"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1)],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1)],64))],64)):e.field.options.labelIconPosition==="rear"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[e.field.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1),require$$0$1.createVNode(u,{content:e.field.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"])]),_:1},8,["content"])],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(g.label),1),require$$0$1.createVNode(a,{"icon-class":e.field.options.labelIconClass},null,8,["icon-class"])],64))],64)):require$$0$1.createCommentVNode("",!0)])):require$$0$1.createCommentVNode("",!0)]),default:require$$0$1.withCtx(()=>[require$$0$1.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["label","label-width","title","rules","prop","class"])):require$$0$1.createCommentVNode("",!0),this.designer?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_2$p,[require$$0$1.createElementVNode("i",{title:t.i18nt("designer.hint.selectParentWidget"),onClick:d[1]||(d[1]=require$$0$1.withModifiers(f=>g.selectParentWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-back"})],8,_hoisted_3$k),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:0,title:t.i18nt("designer.hint.moveUpWidget"),onClick:d[2]||(d[2]=require$$0$1.withModifiers(f=>g.moveUpWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-up"})],8,_hoisted_4$d)):require$$0$1.createCommentVNode("",!0),!!e.parentList&&e.parentList.length>1?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",{key:1,title:t.i18nt("designer.hint.moveDownWidget"),onClick:d[3]||(d[3]=require$$0$1.withModifiers(f=>g.moveDownWidget(e.field),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-move-down"})],8,_hoisted_5$b)):require$$0$1.createCommentVNode("",!0),require$$0$1.createElementVNode("i",{title:t.i18nt("designer.hint.remove"),onClick:d[4]||(d[4]=require$$0$1.withModifiers((...f)=>g.removeFieldWidget&&g.removeFieldWidget(...f),["stop"]))},[require$$0$1.createVNode(a,{"icon-class":"el-delete"})],8,_hoisted_6$a)])):require$$0$1.createCommentVNode("",!0),e.designer.selectedId===e.field.id?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_7$7,[require$$0$1.createElementVNode("i",{title:t.i18nt("designer.hint.dragHandler")},[require$$0$1.createVNode(a,{"icon-class":"el-drag-move"})],8,_hoisted_8$4),require$$0$1.createElementVNode("i",null,require$$0$1.toDisplayString(t.i18n2t(`designer.widgetLabel.${e.field.type}`,`extension.widgetLabel.${e.field.type}`)),1),e.field.options.hidden===!0?(require$$0$1.openBlock(),require$$0$1.createElementBlock("i",_hoisted_9$3,[require$$0$1.createVNode(a,{"icon-class":"el-hide"})])):require$$0$1.createCommentVNode("",!0)])):require$$0$1.createCommentVNode("",!0)],64)):require$$0$1.createCommentVNode("",!0)],2)}var FormItemWrapper=_export_sfc$1(_sfc_main$34,[["render",_sfc_render$34],["__scopeId","data-v-150e0c61"]]),__glob_0_8$1=Object.freeze(Object.defineProperty({__proto__:null,default:FormItemWrapper},Symbol.toStringTag,{value:"Module"})),cascaderWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$33={name:"cascader-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{showFullPath(){return this.field.options.showAllLevels===void 0||!!this.field.options.showAllLevels}},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}},_hoisted_1$B={class:"full-width-input"};function _sfc_render$33(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-cascader"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$B,[require$$0$1.createVNode(a,{ref:"fieldEditor",options:e.field.options.optionItems,modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,size:t.widgetSize,clearable:e.field.options.clearable,filterable:e.field.options.filterable,placeholder:e.field.options.placeholder||t.i18nt("render.hint.selectPlaceholder"),"show-all-levels":g.showFullPath,props:{checkStrictly:e.field.options.checkStrictly,multiple:e.field.options.multiple,expandTrigger:"hover"},onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onChange:t.handleChangeEvent},null,8,["options","modelValue","disabled","size","clearable","filterable","placeholder","show-all-levels","props","onFocus","onBlur","onChange"])])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var cascaderWidget=_export_sfc$1(_sfc_main$33,[["render",_sfc_render$33],["__scopeId","data-v-ec070d7c"]]),__glob_0_1$3=Object.freeze(Object.defineProperty({__proto__:null,default:cascaderWidget},Symbol.toStringTag,{value:"Module"})),checkboxWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$32={name:"checkbox-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$32(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-checkbox-button"),u=require$$0$1.resolveComponent("el-checkbox"),r=require$$0$1.resolveComponent("el-checkbox-group"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(r,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=l=>m.fieldModel=l),disabled:e.field.options.disabled,size:t.widgetSize,onChange:t.handleChangeEvent},{default:require$$0$1.withCtx(()=>[e.field.options.buttonStyle?(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},require$$0$1.renderList(e.field.options.optionItems,(l,n)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:n,label:l.value,disabled:l.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(l.label),1)]),_:2},1032,["label","disabled","border","style"]))),128)):(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},require$$0$1.renderList(e.field.options.optionItems,(l,n)=>(require$$0$1.openBlock(),require$$0$1.createBlock(u,{key:n,label:l.value,disabled:l.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(l.label),1)]),_:2},1032,["label","disabled","border","style"]))),128))]),_:1},8,["modelValue","disabled","size","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var checkboxWidget=_export_sfc$1(_sfc_main$32,[["render",_sfc_render$32],["__scopeId","data-v-716b0a6b"]]),__glob_0_2$3=Object.freeze(Object.defineProperty({__proto__:null,default:checkboxWidget},Symbol.toStringTag,{value:"Module"})),colorWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$31={name:"color-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$31(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-color-picker"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),size:t.widgetSize,disabled:e.field.options.disabled,onChange:t.handleChangeEvent},null,8,["modelValue","size","disabled","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var colorWidget=_export_sfc$1(_sfc_main$31,[["render",_sfc_render$31],["__scopeId","data-v-8d04bd98"]]),__glob_0_3$3=Object.freeze(Object.defineProperty({__proto__:null,default:colorWidget},Symbol.toStringTag,{value:"Module"})),dateRangeWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$30={name:"date-range-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$30(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-date-picker"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""])},[require$$0$1.createVNode(a,{ref:"fieldEditor",type:e.field.options.type,modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:t.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":e.field.options.valueFormat,"start-placeholder":e.field.options.startPlaceholder||t.i18nt("render.hint.startDatePlaceholder"),"end-placeholder":e.field.options.endPlaceholder||t.i18nt("render.hint.endDatePlaceholder"),onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onChange:t.handleChangeEvent},null,8,["type","modelValue","disabled","readonly","size","clearable","editable","format","value-format","start-placeholder","end-placeholder","onFocus","onBlur","onChange"])],2)]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var dateRangeWidget=_export_sfc$1(_sfc_main$30,[["render",_sfc_render$30],["__scopeId","data-v-21300a07"]]),__glob_0_4$3=Object.freeze(Object.defineProperty({__proto__:null,default:dateRangeWidget},Symbol.toStringTag,{value:"Module"})),dateWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2$={name:"date-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2$(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-date-picker"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",type:e.field.options.type,modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""]),readonly:e.field.options.readonly,disabled:e.field.options.disabled,size:t.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":e.field.options.valueFormat,placeholder:e.field.options.placeholder||t.i18nt("render.hint.datePlaceholder"),onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onChange:t.handleChangeEvent},null,8,["type","modelValue","class","readonly","disabled","size","clearable","editable","format","value-format","placeholder","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var dateWidget=_export_sfc$1(_sfc_main$2$,[["render",_sfc_render$2$],["__scopeId","data-v-75b85548"]]),__glob_0_5$3=Object.freeze(Object.defineProperty({__proto__:null,default:dateWidget},Symbol.toStringTag,{value:"Module"})),dividerWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2_={name:"divider-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2_(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-divider"),u=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",direction:"horizontal","content-position":e.field.options.contentPosition},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(e.field.options.label),1)]),_:1},8,["content-position"])]),_:1},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var dividerWidget=_export_sfc$1(_sfc_main$2_,[["render",_sfc_render$2_],["__scopeId","data-v-09a1b973"]]),__glob_0_6$2=Object.freeze(Object.defineProperty({__proto__:null,default:dividerWidget},Symbol.toStringTag,{value:"Module"})),fileUploadWidget_vue_vue_type_style_index_0_scoped_true_lang="";let selectFileText="'"+translate("render.hint.selectFile")+"'";const _sfc_main$2Z={name:"file-upload-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{SvgIcon,FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:[],rules:[],uploadHeaders:{},uploadData:{key:""},fileList:[],uploadBtnHidden:!1,styleVariables:{"--select-file-action":selectFileText}}},computed:{realUploadURL(){let t=this.field.options.uploadURL;if(!!t&&(t.indexOf("DSV.")>-1||t.indexOf("DSV[")>-1)){let d=this.getGlobalDsv();return console.log("test DSV: ",d),evalFn(this.field.options.uploadURL,d)}return this.field.options.uploadURL}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handleFileExceed(){let t=this.field.options.limit;this.$message.warning(this.i18nt("render.hint.uploadExceed").replace("${uploadLimit}",t))},beforeFileUpload(t){let d=!1,e=t.name.substring(t.name.lastIndexOf(".")+1);if(!!this.field.options&&!!this.field.options.fileTypes){let g=this.field.options.fileTypes;g.length>0&&(d=g.some(a=>e.toLowerCase()===a.toLowerCase()))}if(!d)return this.$message.error(this.i18nt("render.hint.unsupportedFileType")+e),!1;let h=!1,m=5;return!!this.field.options&&!!this.field.options.fileMaxSize&&(m=this.field.options.fileMaxSize),h=t.size/1024/1024<=m,h?(this.uploadData.key=t.name,this.handleOnBeforeUpload(t)):(this.$message.error(this.i18nt("render.hint.fileSizeExceed")+m+"MB"),!1)},handleOnBeforeUpload(t){if(this.field.options.onBeforeUpload){let e=new Function("file",this.field.options.onBeforeUpload).call(this,t);return typeof e=="boolean"?e:!0}return!0},updateFieldModelAndEmitDataChangeForUpload(t,d,e){let h=deepClone(this.fieldModel);!!d&&!!d.name&&!!d.url?this.fieldModel.push({name:d.name,url:d.url}):!!e&&!!e.name&&!!e.url?this.fieldModel.push({name:e.name,url:e.url}):this.fieldModel=deepClone(t),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,h)},handleFileUpload(t,d,e){if(d.status==="success"){let h=null;this.field.options.onUploadSuccess&&(h=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,t,d,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,h,t),!!h&&!!h.name?d.name=h.name:d.name=d.name||t.name||t.fileName||t.filename,!!h&&!!h.url?d.url=h.url:d.url=d.url||t.url,this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(t,d){let e=deepClone(this.fieldModel);this.fieldModel.splice(t,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,e)},removeUploadFile(t,d,e){let h=-1,m=null;this.fileList.forEach((g,a)=>{g.name===t&&(g.url===d||!!e&&g.uid===e)&&(h=a,m=g)}),h>=0&&(this.fileList.splice(h,1),this.updateFieldModelAndEmitDataChangeForRemove(h,this.fileList),this.uploadBtnHidden=this.fileList.length>=this.field.options.limit,this.field.options.onFileRemove&&new Function("file","fileList",this.field.options.onFileRemove).call(this,m,this.fileList))},handleUploadError(t,d,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,t,d,e):this.$message({message:this.i18nt("render.hint.uploadError")+t,duration:3e3,type:"error"})}}},_withScopeId$3=t=>(require$$0$1.pushScopeId("data-v-b6b1e8a8"),t=t(),require$$0$1.popScopeId(),t),_hoisted_1$A={key:0,class:"el-upload__tip"},_hoisted_2$o=_withScopeId$3(()=>require$$0$1.createElementVNode("i",{class:"el-icon-plus avatar-uploader-icon"},null,-1)),_hoisted_3$j={class:"upload-file-list"},_hoisted_4$c=["title"],_hoisted_5$a=["href"],_hoisted_6$9=["title"],_hoisted_7$6=["title","onClick"];function _sfc_render$2Z(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("svg-icon"),u=require$$0$1.resolveComponent("el-upload"),r=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(r,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{ref:"fieldEditor",disabled:e.field.options.disabled,style:require$$0$1.normalizeStyle(m.styleVariables),class:require$$0$1.normalizeClass(["dynamicPseudoAfter",{hideUploadDiv:m.uploadBtnHidden}]),action:g.realUploadURL,headers:m.uploadHeaders,data:m.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":m.fileList,"show-file-list":e.field.options.showFileList,limit:e.field.options.limit,"on-exceed":g.handleFileExceed,"before-upload":g.beforeFileUpload,"on-success":g.handleFileUpload,"on-error":g.handleUploadError},{tip:require$$0$1.withCtx(()=>[e.field.options.uploadTip?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$A,require$$0$1.toDisplayString(e.field.options.uploadTip),1)):require$$0$1.createCommentVNode("",!0)]),default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":"el-plus"}),_hoisted_2$o]),file:require$$0$1.withCtx(({file:f})=>[require$$0$1.createElementVNode("div",_hoisted_3$j,[require$$0$1.createElementVNode("span",{class:"upload-file-name",title:f.name},require$$0$1.toDisplayString(f.name),9,_hoisted_4$c),require$$0$1.createElementVNode("a",{href:f.url,download:"",target:"_blank"},[require$$0$1.createElementVNode("span",{class:"el-icon-download file-action",title:t.i18nt("render.hint.downloadFile")},[require$$0$1.createVNode(a,{"icon-class":"el-download"})],8,_hoisted_6$9)],8,_hoisted_5$a),e.field.options.disabled?require$$0$1.createCommentVNode("",!0):(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",{key:0,class:"file-action",title:t.i18nt("render.hint.removeFile"),onClick:l=>g.removeUploadFile(f.name,f.url,f.uid)},[require$$0$1.createVNode(a,{"icon-class":"el-delete"})],8,_hoisted_7$6))])]),_:1},8,["disabled","style","action","headers","data","with-credentials","multiple","file-list","show-file-list","class","limit","on-exceed","before-upload","on-success","on-error"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var fileUploadWidget=_export_sfc$1(_sfc_main$2Z,[["render",_sfc_render$2Z],["__scopeId","data-v-b6b1e8a8"]]),__glob_0_7$1=Object.freeze(Object.defineProperty({__proto__:null,default:fileUploadWidget},Symbol.toStringTag,{value:"Module"})),htmlTextWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2Y={name:"html-text-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}},_hoisted_1$z=["innerHTML"];function _sfc_render$2Y(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{ref:"fieldEditor",innerHTML:e.field.options.htmlContent},null,8,_hoisted_1$z)]),_:1},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var htmlTextWidget=_export_sfc$1(_sfc_main$2Y,[["render",_sfc_render$2Y],["__scopeId","data-v-3d941b4e"]]),__glob_0_9$1=Object.freeze(Object.defineProperty({__proto__:null,default:htmlTextWidget},Symbol.toStringTag,{value:"Module"})),inputWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2X={name:"input-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper,SvgIcon},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{inputType(){return this.field.options.type==="number"?"text":this.field.options.type}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2X(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("svg-icon"),u=require$$0$1.resolveComponent("el-button"),r=require$$0$1.resolveComponent("el-input"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(r,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=l=>m.fieldModel=l),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:t.widgetSize,class:"hide-spin-button",type:g.inputType,"show-password":e.field.options.showPassword,placeholder:e.field.options.placeholder,clearable:e.field.options.clearable,minlength:e.field.options.minLength,maxlength:e.field.options.maxLength,"show-word-limit":e.field.options.showWordLimit,"prefix-icon":e.field.options.prefixIcon,"suffix-icon":e.field.options.suffixIcon,onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onInput:t.handleInputCustomEvent,onChange:t.handleChangeEvent},require$$0$1.createSlots({_:2},[e.field.options.appendButton?{name:"append",fn:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{disabled:e.field.options.disabled||e.field.options.appendButtonDisabled,onClick:t.emitAppendButtonClick},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":e.field.options.buttonIcon},null,8,["icon-class"])]),_:1},8,["disabled","onClick"])]),key:"0"}:void 0]),1032,["modelValue","disabled","readonly","size","type","show-password","placeholder","clearable","minlength","maxlength","show-word-limit","prefix-icon","suffix-icon","onFocus","onBlur","onInput","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var inputWidget=_export_sfc$1(_sfc_main$2X,[["render",_sfc_render$2X],["__scopeId","data-v-0aad1a31"]]),__glob_0_10$1=Object.freeze(Object.defineProperty({__proto__:null,default:inputWidget},Symbol.toStringTag,{value:"Module"})),numberWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2W={name:"number-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2W(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-input-number"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),class:"full-width-input",disabled:e.field.options.disabled,size:t.widgetSize,"controls-position":e.field.options.controlsPosition,placeholder:e.field.options.placeholder,min:e.field.options.min,max:e.field.options.max,precision:e.field.options.precision,step:e.field.options.step,onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onChange:t.handleChangeEvent},null,8,["modelValue","disabled","size","controls-position","placeholder","min","max","precision","step","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var numberWidget=_export_sfc$1(_sfc_main$2W,[["render",_sfc_render$2W],["__scopeId","data-v-0b9bc82f"]]),__glob_0_11$1=Object.freeze(Object.defineProperty({__proto__:null,default:numberWidget},Symbol.toStringTag,{value:"Module"})),pictureUploadWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2V={name:"picture-upload-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper,SvgIcon},data(){return{oldFieldValue:null,fieldModel:[],rules:[],uploadHeaders:{},uploadData:{key:""},fileList:[],fileListBeforeRemove:[],uploadBtnHidden:!1,previewIndex:1}},computed:{previewList(){return this.fileList.map(t=>t.url)},realUploadURL(){let t=this.field.options.uploadURL;if(!!t&&(t.indexOf("DSV.")>-1||t.indexOf("DSV[")>-1)){let d=this.getGlobalDsv();return console.log("test DSV: ",d),evalFn(this.field.options.uploadURL,d)}return this.field.options.uploadURL}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handlePictureExceed(){let t=this.field.options.limit;this.$message.warning(this.i18nt("render.hint.uploadExceed").replace("${uploadLimit}",t))},beforePictureUpload(t){let d=!1;if(!!this.field.options&&!!this.field.options.fileTypes){let m=this.field.options.fileTypes;m.length>0&&(d=m.some(g=>t.type==="image/"+g))}if(!d)return this.$message.error(this.i18nt("render.hint.unsupportedFileType")+t.type),!1;let e=!1,h=5;return!!this.field.options&&!!this.field.options.fileMaxSize&&(h=this.field.options.fileMaxSize),e=t.size/1024/1024<=h,e?(this.uploadData.key=t.name,this.handleOnBeforeUpload(t)):(this.$message.error(this.$("render.hint.fileSizeExceed")+h+"MB"),!1)},handleOnBeforeUpload(t){if(this.field.options.onBeforeUpload){let e=new Function("file",this.field.options.onBeforeUpload).call(this,t);return typeof e=="boolean"?e:!0}return!0},updateFieldModelAndEmitDataChangeForUpload(t,d,e){let h=deepClone(this.fieldModel);!!d&&!!d.name&&!!d.url?this.fieldModel.push({name:d.name,url:d.url}):!!e&&!!e.name&&!!e.url?this.fieldModel.push({name:e.name,url:e.url}):this.fieldModel=deepClone(t),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,h)},handlePictureUpload(t,d,e){if(d.status==="success"){let h=null;this.field.options.onUploadSuccess&&(h=new Function("result","file","fileList",this.field.options.onUploadSuccess).call(this,t,d,e)),this.updateFieldModelAndEmitDataChangeForUpload(e,h,t),this.fileList=deepClone(e),this.uploadBtnHidden=e.length>=this.field.options.limit}},updateFieldModelAndEmitDataChangeForRemove(t){let d=deepClone(this.fieldModel),e=-1;this.fileListBeforeRemove.map((h,m)=>{h.name===t.name&&(h.url===t.url||!!h.uid&&h.uid===t.uid)&&(e=m)}),e>-1&&this.fieldModel.splice(e,1),this.syncUpdateFormModel(this.fieldModel),this.emitFieldDataChange(this.fieldModel,d)},handleBeforeRemove(t){this.fileListBeforeRemove=deepClone(t)},handlePictureRemove(t){this.handleBeforeRemove(this.fileList),this.fileList.splice(this.fileList.indexOf(t),1),this.updateFieldModelAndEmitDataChangeForRemove(t);let d=deepClone(this.fileList);this.uploadBtnHidden=d.length>=this.field.options.limit,this.field.options.onFileRemove&&new Function("file","fileList",this.field.options.onFileRemove).call(this,t,d)},handleUploadError(t,d,e){this.field.options.onUploadError?new Function("error","file","fileList",this.field.options.onUploadError).call(this,t,d,e):this.$message({message:this.i18nt("render.hint.uploadError")+t,duration:3e3,type:"error"})},handlePictureCardPreview({url:t}){this.previewIndex=this.previewList.indexOf(t),this.$refs.imageRef.$el.children[0].click()}}},_hoisted_1$y={class:"el-upload-list__item-status-label"},_hoisted_2$n={class:"el-icon--upload-success",style:{color:"#FFF"}},_hoisted_3$i={class:"el-upload-list__item-actions"},_hoisted_4$b=["onClick"],_hoisted_5$9=["onClick"],_hoisted_6$8={key:0,class:"el-upload__tip"},_hoisted_7$5={class:"uploader-icon"};function _sfc_render$2V(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-image"),u=require$$0$1.resolveComponent("svg-icon"),r=require$$0$1.resolveComponent("el-upload"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(r,{ref:"fieldEditor",disabled:e.field.options.disabled,action:g.realUploadURL,headers:m.uploadHeaders,data:m.uploadData,"with-credentials":e.field.options.withCredentials,multiple:e.field.options.multipleSelect,"file-list":m.fileList,"show-file-list":e.field.options.showFileList,"list-type":"picture-card",class:require$$0$1.normalizeClass({hideUploadDiv:m.uploadBtnHidden}),limit:e.field.options.limit,"on-exceed":g.handlePictureExceed,"before-upload":g.beforePictureUpload,"on-preview":g.handlePictureCardPreview,"on-success":g.handlePictureUpload,"on-error":g.handleUploadError},{file:require$$0$1.withCtx(({file:l})=>[require$$0$1.createVNode(a,{ref:"imageRef",style:{width:"100%",height:"100%"},src:l.url,"preview-src-list":g.previewList,"initial-index":m.previewIndex,fit:"cover","preview-teleported":""},null,8,["src","preview-src-list","initial-index"]),require$$0$1.createElementVNode("label",_hoisted_1$y,[require$$0$1.createElementVNode("i",_hoisted_2$n,[require$$0$1.createVNode(u,{class:"","icon-class":"el-check"})])]),require$$0$1.createElementVNode("span",_hoisted_3$i,[require$$0$1.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:n=>g.handlePictureCardPreview(l)},[require$$0$1.createVNode(u,{"icon-class":"el-zoom-in"})],8,_hoisted_4$b),require$$0$1.createElementVNode("span",{class:"el-upload-list__item-delete",onClick:n=>g.handlePictureRemove(l)},[require$$0$1.createVNode(u,{"icon-class":"el-delete"})],8,_hoisted_5$9)])]),tip:require$$0$1.withCtx(()=>[e.field.options.uploadTip?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_6$8,require$$0$1.toDisplayString(e.field.options.uploadTip),1)):require$$0$1.createCommentVNode("",!0)]),default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_7$5,[require$$0$1.createVNode(u,{"icon-class":"el-plus"})])]),_:1},8,["disabled","action","headers","data","with-credentials","multiple","file-list","show-file-list","class","limit","on-exceed","before-upload","on-preview","on-success","on-error"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var pictureUploadWidget=_export_sfc$1(_sfc_main$2V,[["render",_sfc_render$2V],["__scopeId","data-v-3393010d"]]),__glob_0_12$1=Object.freeze(Object.defineProperty({__proto__:null,default:pictureUploadWidget},Symbol.toStringTag,{value:"Module"})),radioWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2U={name:"radio-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2U(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-radio-button"),u=require$$0$1.resolveComponent("el-radio"),r=require$$0$1.resolveComponent("el-radio-group"),f=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(f,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(r,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=l=>m.fieldModel=l),class:require$$0$1.normalizeClass({"radio-group-block":e.field.options.displayStyle==="block"}),disabled:e.field.options.disabled,size:t.widgetSize,onChange:t.handleChangeEvent},{default:require$$0$1.withCtx(()=>[e.field.options.buttonStyle?(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},require$$0$1.renderList(e.field.options.optionItems,(l,n)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:n,label:l.value,disabled:l.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(l.label),1)]),_:2},1032,["label","disabled","border","style"]))),128)):(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},require$$0$1.renderList(e.field.options.optionItems,(l,n)=>(require$$0$1.openBlock(),require$$0$1.createBlock(u,{key:n,label:l.value,disabled:l.disabled,border:e.field.options.border,style:require$$0$1.normalizeStyle({display:e.field.options.displayStyle})},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(l.label),1)]),_:2},1032,["label","disabled","border","style"]))),128))]),_:1},8,["modelValue","class","disabled","size","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var radioWidget=_export_sfc$1(_sfc_main$2U,[["render",_sfc_render$2U],["__scopeId","data-v-253adc5e"]]),__glob_0_13$1=Object.freeze(Object.defineProperty({__proto__:null,default:radioWidget},Symbol.toStringTag,{value:"Module"})),rateWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2T={name:"rate-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2T(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-rate"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,max:e.field.options.max,"low-threshold":e.field.options.lowThreshold,"high-threshold":e.field.options.highThreshold,"allow-half":e.field.options.allowHalf,"show-text":e.field.options.showText,"show-score":e.field.options.showScore,onChange:t.handleChangeEvent},null,8,["modelValue","disabled","max","low-threshold","high-threshold","allow-half","show-text","show-score","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var rateWidget=_export_sfc$1(_sfc_main$2T,[["render",_sfc_render$2T],["__scopeId","data-v-409c0e8b"]]),__glob_0_14$1=Object.freeze(Object.defineProperty({__proto__:null,default:rateWidget},Symbol.toStringTag,{value:"Module"})),quill={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */(function(t,d){(function(h,m){t.exports=m()})(typeof self!="undefined"?self:commonjsGlobal,function(){return function(e){var h={};function m(g){if(h[g])return h[g].exports;var a=h[g]={i:g,l:!1,exports:{}};return e[g].call(a.exports,a,a.exports,m),a.l=!0,a.exports}return m.m=e,m.c=h,m.d=function(g,a,u){m.o(g,a)||Object.defineProperty(g,a,{configurable:!1,enumerable:!0,get:u})},m.n=function(g){var a=g&&g.__esModule?function(){return g.default}:function(){return g};return m.d(a,"a",a),a},m.o=function(g,a){return Object.prototype.hasOwnProperty.call(g,a)},m.p="",m(m.s=109)}([function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(17),a=m(18),u=m(19),r=m(45),f=m(46),l=m(47),n=m(48),i=m(49),o=m(12),s=m(32),c=m(33),p=m(31),$=m(1),v={Scope:$.Scope,create:$.create,find:$.find,query:$.query,register:$.register,Container:g.default,Format:a.default,Leaf:u.default,Embed:n.default,Scroll:r.default,Block:l.default,Inline:f.default,Text:i.default,Attributor:{Attribute:o.default,Class:s.default,Style:c.default,Store:p.default}};h.default=v},function(e,h,m){var g=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,v){$.__proto__=v}||function($,v){for(var C in v)v.hasOwnProperty(C)&&($[C]=v[C])};return function($,v){p($,v);function C(){this.constructor=$}$.prototype=v===null?Object.create(v):(C.prototype=v.prototype,new C)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=function(p){g($,p);function $(v){var C=this;return v="[Parchment] "+v,C=p.call(this,v)||this,C.message=v,C.name=C.constructor.name,C}return $}(Error);h.ParchmentError=a;var u={},r={},f={},l={};h.DATA_KEY="__blot";var n;(function(p){p[p.TYPE=3]="TYPE",p[p.LEVEL=12]="LEVEL",p[p.ATTRIBUTE=13]="ATTRIBUTE",p[p.BLOT=14]="BLOT",p[p.INLINE=7]="INLINE",p[p.BLOCK=11]="BLOCK",p[p.BLOCK_BLOT=10]="BLOCK_BLOT",p[p.INLINE_BLOT=6]="INLINE_BLOT",p[p.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",p[p.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",p[p.ANY=15]="ANY"})(n=h.Scope||(h.Scope={}));function i(p,$){var v=s(p);if(v==null)throw new a("Unable to create "+p+" blot");var C=v,y=p instanceof Node||p.nodeType===Node.TEXT_NODE?p:C.create($);return new C(y,$)}h.create=i;function o(p,$){return $===void 0&&($=!1),p==null?null:p[h.DATA_KEY]!=null?p[h.DATA_KEY].blot:$?o(p.parentNode,$):null}h.find=o;function s(p,$){$===void 0&&($=n.ANY);var v;if(typeof p=="string")v=l[p]||u[p];else if(p instanceof Text||p.nodeType===Node.TEXT_NODE)v=l.text;else if(typeof p=="number")p&n.LEVEL&n.BLOCK?v=l.block:p&n.LEVEL&n.INLINE&&(v=l.inline);else if(p instanceof HTMLElement){var C=(p.getAttribute("class")||"").split(/\s+/);for(var y in C)if(v=r[C[y]],v)break;v=v||f[p.tagName]}return v==null?null:$&n.LEVEL&v.scope&&$&n.TYPE&v.scope?v:null}h.query=s;function c(){for(var p=[],$=0;$1)return p.map(function(y){return c(y)});var v=p[0];if(typeof v.blotName!="string"&&typeof v.attrName!="string")throw new a("Invalid definition");if(v.blotName==="abstract")throw new a("Cannot register abstract class");if(l[v.blotName||v.attrName]=v,typeof v.keyName=="string")u[v.keyName]=v;else if(v.className!=null&&(r[v.className]=v),v.tagName!=null){Array.isArray(v.tagName)?v.tagName=v.tagName.map(function(y){return y.toUpperCase()}):v.tagName=v.tagName.toUpperCase();var C=Array.isArray(v.tagName)?v.tagName:[v.tagName];C.forEach(function(y){(f[y]==null||v.className==null)&&(f[y]=v)})}return v}h.register=c},function(e,h,m){var g=m(51),a=m(11),u=m(3),r=m(20),f=String.fromCharCode(0),l=function(n){Array.isArray(n)?this.ops=n:n!=null&&Array.isArray(n.ops)?this.ops=n.ops:this.ops=[]};l.prototype.insert=function(n,i){var o={};return n.length===0?this:(o.insert=n,i!=null&&typeof i=="object"&&Object.keys(i).length>0&&(o.attributes=i),this.push(o))},l.prototype.delete=function(n){return n<=0?this:this.push({delete:n})},l.prototype.retain=function(n,i){if(n<=0)return this;var o={retain:n};return i!=null&&typeof i=="object"&&Object.keys(i).length>0&&(o.attributes=i),this.push(o)},l.prototype.push=function(n){var i=this.ops.length,o=this.ops[i-1];if(n=u(!0,{},n),typeof o=="object"){if(typeof n.delete=="number"&&typeof o.delete=="number")return this.ops[i-1]={delete:o.delete+n.delete},this;if(typeof o.delete=="number"&&n.insert!=null&&(i-=1,o=this.ops[i-1],typeof o!="object"))return this.ops.unshift(n),this;if(a(n.attributes,o.attributes)){if(typeof n.insert=="string"&&typeof o.insert=="string")return this.ops[i-1]={insert:o.insert+n.insert},typeof n.attributes=="object"&&(this.ops[i-1].attributes=n.attributes),this;if(typeof n.retain=="number"&&typeof o.retain=="number")return this.ops[i-1]={retain:o.retain+n.retain},typeof n.attributes=="object"&&(this.ops[i-1].attributes=n.attributes),this}}return i===this.ops.length?this.ops.push(n):this.ops.splice(i,0,n),this},l.prototype.chop=function(){var n=this.ops[this.ops.length-1];return n&&n.retain&&!n.attributes&&this.ops.pop(),this},l.prototype.filter=function(n){return this.ops.filter(n)},l.prototype.forEach=function(n){this.ops.forEach(n)},l.prototype.map=function(n){return this.ops.map(n)},l.prototype.partition=function(n){var i=[],o=[];return this.forEach(function(s){var c=n(s)?i:o;c.push(s)}),[i,o]},l.prototype.reduce=function(n,i){return this.ops.reduce(n,i)},l.prototype.changeLength=function(){return this.reduce(function(n,i){return i.insert?n+r.length(i):i.delete?n-i.delete:n},0)},l.prototype.length=function(){return this.reduce(function(n,i){return n+r.length(i)},0)},l.prototype.slice=function(n,i){n=n||0,typeof i!="number"&&(i=1/0);for(var o=[],s=r.iterator(this.ops),c=0;c0&&o.next(c.retain-p)}for(var $=new l(s);i.hasNext()||o.hasNext();)if(o.peekType()==="insert")$.push(o.next());else if(i.peekType()==="delete")$.push(i.next());else{var v=Math.min(i.peekLength(),o.peekLength()),C=i.next(v),y=o.next(v);if(typeof y.retain=="number"){var _={};typeof C.retain=="number"?_.retain=v:_.insert=C.insert;var b=r.attributes.compose(C.attributes,y.attributes,typeof C.retain=="number");if(b&&(_.attributes=b),$.push(_),!o.hasNext()&&a($.ops[$.ops.length-1],_)){var E=new l(i.rest());return $.concat(E).chop()}}else typeof y.delete=="number"&&typeof C.retain=="number"&&$.push(y)}return $.chop()},l.prototype.concat=function(n){var i=new l(this.ops.slice());return n.ops.length>0&&(i.push(n.ops[0]),i.ops=i.ops.concat(n.ops.slice(1))),i},l.prototype.diff=function(n,i){if(this.ops===n.ops)return new l;var o=[this,n].map(function(v){return v.map(function(C){if(C.insert!=null)return typeof C.insert=="string"?C.insert:f;var y=v===n?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),s=new l,c=g(o[0],o[1],i),p=r.iterator(this.ops),$=r.iterator(n.ops);return c.forEach(function(v){for(var C=v[1].length;C>0;){var y=0;switch(v[0]){case g.INSERT:y=Math.min($.peekLength(),C),s.push($.next(y));break;case g.DELETE:y=Math.min(C,p.peekLength()),p.next(y),s.delete(y);break;case g.EQUAL:y=Math.min(p.peekLength(),$.peekLength(),C);var _=p.next(y),b=$.next(y);a(_.insert,b.insert)?s.retain(y,r.attributes.diff(_.attributes,b.attributes)):s.push(b).delete(y);break}C-=y}}),s.chop()},l.prototype.eachLine=function(n,i){i=i||` `;for(var o=r.iterator(this.ops),s=new l,c=0;o.hasNext();){if(o.peekType()!=="insert")return;var p=o.peek(),$=r.length(p)-o.peekLength(),v=typeof p.insert=="string"?p.insert.indexOf(i,$)-$:-1;if(v<0)s.push(o.next());else if(v>0)s.push(o.next(v));else{if(n(s,o.next(1).attributes||{},c)===!1)return;c+=1,s=new l}}s.length()>0&&n(s,{},c)},l.prototype.transform=function(n,i){if(i=!!i,typeof n=="number")return this.transformPosition(n,i);for(var o=r.iterator(this.ops),s=r.iterator(n.ops),c=new l;o.hasNext()||s.hasNext();)if(o.peekType()==="insert"&&(i||s.peekType()!=="insert"))c.retain(r.length(o.next()));else if(s.peekType()==="insert")c.push(s.next());else{var p=Math.min(o.peekLength(),s.peekLength()),$=o.next(p),v=s.next(p);if($.delete)continue;v.delete?c.push(v):c.retain(p,r.attributes.transform($.attributes,v.attributes,i))}return c.chop()},l.prototype.transformPosition=function(n,i){i=!!i;for(var o=r.iterator(this.ops),s=0;o.hasNext()&&s<=n;){var c=o.peekLength(),p=o.peekType();if(o.next(),p==="delete"){n-=Math.min(c,n-s);continue}else p==="insert"&&(s0&&(w1&&arguments[1]!==void 0?arguments[1]:!1;if(L&&(w===0||w>=this.length()-E)){var q=this.clone();return w===0?(this.parent.insertBefore(q,this),this):(this.parent.insertBefore(q,this.next),q)}else{var A=a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"split",this).call(this,w,L);return this.cache={},A}}}]),T}(i.default.Block);O.blotName="block",O.tagName="P",O.defaultChild="break",O.allowedChildren=[p.default,i.default.Embed,v.default];function M(k){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return k==null||(typeof k.formats=="function"&&(T=(0,r.default)(T,k.formats())),k.parent==null||k.parent.blotName=="scroll"||k.parent.statics.scope!==k.statics.scope)?T:M(k.parent,T)}h.bubbleFormats=M,h.BlockEmbed=x,h.default=O},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.overload=h.expandConfig=void 0;var g=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},a=function(){function F(V,R){var B=[],N=!0,P=!1,j=void 0;try{for(var D=V[Symbol.iterator](),W;!(N=(W=D.next()).done)&&(B.push(W.value),!(R&&B.length===R));N=!0);}catch(H){P=!0,j=H}finally{try{!N&&D.return&&D.return()}finally{if(P)throw j}}return B}return function(V,R){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return F(V,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function F(V,R){for(var B=0;B2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof R!="string"){var j=R.attrName||R.blotName;typeof j=="string"?this.register("formats/"+j,R,B):Object.keys(R).forEach(function(D){N.register(D,R[D],B)})}else this.imports[R]!=null&&!P&&S.warn("Overwriting "+R+" with",B),this.imports[R]=B,(R.startsWith("blots/")||R.startsWith("formats/"))&&B.blotName!=="abstract"?$.default.register(B):R.startsWith("modules")&&typeof B.register=="function"&&B.register()}}]);function F(V){var R=this,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(T(this,F),this.options=L(V,B),this.container=this.options.container,this.container==null)return S.error("Invalid Quill container",V);this.options.debug&&F.debug(this.options.debug);var N=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new o.default,this.scroll=$.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new n.default(this.scroll),this.selection=new C.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(o.default.events.EDITOR_CHANGE,function(j){j===o.default.events.TEXT_CHANGE&&R.root.classList.toggle("ql-blank",R.editor.isBlank())}),this.emitter.on(o.default.events.SCROLL_UPDATE,function(j,D){var W=R.selection.lastRange,H=W&&W.length===0?W.index:void 0;q.call(R,function(){return R.editor.update(null,D,H)},j)});var P=this.clipboard.convert(`
`+N+"


");this.setContents(P),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(F,[{key:"addContainer",value:function(R){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof R=="string"){var N=R;R=document.createElement("div"),R.classList.add(N)}return this.container.insertBefore(R,B),R}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(R,B,N){var P=this,j=A(R,B,N),D=a(j,4);return R=D[0],B=D[1],N=D[3],q.call(this,function(){return P.editor.deleteText(R,B)},N,R,-1*B)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(R),this.container.classList.toggle("ql-disabled",!R)}},{key:"focus",value:function(){var R=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=R,this.scrollIntoView()}},{key:"format",value:function(R,B){var N=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o.default.sources.API;return q.call(this,function(){var j=N.getSelection(!0),D=new f.default;if(j==null)return D;if($.default.query(R,$.default.Scope.BLOCK))D=N.editor.formatLine(j.index,j.length,k({},R,B));else{if(j.length===0)return N.selection.format(R,B),D;D=N.editor.formatText(j.index,j.length,k({},R,B))}return N.setSelection(j,o.default.sources.SILENT),D},P)}},{key:"formatLine",value:function(R,B,N,P,j){var D=this,W=void 0,H=A(R,B,N,P,j),z=a(H,4);return R=z[0],B=z[1],W=z[2],j=z[3],q.call(this,function(){return D.editor.formatLine(R,B,W)},j,R,0)}},{key:"formatText",value:function(R,B,N,P,j){var D=this,W=void 0,H=A(R,B,N,P,j),z=a(H,4);return R=z[0],B=z[1],W=z[2],j=z[3],q.call(this,function(){return D.editor.formatText(R,B,W)},j,R,0)}},{key:"getBounds",value:function(R){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=void 0;typeof R=="number"?N=this.selection.getBounds(R,B):N=this.selection.getBounds(R.index,R.length);var P=this.container.getBoundingClientRect();return{bottom:N.bottom-P.top,height:N.height,left:N.left-P.left,right:N.right-P.left,top:N.top-P.top,width:N.width}}},{key:"getContents",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,N=A(R,B),P=a(N,2);return R=P[0],B=P[1],this.editor.getContents(R,B)}},{key:"getFormat",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof R=="number"?this.editor.getFormat(R,B):this.editor.getFormat(R.index,R.length)}},{key:"getIndex",value:function(R){return R.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(R){return this.scroll.leaf(R)}},{key:"getLine",value:function(R){return this.scroll.line(R)}},{key:"getLines",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof R!="number"?this.scroll.lines(R.index,R.length):this.scroll.lines(R,B)}},{key:"getModule",value:function(R){return this.theme.modules[R]}},{key:"getSelection",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return R&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-R,N=A(R,B),P=a(N,2);return R=P[0],B=P[1],this.editor.getText(R,B)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(R,B,N){var P=this,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:F.sources.API;return q.call(this,function(){return P.editor.insertEmbed(R,B,N)},j,R)}},{key:"insertText",value:function(R,B,N,P,j){var D=this,W=void 0,H=A(R,0,N,P,j),z=a(H,4);return R=z[0],W=z[2],j=z[3],q.call(this,function(){return D.editor.insertText(R,B,W)},j,R,B.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(R,B,N){this.clipboard.dangerouslyPasteHTML(R,B,N)}},{key:"removeFormat",value:function(R,B,N){var P=this,j=A(R,B,N),D=a(j,4);return R=D[0],B=D[1],N=D[3],q.call(this,function(){return P.editor.removeFormat(R,B)},N,R)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(R){var B=this,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o.default.sources.API;return q.call(this,function(){R=new f.default(R);var P=B.getLength(),j=B.editor.deleteText(0,P),D=B.editor.applyDelta(R),W=D.ops[D.ops.length-1];W!=null&&typeof W.insert=="string"&&W.insert[W.insert.length-1]===` `&&(B.editor.deleteText(B.getLength()-1,1),D.delete(1));var H=j.compose(D);return H},N)}},{key:"setSelection",value:function(R,B,N){if(R==null)this.selection.setRange(null,B||F.sources.API);else{var P=A(R,B,N),j=a(P,4);R=j[0],B=j[1],N=j[3],this.selection.setRange(new v.Range(R,B),N),N!==o.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(R){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o.default.sources.API,N=new f.default().insert(R);return this.setContents(N,B)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o.default.sources.USER,B=this.scroll.update(R);return this.selection.update(R),B}},{key:"updateContents",value:function(R){var B=this,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o.default.sources.API;return q.call(this,function(){return R=new f.default(R),B.editor.applyDelta(R,N)},N,!0)}}]),F}();w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=o.default.events,w.sources=o.default.sources,w.version="1.3.7",w.imports={delta:f.default,parchment:$.default,"core/module":c.default,"core/theme":O.default};function L(F,V){if(V=(0,_.default)(!0,{container:F,modules:{clipboard:!0,keyboard:!0,history:!0}},V),!V.theme||V.theme===w.DEFAULTS.theme)V.theme=O.default;else if(V.theme=w.import("themes/"+V.theme),V.theme==null)throw new Error("Invalid theme "+V.theme+". Did you register it?");var R=(0,_.default)(!0,{},V.theme.DEFAULTS);[R,V].forEach(function(P){P.modules=P.modules||{},Object.keys(P.modules).forEach(function(j){P.modules[j]===!0&&(P.modules[j]={})})});var B=Object.keys(R.modules).concat(Object.keys(V.modules)),N=B.reduce(function(P,j){var D=w.import("modules/"+j);return D==null?S.error("Cannot load "+j+" module. Are you sure you registered it?"):P[j]=D.DEFAULTS||{},P},{});return V.modules!=null&&V.modules.toolbar&&V.modules.toolbar.constructor!==Object&&(V.modules.toolbar={container:V.modules.toolbar}),V=(0,_.default)(!0,{},w.DEFAULTS,{modules:N},R,V),["bounds","container","scrollingContainer"].forEach(function(P){typeof V[P]=="string"&&(V[P]=document.querySelector(V[P]))}),V.modules=Object.keys(V.modules).reduce(function(P,j){return V.modules[j]&&(P[j]=V.modules[j]),P},{}),V}function q(F,V,R,B){if(this.options.strict&&!this.isEnabled()&&V===o.default.sources.USER)return new f.default;var N=R==null?null:this.getSelection(),P=this.editor.delta,j=F();if(N!=null&&(R===!0&&(R=N.index),B==null?N=I(N,j,V):B!==0&&(N=I(N,R,B,V)),this.setSelection(N,o.default.sources.SILENT)),j.length()>0){var D,W=[o.default.events.TEXT_CHANGE,j,P,V];if((D=this.emitter).emit.apply(D,[o.default.events.EDITOR_CHANGE].concat(W)),V!==o.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,W)}}return j}function A(F,V,R,B,N){var P={};return typeof F.index=="number"&&typeof F.length=="number"?typeof V!="number"?(N=B,B=R,R=V,V=F.length,F=F.index):(V=F.length,F=F.index):typeof V!="number"&&(N=B,B=R,R=V,V=0),(typeof R=="undefined"?"undefined":g(R))==="object"?(P=R,N=B):typeof R=="string"&&(B!=null?P[R]=B:N=R),N=N||o.default.sources.API,[F,V,P,N]}function I(F,V,R,B){if(F==null)return null;var N=void 0,P=void 0;if(V instanceof f.default){var j=[F.index,F.index+F.length].map(function(z){return V.transformPosition(z,B!==o.default.sources.USER)}),D=a(j,2);N=D[0],P=D[1]}else{var W=[F.index,F.index+F.length].map(function(z){return z=0?z+R:Math.max(V,z+R)}),H=a(W,2);N=H[0],P=H[1]}return new v.Range(N,P-N)}h.expandConfig=L,h.overload=A,h.default=w},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function p($,v){for(var C=0;C0){var y=this.parent.isolate(this.offset(),this.length());this.moveChildren(y),y.wrap(this)}}}],[{key:"compare",value:function(C,y){var _=$.order.indexOf(C),b=$.order.indexOf(y);return _>=0||b>=0?_-b:C===y?0:C1?b-1:0),x=1;x1&&arguments[1]!==void 0?arguments[1]:{};g(this,u),this.quill=r,this.options=f};a.DEFAULTS={},h.default=a},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=["error","warn","log","info"],a="warn";function u(f){if(g.indexOf(f)<=g.indexOf(a)){for(var l,n=arguments.length,i=Array(n>1?n-1:0),o=1;o0&&typeof i[0]!="number")}function n(i,o,s){var c,p;if(f(i)||f(o)||i.prototype!==o.prototype)return!1;if(u(i))return u(o)?(i=g.call(i),o=g.call(o),r(i,o,s)):!1;if(l(i)){if(!l(o)||i.length!==o.length)return!1;for(c=0;c=0;c--)if($[c]!=v[c])return!1;for(c=$.length-1;c>=0;c--)if(p=$[c],!r(i[p],o[p],s))return!1;return typeof i==typeof o}},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(1),a=function(){function u(r,f,l){l===void 0&&(l={}),this.attrName=r,this.keyName=f;var n=g.Scope.TYPE&g.Scope.ATTRIBUTE;l.scope!=null?this.scope=l.scope&g.Scope.LEVEL|n:this.scope=g.Scope.ATTRIBUTE,l.whitelist!=null&&(this.whitelist=l.whitelist)}return u.keys=function(r){return[].map.call(r.attributes,function(f){return f.name})},u.prototype.add=function(r,f){return this.canAdd(r,f)?(r.setAttribute(this.keyName,f),!0):!1},u.prototype.canAdd=function(r,f){var l=g.query(r,g.Scope.BLOT&(this.scope|g.Scope.TYPE));return l==null?!1:this.whitelist==null?!0:typeof f=="string"?this.whitelist.indexOf(f.replace(/["']/g,""))>-1:this.whitelist.indexOf(f)>-1},u.prototype.remove=function(r){r.removeAttribute(this.keyName)},u.prototype.value=function(r){var f=r.getAttribute(this.keyName);return this.canAdd(r,f)&&f?f:""},u}();h.default=a},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.Code=void 0;var g=function(){function x(O,M){var k=[],T=!0,S=!1,w=void 0;try{for(var L=O[Symbol.iterator](),q;!(T=(q=L.next()).done)&&(k.push(q.value),!(M&&k.length===M));T=!0);}catch(A){S=!0,w=A}finally{try{!T&&L.return&&L.return()}finally{if(S)throw w}}return k}return function(O,M){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return x(O,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function x(O,M){for(var k=0;k=k+T)){var q=this.newlineIndex(k,!0)+1,A=L-q+1,I=this.isolate(q,A),F=I.next;I.format(S,w),F instanceof O&&F.formatAt(0,k-q+T-A,S,w)}}}},{key:"insertAt",value:function(k,T,S){if(S==null){var w=this.descendant($.default,k),L=g(w,2),q=L[0],A=L[1];q.insertAt(A,T)}}},{key:"length",value:function(){var k=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?k:k+1}},{key:"newlineIndex",value:function(k){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(T)return this.domNode.textContent.slice(0,k).lastIndexOf(` `);var S=this.domNode.textContent.slice(k).indexOf(` `);return S>-1?k+S:-1}},{key:"optimize",value:function(k){this.domNode.textContent.endsWith(` `)||this.appendChild(n.default.create("text",` `)),u(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,k);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===T.statics.formats(T.domNode)&&(T.optimize(k),T.moveChildren(this),T.remove())}},{key:"replace",value:function(k){u(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replace",this).call(this,k),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(T){var S=n.default.find(T);S==null?T.parentNode.removeChild(T):S instanceof n.default.Embed?S.remove():S.unwrap()})}}],[{key:"create",value:function(k){var T=u(O.__proto__||Object.getPrototypeOf(O),"create",this).call(this,k);return T.setAttribute("spellcheck",!1),T}},{key:"formats",value:function(){return!0}}]),O}(o.default);E.blotName="code-block",E.tagName="PRE",E.TAB=" ",h.Code=b,h.default=E},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=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},a=function(){function F(V,R){var B=[],N=!0,P=!1,j=void 0;try{for(var D=V[Symbol.iterator](),W;!(N=(W=D.next()).done)&&(B.push(W.value),!(R&&B.length===R));N=!0);}catch(H){P=!0,j=H}finally{try{!N&&D.return&&D.return()}finally{if(P)throw j}}return B}return function(V,R){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return F(V,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function F(V,R){for(var B=0;B=P&&!z.endsWith(` `)&&(N=!0),B.scroll.insertAt(j,z);var K=B.scroll.line(j),Z=a(K,2),ie=Z[0],se=Z[1],ue=(0,k.default)({},(0,v.bubbleFormats)(ie));if(ie instanceof C.default){var fe=ie.descendant(o.default.Leaf,se),ye=a(fe,1),_e=ye[0];ue=(0,k.default)(ue,(0,v.bubbleFormats)(_e))}H=n.default.attributes.diff(ue,H)||{}}else if(g(D.insert)==="object"){var J=Object.keys(D.insert)[0];if(J==null)return j;B.scroll.insertAt(j,J,D.insert[J])}P+=W}return Object.keys(H).forEach(function(Q){B.scroll.formatAt(j,W,Q,H[Q])}),j+W},0),R.reduce(function(j,D){return typeof D.delete=="number"?(B.scroll.deleteAt(j,D.delete),j):j+(D.retain||D.insert.length||1)},0),this.scroll.batchEnd(),this.update(R)}},{key:"deleteText",value:function(R,B){return this.scroll.deleteAt(R,B),this.update(new f.default().retain(R).delete(B))}},{key:"formatLine",value:function(R,B){var N=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(P).forEach(function(j){if(!(N.scroll.whitelist!=null&&!N.scroll.whitelist[j])){var D=N.scroll.lines(R,Math.max(B,1)),W=B;D.forEach(function(H){var z=H.length();if(!(H instanceof c.default))H.format(j,P[j]);else{var K=R-H.offset(N.scroll),Z=H.newlineIndex(K+W)-K+1;H.formatAt(K,Z,j,P[j])}W-=z})}}),this.scroll.optimize(),this.update(new f.default().retain(R).retain(B,(0,E.default)(P)))}},{key:"formatText",value:function(R,B){var N=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(P).forEach(function(j){N.scroll.formatAt(R,B,j,P[j])}),this.update(new f.default().retain(R).retain(B,(0,E.default)(P)))}},{key:"getContents",value:function(R,B){return this.delta.slice(R,R+B)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(R,B){return R.concat(B.delta())},new f.default)}},{key:"getFormat",value:function(R){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=[],P=[];B===0?this.scroll.path(R).forEach(function(D){var W=a(D,1),H=W[0];H instanceof C.default?N.push(H):H instanceof o.default.Leaf&&P.push(H)}):(N=this.scroll.lines(R,B),P=this.scroll.descendants(o.default.Leaf,R,B));var j=[N,P].map(function(D){if(D.length===0)return{};for(var W=(0,v.bubbleFormats)(D.shift());Object.keys(W).length>0;){var H=D.shift();if(H==null)return W;W=A((0,v.bubbleFormats)(H),W)}return W});return k.default.apply(k.default,j)}},{key:"getText",value:function(R,B){return this.getContents(R,B).filter(function(N){return typeof N.insert=="string"}).map(function(N){return N.insert}).join("")}},{key:"insertEmbed",value:function(R,B,N){return this.scroll.insertAt(R,B,N),this.update(new f.default().retain(R).insert(S({},B,N)))}},{key:"insertText",value:function(R,B){var N=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return B=B.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(R,B),Object.keys(P).forEach(function(j){N.scroll.formatAt(R,B.length,j,P[j])}),this.update(new f.default().retain(R).insert(B,(0,E.default)(P)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var R=this.scroll.children.head;return R.statics.blotName!==C.default.blotName||R.children.length>1?!1:R.children.head instanceof _.default}},{key:"removeFormat",value:function(R,B){var N=this.getText(R,B),P=this.scroll.line(R+B),j=a(P,2),D=j[0],W=j[1],H=0,z=new f.default;D!=null&&(D instanceof c.default?H=D.newlineIndex(W)-W+1:H=D.length()-W,z=D.delta().slice(W,W+H-1).insert(` `));var K=this.getContents(R,B+H),Z=K.diff(new f.default().insert(N).concat(z)),ie=new f.default().retain(R).concat(Z);return this.applyDelta(ie)}},{key:"update",value:function(R){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,P=this.delta;if(B.length===1&&B[0].type==="characterData"&&B[0].target.data.match(L)&&o.default.find(B[0].target)){var j=o.default.find(B[0].target),D=(0,v.bubbleFormats)(j),W=j.offset(this.scroll),H=B[0].oldValue.replace($.default.CONTENTS,""),z=new f.default().insert(H),K=new f.default().insert(j.value()),Z=new f.default().retain(W).concat(z.diff(K,N));R=Z.reduce(function(ie,se){return se.insert?ie.insert(se.insert,D):ie.push(se)},new f.default),this.delta=P.compose(R)}else this.delta=this.getDelta(),(!R||!(0,O.default)(P.compose(R),this.delta))&&(R=P.diff(this.delta,N));return R}}]),F}();function A(F,V){return Object.keys(V).reduce(function(R,B){return F[B]==null||(V[B]===F[B]?R[B]=V[B]:Array.isArray(V[B])?V[B].indexOf(F[B])<0&&(R[B]=V[B].concat([F[B]])):R[B]=[V[B],F[B]]),R},{})}function I(F){return F.reduce(function(V,R){if(R.insert===1){var B=(0,E.default)(R.attributes);return delete B.image,V.insert({image:R.attributes.image},B)}if(R.attributes!=null&&(R.attributes.list===!0||R.attributes.bullet===!0)&&(R=(0,E.default)(R),R.attributes.list?R.attributes.list="ordered":(R.attributes.list="bullet",delete R.attributes.bullet)),typeof R.insert=="string"){var N=R.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return V.insert(N,R.attributes)}return V.push(R)},new f.default)}h.default=q},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.Range=void 0;var g=function(){function x(O,M){var k=[],T=!0,S=!1,w=void 0;try{for(var L=O[Symbol.iterator](),q;!(T=(q=L.next()).done)&&(k.push(q.value),!(M&&k.length===M));T=!0);}catch(A){S=!0,w=A}finally{try{!T&&L.return&&L.return()}finally{if(S)throw w}}return k}return function(O,M){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return x(O,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function x(O,M){for(var k=0;k1&&arguments[1]!==void 0?arguments[1]:0;C(this,x),this.index=O,this.length=M},b=function(){function x(O,M){var k=this;C(this,x),this.emitter=M,this.scroll=O,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=r.default.create("cursor",this),this.lastRange=this.savedRange=new _(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){k.mouseDown||setTimeout(k.update.bind(k,s.default.sources.USER),1)}),this.emitter.on(s.default.events.EDITOR_CHANGE,function(T,S){T===s.default.events.TEXT_CHANGE&&S.length()>0&&k.update(s.default.sources.SILENT)}),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!k.hasFocus()){var T=k.getNativeRange();T!=null&&T.start.node!==k.cursor.textNode&&k.emitter.once(s.default.events.SCROLL_UPDATE,function(){try{k.setNativeRange(T.start.node,T.start.offset,T.end.node,T.end.offset)}catch{}})}}),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,function(T,S){if(S.range){var w=S.range,L=w.startNode,q=w.startOffset,A=w.endNode,I=w.endOffset;k.setNativeRange(L,q,A,I)}}),this.update(s.default.sources.SILENT)}return a(x,[{key:"handleComposition",value:function(){var M=this;this.root.addEventListener("compositionstart",function(){M.composing=!0}),this.root.addEventListener("compositionend",function(){if(M.composing=!1,M.cursor.parent){var k=M.cursor.restore();if(!k)return;setTimeout(function(){M.setNativeRange(k.startNode,k.startOffset,k.endNode,k.endOffset)},1)}})}},{key:"handleDragging",value:function(){var M=this;this.emitter.listenDOM("mousedown",document.body,function(){M.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){M.mouseDown=!1,M.update(s.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(M,k){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[M])){this.scroll.update();var T=this.getNativeRange();if(!(T==null||!T.native.collapsed||r.default.query(M,r.default.Scope.BLOCK))){if(T.start.node!==this.cursor.textNode){var S=r.default.find(T.start.node,!1);if(S==null)return;if(S instanceof r.default.Leaf){var w=S.split(T.start.offset);S.parent.insertBefore(this.cursor,w)}else S.insertBefore(this.cursor,T.start.node);this.cursor.attach()}this.cursor.format(M,k),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=this.scroll.length();M=Math.min(M,T-1),k=Math.min(M+k,T-1)-M;var S=void 0,w=this.scroll.leaf(M),L=g(w,2),q=L[0],A=L[1];if(q==null)return null;var I=q.position(A,!0),F=g(I,2);S=F[0],A=F[1];var V=document.createRange();if(k>0){V.setStart(S,A);var R=this.scroll.leaf(M+k),B=g(R,2);if(q=B[0],A=B[1],q==null)return null;var N=q.position(A,!0),P=g(N,2);return S=P[0],A=P[1],V.setEnd(S,A),V.getBoundingClientRect()}else{var j="left",D=void 0;return S instanceof Text?(A0&&(j="right")),{bottom:D.top+D.height,height:D.height,left:D[j],right:D[j],top:D.top,width:0}}}},{key:"getNativeRange",value:function(){var M=document.getSelection();if(M==null||M.rangeCount<=0)return null;var k=M.getRangeAt(0);if(k==null)return null;var T=this.normalizeNative(k);return y.info("getNativeRange",T),T}},{key:"getRange",value:function(){var M=this.getNativeRange();if(M==null)return[null,null];var k=this.normalizedToRange(M);return[k,M]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(M){var k=this,T=[[M.start.node,M.start.offset]];M.native.collapsed||T.push([M.end.node,M.end.offset]);var S=T.map(function(q){var A=g(q,2),I=A[0],F=A[1],V=r.default.find(I,!0),R=V.offset(k.scroll);return F===0?R:V instanceof r.default.Container?R+V.length():R+V.index(I,F)}),w=Math.min(Math.max.apply(Math,v(S)),this.scroll.length()-1),L=Math.min.apply(Math,[w].concat(v(S)));return new _(L,w-L)}},{key:"normalizeNative",value:function(M){if(!E(this.root,M.startContainer)||!M.collapsed&&!E(this.root,M.endContainer))return null;var k={start:{node:M.startContainer,offset:M.startOffset},end:{node:M.endContainer,offset:M.endOffset},native:M};return[k.start,k.end].forEach(function(T){for(var S=T.node,w=T.offset;!(S instanceof Text)&&S.childNodes.length>0;)if(S.childNodes.length>w)S=S.childNodes[w],w=0;else if(S.childNodes.length===w)S=S.lastChild,w=S instanceof Text?S.data.length:S.childNodes.length+1;else break;T.node=S,T.offset=w}),k}},{key:"rangeToNative",value:function(M){var k=this,T=M.collapsed?[M.index]:[M.index,M.index+M.length],S=[],w=this.scroll.length();return T.forEach(function(L,q){L=Math.min(w-1,L);var A=void 0,I=k.scroll.leaf(L),F=g(I,2),V=F[0],R=F[1],B=V.position(R,q!==0),N=g(B,2);A=N[0],R=N[1],S.push(A,R)}),S.length<2&&(S=S.concat(S)),S}},{key:"scrollIntoView",value:function(M){var k=this.lastRange;if(k!=null){var T=this.getBounds(k.index,k.length);if(T!=null){var S=this.scroll.length()-1,w=this.scroll.line(Math.min(k.index,S)),L=g(w,1),q=L[0],A=q;if(k.length>0){var I=this.scroll.line(Math.min(k.index+k.length,S)),F=g(I,1);A=F[0]}if(!(q==null||A==null)){var V=M.getBoundingClientRect();T.topV.bottom&&(M.scrollTop+=T.bottom-V.bottom)}}}}},{key:"setNativeRange",value:function(M,k){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M,S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:k,w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",M,k,T,S),!(M!=null&&(this.root.parentNode==null||M.parentNode==null||T.parentNode==null))){var L=document.getSelection();if(L!=null)if(M!=null){this.hasFocus()||this.root.focus();var q=(this.getNativeRange()||{}).native;if(q==null||w||M!==q.startContainer||k!==q.startOffset||T!==q.endContainer||S!==q.endOffset){M.tagName=="BR"&&(k=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode),T.tagName=="BR"&&(S=[].indexOf.call(T.parentNode.childNodes,T),T=T.parentNode);var A=document.createRange();A.setStart(M,k),A.setEnd(T,S),L.removeAllRanges(),L.addRange(A)}}else L.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s.default.sources.API;if(typeof k=="string"&&(T=k,k=!1),y.info("setRange",M),M!=null){var S=this.rangeToNative(M);this.setNativeRange.apply(this,v(S).concat([k]))}else this.setNativeRange(null);this.update(T)}},{key:"update",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s.default.sources.USER,k=this.lastRange,T=this.getRange(),S=g(T,2),w=S[0],L=S[1];if(this.lastRange=w,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,i.default)(k,this.lastRange)){var q;!this.composing&&L!=null&&L.native.collapsed&&L.start.node!==this.cursor.textNode&&this.cursor.restore();var A=[s.default.events.SELECTION_CHANGE,(0,l.default)(this.lastRange),(0,l.default)(k),M];if((q=this.emitter).emit.apply(q,[s.default.events.EDITOR_CHANGE].concat(A)),M!==s.default.sources.SILENT){var I;(I=this.emitter).emit.apply(I,A)}}}}]),x}();function E(x,O){try{O.parentNode}catch{return!1}return O instanceof Text&&(O=O.parentNode),x.contains(O)}h.Range=_,h.default=b},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function s(c,p){for(var $=0;$0&&(o+=1),[this.parent.domNode,o]},l.prototype.value=function(){var n;return n={},n[this.statics.blotName]=this.statics.value(this.domNode)||!0,n},l.scope=u.Scope.INLINE_BLOT,l}(a.default);h.default=r},function(e,h,m){var g=m(11),a=m(3),u={attributes:{compose:function(f,l,n){typeof f!="object"&&(f={}),typeof l!="object"&&(l={});var i=a(!0,{},l);n||(i=Object.keys(i).reduce(function(s,c){return i[c]!=null&&(s[c]=i[c]),s},{}));for(var o in f)f[o]!==void 0&&l[o]===void 0&&(i[o]=f[o]);return Object.keys(i).length>0?i:void 0},diff:function(f,l){typeof f!="object"&&(f={}),typeof l!="object"&&(l={});var n=Object.keys(f).concat(Object.keys(l)).reduce(function(i,o){return g(f[o],l[o])||(i[o]=l[o]===void 0?null:l[o]),i},{});return Object.keys(n).length>0?n:void 0},transform:function(f,l,n){if(typeof f!="object")return l;if(typeof l=="object"){if(!n)return l;var i=Object.keys(l).reduce(function(o,s){return f[s]===void 0&&(o[s]=l[s]),o},{});return Object.keys(i).length>0?i:void 0}}},iterator:function(f){return new r(f)},length:function(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}};function r(f){this.ops=f,this.index=0,this.offset=0}r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(f){f||(f=1/0);var l=this.ops[this.index];if(l){var n=this.offset,i=u.length(l);if(f>=i-n?(f=i-n,this.index+=1,this.offset=0):this.offset+=f,typeof l.delete=="number")return{delete:f};var o={};return l.attributes&&(o.attributes=l.attributes),typeof l.retain=="number"?o.retain=f:typeof l.insert=="string"?o.insert=l.insert.substr(n,f):o.insert=l.insert,o}else return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var f=this.offset,l=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=f,this.index=l,[n].concat(i)}else return[]},e.exports=u},function(e,h){var m=function(){function g(c,p){return p!=null&&c instanceof p}var a;try{a=Map}catch{a=function(){}}var u;try{u=Set}catch{u=function(){}}var r;try{r=Promise}catch{r=function(){}}function f(c,p,$,v,C){typeof p=="object"&&($=p.depth,v=p.prototype,C=p.includeNonEnumerable,p=p.circular);var y=[],_=[],b=typeof Buffer!="undefined";typeof p=="undefined"&&(p=!0),typeof $=="undefined"&&($=1/0);function E(x,O){if(x===null)return null;if(O===0)return x;var M,k;if(typeof x!="object")return x;if(g(x,a))M=new a;else if(g(x,u))M=new u;else if(g(x,r))M=new r(function(V,R){x.then(function(B){V(E(B,O-1))},function(B){R(E(B,O-1))})});else if(f.__isArray(x))M=[];else if(f.__isRegExp(x))M=new RegExp(x.source,s(x)),x.lastIndex&&(M.lastIndex=x.lastIndex);else if(f.__isDate(x))M=new Date(x.getTime());else{if(b&&Buffer.isBuffer(x))return Buffer.allocUnsafe?M=Buffer.allocUnsafe(x.length):M=new Buffer(x.length),x.copy(M),M;g(x,Error)?M=Object.create(x):typeof v=="undefined"?(k=Object.getPrototypeOf(x),M=Object.create(k)):(M=Object.create(v),k=v)}if(p){var T=y.indexOf(x);if(T!=-1)return _[T];y.push(x),_.push(M)}g(x,a)&&x.forEach(function(V,R){var B=E(R,O-1),N=E(V,O-1);M.set(B,N)}),g(x,u)&&x.forEach(function(V){var R=E(V,O-1);M.add(R)});for(var S in x){var w;k&&(w=Object.getOwnPropertyDescriptor(k,S)),!(w&&w.set==null)&&(M[S]=E(x[S],O-1))}if(Object.getOwnPropertySymbols)for(var L=Object.getOwnPropertySymbols(x),S=0;S0){if(A instanceof i.BlockEmbed||R instanceof i.BlockEmbed){this.optimize();return}if(A instanceof $.default){var B=A.newlineIndex(A.length(),!0);if(B>-1&&(A=A.split(B+1),A===R)){this.optimize();return}}else if(R instanceof $.default){var N=R.newlineIndex(0);N>-1&&R.split(N+1)}var P=R.children.head instanceof c.default?null:R.children.head;A.moveChildren(R,P),A.remove()}this.optimize()}},{key:"enable",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",S)}},{key:"formatAt",value:function(S,w,L,q){this.whitelist!=null&&!this.whitelist[L]||(u(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"formatAt",this).call(this,S,w,L,q),this.optimize())}},{key:"insertAt",value:function(S,w,L){if(!(L!=null&&this.whitelist!=null&&!this.whitelist[w])){if(S>=this.length())if(L==null||f.default.query(w,f.default.Scope.BLOCK)==null){var q=f.default.create(this.statics.defaultChild);this.appendChild(q),L==null&&w.endsWith(` `)&&(w=w.slice(0,-1)),q.insertAt(0,w,L)}else{var A=f.default.create(w,L);this.appendChild(A)}else u(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,S,w,L);this.optimize()}}},{key:"insertBefore",value:function(S,w){if(S.statics.scope===f.default.Scope.INLINE_BLOT){var L=f.default.create(this.statics.defaultChild);L.appendChild(S),S=L}u(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertBefore",this).call(this,S,w)}},{key:"leaf",value:function(S){return this.path(S).pop()||[null,-1]}},{key:"line",value:function(S){return S===this.length()?this.line(S-1):this.descendant(x,S)}},{key:"lines",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,L=function q(A,I,F){var V=[],R=F;return A.children.forEachAt(I,F,function(B,N,P){x(B)?V.push(B):B instanceof f.default.Container&&(V=V.concat(q(B,N,R))),R-=P}),V};return L(this,S,w)}},{key:"optimize",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(u(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"optimize",this).call(this,S,w),S.length>0&&this.emitter.emit(n.default.events.SCROLL_OPTIMIZE,S,w))}},{key:"path",value:function(S){return u(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"path",this).call(this,S).slice(1)}},{key:"update",value:function(S){if(this.batch!==!0){var w=n.default.sources.USER;typeof S=="string"&&(w=S),Array.isArray(S)||(S=this.observer.takeRecords()),S.length>0&&this.emitter.emit(n.default.events.SCROLL_BEFORE_UPDATE,w,S),u(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"update",this).call(this,S.concat([])),S.length>0&&this.emitter.emit(n.default.events.SCROLL_UPDATE,w,S)}}}]),k}(f.default.Scroll);O.blotName="scroll",O.className="ql-editor",O.tagName="DIV",O.defaultChild="block",O.allowedChildren=[o.default,i.BlockEmbed,C.default],h.default=O},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.SHORTKEY=h.default=void 0;var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},a=function(){function D(W,H){var z=[],K=!0,Z=!1,ie=void 0;try{for(var se=W[Symbol.iterator](),ue;!(K=(ue=se.next()).done)&&(z.push(ue.value),!(H&&z.length===H));K=!0);}catch(fe){Z=!0,ie=fe}finally{try{!K&&se.return&&se.return()}finally{if(Z)throw ie}}return z}return function(W,H){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return D(W,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function D(W,H){for(var z=0;z1&&arguments[1]!==void 0?arguments[1]:{},Z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=j(z);if(ie==null||ie.key==null)return L.warn("Attempted to add invalid keyboard binding",ie);typeof K=="function"&&(K={handler:K}),typeof Z=="function"&&(Z={handler:Z}),ie=(0,o.default)(ie,K,Z),this.bindings[ie.key]=this.bindings[ie.key]||[],this.bindings[ie.key].push(ie)}},{key:"listen",value:function(){var z=this;this.quill.root.addEventListener("keydown",function(K){if(!K.defaultPrevented){var Z=K.which||K.keyCode,ie=(z.bindings[Z]||[]).filter(function(U){return W.match(K,U)});if(ie.length!==0){var se=z.quill.getSelection();if(!(se==null||!z.quill.hasFocus())){var ue=z.quill.getLine(se.index),fe=a(ue,2),ye=fe[0],_e=fe[1],J=z.quill.getLeaf(se.index),Q=a(J,2),ne=Q[0],le=Q[1],te=se.length===0?[ne,le]:z.quill.getLeaf(se.index+se.length),me=a(te,2),$e=me[0],be=me[1],X=ne instanceof C.default.Text?ne.value().slice(0,le):"",ae=$e instanceof C.default.Text?$e.value().slice(be):"",oe={collapsed:se.length===0,empty:se.length===0&&ye.length()<=1,format:z.quill.getFormat(se),offset:_e,prefix:X,suffix:ae},G=ie.some(function(U){if(U.collapsed!=null&&U.collapsed!==oe.collapsed||U.empty!=null&&U.empty!==oe.empty||U.offset!=null&&U.offset!==oe.offset)return!1;if(Array.isArray(U.format)){if(U.format.every(function(Y){return oe.format[Y]==null}))return!1}else if(g(U.format)==="object"&&!Object.keys(U.format).every(function(Y){return U.format[Y]===!0?oe.format[Y]!=null:U.format[Y]===!1?oe.format[Y]==null:(0,n.default)(U.format[Y],oe.format[Y])}))return!1;return U.prefix!=null&&!U.prefix.test(oe.prefix)||U.suffix!=null&&!U.suffix.test(oe.suffix)?!1:U.handler.call(z,se,oe)!==!0});G&&K.preventDefault()}}}})}}]),W}(O.default);A.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},A.DEFAULTS={bindings:{bold:P("bold"),italic:P("italic"),underline:P("underline"),indent:{key:A.keys.TAB,format:["blockquote","indent","list"],handler:function(W,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","+1",_.default.sources.USER)}},outdent:{key:A.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","-1",_.default.sources.USER)}},"outdent backspace":{key:A.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,H){H.format.indent!=null?this.quill.format("indent","-1",_.default.sources.USER):H.format.list!=null&&this.quill.format("list",!1,_.default.sources.USER)}},"indent code-block":N(!0),"outdent code-block":N(!1),"remove tab":{key:A.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,_.default.sources.USER)}},tab:{key:A.keys.TAB,handler:function(W){this.quill.history.cutoff();var H=new c.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(H,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,_.default.sources.SILENT)}},"list empty enter":{key:A.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,H){this.quill.format("list",!1,_.default.sources.USER),H.format.indent&&this.quill.format("indent",!1,_.default.sources.USER)}},"checklist enter":{key:A.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var H=this.quill.getLine(W.index),z=a(H,2),K=z[0],Z=z[1],ie=(0,o.default)({},K.formats(),{list:"checked"}),se=new c.default().retain(W.index).insert(` `,ie).retain(K.length()-Z-1).retain(1,{list:"unchecked"});this.quill.updateContents(se,_.default.sources.USER),this.quill.setSelection(W.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:A.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,H){var z=this.quill.getLine(W.index),K=a(z,2),Z=K[0],ie=K[1],se=new c.default().retain(W.index).insert(` `,H.format).retain(Z.length()-ie-1).retain(1,{header:null});this.quill.updateContents(se,_.default.sources.USER),this.quill.setSelection(W.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,H){var z=H.prefix.length,K=this.quill.getLine(W.index),Z=a(K,2),ie=Z[0],se=Z[1];if(se>z)return!0;var ue=void 0;switch(H.prefix.trim()){case"[]":case"[ ]":ue="unchecked";break;case"[x]":ue="checked";break;case"-":case"*":ue="bullet";break;default:ue="ordered"}this.quill.insertText(W.index," ",_.default.sources.USER),this.quill.history.cutoff();var fe=new c.default().retain(W.index-se).delete(z+1).retain(ie.length()-2-se).retain(1,{list:ue});this.quill.updateContents(fe,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-z,_.default.sources.SILENT)}},"code exit":{key:A.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var H=this.quill.getLine(W.index),z=a(H,2),K=z[0],Z=z[1],ie=new c.default().retain(W.index+K.length()-Z-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ie,_.default.sources.USER)}},"embed left":I(A.keys.LEFT,!1),"embed left shift":I(A.keys.LEFT,!0),"embed right":I(A.keys.RIGHT,!1),"embed right shift":I(A.keys.RIGHT,!0)}};function I(D,W){var H,z=D===A.keys.LEFT?"prefix":"suffix";return H={key:D,shiftKey:W,altKey:null},k(H,z,/^$/),k(H,"handler",function(Z){var ie=Z.index;D===A.keys.RIGHT&&(ie+=Z.length+1);var se=this.quill.getLeaf(ie),ue=a(se,1),fe=ue[0];return fe instanceof C.default.Embed?(D===A.keys.LEFT?W?this.quill.setSelection(Z.index-1,Z.length+1,_.default.sources.USER):this.quill.setSelection(Z.index-1,_.default.sources.USER):W?this.quill.setSelection(Z.index,Z.length+1,_.default.sources.USER):this.quill.setSelection(Z.index+Z.length+1,_.default.sources.USER),!1):!0}),H}function F(D,W){if(!(D.index===0||this.quill.getLength()<=1)){var H=this.quill.getLine(D.index),z=a(H,1),K=z[0],Z={};if(W.offset===0){var ie=this.quill.getLine(D.index-1),se=a(ie,1),ue=se[0];if(ue!=null&&ue.length()>1){var fe=K.formats(),ye=this.quill.getFormat(D.index-1,1);Z=$.default.attributes.diff(fe,ye)||{}}}var _e=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText(D.index-_e,_e,_.default.sources.USER),Object.keys(Z).length>0&&this.quill.formatLine(D.index-_e,_e,Z,_.default.sources.USER),this.quill.focus()}}function V(D,W){var H=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!(D.index>=this.quill.getLength()-H)){var z={},K=0,Z=this.quill.getLine(D.index),ie=a(Z,1),se=ie[0];if(W.offset>=se.length()-1){var ue=this.quill.getLine(D.index+1),fe=a(ue,1),ye=fe[0];if(ye){var _e=se.formats(),J=this.quill.getFormat(D.index,1);z=$.default.attributes.diff(_e,J)||{},K=ye.length()}}this.quill.deleteText(D.index,H,_.default.sources.USER),Object.keys(z).length>0&&this.quill.formatLine(D.index+K-1,H,z,_.default.sources.USER)}}function R(D){var W=this.quill.getLines(D),H={};if(W.length>1){var z=W[0].formats(),K=W[W.length-1].formats();H=$.default.attributes.diff(K,z)||{}}this.quill.deleteText(D,_.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(D.index,1,H,_.default.sources.USER),this.quill.setSelection(D.index,_.default.sources.SILENT),this.quill.focus()}function B(D,W){var H=this;D.length>0&&this.quill.scroll.deleteAt(D.index,D.length);var z=Object.keys(W.format).reduce(function(K,Z){return C.default.query(Z,C.default.Scope.BLOCK)&&!Array.isArray(W.format[Z])&&(K[Z]=W.format[Z]),K},{});this.quill.insertText(D.index,` `,z,_.default.sources.USER),this.quill.setSelection(D.index+1,_.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(K){z[K]==null&&(Array.isArray(W.format[K])||K!=="link"&&H.quill.format(K,W.format[K],_.default.sources.USER))})}function N(D){return{key:A.keys.TAB,shiftKey:!D,format:{"code-block":!0},handler:function(H){var z=C.default.query("code-block"),K=H.index,Z=H.length,ie=this.quill.scroll.descendant(z,K),se=a(ie,2),ue=se[0],fe=se[1];if(ue!=null){var ye=this.quill.getIndex(ue),_e=ue.newlineIndex(fe,!0)+1,J=ue.newlineIndex(ye+fe+Z),Q=ue.domNode.textContent.slice(_e,J).split(` `);fe=0,Q.forEach(function(ne,le){D?(ue.insertAt(_e+fe,z.TAB),fe+=z.TAB.length,le===0?K+=z.TAB.length:Z+=z.TAB.length):ne.startsWith(z.TAB)&&(ue.deleteAt(_e+fe,z.TAB.length),fe-=z.TAB.length,le===0?K-=z.TAB.length:Z-=z.TAB.length),fe+=ne.length+1}),this.quill.update(_.default.sources.USER),this.quill.setSelection(K,Z,_.default.sources.SILENT)}}}}function P(D){return{key:D[0].toUpperCase(),shortKey:!0,handler:function(H,z){this.quill.format(D,!z.format[D],_.default.sources.USER)}}}function j(D){if(typeof D=="string"||typeof D=="number")return j({key:D});if((typeof D=="undefined"?"undefined":g(D))==="object"&&(D=(0,f.default)(D,!1)),typeof D.key=="string")if(A.keys[D.key.toUpperCase()]!=null)D.key=A.keys[D.key.toUpperCase()];else if(D.key.length===1)D.key=D.key.toUpperCase().charCodeAt(0);else return null;return D.shortKey&&(D[q]=D.shortKey,delete D.shortKey),D}h.default=A,h.SHORTKEY=q},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function $(v,C){var y=[],_=!0,b=!1,E=void 0;try{for(var x=v[Symbol.iterator](),O;!(_=(O=x.next()).done)&&(y.push(O.value),!(C&&y.length===C));_=!0);}catch(M){b=!0,E=M}finally{try{!_&&x.return&&x.return()}finally{if(b)throw E}}return y}return function(v,C){if(Array.isArray(v))return v;if(Symbol.iterator in Object(v))return $(v,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function $(v,C,y){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,C);if(_===void 0){var b=Object.getPrototypeOf(v);return b===null?void 0:$(b,C,y)}else{if("value"in _)return _.value;var E=_.get;return E===void 0?void 0:E.call(y)}},u=function(){function $(v,C){for(var y=0;y-1}h.default=o,h.sanitize=s},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=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},a=function(){function p($,v){for(var C=0;C1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(v!==y&&(y!=null&&y.classList.remove("ql-selected"),v!=null&&(v.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(v.parentNode.children,v),v.hasAttribute("data-value")?this.label.setAttribute("data-value",v.getAttribute("data-value")):this.label.removeAttribute("data-value"),v.hasAttribute("data-label")?this.label.setAttribute("data-label",v.getAttribute("data-label")):this.label.removeAttribute("data-label"),C))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event=="undefined"?"undefined":g(Event))==="object"){var _=document.createEvent("Event");_.initEvent("change",!0,!0),this.select.dispatchEvent(_)}this.close()}}},{key:"update",value:function(){var v=void 0;if(this.select.selectedIndex>-1){var C=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];v=this.select.options[this.select.selectedIndex],this.selectItem(C)}else this.selectItem(null);var y=v!=null&&v!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),p}();h.default=c},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(0),a=L(g),u=m(5),r=L(u),f=m(4),l=L(f),n=m(16),i=L(n),o=m(25),s=L(o),c=m(24),p=L(c),$=m(35),v=L($),C=m(6),y=L(C),_=m(22),b=L(_),E=m(7),x=L(E),O=m(55),M=L(O),k=m(42),T=L(k),S=m(23),w=L(S);function L(q){return q&&q.__esModule?q:{default:q}}r.default.register({"blots/block":l.default,"blots/block/embed":f.BlockEmbed,"blots/break":i.default,"blots/container":s.default,"blots/cursor":p.default,"blots/embed":v.default,"blots/inline":y.default,"blots/scroll":b.default,"blots/text":x.default,"modules/clipboard":M.default,"modules/history":T.default,"modules/keyboard":w.default}),a.default.register(l.default,i.default,p.default,y.default,b.default,x.default),h.default=r.default},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(1),a=function(){function u(r){this.domNode=r,this.domNode[g.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(r){if(this.tagName==null)throw new g.ParchmentError("Blot definition missing tagName");var f;return Array.isArray(this.tagName)?(typeof r=="string"&&(r=r.toUpperCase(),parseInt(r).toString()===r&&(r=parseInt(r))),typeof r=="number"?f=document.createElement(this.tagName[r-1]):this.tagName.indexOf(r)>-1?f=document.createElement(r):f=document.createElement(this.tagName[0])):f=document.createElement(this.tagName),this.className&&f.classList.add(this.className),f},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var r=this.domNode.cloneNode(!1);return g.create(r)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[g.DATA_KEY]},u.prototype.deleteAt=function(r,f){var l=this.isolate(r,f);l.remove()},u.prototype.formatAt=function(r,f,l,n){var i=this.isolate(r,f);if(g.query(l,g.Scope.BLOT)!=null&&n)i.wrap(l,n);else if(g.query(l,g.Scope.ATTRIBUTE)!=null){var o=g.create(this.statics.scope);i.wrap(o),o.format(l,n)}},u.prototype.insertAt=function(r,f,l){var n=l==null?g.create("text",f):g.create(f,l),i=this.split(r);this.parent.insertBefore(n,i)},u.prototype.insertInto=function(r,f){f===void 0&&(f=null),this.parent!=null&&this.parent.children.remove(this);var l=null;r.children.insertBefore(this,f),f!=null&&(l=f.domNode),(this.domNode.parentNode!=r.domNode||this.domNode.nextSibling!=l)&&r.domNode.insertBefore(this.domNode,l),this.parent=r,this.attach()},u.prototype.isolate=function(r,f){var l=this.split(r);return l.split(f),l},u.prototype.length=function(){return 1},u.prototype.offset=function(r){return r===void 0&&(r=this.parent),this.parent==null||this==r?0:this.parent.children.offset(this)+this.parent.offset(r)},u.prototype.optimize=function(r){this.domNode[g.DATA_KEY]!=null&&delete this.domNode[g.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(r){r.parent!=null&&(r.parent.insertBefore(this,r.next),r.remove())},u.prototype.replaceWith=function(r,f){var l=typeof r=="string"?g.create(r,f):r;return l.replace(this),l},u.prototype.split=function(r,f){return r===0?this:this.next},u.prototype.update=function(r,f){},u.prototype.wrap=function(r,f){var l=typeof r=="string"?g.create(r,f):r;return this.parent!=null&&this.parent.insertBefore(l,this.next),l.appendChild(this),l},u.blotName="abstract",u}();h.default=a},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(12),a=m(32),u=m(33),r=m(1),f=function(){function l(n){this.attributes={},this.domNode=n,this.build()}return l.prototype.attribute=function(n,i){i?n.add(this.domNode,i)&&(n.value(this.domNode)!=null?this.attributes[n.attrName]=n:delete this.attributes[n.attrName]):(n.remove(this.domNode),delete this.attributes[n.attrName])},l.prototype.build=function(){var n=this;this.attributes={};var i=g.default.keys(this.domNode),o=a.default.keys(this.domNode),s=u.default.keys(this.domNode);i.concat(o).concat(s).forEach(function(c){var p=r.query(c,r.Scope.ATTRIBUTE);p instanceof g.default&&(n.attributes[p.attrName]=p)})},l.prototype.copy=function(n){var i=this;Object.keys(this.attributes).forEach(function(o){var s=i.attributes[o].value(i.domNode);n.format(o,s)})},l.prototype.move=function(n){var i=this;this.copy(n),Object.keys(this.attributes).forEach(function(o){i.attributes[o].remove(i.domNode)}),this.attributes={}},l.prototype.values=function(){var n=this;return Object.keys(this.attributes).reduce(function(i,o){return i[o]=n.attributes[o].value(n.domNode),i},{})},l}();h.default=f},function(e,h,m){var g=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var i in n)n.hasOwnProperty(i)&&(l[i]=n[i])};return function(l,n){f(l,n);function i(){this.constructor=l}l.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=m(12);function u(f,l){var n=f.getAttribute("class")||"";return n.split(/\s+/).filter(function(i){return i.indexOf(l+"-")===0})}var r=function(f){g(l,f);function l(){return f!==null&&f.apply(this,arguments)||this}return l.keys=function(n){return(n.getAttribute("class")||"").split(/\s+/).map(function(i){return i.split("-").slice(0,-1).join("-")})},l.prototype.add=function(n,i){return this.canAdd(n,i)?(this.remove(n),n.classList.add(this.keyName+"-"+i),!0):!1},l.prototype.remove=function(n){var i=u(n,this.keyName);i.forEach(function(o){n.classList.remove(o)}),n.classList.length===0&&n.removeAttribute("class")},l.prototype.value=function(n){var i=u(n,this.keyName)[0]||"",o=i.slice(this.keyName.length+1);return this.canAdd(n,o)?o:""},l}(a.default);h.default=r},function(e,h,m){var g=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var i in n)n.hasOwnProperty(i)&&(l[i]=n[i])};return function(l,n){f(l,n);function i(){this.constructor=l}l.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=m(12);function u(f){var l=f.split("-"),n=l.slice(1).map(function(i){return i[0].toUpperCase()+i.slice(1)}).join("");return l[0]+n}var r=function(f){g(l,f);function l(){return f!==null&&f.apply(this,arguments)||this}return l.keys=function(n){return(n.getAttribute("style")||"").split(";").map(function(i){var o=i.split(":");return o[0].trim()})},l.prototype.add=function(n,i){return this.canAdd(n,i)?(n.style[u(this.keyName)]=i,!0):!1},l.prototype.remove=function(n){n.style[u(this.keyName)]="",n.getAttribute("style")||n.removeAttribute("style")},l.prototype.value=function(n){var i=n.style[u(this.keyName)];return this.canAdd(n,i)?i:""},l}(a.default);h.default=r},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function r(f,l){for(var n=0;nO&&this.stack.undo.length>0){var M=this.stack.undo.pop();x=x.compose(M.undo),b=M.redo.compose(b)}else this.lastRecorded=O;this.stack.undo.push({redo:b,undo:x}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(b){this.stack.undo.forEach(function(E){E.undo=b.transform(E.undo,!0),E.redo=b.transform(E.redo,!0)}),this.stack.redo.forEach(function(E){E.undo=b.transform(E.undo,!0),E.redo=b.transform(E.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),y}(n.default);p.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function $(C){var y=C.ops[C.ops.length-1];return y==null?!1:y.insert!=null?typeof y.insert=="string"&&y.insert.endsWith(` `):y.attributes!=null?Object.keys(y.attributes).some(function(_){return u.default.query(_,u.default.Scope.BLOCK)!=null}):!1}function v(C){var y=C.reduce(function(b,E){return b+=E.delete||0,b},0),_=C.length()-y;return $(C)&&(_-=1),_}h.default=p,h.getLastChangeIndex=v},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.BaseTooltip=void 0;var g=function(){function B(N,P){for(var j=0;j0&&arguments[0]!==void 0?arguments[0]:"link",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),D!=null?this.textbox.value=D:j!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+j)||""),this.root.setAttribute("data-mode",j)}},{key:"restoreFocus",value:function(){var j=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=j}},{key:"save",value:function(){var j=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var D=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",j,i.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",j,i.default.sources.USER)),this.quill.root.scrollTop=D;break}case"video":j=V(j);case"formula":{if(!j)break;var W=this.quill.getSelection(!0);if(W!=null){var H=W.index+W.length;this.quill.insertEmbed(H,this.root.getAttribute("data-mode"),j,i.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(H+1," ",i.default.sources.USER),this.quill.setSelection(H+2,i.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),N}(x.default);function V(B){var N=B.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||B.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return N?(N[1]||"https")+"://www.youtube.com/embed/"+N[2]+"?showinfo=0":(N=B.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(N[1]||"https")+"://player.vimeo.com/video/"+N[2]+"/":B}function R(B,N){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;N.forEach(function(j){var D=document.createElement("option");j===P?D.setAttribute("selected","selected"):D.setAttribute("value",j),B.appendChild(D)})}h.BaseTooltip=F,h.default=I},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var u=[],r=0;r1&&this.append.apply(this,u.slice(1))},a.prototype.contains=function(u){for(var r,f=this.iterator();r=f();)if(r===u)return!0;return!1},a.prototype.insertBefore=function(u,r){!u||(u.next=r,r!=null?(u.prev=r.prev,r.prev!=null&&(r.prev.next=u),r.prev=u,r===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},a.prototype.offset=function(u){for(var r=0,f=this.head;f!=null;){if(f===u)return r;r+=f.length(),f=f.next}return-1},a.prototype.remove=function(u){!this.contains(u)||(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},a.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var r=u;return u!=null&&(u=u.next),r}},a.prototype.find=function(u,r){r===void 0&&(r=!1);for(var f,l=this.iterator();f=l();){var n=f.length();if(us?f(o,u-s,Math.min(r,s+p-u)):f(o,0,Math.min(p,u+r-s)),s+=p}},a.prototype.map=function(u){return this.reduce(function(r,f){return r.push(u(f)),r},[])},a.prototype.reduce=function(u,r){for(var f,l=this.iterator();f=l();)r=u(r,f);return r},a}();h.default=g},function(e,h,m){var g=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s])};return function(i,o){n(i,o);function s(){this.constructor=i}i.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=m(17),u=m(1),r={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},f=100,l=function(n){g(i,n);function i(o){var s=n.call(this,o)||this;return s.scroll=s,s.observer=new MutationObserver(function(c){s.update(c)}),s.observer.observe(s.domNode,r),s.attach(),s}return i.prototype.detach=function(){n.prototype.detach.call(this),this.observer.disconnect()},i.prototype.deleteAt=function(o,s){this.update(),o===0&&s===this.length()?this.children.forEach(function(c){c.remove()}):n.prototype.deleteAt.call(this,o,s)},i.prototype.formatAt=function(o,s,c,p){this.update(),n.prototype.formatAt.call(this,o,s,c,p)},i.prototype.insertAt=function(o,s,c){this.update(),n.prototype.insertAt.call(this,o,s,c)},i.prototype.optimize=function(o,s){var c=this;o===void 0&&(o=[]),s===void 0&&(s={}),n.prototype.optimize.call(this,s);for(var p=[].slice.call(this.observer.takeRecords());p.length>0;)o.push(p.pop());for(var $=function(_,b){b===void 0&&(b=!0),!(_==null||_===c)&&_.domNode.parentNode!=null&&(_.domNode[u.DATA_KEY].mutations==null&&(_.domNode[u.DATA_KEY].mutations=[]),b&&$(_.parent))},v=function(_){_.domNode[u.DATA_KEY]==null||_.domNode[u.DATA_KEY].mutations==null||(_ instanceof a.default&&_.children.forEach(v),_.optimize(s))},C=o,y=0;C.length>0;y+=1){if(y>=f)throw new Error("[Parchment] Maximum optimize iterations reached");for(C.forEach(function(_){var b=u.find(_.target,!0);b!=null&&(b.domNode===_.target&&(_.type==="childList"?($(u.find(_.previousSibling,!1)),[].forEach.call(_.addedNodes,function(E){var x=u.find(E,!1);$(x,!1),x instanceof a.default&&x.children.forEach(function(O){$(O,!1)})})):_.type==="attributes"&&$(b.prev)),$(b))}),this.children.forEach(v),C=[].slice.call(this.observer.takeRecords()),p=C.slice();p.length>0;)o.push(p.pop())}},i.prototype.update=function(o,s){var c=this;s===void 0&&(s={}),o=o||this.observer.takeRecords(),o.map(function(p){var $=u.find(p.target,!0);return $==null?null:$.domNode[u.DATA_KEY].mutations==null?($.domNode[u.DATA_KEY].mutations=[p],$):($.domNode[u.DATA_KEY].mutations.push(p),null)}).forEach(function(p){p==null||p===c||p.domNode[u.DATA_KEY]==null||p.update(p.domNode[u.DATA_KEY].mutations||[],s)}),this.domNode[u.DATA_KEY].mutations!=null&&n.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,s),this.optimize(o,s)},i.blotName="scroll",i.defaultChild="block",i.scope=u.Scope.BLOCK_BLOT,i.tagName="DIV",i}(a.default);h.default=l},function(e,h,m){var g=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])};return function(n,i){l(n,i);function o(){this.constructor=n}n.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=m(18),u=m(1);function r(l,n){if(Object.keys(l).length!==Object.keys(n).length)return!1;for(var i in l)if(l[i]!==n[i])return!1;return!0}var f=function(l){g(n,l);function n(){return l!==null&&l.apply(this,arguments)||this}return n.formats=function(i){if(i.tagName!==n.tagName)return l.formats.call(this,i)},n.prototype.format=function(i,o){var s=this;i===this.statics.blotName&&!o?(this.children.forEach(function(c){c instanceof a.default||(c=c.wrap(n.blotName,!0)),s.attributes.copy(c)}),this.unwrap()):l.prototype.format.call(this,i,o)},n.prototype.formatAt=function(i,o,s,c){if(this.formats()[s]!=null||u.query(s,u.Scope.ATTRIBUTE)){var p=this.isolate(i,o);p.format(s,c)}else l.prototype.formatAt.call(this,i,o,s,c)},n.prototype.optimize=function(i){l.prototype.optimize.call(this,i);var o=this.formats();if(Object.keys(o).length===0)return this.unwrap();var s=this.next;s instanceof n&&s.prev===this&&r(o,s.formats())&&(s.moveChildren(this),s.remove())},n.blotName="inline",n.scope=u.Scope.INLINE_BLOT,n.tagName="SPAN",n}(a.default);h.default=f},function(e,h,m){var g=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var i in n)n.hasOwnProperty(i)&&(l[i]=n[i])};return function(l,n){f(l,n);function i(){this.constructor=l}l.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=m(18),u=m(1),r=function(f){g(l,f);function l(){return f!==null&&f.apply(this,arguments)||this}return l.formats=function(n){var i=u.query(l.blotName).tagName;if(n.tagName!==i)return f.formats.call(this,n)},l.prototype.format=function(n,i){u.query(n,u.Scope.BLOCK)!=null&&(n===this.statics.blotName&&!i?this.replaceWith(l.blotName):f.prototype.format.call(this,n,i))},l.prototype.formatAt=function(n,i,o,s){u.query(o,u.Scope.BLOCK)!=null?this.format(o,s):f.prototype.formatAt.call(this,n,i,o,s)},l.prototype.insertAt=function(n,i,o){if(o==null||u.query(i,u.Scope.INLINE)!=null)f.prototype.insertAt.call(this,n,i,o);else{var s=this.split(n),c=u.create(i,o);s.parent.insertBefore(c,s)}},l.prototype.update=function(n,i){navigator.userAgent.match(/Trident/)?this.build():f.prototype.update.call(this,n,i)},l.blotName="block",l.scope=u.Scope.BLOCK_BLOT,l.tagName="P",l}(a.default);h.default=r},function(e,h,m){var g=this&&this.__extends||function(){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,l){f.__proto__=l}||function(f,l){for(var n in l)l.hasOwnProperty(n)&&(f[n]=l[n])};return function(f,l){r(f,l);function n(){this.constructor=f}f.prototype=l===null?Object.create(l):(n.prototype=l.prototype,new n)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=m(19),u=function(r){g(f,r);function f(){return r!==null&&r.apply(this,arguments)||this}return f.formats=function(l){},f.prototype.format=function(l,n){r.prototype.formatAt.call(this,0,this.length(),l,n)},f.prototype.formatAt=function(l,n,i,o){l===0&&n===this.length()?this.format(i,o):r.prototype.formatAt.call(this,l,n,i,o)},f.prototype.formats=function(){return this.statics.formats(this.domNode)},f}(a.default);h.default=u},function(e,h,m){var g=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,n){l.__proto__=n}||function(l,n){for(var i in n)n.hasOwnProperty(i)&&(l[i]=n[i])};return function(l,n){f(l,n);function i(){this.constructor=l}l.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(h,"__esModule",{value:!0});var a=m(19),u=m(1),r=function(f){g(l,f);function l(n){var i=f.call(this,n)||this;return i.text=i.statics.value(i.domNode),i}return l.create=function(n){return document.createTextNode(n)},l.value=function(n){var i=n.data;return i.normalize&&(i=i.normalize()),i},l.prototype.deleteAt=function(n,i){this.domNode.data=this.text=this.text.slice(0,n)+this.text.slice(n+i)},l.prototype.index=function(n,i){return this.domNode===n?i:-1},l.prototype.insertAt=function(n,i,o){o==null?(this.text=this.text.slice(0,n)+i+this.text.slice(n),this.domNode.data=this.text):f.prototype.insertAt.call(this,n,i,o)},l.prototype.length=function(){return this.text.length},l.prototype.optimize=function(n){f.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof l&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},l.prototype.position=function(n,i){return[this.domNode,n]},l.prototype.split=function(n,i){if(i===void 0&&(i=!1),!i){if(n===0)return this;if(n===this.length())return this.next}var o=u.create(this.domNode.splitText(n));return this.parent.insertBefore(o,this.next),this.text=this.statics.value(this.domNode),o},l.prototype.update=function(n,i){var o=this;n.some(function(s){return s.type==="characterData"&&s.target===o.domNode})&&(this.text=this.statics.value(this.domNode))},l.prototype.value=function(){return this.text},l.blotName="text",l.scope=u.Scope.INLINE_BLOT,l}(a.default);h.default=r},function(e,h,m){var g=document.createElement("div");if(g.classList.toggle("test-class",!1),g.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,r){return arguments.length>1&&!this.contains(u)==!r?r:a.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,r){return r=r||0,this.substr(r,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,r){var f=this.toString();(typeof r!="number"||!isFinite(r)||Math.floor(r)!==r||r>f.length)&&(r=f.length),r-=u.length;var l=f.indexOf(u,r);return l!==-1&&l===r}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(r){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof r!="function")throw new TypeError("predicate must be a function");for(var f=Object(this),l=f.length>>>0,n=arguments[1],i,o=0;o_.length?y:_,x=y.length>_.length?_:y,O=E.indexOf(x);if(O!=-1)return b=[[g,E.substring(0,O)],[a,x],[g,E.substring(O+x.length)]],y.length>_.length&&(b[0][0]=b[2][0]=m),b;if(x.length==1)return[[m,y],[g,_]];var M=o(y,_);if(M){var k=M[0],T=M[1],S=M[2],w=M[3],L=M[4],q=u(k,S),A=u(T,w);return q.concat([[a,L]],A)}return f(y,_)}function f(y,_){for(var b=y.length,E=_.length,x=Math.ceil((b+E)/2),O=x,M=2*x,k=new Array(M),T=new Array(M),S=0;Sb)A+=2;else if(P>E)q+=2;else if(L){var j=O+w-R;if(j>=0&&j=D)return l(y,_,N,P)}}}for(var W=-V+I;W<=V-F;W+=2){var j=O+W,D;W==-V||W!=V&&T[j-1]b)F+=2;else if(H>E)I+=2;else if(!L){var B=O+w-W;if(B>=0&&B=D)return l(y,_,N,P)}}}}return[[m,y],[g,_]]}function l(y,_,b,E){var x=y.substring(0,b),O=_.substring(0,E),M=y.substring(b),k=_.substring(E),T=u(x,O),S=u(M,k);return T.concat(S)}function n(y,_){if(!y||!_||y.charAt(0)!=_.charAt(0))return 0;for(var b=0,E=Math.min(y.length,_.length),x=E,O=0;b_.length?y:_,E=y.length>_.length?_:y;if(b.length<4||E.length*2=A.length?[N,P,j,D,B]:null}var O=x(b,E,Math.ceil(b.length/4)),M=x(b,E,Math.ceil(b.length/2)),k;if(!O&&!M)return null;M?O?k=O[4].length>M[4].length?O:M:k=M:k=O;var T,S,w,L;y.length>_.length?(T=k[0],S=k[1],w=k[2],L=k[3]):(w=k[0],L=k[1],T=k[2],S=k[3]);var q=k[4];return[T,S,w,L,q]}function s(y){y.push([a,""]);for(var _=0,b=0,E=0,x="",O="",M;_1?(b!==0&&E!==0&&(M=n(O,x),M!==0&&(_-b-E>0&&y[_-b-E-1][0]==a?y[_-b-E-1][1]+=O.substring(0,M):(y.splice(0,0,[a,O.substring(0,M)]),_++),O=O.substring(M),x=x.substring(M)),M=i(O,x),M!==0&&(y[_][1]=O.substring(O.length-M)+y[_][1],O=O.substring(0,O.length-M),x=x.substring(0,x.length-M))),b===0?y.splice(_-E,b+E,[g,O]):E===0?y.splice(_-b,b+E,[m,x]):y.splice(_-b-E,b+E,[m,x],[g,O]),_=_-b-E+(b?1:0)+(E?1:0)+1):_!==0&&y[_-1][0]==a?(y[_-1][1]+=y[_][1],y.splice(_,1)):_++,E=0,b=0,x="",O="";break}y[y.length-1][1]===""&&y.pop();var k=!1;for(_=1;_0&&E.splice(x+2,0,[M[0],k]),C(E,x,3)}else return y}function v(y){for(var _=!1,b=function(M){return M.charCodeAt(0)>=56320&&M.charCodeAt(0)<=57343},E=function(M){return M.charCodeAt(M.length-1)>=55296&&M.charCodeAt(M.length-1)<=56319},x=2;x0&&O.push(y[x]);return O}function C(y,_,b){for(var E=_+b-1;E>=0&&E>=_-1;E--)if(E+1\r?\n +\<"),this.convert();var te=this.quill.getFormat(this.quill.selection.savedRange.index);if(te[E.default.blotName]){var me=this.container.innerText;return this.container.innerHTML="",new n.default().insert(me,S({},E.default.blotName,te[E.default.blotName]))}var $e=this.prepareMatching(),be=a($e,2),X=be[0],ae=be[1],oe=W(this.container,X,ae);return j(oe,` `)&&oe.ops[oe.ops.length-1].attributes==null&&(oe=oe.compose(new n.default().retain(oe.length()-1).delete(1))),A.log("convert",this.container.innerHTML,oe),this.container.innerHTML="",oe}},{key:"dangerouslyPasteHTML",value:function(le,te){var me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c.default.sources.API;if(typeof le=="string")this.quill.setContents(this.convert(le),te),this.quill.setSelection(0,c.default.sources.SILENT);else{var $e=this.convert(te);this.quill.updateContents(new n.default().retain(le).concat($e),me),this.quill.setSelection(le+$e.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(le){var te=this;if(!(le.defaultPrevented||!this.quill.isEnabled())){var me=this.quill.getSelection(),$e=new n.default().retain(me.index),be=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout(function(){$e=$e.concat(te.convert()).delete(me.length),te.quill.updateContents($e,c.default.sources.USER),te.quill.setSelection($e.length()-me.length,c.default.sources.SILENT),te.quill.scrollingContainer.scrollTop=be,te.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var le=this,te=[],me=[];return this.matchers.forEach(function($e){var be=a($e,2),X=be[0],ae=be[1];switch(X){case Node.TEXT_NODE:me.push(ae);break;case Node.ELEMENT_NODE:te.push(ae);break;default:[].forEach.call(le.container.querySelectorAll(X),function(oe){oe[I]=oe[I]||[],oe[I].push(ae)});break}}),[te,me]}}]),Q}(C.default);B.DEFAULTS={matchers:[],matchVisual:!0};function N(J,Q,ne){return(typeof Q=="undefined"?"undefined":g(Q))==="object"?Object.keys(Q).reduce(function(le,te){return N(le,te,Q[te])},J):J.reduce(function(le,te){return te.attributes&&te.attributes[Q]?le.push(te):le.insert(te.insert,(0,f.default)({},S({},Q,ne),te.attributes))},new n.default)}function P(J){if(J.nodeType!==Node.ELEMENT_NODE)return{};var Q="__ql-computed-style";return J[Q]||(J[Q]=window.getComputedStyle(J))}function j(J,Q){for(var ne="",le=J.ops.length-1;le>=0&&ne.length-1}function W(J,Q,ne){return J.nodeType===J.TEXT_NODE?ne.reduce(function(le,te){return te(J,le)},new n.default):J.nodeType===J.ELEMENT_NODE?[].reduce.call(J.childNodes||[],function(le,te){var me=W(te,Q,ne);return te.nodeType===J.ELEMENT_NODE&&(me=Q.reduce(function($e,be){return be(te,$e)},me),me=(te[I]||[]).reduce(function($e,be){return be(te,$e)},me)),le.concat(me)},new n.default):new n.default}function H(J,Q,ne){return N(ne,J,!0)}function z(J,Q){var ne=o.default.Attributor.Attribute.keys(J),le=o.default.Attributor.Class.keys(J),te=o.default.Attributor.Style.keys(J),me={};return ne.concat(le).concat(te).forEach(function($e){var be=o.default.query($e,o.default.Scope.ATTRIBUTE);be!=null&&(me[be.attrName]=be.value(J),me[be.attrName])||(be=V[$e],be!=null&&(be.attrName===$e||be.keyName===$e)&&(me[be.attrName]=be.value(J)||void 0),be=R[$e],be!=null&&(be.attrName===$e||be.keyName===$e)&&(be=R[$e],me[be.attrName]=be.value(J)||void 0))}),Object.keys(me).length>0&&(Q=N(Q,me)),Q}function K(J,Q){var ne=o.default.query(J);if(ne==null)return Q;if(ne.prototype instanceof o.default.Embed){var le={},te=ne.value(J);te!=null&&(le[ne.blotName]=te,Q=new n.default().insert(le,ne.formats(J)))}else typeof ne.formats=="function"&&(Q=N(Q,ne.blotName,ne.formats(J)));return Q}function Z(J,Q){return j(Q,` `)||Q.insert(` `),Q}function ie(){return new n.default}function se(J,Q){var ne=o.default.query(J);if(ne==null||ne.blotName!=="list-item"||!j(Q,` `))return Q;for(var le=-1,te=J.parentNode;!te.classList.contains("ql-clipboard");)(o.default.query(te)||{}).blotName==="list"&&(le+=1),te=te.parentNode;return le<=0?Q:Q.compose(new n.default().retain(Q.length()-1).retain(1,{indent:le}))}function ue(J,Q){return j(Q,` `)||(D(J)||Q.length()>0&&J.nextSibling&&D(J.nextSibling))&&Q.insert(` `),Q}function fe(J,Q){if(D(J)&&J.nextElementSibling!=null&&!j(Q,` `)){var ne=J.offsetHeight+parseFloat(P(J).marginTop)+parseFloat(P(J).marginBottom);J.nextElementSibling.offsetTop>J.offsetTop+ne*1.5&&Q.insert(` `)}return Q}function ye(J,Q){var ne={},le=J.style||{};return le.fontStyle&&P(J).fontStyle==="italic"&&(ne.italic=!0),le.fontWeight&&(P(J).fontWeight.startsWith("bold")||parseInt(P(J).fontWeight)>=700)&&(ne.bold=!0),Object.keys(ne).length>0&&(Q=N(Q,ne)),parseFloat(le.textIndent||0)>0&&(Q=new n.default().insert(" ").concat(Q)),Q}function _e(J,Q){var ne=J.data;if(J.parentNode.tagName==="O:P")return Q.insert(ne.trim());if(ne.trim().length===0&&J.parentNode.classList.contains("ql-clipboard"))return Q;if(!P(J.parentNode).whiteSpace.startsWith("pre")){var le=function(me,$e){return $e=$e.replace(/[^\u00a0]/g,""),$e.length<1&&me?" ":$e};ne=ne.replace(/\r\n/g," ").replace(/\n/g," "),ne=ne.replace(/\s\s+/g,le.bind(le,!0)),(J.previousSibling==null&&D(J.parentNode)||J.previousSibling!=null&&D(J.previousSibling))&&(ne=ne.replace(/^\s+/,le.bind(le,!1))),(J.nextSibling==null&&D(J.parentNode)||J.nextSibling!=null&&D(J.nextSibling))&&(ne=ne.replace(/\s+$/,le.bind(le,!1)))}return Q.insert(ne)}h.default=B,h.matchAttributor=z,h.matchBlot=K,h.matchNewline=ue,h.matchSpacing=fe,h.matchText=_e},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function s(c,p){for(var $=0;$ '},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function s(c,p){for(var $=0;$o.right&&(c=o.right-s.right,this.root.style.left=n+c+"px"),s.lefto.bottom){var p=s.bottom-s.top,$=l.bottom-l.top+p;this.root.style.top=i-$+"px",this.root.classList.add("ql-flip")}return c}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),r}();h.default=u},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function M(k,T){var S=[],w=!0,L=!1,q=void 0;try{for(var A=k[Symbol.iterator](),I;!(w=(I=A.next()).done)&&(S.push(I.value),!(T&&S.length===T));w=!0);}catch(F){L=!0,q=F}finally{try{!w&&A.return&&A.return()}finally{if(L)throw q}}return S}return function(k,T){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return M(k,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function M(k,T,S){k===null&&(k=Function.prototype);var w=Object.getOwnPropertyDescriptor(k,T);if(w===void 0){var L=Object.getPrototypeOf(k);return L===null?void 0:M(L,T,S)}else{if("value"in w)return w.value;var q=w.get;return q===void 0?void 0:q.call(S)}},u=function(){function M(k,T){for(var S=0;S','','',''].join(""),h.default=x},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(29),a=te(g),u=m(36),r=m(38),f=m(64),l=m(65),n=te(l),i=m(66),o=te(i),s=m(67),c=te(s),p=m(37),$=m(26),v=m(39),C=m(40),y=m(56),_=te(y),b=m(68),E=te(b),x=m(27),O=te(x),M=m(69),k=te(M),T=m(70),S=te(T),w=m(71),L=te(w),q=m(72),A=te(q),I=m(73),F=te(I),V=m(13),R=te(V),B=m(74),N=te(B),P=m(75),j=te(P),D=m(57),W=te(D),H=m(41),z=te(H),K=m(28),Z=te(K),ie=m(59),se=te(ie),ue=m(60),fe=te(ue),ye=m(61),_e=te(ye),J=m(108),Q=te(J),ne=m(62),le=te(ne);function te(me){return me&&me.__esModule?me:{default:me}}a.default.register({"attributors/attribute/direction":r.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":p.BackgroundClass,"attributors/class/color":$.ColorClass,"attributors/class/direction":r.DirectionClass,"attributors/class/font":v.FontClass,"attributors/class/size":C.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":p.BackgroundStyle,"attributors/style/color":$.ColorStyle,"attributors/style/direction":r.DirectionStyle,"attributors/style/font":v.FontStyle,"attributors/style/size":C.SizeStyle},!0),a.default.register({"formats/align":u.AlignClass,"formats/direction":r.DirectionClass,"formats/indent":f.IndentClass,"formats/background":p.BackgroundStyle,"formats/color":$.ColorStyle,"formats/font":v.FontClass,"formats/size":C.SizeClass,"formats/blockquote":n.default,"formats/code-block":R.default,"formats/header":o.default,"formats/list":c.default,"formats/bold":_.default,"formats/code":V.Code,"formats/italic":E.default,"formats/link":O.default,"formats/script":k.default,"formats/strike":S.default,"formats/underline":L.default,"formats/image":A.default,"formats/video":F.default,"formats/list/item":s.ListItem,"modules/formula":N.default,"modules/syntax":j.default,"modules/toolbar":W.default,"themes/bubble":Q.default,"themes/snow":le.default,"ui/icons":z.default,"ui/picker":Z.default,"ui/icon-picker":fe.default,"ui/color-picker":se.default,"ui/tooltip":_e.default},!0),h.default=a.default},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.IndentClass=void 0;var g=function(){function c(p,$){for(var v=0;v<$.length;v++){var C=$[v];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(p,C.key,C)}}return function(p,$,v){return $&&c(p.prototype,$),v&&c(p,v),p}}(),a=function c(p,$,v){p===null&&(p=Function.prototype);var C=Object.getOwnPropertyDescriptor(p,$);if(C===void 0){var y=Object.getPrototypeOf(p);return y===null?void 0:c(y,$,v)}else{if("value"in C)return C.value;var _=C.get;return _===void 0?void 0:_.call(v)}},u=m(0),r=f(u);function f(c){return c&&c.__esModule?c:{default:c}}function l(c,p){if(!(c instanceof p))throw new TypeError("Cannot call a class as a function")}function n(c,p){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:c}function i(c,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);c.prototype=Object.create(p&&p.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(c,p):c.__proto__=p)}var o=function(c){i(p,c);function p(){return l(this,p),n(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return g(p,[{key:"add",value:function(v,C){if(C==="+1"||C==="-1"){var y=this.value(v)||0;C=C==="+1"?y+1:y-1}return C===0?(this.remove(v),!0):a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"add",this).call(this,v,C)}},{key:"canAdd",value:function(v,C){return a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"canAdd",this).call(this,v,C)||a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"canAdd",this).call(this,v,parseInt(C))}},{key:"value",value:function(v){return parseInt(a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"value",this).call(this,v))||void 0}}]),p}(r.default.Attributor.Class),s=new o("indent","ql-indent",{scope:r.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});h.IndentClass=s},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(4),a=u(g);function u(i){return i&&i.__esModule?i:{default:i}}function r(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function f(i,o){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:i}function l(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(i,o):i.__proto__=o)}var n=function(i){l(o,i);function o(){return r(this,o),f(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return o}(a.default);n.blotName="blockquote",n.tagName="blockquote",h.default=n},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function o(s,c){for(var p=0;p0&&this.children.tail.format(E,x)}},{key:"formats",value:function(){return s({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(E,x){if(E instanceof v)a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertBefore",this).call(this,E,x);else{var O=x==null?this.length():x.offset(this),M=this.split(O);M.parent.insertBefore(E,M)}}},{key:"optimize",value:function(E){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,E);var x=this.next;x!=null&&x.prev===this&&x.statics.blotName===this.statics.blotName&&x.domNode.tagName===this.domNode.tagName&&x.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(x.moveChildren(this),x.remove())}},{key:"replace",value:function(E){if(E.statics.blotName!==this.statics.blotName){var x=r.default.create(this.statics.defaultChild);E.moveChildren(x),this.appendChild(x)}a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"replace",this).call(this,E)}}]),_}(i.default);C.blotName="list",C.scope=r.default.Scope.BLOCK_BLOT,C.tagName=["OL","UL"],C.defaultChild="list-item",C.allowedChildren=[v],h.ListItem=v,h.default=C},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=m(56),a=u(g);function u(i){return i&&i.__esModule?i:{default:i}}function r(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function f(i,o){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:i}function l(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(i,o):i.__proto__=o)}var n=function(i){l(o,i);function o(){return r(this,o),f(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return o}(a.default);n.blotName="italic",n.tagName=["EM","I"],h.default=n},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function s(c,p){for(var $=0;$-1?y?this.domNode.setAttribute(C,y):this.domNode.removeAttribute(C):a($.prototype.__proto__||Object.getPrototypeOf($.prototype),"format",this).call(this,C,y)}}],[{key:"create",value:function(C){var y=a($.__proto__||Object.getPrototypeOf($),"create",this).call(this,C);return typeof C=="string"&&y.setAttribute("src",this.sanitize(C)),y}},{key:"formats",value:function(C){return s.reduce(function(y,_){return C.hasAttribute(_)&&(y[_]=C.getAttribute(_)),y},{})}},{key:"match",value:function(C){return/\.(jpe?g|gif|png)$/.test(C)||/^data:image\/.+;base64/.test(C)}},{key:"sanitize",value:function(C){return(0,f.sanitize)(C,["http","https","data"])?C:"//:0"}},{key:"value",value:function(C){return C.getAttribute("src")}}]),$}(r.default.Embed);c.blotName="image",c.tagName="IMG",h.default=c},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0});var g=function(){function p($,v){for(var C=0;C-1?y?this.domNode.setAttribute(C,y):this.domNode.removeAttribute(C):a($.prototype.__proto__||Object.getPrototypeOf($.prototype),"format",this).call(this,C,y)}}],[{key:"create",value:function(C){var y=a($.__proto__||Object.getPrototypeOf($),"create",this).call(this,C);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(C)),y}},{key:"formats",value:function(C){return s.reduce(function(y,_){return C.hasAttribute(_)&&(y[_]=C.getAttribute(_)),y},{})}},{key:"sanitize",value:function(C){return f.default.sanitize(C)}},{key:"value",value:function(C){return C.getAttribute("src")}}]),$}(u.BlockEmbed);c.blotName="video",c.className="ql-video",c.tagName="IFRAME",h.default=c},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.FormulaBlot=void 0;var g=function(){function C(y,_){for(var b=0;b<_.length;b++){var E=_[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(y,E.key,E)}}return function(y,_,b){return _&&C(y.prototype,_),b&&C(y,b),y}}(),a=function C(y,_,b){y===null&&(y=Function.prototype);var E=Object.getOwnPropertyDescriptor(y,_);if(E===void 0){var x=Object.getPrototypeOf(y);return x===null?void 0:C(x,_,b)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(b)}},u=m(35),r=o(u),f=m(5),l=o(f),n=m(9),i=o(n);function o(C){return C&&C.__esModule?C:{default:C}}function s(C,y){if(!(C instanceof y))throw new TypeError("Cannot call a class as a function")}function c(C,y){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:C}function p(C,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);C.prototype=Object.create(y&&y.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(C,y):C.__proto__=y)}var $=function(C){p(y,C);function y(){return s(this,y),c(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return g(y,null,[{key:"create",value:function(b){var E=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,b);return typeof b=="string"&&(window.katex.render(b,E,{throwOnError:!1,errorColor:"#f00"}),E.setAttribute("data-value",b)),E}},{key:"value",value:function(b){return b.getAttribute("data-value")}}]),y}(r.default);$.blotName="formula",$.className="ql-formula",$.tagName="SPAN";var v=function(C){p(y,C),g(y,null,[{key:"register",value:function(){l.default.register($,!0)}}]);function y(){s(this,y);var _=c(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return _}return y}(i.default);h.FormulaBlot=$,h.default=v},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.CodeToken=h.CodeBlock=void 0;var g=function(){function b(E,x){for(var O=0;O0||this.cachedText==null)&&(this.domNode.innerHTML=O(M),this.domNode.normalize(),this.attach()),this.cachedText=M)}}]),E}(s.default);C.className="ql-syntax";var y=new r.default.Attributor.Class("token","hljs",{scope:r.default.Scope.INLINE}),_=function(b){v(E,b),g(E,null,[{key:"register",value:function(){l.default.register(y,!0),l.default.register(C,!0)}}]);function E(x,O){p(this,E);var M=$(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,x,O));if(typeof M.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var k=null;return M.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(k),k=setTimeout(function(){M.highlight(),k=null},M.options.interval)}),M.highlight(),M}return g(E,[{key:"highlight",value:function(){var O=this;if(!this.quill.selection.composing){this.quill.update(l.default.sources.USER);var M=this.quill.getSelection();this.quill.scroll.descendants(C).forEach(function(k){k.highlight(O.options.highlight)}),this.quill.update(l.default.sources.SILENT),M!=null&&this.quill.setSelection(M,l.default.sources.SILENT)}}}]),E}(i.default);_.DEFAULTS={highlight:function(){return window.hljs==null?null:function(b){var E=window.hljs.highlightAuto(b);return E.value}}(),interval:1e3},h.CodeBlock=C,h.CodeToken=y,h.default=_},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h){e.exports=' '},function(e,h,m){Object.defineProperty(h,"__esModule",{value:!0}),h.default=h.BubbleTooltip=void 0;var g=function E(x,O,M){x===null&&(x=Function.prototype);var k=Object.getOwnPropertyDescriptor(x,O);if(k===void 0){var T=Object.getPrototypeOf(x);return T===null?void 0:E(T,O,M)}else{if("value"in k)return k.value;var S=k.get;return S===void 0?void 0:S.call(M)}},a=function(){function E(x,O){for(var M=0;M0&&L===l.default.sources.USER){k.show(),k.root.style.left="0px",k.root.style.width="",k.root.style.width=k.root.offsetWidth+"px";var q=k.quill.getLines(S.index,S.length);if(q.length===1)k.position(k.quill.getBounds(S));else{var A=q[q.length-1],I=k.quill.getIndex(A),F=Math.min(A.length()-1,S.index+S.length-I),V=k.quill.getBounds(new o.Range(I,F));k.position(V)}}else document.activeElement!==k.textbox&&k.quill.hasFocus()&&k.hide()}),k}return a(x,[{key:"listen",value:function(){var M=this;g(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){M.root.classList.remove("ql-editing")}),this.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!M.root.classList.contains("ql-hidden")){var k=M.quill.getSelection();k!=null&&M.position(M.quill.getBounds(k))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(M){var k=g(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"position",this).call(this,M),T=this.root.querySelector(".ql-tooltip-arrow");if(T.style.marginLeft="",k===0)return k;T.style.marginLeft=-1*k-T.offsetWidth/2+"px"}}]),x}(n.BaseTooltip);b.TEMPLATE=['','
','','',"
"].join(""),h.BubbleTooltip=b,h.default=_},function(e,h,m){e.exports=m(63)}]).default})})(quill);var Quill=getDefaultExportFromCjs(quill.exports),quill_core="",quill_snow="",quill_bubble="";const defaultOptions={theme:"snow",boundary:document.body,modules:{toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["link","image","video"]]},placeholder:"Insert content here ...",readOnly:!1},_sfc_main$2S={name:"quill-editor",props:{content:String,value:String,disabled:{type:Boolean,default:!1},options:{type:Object,required:!1,default:()=>({})}},emits:["ready","change","input","blur","focus","update:value"],setup(t,d){const e={editorOption:{},quill:null};let h="";require$$0$1.watch(()=>t.value,u=>{e.quill&&(u&&u!==h?(h=u,e.quill.pasteHTML(u)):u||e.quill.setText(""))}),require$$0$1.watch(()=>t.content,u=>{e.quill&&(u&&u!==h?(h=u,e.quill.pasteHTML(u)):u||e.quill.setText(""))}),require$$0$1.watch(()=>t.disabled,u=>{e.quill&&e.quill.enable(!u)});const m=require$$0$1.ref(null),g=(u,r)=>{for(const f in r)!u[f]||f!=="modules"?u[f]=r[f]:g(u[f],r[f]);return u},a=()=>{m.value&&(e.editorOption=g(defaultOptions,t.options),e.editorOption.readOnly=!!t.disabled,e.quill=new Quill(m.value,e.editorOption),t.value&&e.quill.pasteHTML(t.value),e.quill.on("selection-change",u=>{u?d.emit("focus",e.quill):d.emit("blur",e.quill)}),e.quill.on("text-change",()=>{t.disabled&&e.quill.enable(!1);let u=m.value.children[0].innerHTML;const r=e.quill,f=e.quill.getText();u==="


"&&(u=""),h=u,d.emit("update:value",h),d.emit("change",{html:u,text:f,quill:r})}),d.emit("ready",e.quill))};return require$$0$1.onBeforeUnmount(()=>{const u=m.value.previousSibling;u&&u.className.indexOf("ql-toolbar")>-1&&u.parentNode.removeChild(u)}),require$$0$1.onMounted(()=>{a()}),require$$0$1.onUnmounted(()=>{e.quill=null}),{editor:m}}},_hoisted_1$x={ref:"editor"};function _sfc_render$2S(t,d,e,h,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("section",_hoisted_1$x,null,512)}var quillEditor=_export_sfc$1(_sfc_main$2S,[["render",_sfc_render$2S]]);quillEditor.install=function(t){t.component(quillEditor.name,quillEditor)};var richEditorWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2R={name:"rich-editor-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper,quillEditor},data(){return{oldFieldValue:null,fieldModel:null,rules:[],customToolbar:[],valueChangedFlag:!1}},computed:{editorOption(){return{placeholder:this.field.options.placeholder,modules:{}}}},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{handleRichEditorChangeEvent(){this.valueChangedFlag=!0,this.syncUpdateFormModel(this.fieldModel)},handleRichEditorFocusEvent(){this.oldFieldValue=deepClone(this.fieldModel)},handleRichEditorBlurEvent(){this.valueChangedFlag&&(this.emitFieldDataChange(this.fieldModel,this.oldFieldValue),this.valueChangedFlag=!1)}}};function _sfc_render$2R(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("quill-editor"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",null,[require$$0$1.createVNode(a,{value:m.fieldModel,"onUpdate:value":d[0]||(d[0]=r=>m.fieldModel=r),options:g.editorOption,disabled:e.field.options.disabled,onBlur:g.handleRichEditorBlurEvent,onFocus:g.handleRichEditorFocusEvent,onChange:g.handleRichEditorChangeEvent,style:require$$0$1.normalizeStyle(e.field.options.contentHeight?`height: ${e.field.options.contentHeight};`:"")},null,8,["value","options","disabled","onBlur","onFocus","onChange","style"])])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var richEditorWidget=_export_sfc$1(_sfc_main$2R,[["render",_sfc_render$2R],["__scopeId","data-v-a23436fa"]]),__glob_0_15$1=Object.freeze(Object.defineProperty({__proto__:null,default:richEditorWidget},Symbol.toStringTag,{value:"Module"})),selectWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2Q={name:"select-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{allowDefaultFirstOption(){return!!this.field.options.filterable&&!!this.field.options.allowCreate},remoteMethod(){if(!!this.field.options.remote&&!!this.field.options.onRemoteQuery)return this.remoteQuery}},beforeCreate(){},created(){this.initOptionItems(),this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2Q(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-option"),u=require$$0$1.resolveComponent("el-select"),r=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(r,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(u,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=f=>m.fieldModel=f),class:"full-width-input",disabled:e.field.options.disabled,size:t.widgetSize,clearable:e.field.options.clearable,filterable:e.field.options.filterable,"allow-create":e.field.options.allowCreate,"default-first-option":g.allowDefaultFirstOption,"automatic-dropdown":e.field.options.automaticDropdown,multiple:e.field.options.multiple,"multiple-limit":e.field.options.multipleLimit,placeholder:e.field.options.placeholder||t.i18nt("render.hint.selectPlaceholder"),remote:e.field.options.remote,"remote-method":g.remoteMethod,onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onChange:t.handleChangeEvent},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.field.options.optionItems,f=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:f.value,label:f.label,value:f.value,disabled:f.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["modelValue","disabled","size","clearable","filterable","allow-create","default-first-option","automatic-dropdown","multiple","multiple-limit","placeholder","remote","remote-method","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var selectWidget=_export_sfc$1(_sfc_main$2Q,[["render",_sfc_render$2Q],["__scopeId","data-v-038816bf"]]),__glob_0_16$1=Object.freeze(Object.defineProperty({__proto__:null,default:selectWidget},Symbol.toStringTag,{value:"Module"})),sliderWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2P={name:"slider-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2P(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-slider"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,"show-stops":e.field.options.showStops,min:e.field.options.min,max:e.field.options.max,step:e.field.options.step,range:e.field.options.range,vertical:e.field.options.vertical,onChange:t.handleChangeEvent},null,8,["modelValue","disabled","show-stops","min","max","step","range","vertical","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var sliderWidget=_export_sfc$1(_sfc_main$2P,[["render",_sfc_render$2P],["__scopeId","data-v-92a76556"]]),__glob_0_17$1=Object.freeze(Object.defineProperty({__proto__:null,default:sliderWidget},Symbol.toStringTag,{value:"Module"})),slotWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2O={name:"slot-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}},_hoisted_1$w={key:0,class:"slot-title"};function _sfc_render$2O(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{class:require$$0$1.normalizeClass([e.designState?"slot-wrapper-design":"slot-wrapper-render"])},[require$$0$1.renderSlot(t.$slots,e.field.options.name,{formModel:t.formModel},void 0,!0),e.designState?(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$w,require$$0$1.toDisplayString(e.field.options.label),1)):require$$0$1.createCommentVNode("",!0)],2)]),_:3},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var slotWidget=_export_sfc$1(_sfc_main$2O,[["render",_sfc_render$2O],["__scopeId","data-v-95f13fca"]]),__glob_0_18$1=Object.freeze(Object.defineProperty({__proto__:null,default:slotWidget},Symbol.toStringTag,{value:"Module"})),staticTextWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2N={name:"static-text-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{StaticContentWrapper},computed:{},beforeCreate(){},created(){this.registerToRefList(),this.initEventHandler(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2N(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("static-content-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{designer:e.designer,field:e.field,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{ref:"fieldEditor",style:require$$0$1.normalizeStyle(e.field.options.fontSize?`font-size: ${e.field.options.fontSize};`:"")},[require$$0$1.createElementVNode("pre",{style:require$$0$1.normalizeStyle({"white-space":e.field.options.preWrap?"pre-wrap":"pre","text-align":e.field.options.textAlign?e.field.options.textAlign:"left"})},require$$0$1.toDisplayString(e.field.options.textContent),5)],4)]),_:1},8,["designer","field","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var staticTextWidget=_export_sfc$1(_sfc_main$2N,[["render",_sfc_render$2N],["__scopeId","data-v-4071ab53"]]),__glob_0_20$1=Object.freeze(Object.defineProperty({__proto__:null,default:staticTextWidget},Symbol.toStringTag,{value:"Module"})),switchWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2M={name:"switch-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2M(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-switch"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,"active-text":e.field.options.activeText,"inactive-text":e.field.options.inactiveText,"active-color":e.field.options.activeColor,"inactive-color":e.field.options.inactiveColor,width:e.field.options.switchWidth,onChange:t.handleChangeEvent},null,8,["modelValue","disabled","active-text","inactive-text","active-color","inactive-color","width","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var switchWidget=_export_sfc$1(_sfc_main$2M,[["render",_sfc_render$2M],["__scopeId","data-v-3529e848"]]),__glob_0_21$1=Object.freeze(Object.defineProperty({__proto__:null,default:switchWidget},Symbol.toStringTag,{value:"Module"})),textareaWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2L={name:"textarea-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2L(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-input"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{type:"textarea",ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:t.widgetSize,placeholder:e.field.options.placeholder,rows:e.field.options.rows,minlength:e.field.options.minLength,maxlength:e.field.options.maxLength,"show-word-limit":e.field.options.showWordLimit,onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onInput:t.handleInputCustomEvent,onChange:t.handleChangeEvent},null,8,["modelValue","disabled","readonly","size","placeholder","rows","minlength","maxlength","show-word-limit","onFocus","onBlur","onInput","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var textareaWidget=_export_sfc$1(_sfc_main$2L,[["render",_sfc_render$2L],["__scopeId","data-v-072d98c8"]]),__glob_0_22$1=Object.freeze(Object.defineProperty({__proto__:null,default:textareaWidget},Symbol.toStringTag,{value:"Module"})),timeRangeWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2K={name:"time-range-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2K(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-time-picker"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",{class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""])},[require$$0$1.createVNode(a,{ref:"fieldEditor","is-range":"",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"full-width-input":""]),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:t.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":"HH:mm:ss","start-placeholder":e.field.options.startPlaceholder||t.i18nt("render.hint.startTimePlaceholder"),"end-placeholder":e.field.options.endPlaceholder||t.i18nt("render.hint.endTimePlaceholder"),onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onChange:t.handleChangeEvent},null,8,["modelValue","class","disabled","readonly","size","clearable","editable","format","start-placeholder","end-placeholder","onFocus","onBlur","onChange"])],2)]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var timeRangeWidget=_export_sfc$1(_sfc_main$2K,[["render",_sfc_render$2K],["__scopeId","data-v-60824824"]]),__glob_0_23$1=Object.freeze(Object.defineProperty({__proto__:null,default:timeRangeWidget},Symbol.toStringTag,{value:"Module"})),timeWidget_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2J={name:"time-widget",componentName:"FieldWidget",mixins:[emitter,fieldMixin,i18n$1],props:{field:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,designer:Object,designState:{type:Boolean,default:!1},subFormRowIndex:{type:Number,default:-1},subFormColIndex:{type:Number,default:-1},subFormRowId:{type:String,default:""}},components:{FormItemWrapper},data(){return{oldFieldValue:null,fieldModel:null,rules:[]}},computed:{},beforeCreate(){},created(){this.initFieldModel(),this.registerToRefList(),this.initEventHandler(),this.buildFieldRules(),this.handleOnCreated()},mounted(){this.handleOnMounted()},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2J(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-time-picker"),u=require$$0$1.resolveComponent("form-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{designer:e.designer,field:e.field,rules:m.rules,"design-state":e.designState,"parent-widget":e.parentWidget,"parent-list":e.parentList,"index-of-parent-list":e.indexOfParentList,"sub-form-row-index":e.subFormRowIndex,"sub-form-col-index":e.subFormColIndex,"sub-form-row-id":e.subFormRowId},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{ref:"fieldEditor",modelValue:m.fieldModel,"onUpdate:modelValue":d[0]||(d[0]=r=>m.fieldModel=r),class:require$$0$1.normalizeClass([e.field.options.autoFullWidth?"auto-full-width":""]),disabled:e.field.options.disabled,readonly:e.field.options.readonly,size:t.widgetSize,clearable:e.field.options.clearable,editable:e.field.options.editable,format:e.field.options.format,"value-format":"HH:mm:ss",placeholder:e.field.options.placeholder||t.i18nt("render.hint.timePlaceholder"),onFocus:t.handleFocusCustomEvent,onBlur:t.handleBlurCustomEvent,onChange:t.handleChangeEvent},null,8,["modelValue","class","disabled","readonly","size","clearable","editable","format","placeholder","onFocus","onBlur","onChange"])]),_:1},8,["designer","field","rules","design-state","parent-widget","parent-list","index-of-parent-list","sub-form-row-index","sub-form-col-index","sub-form-row-id"])}var timeWidget=_export_sfc$1(_sfc_main$2J,[["render",_sfc_render$2J],["__scopeId","data-v-417e0c7c"]]),__glob_0_24$1=Object.freeze(Object.defineProperty({__proto__:null,default:timeWidget},Symbol.toStringTag,{value:"Module"}));let comps$1={};const modules$3={"./button-widget.vue":__glob_0_0$2,"./cascader-widget.vue":__glob_0_1$3,"./checkbox-widget.vue":__glob_0_2$3,"./color-widget.vue":__glob_0_3$3,"./date-range-widget.vue":__glob_0_4$3,"./date-widget.vue":__glob_0_5$3,"./divider-widget.vue":__glob_0_6$2,"./file-upload-widget.vue":__glob_0_7$1,"./form-item-wrapper.vue":__glob_0_8$1,"./html-text-widget.vue":__glob_0_9$1,"./input-widget.vue":__glob_0_10$1,"./number-widget.vue":__glob_0_11$1,"./picture-upload-widget.vue":__glob_0_12$1,"./radio-widget.vue":__glob_0_13$1,"./rate-widget.vue":__glob_0_14$1,"./rich-editor-widget.vue":__glob_0_15$1,"./select-widget.vue":__glob_0_16$1,"./slider-widget.vue":__glob_0_17$1,"./slot-widget.vue":__glob_0_18$1,"./static-content-wrapper.vue":__glob_0_19$1,"./static-text-widget.vue":__glob_0_20$1,"./switch-widget.vue":__glob_0_21$1,"./textarea-widget.vue":__glob_0_22$1,"./time-range-widget.vue":__glob_0_23$1,"./time-widget.vue":__glob_0_24$1};for(const t in modules$3){let d=modules$3[t].default.name;comps$1[d]=modules$3[t].default}var gridColItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2I={name:"GridColItem",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin],components:Se({},comps$1),props:{widget:Object,parentWidget:Object,parentList:Array,indexOfParentList:Number,colHeight:{type:String,default:null}},inject:["refList","globalModel","getFormConfig","previewState"],data(){return{layoutProps:{span:this.widget.options.span,md:this.widget.options.md||12,sm:this.widget.options.sm||12,xs:this.widget.options.xs||12,offset:this.widget.options.offset||0,push:this.widget.options.push||0,pull:this.widget.options.pull||0}}},computed:{formConfig(){return this.getFormConfig()},customClass(){return this.widget.options.customClass||""},colHeightStyle(){return this.colHeight?{height:this.colHeight+"px"}:{}}},created(){this.initLayoutProps(),this.initRefList()},methods:{initLayoutProps(){if(this.widget.options.responsive)if(this.previewState){this.layoutProps.md=void 0,this.layoutProps.sm=void 0,this.layoutProps.xs=void 0;let t=this.formConfig.layoutType;t==="H5"?this.layoutProps.span=this.widget.options.xs||12:t==="Pad"?this.layoutProps.span=this.widget.options.sm||12:this.layoutProps.span=this.widget.options.md||12}else this.layoutProps.span=void 0;else this.layoutProps.md=void 0,this.layoutProps.sm=void 0,this.layoutProps.xs=void 0}}},_hoisted_1$v={class:"blank-cell"},_hoisted_2$m={class:"invisible-content"};function _sfc_render$2I(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-col");return require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createBlock(a,require$$0$1.mergeProps({class:["grid-cell",[g.customClass]]},m.layoutProps,{style:g.colHeightStyle,key:e.widget.id}),{default:require$$0$1.withCtx(()=>[!!e.widget.widgetList&&e.widget.widgetList.length>0?(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},require$$0$1.renderList(e.widget.widgetList,(u,r)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[u.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(t.getComponentByContainer(u)),{widget:u,key:r,"parent-list":e.widget.widgetList,"index-of-parent-list":r,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),f=>({name:f,fn:require$$0$1.withCtx(l=>[require$$0$1.renderSlot(t.$slots,f,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(l)),void 0,!0)])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(u.type+"-widget"),{field:u,designer:null,key:r,"parent-list":e.widget.widgetList,"index-of-parent-list":r,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),f=>({name:f,fn:require$$0$1.withCtx(l=>[require$$0$1.renderSlot(t.$slots,f,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(l)),void 0,!0)])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256)):(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:1},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$v,[require$$0$1.createElementVNode("span",_hoisted_2$m,require$$0$1.toDisplayString(t.i18nt("render.hint.blankCellContent")),1)])]),_:1}))]),_:3},16,["class","style"])),[[require$$0$1.vShow,!e.widget.options.hidden]])}var GridColItem=_export_sfc$1(_sfc_main$2I,[["render",_sfc_render$2I],["__scopeId","data-v-9332ab84"]]),__glob_0_1$2=Object.freeze(Object.defineProperty({__proto__:null,default:GridColItem},Symbol.toStringTag,{value:"Module"})),containerItemMixin={inject:["getFormConfig","getGlobalDsv"],computed:{customClass(){return this.widget.options.customClass||""},formModel:{cache:!1,get(){return this.globalModel.formModel}}},mounted(){this.callSetHidden()},methods:{unregisterFromRefList(){if(this.refList!==null&&!!this.widget.options.name){let t=this.widget.options.name;delete this.refList[t]}},callSetHidden(){this.widget.options.hidden===!0&&this.setHidden(!0)},setHidden(t){this.widget.options.hidden=t;let d=e=>{let h=e.options.name,m=this.getWidgetRef(h);t&&!!m&&!!m.clearFieldRules&&m.clearFieldRules(),!t&&!!m&&!!m.buildFieldRules&&m.buildFieldRules()};traverseFieldWidgetsOfContainer(this.widget,d)},activeTab(t){t>=0&&t{d.options.active=e===t,e===t&&(this.activeTabName=d.options.name)})},disableTab(t){t>=0&&t=0&&t=0&&t=0&&t{let e=d.options.name+"@row"+this.rowIdData[t],h=this.getWidgetRef(e);h&&h.setDisabled(!0)})},enableSubFormRow(t){this.widget.widgetList.forEach(d=>{let e=d.options.name+"@row"+this.rowIdData[t],h=this.getWidgetRef(e);h&&h.setDisabled(!1)})},disableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((t,d)=>{this.disableSubFormRow(d)}),this.actionDisabled=!0},enableSubForm(){this.rowIdData.length>0&&this.rowIdData.forEach((t,d)=>{this.enableSubFormRow(d)}),this.actionDisabled=!1},resetSubForm(){if(this.widget.type==="sub-form"){let t=this.formModel[this.widget.options.name];t&&(t.splice(0,t.length),this.rowIdData.splice(0,this.rowIdData.length)),this.widget.options.showBlankRow&&this.addSubFormRow()}},getSubFormValues(t=!0){if(this.widget.type==="sub-form")return this.formModel[this.widget.options.name];this.$message.error(this.i18nt("render.hint.nonSubFormType"))},addCssClass(t){this.widget.options.customClass?this.widget.options.customClass.push(t):this.widget.options.customClass=[t]},removeCssClass(t){if(!this.widget.options.customClass)return;let d=-1;this.widget.options.customClass.map((e,h)=>{e===t&&(d=h)}),d>-1&&this.widget.options.customClass.splice(d,1)}}};const _sfc_main$2H={name:"vf-grid-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:{ContainerItemWrapper,GridColItem},props:{widget:Object},inject:["refList","sfRefList","globalModel"],created(){this.initRefList()},mounted(){},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2H(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("grid-col-item"),u=require$$0$1.resolveComponent("el-row"),r=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(r,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createBlock(u,{key:e.widget.id,gutter:e.widget.options.gutter,class:require$$0$1.normalizeClass(["grid-container",[t.customClass]]),ref:e.widget.id},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.cols,(f,l)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:l,widget:f,"parent-list":e.widget.cols,"index-of-parent-list":l,"parent-widget":e.widget,"col-height":e.widget.options.colHeight},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),n=>({name:n,fn:require$$0$1.withCtx(i=>[require$$0$1.renderSlot(t.$slots,n,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(i)))])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget","col-height"]))),128))]),_:3},8,["gutter","class"])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:3},8,["widget"])}var gridItem=_export_sfc$1(_sfc_main$2H,[["render",_sfc_render$2H]]),__glob_0_2$2=Object.freeze(Object.defineProperty({__proto__:null,default:gridItem},Symbol.toStringTag,{value:"Module"})),subFormItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2G={name:"sub-form-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:ke(Se({ContainerItemWrapper},comps$1),{SvgIcon}),props:{widget:Object},inject:["refList","sfRefList","globalModel"],data(){return{rowIdData:[],fieldSchemaData:[],actionDisabled:!1}},created(){this.initRefList(),this.registerSubFormToRefList(),this.initRowIdData(!0),this.initFieldSchemaData(),this.initEventHandler()},mounted(){this.handleSubFormFirstRowAdd()},beforeUnmount(){this.unregisterFromRefList()},methods:{getLabelAlign(t,d){return d.options.labelAlign||t.options.labelAlign},registerSubFormToRefList(){this.widget.type==="sub-form"&&(this.sfRefList[this.widget.options.name]=this)},initRowIdData(t){if(this.widget.type==="sub-form"){this.rowIdData.splice(0,this.rowIdData.length);let d=this.formModel[this.widget.options.name];!!d&&d.length>0&&(d.forEach(()=>{this.rowIdData.push("id"+generateId())}),t&&setTimeout(()=>{this.handleSubFormRowChange(d)},800))}},addToRowIdData(){this.rowIdData.push("id"+generateId())},insertToRowIdData(t){this.rowIdData.splice(t,0,"id"+generateId())},deleteFromRowIdData(t){this.rowIdData.splice(t,1)},getRowIdData(){return this.rowIdData},getWidgetRefOfSubForm(t,d){let e=t+"@row"+this.rowIdData[d];return this.getWidgetRef(e)},initFieldSchemaData(){if(this.widget.type!=="sub-form")return;let t=this.rowIdData.length;if(this.fieldSchemaData.splice(0,this.fieldSchemaData.length),t>0)for(let d=0;d{e.push(this.cloneFieldSchema(h))}),this.fieldSchemaData.push(e)}},addToFieldSchemaData(t){let d=[];this.widget.widgetList.forEach(e=>{d.push(this.cloneFieldSchema(e))}),t===void 0?this.fieldSchemaData.push(d):this.fieldSchemaData.splice(t,0,d)},deleteFromFieldSchemaData(t){this.fieldSchemaData.splice(t,1)},cloneFieldSchema(t){let d=deepClone(t);return d.id=t.type+generateId(),d},initEventHandler(){this.widget.type==="sub-form"&&this.on$("setFormData",t=>{this.initRowIdData(!1),this.initFieldSchemaData();let d=t[this.widget.options.name]||[];setTimeout(()=>{this.handleSubFormRowChange(d)},800)})},handleSubFormFirstRowAdd(){if(this.widget.type==="sub-form"&&!!this.widget.options.showBlankRow&&this.rowIdData.length===1){let t=this.formModel[this.widget.options.name]||[];this.handleSubFormRowAdd(t,this.rowIdData[0]),this.handleSubFormRowChange(t)}},addSubFormRow(){let t={};this.widget.widgetList.forEach(e=>{e.formItemFlag&&(t[e.options.name]=e.options.defaultValue)});let d=this.formModel[this.widget.options.name]||[];d.push(t),this.addToRowIdData(),this.addToFieldSchemaData(),this.handleSubFormRowAdd(d,this.rowIdData[d.length-1]),this.handleSubFormRowChange(d)},insertSubFormRow(t){let d={};this.widget.widgetList.forEach(h=>{h.formItemFlag&&(d[h.options.name]=h.options.defaultValue)});let e=this.formModel[this.widget.options.name]||[];e.splice(t,0,d),this.insertToRowIdData(t),this.addToFieldSchemaData(t),this.handleSubFormRowInsert(e,this.rowIdData[t]),this.handleSubFormRowChange(e)},deleteSubFormRow(t){this.$confirm(this.i18nt("render.hint.deleteSubFormRow")+"?",this.i18nt("render.hint.prompt"),{confirmButtonText:this.i18nt("render.hint.confirm"),cancelButtonText:this.i18nt("render.hint.cancel")}).then(()=>{let d=this.formModel[this.widget.options.name]||[],e=deepClone(d[t]);d.splice(t,1),this.deleteFromRowIdData(t),this.deleteFromFieldSchemaData(t),this.handleSubFormRowDelete(d,e),this.handleSubFormRowChange(d)}).catch(()=>{})},handleSubFormRowChange(t){this.widget.options.onSubFormRowChange&&new Function("subFormData",this.widget.options.onSubFormRowChange).call(this,t)},handleSubFormRowAdd(t,d){this.widget.options.onSubFormRowAdd&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowAdd).call(this,t,d)},handleSubFormRowInsert(t,d){this.widget.options.onSubFormRowInsert&&new Function("subFormData","newRowId",this.widget.options.onSubFormRowInsert).call(this,t,d)},handleSubFormRowDelete(t,d){this.widget.options.onSubFormRowDelete&&new Function("subFormData","deletedDataRow",this.widget.options.onSubFormRowDelete).call(this,t,d)}}},_hoisted_1$u={class:"action-header-column"},_hoisted_2$l={class:"action-label"},_hoisted_3$h={key:0,class:"custom-label"},_hoisted_4$a=["title"],_hoisted_5$8={class:"sub-form-action-column hide-label"},_hoisted_6$7={class:"action-button-column"},_hoisted_7$4={key:0,class:"row-number-span"};function _sfc_render$2G(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("svg-icon"),u=require$$0$1.resolveComponent("el-button"),r=require$$0$1.resolveComponent("el-tooltip"),f=require$$0$1.resolveComponent("el-row"),l=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(l,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:e.widget.id,class:"sub-form-container"},[require$$0$1.createVNode(f,{class:"header-row"},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_1$u,[require$$0$1.createElementVNode("span",_hoisted_2$l,require$$0$1.toDisplayString(t.i18nt("render.hint.subFormAction")),1),require$$0$1.createVNode(u,{disabled:m.actionDisabled,round:"",type:"primary",size:"small",class:"action-button",onClick:g.addSubFormRow,title:t.i18nt("render.hint.subFormAddActionHint")},{default:require$$0$1.withCtx(()=>[require$$0$1.createTextVNode(require$$0$1.toDisplayString(t.i18nt("render.hint.subFormAddAction")),1),require$$0$1.createVNode(a,{"icon-class":"el-plus"})]),_:1},8,["disabled","onClick","title"])]),(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.widgetList,n=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:n.id+"thc",class:require$$0$1.normalizeClass(["field-header-column",[g.getLabelAlign(e.widget,n),n.options.required?"is-required":""]]),style:require$$0$1.normalizeStyle({width:n.options.columnWidth})},[n.options.labelIconClass?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_3$h,[n.options.labelIconPosition==="front"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[n.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createVNode(r,{content:n.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":n.options.labelIconClass},null,8,["icon-class"])]),_:2},1032,["content"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.options.label),1)],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createVNode(a,{"icon-class":n.options.labelIconClass},null,8,["icon-class"]),require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.options.label),1)],64))],64)):n.options.labelIconPosition==="rear"?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[n.options.labelTooltip?(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:0},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.options.label),1),require$$0$1.createVNode(r,{content:n.options.labelTooltip,effect:"light"},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":n.options.labelIconClass},null,8,["icon-class"])]),_:2},1032,["content"])],64)):(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,{key:1},[require$$0$1.createTextVNode(require$$0$1.toDisplayString(n.options.label),1),require$$0$1.createVNode(a,{"icon-class":n.options.labelIconClass},null,8,["icon-class"])],64))],64)):require$$0$1.createCommentVNode("",!0)])):(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",{key:1,title:n.options.labelTooltip},require$$0$1.toDisplayString(n.options.label),9,_hoisted_4$a))],6))),128))]),_:1}),(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(m.rowIdData,(n,i)=>(require$$0$1.openBlock(),require$$0$1.createBlock(f,{class:"sub-form-row",key:n},{default:require$$0$1.withCtx(()=>[require$$0$1.createElementVNode("div",_hoisted_5$8,[require$$0$1.createElementVNode("div",_hoisted_6$7,[require$$0$1.createVNode(u,{disabled:m.actionDisabled,circle:"",onClick:o=>g.insertSubFormRow(i),title:t.i18nt("render.hint.insertSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":"el-plus"})]),_:2},1032,["disabled","onClick","title"]),require$$0$1.createVNode(u,{disabled:m.actionDisabled,circle:"",onClick:o=>g.deleteSubFormRow(i),title:t.i18nt("render.hint.deleteSubFormRow")},{default:require$$0$1.withCtx(()=>[require$$0$1.createVNode(a,{"icon-class":"el-delete"})]),_:2},1032,["disabled","onClick","title"]),e.widget.options.showRowNumber?(require$$0$1.openBlock(),require$$0$1.createElementBlock("span",_hoisted_7$4,"#"+require$$0$1.toDisplayString(i+1),1)):require$$0$1.createCommentVNode("",!0)])]),(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.widgetList,(o,s)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:o.id+"tc"+n,class:"sub-form-table-column hide-label",style:require$$0$1.normalizeStyle({width:o.options.columnWidth})},[(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(o.type+"-widget"),{field:m.fieldSchemaData[i][s],key:m.fieldSchemaData[i][s].id,"parent-list":e.widget.widgetList,"index-of-parent-list":s,"parent-widget":e.widget,"sub-form-row-id":n,"sub-form-row-index":i,"sub-form-col-index":s},null,8,["field","parent-list","index-of-parent-list","parent-widget","sub-form-row-id","sub-form-row-index","sub-form-col-index"]))],4))),128))]),_:2},1024))),128))])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:1},8,["widget"])}var subFormItem=_export_sfc$1(_sfc_main$2G,[["render",_sfc_render$2G],["__scopeId","data-v-2eb559e6"]]),__glob_0_3$2=Object.freeze(Object.defineProperty({__proto__:null,default:subFormItem},Symbol.toStringTag,{value:"Module"}));const _sfc_main$2F={name:"tab-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:Se({ContainerItemWrapper},comps$1),props:{widget:Object},inject:["refList","sfRefList","globalModel"],data(){return{activeTabName:""}},computed:{visibleTabs(){return this.widget.tabs.filter(t=>!t.options.hidden)}},created(){this.initRefList()},mounted(){this.initActiveTab()},beforeUnmount(){this.unregisterFromRefList()},methods:{initActiveTab(){if(this.widget.type==="tab"&&this.widget.tabs.length>0){let t=this.widget.tabs.filter(d=>d.options.active===!0);t.length>0?this.activeTabName=t[0].options.name:this.activeTabName=this.widget.tabs[0].options.name}}}};function _sfc_render$2F(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-tab-pane"),u=require$$0$1.resolveComponent("el-tabs"),r=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(r,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:e.widget.id,class:"tab-container"},[require$$0$1.createVNode(u,{modelValue:m.activeTabName,"onUpdate:modelValue":d[0]||(d[0]=f=>m.activeTabName=f),type:e.widget.displayType,ref:e.widget.id,class:require$$0$1.normalizeClass([t.customClass])},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(g.visibleTabs,(f,l)=>(require$$0$1.openBlock(),require$$0$1.createBlock(a,{key:l,label:f.options.label,disabled:f.options.disabled,name:f.options.name},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(f.widgetList,(n,i)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[n.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(t.getComponentByContainer(n)),{widget:n,key:i,"parent-list":f.widgetList,"index-of-parent-list":i,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),o=>({name:o,fn:require$$0$1.withCtx(s=>[require$$0$1.renderSlot(t.$slots,o,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(s)))])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(n.type+"-widget"),{field:n,key:i,"parent-list":f.widgetList,"index-of-parent-list":i,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),o=>({name:o,fn:require$$0$1.withCtx(s=>[require$$0$1.renderSlot(t.$slots,o,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(s)))])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256))]),_:2},1032,["label","disabled","name"]))),128))]),_:3},8,["modelValue","type","class"])])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:3},8,["widget"])}var tabItem=_export_sfc$1(_sfc_main$2F,[["render",_sfc_render$2F]]),__glob_0_4$2=Object.freeze(Object.defineProperty({__proto__:null,default:tabItem},Symbol.toStringTag,{value:"Module"})),tableCellItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2E={name:"TableCellItem",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin],components:Se({},comps$1),props:{widget:Object,rowIndex:Number,colIndex:Number},inject:["refList","globalModel"],computed:{customClass(){return this.widget.options.customClass||""}},created(){},methods:{}},_hoisted_1$t=["colspan","rowspan"];function _sfc_render$2E(t,d,e,h,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("td",{class:require$$0$1.normalizeClass(["table-cell",[g.customClass]]),colspan:e.widget.options.colspan||1,rowspan:e.widget.options.rowspan||1,style:require$$0$1.normalizeStyle({width:e.widget.options.cellWidth+" !important"||"",height:e.widget.options.cellHeight+" !important"||"","word-break":e.widget.options.wordBreak?"break-all":"normal"})},[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.widgetList,(a,u)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[a.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(t.getComponentByContainer(a)),{widget:a,key:u,"parent-list":e.widget.widgetList,"index-of-parent-list":u,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),r=>({name:r,fn:require$$0$1.withCtx(f=>[require$$0$1.renderSlot(t.$slots,r,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(f)),void 0,!0)])}))]),1032,["widget","parent-list","index-of-parent-list","parent-widget"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(a.type+"-widget"),{field:a,key:u,"parent-list":e.widget.widgetList,"index-of-parent-list":u,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),r=>({name:r,fn:require$$0$1.withCtx(f=>[require$$0$1.renderSlot(t.$slots,r,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(f)),void 0,!0)])}))]),1032,["field","parent-list","index-of-parent-list","parent-widget"]))],64))),256))],14,_hoisted_1$t)}var TableCellItem=_export_sfc$1(_sfc_main$2E,[["render",_sfc_render$2E],["__scopeId","data-v-1825ed0b"]]),__glob_0_5$2=Object.freeze(Object.defineProperty({__proto__:null,default:TableCellItem},Symbol.toStringTag,{value:"Module"})),tableItem_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$2D={name:"table-item",componentName:"ContainerItem",mixins:[emitter,i18n$1,refMixin,containerItemMixin],components:{ContainerItemWrapper,TableCellItem},props:{widget:Object},inject:["refList","sfRefList","globalModel"],created(){this.initRefList()},mounted(){},beforeUnmount(){this.unregisterFromRefList()},methods:{}};function _sfc_render$2D(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("table-cell-item"),u=require$$0$1.resolveComponent("container-item-wrapper");return require$$0$1.openBlock(),require$$0$1.createBlock(u,{widget:e.widget},{default:require$$0$1.withCtx(()=>[require$$0$1.withDirectives((require$$0$1.openBlock(),require$$0$1.createElementBlock("div",{key:e.widget.id,class:"table-container"},[require$$0$1.createElementVNode("table",{ref:e.widget.id,class:require$$0$1.normalizeClass(["table-layout",[t.customClass]])},[require$$0$1.createElementVNode("tbody",null,[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(e.widget.rows,(r,f)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock("tr",{key:r.id},[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(r.cols,(l,n)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[l.merged?require$$0$1.createCommentVNode("",!0):(require$$0$1.openBlock(),require$$0$1.createBlock(a,{widget:l,key:n,"parent-list":e.widget.cols,"row-index":f,"col-index":n,"parent-widget":e.widget},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),i=>({name:i,fn:require$$0$1.withCtx(o=>[require$$0$1.renderSlot(t.$slots,i,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(o)),void 0,!0)])}))]),1032,["widget","parent-list","row-index","col-index","parent-widget"]))],64))),256))]))),128))])],2)])),[[require$$0$1.vShow,!e.widget.options.hidden]])]),_:3},8,["widget"])}var tableItem=_export_sfc$1(_sfc_main$2D,[["render",_sfc_render$2D],["__scopeId","data-v-dfc6ca8e"]]),__glob_0_6$1=Object.freeze(Object.defineProperty({__proto__:null,default:tableItem},Symbol.toStringTag,{value:"Module"}));const modules$2={"./container-item-wrapper.vue":__glob_0_0$3,"./grid-col-item.vue":__glob_0_1$2,"./grid-item.vue":__glob_0_2$2,"./sub-form-item.vue":__glob_0_3$2,"./tab-item.vue":__glob_0_4$2,"./table-cell-item.vue":__glob_0_5$2,"./table-item.vue":__glob_0_6$1};var ContainerItems={install(t){for(const d in modules$2){let e=modules$2[d].default.name;t.component(e,modules$2[d].default)}}},index_vue_vue_type_style_index_0_scoped_true_lang$5="";const _sfc_main$2C={name:"VFormRender",componentName:"VFormRender",mixins:[emitter,i18n$1],components:Se({},comps$1),props:{formJson:{type:Object,default:()=>buildDefaultFormJson()},formData:{type:Object,default:()=>({})},optionData:{type:Object,default:()=>({})},previewState:{type:Boolean,default:!1},globalDsv:{type:Object,default:()=>({})}},provide(){return{refList:this.widgetRefList,sfRefList:this.subFormRefList,getFormConfig:()=>this.formJsonObj.formConfig,getGlobalDsv:()=>this.globalDsv,globalOptionData:this.optionData,getOptionData:()=>this.optionData,globalModel:{formModel:this.formDataModel},previewState:this.previewState}},data(){return{formJsonObj:this.formJson,formDataModel:{},widgetRefList:{},subFormRefList:{},formId:null,externalComponents:{}}},computed:{formConfig(){return this.formJsonObj.formConfig},widgetList(){return this.formJsonObj.widgetList},labelPosition(){return!!this.formConfig&&!!this.formConfig.labelPosition?this.formConfig.labelPosition:"left"},labelWidth(){return!!this.formConfig&&!!this.formConfig.labelWidth?this.formConfig.labelWidth+"px":"80px"},size(){return!!this.formConfig&&!!this.formConfig.size?this.formConfig.size:"default"},customClass(){return!!this.formConfig&&!!this.formConfig.customClass?this.formConfig.customClass:""}},watch:{},created(){this.buildFormModel(this.formJsonObj?this.formJsonObj.widgetList:null),this.initFormObject()},mounted(){this.initLocale(),this.handleOnMounted()},methods:{initFormObject(t=!0){this.formId="vfRender"+generateId(),t&&this.insertCustomStyleAndScriptNode(),this.addFieldChangeEventHandler(),this.addFieldValidateEventHandler(),this.registerFormToRefList(),this.handleOnCreated()},getContainerWidgetName(t){return t.type==="grid"?"vf-grid-item":t.type+"-item"},getWidgetName(t){return t.type+"-widget"},initLocale(){let t=localStorage.getItem("v_form_locale")||"zh-CN";this.changeLanguage(t)},insertCustomStyleAndScriptNode(){!!this.formConfig&&!!this.formConfig.cssCode&&insertCustomCssToHead(this.formConfig.cssCode,this.previewState?"":this.formId),!!this.formConfig&&!!this.formConfig.functions&&insertGlobalFunctionsToHtml(this.formConfig.functions,this.previewState?"":this.formId)},buildFormModel(t){!!t&&t.length>0&&t.forEach(d=>{this.buildDataFromWidget(d)})},buildDataFromWidget(t){if(t.category==="container")if(t.type==="grid")!!t.cols&&t.cols.length>0&&t.cols.forEach(d=>{this.buildDataFromWidget(d)});else if(t.type==="table")!!t.rows&&t.rows.length>0&&t.rows.forEach(d=>{!!d.cols&&d.cols.length>0&&d.cols.forEach(e=>{this.buildDataFromWidget(e)})});else if(t.type==="tab")!!t.tabs&&t.tabs.length>0&&t.tabs.forEach(d=>{!!d.widgetList&&d.widgetList.length>0&&d.widgetList.forEach(e=>{this.buildDataFromWidget(e)})});else if(t.type==="sub-form"){let d=t.options.name;if(this.formData.hasOwnProperty(d)){let e=this.formData[d];this.formDataModel[d]=deepClone(e)}else{let e={};t.options.showBlankRow?(t.widgetList.forEach(h=>{h.formItemFlag&&(e[h.options.name]=h.options.defaultValue)}),this.formDataModel[d]=[e]):this.formDataModel[d]=[]}}else t.type==="grid-col"||t.type==="table-cell"?!!t.widgetList&&t.widgetList.length>0&&t.widgetList.forEach(d=>{this.buildDataFromWidget(d)}):!!t.widgetList&&t.widgetList.length>0&&t.widgetList.forEach(d=>{this.buildDataFromWidget(d)});else if(t.formItemFlag)if(!this.formData.hasOwnProperty(t.options.name))this.formDataModel[t.options.name]=t.options.defaultValue;else{let d=this.formData[t.options.name];this.formDataModel[t.options.name]=deepClone(d)}},addFieldChangeEventHandler(){this.off$("fieldChange"),this.on$("fieldChange",(t,d,e,h,m)=>{this.handleFieldDataChange(t,d,e,h,m),this.$emit("formChange",t,d,e,this.formDataModel,h,m)})},addFieldValidateEventHandler(){this.off$("fieldValidation"),this.on$("fieldValidation",t=>{this.$refs.renderForm.validateField(t)})},registerFormToRefList(){this.widgetRefList.v_form_ref=this},handleFieldDataChange(t,d,e,h,m){!!this.formConfig&&!!this.formConfig.onFormDataChange&&new Function("fieldName","newValue","oldValue","formModel","subFormName","subFormRowIndex",this.formConfig.onFormDataChange).call(this,t,d,e,this.formDataModel,h,m)},handleOnCreated(){!!this.formConfig&&!!this.formConfig.onFormCreated&&new Function(this.formConfig.onFormCreated).call(this)},handleOnMounted(){!!this.formConfig&&!!this.formConfig.onFormMounted&&new Function(this.formConfig.onFormMounted).call(this)},findWidgetAndSetDisabled(t,d){let e=this.getWidgetRef(t);e?e.setDisabled(d):this.findWidgetOfSubFormAndSetDisabled(t,d)},findWidgetOfSubFormAndSetDisabled(t,d){this.findWidgetNameInSubForm(t).forEach(e=>{let h=this.getWidgetRef(e);h&&h.setDisabled(d)})},findWidgetAndSetHidden(t,d){let e=this.getWidgetRef(t);e?e.setHidden(d):this.findWidgetOfSubFormAndSetHidden(t,d)},findWidgetOfSubFormAndSetHidden(t,d){this.findWidgetNameInSubForm(t).forEach(e=>{let h=this.getWidgetRef(e);h&&h.setHidden(d)})},findWidgetNameInSubForm(t){let d=[],e=null,h=(m,g)=>{!!m.options&&m.options.name===t&&(e=g.options.name)};if(traverseFieldWidgets(this.widgetList,h),e){let m=this.getWidgetRef(e);if(m){let g=m.getRowIdData();!!g&&g.length>0&&g.forEach(a=>{d.push(t+"@row"+a)})}}return d},changeLanguage(t){changeLocale(t)},getNativeForm(){return this.$refs.renderForm},getFormRef(){return this},getWidgetRef(t,d=!1){let e=this.widgetRefList[t];return!e&&!!d&&this.$message.error(this.i18nt("render.hint.refNotFound")+t),e},clearFormDataModel(){for(let t in this.formDataModel)delete this.formDataModel[t]},setFormJson(t){if(t)if(typeof t=="string"||t.constructor===Object){let d=null;if(typeof t=="string"?d=JSON.parse(t):d=t,!d.formConfig||!d.widgetList){this.$message.error("Invalid format of form json.");return}this.clearFormDataModel(),this.buildFormModel(d.widgetList),this.formJsonObj.formConfig=d.formConfig,this.formJsonObj.widgetList=d.widgetList,this.insertCustomStyleAndScriptNode(),this.$nextTick(()=>{this.initFormObject(!1),this.handleOnMounted()})}else this.$message.error("Set form json failed.")},reloadOptionData(t){let d=[];!!t&&typeof t=="string"?d=[t]:!!t&&Array.isArray(t)&&(d=[...t]),this.broadcast("FieldWidget","reloadOptionItems",d)},getFormData(t=!0){if(!t)return this.formDataModel;let d=function(){},e=new window.Promise(function(h,m){d=function(g,a){a?m(a):h(g)}});return this.$refs.renderForm.validate(h=>{h?d(this.formDataModel):d(this.formDataModel,this.i18nt("render.hint.validationFailed"))}),e},setFormData(t){Object.keys(this.formDataModel).forEach(d=>{!!t&&t.hasOwnProperty(d)&&(this.formDataModel[d]=deepClone(t[d]))}),this.broadcast("ContainerItem","setFormData",this.formDataModel),this.broadcast("FieldWidget","setFormData",this.formDataModel)},getFieldValue(t){let d=this.getWidgetRef(t);if(!!d&&!!d.getValue)return d.getValue();if(!d){let e=[];return this.findWidgetNameInSubForm(t).forEach(h=>{let m=this.getWidgetRef(h);!!m&&!!m.getValue&&e.push(m.getValue())}),e}},setFieldValue(t,d){let e=this.getWidgetRef(t);!!e&&!!e.setValue&&e.setValue(d),e||this.findWidgetNameInSubForm(t).forEach(h=>{let m=this.getWidgetRef(h);!!m&&!!m.setValue&&m.setValue(d)})},getSubFormValues(t,d=!0){return this.subFormRefList[t].getSubFormValues(d)},disableForm(){Object.keys(this.widgetRefList).forEach(d=>{let e=this.getWidgetRef(d);if(e)if(!!e.widget&&e.widget.type==="sub-form")e.disableSubForm();else{//!!foundW.setDisabled && foundW.setDisabled(true) e.setDisabled&&e.setDisabled(!0)}})},enableForm(){Object.keys(this.widgetRefList).forEach(d=>{let e=this.getWidgetRef(d);if(e)if(!!e.widget&&e.widget.type==="sub-form")e.enableSubForm();else{//!!foundW.setDisabled && foundW.setDisabled(false) e.setDisabled&&e.setDisabled(!1)}})},resetForm(){Object.keys(this.subFormRefList).forEach(e=>{this.subFormRefList[e].resetSubForm&&this.subFormRefList[e].resetSubForm()}),Object.keys(this.widgetRefList).forEach(e=>{let h=this.getWidgetRef(e);!!h&&!h.subFormItemFlag&&!!h.resetField&&h.resetField()}),this.$nextTick(()=>{this.clearValidate()})},clearValidate(t){this.$refs.renderForm.clearValidate(t)},validateForm(t){this.$refs.renderForm.validate(d=>{t(d)})},validateFields(){},disableWidgets(t){t&&(typeof t=="string"?this.findWidgetAndSetDisabled(t,!0):Array.isArray(t)&&t.forEach(d=>{this.findWidgetAndSetDisabled(d,!0)}))},enableWidgets(t){t&&(typeof t=="string"?this.findWidgetAndSetDisabled(t,!1):Array.isArray(t)&&t.forEach(d=>{this.findWidgetAndSetDisabled(d,!1)}))},hideWidgets(t){t&&(typeof t=="string"?this.findWidgetAndSetHidden(t,!0):Array.isArray(t)&&t.forEach(d=>{this.findWidgetAndSetHidden(d,!0)}))},showWidgets(t){t&&(typeof t=="string"?this.findWidgetAndSetHidden(t,!1):Array.isArray(t)&&t.forEach(d=>{this.findWidgetAndSetHidden(d,!1)}))},getFieldWidgets(){return getAllFieldWidgets(this.formJsonObj.widgetList)},getContainerWidgets(){return getAllContainerWidgets(this.formJsonObj.widgetList)},addEC(t,d){this.externalComponents[t]=d},hasEC(t){return this.externalComponents.hasOwnProperty(t)},getEC(t){return this.externalComponents[t]},getGlobalDsv(){return this.globalDsv}}};function _sfc_render$2C(t,d,e,h,m,g){const a=require$$0$1.resolveComponent("el-form");return require$$0$1.openBlock(),require$$0$1.createBlock(a,{"label-position":g.labelPosition,size:g.size,class:require$$0$1.normalizeClass([[g.customClass],"render-form"]),"label-width":g.labelWidth,"validate-on-rule-change":!1,model:m.formDataModel,ref:"renderForm",onSubmit:d[0]||(d[0]=require$$0$1.withModifiers(()=>{},["prevent"]))},{default:require$$0$1.withCtx(()=>[(require$$0$1.openBlock(!0),require$$0$1.createElementBlock(require$$0$1.Fragment,null,require$$0$1.renderList(g.widgetList,(u,r)=>(require$$0$1.openBlock(),require$$0$1.createElementBlock(require$$0$1.Fragment,null,[u.category==="container"?(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(g.getContainerWidgetName(u)),{widget:u,key:u.id,"parent-list":g.widgetList,"index-of-parent-list":r,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),f=>({name:f,fn:require$$0$1.withCtx(l=>[require$$0$1.renderSlot(t.$slots,f,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(l)),void 0,!0)])}))]),1032,["widget","parent-list","index-of-parent-list"])):(require$$0$1.openBlock(),require$$0$1.createBlock(require$$0$1.resolveDynamicComponent(g.getWidgetName(u)),{field:u,"form-model":m.formDataModel,designer:null,key:u.id,"parent-list":g.widgetList,"index-of-parent-list":r,"parent-widget":null},require$$0$1.createSlots({_:2},[require$$0$1.renderList(Object.keys(t.$slots),f=>({name:f,fn:require$$0$1.withCtx(l=>[require$$0$1.renderSlot(t.$slots,f,require$$0$1.normalizeProps(require$$0$1.guardReactiveProps(l)),void 0,!0)])}))]),1032,["field","form-model","parent-list","index-of-parent-list"]))],64))),256))]),_:3},8,["label-position","size","class","label-width","model"])}var VFormRender=_export_sfc$1(_sfc_main$2C,[["render",_sfc_render$2C],["__scopeId","data-v-544703a2"]]),ace$2={exports:{}};(function(t,d){(function(){var e="ace",h=function(){return this}();!h&&typeof window!="undefined"&&(h=window);var m=function(l,n,i){if(typeof l!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=n),m.modules[l]||(m.payloads[l]=i,m.modules[l]=null)};m.modules={},m.payloads={};var g=function(l,n,i){if(typeof n=="string"){var o=r(l,n);if(o!=null)return i&&i(),o}else if(Object.prototype.toString.call(n)==="[object Array]"){for(var s=[],c=0,p=n.length;cr.length)&&(u=r.length),u-=a.length;var f=r.indexOf(a,u);return f!==-1&&f===u}),String.prototype.repeat||g(String.prototype,"repeat",function(a){for(var u="",r=this;a>0;)a&1&&(u+=r),(a>>=1)&&(r+=r);return u}),String.prototype.includes||g(String.prototype,"includes",function(a,u){return this.indexOf(a,u)!=-1}),Object.assign||(Object.assign=function(a){if(a==null)throw new TypeError("Cannot convert undefined or null to object");for(var u=Object(a),r=1;r>>0,f=arguments[1],l=f>>0,n=l<0?Math.max(r+l,0):Math.min(l,r),i=arguments[2],o=i===void 0?r:i>>0,s=o<0?Math.max(r+o,0):Math.min(o,r);n0;)r&1&&(f+=u),(r>>=1)&&(u+=u);return f};var g=/^\s\s*/,a=/\s\s*$/;h.stringTrimLeft=function(u){return u.replace(g,"")},h.stringTrimRight=function(u){return u.replace(a,"")},h.copyObject=function(u){var r={};for(var f in u)r[f]=u[f];return r},h.copyArray=function(u){for(var r=[],f=0,l=u.length;f65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,h,m){h.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},h.getOS=function(){return h.isMac?h.OS.MAC:h.isLinux?h.OS.LINUX:h.OS.WINDOWS};var g=typeof navigator=="object"?navigator:{},a=(/mac|win|linux/i.exec(g.platform)||["other"])[0].toLowerCase(),u=g.userAgent||"",r=g.appName||"";h.isWin=a=="win",h.isMac=a=="mac",h.isLinux=a=="linux",h.isIE=r=="Microsoft Internet Explorer"||r.indexOf("MSAppHost")>=0?parseFloat((u.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((u.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),h.isOldIE=h.isIE&&h.isIE<9,h.isGecko=h.isMozilla=u.match(/ Gecko\/\d+/),h.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",h.isWebKit=parseFloat(u.split("WebKit/")[1])||void 0,h.isChrome=parseFloat(u.split(" Chrome/")[1])||void 0,h.isSafari=parseFloat(u.split(" Safari/")[1])&&!h.isChrome||void 0,h.isEdge=parseFloat(u.split(" Edge/")[1])||void 0,h.isAIR=u.indexOf("AdobeAIR")>=0,h.isAndroid=u.indexOf("Android")>=0,h.isChromeOS=u.indexOf(" CrOS ")>=0,h.isIOS=/iPad|iPhone|iPod/.test(u)&&!window.MSStream,h.isIOS&&(h.isMac=!0),h.isMobile=h.isIOS||h.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,h,m){var g=e("./useragent"),a="http://www.w3.org/1999/xhtml";h.buildDom=function i(o,s,c){if(typeof o=="string"&&o){var p=document.createTextNode(o);return s&&s.appendChild(p),p}if(!Array.isArray(o))return o&&o.appendChild&&s&&s.appendChild(o),o;if(typeof o[0]!="string"||!o[0]){for(var $=[],v=0;v=1.5:!0,g.isChromeOS&&(h.HI_DPI=!1),typeof document!="undefined"){var n=document.createElement("div");h.HI_DPI&&n.style.transform!==void 0&&(h.HAS_CSS_TRANSFORMS=!0),!g.isEdge&&typeof n.style.animationName!="undefined"&&(h.HAS_CSS_ANIMATION=!0),n=null}h.HAS_CSS_TRANSFORMS?h.translate=function(i,o,s){i.style.transform="translate("+Math.round(o)+"px, "+Math.round(s)+"px)"}:h.translate=function(i,o,s){i.style.top=Math.round(s)+"px",i.style.left=Math.round(o)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,h,m){/* * based on code from: * * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */var g=e("./dom");h.get=function(a,u){var r=new XMLHttpRequest;r.open("GET",a,!0),r.onreadystatechange=function(){r.readyState===4&&u(r.responseText)},r.send(null)},h.loadScript=function(a,u){var r=g.getDocumentHead(),f=document.createElement("script");f.src=a,r.appendChild(f),f.onload=f.onreadystatechange=function(l,n){(n||!f.readyState||f.readyState=="loaded"||f.readyState=="complete")&&(f=f.onload=f.onreadystatechange=null,n||u())}},h.qualifyURL=function(a){var u=document.createElement("a");return u.href=a,u.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,h,m){h.inherits=function(g,a){g.super_=a,g.prototype=Object.create(a.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})},h.mixin=function(g,a){for(var u in a)g[u]=a[u];return g},h.implement=function(g,a){h.mixin(g,a)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,h,m){var g={},a=function(){this.propagationStopped=!0},u=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(r,f){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var l=this._eventRegistry[r]||[],n=this._defaultHandlers[r];if(!(!l.length&&!n)){(typeof f!="object"||!f)&&(f={}),f.type||(f.type=r),f.stopPropagation||(f.stopPropagation=a),f.preventDefault||(f.preventDefault=u),l=l.slice();for(var i=0;i1&&($=c[c.length-2]);var C=f[s+"Path"];return C==null?C=f.basePath:p=="/"&&(s=p=""),C&&C.slice(-1)!="/"&&(C+="/"),C+s+p+$+this.get("suffix")},h.setModuleUrl=function(o,s){return f.$moduleUrls[o]=s};var l=function(o,s){if(o==="ace/theme/textmate"||o==="./theme/textmate")return s(null,e("./theme/textmate"));if(n)return n(o,s);console.error("loader is not configured")},n;h.setLoader=function(o){n=o},h.dynamicModules=Object.create(null),h.$loading={},h.$loaded={},h.loadModule=function(o,s){var c;if(Array.isArray(o))var p=o[0],$=o[1];else if(typeof o=="string")var $=o;var v=function(C){if(C&&!h.$loading[$])return s&&s(C);if(h.$loading[$]||(h.$loading[$]=[]),h.$loading[$].push(s),!(h.$loading[$].length>1)){var y=function(){l($,function(_,b){b&&(h.$loaded[$]=b),h._emit("load.module",{name:$,module:b});var E=h.$loading[$];h.$loading[$]=null,E.forEach(function(x){x&&x(b)})})};if(!h.get("packaged"))return y();a.loadScript(h.moduleUrl($,p),y),i()}};if(h.dynamicModules[$])h.dynamicModules[$]().then(function(C){C.default?v(C.default):v(C)});else{try{c=this.$require($)}catch{}v(c||h.$loaded[$])}},h.$require=function(o){if(typeof m.require=="function"){var s="require";return m[s](o)}},h.setModuleLoader=function(o,s){h.dynamicModules[o]=s};var i=function(){!f.basePath&&!f.workerPath&&!f.modePath&&!f.themePath&&!Object.keys(f.$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"),i=function(){})};h.version="1.32.6"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,h,m){e("./lib/fixoldbrowsers");var g=e("./config");g.setLoader(function(f,l){e([f],function(n){l(null,n)})});var a=function(){return this||typeof window!="undefined"&&window}();m.exports=function(f){g.init=u,g.$require=e,f.require=e},u(!0);function u(f){if(!(!a||!a.document)){g.set("packaged",f||e.packaged||m.packaged||a.define&&(void 0).packaged);var l={},n="",i=document.currentScript||document._currentScript,o=i&&i.ownerDocument||document;i&&i.src&&(n=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=o.getElementsByTagName("script"),c=0;c ["+this.end.row+"/"+this.end.column+"]"},a.prototype.contains=function(u,r){return this.compare(u,r)==0},a.prototype.compareRange=function(u){var r,f=u.end,l=u.start;return r=this.compare(f.row,f.column),r==1?(r=this.compare(l.row,l.column),r==1?2:r==0?1:0):r==-1?-2:(r=this.compare(l.row,l.column),r==-1?-1:r==1?42:0)},a.prototype.comparePoint=function(u){return this.compare(u.row,u.column)},a.prototype.containsRange=function(u){return this.comparePoint(u.start)==0&&this.comparePoint(u.end)==0},a.prototype.intersects=function(u){var r=this.compareRange(u);return r==-1||r==0||r==1},a.prototype.isEnd=function(u,r){return this.end.row==u&&this.end.column==r},a.prototype.isStart=function(u,r){return this.start.row==u&&this.start.column==r},a.prototype.setStart=function(u,r){typeof u=="object"?(this.start.column=u.column,this.start.row=u.row):(this.start.row=u,this.start.column=r)},a.prototype.setEnd=function(u,r){typeof u=="object"?(this.end.column=u.column,this.end.row=u.row):(this.end.row=u,this.end.column=r)},a.prototype.inside=function(u,r){return this.compare(u,r)==0?!(this.isEnd(u,r)||this.isStart(u,r)):!1},a.prototype.insideStart=function(u,r){return this.compare(u,r)==0?!this.isEnd(u,r):!1},a.prototype.insideEnd=function(u,r){return this.compare(u,r)==0?!this.isStart(u,r):!1},a.prototype.compare=function(u,r){return!this.isMultiLine()&&u===this.start.row?rthis.end.column?1:0:uthis.end.row?1:this.start.row===u?r>=this.start.column?0:-1:this.end.row===u?r<=this.end.column?0:1:0},a.prototype.compareStart=function(u,r){return this.start.row==u&&this.start.column==r?-1:this.compare(u,r)},a.prototype.compareEnd=function(u,r){return this.end.row==u&&this.end.column==r?1:this.compare(u,r)},a.prototype.compareInside=function(u,r){return this.end.row==u&&this.end.column==r?1:this.start.row==u&&this.start.column==r?-1:this.compare(u,r)},a.prototype.clipRows=function(u,r){if(this.end.row>r)var f={row:r+1,column:0};else if(this.end.rowr)var l={row:r+1,column:0};else if(this.start.row1?(x++,x>4&&(x=1)):x=1,a.isIE){var L=Math.abs(w.clientX-O)>5||Math.abs(w.clientY-M)>5;(!k||L)&&(x=1),k&&clearTimeout(k),k=setTimeout(function(){k=null},y[x-1]||600),x==1&&(O=w.clientX,M=w.clientY)}if(w._clicks=x,_[b]("mousedown",w),x>4)x=0;else if(x>1)return _[b](T[x],w)}Array.isArray(C)||(C=[C]),C.forEach(function(w){o(w,"mousedown",S,E)})};function c(C){return 0|(C.ctrlKey?1:0)|(C.altKey?2:0)|(C.shiftKey?4:0)|(C.metaKey?8:0)}h.getModifierString=function(C){return g.KEY_MODS[c(C)]};function p(C,y,_){var b=c(y);if(!a.isMac&&u){if(y.getModifierState&&(y.getModifierState("OS")||y.getModifierState("Win"))&&(b|=8),u.altGr)if((3&b)!=3)u.altGr=0;else return;if(_===18||_===17){var E=y.location;if(_===17&&E===1)u[_]==1&&(r=y.timeStamp);else if(_===18&&b===3&&E===2){var x=y.timeStamp-r;x<50&&(u.altGr=!0)}}}if(_ in g.MODIFIER_KEYS&&(_=-1),!(!b&&_===13&&y.location===3&&(C(y,b,-_),y.defaultPrevented))){if(a.isChromeOS&&b&8){if(C(y,b,_),y.defaultPrevented)return;b&=~8}return!b&&!(_ in g.FUNCTION_KEYS)&&!(_ in g.PRINTABLE_KEYS)?!1:C(y,b,_)}}h.addCommandKeyListener=function(C,y,_){var b=null;o(C,"keydown",function(E){u[E.keyCode]=(u[E.keyCode]||0)+1;var x=p(y,E,E.keyCode);return b=E.defaultPrevented,x},_),o(C,"keypress",function(E){b&&(E.ctrlKey||E.altKey||E.shiftKey||E.metaKey)&&(h.stopEvent(E),b=null)},_),o(C,"keyup",function(E){u[E.keyCode]=null},_),u||($(),o(window,"focus",$))};function $(){u=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!a.isOldIE){var v=1;h.nextTick=function(C,y){y=y||window;var _="zero-timeout-message-"+v++,b=function(E){E.data==_&&(h.stopPropagation(E),s(y,"message",b),C())};o(y,"message",b),y.postMessage(_,"*")}}h.$idleBlocked=!1,h.onIdle=function(C,y){return setTimeout(function _(){h.$idleBlocked?setTimeout(_,100):C()},y)},h.$idleBlockId=null,h.blockIdle=function(C){h.$idleBlockId&&clearTimeout(h.$idleBlockId),h.$idleBlocked=!0,h.$idleBlockId=setTimeout(function(){h.$idleBlocked=!1},C||100)},h.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),h.nextFrame?h.nextFrame=h.nextFrame.bind(window):h.nextFrame=function(C){setTimeout(C,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,h,m){var g;m.exports={lineMode:!1,pasteCancelled:function(){return g&&g>Date.now()-50?!0:g=!1},cancel:function(){g=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(e,h,m){var g=e("../lib/event"),a=e("../config").nls,u=e("../lib/useragent"),r=e("../lib/dom"),f=e("../lib/lang"),l=e("../clipboard"),n=u.isChrome<18,i=u.isIE,o=u.isChrome>63,s=400,c=e("../lib/keys"),p=c.KEY_MODS,$=u.isIOS,v=$?/\s/:/\n/,C=u.isMobile,y;y=function(_,b){var E=r.createElement("textarea");E.className="ace_text-input",E.setAttribute("wrap","off"),E.setAttribute("autocorrect","off"),E.setAttribute("autocapitalize","off"),E.setAttribute("spellcheck","false"),E.style.opacity="0",_.insertBefore(E,_.firstChild);var x=!1,O=!1,M=!1,k=!1,T="";C||(E.style.fontSize="1px");var S=!1,w=!1,L="",q=0,A=0,I=0,F=Number.MAX_SAFE_INTEGER,V=Number.MIN_SAFE_INTEGER,R=0;try{var B=document.activeElement===E}catch{}this.setNumberOfExtraLines=function(X){if(F=Number.MAX_SAFE_INTEGER,V=Number.MIN_SAFE_INTEGER,X<0){R=0;return}R=X},this.setAriaOptions=function(X){if(X.activeDescendant?(E.setAttribute("aria-haspopup","true"),E.setAttribute("aria-autocomplete",X.inline?"both":"list"),E.setAttribute("aria-activedescendant",X.activeDescendant)):(E.setAttribute("aria-haspopup","false"),E.setAttribute("aria-autocomplete","both"),E.removeAttribute("aria-activedescendant")),X.role&&E.setAttribute("role",X.role),X.setLabel&&(E.setAttribute("aria-roledescription",a("editor")),b.session)){var ae=b.session.selection.cursor.row;E.setAttribute("aria-label",a("Cursor at row $0",[ae+1]))}},this.setAriaOptions({role:"textbox"}),g.addListener(E,"blur",function(X){w||(b.onBlur(X),B=!1)},b),g.addListener(E,"focus",function(X){if(!w){if(B=!0,u.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(X),u.isEdge?setTimeout(P):P()}},b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:b.renderer.enableKeyboardAccessibility}),T||o||this.$focusScroll=="browser")return E.focus({preventScroll:!0});var X=E.style.top;E.style.position="fixed",E.style.top="0px";try{var ae=E.getBoundingClientRect().top!=0}catch{return}var oe=[];if(ae)for(var G=E.parentElement;G&&G.nodeType==1;)oe.push(G),G.setAttribute("ace_nocontext","true"),!G.parentElement&&G.getRootNode?G=G.getRootNode().host:G=G.parentElement;E.focus({preventScroll:!0}),ae&&oe.forEach(function(U){U.removeAttribute("ace_nocontext")}),setTimeout(function(){E.style.position="",E.style.top=="0px"&&(E.style.top=X)},0)},this.blur=function(){E.blur()},this.isFocused=function(){return B},b.on("beforeEndOperation",function(){var X=b.curOp,ae=X&&X.command&&X.command.name;if(ae!="insertstring"){var oe=ae&&(X.docChanged||X.selectionChanged);M&&oe&&(L=E.value="",J()),P()}});var N=function(X,ae){for(var oe=ae,G=1;G<=X-F&&G<2*R+1;G++)oe+=b.session.getLine(X-G).length+1;return oe},P=$?function(X){if(!(!B||x&&!X||k)){X||(X="");var ae=` ab`+X+`cde fg `;ae!=E.value&&(E.value=L=ae);var oe=4,G=4+(X.length||(b.selection.isEmpty()?0:1));(q!=oe||A!=G)&&E.setSelectionRange(oe,G),q=oe,A=G}}:function(){if(!(M||k)&&!(!B&&!H)){M=!0;var X=0,ae=0,oe="";if(b.session){var G=b.selection,U=G.getRange(),Y=G.cursor.row;Y===V+1?(F=V+1,V=F+2*R):Y===F-1?(V=F-1,F=V-2*R):(YV+1)&&(F=Y>R?Y-R:0,V=Y>R?Y+R:2*R);for(var ee=[],re=F;re<=V;re++)ee.push(b.session.getLine(re));if(oe=ee.join(` `),X=N(U.start.row,U.start.column),ae=N(U.end.row,U.end.column),U.start.rowV){var ce=b.session.getLine(V+1);ae=U.end.row>V+1?ce.length:U.end.column,ae+=oe.length+1,oe=oe+` `+ce}else C&&Y>0&&(oe=` `+oe,ae+=1,X+=1);oe.length>s&&(X=L.length&&X.value===L&&L&&X.selectionEnd!==A},D=function(X){M||(x?x=!1:j(E)?(b.selectAll(),P()):C&&E.selectionStart!=q&&P())},W=null;this.setInputHandler=function(X){W=X},this.getInputHandler=function(){return W};var H=!1,z=function(X,ae){if(H&&(H=!1),O)return P(),X&&b.onPaste(X),O=!1,"";for(var oe=E.selectionStart,G=E.selectionEnd,U=q,Y=L.length-A,ee=X,re=X.length-oe,de=X.length-G,ce=0;U>0&&L[ce]==X[ce];)ce++,U--;for(ee=ee.slice(ce),ce=1;Y>0&&L.length-ce>q-1&&L[L.length-ce]==X[X.length-ce];)ce++,Y--;re-=ce-1,de-=ce-1;var ve=ee.length-ce+1;if(ve<0&&(U=-ve,ve=0),ee=ee.slice(0,ve),!ae&&!ee&&!re&&!U&&!Y&&!de)return"";k=!0;var xe=!1;return u.isAndroid&&ee==". "&&(ee=" ",xe=!0),ee&&!U&&!Y&&!re&&!de||S?b.onTextInput(ee):b.onTextInput(ee,{extendLeft:U,extendRight:Y,restoreStart:re,restoreEnd:de}),k=!1,L=X,q=oe,A=G,I=de,xe?` `:ee},K=function(X){if(M)return _e();if(X&&X.inputType){if(X.inputType=="historyUndo")return b.execCommand("undo");if(X.inputType=="historyRedo")return b.execCommand("redo")}var ae=E.value,oe=z(ae,!0);(ae.length>s+100||v.test(oe)||C&&q<1&&q==A)&&P()},Z=function(X,ae,oe){var G=X.clipboardData||window.clipboardData;if(!(!G||n)){var U=i||oe?"Text":"text/plain";try{return ae?G.setData(U,ae)!==!1:G.getData(U)}catch(Y){if(!oe)return Z(Y,ae,!0)}}},ie=function(X,ae){var oe=b.getCopyText();if(!oe)return g.preventDefault(X);Z(X,oe)?($&&(P(oe),x=oe,setTimeout(function(){x=!1},10)),ae?b.onCut():b.onCopy(),g.preventDefault(X)):(x=!0,E.value=oe,E.select(),setTimeout(function(){x=!1,P(),ae?b.onCut():b.onCopy()}))},se=function(X){ie(X,!0)},ue=function(X){ie(X,!1)},fe=function(X){var ae=Z(X);l.pasteCancelled()||(typeof ae=="string"?(ae&&b.onPaste(ae,X),u.isIE&&setTimeout(P),g.preventDefault(X)):(E.value="",O=!0))};g.addCommandKeyListener(E,function(X,ae,oe){if(!M)return b.onCommandKey(X,ae,oe)},b),g.addListener(E,"select",D,b),g.addListener(E,"input",K,b),g.addListener(E,"cut",se,b),g.addListener(E,"copy",ue,b),g.addListener(E,"paste",fe,b),(!("oncut"in E)||!("oncopy"in E)||!("onpaste"in E))&&g.addListener(_,"keydown",function(X){if(!(u.isMac&&!X.metaKey||!X.ctrlKey))switch(X.keyCode){case 67:ue(X);break;case 86:fe(X);break;case 88:se(X);break}},b);var ye=function(X){if(!(M||!b.onCompositionStart||b.$readOnly)&&(M={},!S)){X.data&&(M.useTextareaForIME=!1),setTimeout(_e,0),b._signal("compositionStart"),b.on("mousedown",Q);var ae=b.getSelectionRange();ae.end.row=ae.start.row,ae.end.column=ae.start.column,M.markerRange=ae,M.selectionStart=q,b.onCompositionStart(M),M.useTextareaForIME?(L=E.value="",q=0,A=0):(E.msGetInputContext&&(M.context=E.msGetInputContext()),E.getInputContext&&(M.context=E.getInputContext()))}},_e=function(){if(!(!M||!b.onCompositionUpdate||b.$readOnly)){if(S)return Q();if(M.useTextareaForIME)b.onCompositionUpdate(E.value);else{var X=E.value;z(X),M.markerRange&&(M.context&&(M.markerRange.start.column=M.selectionStart=M.context.compositionStartOffset),M.markerRange.end.column=M.markerRange.start.column+A-M.selectionStart+I)}}},J=function(X){!b.onCompositionEnd||b.$readOnly||(M=!1,b.onCompositionEnd(),b.off("mousedown",Q),X&&K())};function Q(){w=!0,E.blur(),E.focus(),w=!1}var ne=f.delayedCall(_e,50).schedule.bind(null,null);function le(X){X.keyCode==27&&E.value.lengthA&&L[de]==` `?ce=c.end:reA&&L.slice(0,de).split(` `).length>2?ce=c.down:de>A&&L[de-1]==" "?(ce=c.right,ve=p.option):(de>A||de==A&&A!=q&&re==de)&&(ce=c.right),re!==de&&(ve|=p.shift),ce){var xe=ae.onCommandKey({},ve,ce);if(!xe&&ae.commands){ce=c.keyCodeToString(ce);var ge=ae.commands.findKeyCommand(ve,ce);ge&&ae.execCommand(ge)}q=re,A=de,P("")}}};document.addEventListener("selectionchange",Y),ae.on("destroy",function(){document.removeEventListener("selectionchange",Y)})}this.destroy=function(){E.parentElement&&E.parentElement.removeChild(E)}},h.TextInput=y,h.$setUserAgentForTests=function(_,b){C=_,$=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,h,m){var g=e("../lib/useragent"),a=0,u=550,r=function(){function n(i){i.$clickSelection=null;var o=i.editor;o.setDefaultHandler("mousedown",this.onMouseDown.bind(i)),o.setDefaultHandler("dblclick",this.onDoubleClick.bind(i)),o.setDefaultHandler("tripleclick",this.onTripleClick.bind(i)),o.setDefaultHandler("quadclick",this.onQuadClick.bind(i)),o.setDefaultHandler("mousewheel",this.onMouseWheel.bind(i));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(c){i[c]=this[c]},this),i.selectByLines=this.extendSelectionBy.bind(i,"getLineRange"),i.selectByWords=this.extendSelectionBy.bind(i,"getWordRange")}return n.prototype.onMouseDown=function(i){var o=i.inSelection(),s=i.getDocumentPosition();this.mousedownEvent=i;var c=this.editor,p=i.getButton();if(p!==0){var $=c.getSelectionRange(),v=$.isEmpty();(v||p==1)&&c.selection.moveToPosition(s),p==2&&(c.textInput.onContextMenu(i.domEvent),g.isMozilla||i.preventDefault());return}if(this.mousedownEvent.time=Date.now(),o&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(i);return}return this.captureMouse(i),this.startSelect(s,i.domEvent._clicks>1),i.preventDefault()},n.prototype.startSelect=function(i,o){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(i):o||s.selection.moveToPosition(i),o||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},n.prototype.select=function(){var i,o=this.editor,s=o.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(s);if(c==-1)i=this.$clickSelection.end;else if(c==1)i=this.$clickSelection.start;else{var p=l(this.$clickSelection,s);s=p.cursor,i=p.anchor}o.selection.setSelectionAnchor(i.row,i.column)}o.selection.selectToPosition(s),o.renderer.scrollCursorIntoView()},n.prototype.extendSelectionBy=function(i){var o,s=this.editor,c=s.renderer.screenToTextCoordinates(this.x,this.y),p=s.selection[i](c.row,c.column);if(this.$clickSelection){var $=this.$clickSelection.comparePoint(p.start),v=this.$clickSelection.comparePoint(p.end);if($==-1&&v<=0)o=this.$clickSelection.end,(p.end.row!=c.row||p.end.column!=c.column)&&(c=p.start);else if(v==1&&$>=0)o=this.$clickSelection.start,(p.start.row!=c.row||p.start.column!=c.column)&&(c=p.end);else if($==-1&&v==1)c=p.end,o=p.start;else{var C=l(this.$clickSelection,c);c=C.cursor,o=C.anchor}s.selection.setSelectionAnchor(o.row,o.column)}s.selection.selectToPosition(c),s.renderer.scrollCursorIntoView()},n.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},n.prototype.focusWait=function(){var i=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),o=Date.now();(i>a||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},n.prototype.onDoubleClick=function(i){var o=i.getDocumentPosition(),s=this.editor,c=s.session,p=c.getBracketRange(o);p?(p.isEmpty()&&(p.start.column--,p.end.column++),this.setState("select")):(p=s.selection.getWordRange(o.row,o.column),this.setState("selectByWords")),this.$clickSelection=p,this.select()},n.prototype.onTripleClick=function(i){var o=i.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var c=s.getSelectionRange();c.isMultiLine()&&c.contains(o.row,o.column)?(this.$clickSelection=s.selection.getLineRange(c.start.row),this.$clickSelection.end=s.selection.getLineRange(c.end.row).end):this.$clickSelection=s.selection.getLineRange(o.row),this.select()},n.prototype.onQuadClick=function(i){var o=this.editor;o.selectAll(),this.$clickSelection=o.getSelectionRange(),this.setState("selectAll")},n.prototype.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var o=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,c=i.domEvent.timeStamp,p=c-s.t,$=p?i.wheelX/p:s.vx,v=p?i.wheelY/p:s.vy;p=1&&o.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(y=!0),C<=1&&o.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(y=!0),y)s.allowed=c;else if(c-s.allowedu.clientHeight;r||a.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,h,m){var g=this&&this.__extends||function(){var c=function(p,$){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,C){v.__proto__=C}||function(v,C){for(var y in C)Object.prototype.hasOwnProperty.call(C,y)&&(v[y]=C[y])},c(p,$)};return function(p,$){if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");c(p,$);function v(){this.constructor=p}p.prototype=$===null?Object.create($):(v.prototype=$.prototype,new v)}}(),a=this&&this.__values||function(c){var p=typeof Symbol=="function"&&Symbol.iterator,$=p&&c[p],v=0;if($)return $.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&v>=c.length&&(c=void 0),{value:c&&c[v++],done:!c}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},u=e("./lib/dom");e("./lib/event");var r=e("./range").Range,f=e("./lib/scroll").preventParentScroll,l="ace_tooltip",n=function(){function c(p){this.isOpen=!1,this.$element=null,this.$parentNode=p}return c.prototype.$init=function(){return this.$element=u.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(p){this.getElement().textContent=p},c.prototype.setHtml=function(p){this.getElement().innerHTML=p},c.prototype.setPosition=function(p,$){this.getElement().style.left=p+"px",this.getElement().style.top=$+"px"},c.prototype.setClassName=function(p){u.addCssClass(this.getElement(),p)},c.prototype.setTheme=function(p){this.$element.className=l+" "+(p.isDark?"ace_dark ":"")+(p.cssClass||"")},c.prototype.show=function(p,$,v){p!=null&&this.setText(p),$!=null&&v!=null&&this.setPosition($,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(p){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),i=function(){function c(){this.popups=[]}return c.prototype.addPopup=function(p){this.popups.push(p),this.updatePopups()},c.prototype.removePopup=function(p){var $=this.popups.indexOf(p);$!==-1&&(this.popups.splice($,1),this.updatePopups())},c.prototype.updatePopups=function(){var p,$,v,C;this.popups.sort(function(T,S){return S.priority-T.priority});var y=[];try{for(var _=a(this.popups),b=_.next();!b.done;b=_.next()){var E=b.value,x=!0;try{for(var O=(v=void 0,a(y)),M=O.next();!M.done;M=O.next()){var k=M.value;if(this.doPopupsOverlap(k,E)){x=!1;break}}}catch(T){v={error:T}}finally{try{M&&!M.done&&(C=O.return)&&C.call(O)}finally{if(v)throw v.error}}x?y.push(E):E.hide()}}catch(T){p={error:T}}finally{try{b&&!b.done&&($=_.return)&&$.call(_)}finally{if(p)throw p.error}}},c.prototype.doPopupsOverlap=function(p,$){var v=p.getElement().getBoundingClientRect(),C=$.getElement().getBoundingClientRect();return v.leftC.left&&v.topC.top},c}(),o=new i;h.popupManager=o,h.Tooltip=n;var s=function(c){g(p,c);function p($){$===void 0&&($=document.body);var v=c.call(this,$)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var C=v.getElement();return C.style.whiteSpace="pre-wrap",C.style.pointerEvents="auto",C.addEventListener("mouseout",v.onMouseOut),C.tabIndex=-1,C.addEventListener("blur",function(){C.contains(document.activeElement)||this.hide()}.bind(v)),C.addEventListener("wheel",f),v}return p.prototype.addToEditor=function($){$.on("mousemove",this.onMouseMove),$.on("mousedown",this.hide),$.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},p.prototype.removeFromEditor=function($){$.off("mousemove",this.onMouseMove),$.off("mousedown",this.hide),$.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},p.prototype.onMouseMove=function($,v){this.lastEvent=$,this.lastT=Date.now();var C=v.$mouseHandler.isMousePressed;if(this.isOpen){var y=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(y.row,y.column)||C||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||C||(this.lastEvent=$,this.timeout=setTimeout(this.waitForHover,this.idleTime))},p.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var $=Date.now()-this.lastT;if(this.idleTime-$>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-$);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},p.prototype.isOutsideOfText=function($){var v=$.editor,C=$.getDocumentPosition(),y=v.session.getLine(C.row);if(C.column==y.length){var _=v.renderer.pixelToScreenCoordinates($.clientX,$.clientY),b=v.session.documentToScreenPosition(C.row,C.column);if(b.column!=_.column||b.row!=_.row)return!0}return!1},p.prototype.setDataProvider=function($){this.$gatherData=$},p.prototype.showForRange=function($,v,C,y){var _=10;if(!(y&&y!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=$.renderer;this.isOpen||(o.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(v,$.session),this.range=r.fromPoints(v.start,v.end);var E=b.textToScreenCoordinates(v.start.row,v.start.column),x=b.scroller.getBoundingClientRect();E.pageX=o.length&&(o=void 0),{value:o&&o[p++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},u=e("../lib/dom"),r=e("../lib/event"),f=e("../tooltip").Tooltip,l=e("../config").nls;function n(o){var s=o.editor,c=s.renderer.$gutterLayer,p=new i(s);o.editor.setDefaultHandler("guttermousedown",function(b){if(!(!s.isFocused()||b.getButton()!=0)){var E=c.getRegion(b);if(E!="foldWidgets"){var x=b.getDocumentPosition().row,O=s.session.selection;if(b.getShiftKey())O.selectTo(x,0);else{if(b.domEvent.detail==2)return s.selectAll(),b.preventDefault();o.$clickSelection=s.selection.getLineRange(x)}return o.setState("selectByLines"),o.captureMouse(b),b.preventDefault()}}});var $,v;function C(){var b=v.getDocumentPosition().row,E=s.session.getLength();if(b==E){var x=s.renderer.pixelToScreenCoordinates(0,v.y).row,O=v.$pos;if(x>s.session.documentToScreenRow(O.row,O.column))return y()}if(p.showTooltip(b),!!p.isOpen)if(s.on("mousewheel",y),o.$tooltipFollowsMouse)_(v);else{var M=v.getGutterRow(),k=c.$lines.get(M);if(k){var T=k.element.querySelector(".ace_gutter_annotation"),S=T.getBoundingClientRect(),w=p.getElement().style;w.left=S.right+"px",w.top=S.bottom+"px"}else _(v)}}function y(){$&&($=clearTimeout($)),p.isOpen&&(p.hideTooltip(),s.off("mousewheel",y))}function _(b){p.setPosition(b.x,b.y)}o.editor.setDefaultHandler("guttermousemove",function(b){var E=b.domEvent.target||b.domEvent.srcElement;if(u.hasCssClass(E,"ace_fold-widget"))return y();p.isOpen&&o.$tooltipFollowsMouse&&_(b),v=b,!$&&($=setTimeout(function(){$=null,v&&!o.isMousePressed?C():y()},50))}),r.addListener(s.renderer.$gutter,"mouseout",function(b){v=null,!(!p.isOpen||$)&&($=setTimeout(function(){$=null,y()},50))},s),s.on("changeSession",y),s.on("input",y)}h.GutterHandler=n;var i=function(o){g(s,o);function s(c){var p=o.call(this,c.container)||this;return p.editor=c,p}return s.prototype.setPosition=function(c,p){var $=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,C=this.getWidth(),y=this.getHeight();c+=15,p+=15,c+C>$&&(c-=c+C-$),p+y>v&&(p-=20+y),f.prototype.setPosition.call(this,c,p)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:l("error"),plural:l("errors")},warning:{singular:l("warning"),plural:l("warnings")},info:{singular:l("information message"),plural:l("information messages")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(c){var p=this.editor.renderer.$gutterLayer,$=p.$annotations[c],v;$?v={text:Array.from($.text),type:Array.from($.type)}:v={text:[],type:[]};var C=p.session.getFoldLine(c);if(C&&p.$showFoldedAnnotations){for(var y={error:[],warning:[],info:[]},_,b=c+1;b<=C.end.row;b++)if(!!p.$annotations[b])for(var E=0;E ").concat(v.text[b]);M[v.type[b].replace("_fold","")].push(T)}var S=[].concat(M.error,M.warning,M.info).join("
");this.setHtml(S),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)},s.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},s.annotationsToSummaryString=function(c){var p,$,v=[],C=["error","warning","info"];try{for(var y=a(C),_=y.next();!_.done;_=y.next()){var b=_.value;if(!!c[b].length){var E=c[b].length===1?s.annotationLabels[b].singular:s.annotationLabels[b].plural;v.push("".concat(c[b].length," ").concat(E))}}}catch(x){p={error:x}}finally{try{_&&!_.done&&($=y.return)&&$.call(y)}finally{if(p)throw p.error}}return v.join(", ")},s}(f);h.GutterTooltip=i}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,h,m){var g=e("../lib/event"),a=e("../lib/useragent"),u=function(){function r(f,l){this.speed,this.wheelX,this.wheelY,this.domEvent=f,this.editor=l,this.x=this.clientX=f.clientX,this.y=this.clientY=f.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return r.prototype.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},r.prototype.preventDefault=function(){g.preventDefault(this.domEvent),this.defaultPrevented=!0},r.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},r.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},r.prototype.getGutterRow=function(){var f=this.getDocumentPosition().row,l=this.editor.session.documentToScreenRow(f,0),n=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return l-n},r.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var f=this.editor,l=f.getSelectionRange();if(l.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=l.contains(n.row,n.column)}return this.$inSelection},r.prototype.getButton=function(){return g.getButton(this.domEvent)},r.prototype.getShiftKey=function(){return this.domEvent.shiftKey},r.prototype.getAccelKey=function(){return a.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},r}();h.MouseEvent=u}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,h,m){var g=e("../lib/dom"),a=e("../lib/event"),u=e("../lib/useragent"),r=200,f=200,l=5;function n(o){var s=o.editor,c=g.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent="\xA0";var p=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];p.forEach(function(N){o[N]=this[N]},this),s.on("mousedown",this.onMouseDown.bind(o));var $=s.container,v,C,y,_,b,E,x=0,O,M,k,T,S;this.onDragStart=function(N){if(this.cancelDrag||!$.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(N)},0),N.preventDefault()}b=s.getSelectionRange();var j=N.dataTransfer;j.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(c),j.setDragImage&&j.setDragImage(c,0,0),setTimeout(function(){s.container.removeChild(c)}),j.clearData(),j.setData("Text",s.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(N){if($.draggable=!1,M=!1,this.setState(null),!s.getReadOnly()){var P=N.dataTransfer.dropEffect;!O&&P=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(N){if(!(s.getReadOnly()||!R(N.dataTransfer)))return C=N.clientX,y=N.clientY,v||A(),x++,N.dataTransfer.dropEffect=O=B(N),a.preventDefault(N)},this.onDragOver=function(N){if(!(s.getReadOnly()||!R(N.dataTransfer)))return C=N.clientX,y=N.clientY,v||(A(),x++),F!==null&&(F=null),N.dataTransfer.dropEffect=O=B(N),a.preventDefault(N)},this.onDragLeave=function(N){if(x--,x<=0&&v)return I(),O=null,a.preventDefault(N)},this.onDrop=function(N){if(!!E){var P=N.dataTransfer;if(M)switch(O){case"move":b.contains(E.row,E.column)?b={start:E,end:E}:b=s.moveText(b,E);break;case"copy":b=s.moveText(b,E,!0);break}else{var j=P.getData("Text");b={start:E,end:s.session.insert(E,j)},s.focus(),O=null}return I(),a.preventDefault(N)}},a.addListener($,"dragstart",this.onDragStart.bind(o),s),a.addListener($,"dragend",this.onDragEnd.bind(o),s),a.addListener($,"dragenter",this.onDragEnter.bind(o),s),a.addListener($,"dragover",this.onDragOver.bind(o),s),a.addListener($,"dragleave",this.onDragLeave.bind(o),s),a.addListener($,"drop",this.onDrop.bind(o),s);function w(N,P){var j=Date.now(),D=!P||N.row!=P.row,W=!P||N.column!=P.column;if(!T||D||W)s.moveCursorToPosition(N),T=j,S={x:C,y};else{var H=i(S.x,S.y,C,y);H>l?T=null:j-T>=f&&(s.renderer.scrollCursorIntoView(),T=null)}}function L(N,P){var j=Date.now(),D=s.renderer.layerConfig.lineHeight,W=s.renderer.layerConfig.characterWidth,H=s.renderer.scroller.getBoundingClientRect(),z={x:{left:C-H.left,right:H.right-C},y:{top:y-H.top,bottom:H.bottom-y}},K=Math.min(z.x.left,z.x.right),Z=Math.min(z.y.top,z.y.bottom),ie={row:N.row,column:N.column};K/W<=2&&(ie.column+=z.x.left=r&&s.renderer.scrollCursorIntoView(ie):k=j:k=null}function q(){var N=E;E=s.renderer.screenToTextCoordinates(C,y),w(E,N),L(E,N)}function A(){b=s.selection.toOrientedRange(),v=s.session.addMarker(b,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),q(),_=setInterval(q,20),x=0,a.addListener(document,"mousemove",V)}function I(){clearInterval(_),s.session.removeMarker(v),v=null,s.selection.fromOrientedRange(b),s.isFocused()&&!M&&s.$resetCursorStyle(),b=null,E=null,x=0,k=null,T=null,a.removeListener(document,"mousemove",V)}var F=null;function V(){F==null&&(F=setTimeout(function(){F!=null&&v&&I()},20))}function R(N){var P=N.types;return!P||Array.prototype.some.call(P,function(j){return j=="text/plain"||j=="Text"})}function B(N){var P=["copy","copymove","all","uninitialized"],j=["move","copymove","linkmove","all","uninitialized"],D=u.isMac?N.altKey:N.ctrlKey,W="uninitialized";try{W=N.dataTransfer.effectAllowed.toLowerCase()}catch{}var H="none";return D&&P.indexOf(W)>=0?H="copy":j.indexOf(W)>=0?H="move":P.indexOf(W)>=0&&(H="copy"),H}}(function(){this.dragWait=function(){var o=Date.now()-this.mousedownEvent.time;o>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var o=this.editor.container;o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(o){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var o=this.editor,s=o.container;s.draggable=!0,o.renderer.$cursorLayer.setBlinking(!1),o.setStyle("ace_dragging");var c=u.isWin?"default":"move";o.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(o){var s=this.editor.container;if(u.isIE&&this.state=="dragReady"){var c=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&s.dragDrop()}if(this.state==="dragWait"){var c=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(o){if(!!this.$dragEnabled){this.mousedownEvent=o;var s=this.editor,c=o.inSelection(),p=o.getButton(),$=o.domEvent.detail||1;if($===1&&p===0&&c){if(o.editor.inMultiSelectMode&&(o.getAccelKey()||o.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=o.domEvent.target||o.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),s.getDragDelay()){if(u.isWebKit){this.cancelDrag=!0;var C=s.container;C.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(o,this.onMouseDrag.bind(this)),o.defaultPrevented=!0}}}}).call(n.prototype);function i(o,s,c,p){return Math.sqrt(Math.pow(c-o,2)+Math.pow(p-s,2))}h.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,h,m){var g=e("./mouse_event").MouseEvent,a=e("../lib/event"),u=e("../lib/dom");h.addTouchListeners=function(r,f){var l="scroll",n,i,o,s,c,p,$=0,v,C=0,y=0,_=0,b,E;function x(){var w=window.navigator&&window.navigator.clipboard,L=!1,q=function(){var I=f.getCopyText(),F=f.session.getUndoManager().hasUndo();E.replaceChild(u.buildDom(L?["span",!I&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],F&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),E.firstChild)},A=function(I){var F=I.target.getAttribute("action");if(F=="more"||!L)return L=!L,q();F=="paste"?w.readText().then(function(V){f.execCommand(F,V)}):F&&((F=="cut"||F=="copy")&&(w?w.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(F)),E.firstChild.style.display="none",L=!1,F!="openCommandPalette"&&f.focus()};E=u.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(I){l="menu",I.stopPropagation(),I.preventDefault(),f.textInput.focus()},ontouchend:function(I){I.stopPropagation(),I.preventDefault(),A(I)},onclick:A},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container)}function O(){E||x();var w=f.selection.cursor,L=f.renderer.textToScreenCoordinates(w.row,w.column),q=f.renderer.textToScreenCoordinates(0,0).pageX,A=f.renderer.scrollLeft,I=f.container.getBoundingClientRect();E.style.top=L.pageY-I.top-3+"px",L.pageX-I.left=2?f.selection.getLineRange(v.row):f.session.getBracketRange(v);w&&!w.isEmpty()?f.selection.setRange(w):f.selection.selectWord(),l="wait"}a.addListener(r,"contextmenu",function(w){if(!!b){var L=f.textInput.getElement();L.focus()}},f),a.addListener(r,"touchstart",function(w){var L=w.touches;if(c||L.length>1){clearTimeout(c),c=null,o=-1,l="zoom";return}b=f.$mouseHandler.isMousePressed=!0;var q=f.renderer.layerConfig.lineHeight,A=f.renderer.layerConfig.lineHeight,I=w.timeStamp;s=I;var F=L[0],V=F.clientX,R=F.clientY;Math.abs(n-V)+Math.abs(i-R)>q&&(o=-1),n=w.clientX=V,i=w.clientY=R,y=_=0;var B=new g(w,f);if(v=B.getDocumentPosition(),I-o<500&&L.length==1&&!$)C++,w.preventDefault(),w.button=0,T();else{C=0;var N=f.selection.cursor,P=f.selection.isEmpty()?N:f.selection.anchor,j=f.renderer.$cursorLayer.getPixelPosition(N,!0),D=f.renderer.$cursorLayer.getPixelPosition(P,!0),W=f.renderer.scroller.getBoundingClientRect(),H=f.renderer.layerConfig.offset,z=f.renderer.scrollLeft,K=function(se,ue){return se=se/A,ue=ue/q-.75,se*se+ue*ue};if(w.clientXie?"cursor":"anchor"),ie<3.5?l="anchor":Z<3.5?l="cursor":l="scroll",c=setTimeout(k,450)}o=I},f),a.addListener(r,"touchend",function(w){b=f.$mouseHandler.isMousePressed=!1,p&&clearInterval(p),l=="zoom"?(l="",$=0):c?(f.selection.moveToPosition(v),$=0,O()):l=="scroll"?(S(),M()):O(),clearTimeout(c),c=null},f),a.addListener(r,"touchmove",function(w){c&&(clearTimeout(c),c=null);var L=w.touches;if(!(L.length>1||l=="zoom")){var q=L[0],A=n-q.clientX,I=i-q.clientY;if(l=="wait")if(A*A+I*I>4)l="cursor";else return w.preventDefault();n=q.clientX,i=q.clientY,w.clientX=q.clientX,w.clientY=q.clientY;var F=w.timeStamp,V=F-s;if(s=F,l=="scroll"){var R=new g(w,f);R.speed=1,R.wheelX=A,R.wheelY=I,10*Math.abs(A)0)if(ie==16){for(fe=ue;fe-1){for(fe=ue;fe=0&&D[J]==b;J--)P[J]=g}}}function V(N,P,j){if(!(a=N){for(H=W+1;H=N;)H++;for(z=W,K=H-1;z=P.length||(H=j[D-1])!=p&&H!=$||(z=P[D+1])!=p&&z!=$?v:(u&&(z=$),z==H?z:v);case x:return H=D>0?j[D-1]:C,H==p&&D+10&&j[D-1]==p)return p;if(u)return v;for(Z=D+1,K=P.length;Z=1425&&ie<=2303||ie==64286;if(H=P[Z],se&&(H==c||H==_))return c}return D<1||(H=P[D-1])==C?v:j[D-1];case C:return u=!1,r=!0,g;case y:return f=!0,v;case k:case T:case w:case L:case S:u=!1;case q:return v}}function B(N){var P=N.charCodeAt(0),j=P>>8;return j==0?P>191?s:A[P]:j==5?/[\u0591-\u05f4]/.test(N)?c:s:j==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(N)?M:/[\u0660-\u0669\u066b-\u066c]/.test(N)?$:P==1642?O:/[\u06f0-\u06f9]/.test(N)?p:_:j==32&&P<=8287?I[P&255]:j==254&&P>=65136?_:v}h.L=s,h.R=c,h.EN=p,h.ON_R=3,h.AN=4,h.R_H=5,h.B=6,h.RLE=7,h.DOT="\xB7",h.doBidiReorder=function(N,P,j){if(N.length<2)return{};var D=N.split(""),W=new Array(D.length),H=new Array(D.length),z=[];g=j?o:i,F(D,z,D.length,P);for(var K=0;K_&&P[K]0&&D[K-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(D[K])&&(z[K-1]=z[K]=h.R_H,K++);D[D.length-1]===h.DOT&&(z[D.length-1]=h.B),D[0]==="\u202B"&&(z[0]=h.RLE);for(var K=0;K=0&&(l=this.session.$docRowCache[i])}return l},f.prototype.getSplitIndex=function(){var l=0,n=this.session.$screenRowCache;if(n.length)for(var i,o=this.session.$getRowCacheIndex(n,this.currentRow);this.currentRow-l>0&&(i=this.session.$getRowCacheIndex(n,this.currentRow-l-1),i===o);)o=i,l++;else l=this.currentRow;return l},f.prototype.updateRowLine=function(l,n){l===void 0&&(l=this.getDocumentRow());var i=l===this.session.getLength()-1,o=i?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(l),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[l];s&&(n===void 0&&(n=this.getSplitIndex()),n>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=nn?this.session.getOverwrite()?l:l-1:n,o=g.getVisualFromLogicalIdx(i,this.bidiMap),s=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&l<=n&&s[o]%2!=0&&o++;for(var p=0;pn&&s[o]%2==0&&(c+=this.charWidths[s[o]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},f.prototype.getSelections=function(l,n){var i=this.bidiMap,o=i.bidiLevels,s,c=[],p=0,$=Math.min(l,n)-this.wrapIndent,v=Math.max(l,n)-this.wrapIndent,C=!1,y=!1,_=0;this.wrapIndent&&(p+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,E=0;E=$&&bi+c/2;){if(i+=c,o===s.length-1){c=0;break}c=this.charWidths[s[++o]]}return o>0&&s[o-1]%2!=0&&s[o]%2==0?(l0&&s[o-1]%2==0&&s[o]%2!=0?n=1+(l>i?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===s.length-1&&c===0&&s[o-1]%2==0||!this.isRtlDir&&o===0&&s[o]%2!=0?n=1+this.bidiMap.logicalFromVisual[o]:(o>0&&s[o-1]%2!=0&&c!==0&&o--,n=this.bidiMap.logicalFromVisual[o]),n===0&&this.isRtlDir&&n++,n+this.wrapIndent},f}();h.BidiHandler=r}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,h,m){var g=e("./lib/oop"),a=e("./lib/lang"),u=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,f=function(){function l(n){this.session=n,this.doc=n.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")})}return l.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},l.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},l.prototype.getCursor=function(){return this.lead.getPosition()},l.prototype.setAnchor=function(n,i){this.$isEmpty=!1,this.anchor.setPosition(n,i)},l.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},l.prototype.getSelectionLead=function(){return this.lead.getPosition()},l.prototype.isBackwards=function(){var n=this.anchor,i=this.lead;return n.row>i.row||n.row==i.row&&n.column>i.column},l.prototype.getRange=function(){var n=this.anchor,i=this.lead;return this.$isEmpty?r.fromPoints(i,i):this.isBackwards()?r.fromPoints(i,n):r.fromPoints(n,i)},l.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},l.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},l.prototype.setRange=function(n,i){var o=i?n.end:n.start,s=i?n.start:n.end;this.$setSelection(o.row,o.column,s.row,s.column)},l.prototype.$setSelection=function(n,i,o,s){if(!this.$silent){var c=this.$isEmpty,p=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(n,i),this.cursor.setPosition(o,s),this.$isEmpty=!r.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||p)&&this._emit("changeSelection")}},l.prototype.$moveSelection=function(n){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),n.call(this)},l.prototype.selectTo=function(n,i){this.$moveSelection(function(){this.moveCursorTo(n,i)})},l.prototype.selectToPosition=function(n){this.$moveSelection(function(){this.moveCursorToPosition(n)})},l.prototype.moveTo=function(n,i){this.clearSelection(),this.moveCursorTo(n,i)},l.prototype.moveToPosition=function(n){this.clearSelection(),this.moveCursorToPosition(n)},l.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},l.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},l.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},l.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},l.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},l.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},l.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},l.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},l.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},l.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},l.prototype.getWordRange=function(n,i){if(typeof i=="undefined"){var o=n||this.lead;n=o.row,i=o.column}return this.session.getWordRange(n,i)},l.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},l.prototype.selectAWord=function(){var n=this.getCursor(),i=this.session.getAWordRange(n.row,n.column);this.setSelectionRange(i)},l.prototype.getLineRange=function(n,i){var o=typeof n=="number"?n:this.lead.row,s,c=this.session.getFoldLine(o);return c?(o=c.start.row,s=c.end.row):s=o,i===!0?new r(o,0,s,this.session.getLine(s).length):new r(o,0,s+1,0)},l.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},l.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},l.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},l.prototype.wouldMoveIntoSoftTab=function(n,i,o){var s=n.column,c=n.column+i;return o<0&&(s=n.column-i,c=n.column),this.session.isTabStop(n)&&this.doc.getLine(n.row).slice(s,c).split(" ").length-1==i},l.prototype.moveCursorLeft=function(){var n=this.lead.getPosition(),i;if(i=this.session.getFoldAt(n.row,n.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(n.column===0)n.row>0&&this.moveCursorTo(n.row-1,this.doc.getLine(n.row-1).length);else{var o=this.session.getTabSize();this.wouldMoveIntoSoftTab(n,o,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-o):this.moveCursorBy(0,-1)}},l.prototype.moveCursorRight=function(){var n=this.lead.getPosition(),i;if(i=this.session.getFoldAt(n.row,n.column,1))this.moveCursorTo(i.end.row,i.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(i.column=s)}}this.moveCursorTo(i.row,i.column)},l.prototype.moveCursorFileEnd=function(){var n=this.doc.getLength()-1,i=this.doc.getLine(n).length;this.moveCursorTo(n,i)},l.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},l.prototype.moveCursorLongWordRight=function(){var n=this.lead.row,i=this.lead.column,o=this.doc.getLine(n),s=o.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(n,i,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(s)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=o.substring(i)),i>=o.length){this.moveCursorTo(n,o.length),this.moveCursorRight(),n0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(n,i)},l.prototype.$shortWordEndIndex=function(n){var i=0,o,s=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(n))i=this.session.tokenRe.lastIndex;else{for(;(o=n[i])&&s.test(o);)i++;if(i<1){for(c.lastIndex=0;(o=n[i])&&!c.test(o);)if(c.lastIndex=0,i++,s.test(o))if(i>2){i--;break}else{for(;(o=n[i])&&s.test(o);)i++;if(i>2)break}}}return c.lastIndex=0,i},l.prototype.moveCursorShortWordRight=function(){var n=this.lead.row,i=this.lead.column,o=this.doc.getLine(n),s=o.substring(i),c=this.session.getFoldAt(n,i,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(i==o.length){var p=this.doc.getLength();do n++,s=this.doc.getLine(n);while(n0&&/^\s*$/.test(s));i=s.length,/\s+$/.test(s)||(s="")}var c=a.stringReverse(s),p=this.$shortWordEndIndex(c);return this.moveCursorTo(n,i-p)},l.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},l.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},l.prototype.moveCursorBy=function(n,i){var o=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(i===0&&(n!==0&&(this.session.$bidiHandler.isBidiRow(o.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(o.column),o.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=o.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?o.column=this.$desiredColumn:this.$desiredColumn=o.column),n!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];n<0?n-=c.rowsAbove||0:n>0&&(n+=c.rowCount-(c.rowsAbove||0))}var p=this.session.screenToDocumentPosition(o.row+n,o.column,s);n!==0&&i===0&&p.row===this.lead.row&&p.column===this.lead.column,this.moveCursorTo(p.row,p.column+i,i===0)},l.prototype.moveCursorToPosition=function(n){this.moveCursorTo(n.row,n.column)},l.prototype.moveCursorTo=function(n,i,o){var s=this.session.getFoldAt(n,i,1);s&&(n=s.start.row,i=s.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(n);/[\uDC00-\uDFFF]/.test(c.charAt(i))&&c.charAt(i-1)&&(this.lead.row==n&&this.lead.column==i+1?i=i-1:i=i+1),this.lead.setPosition(n,i),this.$keepDesiredColumnOnChange=!1,o||(this.$desiredColumn=null)},l.prototype.moveCursorToScreen=function(n,i,o){var s=this.session.screenToDocumentPosition(n,i);this.moveCursorTo(s.row,s.column,o)},l.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},l.prototype.fromOrientedRange=function(n){this.setSelectionRange(n,n.cursor==n.start),this.$desiredColumn=n.desiredColumn||this.$desiredColumn},l.prototype.toOrientedRange=function(n){var i=this.getRange();return n?(n.start.column=i.start.column,n.start.row=i.start.row,n.end.column=i.end.column,n.end.row=i.end.row):n=i,n.cursor=this.isBackwards()?n.start:n.end,n.desiredColumn=this.$desiredColumn,n},l.prototype.getRangeOfMovements=function(n){var i=this.getCursor();try{n(this);var o=this.getCursor();return r.fromPoints(i,o)}catch{return r.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},l.prototype.toJSON=function(){if(this.rangeCount)var n=this.ranges.map(function(i){var o=i.clone();return o.isBackwards=i.cursor==i.start,o});else{var n=this.getRange();n.isBackwards=this.isBackwards()}return n},l.prototype.fromJSON=function(n){if(n.start==null)if(this.rangeList&&n.length>1){this.toSingleRange(n[0]);for(var i=n.length;i--;){var o=r.fromPoints(n[i].start,n[i].end);n[i].isBackwards&&(o.cursor=o.start),this.addRange(o,!0)}return}else n=n[0];this.rangeList&&this.toSingleRange(n),this.setSelectionRange(n,n.isBackwards)},l.prototype.isEqual=function(n){if((n.length||this.rangeCount)&&n.length!=this.rangeCount)return!1;if(!n.length||!this.ranges)return this.getRange().isEqual(n);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(n[i]))return!1;return!0},l}();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,g.implement(f.prototype,u),h.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,h,m){var g=e("./lib/report_error").reportError,a=2e3,u=function(){function r(f){this.splitRegex,this.states=f,this.regExps={},this.matchMappings={};for(var l in this.states){for(var n=this.states[l],i=[],o=0,s=this.matchMappings[l]={defaultToken:"text"},c="g",p=[],$=0;$1?v.onMatch=this.$applyToken:v.onMatch=v.token),y>1&&(/\\\d/.test(v.regex)?C=v.regex.replace(/\\([0-9]+)/g,function(_,b){return"\\"+(parseInt(b,10)+o+1)}):(y=1,C=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&p.push(v)),s[o]=$,o+=y,i.push(C),v.onMatch||(v.onMatch=null)}}i.length||(s[0]=0,i.push("$")),p.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,c)},this),this.regExps[l]=new RegExp("("+i.join(")|(")+")|($)",c)}}return r.prototype.$setMaxTokenCount=function(f){a=f|0},r.prototype.$applyToken=function(f){var l=this.splitRegex.exec(f).slice(1),n=this.token.apply(this,l);if(typeof n=="string")return[{type:n,value:f}];for(var i=[],o=0,s=n.length;ov){var O=f.substring(v,x-E.length);y.type==_?y.value+=O:(y.type&&$.push(y),y={type:_,value:O})}for(var M=0;Ma){for(C>2*f.length&&this.reportError("infinite loop with in ace tokenizer",{startState:l,line:f});v1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:$,state:n.length?n:i}},r}();u.prototype.reportError=g,h.Tokenizer=u}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,h,m){var g=e("../lib/deep_copy").deepCopy,a;a=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(f,l){if(!l){for(var n in f)this.$rules[n]=f[n];return}for(var n in f){for(var i=f[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,r||(r=this.$session.getLength()),this.$row>=r)return this.$row=r-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},u.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},u.prototype.getCurrentTokenRow=function(){return this.$row},u.prototype.getCurrentTokenColumn=function(){var r=this.$rowTokens,f=this.$tokenIndex,l=r[f].start;if(l!==void 0)return l;for(l=0;f>0;)f-=1,l+=r[f].value.length;return l},u.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},u.prototype.getCurrentTokenRange=function(){var r=this.$rowTokens[this.$tokenIndex],f=this.getCurrentTokenColumn();return new g(this.$row,f,this.$row,f+r.value.length)},u}();h.TokenIterator=a}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,h,m){var g=e("../../lib/oop"),a=e("../behaviour").Behaviour,u=e("../../token_iterator").TokenIterator,r=e("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],n,i={},o={'"':'"',"'":"'"},s=function($){var v=-1;if($.multiSelect&&(v=$.selection.index,i.rangeCount!=$.multiSelect.rangeCount&&(i={rangeCount:$.multiSelect.rangeCount})),i[v])return n=i[v];n=i[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function($,v,C,y){var _=$.end.row-$.start.row;return{text:C+v+y,selection:[0,$.start.column+1,_,$.end.column+(_?0:1)]}},p;p=function($){$=$||{},this.add("braces","insertion",function(v,C,y,_,b){var E=y.getCursorPosition(),x=_.doc.getLine(E.row);if(b=="{"){s(y);var O=y.getSelectionRange(),M=_.doc.getTextRange(O);if(M!==""&&M!=="{"&&y.getWrapBehavioursEnabled())return c(O,M,"{","}");if(p.isSaneInsertion(y,_))return/[\]\}\)]/.test(x[E.column])||y.inMultiSelectMode||$.braces?(p.recordAutoInsert(y,_,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(y,_,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){s(y);var k=x.substring(E.column,E.column+1);if(k=="}"){var T=_.$findOpeningBracket("}",{column:E.column+1,row:E.row});if(T!==null&&p.isAutoInsertedClosing(E,x,b))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==` `||b==`\r `){s(y);var S="";p.isMaybeInsertedClosing(E,x)&&(S=r.stringRepeat("}",n.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var k=x.substring(E.column,E.column+1);if(k==="}"){var w=_.findMatchingBracket({row:E.row,column:E.column+1},"}");if(!w)return null;var L=this.$getIndent(_.getLine(w.row))}else if(S)var L=this.$getIndent(x);else{p.clearMaybeInsertedClosing();return}var q=L+_.getTabString();return{text:` `+q+` `+L+S,selection:[1,q.length,1,q.length]}}else p.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,C,y,_,b){var E=_.doc.getTextRange(b);if(!b.isMultiLine()&&E=="{"){s(y);var x=_.doc.getLine(b.start.row),O=x.substring(b.end.column,b.end.column+1);if(O=="}")return b.end.column++,b;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,C,y,_,b){if(b=="("){s(y);var E=y.getSelectionRange(),x=_.doc.getTextRange(E);if(x!==""&&y.getWrapBehavioursEnabled())return c(E,x,"(",")");if(p.isSaneInsertion(y,_))return p.recordAutoInsert(y,_,")"),{text:"()",selection:[1,1]}}else if(b==")"){s(y);var O=y.getCursorPosition(),M=_.doc.getLine(O.row),k=M.substring(O.column,O.column+1);if(k==")"){var T=_.$findOpeningBracket(")",{column:O.column+1,row:O.row});if(T!==null&&p.isAutoInsertedClosing(O,M,b))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,C,y,_,b){var E=_.doc.getTextRange(b);if(!b.isMultiLine()&&E=="("){s(y);var x=_.doc.getLine(b.start.row),O=x.substring(b.start.column+1,b.start.column+2);if(O==")")return b.end.column++,b}}),this.add("brackets","insertion",function(v,C,y,_,b){if(b=="["){s(y);var E=y.getSelectionRange(),x=_.doc.getTextRange(E);if(x!==""&&y.getWrapBehavioursEnabled())return c(E,x,"[","]");if(p.isSaneInsertion(y,_))return p.recordAutoInsert(y,_,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){s(y);var O=y.getCursorPosition(),M=_.doc.getLine(O.row),k=M.substring(O.column,O.column+1);if(k=="]"){var T=_.$findOpeningBracket("]",{column:O.column+1,row:O.row});if(T!==null&&p.isAutoInsertedClosing(O,M,b))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,C,y,_,b){var E=_.doc.getTextRange(b);if(!b.isMultiLine()&&E=="["){s(y);var x=_.doc.getLine(b.start.row),O=x.substring(b.start.column+1,b.start.column+2);if(O=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(v,C,y,_,b){var E=_.$mode.$quotes||o;if(b.length==1&&E[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;s(y);var x=b,O=y.getSelectionRange(),M=_.doc.getTextRange(O);if(M!==""&&(M.length!=1||!E[M])&&y.getWrapBehavioursEnabled())return c(O,M,x,x);if(!M){var k=y.getCursorPosition(),T=_.doc.getLine(k.row),S=T.substring(k.column-1,k.column),w=T.substring(k.column,k.column+1),L=_.getTokenAt(k.row,k.column),q=_.getTokenAt(k.row,k.column+1);if(S=="\\"&&L&&/escape/.test(L.type))return null;var A=L&&/string|escape/.test(L.type),I=!q||/string|escape/.test(q.type),F;if(w==x)F=A!==I,F&&/string\.end/.test(q.type)&&(F=!1);else{if(A&&!I||A&&I)return null;var V=_.$mode.tokenRe;V.lastIndex=0;var R=V.test(S);V.lastIndex=0;var B=V.test(w),N=_.$mode.$pairQuotesAfter,P=N&&N[x]&&N[x].test(S);if(!P&&R||B||w&&!/[\s;,.})\]\\]/.test(w))return null;var j=T[k.column-2];if(S==x&&(j==x||V.test(j)))return null;F=!0}return{text:F?x+x:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,C,y,_,b){var E=_.$mode.$quotes||o,x=_.doc.getTextRange(b);if(!b.isMultiLine()&&E.hasOwnProperty(x)){s(y);var O=_.doc.getLine(b.start.row),M=O.substring(b.start.column+1,b.start.column+2);if(M==x)return b.end.column++,b}}),$.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,C,y,_,b){if(v==="doc-start"&&(b===` `||b===`\r `)&&y.selection.isEmpty()){var E=y.getCursorPosition(),x=_.doc.getLine(E.row),O=_.doc.getLine(E.row+1),M=this.$getIndent(x);if(/\s*\*/.test(O))return/^\s*\*/.test(x)?{text:b+M+"* ",selection:[1,3+M.length,1,3+M.length]}:{text:b+M+" * ",selection:[1,3+M.length,1,3+M.length]};if(/\/\*\*/.test(x.substring(0,E.column)))return{text:b+M+" * "+b+" "+M+"*/",selection:[1,4+M.length,1,4+M.length]}}})},p.isSaneInsertion=function($,v){var C=$.getCursorPosition(),y=new u(v,C.row,C.column);if(!this.$matchTokenType(y.getCurrentToken()||"text",f)){if(/[)}\]]/.test($.session.getLine(C.row)[C.column]))return!0;var _=new u(v,C.row,C.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",f))return!1}return y.stepForward(),y.getCurrentTokenRow()!==C.row||this.$matchTokenType(y.getCurrentToken()||"text",l)},p.$matchTokenType=function($,v){return v.indexOf($.type||$)>-1},p.recordAutoInsert=function($,v,C){var y=$.getCursorPosition(),_=v.doc.getLine(y.row);this.isAutoInsertedClosing(y,_,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=y.row,n.autoInsertedLineEnd=C+_.substr(y.column),n.autoInsertedBrackets++},p.recordMaybeInsert=function($,v,C){var y=$.getCursorPosition(),_=v.doc.getLine(y.row);this.isMaybeInsertedClosing(y,_)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=y.row,n.maybeInsertedLineStart=_.substr(0,y.column)+C,n.maybeInsertedLineEnd=_.substr(y.column),n.maybeInsertedBrackets++},p.isAutoInsertedClosing=function($,v,C){return n.autoInsertedBrackets>0&&$.row===n.autoInsertedRow&&C===n.autoInsertedLineEnd[0]&&v.substr($.column)===n.autoInsertedLineEnd},p.isMaybeInsertedClosing=function($,v){return n.maybeInsertedBrackets>0&&$.row===n.maybeInsertedRow&&v.substr($.column)===n.maybeInsertedLineEnd&&v.substr(0,$.column)==n.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},g.inherits(p,a),h.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,h,m){for(var g=[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],a=0,u=[],r=0;r2?j%b!=b-1:j%b==0}}else{if(!this.blockComment)return!1;var x=this.blockComment.start,O=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+l.escapeRegExp(x)+")"),k=new RegExp("(?:"+l.escapeRegExp(O)+")\\s*$"),T=function(F,V){w(F,V)||(!C||/\S/.test(F))&&(v.insertInLine({row:V,column:F.length},O),v.insertInLine({row:V,column:_},x))},S=function(F,V){var R;(R=F.match(k))&&v.removeInLine(V,F.length-R[0].length,F.length),(R=F.match(M))&&v.removeInLine(V,R[1].length,R[0].length)},w=function(F,V){if(M.test(F))return!0;for(var R=c.getTokens(V),B=0;BF.length&&(I=F.length)}),_==1/0&&(_=I,C=!1,y=!1),E&&_%b!=0&&(_=Math.floor(_/b)*b),A(y?S:T)},this.toggleBlockComment=function(s,c,p,$){var v=this.blockComment;if(!!v){!v.start&&v[0]&&(v=v[0]);var C=new n(c,$.row,$.column),y=C.getCurrentToken();c.selection;var _=c.selection.toOrientedRange(),b,E;if(y&&/comment/.test(y.type)){for(var x,O;y&&/comment/.test(y.type);){var M=y.value.indexOf(v.start);if(M!=-1){var k=C.getCurrentTokenRow(),T=C.getCurrentTokenColumn()+M;x=new i(k,T,k,T+v.start.length);break}y=C.stepBackward()}for(var C=new n(c,$.row,$.column),y=C.getCurrentToken();y&&/comment/.test(y.type);){var M=y.value.indexOf(v.end);if(M!=-1){var k=C.getCurrentTokenRow(),T=C.getCurrentTokenColumn()+M;O=new i(k,T,k,T+v.end.length);break}y=C.stepForward()}O&&c.remove(O),x&&(c.remove(x),b=x.start.row,E=-v.start.length)}else E=v.start.length,b=p.start.row,c.insert(p.end,v.end),c.insert(p.start,v.start);_.start.row==b&&(_.start.column+=E),_.end.row==b&&(_.end.column+=E),c.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(s,c,p){return this.$getIndent(c)},this.checkOutdent=function(s,c,p){return!1},this.autoOutdent=function(s,c,p){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var c in s)if(s[c]){var p=s[c],$=p.prototype.$id,v=g.$modes[$];v||(g.$modes[$]=v=new p),g.$modes[c]||(g.$modes[c]=v),this.$embeds.push(c),this.$modes[c]=v}for(var C=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],y=function(b){(function(E){var x=C[b],O=E[x];E[C[b]]=function(){return this.$delegator(x,arguments,O)}})(_)},_=this,c=0;cthis.row)){var i=f(n,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},l.prototype.setPosition=function(n,i,o){var s;if(o?s={row:n,column:i}:s=this.$clipPositionToDocument(n,i),!(this.row==s.row&&this.column==s.column)){var c={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:c,value:s})}},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,i){var o={};return n>=this.document.getLength()?(o.row=Math.max(0,this.document.getLength()-1),o.column=this.document.getLine(o.row).length):n<0?(o.row=0,o.column=0):(o.row=n,o.column=Math.min(this.document.getLine(o.row).length,Math.max(0,i))),i<0&&(o.column=0),o},l}();u.prototype.$insertRight=!1,g.implement(u.prototype,a);function r(l,n,i){var o=i?l.column<=n.column:l.column=s&&(i=s-1,o=void 0);var c=this.getLine(i);return o==null&&(o=c.length),o=Math.min(Math.max(o,0),c.length),{row:i,column:o}},n.prototype.clonePos=function(i){return{row:i.row,column:i.column}},n.prototype.pos=function(i,o){return{row:i,column:o}},n.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},n.prototype.insertFullLines=function(i,o){i=Math.min(Math.max(i,0),this.getLength());var s=0;i0,c=o=0&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},n.prototype.replace=function(i,o){if(i instanceof r||(i=r.fromPoints(i.start,i.end)),o.length===0&&i.isEmpty())return i.start;if(o==this.getTextRange(i))return i.end;this.remove(i);var s;return o?s=this.insert(i.start,o):s=i.start,s},n.prototype.applyDeltas=function(i){for(var o=0;o=0;o--)this.revertDelta(i[o])},n.prototype.applyDelta=function(i,o){var s=i.action=="insert";(s?i.lines.length<=1&&!i.lines[0]:!r.comparePoints(i.start,i.end))||(s&&i.lines.length>2e4?this.$splitAndapplyLargeDelta(i,2e4):(a(this.$lines,i,o),this._signal("change",i)))},n.prototype.$safeApplyDelta=function(i){var o=this.$lines.length;(i.action=="remove"&&i.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=o,s==-1&&(s=o),p<=s&&n.fireUpdateEvent(p,s)}}}return r.prototype.setTokenizer=function(f){this.tokenizer=f,this.lines=[],this.states=[],this.start(0)},r.prototype.setDocument=function(f){this.doc=f,this.lines=[],this.states=[],this.stop()},r.prototype.fireUpdateEvent=function(f,l){var n={first:f,last:l};this._signal("update",{data:n})},r.prototype.start=function(f){this.currentLine=Math.min(f||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)},r.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},r.prototype.$updateOnChange=function(f){var l=f.start.row,n=f.end.row-l;if(n===0)this.lines[l]=null;else if(f.action=="remove")this.lines.splice(l,n+1,null),this.states.splice(l,n+1,null);else{var i=Array(n+1);i.unshift(l,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(l,this.currentLine,this.doc.getLength()),this.stop()},r.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},r.prototype.getTokens=function(f){return this.lines[f]||this.$tokenizeRow(f)},r.prototype.getState=function(f){return this.currentLine==f&&this.$tokenizeRow(f),this.states[f]||"start"},r.prototype.$tokenizeRow=function(f){var l=this.doc.getLine(f),n=this.states[f-1],i=this.tokenizer.getLineTokens(l,n,f);return this.states[f]+""!=i.state+""?(this.states[f]=i.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=i.tokens},r.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},r}();g.implement(u.prototype,a),h.BackgroundTokenizer=u}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,h,m){var g=e("./lib/lang"),a=e("./range").Range,u=function(){function r(f,l,n){n===void 0&&(n="text"),this.setRegexp(f),this.clazz=l,this.type=n}return r.prototype.setRegexp=function(f){this.regExp+""!=f+""&&(this.regExp=f,this.cache=[])},r.prototype.update=function(f,l,n,i){if(!!this.regExp)for(var o=i.firstRow,s=i.lastRow,c={},p=o;p<=s;p++){var $=this.cache[p];$==null&&($=g.getMatchOffsets(n.getLine(p),this.regExp),$.length>this.MAX_RANGES&&($=$.slice(0,this.MAX_RANGES)),$=$.map(function(_){return new a(p,_.offset,p,_.offset+_.length)}),this.cache[p]=$.length?$:"");for(var v=$.length;v--;){var C=$[v].toScreenRange(n),y=C.toString();c[y]||(c[y]=!0,l.drawSingleLineMarker(f,C,this.clazz,i))}}},r}();u.prototype.MAX_RANGES=500,h.SearchHighlight=u}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,h,m){var g=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(b){this.$session=b},_.prototype.add=function(b,E,x){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),E===!1||!this.lastDeltas){this.lastDeltas=[];var O=this.$undoStack.length;O>this.$undoDepth-1&&this.$undoStack.splice(0,O-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},_.prototype.addSelection=function(b,E){this.selections.push({value:b,rev:E||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(b,E){E==null&&(E=this.$rev+1);for(var x=this.$undoStack,O=x.length;O--;){var M=x[O][0];if(M.id<=b)break;M.id0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},_.prototype.$prettyPrint=function(b){return b?n(b):n(this.$undoStack)+` --- `+n(this.$redoStack)},_}();g.prototype.hasUndo=g.prototype.canUndo,g.prototype.hasRedo=g.prototype.canRedo,g.prototype.isClean=g.prototype.isAtBookmark,g.prototype.markClean=g.prototype.bookmark;function a(_,b){for(var E=b;E--;){var x=_[E];if(x&&!x[0].ignore){for(;E"+_.end.row+":"+_.end.column}function o(_,b){var E=_.action=="insert",x=b.action=="insert";if(E&&x)if(r(b.start,_.end)>=0)p(b,_,-1);else if(r(b.start,_.start)<=0)p(_,b,1);else return null;else if(E&&!x)if(r(b.start,_.end)>=0)p(b,_,-1);else if(r(b.end,_.start)<=0)p(_,b,-1);else return null;else if(!E&&x)if(r(b.start,_.start)>=0)p(b,_,1);else if(r(b.start,_.start)<=0)p(_,b,1);else return null;else if(!E&&!x)if(r(b.start,_.start)>=0)p(b,_,1);else if(r(b.end,_.start)<=0)p(_,b,-1);else return null;return[b,_]}function s(_,b){for(var E=_.length;E--;)for(var x=0;x=0?p(_,b,-1):(r(_.start,b.start)<=0||p(_,u.fromPoints(b.start,_.start),-1),p(b,_,1));else if(!E&&x)r(b.start,_.end)>=0?p(b,_,-1):(r(b.start,_.start)<=0||p(b,u.fromPoints(_.start,b.start),-1),p(_,b,1));else if(!E&&!x)if(r(b.start,_.end)>=0)p(b,_,-1);else if(r(b.end,_.start)<=0)p(_,b,-1);else{var O,M;return r(_.start,b.start)<0&&(O=_,_=v(_,b.start)),r(_.end,b.end)>0&&(M=v(_,b.end)),$(b.end,_.start,_.end,-1),M&&!O&&(_.lines=M.lines,_.start=M.start,_.end=M.end,M=_),[b,O,M].filter(Boolean)}return[b,_]}function p(_,b,E){$(_.start,b.start,b.end,E),$(_.end,b.start,b.end,E)}function $(_,b,E,x){_.row==(x==1?b:E).row&&(_.column+=x*(E.column-b.column)),_.row+=x*(E.row-b.row)}function v(_,b){var E=_.lines,x=_.end;_.end=f(b);var O=_.end.row-_.start.row,M=E.splice(O,E.length),k=O?b.column:b.column-_.start.column;E.push(M[0].substring(0,k)),M[0]=M[0].substr(k);var T={start:f(b),end:x,lines:M,action:_.action};return T}function C(_,b){b=l(b);for(var E=_.length;E--;){for(var x=_[E],O=0;Othis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(r),this.folds.sort(function(f,l){return-f.range.compareEnd(l.start.row,l.start.column)}),this.range.compareEnd(r.start.row,r.start.column)>0?(this.end.row=r.end.row,this.end.column=r.end.column):this.range.compareStart(r.end.row,r.end.column)<0&&(this.start.row=r.start.row,this.start.column=r.start.column)}else if(r.start.row==this.end.row)this.folds.push(r),this.end.row=r.end.row,this.end.column=r.end.column;else if(r.end.row==this.start.row)this.folds.unshift(r),this.start.row=r.start.row,this.start.column=r.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");r.foldLine=this},u.prototype.containsRow=function(r){return r>=this.start.row&&r<=this.end.row},u.prototype.walk=function(r,f,l){var n=0,i=this.folds,o,s,c,p=!0;f==null&&(f=this.end.row,l=this.end.column);for(var $=0;$0)){var p=a(f,s.start);return c===0?l&&p!==0?-o-2:o:p>0||p===0&&!l?o:-o-1}}return-o-1},r.prototype.add=function(f){var l=!f.isEmpty(),n=this.pointIndex(f.start,l);n<0&&(n=-n-1);var i=this.pointIndex(f.end,l,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,f)},r.prototype.addList=function(f){for(var l=[],n=f.length;n--;)l.push.apply(l,this.add(f[n]));return l},r.prototype.substractPoint=function(f){var l=this.pointIndex(f);if(l>=0)return this.ranges.splice(l,1)},r.prototype.merge=function(){var f=[],l=this.ranges;l=l.sort(function(c,p){return a(c.start,p.start)});for(var n=l[0],i,o=1;o=0},r.prototype.containsPoint=function(f){return this.pointIndex(f)>=0},r.prototype.rangeAtPoint=function(f){var l=this.pointIndex(f);if(l>=0)return this.ranges[l]},r.prototype.clipRows=function(f,l){var n=this.ranges;if(n[0].start.row>l||n[n.length-1].start.row=i)break}if(f.action=="insert")for(var v=o-i,C=-l.column+n.column;ci)break;if($.start.row==i&&$.start.column>=l.column&&($.start.column==l.column&&this.$bias<=0||($.start.column+=C,$.start.row+=v)),$.end.row==i&&$.end.column>=l.column){if($.end.column==l.column&&this.$bias<0)continue;$.end.column==l.column&&C>0&&c$.start.column&&$.end.column==s[c+1].start.column&&($.end.column-=C),$.end.column+=C,$.end.row+=v}}else for(var v=i-o,C=l.column-n.column;co)break;$.end.rowl.column)&&($.end.column=l.column,$.end.row=l.row):($.end.column+=C,$.end.row+=v):$.end.row>o&&($.end.row+=v),$.start.rowl.column)&&($.start.column=l.column,$.start.row=l.row):($.start.column+=C,$.start.row+=v):$.start.row>o&&($.start.row+=v)}if(v!=0&&c=n)return c;if(c.end.row>n)return null}return null},this.getNextFoldLine=function(n,i){var o=this.$foldData,s=0;for(i&&(s=o.indexOf(i)),s==-1&&(s=0),s;s=n)return c}return null},this.getFoldedRowCount=function(n,i){for(var o=this.$foldData,s=i-n+1,c=0;c=i){v=n?s-=i-v:s=0);break}else $>=n&&(v>=n?s-=$-v:s-=$-n+1)}return s},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort(function(i,o){return i.start.row-o.start.row}),n},this.addFold=function(n,i){var o=this.$foldData,s=!1,c;n instanceof u?c=n:(c=new u(i,n),c.collapseChildren=i.collapseChildren),this.$clipRangeToDocument(c.range);var p=c.start.row,$=c.start.column,v=c.end.row,C=c.end.column,y=this.getFoldAt(p,$,1),_=this.getFoldAt(v,C,-1);if(y&&_==y)return y.addSubFold(c);y&&!y.range.isStart(p,$)&&this.removeFold(y),_&&!_.range.isEnd(v,C)&&this.removeFold(_);var b=this.getFoldsInRange(c.range);b.length>0&&(this.removeFolds(b),c.collapseChildren||b.forEach(function(M){c.addSubFold(M)}));for(var E=0;E0&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1),n.subFolds=[]},this.expandFolds=function(n){n.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(n,i){var o,s;if(n==null)o=new g(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof n=="number")o=new g(n,0,n,this.getLine(n).length);else if("row"in n)o=g.fromPoints(n,n);else{if(Array.isArray(n))return s=[],n.forEach(function(p){s=s.concat(this.unfold(p))},this),s;o=n}s=this.getFoldsInRangeList(o);for(var c=s;s.length==1&&g.comparePoints(s[0].start,o.start)<0&&g.comparePoints(s[0].end,o.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(o);if(i!=!1?this.removeFolds(s):this.expandFolds(s),c.length)return c},this.isRowFolded=function(n,i){return!!this.getFoldLine(n,i)},this.getRowFoldEnd=function(n,i){var o=this.getFoldLine(n,i);return o?o.end.row:n},this.getRowFoldStart=function(n,i){var o=this.getFoldLine(n,i);return o?o.start.row:n},this.getFoldDisplayLine=function(n,i,o,s,c){s==null&&(s=n.start.row),c==null&&(c=0),i==null&&(i=n.end.row),o==null&&(o=this.getLine(i).length);var p=this.doc,$="";return n.walk(function(v,C,y,_){if(!(CC)break;while(c&&$.test(c.type)&&!/^comment.start/.test(c.type));c=s.stepBackward()}else c=s.getCurrentToken();return v.end.row=s.getCurrentTokenRow(),v.end.column=s.getCurrentTokenColumn(),/^comment.end/.test(c.type)||(v.end.column+=c.value.length-2),v}},this.foldAll=function(n,i,o,s){o==null&&(o=1e5);var c=this.foldWidgets;if(!!c){i=i||this.getLength(),n=n||0;for(var p=n;p=n&&(p=$.end.row,$.collapseChildren=o,this.addFold("...",$))}}},this.foldToLevel=function(n){for(this.foldAll();n-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var n=this;this.foldAll(null,null,null,function(i){for(var o=n.getTokens(i),s=0;s=0;){var p=o[s];if(p==null&&(p=o[s]=this.getFoldWidget(s)),p=="start"){var $=this.getFoldWidgetRange(s);if(c||(c=$),$&&$.end.row>=n)break}s--}return{range:s!==-1&&$,firstRange:c}},this.onFoldWidgetClick=function(n,i){i instanceof f&&(i=i.domEvent);var o={children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey},s=this.$toggleFoldWidget(n,o);if(!s){var c=i.target||i.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(n,i){if(!!this.getFoldWidget){var o=this.getFoldWidget(n),s=this.getLine(n),c=o==="end"?-1:1,p=this.getFoldAt(n,c===-1?0:s.length,c);if(p)return i.children||i.all?this.removeFold(p):this.expandFold(p),p;var $=this.getFoldWidgetRange(n,!0);if($&&!$.isMultiLine()&&(p=this.getFoldAt($.start.row,$.start.column,1),p&&$.isEqual(p.range)))return this.removeFold(p),p;if(i.siblings){var v=this.getParentFoldRangeData(n);if(v.range)var C=v.range.start.row+1,y=v.range.end.row;this.foldAll(C,y,i.all?1e4:0)}else i.children?(y=$?$.end.row:this.getLength(),this.foldAll(n+1,y,i.all?1e4:0)):$&&(i.all&&($.collapseChildren=1e4),this.addFold("...",$));return $}},this.toggleFoldWidget=function(n){var i=this.selection.getCursor().row;i=this.getRowFoldStart(i);var o=this.$toggleFoldWidget(i,{});if(!o){var s=this.getParentFoldRangeData(i,!0);if(o=s.range||s.firstRange,o){i=o.start.row;var c=this.getFoldAt(i,this.getLine(i).length,1);c?this.removeFold(c):this.addFold("...",o)}}},this.updateFoldWidgets=function(n){var i=n.start.row,o=n.end.row-i;if(o===0)this.foldWidgets[i]=null;else if(n.action=="remove")this.foldWidgets.splice(i,o+1,null);else{var s=Array(o+1);s.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(n){var i=n.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length)}}h.Folding=l}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,h,m){var g=e("../token_iterator").TokenIterator,a=e("../range").Range;function u(){this.findMatchingBracket=function(r,f){if(r.column==0)return null;var l=f||this.getLine(r.row).charAt(r.column-1);if(l=="")return null;var n=l.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],r):this.$findOpeningBracket(n[2],r):null},this.getBracketRange=function(r){var f=this.getLine(r.row),l=!0,n,i=f.charAt(r.column-1),o=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(o||(i=f.charAt(r.column),r={row:r.row,column:r.column+1},o=i&&i.match(/([\(\[\{])|([\)\]\}])/),l=!1),!o)return null;if(o[1]){var s=this.$findClosingBracket(o[1],r);if(!s)return null;n=a.fromPoints(r,s),l||(n.end.column++,n.start.column--),n.cursor=n.end}else{var s=this.$findOpeningBracket(o[2],r);if(!s)return null;n=a.fromPoints(s,r),l||(n.start.column++,n.end.column--),n.cursor=n.start}return n},this.getMatchingBracketRanges=function(r,f){var l=this.getLine(r.row),n=/([\(\[\{])|([\)\]\}])/,i=!f&&l.charAt(r.column-1),o=i&&i.match(n);if(o||(i=(f===void 0||f)&&l.charAt(r.column),r={row:r.row,column:r.column+1},o=i&&i.match(n)),!o)return null;var s=new a(r.row,r.column-1,r.row,r.column),c=o[1]?this.$findClosingBracket(o[1],r):this.$findOpeningBracket(o[2],r);if(!c)return[s];var p=new a(c.row,c.column,c.row,c.column+1);return[s,p]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(r,f,l){var n=this.$brackets[r],i=1,o=new g(this,f.row,f.column),s=o.getCurrentToken();if(s||(s=o.stepForward()),!!s){l||(l=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=f.column-o.getCurrentTokenColumn()-2,p=s.value;;){for(;c>=0;){var $=p.charAt(c);if($==n){if(i-=1,i==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else $==r&&(i+=1);c-=1}do s=o.stepBackward();while(s&&!l.test(s.type));if(s==null)break;p=s.value,c=p.length-1}return null}},this.$findClosingBracket=function(r,f,l){var n=this.$brackets[r],i=1,o=new g(this,f.row,f.column),s=o.getCurrentToken();if(s||(s=o.stepForward()),!!s){l||(l=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=f.column-o.getCurrentTokenColumn();;){for(var p=s.value,$=p.length;c<$;){var v=p.charAt(c);if(v==n){if(i-=1,i==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else v==r&&(i+=1);c+=1}do s=o.stepForward();while(s&&!l.test(s.type));if(s==null)break;c=0}return null}},this.getMatchingTags=function(r){var f=new g(this,r.row,r.column),l=this.$findTagName(f);if(!!l){var n=f.stepBackward();return n.value==="<"?this.$findClosingTag(f,l):this.$findOpeningTag(f,l)}},this.$findTagName=function(r){var f=r.getCurrentToken(),l=!1,n=!1;if(f&&f.type.indexOf("tag-name")===-1)do n?f=r.stepBackward():f=r.stepForward(),f&&(f.value==="/>"?n=!0:f.type.indexOf("tag-name")!==-1&&(l=!0));while(f&&!l);return f},this.$findClosingTag=function(r,f){var l,n=f.value,i=f.value,o=0,s=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1);f=r.stepForward();var c=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+f.value.length),p=!1;do if(l=f,f=r.stepForward(),f){if(f.value===">"&&!p){var $=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1);p=!0}if(f.type.indexOf("tag-name")!==-1){if(n=f.value,i===n){if(l.value==="<")o++;else if(l.value==="")var y=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1);else return}}}else if(i===n&&f.value==="/>"&&(o--,o<0))var v=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+2),C=v,y=C,$=new a(c.end.row,c.end.column,c.end.row,c.end.column+1)}while(f&&o>=0);if(s&&$&&v&&y&&c&&C)return{openTag:new a(s.start.row,s.start.column,$.end.row,$.end.column),closeTag:new a(v.start.row,v.start.column,y.end.row,y.end.column),openTagName:c,closeTagName:C}},this.$findOpeningTag=function(r,f){var l=r.getCurrentToken(),n=f.value,i=0,o=r.getCurrentTokenRow(),s=r.getCurrentTokenColumn(),c=s+2,p=new a(o,s,o,c);r.stepForward();var $=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+f.value.length);if(f=r.stepForward(),!(!f||f.value!==">")){var v=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1);r.stepBackward(),r.stepBackward();do if(f=l,o=r.getCurrentTokenRow(),s=r.getCurrentTokenColumn(),c=s+f.value.length,l=r.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(n===f.value)if(l.value==="<"){if(i++,i>0){var C=new a(o,s,o,c),y=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1);do f=r.stepForward();while(f&&f.value!==">");var _=new a(r.getCurrentTokenRow(),r.getCurrentTokenColumn(),r.getCurrentTokenRow(),r.getCurrentTokenColumn()+1)}}else l.value===""){for(var b=0,E=l;E;){if(E.type.indexOf("tag-name")!==-1&&E.value===n){i--;break}else if(E.value==="<")break;E=r.stepBackward(),b++}for(var x=0;xw&&(this.$docRowCache.splice(w,S),this.$screenRowCache.splice(w,S))},k.prototype.$getRowCacheIndex=function(T,S){for(var w=0,L=T.length-1;w<=L;){var q=w+L>>1,A=T[q];if(S>A)w=q+1;else if(S=S));A++);return L=w[A],L?(L.index=A,L.start=q-L.value.length,L):null},k.prototype.setUndoManager=function(T){if(this.$undoManager=T,this.$informUndoManager&&this.$informUndoManager.cancel(),T){var S=this;T.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=a.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},k.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},k.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},k.prototype.getTabString=function(){return this.getUseSoftTabs()?a.stringRepeat(" ",this.getTabSize()):" "},k.prototype.setUseSoftTabs=function(T){this.setOption("useSoftTabs",T)},k.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},k.prototype.setTabSize=function(T){this.setOption("tabSize",T)},k.prototype.getTabSize=function(){return this.$tabSize},k.prototype.isTabStop=function(T){return this.$useSoftTabs&&T.column%this.$tabSize==0},k.prototype.setNavigateWithinSoftTabs=function(T){this.setOption("navigateWithinSoftTabs",T)},k.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},k.prototype.setOverwrite=function(T){this.setOption("overwrite",T)},k.prototype.getOverwrite=function(){return this.$overwrite},k.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},k.prototype.addGutterDecoration=function(T,S){this.$decorations[T]||(this.$decorations[T]=""),this.$decorations[T]+=" "+S,this._signal("changeBreakpoint",{})},k.prototype.removeGutterDecoration=function(T,S){this.$decorations[T]=(this.$decorations[T]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},k.prototype.getBreakpoints=function(){return this.$breakpoints},k.prototype.setBreakpoints=function(T){this.$breakpoints=[];for(var S=0;S0&&(L=!!w.charAt(S-1).match(this.tokenRe)),L||(L=!!w.charAt(S).match(this.tokenRe)),L)var q=this.tokenRe;else if(/^\s+$/.test(w.slice(S-1,S+1)))var q=/\s/;else var q=this.nonTokenRe;var A=S;if(A>0){do A--;while(A>=0&&w.charAt(A).match(q));A++}for(var I=S;IT&&(T=S.screenWidth)}),this.lineWidgetWidth=T},k.prototype.$computeWidth=function(T){if(this.$modified||T){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var S=this.doc.getAllLines(),w=this.$rowLengthCache,L=0,q=0,A=this.$foldData[q],I=A?A.start.row:1/0,F=S.length,V=0;VI){if(V=A.end.row+1,V>=F)break;A=this.$foldData[q++],I=A?A.start.row:1/0}w[V]==null&&(w[V]=this.$getStringScreenWidth(S[V])[0]),w[V]>L&&(L=w[V])}this.screenWidth=L}},k.prototype.getLine=function(T){return this.doc.getLine(T)},k.prototype.getLines=function(T,S){return this.doc.getLines(T,S)},k.prototype.getLength=function(){return this.doc.getLength()},k.prototype.getTextRange=function(T){return this.doc.getTextRange(T||this.selection.getRange())},k.prototype.insert=function(T,S){return this.doc.insert(T,S)},k.prototype.remove=function(T){return this.doc.remove(T)},k.prototype.removeFullLines=function(T,S){return this.doc.removeFullLines(T,S)},k.prototype.undoChanges=function(T,S){if(!!T.length){this.$fromUndo=!0;for(var w=T.length-1;w!=-1;w--){var L=T[w];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!S&&this.$undoSelect&&(T.selectionBefore?this.selection.fromJSON(T.selectionBefore):this.selection.setRange(this.$getUndoSelection(T,!0))),this.$fromUndo=!1}},k.prototype.redoChanges=function(T,S){if(!!T.length){this.$fromUndo=!0;for(var w=0;wT.end.column&&(A.start.column+=F),A.end.row==T.end.row&&A.end.column>T.end.column&&(A.end.column+=F)),I&&A.start.row>=T.end.row&&(A.start.row+=I,A.end.row+=I)}if(A.end=this.insert(A.start,L),q.length){var V=T.start,R=A.start,I=R.row-V.row,F=R.column-V.column;this.addFolds(q.map(function(P){return P=P.clone(),P.start.row==V.row&&(P.start.column+=F),P.end.row==V.row&&(P.end.column+=F),P.start.row+=I,P.end.row+=I,P}))}return A},k.prototype.indentRows=function(T,S,w){w=w.replace(/\t/g,this.getTabString());for(var L=T;L<=S;L++)this.doc.insertInLine({row:L,column:0},w)},k.prototype.outdentRows=function(T){for(var S=T.collapseRows(),w=new i(0,0,0,0),L=this.getTabSize(),q=S.start.row;q<=S.end.row;++q){var A=this.getLine(q);w.start.row=q,w.end.row=q;for(var I=0;I0){var L=this.getRowFoldEnd(S+w);if(L>this.doc.getLength()-1)return 0;var q=L-S}else{T=this.$clipRowToDocument(T),S=this.$clipRowToDocument(S);var q=S-T+1}var A=new i(T,0,S,Number.MAX_VALUE),I=this.getFoldsInRange(A).map(function(V){return V=V.clone(),V.start.row+=q,V.end.row+=q,V}),F=w==0?this.doc.getLines(T,S):this.doc.removeFullLines(T,S);return this.doc.insertFullLines(T+q,F),I.length&&this.addFolds(I),q},k.prototype.moveLinesUp=function(T,S){return this.$moveLines(T,S,-1)},k.prototype.moveLinesDown=function(T,S){return this.$moveLines(T,S,1)},k.prototype.duplicateLines=function(T,S){return this.$moveLines(T,S,0)},k.prototype.$clipRowToDocument=function(T){return Math.max(0,Math.min(T,this.doc.getLength()-1))},k.prototype.$clipColumnToRow=function(T,S){return S<0?0:Math.min(this.doc.getLine(T).length,S)},k.prototype.$clipPositionToDocument=function(T,S){if(S=Math.max(0,S),T<0)T=0,S=0;else{var w=this.doc.getLength();T>=w?(T=w-1,S=this.doc.getLine(w-1).length):S=Math.min(this.doc.getLine(T).length,S)}return{row:T,column:S}},k.prototype.$clipRangeToDocument=function(T){T.start.row<0?(T.start.row=0,T.start.column=0):T.start.column=this.$clipColumnToRow(T.start.row,T.start.column);var S=this.doc.getLength()-1;return T.end.row>S?(T.end.row=S,T.end.column=this.doc.getLine(S).length):T.end.column=this.$clipColumnToRow(T.end.row,T.end.column),T},k.prototype.setUseWrapMode=function(T){if(T!=this.$useWrapMode){if(this.$useWrapMode=T,this.$modified=!0,this.$resetRowCache(0),T){var S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},k.prototype.getUseWrapMode=function(){return this.$useWrapMode},k.prototype.setWrapLimitRange=function(T,S){(this.$wrapLimitRange.min!==T||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:T,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},k.prototype.adjustWrapLimit=function(T,S){var w=this.$wrapLimitRange;w.max<0&&(w={min:S,max:S});var L=this.$constrainWrapLimit(T,w.min,w.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},k.prototype.$constrainWrapLimit=function(T,S,w){return S&&(T=Math.max(S,T)),w&&(T=Math.min(w,T)),T},k.prototype.getWrapLimit=function(){return this.$wrapLimit},k.prototype.setWrapLimit=function(T){this.setWrapLimitRange(T,T)},k.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},k.prototype.$updateInternalDataOnChange=function(T){var S=this.$useWrapMode,w=T.action,L=T.start,q=T.end,A=L.row,I=q.row,F=I-A,V=null;if(this.$updating=!0,F!=0)if(w==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(A,F);var R=this.$foldData;V=this.getFoldsInRange(T),this.removeFolds(V);var B=this.getFoldLine(q.row),N=0;if(B){B.addRemoveChars(q.row,q.column,L.column-q.column),B.shiftRow(-F);var P=this.getFoldLine(A);P&&P!==B&&(P.merge(B),B=P),N=R.indexOf(B)+1}for(N;N=q.row&&B.shiftRow(-F)}I=A}else{var j=Array(F);j.unshift(A,0);var D=S?this.$wrapData:this.$rowLengthCache;D.splice.apply(D,j);var R=this.$foldData,B=this.getFoldLine(A),N=0;if(B){var W=B.range.compareInside(L.row,L.column);W==0?(B=B.split(L.row,L.column),B&&(B.shiftRow(F),B.addRemoveChars(I,0,q.column-L.column))):W==-1&&(B.addRemoveChars(A,0,q.column-L.column),B.shiftRow(F)),N=R.indexOf(B)+1}for(N;N=A&&B.shiftRow(F)}}else{F=Math.abs(T.start.column-T.end.column),w==="remove"&&(V=this.getFoldsInRange(T),this.removeFolds(V),F=-F);var B=this.getFoldLine(A);B&&B.addRemoveChars(A,L.column,F)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(A,I):this.$updateRowLengthCache(A,I),V},k.prototype.$updateRowLengthCache=function(T,S){this.$rowLengthCache[T]=null,this.$rowLengthCache[S]=null},k.prototype.$updateWrapData=function(T,S){var w=this.doc.getAllLines(),L=this.getTabSize(),q=this.$wrapData,A=this.$wrapLimit,I,F,V=T;for(S=Math.min(S,w.length-1);V<=S;)F=this.getFoldLine(V,F),F?(I=[],F.walk(function(R,B,N,P){var j;if(R!=null){j=this.$getDisplayTokens(R,I.length),j[0]=y;for(var D=1;DS-P;){var j=A+S-P;if(T[j-1]>=E&&T[j]>=E){N(j);continue}if(T[j]==y||T[j]==_){for(j;j!=A-1&&T[j]!=y;j--);if(j>A){N(j);continue}for(j=A+S,j;j>2)),A-1);j>D&&T[j]D&&T[j]D&&T[j]==b;)j--}else for(;j>D&&T[j]D){N(++j);continue}j=A+S,T[j]==C&&j--,N(j-P)}return L},k.prototype.$getDisplayTokens=function(T,S){var w=[],L;S=S||0;for(var q=0;q39&&A<48||A>57&&A<64?w.push(b):A>=4352&&M(A)?w.push(v,C):w.push(v)}return w},k.prototype.$getStringScreenWidth=function(T,S,w){if(S==0)return[0,0];S==null&&(S=1/0),w=w||0;var L,q;for(q=0;q=4352&&M(L)?w+=2:w+=1,!(w>S));q++);return[w,q]},k.prototype.getRowLength=function(T){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[T]&&this.lineWidgets[T].rowCount||0),!this.$useWrapMode||!this.$wrapData[T]?S:this.$wrapData[T].length+S},k.prototype.getRowLineCount=function(T){return!this.$useWrapMode||!this.$wrapData[T]?1:this.$wrapData[T].length+1},k.prototype.getRowWrapIndent=function(T){if(this.$useWrapMode){var S=this.screenToDocumentPosition(T,Number.MAX_VALUE),w=this.$wrapData[S.row];return w.length&&w[0]=0)var F=R[B],q=this.$docRowCache[B],P=T>R[N-1];else var P=!N;for(var j=this.getLength()-1,D=this.getNextFoldLine(q),W=D?D.start.row:1/0;F<=T&&(V=this.getRowLength(q),!(F+V>T||q>=j));)F+=V,q++,q>W&&(q=D.end.row+1,D=this.getNextFoldLine(q,D),W=D?D.start.row:1/0),P&&(this.$docRowCache.push(q),this.$screenRowCache.push(F));if(D&&D.start.row<=q)L=this.getFoldDisplayLine(D),q=D.start.row;else{if(F+V<=T||q>j)return{row:j,column:this.getLine(j).length};L=this.getLine(q),D=null}var H=0,z=Math.floor(T-F);if(this.$useWrapMode){var K=this.$wrapData[q];K&&(I=K[z],z>0&&K.length&&(H=K.indent,A=K[z-1]||K[K.length-1],L=L.substring(A)))}return w!==void 0&&this.$bidiHandler.isBidiRow(F+z,q,z)&&(S=this.$bidiHandler.offsetToCol(w)),A+=this.$getStringScreenWidth(L,S-H)[1],this.$useWrapMode&&A>=I&&(A=I-1),D?D.idxToPosition(A):{row:q,column:A}},k.prototype.documentToScreenPosition=function(T,S){if(typeof S=="undefined")var w=this.$clipPositionToDocument(T.row,T.column);else w=this.$clipPositionToDocument(T,S);T=w.row,S=w.column;var L=0,q=null,A=null;A=this.getFoldAt(T,S,1),A&&(T=A.start.row,S=A.start.column);var I,F=0,V=this.$docRowCache,R=this.$getRowCacheIndex(V,T),B=V.length;if(B&&R>=0)var F=V[R],L=this.$screenRowCache[R],N=T>V[B-1];else var N=!B;for(var P=this.getNextFoldLine(F),j=P?P.start.row:1/0;F=j){if(I=P.end.row+1,I>T)break;P=this.getNextFoldLine(I,P),j=P?P.start.row:1/0}else I=F+1;L+=this.getRowLength(F),F=I,N&&(this.$docRowCache.push(F),this.$screenRowCache.push(L))}var D="";P&&F>=j?(D=this.getFoldDisplayLine(P,T,S),q=P.start.row):(D=this.getLine(T).substring(0,S),q=T);var W=0;if(this.$useWrapMode){var H=this.$wrapData[q];if(H){for(var z=0;D.length>=H[z];)L++,z++;D=D.substring(H[z-1]||0,D.length),W=z>0?H.indent:0}}return this.lineWidgets&&this.lineWidgets[F]&&this.lineWidgets[F].rowsAbove&&(L+=this.lineWidgets[F].rowsAbove),{row:L,column:W+this.$getStringScreenWidth(D)[0]}},k.prototype.documentToScreenColumn=function(T,S){return this.documentToScreenPosition(T,S).column},k.prototype.documentToScreenRow=function(T,S){return this.documentToScreenPosition(T,S).row},k.prototype.getScreenLength=function(){var T=0,S=null;if(this.$useWrapMode)for(var q=this.$wrapData.length,A=0,L=0,S=this.$foldData[L++],I=S?S.start.row:1/0;AI&&(A=S.end.row+1,S=this.$foldData[L++],I=S?S.start.row:1/0)}else{T=this.getLength();for(var w=this.$foldData,L=0;Lw));A++);return[L,A]})},k.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()},k}();$.$uid=0,$.prototype.$modes=r.$modes,$.prototype.getValue=$.prototype.toString,$.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},$.prototype.$overwrite=!1,$.prototype.$mode=null,$.prototype.$modeId=null,$.prototype.$scrollTop=0,$.prototype.$scrollLeft=0,$.prototype.$wrapLimit=80,$.prototype.$useWrapMode=!1,$.prototype.$wrapLimitRange={min:null,max:null},$.prototype.lineWidgets=null,$.prototype.isFullWidth=M,g.implement($.prototype,f);var v=1,C=2,y=3,_=4,b=9,E=10,x=11,O=12;function M(k){return k<4352?!1:k>=4352&&k<=4447||k>=4515&&k<=4519||k>=4602&&k<=4607||k>=9001&&k<=9002||k>=11904&&k<=11929||k>=11931&&k<=12019||k>=12032&&k<=12245||k>=12272&&k<=12283||k>=12288&&k<=12350||k>=12353&&k<=12438||k>=12441&&k<=12543||k>=12549&&k<=12589||k>=12593&&k<=12686||k>=12688&&k<=12730||k>=12736&&k<=12771||k>=12784&&k<=12830||k>=12832&&k<=12871||k>=12880&&k<=13054||k>=13056&&k<=19903||k>=19968&&k<=42124||k>=42128&&k<=42182||k>=43360&&k<=43388||k>=44032&&k<=55203||k>=55216&&k<=55238||k>=55243&&k<=55291||k>=63744&&k<=64255||k>=65040&&k<=65049||k>=65072&&k<=65106||k>=65108&&k<=65126||k>=65128&&k<=65131||k>=65281&&k<=65376||k>=65504&&k<=65510}e("./edit_session/folding").Folding.call($.prototype),e("./edit_session/bracket_match").BracketMatch.call($.prototype),r.defineOptions($.prototype,"session",{wrap:{set:function(k){if(!k||k=="off"?k=!1:k=="free"?k=!0:k=="printMargin"?k=-1:typeof k=="string"&&(k=parseInt(k,10)||!1),this.$wrap!=k)if(this.$wrap=k,!k)this.setUseWrapMode(!1);else{var T=typeof k=="number"?k:null;this.setWrapLimitRange(T,T),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(k){k=k=="auto"?this.$mode.type!="text":k!="text",k!=this.$wrapAsCode&&(this.$wrapAsCode=k,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(k){this.$useWorker=k,this.$stopWorker(),k&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(k){k=parseInt(k),k>0&&this.$tabSize!==k&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=k,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(k){this.setFoldStyle(k)},handlesSet:!0},overwrite:{set:function(k){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(k){this.doc.setNewLineMode(k)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(k){this.setMode(k)},get:function(){return this.$modeId},handlesSet:!0}}),h.EditSession=$}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,h,m){var g=e("./lib/lang"),a=e("./lib/oop"),u=e("./range").Range,r=function(){function l(){this.$options={}}return l.prototype.set=function(n){return a.mixin(this.$options,n),this},l.prototype.getOptions=function(){return g.copyObject(this.$options)},l.prototype.setOptions=function(n){this.$options=n},l.prototype.find=function(n){var i=this.$options,o=this.$matchIterator(n,i);if(!o)return!1;var s=null;return o.forEach(function(c,p,$,v){return s=new u(c,p,$,v),p==v&&i.start&&i.start.start&&i.skipCurrent!=!1&&s.isEqual(i.start)?(s=null,!1):!0}),s},l.prototype.findAll=function(n){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var o=i.range,s=o?n.getLines(o.start.row,o.end.row):n.doc.getAllLines(),c=[],p=i.re;if(i.$isMultiLine){var $=p.length,v=s.length-$,C;e:for(var y=p.offset||0;y<=v;y++){for(var _=0;_<$;_++)if(s[y+_].search(p[_])==-1)continue e;var b=s[y],E=s[y+$-1],x=b.length-b.match(p[0])[0].length,O=E.match(p[$-1])[0].length;C&&C.end.row===y&&C.end.column>x||(c.push(C=new u(y,x,y+$-1,O)),$>2&&(y=y+$-2))}}else for(var M=0;Mw&&c[_].end.row==L;)_--;for(c=c.slice(M,_+1),M=0,_=c.length;M<_;M++)c[M].start.row+=o.start.row,c[M].end.row+=o.start.row}return c},l.prototype.replace=function(n,i){var o=this.$options,s=this.$assembleRegExp(o);if(o.$isMultiLine)return i;if(!!s){var c=s.exec(n);if(!c||c[0].length!=n.length)return null;if(i=n.replace(s,i),o.preserveCase){i=i.split("");for(var p=Math.min(n.length,n.length);p--;){var $=n[p];$&&$.toLowerCase()!=$?i[p]=i[p].toUpperCase():i[p]=i[p].toLowerCase()}i=i.join("")}return i}},l.prototype.$assembleRegExp=function(n,i){if(n.needle instanceof RegExp)return n.re=n.needle;var o=n.needle;if(!n.needle)return n.re=!1;n.regExp||(o=g.escapeRegExp(o));var s=n.caseSensitive?"gm":"gmi";try{new RegExp(o,"u"),n.$supportsUnicodeFlag=!0,s+="u"}catch{n.$supportsUnicodeFlag=!1}if(n.wholeWord&&(o=f(o,n)),n.$isMultiLine=!i&&/[\n\r]/.test(o),n.$isMultiLine)return n.re=this.$assembleMultilineRegExp(o,s);try{var c=new RegExp(o,s)}catch{c=!1}return n.re=c},l.prototype.$assembleMultilineRegExp=function(n,i){for(var o=n.replace(/\r\n|\r|\n/g,`$ ^`).split(` `),s=[],c=0;c=C;O--)if(E(O,Number.MAX_VALUE,x))return;if(i.wrap!=!1){for(O=y,C=v.row;O>=C;O--)if(E(O,Number.MAX_VALUE,x))return}}};else var _=function(O){var M=v.row;if(!E(M,v.column,O)){for(M=M+1;M<=y;M++)if(E(M,0,O))return;if(i.wrap!=!1){for(M=C,y=v.row;M<=y;M++)if(E(M,0,O))return}}};if(i.$isMultiLine)var b=o.length,E=function(x,O,M){var k=s?x-b+1:x;if(!(k<0||k+b>n.getLength())){var T=n.getLine(k),S=T.search(o[0]);if(!(!s&&SO)&&M(k,S,k+b-1,L))return!0}}};else if(s)var E=function(O,M,k){var T=n.getLine(O),S=[],w,L=0;for(o.lastIndex=0;w=o.exec(T);){var q=w[0].length;if(L=w.index,!q){if(L>=T.length)break;o.lastIndex=L+=g.skipEmptyMatch(T,L,p)}if(w.index+q>M)break;S.push(w.index,q)}for(var A=S.length-1;A>=0;A-=2){var I=S[A-1],q=S[A];if(k(O,I,O,I+q))return!0}};else var E=function(O,M,k){var T=n.getLine(O),S,w;for(o.lastIndex=M;w=o.exec(T);){var L=w[0].length;if(S=w.index,k(O,S,O,S+L))return!0;if(!L&&(o.lastIndex=S+=g.skipEmptyMatch(T,S,p),S>=T.length))return!1}};return{forEach:_}},l}();function f(l,n){var i=g.supportsLookbehind();function o($,v){v===void 0&&(v=!0);var C=i&&n.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return C.test($)||n.regExp?i&&n.$supportsUnicodeFlag?v?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(l),c=s[0],p=s[s.length-1];return o(c)+l+o(p,!1)}h.Search=r}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,h,m){var g=this&&this.__extends||function(){var i=function(o,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var $ in p)Object.prototype.hasOwnProperty.call(p,$)&&(c[$]=p[$])},i(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function c(){this.constructor=o}o.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}}(),a=e("../lib/keys"),u=e("../lib/useragent"),r=a.KEY_MODS,f=function(){function i(o,s){this.$init(o,s,!1)}return i.prototype.$init=function(o,s,c){this.platform=s||(u.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(o),this.$singleCommand=c},i.prototype.addCommand=function(o){this.commands[o.name]&&this.removeCommand(o),this.commands[o.name]=o,o.bindKey&&this._buildKeyHash(o)},i.prototype.removeCommand=function(o,s){var c=o&&(typeof o=="string"?o:o.name);o=this.commands[c],s||delete this.commands[c];var p=this.commandKeyBinding;for(var $ in p){var v=p[$];if(v==o)delete p[$];else if(Array.isArray(v)){var C=v.indexOf(o);C!=-1&&(v.splice(C,1),v.length==1&&(p[$]=v[0]))}}},i.prototype.bindKey=function(o,s,c){if(typeof o=="object"&&o&&(c==null&&(c=o.position),o=o[this.platform]),!!o){if(typeof s=="function")return this.addCommand({exec:s,bindKey:o,name:s.name||o});o.split("|").forEach(function(p){var $="";if(p.indexOf(" ")!=-1){var v=p.split(/\s+/);p=v.pop(),v.forEach(function(_){var b=this.parseKeys(_),E=r[b.hashId]+b.key;$+=($?" ":"")+E,this._addCommandToBinding($,"chainKeys")},this),$+=" "}var C=this.parseKeys(p),y=r[C.hashId]+C.key;this._addCommandToBinding($+y,s,c)},this)}},i.prototype._addCommandToBinding=function(o,s,c){var p=this.commandKeyBinding,$;if(!s)delete p[o];else if(!p[o]||this.$singleCommand)p[o]=s;else{Array.isArray(p[o])?($=p[o].indexOf(s))!=-1&&p[o].splice($,1):p[o]=[p[o]],typeof c!="number"&&(c=l(s));var v=p[o];for($=0;$c)break}v.splice($,0,s)}},i.prototype.addCommands=function(o){o&&Object.keys(o).forEach(function(s){var c=o[s];if(!!c){if(typeof c=="string")return this.bindKey(c,s);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=s),this.addCommand(c))}},this)},i.prototype.removeCommands=function(o){Object.keys(o).forEach(function(s){this.removeCommand(o[s])},this)},i.prototype.bindKeys=function(o){Object.keys(o).forEach(function(s){this.bindKey(s,o[s])},this)},i.prototype._buildKeyHash=function(o){this.bindKey(o.bindKey,o)},i.prototype.parseKeys=function(o){var s=o.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(y){return y}),c=s.pop(),p=a[c];if(a.FUNCTION_KEYS[p])c=a.FUNCTION_KEYS[p].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var $=0,v=s.length;v--;){var C=a.KEY_MODS[s[v]];if(C==null)return typeof console!="undefined"&&console.error("invalid modifier "+s[v]+" in "+o),!1;$|=C}return{key:c,hashId:$}},i.prototype.findKeyCommand=function(o,s){var c=r[o]+s;return this.commandKeyBinding[c]},i.prototype.handleKeyboard=function(o,s,c,p){if(!(p<0)){var $=r[s]+c,v=this.commandKeyBinding[$];return o.$keyChain&&(o.$keyChain+=" "+$,v=this.commandKeyBinding[o.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(o.$keyChain=o.$keyChain||$,{command:"null"}):(o.$keyChain&&((!s||s==4)&&c.length==1?o.$keyChain=o.$keyChain.slice(0,-$.length-1):(s==-1||p>0)&&(o.$keyChain="")),{command:v})}},i.prototype.getStatusText=function(o,s){return s.$keyChain||""},i}();function l(i){return typeof i=="object"&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}var n=function(i){g(o,i);function o(s,c){var p=i.call(this,s,c)||this;return p.$singleCommand=!0,p}return o}(f);n.call=function(i,o,s){f.prototype.$init.call(i,o,s,!0)},f.call=function(i,o,s){f.prototype.$init.call(i,o,s,!1)},h.HashHandler=n,h.MultiHashHandler=f}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,h,m){var g=this&&this.__extends||function(){var l=function(n,i){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(o[c]=s[c])},l(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");l(n,i);function o(){this.constructor=n}n.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}(),a=e("../lib/oop"),u=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,f=function(l){g(n,l);function n(i,o){var s=l.call(this,o,i)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),s}return n.prototype.exec=function(i,o,s){if(Array.isArray(i)){for(var c=i.length;c--;)if(this.exec(i[c],o,s))return!0;return!1}if(typeof i=="string"&&(i=this.commands[i]),!i||o&&o.$readOnly&&!i.readOnly||this.$checkCommandState!=!1&&i.isAvailable&&!i.isAvailable(o))return!1;var p={editor:o,command:i,args:s};return p.returnValue=this._emit("exec",p),this._signal("afterExec",p),p.returnValue!==!1},n.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)},n.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}}},n.prototype.trimMacro=function(i){return i.map(function(o){return typeof o[0]!="string"&&(o[0]=o[0].name),o[1]||(o=o[0]),o})},n}(u);a.implement(f.prototype,r),h.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,h,m){var g=e("../lib/lang"),a=e("../config"),u=e("../range").Range;function r(l,n){return{win:l,mac:n}}h.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:r("Ctrl-,","Command-,"),exec:function(l){a.loadModule("ace/ext/settings_menu",function(n){n.init(l),l.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:r("Alt-E","F4"),exec:function(l){a.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(l,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:r("Alt-Shift-E","Shift-F4"),exec:function(l){a.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(l,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:r("Ctrl-A","Command-A"),exec:function(l){l.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:r(null,"Ctrl-L"),exec:function(l){l.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:r("Ctrl-L","Command-L"),exec:function(l,n){typeof n=="number"&&!isNaN(n)&&l.gotoLine(n),l.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:r("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(l){l.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:r("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(l){l.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:r("F2","F2"),exec:function(l){l.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:r("Alt-F2","Alt-F2"),exec:function(l){l.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(l){l.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(l){l.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:r("Alt-0","Command-Option-0"),exec:function(l){l.session.foldAll(),l.session.unfold(l.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(l){l.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:r("Ctrl-K","Command-G"),exec:function(l){l.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:r("Ctrl-Shift-K","Command-Shift-G"),exec:function(l){l.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:r("Alt-K","Ctrl-G"),exec:function(l){l.selection.isEmpty()?l.selection.selectWord():l.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(l){l.selection.isEmpty()?l.selection.selectWord():l.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:r("Ctrl-F","Command-F"),exec:function(l){a.loadModule("ace/ext/searchbox",function(n){n.Search(l)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(l){l.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:r("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(l){l.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:r("Ctrl-Home","Command-Home|Command-Up"),exec:function(l){l.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:r("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(l){l.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:r("Up","Up|Ctrl-P"),exec:function(l,n){l.navigateUp(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:r("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(l){l.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:r("Ctrl-End","Command-End|Command-Down"),exec:function(l){l.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:r("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(l){l.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:r("Down","Down|Ctrl-N"),exec:function(l,n){l.navigateDown(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:r("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(l){l.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:r("Ctrl-Left","Option-Left"),exec:function(l){l.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:r("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(l){l.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:r("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(l){l.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:r("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(l){l.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:r("Left","Left|Ctrl-B"),exec:function(l,n){l.navigateLeft(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:r("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(l){l.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:r("Ctrl-Right","Option-Right"),exec:function(l){l.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:r("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(l){l.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:r("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(l){l.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:r("Shift-Right","Shift-Right"),exec:function(l){l.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:r("Right","Right|Ctrl-F"),exec:function(l,n){l.navigateRight(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(l){l.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:r(null,"Option-PageDown"),exec:function(l){l.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:r("PageDown","PageDown|Ctrl-V"),exec:function(l){l.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(l){l.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:r(null,"Option-PageUp"),exec:function(l){l.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(l){l.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:r("Ctrl-Up",null),exec:function(l){l.renderer.scrollBy(0,-2*l.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:r("Ctrl-Down",null),exec:function(l){l.renderer.scrollBy(0,2*l.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(l){l.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(l){l.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:r("Ctrl-Alt-E","Command-Option-E"),exec:function(l){l.commands.toggleRecording(l)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(l){l.commands.replay(l)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:r("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(l){l.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:r("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(l){l.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:r("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(l){l.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(l){},readOnly:!0},{name:"cut",description:"Cut",exec:function(l){var n=l.$copyWithEmptySelection&&l.selection.isEmpty(),i=n?l.selection.getLineRange():l.selection.getRange();l._emit("cut",i),i.isEmpty()||l.session.remove(i),l.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(l,n){l.$handlePaste(n)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:r("Ctrl-D","Command-D"),exec:function(l){l.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(l){l.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(l){l.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:r("Ctrl-/","Command-/"),exec:function(l){l.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(l){l.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(l){l.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(l){l.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(l){a.loadModule("ace/ext/searchbox",function(n){n.Search(l,!0)})}},{name:"undo",description:"Undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(l){l.undo()}},{name:"redo",description:"Redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(l){l.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(l){l.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:r("Alt-Up","Option-Up"),exec:function(l){l.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(l){l.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:r("Alt-Down","Option-Down"),exec:function(l){l.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(l){l.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:r("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(l){l.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:r("Shift-Delete",null),exec:function(l){if(l.selection.isEmpty())l.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:r("Alt-Backspace","Command-Backspace"),exec:function(l){l.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:r("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(l){l.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:r("Ctrl-Shift-Backspace",null),exec:function(l){var n=l.selection.getRange();n.start.column=0,l.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:r("Ctrl-Shift-Delete",null),exec:function(l){var n=l.selection.getRange();n.end.column=Number.MAX_VALUE,l.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(l){l.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(l){l.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(l){l.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:r("Tab","Tab"),exec:function(l){l.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(l){l.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:r("Ctrl-]","Ctrl-]"),exec:function(l){l.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(l,n){l.insert(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(l,n){l.insert(g.stringRepeat(n.text||"",n.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:r(null,"Ctrl-O"),exec:function(l){l.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:r("Alt-Shift-X","Ctrl-T"),exec:function(l){l.transposeLetters()},multiSelectAction:function(l){l.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(l){l.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(l){l.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:r(null,null),exec:function(l){l.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:r("Ctrl-Shift-L","Command-Shift-L"),exec:function(l){var n=l.selection.getRange();n.start.column=n.end.column=0,n.end.row++,l.selection.setRange(n,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:r("Ctrl+F3","F3"),exec:function(l){l.openLink()}},{name:"joinlines",description:"Join lines",bindKey:r(null,null),exec:function(l){for(var n=l.selection.isBackwards(),i=n?l.selection.getSelectionLead():l.selection.getSelectionAnchor(),o=n?l.selection.getSelectionAnchor():l.selection.getSelectionLead(),s=l.session.doc.getLine(i.row).length,c=l.session.doc.getTextRange(l.selection.getRange()),p=c.replace(/\n\s*/," ").length,$=l.session.doc.getLine(i.row),v=i.row+1;v<=o.row+1;v++){var C=g.stringTrimLeft(g.stringTrimRight(l.session.doc.getLine(v)));C.length!==0&&(C=" "+C),$+=C}o.row+10?(l.selection.moveCursorTo(i.row,i.column),l.selection.selectTo(i.row,i.column+p)):(s=l.session.doc.getLine(i.row).length>s?s+1:s,l.selection.moveCursorTo(i.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:r(null,null),exec:function(l){var n=l.session.doc.getLength()-1,i=l.session.doc.getLine(n).length,o=l.selection.rangeList.ranges,s=[];o.length<1&&(o=[l.selection.getRange()]);for(var c=0;cf[l].column&&l++,o.unshift(l,0),f.splice.apply(f,o),this.$updateRows()}}},u.prototype.$updateRows=function(){var r=this.session.lineWidgets;if(!!r){var f=!0;r.forEach(function(l,n){if(l)for(f=!1,l.row=n;l.$oldWidget;)l.$oldWidget.row=n,l=l.$oldWidget}),f&&(this.session.lineWidgets=null)}},u.prototype.$registerLineWidget=function(r){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var f=this.session.lineWidgets[r.row];return f&&(r.$oldWidget=f,f.el&&f.el.parentNode&&(f.el.parentNode.removeChild(f.el),f._inDocument=!1)),this.session.lineWidgets[r.row]=r,r},u.prototype.addLineWidget=function(r){if(this.$registerLineWidget(r),r.session=this.session,!this.editor)return r;var f=this.editor.renderer;r.html&&!r.el&&(r.el=g.createElement("div"),r.el.innerHTML=r.html),r.text&&!r.el&&(r.el=g.createElement("div"),r.el.textContent=r.text),r.el&&(g.addCssClass(r.el,"ace_lineWidgetContainer"),r.className&&g.addCssClass(r.el,r.className),r.el.style.position="absolute",r.el.style.zIndex="5",f.container.appendChild(r.el),r._inDocument=!0,r.coverGutter||(r.el.style.zIndex="3"),r.pixelHeight==null&&(r.pixelHeight=r.el.offsetHeight)),r.rowCount==null&&(r.rowCount=r.pixelHeight/f.layerConfig.lineHeight);var l=this.session.getFoldAt(r.row,0);if(r.$fold=l,l){var n=this.session.lineWidgets;r.row==l.end.row&&!n[l.start.row]?n[l.start.row]=r:r.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:r.row}}}),this.$updateRows(),this.renderWidgets(null,f),this.onWidgetChanged(r),r},u.prototype.removeLineWidget=function(r){if(r._inDocument=!1,r.session=null,r.el&&r.el.parentNode&&r.el.parentNode.removeChild(r.el),r.editor&&r.editor.destroy)try{r.editor.destroy()}catch{}if(this.session.lineWidgets){var f=this.session.lineWidgets[r.row];if(f==r)this.session.lineWidgets[r.row]=r.$oldWidget,r.$oldWidget&&this.onWidgetChanged(r.$oldWidget);else for(;f;){if(f.$oldWidget==r){f.$oldWidget=r.$oldWidget;break}f=f.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:r.row}}}),this.$updateRows()},u.prototype.getWidgetsAtRow=function(r){for(var f=this.session.lineWidgets,l=f&&f[r],n=[];l;)n.push(l),l=l.$oldWidget;return n},u.prototype.onWidgetChanged=function(r){this.session._changedWidgets.push(r),this.editor&&this.editor.renderer.updateFull()},u.prototype.measureWidgets=function(r,f){var l=this.session._changedWidgets,n=f.layerConfig;if(!(!l||!l.length)){for(var i=1/0,o=0;o0&&!n[i];)i--;this.firstRow=l.firstRow,this.lastRow=l.lastRow,f.$cursorLayer.config=l;for(var s=i;s<=o;s++){var c=n[s];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,f.container.appendChild(c.el));var p=f.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;c.coverLine||(p+=l.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=p-l.offset+"px";var $=c.coverGutter?0:f.gutterWidth;c.fixedWidth||($-=f.scrollLeft),c.el.style.left=$+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=l.width+2*l.padding+"px"),c.fixedWidth?c.el.style.right=f.scrollBar.getWidth()+"px":c.el.style.right=""}}}},u}();h.LineWidgets=a}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,h,m){var g=e("../lib/keys"),a=e("../mouse/default_gutter_handler").GutterTooltip,u=function(){function f(l){this.editor=l,this.gutterLayer=l.renderer.$gutterLayer,this.element=l.renderer.$gutter,this.lines=l.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new a(this.editor)}return f.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))},f.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))},f.prototype.$onGutterKeyDown=function(l){if(this.annotationTooltip.isOpen){l.preventDefault(),l.keyCode===g.escape&&this.annotationTooltip.hideTooltip();return}if(l.target===this.element){if(l.keyCode!=g.enter)return;l.preventDefault();var n=this.editor.getCursorPosition().row;this.editor.isRowVisible(n)||this.editor.scrollToLine(n,!0,!0),setTimeout(function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),o=this.$findNearestFoldWidget(i),s=this.$findNearestAnnotation(i);if(!(o===null&&s===null)){if(o===null&&s!==null){this.activeRowIndex=s,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(o!==null&&s===null){this.activeRowIndex=o,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(s-i)0||l+n=0&&this.$isFoldWidgetVisible(l-n))return l-n;if(l+n<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(l+n))return l+n}return null},f.prototype.$findNearestAnnotation=function(l){if(this.$isAnnotationVisible(l))return l;for(var n=0;l-n>0||l+n=0&&this.$isAnnotationVisible(l-n))return l-n;if(l+n<=this.lines.getLength()-1&&this.$isAnnotationVisible(l+n))return l+n}return null},f.prototype.$focusFoldWidget=function(l){if(l!=null){var n=this.$getFoldWidget(l);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},f.prototype.$focusAnnotation=function(l){if(l!=null){var n=this.$getAnnotation(l);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},f.prototype.$blurFoldWidget=function(l){var n=this.$getFoldWidget(l);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},f.prototype.$blurAnnotation=function(l){var n=this.$getAnnotation(l);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},f.prototype.$moveFoldWidgetUp=function(){for(var l=this.activeRowIndex;l>0;)if(l--,this.$isFoldWidgetVisible(l)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=l,this.$focusFoldWidget(this.activeRowIndex);return}},f.prototype.$moveFoldWidgetDown=function(){for(var l=this.activeRowIndex;l0;)if(l--,this.$isAnnotationVisible(l)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusAnnotation(this.activeRowIndex);return}},f.prototype.$moveAnnotationDown=function(){for(var l=this.activeRowIndex;l=S.length&&(S=void 0),{value:S&&S[q++],done:!S}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("./lib/oop"),u=e("./lib/dom"),r=e("./lib/lang"),f=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,n=e("./mouse/mouse_handler").MouseHandler,i=e("./mouse/fold_handler").FoldHandler,o=e("./keyboard/keybinding").KeyBinding,s=e("./edit_session").EditSession,c=e("./search").Search,p=e("./range").Range,$=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,C=e("./commands/default_commands").commands,y=e("./config"),_=e("./token_iterator").TokenIterator,b=e("./line_widgets").LineWidgets,E=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,O=e("./clipboard"),M=e("./lib/keys"),k=function(){function S(w,L,q){this.session,this.$toDestroy=[];var A=w.getContainerElement();this.container=A,this.renderer=w,this.id="editor"+ ++S.$uid,this.commands=new v(f.isMac?"mac":"win",C),typeof document=="object"&&(this.textInput=new l(w.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new n(this),new i(this)),this.keyBinding=new o(this),this.$search=new c().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=r.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(I,F){F._$emitInputEvent.schedule(31)}),this.setSession(L||q&&q.session||new s("")),y.resetOptions(this),q&&this.setOptions(q),y._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=r.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)},S.prototype.startOperation=function(w){if(this.curOp){if(!w||this.curOp.command)return;this.prevOp=this.curOp}w||(this.previousCommand=null,w={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:w.command||{},args:w.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},S.prototype.endOperation=function(w){if(this.curOp&&this.session){if(w&&w.returnValue===!1||!this.session)return this.curOp=null;if(w==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var L=this.curOp.command,q=L&&L.scrollIntoView;if(q){switch(q){case"center-animate":q="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var A=this.selection.getRange(),I=this.renderer.layerConfig;(A.start.row>=I.lastRow||A.end.row<=I.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}q=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var F=this.selection.toJSON();this.curOp.selectionAfter=F,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(F),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(w){if(!!this.$mergeUndoDeltas){var L=this.prevOp,q=this.$mergeableCommands,A=L.command&&w.command.name==L.command.name;if(w.command.name=="insertstring"){var I=w.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),A=A&&this.mergeNextCommand&&(!/\s/.test(I)||/\s/.test(L.args)),this.mergeNextCommand=!0}else A=A&&q.indexOf(w.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(A=!1),A?this.session.mergeUndoDeltas=!0:q.indexOf(w.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(w,L){if(w&&typeof w=="string"&&w!="ace"){this.$keybindingId=w;var q=this;y.loadModule(["keybinding",w],function(A){q.$keybindingId==w&&q.keyBinding.setKeyboardHandler(A&&A.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(w),L&&L()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(w){if(this.session!=w){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){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);var q=this.session.getSelection();q.off("changeCursor",this.$onCursorChange),q.off("changeSelection",this.$onSelectionChange)}this.session=w,w?(this.$onDocumentChange=this.onDocumentChange.bind(this),w.on("change",this.$onDocumentChange),this.renderer.setSession(w),this.$onChangeMode=this.onChangeMode.bind(this),w.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),w.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),w.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),w.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),w.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),w.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=w.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(w)),this._signal("changeSession",{session:w,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),w&&w._signal("changeEditor",{editor:this}),w&&!w.destroyed&&w.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(w,L){return this.session.doc.setValue(w),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),w},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(w){this.renderer.onResize(w)},S.prototype.setTheme=function(w,L){this.renderer.setTheme(w,L)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(w){this.renderer.setStyle(w)},S.prototype.unsetStyle=function(w){this.renderer.unsetStyle(w)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||u.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(w){this.setOption("fontSize",w)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var w=this;this.$highlightPending=!0,setTimeout(function(){w.$highlightPending=!1;var L=w.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(P){L.removeMarker(P)}),L.$bracketHighlight=null);var q=w.getCursorPosition(),A=w.getKeyboardHandler(),I=A&&A.$getDirectionForHighlight&&A.$getDirectionForHighlight(w),F=L.getMatchingBracketRanges(q,I);if(!F){var V=new _(L,q.row,q.column),R=V.getCurrentToken();if(R&&/\b(?:tag-open|tag-name)/.test(R.type)){var B=L.getMatchingTags(q);B&&(F=[B.openTagName,B.closeTagName])}}if(!F&&L.$mode.getMatching&&(F=L.$mode.getMatching(w.session)),!F){w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide();return}var N="ace_bracket";Array.isArray(F)?F.length==1&&(N="ace_error_bracket"):F=[F],F.length==2&&(p.comparePoints(F[0].end,F[1].start)==0?F=[p.fromPoints(F[0].start,F[1].end)]:p.comparePoints(F[0].start,F[1].end)==0&&(F=[p.fromPoints(F[1].start,F[0].end)])),L.$bracketHighlight={ranges:F,markerIds:F.map(function(P){return L.addMarker(P,N,"text")})},w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(w){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",w))},S.prototype.onBlur=function(w){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",w))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(w){var L=this.session.$useWrapMode,q=w.start.row==w.end.row?w.end.row:1/0;this.renderer.updateLines(w.start.row,q,L),this._signal("change",w),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(w){var L=w.data;this.renderer.updateLines(L.first,L.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var w=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),w.$highlightLineMarker&&!L)w.removeMarker(w.$highlightLineMarker.id),w.$highlightLineMarker=null;else if(!w.$highlightLineMarker&&L){var q=new p(L.row,L.column,L.row,1/0);q.id=w.addMarker(q,"ace_active-line","screenLine"),w.$highlightLineMarker=q}else L&&(w.$highlightLineMarker.start.row=L.row,w.$highlightLineMarker.end.row=L.row,w.$highlightLineMarker.start.column=L.column,w._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(w){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var q=this.selection.getRange(),A=this.getSelectionStyle();L.$selectionMarker=L.addMarker(q,"ace_selection",A)}var I=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(I),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var w=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var q=L.start.column,A=L.end.column,I=w.getLine(L.start.row),F=I.substring(q,A);if(!(F.length>5e3||!/[\w\d]/.test(F))){var V=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:F}),R=I.substring(q-1,A+1);if(!!V.test(R))return V}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(w){this.renderer.updateText(),this._emit("changeMode",w)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var w=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),q=!1;if(!w&&this.$copyWithEmptySelection){q=!0;for(var A=this.selection.getAllRanges(),I=0;IP.search(/\S|$/)){var R=P.substr(I.column).search(/\S|$/);q.doc.removeInLine(I.row,I.column,I.column+R)}}this.clearSelection();var B=I.column,N=q.getState(I.row),P=q.getLine(I.row),j=A.checkOutdent(N,P,w);if(q.insert(I,w),F&&F.selection&&(F.selection.length==2?this.selection.setSelectionRange(new p(I.row,B+F.selection[0],I.row,B+F.selection[1])):this.selection.setSelectionRange(new p(I.row+F.selection[0],F.selection[1],I.row+F.selection[2],F.selection[3]))),this.$enableAutoIndent){if(q.getDocument().isNewLine(w)){var D=A.getNextLineIndent(N,P.slice(0,I.column),q.getTabString());q.insert({row:I.row+1,column:0},D)}j&&A.autoOutdent(N,q,I.row)}},S.prototype.autoIndent=function(){for(var w=this.session,L=w.getMode(),q=this.selection.isEmpty()?[new p(0,0,w.doc.getLength()-1,0)]:this.selection.getAllRanges(),A="",I="",F="",V=w.getTabString(),R=0;R0&&(A=w.getState(P-1),I=w.getLine(P-1),F=L.getNextLineIndent(A,I,V));var j=w.getLine(P),D=L.$getIndent(j);if(F!==D){if(D.length>0){var W=new p(P,0,P,D.length);w.remove(W)}F.length>0&&w.insert({row:P,column:0},F)}L.autoOutdent(A,w,P)}},S.prototype.onTextInput=function(w,L){if(!L)return this.keyBinding.onTextInput(w);this.startOperation({command:{name:"insertstring"}});var q=this.applyComposition.bind(this,w,L);this.selection.rangeCount?this.forEachSelection(q):q(),this.endOperation()},S.prototype.applyComposition=function(w,L){if(L.extendLeft||L.extendRight){var q=this.selection.getRange();q.start.column-=L.extendLeft,q.end.column+=L.extendRight,q.start.column<0&&(q.start.row--,q.start.column+=this.session.getLine(q.start.row).length+1),this.selection.setRange(q),!w&&!q.isEmpty()&&this.remove()}if((w||!this.selection.isEmpty())&&this.insert(w,!0),L.restoreStart||L.restoreEnd){var q=this.selection.getRange();q.start.column-=L.restoreStart,q.end.column-=L.restoreEnd,this.selection.setRange(q)}},S.prototype.onCommandKey=function(w,L,q){return this.keyBinding.onCommandKey(w,L,q)},S.prototype.setOverwrite=function(w){this.session.setOverwrite(w)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(w){this.setOption("scrollSpeed",w)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(w){this.setOption("dragDelay",w)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(w){this.setOption("selectionStyle",w)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(w){this.setOption("highlightActiveLine",w)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(w){this.setOption("highlightGutterLine",w)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(w){this.setOption("highlightSelectedWord",w)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(w){this.renderer.setAnimatedScroll(w)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(w){this.renderer.setShowInvisibles(w)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(w){this.renderer.setDisplayIndentGuides(w)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(w){this.renderer.setHighlightIndentGuides(w)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(w){this.renderer.setShowPrintMargin(w)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(w){this.renderer.setPrintMarginColumn(w)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(w){this.setOption("readOnly",w)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(w){this.setOption("behavioursEnabled",w)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(w){this.setOption("wrapBehavioursEnabled",w)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(w){this.setOption("showFoldWidgets",w)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(w){this.setOption("fadeFoldWidgets",w)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(w){this.selection.isEmpty()&&(w=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var q=this.session,A=q.getState(L.start.row),I=q.getMode().transformAction(A,"deletion",this,q,L);if(L.end.column===0){var F=q.getTextRange(L);if(F[F.length-1]==` `){var V=q.getLine(L.end.row);/^\s+$/.test(V)&&(L.end.column=V.length)}}I&&(L=I)}this.session.remove(L),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var w=this.getSelectionRange();w.start.column==w.end.column&&w.start.row==w.end.row&&(w.end.column=0,w.end.row++),this.session.remove(w),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var w=this.getCursorPosition();this.insert(` `),this.moveCursorToPosition(w)},S.prototype.setGhostText=function(w,L){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(w,L)},S.prototype.removeGhostText=function(){!this.session.widgetManager||this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var w=this.getCursorPosition(),L=w.column;if(L!==0){var q=this.session.getLine(w.row),A,I;LR.toLowerCase()?1:0});for(var I=new p(0,0,0,0),A=w.first;A<=w.last;A++){var F=L.getLine(A);I.start.row=A,I.end.row=A,I.end.column=F.length,L.replace(I,q[A-w.first])}},S.prototype.toggleCommentLines=function(){var w=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(w,this.session,L.first,L.last)},S.prototype.toggleBlockComment=function(){var w=this.getCursorPosition(),L=this.session.getState(w.row),q=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,q,w)},S.prototype.getNumberAt=function(w,L){var q=/[\-]?[0-9]+(?:\.[0-9]+)?/g;q.lastIndex=0;for(var A=this.session.getLine(w);q.lastIndex=L){var F={value:I[0],start:I.index,end:I.index+I[0].length};return F}}return null},S.prototype.modifyNumber=function(w){var L=this.selection.getCursor().row,q=this.selection.getCursor().column,A=new p(L,q-1,L,q),I=this.session.getTextRange(A);if(!isNaN(parseFloat(I))&&isFinite(I)){var F=this.getNumberAt(L,q);if(F){var V=F.value.indexOf(".")>=0?F.start+F.value.indexOf(".")+1:F.end,R=F.start+F.value.length-V,B=parseFloat(F.value);B*=Math.pow(10,R),V!==F.end&&q=V&&F<=R&&(q=Z,B.selection.clearSelection(),B.moveCursorTo(w,V+A),B.selection.selectTo(w,R+A)),V=R});for(var N=this.$toggleWordPairs,P,j=0;j=R&&V<=B&&D.match(/((?:https?|ftp):\/\/[\S]+)/)){N=D.replace(/[\s:.,'";}\]]+$/,"");break}R=B}}catch(W){q={error:W}}finally{try{j&&!j.done&&(A=P.return)&&A.call(P)}finally{if(q)throw q.error}}return N},S.prototype.openLink=function(){var w=this.selection.getCursor(),L=this.findLinkAt(w.row,w.column);return L&&window.open(L,"_blank"),L!=null},S.prototype.removeLines=function(){var w=this.$getSelectedRows();this.session.removeFullLines(w.first,w.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var w=this.selection,L=this.session,q=w.getRange(),A=w.isBackwards();if(q.isEmpty()){var I=q.start.row;L.duplicateLines(I,I)}else{var F=A?q.start:q.end,V=L.insert(F,L.getTextRange(q));q.start=F,q.end=V,w.setSelectionRange(q,A)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(w,L,q){return this.session.moveText(w,L,q)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(w,L){var q,A,I=this.selection;if(!I.inMultiSelectMode||this.inVirtualSelectionMode){var F=I.toOrientedRange();q=this.$getSelectedRows(F),A=this.session.$moveLines(q.first,q.last,L?0:w),L&&w==-1&&(A=0),F.moveBy(A,0),I.fromOrientedRange(F)}else{var V=I.rangeList.ranges;I.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var R=0,B=0,N=V.length,P=0;PW+1)break;W=H.last}for(P--,R=this.session.$moveLines(D,W,L?0:w),L&&w==-1&&(j=P+1);j<=P;)V[j].moveBy(R,0),j++;L||(R=0),B+=R}I.fromOrientedRange(I.ranges[0]),I.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(w){return w=(w||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(w.start.row),last:this.session.getRowFoldEnd(w.end.row)}},S.prototype.onCompositionStart=function(w){this.renderer.showComposition(w)},S.prototype.onCompositionUpdate=function(w){this.renderer.setCompositionText(w)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(w){return w>=this.getFirstVisibleRow()&&w<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(w){return w>=this.renderer.getFirstFullyVisibleRow()&&w<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(w,L){var q=this.renderer,A=this.renderer.layerConfig,I=w*Math.floor(A.height/A.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(I,0)}):L===!1&&(this.selection.moveCursorBy(I,0),this.selection.clearSelection());var F=q.scrollTop;q.scrollBy(0,I*A.lineHeight),L!=null&&q.scrollCursorIntoView(null,.5),q.animateScrolling(F)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(w){this.renderer.scrollToRow(w)},S.prototype.scrollToLine=function(w,L,q,A){this.renderer.scrollToLine(w,L,q,A)},S.prototype.centerSelection=function(){var w=this.getSelectionRange(),L={row:Math.floor(w.start.row+(w.end.row-w.start.row)/2),column:Math.floor(w.start.column+(w.end.column-w.start.column)/2)};this.renderer.alignCursor(L,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(w,L){this.selection.moveCursorTo(w,L)},S.prototype.moveCursorToPosition=function(w){this.selection.moveCursorToPosition(w)},S.prototype.jumpToMatching=function(w,L){var q=this.getCursorPosition(),A=new _(this.session,q.row,q.column),I=A.getCurrentToken(),F=0;I&&I.type.indexOf("tag-name")!==-1&&(I=A.stepBackward());var V=I||A.stepForward();if(!!V){var R,B=!1,N={},P=q.column-V.start,j,D={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(V.value.match(/[{}()\[\]]/g)){for(;P1?N[V.value]++:I.value==="=0;--F)this.$tryReplace(q[F],w)&&A++;return this.selection.setSelectionRange(I),A},S.prototype.$tryReplace=function(w,L){var q=this.session.getTextRange(w);return L=this.$search.replace(q,L),L!==null?(w.end=this.session.replace(w,L),w):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(w,L,q){L||(L={}),typeof w=="string"||w instanceof RegExp?L.needle=w:typeof w=="object"&&a.mixin(L,w);var A=this.selection.getRange();L.needle==null&&(w=this.session.getTextRange(A)||this.$search.$options.needle,w||(A=this.session.getWordRange(A.start.row,A.start.column),w=this.session.getTextRange(A)),this.$search.set({needle:w})),this.$search.set(L),L.start||this.$search.set({start:A});var I=this.$search.find(this.session);if(L.preventScroll)return I;if(I)return this.revealRange(I,q),I;L.backwards?A.start=A.end:A.end=A.start,this.selection.setRange(A)},S.prototype.findNext=function(w,L){this.find({skipCurrent:!0,backwards:!1},w,L)},S.prototype.findPrevious=function(w,L){this.find(w,{skipCurrent:!0,backwards:!0},L)},S.prototype.revealRange=function(w,L){this.session.unfold(w),this.selection.setSelectionRange(w);var q=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(w.start,w.end,.5),L!==!1&&this.renderer.animateScrolling(q)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(w){w.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()},S.prototype.setAutoScrollEditorIntoView=function(w){if(!!w){var L,q=this,A=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var I=this.$scrollAnchor;I.style.cssText="position:absolute",this.container.insertBefore(I,this.container.firstChild);var F=this.on("changeSelection",function(){A=!0}),V=this.renderer.on("beforeRender",function(){A&&(L=q.renderer.container.getBoundingClientRect())}),R=this.renderer.on("afterRender",function(){if(A&&L&&(q.isFocused()||q.searchBox&&q.searchBox.isFocused())){var B=q.renderer,N=B.$cursorLayer.$pixelPos,P=B.layerConfig,j=N.top-P.offset;N.top>=0&&j+L.top<0?A=!0:N.topwindow.innerHeight?A=!1:A=null,A!=null&&(I.style.top=j+"px",I.style.left=N.left+"px",I.style.height=P.lineHeight+"px",I.scrollIntoView(A)),A=L=null}});this.setAutoScrollEditorIntoView=function(B){B||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",F),this.renderer.off("afterRender",R),this.renderer.off("beforeRender",V))}}},S.prototype.$resetCursorStyle=function(){var w=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;!L||(L.setSmoothBlinking(/smooth/.test(w)),L.isBlinking=!this.$readOnly&&w!="wide",u.setCssClass(L.element,"ace_slim-cursors",/slim/.test(w)))},S.prototype.prompt=function(w,L,q){var A=this;y.loadModule("ace/ext/prompt",function(I){I.prompt(A,w,L,q)})},S}();k.$uid=0,k.prototype.curOp=null,k.prototype.prevOp={},k.prototype.$mergeableCommands=["backspace","del","insertstring"],k.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"],["&&","||"],["==","!="]],a.implement(k.prototype,$),y.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){this.textInput.setReadOnly(S),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){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(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?T.attach(this):T.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?T.attach(this):T.detach(this)}},placeholder:{set:function(S){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var w=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(w&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),u.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!w&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),u.addCssClass(this.container,"ace_hasPlaceholder");var L=u.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!w&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var w={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(A){A.blur(),A.renderer.scroller.focus()},readOnly:!0},L=function(A){if(A.target==this.renderer.scroller&&A.keyCode===M.enter){A.preventDefault();var I=this.getCursorPosition().row;this.isRowVisible(I)||this.scrollToLine(I,!0,!0),this.focus()}},q;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(f.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(w),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",x("editor")),this.renderer.$gutter.setAttribute("aria-label",x("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),q||(q=new E(this)),q.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(w),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),q&&q.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 T={getText:function(S,w){return(Math.abs(S.selection.lead.row-w)||w+1+(w<9?"\xB7":""))+""},getWidth:function(S,w,L){return Math.max(w.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(S,w){w.renderer.$loop.schedule(w.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};h.Editor=k}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,h,m){var g=e("../lib/dom"),a=function(){function u(r,f){this.element=r,this.canvasHeight=f||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return u.prototype.moveContainer=function(r){g.translate(this.element,0,-(r.firstRowScreen*r.lineHeight%this.canvasHeight)-r.offset*this.$offsetCoefficient)},u.prototype.pageChanged=function(r,f){return Math.floor(r.firstRowScreen*r.lineHeight/this.canvasHeight)!==Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)},u.prototype.computeLineTop=function(r,f,l){var n=f.firstRowScreen*f.lineHeight,i=Math.floor(n/this.canvasHeight),o=l.documentToScreenRow(r,0)*f.lineHeight;return o-i*this.canvasHeight},u.prototype.computeLineHeight=function(r,f,l){return f.lineHeight*l.getRowLineCount(r)},u.prototype.getLength=function(){return this.cells.length},u.prototype.get=function(r){return this.cells[r]},u.prototype.shift=function(){this.$cacheCell(this.cells.shift())},u.prototype.pop=function(){this.$cacheCell(this.cells.pop())},u.prototype.push=function(r){if(Array.isArray(r)){this.cells.push.apply(this.cells,r);for(var f=g.createFragment(this.element),l=0;lC&&(b=v.end.row+1,v=c.getNextFoldLine(b,v),C=v?v.start.row:1/0),b>$){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}y=this.$lines.get(++_),y?y.row=b:(y=this.$lines.createCell(b,s,this.session,i),this.$lines.push(y)),this.$renderCell(y,s,v,b),b++}this._signal("afterRender"),this.$updateGutterWidth(s)},o.prototype.$updateGutterWidth=function(s){var c=this.session,p=c.gutterRenderer||this.$renderer,$=c.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(v=c.getLength()+$-1);var C=p?p.getWidth(c,v,s):v.toString().length*s.characterWidth,y=this.$padding||this.$computePadding();C+=y.left+y.right,C!==this.gutterWidth&&!isNaN(C)&&(this.gutterWidth=C,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",C))},o.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},o.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var p=0;p=this.$cursorRow){if($.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(p>0&&v&&v.start.row==c[p-1].row)$=c[p-1];else break}$.element.className="ace_gutter-active-line "+$.element.className,this.$cursorCell=$;break}}}}},o.prototype.scrollLines=function(s){var c=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(c,s))return this.update(s);this.$lines.moveContainer(s);var p=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),$=this.oldLastRow;if(this.oldLastRow=p,!c||$0;v--)this.$lines.shift();if($>p)for(var v=this.session.getFoldedRowCount(p+1,$);v>0;v--)this.$lines.pop();s.firstRow$&&this.$lines.push(this.$renderLines(s,$+1,p)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},o.prototype.$renderLines=function(s,c,p){for(var $=[],v=c,C=this.session.getNextFoldLine(v),y=C?C.start.row:1/0;v>y&&(v=C.end.row+1,C=this.session.getNextFoldLine(v,C),y=C?C.start.row:1/0),!(v>p);){var _=this.$lines.createCell(v,s,this.session,i);this.$renderCell(_,s,C,v),$.push(_),v++}return $},o.prototype.$renderCell=function(s,c,p,$){var v=s.element,C=this.session,y=v.childNodes[0],_=v.childNodes[1],b=v.childNodes[2],E=b.firstChild,x=C.$firstLineNumber,O=C.$breakpoints,M=C.$decorations,k=C.gutterRenderer||this.$renderer,T=this.$showFoldWidgets&&C.foldWidgets,S=p?p.start.row:Number.MAX_VALUE,w=c.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",q=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",A=(k?k.getText(C,$):$+x).toString();if(this.$highlightGutterLine&&($==this.$cursorRow||p&&$=S&&this.$cursorRow<=p.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),O[$]&&(L+=O[$]),M[$]&&(L+=M[$]),this.$annotations[$]&&$!==S&&(L+=this.$annotations[$].className),T){var I=T[$];I==null&&(I=T[$]=C.getFoldWidget($))}if(I){var F="ace_fold-widget ace_"+I,V=I=="start"&&$==S&&$p.right-c.right)return"foldWidgets"},o}();n.prototype.$fixedWidth=!1,n.prototype.$highlightGutterLine=!0,n.prototype.$renderer="",n.prototype.$showLineNumbers=!0,n.prototype.$showFoldWidgets=!0,a.implement(n.prototype,r);function i(o){var s=document.createTextNode("");o.appendChild(s);var c=g.createElement("span");o.appendChild(c);var p=g.createElement("span");o.appendChild(p);var $=g.createElement("span");return p.appendChild($),o}h.Gutter=n}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,h,m){var g=e("../range").Range,a=e("../lib/dom"),u=function(){function f(l){this.element=a.createElement("div"),this.element.className="ace_layer ace_marker-layer",l.appendChild(this.element)}return f.prototype.setPadding=function(l){this.$padding=l},f.prototype.setSession=function(l){this.session=l},f.prototype.setMarkers=function(l){this.markers=l},f.prototype.elt=function(l,n){var i=this.i!=-1&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=n,i.className=l},f.prototype.update=function(l){if(!!l){this.config=l,this.i=0;var n;for(var i in this.markers){var o=this.markers[i];if(!o.range){o.update(n,this,this.session,l);continue}var s=o.range.clipRows(l.firstRow,l.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),o.renderer){var c=this.$getTop(s.start.row,l),p=this.$padding+s.start.column*l.characterWidth;o.renderer(n,s,p,c,l)}else o.type=="fullLine"?this.drawFullLineMarker(n,s,o.clazz,l):o.type=="screenLine"?this.drawScreenLineMarker(n,s,o.clazz,l):s.isMultiLine()?o.type=="text"?this.drawTextMarker(n,s,o.clazz,l):this.drawMultiLineMarker(n,s,o.clazz,l):this.drawSingleLineMarker(n,s,o.clazz+" ace_start ace_br15",l)}if(this.i!=-1)for(;this.i_,v==$),o,v==$?0:1,s)},f.prototype.drawMultiLineMarker=function(l,n,i,o,s){var c=this.$padding,p=o.lineHeight,$=this.$getTop(n.start.row,o),v=c+n.start.column*o.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(n.start.row)){var C=n.clone();C.end.row=C.start.row,C.end.column=this.session.getLine(C.start.row).length,this.drawBidiSingleLineMarker(l,C,i+" ace_br1 ace_start",o,null,s)}else this.elt(i+" ace_br1 ace_start","height:"+p+"px;right:0;top:"+$+"px;left:"+v+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(n.end.row)){var C=n.clone();C.start.row=C.end.row,C.start.column=0,this.drawBidiSingleLineMarker(l,C,i+" ace_br12",o,null,s)}else{$=this.$getTop(n.end.row,o);var y=n.end.column*o.characterWidth;this.elt(i+" ace_br12","height:"+p+"px;width:"+y+"px;top:"+$+"px;left:"+c+"px;"+(s||""))}if(p=(n.end.row-n.start.row-1)*o.lineHeight,!(p<=0)){$=this.$getTop(n.start.row+1,o);var _=(n.start.column?1:0)|(n.end.column?0:8);this.elt(i+(_?" ace_br"+_:""),"height:"+p+"px;right:0;top:"+$+"px;left:"+c+"px;"+(s||""))}},f.prototype.drawSingleLineMarker=function(l,n,i,o,s,c){if(this.session.$bidiHandler.isBidiRow(n.start.row))return this.drawBidiSingleLineMarker(l,n,i,o,s,c);var p=o.lineHeight,$=(n.end.column+(s||0)-n.start.column)*o.characterWidth,v=this.$getTop(n.start.row,o),C=this.$padding+n.start.column*o.characterWidth;this.elt(i,"height:"+p+"px;width:"+$+"px;top:"+v+"px;left:"+C+"px;"+(c||""))},f.prototype.drawBidiSingleLineMarker=function(l,n,i,o,s,c){var p=o.lineHeight,$=this.$getTop(n.start.row,o),v=this.$padding,C=this.session.$bidiHandler.getSelections(n.start.column,n.end.column);C.forEach(function(y){this.elt(i,"height:"+p+"px;width:"+(y.width+(s||0))+"px;top:"+$+"px;left:"+(v+y.left)+"px;"+(c||""))},this)},f.prototype.drawFullLineMarker=function(l,n,i,o,s){var c=this.$getTop(n.start.row,o),p=o.lineHeight;n.start.row!=n.end.row&&(p+=this.$getTop(n.end.row,o)-c),this.elt(i,"height:"+p+"px;top:"+c+"px;left:0;right:0;"+(s||""))},f.prototype.drawScreenLineMarker=function(l,n,i,o,s){var c=this.$getTop(n.start.row,o),p=o.lineHeight;this.elt(i,"height:"+p+"px;top:"+c+"px;left:0;right:0;"+(s||""))},f}();u.prototype.$padding=0;function r(f,l,n,i){return(f?1:0)|(l?2:0)|(n?4:0)|(i?8:0)}h.Marker=u}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,h,m){var g=new Set(["text","rparen","lparen"]);h.isTextToken=function(a){return g.has(a)}}),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(e,h,m){var g=e("../lib/oop"),a=e("../lib/dom"),u=e("../lib/lang"),r=e("./lines").Lines,f=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,n=e("./text_util").isTextToken,i=function(){function o(s){this.dom=a,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new r(this.element)}return o.prototype.$updateEolChar=function(){var s=this.session.doc,c=s.getNewLineCharacter()==` `&&s.getNewLineMode()!="windows",p=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=p)return this.EOL_CHAR=p,!0},o.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"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(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",function(c){this._signal("changeCharacterSize",c)}.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(s){this.session=s,s&&this.$computeTabString()},o.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},o.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},o.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},o.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var c=this.$tabStrings=[0],p=1;px&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),x=E?E.start.row:1/0),!(b>v);){var O=C[y++];if(O){this.dom.removeChildren(O),this.$renderLine(O,b,b==x?E:!1),_&&(O.style.top=this.$lines.computeLineTop(b,s,this.session)+"px");var M=s.lineHeight*this.session.getRowLength(b)+"px";O.style.height!=M&&(_=!0,O.style.height=M)}b++}if(_)for(;y0;v--)this.$lines.shift();if(c.lastRow>s.lastRow)for(var v=this.session.getFoldedRowCount(s.lastRow+1,c.lastRow);v>0;v--)this.$lines.pop();s.firstRowc.lastRow&&this.$lines.push(this.$renderLinesFragment(s,c.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},o.prototype.$renderLinesFragment=function(s,c,p){for(var $=[],v=c,C=this.session.getNextFoldLine(v),y=C?C.start.row:1/0;v>y&&(v=C.end.row+1,C=this.session.getNextFoldLine(v,C),y=C?C.start.row:1/0),!(v>p);){var _=this.$lines.createCell(v,s,this.session),b=_.element;this.dom.removeChildren(b),a.setStyle(b.style,"height",this.$lines.computeLineHeight(v,s,this.session)+"px"),a.setStyle(b.style,"top",this.$lines.computeLineTop(v,s,this.session)+"px"),this.$renderLine(b,v,v==y?C:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",$.push(_),v++}return $},o.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var c=s.firstRow,p=s.lastRow,$=this.$lines;$.getLength();)$.pop();$.push(this.$renderLinesFragment(s,c,p))},o.prototype.$renderToken=function(s,c,p,$){for(var v=this,C=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,y=this.dom.createFragment(this.element),_,b=0;_=C.exec($);){var E=_[1],x=_[2],O=_[3],M=_[4],k=_[5];if(!(!v.showSpaces&&x)){var T=b!=_.index?$.slice(b,_.index):"";if(b=_.index+_[0].length,T&&y.appendChild(this.dom.createTextNode(T,this.element)),E){var S=v.session.getScreenTabSize(c+_.index);y.appendChild(v.$tabStrings[S].cloneNode(!0)),c+=S-1}else if(x)if(v.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=u.stringRepeat(v.SPACE_CHAR,x.length),y.appendChild(w)}else y.appendChild(this.dom.createTextNode(x,this.element));else if(O){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=u.stringRepeat(v.SPACE_CHAR,O.length),y.appendChild(w)}else if(M){c+=1;var w=this.dom.createElement("span");w.style.width=v.config.characterWidth*2+"px",w.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=v.showSpaces?v.SPACE_CHAR:M,y.appendChild(w)}else if(k){c+=1;var w=this.dom.createElement("span");w.style.width=v.config.characterWidth*2+"px",w.className="ace_cjk",w.textContent=k,y.appendChild(w)}}}if(y.appendChild(this.dom.createTextNode(b?$.slice(b):$,this.element)),n(p.type))s.appendChild(y);else{var L="ace_"+p.type.replace(/\./g," ace_"),w=this.dom.createElement("span");p.type=="fold"&&(w.style.width=p.value.length*this.config.characterWidth+"px",w.setAttribute("title",l("Unfold code"))),w.className=L,w.appendChild(y),s.appendChild(w)}return c+$.length},o.prototype.renderIndentGuide=function(s,c,p){var $=c.search(this.$indentGuideRe);if($<=0||$>=p)return c;if(c[0]==" "){$-=$%this.tabSize;for(var v=$/this.tabSize,C=0;CC[y].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[c.row]!==""&&c.column===s[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var y=c.row+1;y0){for(var v=0;v<$.length;v++)if($[v].classList&&$[v].classList.contains("ace_indent-guide-active")){$[v].classList.remove("ace_indent-guide-active");break}}}},o.prototype.$setIndentGuideActive=function(s,c){var p=this.session.doc.getLine(s.row);if(p!==""){var $=s.element.childNodes;if($){var v=$[c-1];v&&v.classList&&v.classList.contains("ace_indent-guide")&&v.classList.add("ace_indent-guide-active")}}},o.prototype.$renderHighlightIndentGuide=function(){if(!!this.$lines){var s=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var p=0;p=this.$highlightIndentGuideMarker.start+1){if($.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive($,c)}}else for(var p=s.length-1;p>=0;p--){var $=s[p];if(this.$highlightIndentGuideMarker.end&&$.row=C;)y=this.$renderToken(_,y,E,x.substring(0,C-$)),x=x.substring(C-$),$=C,_=this.$createLineElement(),s.appendChild(_),_.appendChild(this.dom.createTextNode(u.stringRepeat("\xA0",p.indent),this.element)),v++,y=0,C=p[v]||Number.MAX_VALUE;x.length!=0&&($+=x.length,y=this.$renderToken(_,y,E,x))}}p[p.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,y,null,"",!0)},o.prototype.$renderSimpleLine=function(s,c){for(var p=0,$=0;$this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,p,v,C);p=this.$renderToken(s,p,v,C)}}},o.prototype.$renderOverflowMessage=function(s,c,p,$,v){p&&this.$renderToken(s,c,p,$.slice(0,this.MAX_LINE_LENGTH-c));var C=this.dom.createElement("span");C.className="ace_inline_button ace_keyword ace_toggle_wrap",C.textContent=v?"":"",s.appendChild(C)},o.prototype.$renderLine=function(s,c,p){if(!p&&p!=!1&&(p=this.session.getFoldLine(c)),p)var $=this.$getFoldLineTokens(c,p);else var $=this.session.getTokens(c);var v=s;if($.length){var C=this.session.getRowSplitData(c);if(C&&C.length){this.$renderWrappedLine(s,$,C);var v=s.lastChild}else{var v=s;this.$useLineGroups()&&(v=this.$createLineElement(),s.appendChild(v)),this.$renderSimpleLine(v,$)}}else this.$useLineGroups()&&(v=this.$createLineElement(),s.appendChild(v));if(this.showEOL&&v){p&&(c=p.end.row);var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_eol",y.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(y)}},o.prototype.$getFoldLineTokens=function(s,c){var p=this.session,$=[];function v(y,_,b){for(var E=0,x=0;x+y[E].value.length<_;)if(x+=y[E].value.length,E++,E==y.length)return;if(x!=_){var O=y[E].value.substring(_-x);O.length>b-_&&(O=O.substring(0,b-_)),$.push({type:y[E].type,value:O}),x=_+O.length,E+=1}for(;xb?$.push({type:y[E].type,value:O.substring(0,b-x)}):$.push(y[E]),x+=O.length,E+=1}}var C=p.getTokens(s);return c.walk(function(y,_,b,E,x){y!=null?$.push({type:"fold",value:y}):(x&&(C=p.getTokens(_)),C.length&&v(C,E,b))},c.end.row,this.session.getLine(c.end.row).length),$},o.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},o}();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,g.implement(i.prototype,f),h.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,h,m){var g=e("../lib/dom"),a=function(){function u(r){this.element=g.createElement("div"),this.element.className="ace_layer ace_cursor-layer",r.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),g.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return u.prototype.$updateOpacity=function(r){for(var f=this.cursors,l=f.length;l--;)g.setStyle(f[l].style,"opacity",r?"":"0")},u.prototype.$startCssAnimation=function(){for(var r=this.cursors,f=r.length;f--;)r[f].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},u.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,g.removeCssClass(this.element,"ace_animate-blinking")},u.prototype.setPadding=function(r){this.$padding=r},u.prototype.setSession=function(r){this.session=r},u.prototype.setBlinking=function(r){r!=this.isBlinking&&(this.isBlinking=r,this.restartTimer())},u.prototype.setBlinkInterval=function(r){r!=this.blinkInterval&&(this.blinkInterval=r,this.restartTimer())},u.prototype.setSmoothBlinking=function(r){r!=this.smoothBlinking&&(this.smoothBlinking=r,g.setCssClass(this.element,"ace_smooth-blinking",r),this.$updateCursors(!0),this.restartTimer())},u.prototype.addCursor=function(){var r=g.createElement("div");return r.className="ace_cursor",this.element.appendChild(r),this.cursors.push(r),r},u.prototype.removeCursor=function(){if(this.cursors.length>1){var r=this.cursors.pop();return r.parentNode.removeChild(r),r}},u.prototype.hideCursor=function(){this.isVisible=!1,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},u.prototype.showCursor=function(){this.isVisible=!0,g.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},u.prototype.restartTimer=function(){var r=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,g.removeCssClass(this.element,"ace_smooth-blinking")),r(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&g.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),g.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var f=function(){this.timeoutId=setTimeout(function(){r(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){r(!0),f()},this.blinkInterval),f()}},u.prototype.getPixelPosition=function(r,f){if(!this.config||!this.session)return{left:0,top:0};r||(r=this.session.selection.getCursor());var l=this.session.documentToScreenPosition(r),n=this.$padding+(this.session.$bidiHandler.isBidiRow(l.row,r.row)?this.session.$bidiHandler.getPosLeft(l.column):l.column*this.config.characterWidth),i=(l.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:i}},u.prototype.isCursorInView=function(r,f){return r.top>=0&&r.topr.height+r.offset||o.top<0)&&l>1)){var s=this.cursors[n++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,o,r,f[l],this.session):this.isCursorInView(o,r)?(g.setStyle(c,"display","block"),g.translate(s,o.left,o.top),g.setStyle(c,"width",Math.round(r.characterWidth)+"px"),g.setStyle(c,"height",r.lineHeight+"px")):g.setStyle(c,"display","none")}}for(;this.cursors.length>n;)this.removeCursor();var p=this.session.getOverwrite();this.$setOverwrite(p),this.$pixelPos=o,this.restartTimer()},u.prototype.$setOverwrite=function(r){r!=this.overwrite&&(this.overwrite=r,r?g.addCssClass(this.element,"ace_overwrite-cursors"):g.removeCssClass(this.element,"ace_overwrite-cursors"))},u.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},u}();a.prototype.$padding=0,a.prototype.drawCursor=null,h.Cursor=a}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,h,m){var g=this&&this.__extends||function(){var s=function(c,p){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,v){$.__proto__=v}||function($,v){for(var C in v)Object.prototype.hasOwnProperty.call(v,C)&&($[C]=v[C])},s(c,p)};return function(c,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");s(c,p);function $(){this.constructor=c}c.prototype=p===null?Object.create(p):($.prototype=p.prototype,new $)}}(),a=e("./lib/oop"),u=e("./lib/dom"),r=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter,l=32768,n=function(){function s(c,p){this.element=u.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+p,this.inner=u.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),c.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)}return s.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},s}();a.implement(n.prototype,f);var i=function(s){g(c,s);function c(p,$){var v=s.call(this,p,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,$.$scrollbarWidth=v.width=u.scrollbarWidth(p.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var p=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-p)/(this.coeff-p)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(p){this.element.style.height=p+"px"},c.prototype.setScrollHeight=function(p){this.scrollHeight=p,p>l?(this.coeff=l/p,p=l):this.coeff!=1&&(this.coeff=1),this.inner.style.height=p+"px"},c.prototype.setScrollTop=function(p){this.scrollTop!=p&&(this.skipEvent=!0,this.scrollTop=p,this.element.scrollTop=p*this.coeff)},c}(n);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var o=function(s){g(c,s);function c(p,$){var v=s.call(this,p,"-h")||this;return v.scrollLeft=0,v.height=$.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(p){this.element.style.width=p+"px"},c.prototype.setInnerWidth=function(p){this.inner.style.width=p+"px"},c.prototype.setScrollWidth=function(p){this.inner.style.width=p+"px"},c.prototype.setScrollLeft=function(p){this.scrollLeft!=p&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=p)},c}(n);h.ScrollBar=i,h.ScrollBarV=i,h.ScrollBarH=o,h.VScrollBar=i,h.HScrollBar=o}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,h,m){var g=this&&this.__extends||function(){var o=function(s,c){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,$){p.__proto__=$}||function(p,$){for(var v in $)Object.prototype.hasOwnProperty.call($,v)&&(p[v]=$[v])},o(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");o(s,c);function p(){this.constructor=s}s.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}}(),a=e("./lib/oop"),u=e("./lib/dom"),r=e("./lib/event"),f=e("./lib/event_emitter").EventEmitter;u.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);var l=function(){function o(s,c){this.element=u.createElement("div"),this.element.className="ace_sb"+c,this.inner=u.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return o.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},o}();a.implement(l.prototype,f);var n=function(o){g(s,o);function s(c,p){var $=o.call(this,c,"-v")||this;return $.scrollTop=0,$.scrollHeight=0,$.parent=c,$.width=$.VScrollWidth,$.renderer=p,$.inner.style.width=$.element.style.width=($.width||15)+"px",$.$minWidth=0,$}return s.prototype.onMouseDown=function(c,p){if(c==="mousedown"&&!(r.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var $=this,v=p.clientY,C=function(M){v=M.clientY},y=function(){clearInterval(x)},_=p.clientY,b=this.thumbTop,E=function(){if(v!==void 0){var M=$.scrollTopFromThumbTop(b+v-_);M!==$.scrollTop&&$._emit("scroll",{data:M})}};r.capture(this.inner,C,y);var x=setInterval(E,20);return r.preventDefault(p)}var O=p.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(O)}),r.preventDefault(p)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(c){var p=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return p=p>>0,p<0?p=0:p>this.pageHeight-this.viewHeight&&(p=this.pageHeight-this.viewHeight),p},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(c,p){this.pageHeight===c&&!p||(this.pageHeight=c,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})))},s.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s}(l);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var i=function(o){g(s,o);function s(c,p){var $=o.call(this,c,"-h")||this;return $.scrollLeft=0,$.scrollWidth=0,$.height=$.HScrollHeight,$.inner.style.height=$.element.style.height=($.height||12)+"px",$.renderer=p,$}return s.prototype.onMouseDown=function(c,p){if(c==="mousedown"&&!(r.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var $=this,v=p.clientX,C=function(M){v=M.clientX},y=function(){clearInterval(x)},_=p.clientX,b=this.thumbLeft,E=function(){if(v!==void 0){var M=$.scrollLeftFromThumbLeft(b+v-_);M!==$.scrollLeft&&$._emit("scroll",{data:M})}};r.capture(this.inner,C,y);var x=setInterval(E,20);return r.preventDefault(p)}var O=p.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(O)}),r.preventDefault(p)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(c){var p=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return p=p>>0,p<0?p=0:p>this.pageWidth-this.viewWidth&&(p=this.pageWidth-this.viewWidth),p},s.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(c,p){this.pageWidth===c&&!p||(this.pageWidth=c,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})))},s.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s}(l);i.prototype.setInnerWidth=i.prototype.setScrollWidth,h.ScrollBar=n,h.ScrollBarV=n,h.ScrollBarH=i,h.VScrollBar=n,h.HScrollBar=i}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,h,m){var g=e("./lib/event"),a=function(){function u(r,f){this.onRender=r,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=f||window;var l=this;this._flush=function(n){l.pending=!1;var i=l.changes;if(i&&(g.blockIdle(100),l.changes=0,l.onRender(i)),l.changes){if(l.$recursionLimit--<0)return;l.schedule()}else l.$recursionLimit=2}}return u.prototype.schedule=function(r){this.changes=this.changes|r,this.changes&&!this.pending&&(g.nextFrame(this._flush),this.pending=!0)},u.prototype.clear=function(r){var f=this.changes;return this.changes=0,f},u}();h.RenderLoop=a}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,h,m){var g=e("../lib/oop"),a=e("../lib/dom"),u=e("../lib/lang"),r=e("../lib/event"),f=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,n=512,i=typeof ResizeObserver=="function",o=200,s=function(){function c(p){this.el=a.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=a.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=a.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),p.appendChild(this.el),this.$measureNode.textContent=u.stringRepeat("X",n),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(p,$){p.width=p.height="auto",p.left=p.top="0px",p.visibility="hidden",p.position="absolute",p.whiteSpace="pre",f.isIE<8?p["font-family"]="inherit":p.font="inherit",p.overflow=$?"hidden":"visible"},c.prototype.checkForSizeChanges=function(p){if(p===void 0&&(p=this.$measureSizes()),p&&(this.$characterSize.width!==p.width||this.$characterSize.height!==p.height)){this.$measureNode.style.fontWeight="bold";var $=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=p,this.charSizes=Object.create(null),this.allowBoldFonts=$&&$.width===p.width&&$.height===p.height,this._emit("changeCharacterSize",{data:p})}},c.prototype.$addObserver=function(){var p=this;this.$observer=new window.ResizeObserver(function($){p.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var p=this;return this.$pollSizeChangesTimer=r.onIdle(function $(){p.checkForSizeChanges(),r.onIdle($,500)},500)},c.prototype.setPolling=function(p){p?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(p){var $={height:(p||this.$measureNode).clientHeight,width:(p||this.$measureNode).clientWidth/n};return $.width===0||$.height===0?null:$},c.prototype.$measureCharWidth=function(p){this.$main.textContent=u.stringRepeat(p,n);var $=this.$main.getBoundingClientRect();return $.width/n},c.prototype.getCharacterWidth=function(p){var $=this.charSizes[p];return $===void 0&&($=this.charSizes[p]=this.$measureCharWidth(p)/this.$characterSize.width),$},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(p){return!p||!p.parentElement?1:(window.getComputedStyle(p).zoom||1)*this.$getZoom(p.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var p=function($,v){return["div",{style:"position: absolute;top:"+$+"px;left:"+v+"px;"}]};this.els=a.buildDom([p(0,0),p(o,0),p(0,o),p(o,o)],this.el)},c.prototype.transformCoordinates=function(p,$){if(p){var v=this.$getZoom(this.el);p=b(1/v,p)}function C(V,R,B){var N=V[1]*R[0]-V[0]*R[1];return[(-R[1]*B[0]+R[0]*B[1])/N,(+V[1]*B[0]-V[0]*B[1])/N]}function y(V,R){return[V[0]-R[0],V[1]-R[1]]}function _(V,R){return[V[0]+R[0],V[1]+R[1]]}function b(V,R){return[V*R[0],V*R[1]]}this.els||this.$initTransformMeasureNodes();function E(V){var R=V.getBoundingClientRect();return[R.left,R.top]}var x=E(this.els[0]),O=E(this.els[1]),M=E(this.els[2]),k=E(this.els[3]),T=C(y(k,O),y(k,M),y(_(O,M),_(k,x))),S=b(1+T[0],y(O,x)),w=b(1+T[1],y(M,x));if($){var L=$,q=T[0]*L[0]/o+T[1]*L[1]/o+1,A=_(b(L[0],S),b(L[1],w));return _(b(1/q/o,A),x)}var I=y(p,x),F=C(y(S,b(T[0],I)),y(w,b(T[1],I)),I);return b(o,F)},c}();s.prototype.$characterSize={width:0,height:0},g.implement(s.prototype,l),h.FontMetrics=s}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,h,m){m.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-wrap; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; overflow: auto; max-width: min(60em, 66vw); overscroll-behavior: contain; } .ace_tooltip pre { white-space: pre-wrap; } .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_screenreader-only { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,h,m){var g=e("../lib/dom"),a=e("../lib/oop"),u=e("../lib/event_emitter").EventEmitter,r=function(){function f(l,n){this.canvas=g.createElement("canvas"),this.renderer=n,this.pixelRatio=1,this.maxHeight=n.layerConfig.maxHeight,this.lineHeight=n.layerConfig.lineHeight,this.canvasHeight=l.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=l.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=0+"px",this.canvas.style.right=0+"px",this.canvas.style.zIndex=7+"px",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)"},l.element.appendChild(this.canvas)}return f.prototype.$updateDecorators=function(l){var n=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(l){this.maxHeight=l.maxHeight,this.lineHeight=l.lineHeight,this.canvasHeight=l.height;var i=(l.lastRow+1)*this.lineHeight;iT.priority?1:0}var c=this.renderer.session.$annotations;if(o.clearRect(0,0,this.canvas.width,this.canvas.height),c){var p={info:1,warning:2,error:3};c.forEach(function(k){k.priority=p[k.type]||null}),c=c.sort(s);for(var $=this.renderer.session.$foldData,v=0;vthis.canvasHeight&&(O=this.canvasHeight-this.halfMinDecorationHeight),b=Math.round(O-this.halfMinDecorationHeight),E=Math.round(O+this.halfMinDecorationHeight)}o.fillStyle=n[c[v].type]||null,o.fillRect(0,_,this.canvasWidth,E-b)}}var M=this.renderer.session.selection.getCursor();if(M){var y=this.compensateFoldRows(M.row,$),_=Math.round((M.row-y)*this.lineHeight*this.heightRatio);o.fillStyle="rgba(0, 0, 0, 0.5)",o.fillRect(0,_,this.canvasWidth,2)}},f.prototype.compensateFoldRows=function(l,n){var i=0;if(n&&n.length>0)for(var o=0;on[o].start.row&&l=n[o].end.row&&(i+=n[o].end.row-n[o].start.row);return i},f}();a.implement(r.prototype,u),h.Decorator=r}),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,h,m){var g=e("./lib/oop"),a=e("./lib/dom"),u=e("./lib/lang"),r=e("./config"),f=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,n=e("./layer/text").Text,i=e("./layer/cursor").Cursor,o=e("./scrollbar").HScrollBar,s=e("./scrollbar").VScrollBar,c=e("./scrollbar_custom").HScrollBar,p=e("./scrollbar_custom").VScrollBar,$=e("./renderloop").RenderLoop,v=e("./layer/font_metrics").FontMetrics,C=e("./lib/event_emitter").EventEmitter,y=e("./css/editor-css"),_=e("./layer/decorators").Decorator,b=e("./lib/useragent");a.importCssString(y,"ace_editor.css",!1);var E=function(){function x(O,M){var k=this;this.container=O||a.createElement("div"),a.addCssClass(this.container,"ace_editor"),a.HI_DPI&&a.addCssClass(this.container,"ace_hidpi"),this.setTheme(M),r.get("useStrictCSP")==null&&r.set("useStrictCSP",!1),this.$gutter=a.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=a.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=a.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var T=this.$textLayer=new n(this.content);this.canvas=T.element,this.$markerFront=new l(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.on("scroll",function(S){k.$scrollAnimation||k.session.setScrollTop(S.data-k.scrollMargin.top)}),this.scrollBarH.on("scroll",function(S){k.$scrollAnimation||k.session.setScrollLeft(S.data-k.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(S){k.updateCharacterSize(),k.onResize(!0,k.gutterWidth,k.$size.width,k.$size.height),k._signal("changeCharacterSize",S)}),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=!b.isIOS,this.$loop=new $(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),r.resetOptions(this),r._signal("renderer",this)}return x.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(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},x.prototype.setSession=function(O){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=O,O&&this.scrollMargin.top&&O.getScrollTop()<=0&&O.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(O),this.$markerBack.setSession(O),this.$markerFront.setSession(O),this.$gutterLayer.setSession(O),this.$textLayer.setSession(O),!!O&&(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))},x.prototype.updateLines=function(O,M,k){if(M===void 0&&(M=1/0),this.$changedLines?(this.$changedLines.firstRow>O&&(this.$changedLines.firstRow=O),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},x.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},x.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},x.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},x.prototype.updateFull=function(O){O?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},x.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},x.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},x.prototype.onResize=function(O,M,k,T){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=O?1:0;var S=this.container;T||(T=S.clientHeight||S.scrollHeight),k||(k=S.clientWidth||S.scrollWidth);var w=this.$updateCachedSize(O,M,k,T);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!k&&!T)return this.resizing=0;O&&(this.$gutterLayer.$padding=null),O?this.$renderChanges(w|this.$changes,!0):this.$loop.schedule(w|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},x.prototype.$updateCachedSize=function(O,M,k,T){T-=this.$extraHeight||0;var S=0,w=this.$size,L={width:w.width,height:w.height,scrollerHeight:w.scrollerHeight,scrollerWidth:w.scrollerWidth};if(T&&(O||w.height!=T)&&(w.height=T,S|=this.CHANGE_SIZE,w.scrollerHeight=w.height,this.$horizScroll&&(w.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(w.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),k&&(O||w.width!=k)){S|=this.CHANGE_SIZE,w.width=k,M==null&&(M=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=M,a.setStyle(this.scrollBarH.element.style,"left",M+"px"),a.setStyle(this.scroller.style,"left",M+this.margin.left+"px"),w.scrollerWidth=Math.max(0,k-M-this.scrollBarV.getWidth()-this.margin.h),a.setStyle(this.$gutter.style,"left",this.margin.left+"px");var q=this.scrollBarV.getWidth()+"px";a.setStyle(this.scrollBarH.element.style,"right",q),a.setStyle(this.scroller.style,"right",q),a.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(w.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||O)&&(S|=this.CHANGE_FULL)}return w.$dirty=!k||!T,S&&this._signal("resize",L),S},x.prototype.onGutterResize=function(O){var M=this.$showGutter?O:0;M!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,M,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},x.prototype.adjustWrapLimit=function(){var O=this.$size.scrollerWidth-this.$padding*2,M=Math.floor(O/this.characterWidth);return this.session.adjustWrapLimit(M,this.$showPrintMargin&&this.$printMarginColumn)},x.prototype.setAnimatedScroll=function(O){this.setOption("animatedScroll",O)},x.prototype.getAnimatedScroll=function(){return this.$animatedScroll},x.prototype.setShowInvisibles=function(O){this.setOption("showInvisibles",O),this.session.$bidiHandler.setShowInvisibles(O)},x.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},x.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},x.prototype.setDisplayIndentGuides=function(O){this.setOption("displayIndentGuides",O)},x.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},x.prototype.setHighlightIndentGuides=function(O){this.setOption("highlightIndentGuides",O)},x.prototype.setShowPrintMargin=function(O){this.setOption("showPrintMargin",O)},x.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},x.prototype.setPrintMarginColumn=function(O){this.setOption("printMarginColumn",O)},x.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},x.prototype.getShowGutter=function(){return this.getOption("showGutter")},x.prototype.setShowGutter=function(O){return this.setOption("showGutter",O)},x.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},x.prototype.setFadeFoldWidgets=function(O){this.setOption("fadeFoldWidgets",O)},x.prototype.setHighlightGutterLine=function(O){this.setOption("highlightGutterLine",O)},x.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},x.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var O=a.createElement("div");O.className="ace_layer ace_print-margin-layer",this.$printMarginEl=a.createElement("div"),this.$printMarginEl.className="ace_print-margin",O.appendChild(this.$printMarginEl),this.content.insertBefore(O,this.content.firstChild)}var M=this.$printMarginEl.style;M.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",M.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},x.prototype.getContainerElement=function(){return this.container},x.prototype.getMouseEventTarget=function(){return this.scroller},x.prototype.getTextAreaContainer=function(){return this.container},x.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var O=this.textarea.style,M=this.$composition;if(!this.$keepTextAreaAtCursor&&!M){a.translate(this.textarea,-100,0);return}var k=this.$cursorLayer.$pixelPos;if(!!k){M&&M.markerRange&&(k=this.$cursorLayer.getPixelPosition(M.markerRange.start,!0));var T=this.layerConfig,S=k.top,w=k.left;S-=T.offset;var L=M&&M.useTextareaForIME||b.isMobile?this.lineHeight:1;if(S<0||S>T.height-L){a.translate(this.textarea,0,0);return}var q=1,A=this.$size.height-L;if(!M)S+=this.lineHeight;else if(M.useTextareaForIME){var I=this.textarea.value;q=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else S+=this.lineHeight+2;w-=this.scrollLeft,w>this.$size.scrollerWidth-q&&(w=this.$size.scrollerWidth-q),w+=this.gutterWidth+this.margin.left,a.setStyle(O,"height",L+"px"),a.setStyle(O,"width",q+"px"),a.translate(this.textarea,Math.min(w,this.$size.scrollerWidth-q),Math.min(S,A))}}},x.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},x.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},x.prototype.getLastFullyVisibleRow=function(){var O=this.layerConfig,M=O.lastRow,k=this.session.documentToScreenRow(M,0)*O.lineHeight;return k-this.session.getScrollTop()>O.height-O.lineHeight?M-1:M},x.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},x.prototype.setPadding=function(O){this.$padding=O,this.$textLayer.setPadding(O),this.$cursorLayer.setPadding(O),this.$markerFront.setPadding(O),this.$markerBack.setPadding(O),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},x.prototype.setScrollMargin=function(O,M,k,T){var S=this.scrollMargin;S.top=O|0,S.bottom=M|0,S.right=T|0,S.left=k|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},x.prototype.setMargin=function(O,M,k,T){var S=this.margin;S.top=O|0,S.bottom=M|0,S.right=T|0,S.left=k|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},x.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},x.prototype.setHScrollBarAlwaysVisible=function(O){this.setOption("hScrollBarAlwaysVisible",O)},x.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},x.prototype.setVScrollBarAlwaysVisible=function(O){this.setOption("vScrollBarAlwaysVisible",O)},x.prototype.$updateScrollBarV=function(){var O=this.layerConfig.maxHeight,M=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(O-=(M-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>O-M&&(O=this.scrollTop+M,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(O+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},x.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},x.prototype.freeze=function(){this.$frozen=!0},x.prototype.unfreeze=function(){this.$frozen=!1},x.prototype.$renderChanges=function(O,M){if(this.$changes&&(O|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!O&&!M){this.$changes|=O;return}if(this.$size.$dirty)return this.$changes|=O,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",O),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var k=this.layerConfig;if(O&this.CHANGE_FULL||O&this.CHANGE_SIZE||O&this.CHANGE_TEXT||O&this.CHANGE_LINES||O&this.CHANGE_SCROLL||O&this.CHANGE_H_SCROLL){if(O|=this.$computeLayerConfig()|this.$loop.clear(),k.firstRow!=this.layerConfig.firstRow&&k.firstRowScreen==this.layerConfig.firstRowScreen){var T=this.scrollTop+(k.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;T>0&&(this.scrollTop=T,O=O|this.CHANGE_SCROLL,O|=this.$computeLayerConfig()|this.$loop.clear())}k=this.layerConfig,this.$updateScrollBarV(),O&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-k.offset);var S=k.width+2*this.$padding+"px",w=k.minHeight+"px";a.setStyle(this.content.style,"width",S),a.setStyle(this.content.style,"height",w)}if(O&this.CHANGE_H_SCROLL&&(a.translate(this.content,-this.scrollLeft,-k.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),O&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",O);return}if(O&this.CHANGE_SCROLL){this.$changedLines=null,O&this.CHANGE_TEXT||O&this.CHANGE_LINES?this.$textLayer.update(k):this.$textLayer.scrollLines(k),this.$showGutter&&(O&this.CHANGE_GUTTER||O&this.CHANGE_LINES?this.$gutterLayer.update(k):this.$gutterLayer.scrollLines(k)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",O);return}O&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):O&this.CHANGE_LINES?((this.$updateLines()||O&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):O&this.CHANGE_TEXT||O&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):O&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)),O&this.CHANGE_CURSOR&&(this.$cursorLayer.update(k),this.$moveTextAreaToCursor()),O&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(k),O&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(k),this._signal("afterRender",O)},x.prototype.$autosize=function(){var O=this.session.getScreenLength()*this.lineHeight,M=this.$maxLines*this.lineHeight,k=Math.min(M,Math.max((this.$minLines||1)*this.lineHeight,O))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(k+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&k>this.$maxPixelHeight&&(k=this.$maxPixelHeight);var T=k<=2*this.lineHeight,S=!T&&O>M;if(k!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var w=this.container.clientWidth;this.container.style.height=k+"px",this.$updateCachedSize(!0,this.$gutterWidth,w,k),this.desiredHeight=k,this._signal("autosize")}},x.prototype.$computeLayerConfig=function(){var O=this.session,M=this.$size,k=M.height<=2*this.lineHeight,T=this.session.getScreenLength(),S=T*this.lineHeight,w=this.$getLongestLine(),L=!k&&(this.$hScrollBarAlwaysVisible||M.scrollerWidth-w-2*this.$padding<0),q=this.$horizScroll!==L;q&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var A=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var I=M.scrollerHeight+this.lineHeight,F=!this.$maxLines&&this.$scrollPastEnd?(M.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=F;var V=this.scrollMargin;this.session.setScrollTop(Math.max(-V.top,Math.min(this.scrollTop,S-M.scrollerHeight+V.bottom))),this.session.setScrollLeft(Math.max(-V.left,Math.min(this.scrollLeft,w+2*this.$padding-M.scrollerWidth+V.right)));var R=!k&&(this.$vScrollBarAlwaysVisible||M.scrollerHeight-S+F<0||this.scrollTop>V.top),B=A!==R;B&&(this.$vScroll=R,this.scrollBarV.setVisible(R));var N=this.scrollTop%this.lineHeight,P=Math.ceil(I/this.lineHeight)-1,j=Math.max(0,Math.round((this.scrollTop-N)/this.lineHeight)),D=j+P,W,H,z=this.lineHeight;j=O.screenToDocumentRow(j,0);var K=O.getFoldLine(j);K&&(j=K.start.row),W=O.documentToScreenRow(j,0),H=O.getRowLength(j)*z,D=Math.min(O.screenToDocumentRow(D,0),O.getLength()-1),I=M.scrollerHeight+O.getRowLength(D)*z+H,N=this.scrollTop-W*z;var Z=0;return(this.layerConfig.width!=w||q)&&(Z=this.CHANGE_H_SCROLL),(q||B)&&(Z|=this.$updateCachedSize(!0,this.gutterWidth,M.width,M.height),this._signal("scrollbarVisibilityChanged"),B&&(w=this.$getLongestLine())),this.layerConfig={width:w,padding:this.$padding,firstRow:j,firstRowScreen:W,lastRow:D,lineHeight:z,characterWidth:this.characterWidth,minHeight:I,maxHeight:S,offset:N,gutterOffset:z?Math.max(0,Math.ceil((N+M.height-M.scrollerHeight)/z)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(w-this.$padding),Z},x.prototype.$updateLines=function(){if(!!this.$changedLines){var O=this.$changedLines.firstRow,M=this.$changedLines.lastRow;this.$changedLines=null;var k=this.layerConfig;if(!(O>k.lastRow+1)&&!(Mthis.$textLayer.MAX_LINE_LENGTH&&(O=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(O*this.characterWidth))},x.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},x.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},x.prototype.addGutterDecoration=function(O,M){this.$gutterLayer.addGutterDecoration(O,M)},x.prototype.removeGutterDecoration=function(O,M){this.$gutterLayer.removeGutterDecoration(O,M)},x.prototype.updateBreakpoints=function(O){this._rows=O,this.$loop.schedule(this.CHANGE_GUTTER)},x.prototype.setAnnotations=function(O){this.$gutterLayer.setAnnotations(O),this.$loop.schedule(this.CHANGE_GUTTER)},x.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},x.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},x.prototype.showCursor=function(){this.$cursorLayer.showCursor()},x.prototype.scrollSelectionIntoView=function(O,M,k){this.scrollCursorIntoView(O,k),this.scrollCursorIntoView(M,k)},x.prototype.scrollCursorIntoView=function(O,M,k){if(this.$size.scrollerHeight!==0){var T=this.$cursorLayer.getPixelPosition(O),S=T.left,w=T.top,L=k&&k.top||0,q=k&&k.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var A=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;A+L>w?(M&&A+L>w+this.lineHeight&&(w-=M*this.$size.scrollerHeight),w===0&&(w=-this.scrollMargin.top),this.session.setScrollTop(w)):A+this.$size.scrollerHeight-q=1-this.scrollMargin.top||M>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||O<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||O>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},x.prototype.pixelToScreenCoordinates=function(O,M){var k;if(this.$hasCssTransforms){k={top:0,left:0};var T=this.$fontMetrics.transformCoordinates([O,M]);O=T[1]-this.gutterWidth-this.margin.left,M=T[0]}else k=this.scroller.getBoundingClientRect();var S=O+this.scrollLeft-k.left-this.$padding,w=S/this.characterWidth,L=Math.floor((M+this.scrollTop-k.top)/this.lineHeight),q=this.$blockCursor?Math.floor(w):Math.round(w);return{row:L,column:q,side:w-q>0?1:-1,offsetX:S}},x.prototype.screenToTextCoordinates=function(O,M){var k;if(this.$hasCssTransforms){k={top:0,left:0};var T=this.$fontMetrics.transformCoordinates([O,M]);O=T[1]-this.gutterWidth-this.margin.left,M=T[0]}else k=this.scroller.getBoundingClientRect();var S=O+this.scrollLeft-k.left-this.$padding,w=S/this.characterWidth,L=this.$blockCursor?Math.floor(w):Math.round(w),q=Math.floor((M+this.scrollTop-k.top)/this.lineHeight);return this.session.screenToDocumentPosition(q,Math.max(L,0),S)},x.prototype.textToScreenCoordinates=function(O,M){var k=this.scroller.getBoundingClientRect(),T=this.session.documentToScreenPosition(O,M),S=this.$padding+(this.session.$bidiHandler.isBidiRow(T.row,O)?this.session.$bidiHandler.getPosLeft(T.column):Math.round(T.column*this.characterWidth)),w=T.row*this.lineHeight;return{pageX:k.left+S-this.scrollLeft,pageY:k.top+w-this.scrollTop}},x.prototype.visualizeFocus=function(){a.addCssClass(this.container,"ace_focus")},x.prototype.visualizeBlur=function(){a.removeCssClass(this.container,"ace_focus")},x.prototype.showComposition=function(O){this.$composition=O,O.cssText||(O.cssText=this.textarea.style.cssText),O.useTextareaForIME==null&&(O.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(a.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):O.markerId=this.session.addMarker(O.markerRange,"ace_composition_marker","text")},x.prototype.setCompositionText=function(O){var M=this.session.selection.cursor;this.addToken(O,"composition_placeholder",M.row,M.column),this.$moveTextAreaToCursor()},x.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),a.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var O=this.session.selection.cursor;this.removeExtraToken(O.row,O.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},x.prototype.setGhostText=function(O,M){var k=this.session.selection.cursor,T=M||{row:k.row,column:k.column};this.removeGhostText();var S=O.split(` `);if(this.addToken(S[0],"ghost_text",T.row,T.column),this.$ghostText={text:O,position:{row:T.row,column:T.column}},S.length>1){this.$ghostTextWidget={text:S.slice(1).join(` `),row:T.row,column:T.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var w=this.$cursorLayer.getPixelPosition(T,!0),L=this.container,q=L.getBoundingClientRect().height,A=S.length*this.lineHeight,I=A1||Math.abs(O.$size.height-T)>1?O.$resizeTimer.delay():O.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},x}();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,g.implement(E.prototype,C),r.defineOptions(E.prototype,"renderer",{useResizeObserver:{set:function(x){!x&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):x&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(x){this.$textLayer.setShowInvisibles(x)&&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(x){typeof x=="number"&&(this.$printMarginColumn=x),this.$showPrintMargin=!!x,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(x){this.$gutter.style.display=x?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(x){this.$gutterLayer.$useSvgGutterIcons=x},initialValue:!1},showFoldedAnnotations:{set:function(x){this.$gutterLayer.$showFoldedAnnotations=x},initialValue:!1},fadeFoldWidgets:{set:function(x){a.setCssClass(this.$gutter,"ace_fade-fold-widgets",x)},initialValue:!1},showFoldWidgets:{set:function(x){this.$gutterLayer.setShowFoldWidgets(x),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(x){this.$textLayer.setDisplayIndentGuides(x)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(x){this.$textLayer.setHighlightIndentGuides(x)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(x){this.$gutterLayer.setHighlightGutterLine(x),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(x){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(x){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(x){typeof x=="number"&&(x=x+"px"),this.container.style.fontSize=x,this.updateFontSize()},initialValue:12},fontFamily:{set:function(x){this.container.style.fontFamily=x,this.updateFontSize()}},maxLines:{set:function(x){this.updateFull()}},minLines:{set:function(x){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(x){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(x){x=+x||0,this.$scrollPastEnd!=x&&(this.$scrollPastEnd=x,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(x){this.$gutterLayer.$fixedWidth=!!x,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(x){this.$updateCustomScrollbar(x)},initialValue:!1},theme:{set:function(x){this.setTheme(x)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),h.VirtualRenderer=E}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,h,m){var g=e("../lib/oop"),a=e("../lib/net"),u=e("../lib/event_emitter").EventEmitter,r=e("../config");function f(o){var s="importScripts('"+a.qualifyURL(o)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,p=new c;return p.append(s),p.getBlob("application/javascript")}}function l(o){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(r.get("loadWorkerFromBlob")){var s=f(o),c=window.URL||window.webkitURL,p=c.createObjectURL(s);return new Worker(p)}return new Worker(o)}var n=function(o){o.postMessage||(o=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=o,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(){g.implement(this,u),this.$createWorkerFromOldConfig=function(o,s,c,p,$){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),r.get("packaged")||!e.toUrl)p=p||r.moduleUrl(s,"worker");else{var v=this.$normalizePath;p=p||v(e.toUrl("ace/worker/worker.js",null,"_"));var C={};o.forEach(function(y){C[y]=v(e.toUrl(y,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=l(p),$&&this.send("importScripts",$),this.$worker.postMessage({init:!0,tlns:C,module:s,classname:c}),this.$worker},this.onMessage=function(o){var s=o.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var c=this.callbacks[s.id];c&&(c(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(o){window.console&&console.error&&console.error(o)},this.$normalizePath=function(o){return a.qualifyURL(o)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(o){o.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(o,s){this.$worker.postMessage({command:o,args:s})},this.call=function(o,s,c){if(c){var p=this.callbackId++;this.callbacks[p]=c,s.push(p)}this.send(o,s)},this.emit=function(o,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:o,data:{data:s.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(o){this.$doc&&this.terminate(),this.$doc=o,this.call("setValue",[o.getValue()]),o.on("change",this.changeListener,!0)},this.changeListener=function(o){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),o.action=="insert"?this.deltaQueue.push(o.start,o.lines):this.deltaQueue.push(o.start,o.end)},this.$sendDeltaQueue=function(){var o=this.deltaQueue;!o||(this.deltaQueue=null,o.length>50&&o.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:o}))}}).call(n.prototype);var i=function(o,s,c){var p=null,$=!1,v=Object.create(u),C=[],y=new n({messageBuffer:C,terminate:function(){},postMessage:function(b){C.push(b),!!p&&($?setTimeout(_):_())}});y.setEmitSync=function(b){$=b};var _=function(){var b=C.shift();b.command?p[b.command].apply(p,b.args):b.event&&v._signal(b.event,b.data)};return v.postMessage=function(b){y.onMessage({data:b})},v.callback=function(b,E){this.postMessage({type:"call",id:E,data:b})},v.emit=function(b,E){this.postMessage({type:"event",name:b,data:E})},r.loadModule(["worker",s],function(b){for(p=new b[c](v);C.length;)_()}),y};h.UIWorkerClient=i,h.WorkerClient=n,h.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,h,m){var g=e("./range").Range,a=e("./lib/event_emitter").EventEmitter,u=e("./lib/oop"),r=function(){function f(l,n,i,o,s,c){var p=this;this.length=n,this.session=l,this.doc=l.getDocument(),this.mainClass=s,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=o,this.$onCursorChange=function(){setTimeout(function(){p.onCursorChange()})},this.$pos=i;var $=l.getUndoManager().$undoStack||l.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=$.length,this.setup(),l.selection.on("changeCursor",this.$onCursorChange)}return f.prototype.setup=function(){var l=this,n=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=i.addMarker(new g(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var c=n.createAnchor(s.row,s.column);c.$insertRight=!0,c.detach(),l.others.push(c)}),i.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var l=this.session,n=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=l.addMarker(new g(i.row,i.column,i.row,i.column+n.length),n.othersClass,null,!1)})}},f.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var l=0;l=this.pos.column&&n.start.column<=this.pos.column+this.length+1,s=n.start.column-this.pos.column;if(this.updateAnchors(l),o&&(this.length+=i),o&&!this.session.$fromUndo){if(l.action==="insert")for(var c=this.others.length-1;c>=0;c--){var p=this.others[c],$={row:p.row,column:p.column+s};this.doc.insertMergedLines($,l.lines)}else if(l.action==="remove")for(var c=this.others.length-1;c>=0;c--){var p=this.others[c],$={row:p.row,column:p.column+s};this.doc.remove(new g($.row,$.column,$.row,$.column-i))}}this.$updating=!1,this.updateMarkers()}},f.prototype.updateAnchors=function(l){this.pos.onChange(l);for(var n=this.others.length;n--;)this.others[n].onChange(l);this.updateMarkers()},f.prototype.updateMarkers=function(){if(!this.$updating){var l=this,n=this.session,i=function(s,c){n.removeMarker(s.markerId),s.markerId=n.addMarker(new g(s.row,s.column,s.row,s.column+l.length),c,null,!1)};i(this.pos,this.mainClass);for(var o=this.others.length;o--;)i(this.others[o],this.othersClass)}},f.prototype.onCursorChange=function(l){if(!(this.$updating||!this.session)){var n=this.session.selection.getCursor();n.row===this.pos.row&&n.column>=this.pos.column&&n.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",l)):(this.hideOtherMarkers(),this._emit("cursorLeave",l))}},f.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},f.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var l=this.session.getUndoManager(),n=(l.$undoStack||l.$undostack).length-this.$undoStackDepth,i=0;i1?a.multiSelect.joinSelections():a.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(a){a.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(a){a.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(a){a.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],h.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(a){a.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(a){return a&&a.inMultiSelectMode}}];var g=e("../keyboard/hash_handler").HashHandler;h.keyboardHandler=new g(h.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(e,h,m){var g=e("./range_list").RangeList,a=e("./range").Range,u=e("./selection").Selection,r=e("./mouse/multi_select_handler").onMouseDown,f=e("./lib/event"),l=e("./lib/lang"),n=e("./commands/multi_select_commands");h.commands=n.defaultCommands.concat(n.multiSelectCommands);var i=e("./search").Search,o=new i;function s(y,_,b){return o.$options.wrap=!0,o.$options.needle=_,o.$options.backwards=b==-1,o.find(y)}var c=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(y,_){if(!!y){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(y),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(y);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}y.cursor||(y.cursor=y.end);var E=this.rangeList.add(y);return this.$onAddRange(y),E.length&&this.$onRemoveRange(E),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(y)}},this.toSingleRange=function(y){y=y||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),y&&this.fromOrientedRange(y)},this.substractPoint=function(y){var _=this.rangeList.substractPoint(y);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var y=this.rangeList.merge();y.length&&this.$onRemoveRange(y)},this.$onAddRange=function(y){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(y),this._signal("addRange",{range:y})},this.$onRemoveRange=function(y){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();y.push(_),this.rangeCount=0}for(var b=y.length;b--;){var E=this.ranges.indexOf(y[b]);this.ranges.splice(E,1)}this._signal("removeRange",{ranges:y}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var y=this.ranges.length?this.ranges:[this.getRange()],_=[],b=0;b1){var y=this.rangeList.ranges,_=y[y.length-1],b=a.fromPoints(y[0].start,_.end);this.toSingleRange(),this.setSelectionRange(b,_.cursor==_.start)}else{var E=this.session.documentToScreenPosition(this.cursor),x=this.session.documentToScreenPosition(this.anchor),O=this.rectangularRangeBlock(E,x);O.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(y,_,b){var E=[],x=y.column<_.column;if(x)var O=y.column,M=_.column,k=y.offsetX,T=_.offsetX;else var O=_.column,M=y.column,k=_.offsetX,T=y.offsetX;var S=y.row<_.row;if(S)var w=y.row,L=_.row;else var w=_.row,L=y.row;O<0&&(O=0),w<0&&(w=0),w==L&&(b=!0);for(var q,A=w;A<=L;A++){var I=a.fromPoints(this.session.screenToDocumentPosition(A,O,k),this.session.screenToDocumentPosition(A,M,T));if(I.isEmpty()){if(q&&$(I.end,q))break;q=I.end}I.cursor=x?I.start:I.end,E.push(I)}if(S&&E.reverse(),!b){for(var F=E.length-1;E[F].isEmpty()&&F>0;)F--;if(F>0)for(var V=0;E[V].isEmpty();)V++;for(var R=F;R>=V;R--)E[R].isEmpty()&&E.splice(R,1)}return E}}.call(u.prototype);var p=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(y){y.cursor||(y.cursor=y.end);var _=this.getSelectionStyle();return y.marker=this.session.addMarker(y,"ace_selection",_),this.session.$selectionMarkers.push(y),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,y},this.removeSelectionMarker=function(y){if(!!y.marker){this.session.removeMarker(y.marker);var _=this.session.$selectionMarkers.indexOf(y);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(y){for(var _=this.session.$selectionMarkers,b=y.length;b--;){var E=y[b];if(!!E.marker){this.session.removeMarker(E.marker);var x=_.indexOf(E);x!=-1&&_.splice(x,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(y){this.addSelectionMarker(y.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(y){this.removeSelectionMarkers(y.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(y){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(n.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(y){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(n.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(y){var _=y.command,b=y.editor;if(!!b.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?E=b.forEachSelection(_,y.args):_.multiSelectAction=="forEachLine"?E=b.forEachSelection(_,y.args,!0):_.multiSelectAction=="single"?(b.exitMultiSelectMode(),E=_.exec(b,y.args||{})):E=_.multiSelectAction(b,y.args||{});else{var E=_.exec(b,y.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return E}},this.forEachSelection=function(y,_,b){if(!this.inVirtualSelectionMode){var E=b&&b.keepOrder,x=b==!0||b&&b.$byLines,O=this.session,M=this.selection,k=M.rangeList,T=(E?M:k).ranges,S;if(!T.length)return y.exec?y.exec(this,_||{}):y(this,_||{});var w=M._eventRegistry;M._eventRegistry={};var L=new u(O);this.inVirtualSelectionMode=!0;for(var q=T.length;q--;){if(x)for(;q>0&&T[q].start.row==T[q-1].end.row;)q--;L.fromOrientedRange(T[q]),L.index=q,this.selection=O.selection=L;var A=y.exec?y.exec(this,_||{}):y(this,_||{});!S&&A!==void 0&&(S=A),L.toOrientedRange(T[q])}L.detach(),this.selection=O.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=w,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var I=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),I&&I.from==I.to&&this.renderer.animateScrolling(I.from),S}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var y="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,b=[],E=0;E<_.length;E++)b.push(this.session.getTextRange(_[E]));var x=this.session.getDocument().getNewLineCharacter();y=b.join(x),y.length==(b.length-1)*x.length&&(y="")}else this.selection.isEmpty()||(y=this.session.getTextRange(this.getSelectionRange()));return y},this.$checkMultiselectChange=function(y,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var E=_==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;E.row!=_.row||this.session.$clipPositionToDocument(E.row,E.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(y,_,b){if(_=_||{},_.needle=y||_.needle,_.needle==null){var E=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(E)}this.$search.set(_);var x=this.$search.findAll(this.session);if(!x.length)return 0;var O=this.multiSelect;b||O.toSingleRange(x[0]);for(var M=x.length;M--;)O.addRange(x[M],!0);return E&&O.rangeList.rangeAtPoint(E.start)&&O.addRange(E,!0),x.length},this.selectMoreLines=function(y,_){var b=this.selection.toOrientedRange(),E=b.cursor==b.end,x=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(x.column=this.selection.$desiredColumn);var O=this.session.screenToDocumentPosition(x.row+y,x.column);if(b.isEmpty())var k=O;else var M=this.session.documentToScreenPosition(E?b.end:b.start),k=this.session.screenToDocumentPosition(M.row+y,M.column);if(E){var T=a.fromPoints(O,k);T.cursor=T.start}else{var T=a.fromPoints(k,O);T.cursor=T.end}if(T.desiredColumn=x.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(_)var S=b.cursor;this.selection.addRange(T),S&&this.selection.substractPoint(S)},this.transposeSelections=function(y){for(var _=this.session,b=_.multiSelect,E=b.ranges,x=E.length;x--;){var O=E[x];if(O.isEmpty()){var M=_.getWordRange(O.start.row,O.start.column);O.start.row=M.start.row,O.start.column=M.start.column,O.end.row=M.end.row,O.end.column=M.end.column}}b.mergeOverlappingRanges();for(var k=[],x=E.length;x--;){var O=E[x];k.unshift(_.getTextRange(O))}y<0?k.unshift(k.pop()):k.push(k.shift());for(var x=E.length;x--;){var O=E[x],T=O.clone();_.replace(O,k[x]),O.start.row=T.start.row,O.start.column=T.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(y,_,b){var E=this.session,x=E.multiSelect,O=x.toOrientedRange();if(!(O.isEmpty()&&(O=E.getWordRange(O.start.row,O.start.column),O.cursor=y==-1?O.start:O.end,this.multiSelect.addRange(O),b))){var M=E.getTextRange(O),k=s(E,M,y);k&&(k.cursor=y==-1?k.start:k.end,this.session.unfold(k),this.multiSelect.addRange(k),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(O.cursor)}},this.alignCursors=function(){var y=this.session,_=y.multiSelect,b=_.ranges,E=-1,x=b.filter(function(F){if(F.cursor.row==E)return!0;E=F.cursor.row});if(!b.length||x.length==b.length-1){var O=this.selection.getRange(),M=O.start.row,k=O.end.row,T=M==k;if(T){var S=this.session.getLength(),w;do w=this.session.getLine(k);while(/[=:]/.test(w)&&++k0);M<0&&(M=0),k>=S&&(k=S-1)}var L=this.session.removeFullLines(M,k);L=this.$reAlignText(L,T),this.session.insert({row:M,column:0},L.join(` `)+` `),T||(O.start.column=0,O.end.column=L[L.length-1].length),this.selection.setRange(O)}else{x.forEach(function(F){_.substractPoint(F.cursor)});var q=0,A=1/0,I=b.map(function(F){var V=F.cursor,R=y.getLine(V.row),B=R.substr(V.column).search(/\S/g);return B==-1&&(B=0),V.column>q&&(q=V.column),BN?y.insert(R,l.stringRepeat(" ",B-N)):y.remove(new a(R.row,R.column,R.row,R.column-B+N)),F.start.column=F.end.column=q,F.start.row=F.end.row=R.row,F.cursor=F.end}),_.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(y,_){var b=!0,E=!0,x,O,M;return y.map(function(L){var q=L.match(/(\s*)(.*?)(\s*)([=:].*)/);return q?x==null?(x=q[1].length,O=q[2].length,M=q[3].length,q):(x+O+M!=q[1].length+q[2].length+q[3].length&&(E=!1),x!=q[1].length&&(b=!1),x>q[1].length&&(x=q[1].length),Oq[3].length&&(M=q[3].length),q):[L]}).map(_?T:b?E?S:T:w);function k(L){return l.stringRepeat(" ",L)}function T(L){return L[2]?k(x)+L[2]+k(O-L[2].length+M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function S(L){return L[2]?k(x+O-L[2].length)+L[2]+k(M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function w(L){return L[2]?k(x)+L[2]+k(M)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}}}).call(p.prototype);function $(y,_){return y.row==_.row&&y.column==_.column}h.onSessionChange=function(y){var _=y.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var b=y.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(y){y.$multiselectOnSessionChange||(y.$onAddRange=y.$onAddRange.bind(y),y.$onRemoveRange=y.$onRemoveRange.bind(y),y.$onMultiSelect=y.$onMultiSelect.bind(y),y.$onSingleSelect=y.$onSingleSelect.bind(y),y.$multiselectOnSessionChange=h.onSessionChange.bind(y),y.$checkMultiselectChange=y.$checkMultiselectChange.bind(y),y.$multiselectOnSessionChange(y),y.on("changeSession",y.$multiselectOnSessionChange),y.on("mousedown",r),y.commands.addCommands(n.defaultCommands),C(y))}function C(y){if(!y.textInput)return;var _=y.textInput.getElement(),b=!1;f.addListener(_,"keydown",function(x){var O=x.keyCode==18&&!(x.ctrlKey||x.shiftKey||x.metaKey);y.$blockSelectEnabled&&O?b||(y.renderer.setMouseCursor("crosshair"),b=!0):b&&E()},y),f.addListener(_,"keyup",E,y),f.addListener(_,"blur",E,y);function E(x){b&&(y.renderer.setMouseCursor(""),b=!1)}}h.MultiSelect=v,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(y){v(this),y?this.on("mousedown",r):this.off("mousedown",r)},value:!0},enableBlockSelect:{set:function(y){this.$blockSelectEnabled=y},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,h,m){var g=e("../../range").Range,a=h.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(u,r,f){var l=u.getLine(f);return this.foldingStartMarker.test(l)?"start":r=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(l)?"end":""},this.getFoldWidgetRange=function(u,r,f){return null},this.indentationBlock=function(u,r,f){var l=/\S/,n=u.getLine(r),i=n.search(l);if(i!=-1){for(var o=f||n.length,s=u.getLength(),c=r,p=r;++rc){var C=u.getLine(p).length;return new g(c,o,p,C)}}},this.openingBracketBlock=function(u,r,f,l,n){var i={row:f,column:l+1},o=u.$findClosingBracket(r,i,n);if(!!o){var s=u.foldWidgets[o.row];return s==null&&(s=u.getFoldWidget(o.row)),s=="start"&&o.row>i.row&&(o.row--,o.column=u.getLine(o.row).length),g.fromPoints(i,o)}},this.closingBracketBlock=function(u,r,f,l,n){var i={row:f,column:l},o=u.$findOpeningBracket(r,i);if(!!o)return o.column++,i.column--,g.fromPoints(o,i)}}).call(a.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(e,h,m){var g=e("../line_widgets").LineWidgets,a=e("../lib/dom"),u=e("../range").Range,r=e("../config").nls;function f(n,i,o){for(var s=0,c=n.length-1;s<=c;){var p=s+c>>1,$=o(i,n[p]);if($>0)s=p+1;else if($<0)c=p-1;else return p}return-(s+1)}function l(n,i,o){var s=n.getAnnotations().sort(u.comparePoints);if(!!s.length){var c=f(s,{row:i,column:-1},u.comparePoints);c<0&&(c=-c-1),c>=s.length?c=o>0?0:s.length-1:c===0&&o<0&&(c=s.length-1);var p=s[c];if(!(!p||!o)){if(p.row===i){do p=s[c+=o];while(p&&p.row===i);if(!p)return s.slice()}var $=[];i=p.row;do $[o<0?"unshift":"push"](p),p=s[c+=o];while(p&&p.row==i);return $.length&&$}}}h.showErrorMarker=function(n,i){var o=n.session;o.widgetManager||(o.widgetManager=new g(o),o.widgetManager.attach(n));var s=n.getCursorPosition(),c=s.row,p=o.widgetManager.getWidgetsAtRow(c).filter(function(O){return O.type=="errorMarker"})[0];p?p.destroy():c-=i;var $=l(o,c,i),v;if($){var C=$[0];s.column=(C.pos&&typeof C.column!="number"?C.pos.sc:C.column)||0,s.row=C.row,v=n.renderer.$gutterLayer.$annotations[s.row]}else{if(p)return;v={text:[r("Looks good!")],className:"ace_ok"}}n.session.unfold(s.row),n.selection.moveToPosition(s);var y={row:s.row,fixedWidth:!0,coverGutter:!0,el:a.createElement("div"),type:"errorMarker"},_=y.el.appendChild(a.createElement("div")),b=y.el.appendChild(a.createElement("div"));b.className="error_widget_arrow "+v.className;var E=n.renderer.$cursorLayer.getPixelPosition(s).left;b.style.left=E+n.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",_.className="error_widget "+v.className,_.innerHTML=v.text.join("
"),_.appendChild(a.createElement("div"));var x=function(O,M,k){if(M===0&&(k==="esc"||k==="return"))return y.destroy(),{command:"null"}};y.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(x),o.widgetManager.removeLineWidget(y),n.off("changeSelection",y.destroy),n.off("changeSession",y.destroy),n.off("mouseup",y.destroy),n.off("change",y.destroy))},n.keyBinding.addKeyboardHandler(x),n.on("changeSelection",y.destroy),n.on("changeSession",y.destroy),n.on("mouseup",y.destroy),n.on("change",y.destroy),n.session.widgetManager.addLineWidget(y),y.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:y.el.offsetHeight})},a.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(e,h,m){e("./loader_build")(h);var g=e("./lib/dom"),a=e("./range").Range,u=e("./editor").Editor,r=e("./edit_session").EditSession,f=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),h.config=e("./config"),h.edit=function(n,i){if(typeof n=="string"){var o=n;if(n=document.getElementById(o),!n)throw new Error("ace.edit can't find div #"+o)}if(n&&n.env&&n.env.editor instanceof u)return n.env.editor;var s="";if(n&&/input|textarea/i.test(n.tagName)){var c=n;s=c.value,n=g.createElement("pre"),c.parentNode.replaceChild(n,c)}else n&&(s=n.textContent,n.innerHTML="");var p=h.createEditSession(s),$=new u(new l(n),p,i),v={document:p,editor:$,onResize:$.resize.bind($,null)};return c&&(v.textarea=c),$.on("destroy",function(){v.editor.container.env=null}),$.container.env=$.env=v,$},h.createEditSession=function(n,i){var o=new r(n,i);return o.setUndoManager(new f),o},h.Range=a,h.Editor=u,h.EditSession=r,h.UndoManager=f,h.VirtualRenderer=l,h.version=h.config.version}),function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var h=function(){return this}();!h&&typeof window!="undefined"&&(h=window),!h&&typeof self!="undefined"&&(h=self),h.ace||(h.ace=e);for(var m in e)e.hasOwnProperty(m)&&(h.ace[m]=e[m]);h.ace.default=h.ace,t&&(t.exports=h.ace)})}()})(ace$2);var ace$1=ace$2.exports,themeSqlserver={exports:{}};(function(t,d){ace.define("ace/theme/sqlserver-css",["require","exports","module"],function(e,h,m){m.exports=`.ace-sqlserver .ace_gutter { background: #ebebeb; color: #333; overflow: hidden; } .ace-sqlserver .ace_print-margin { width: 1px; background: #e8e8e8; } .ace-sqlserver { background-color: #FFFFFF; color: black; } .ace-sqlserver .ace_identifier { color: black; } .ace-sqlserver .ace_keyword { color: #0000FF; } .ace-sqlserver .ace_numeric { color: black; } .ace-sqlserver .ace_storage { color: #11B7BE; } .ace-sqlserver .ace_keyword.ace_operator, .ace-sqlserver .ace_lparen, .ace-sqlserver .ace_rparen, .ace-sqlserver .ace_punctuation { color: #808080; } .ace-sqlserver .ace_set.ace_statement { color: #0000FF; text-decoration: underline; } .ace-sqlserver .ace_cursor { color: black; } .ace-sqlserver .ace_invisible { color: rgb(191, 191, 191); } .ace-sqlserver .ace_constant.ace_buildin { color: rgb(88, 72, 246); } .ace-sqlserver .ace_constant.ace_language { color: #979797; } .ace-sqlserver .ace_constant.ace_library { color: rgb(6, 150, 14); } .ace-sqlserver .ace_invalid { background-color: rgb(153, 0, 0); color: white; } .ace-sqlserver .ace_support.ace_function { color: #FF00FF; } .ace-sqlserver .ace_support.ace_constant { color: rgb(6, 150, 14); } .ace-sqlserver .ace_class { color: #008080; } .ace-sqlserver .ace_support.ace_other { color: #6D79DE; } .ace-sqlserver .ace_variable.ace_parameter { font-style: italic; color: #FD971F; } .ace-sqlserver .ace_comment { color: #008000; } .ace-sqlserver .ace_constant.ace_numeric { color: black; } .ace-sqlserver .ace_variable { color: rgb(49, 132, 149); } .ace-sqlserver .ace_xml-pe { color: rgb(104, 104, 91); } .ace-sqlserver .ace_support.ace_storedprocedure { color: #800000; } .ace-sqlserver .ace_heading { color: rgb(12, 7, 255); } .ace-sqlserver .ace_list { color: rgb(185, 6, 144); } .ace-sqlserver .ace_marker-layer .ace_selection { background: rgb(181, 213, 255); } .ace-sqlserver .ace_marker-layer .ace_step { background: rgb(252, 255, 0); } .ace-sqlserver .ace_marker-layer .ace_stack { background: rgb(164, 229, 101); } .ace-sqlserver .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192); } .ace-sqlserver .ace_marker-layer .ace_active-line { background: rgba(0, 0, 0, 0.07); } .ace-sqlserver .ace_gutter-active-line { background-color: #dcdcdc; } .ace-sqlserver .ace_marker-layer .ace_selected-word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250); } .ace-sqlserver .ace_meta.ace_tag { color: #0000FF; } .ace-sqlserver .ace_string.ace_regex { color: #FF0000; } .ace-sqlserver .ace_string { color: #FF0000; } .ace-sqlserver .ace_entity.ace_other.ace_attribute-name { color: #994409; } .ace-sqlserver .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; } .ace-sqlserver .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; } `}),ace.define("ace/theme/sqlserver",["require","exports","module","ace/theme/sqlserver-css","ace/lib/dom"],function(e,h,m){h.isDark=!1,h.cssClass="ace-sqlserver",h.cssText=e("./sqlserver-css");var g=e("../lib/dom");g.importCssString(h.cssText,h.cssClass,!1)}),function(){ace.require(["ace/theme/sqlserver"],function(e){t&&(t.exports=e)})}()})(themeSqlserver);var modeJavascript={exports:{}};(function(t,d){ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,h,m){var g=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},u.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};g.inherits(u,a),u.getTagRule=function(r){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},u.getStartRule=function(r){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:r}},u.getEndRule=function(r){return{token:"comment.doc",regex:"\\*\\/",next:r}},h.JsDocCommentHighlightRules=u}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,h,m){function g(){var i=l.replace("\\d","\\d\\-"),o={onMatch:function(c,p,$){var v=c.charAt(1)=="/"?2:1;return v==1?(p!=this.nextState?$.unshift(this.next,this.nextState,0):$.unshift(this.next),$[2]++):v==2&&p==this.nextState&&($[1]--,(!$[1]||$[1]<0)&&($.shift(),$.shift())),[{type:"meta.tag.punctuation."+(v==1?"":"end-")+"tag-open.xml",value:c.slice(0,v)},{type:"meta.tag.tag-name.xml",value:c.substr(v)}]},regex:"",onMatch:function(c,p,$){return p==$[0]&&$.shift(),c.length==2&&($[0]==this.nextState&&$[1]--,(!$[1]||$[1]<0)&&$.splice(0,2)),this.next=$[0]||"start",[{type:this.token,value:c}]},nextState:"jsx"},s,a("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:i},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},o],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function a(i){return[{token:"comment",regex:/\/\*/,next:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:i||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[r.getTagRule(),{token:"comment",regex:"$|^",next:i||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var u=e("../lib/oop"),r=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=e("./text_highlight_rules").TextHighlightRules,l="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",n=function(i){var o=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),s="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",c="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[r.getStartRule("doc-start"),a("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+l+")(\\.)(prototype)(\\.)("+l+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+l+")(\\.)("+l+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+l+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+l+")(\\.)("+l+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+l+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+l+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+s+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:l},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+l+")(\\.)("+l+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:l},{regex:"",token:"empty",next:"no_regex"}],start:[r.getStartRule("doc-start"),a("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[a("function_arguments"),{token:"variable.parameter",regex:l},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:c},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:c},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!i||!i.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(p,$,v){if(this.next=p=="{"?this.nextState:"",p=="{"&&v.length)v.unshift("start",$);else if(p=="}"&&v.length&&(v.shift(),this.next=v.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return p=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:c},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+l+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!i||i.jsx!=0)&&g.call(this)),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};u.inherits(n,f),h.JavaScriptHighlightRules=n}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,h,m){var g=e("../range").Range,a=function(){};(function(){this.checkOutdent=function(u,r){return/^\s+$/.test(u)?/^\s*\}/.test(r):!1},this.autoOutdent=function(u,r){var f=u.getLine(r),l=f.match(/^(\s*\})/);if(!l)return 0;var n=l[1].length,i=u.findMatchingBracket({row:r,column:n});if(!i||i.row==r)return 0;var o=this.$getIndent(u.getLine(i.row));u.replace(new g(r,0,r,n-1),o)},this.$getIndent=function(u){return u.match(/^\s*/)[0]}}).call(a.prototype),h.MatchingBraceOutdent=a}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,h,m){var g=e("../../lib/oop"),a=e("../../range").Range,u=e("./fold_mode").FoldMode,r=h.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};g.inherits(r,u),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(f,l,n){var i=f.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var o=this._getFoldWidgetBase(f,l,n);return!o&&this.startRegionRe.test(i)?"start":o},this.getFoldWidgetRange=function(f,l,n,i){var o=f.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(f,o,n);var s=o.match(this.foldingStartMarker);if(s){var c=s.index;if(s[1])return this.openingBracketBlock(f,s[1],n,c);var p=f.getCommentFoldRange(n,c+s[0].length,1);return p&&!p.isMultiLine()&&(i?p=this.getSectionRange(f,n):l!="all"&&(p=null)),p}if(l!=="markbegin"){var s=o.match(this.foldingStopMarker);if(s){var c=s.index+s[0].length;return s[1]?this.closingBracketBlock(f,s[1],n,c):f.getCommentFoldRange(n,c,-1)}}},this.getSectionRange=function(f,l){var n=f.getLine(l),i=n.search(/\S/),o=l,s=n.length;l+=1;for(var c=l,p=f.getLength();++l$)break;var v=this.getFoldWidgetRange(f,"all",l);if(v){if(v.start.row<=o)break;if(v.isMultiLine())l=v.end.row;else if(i==$)break}c=l}}return new a(o,s,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,l,n){for(var i=l.search(/\s*$/),o=f.getLength(),s=n,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++ns)return new a(s,i,v,l.length)}}.call(r.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,h,m){var g=e("../lib/oop"),a=e("./text").Mode,u=e("./javascript_highlight_rules").JavaScriptHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,n=e("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=u,this.$outdent=new r,this.$behaviour=new l,this.foldingRules=new n};g.inherits(i,a),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(o,s,c){var p=this.$getIndent(s),$=this.getTokenizer().getLineTokens(s,o),v=$.tokens,C=$.state;if(v.length&&v[v.length-1].type=="comment")return p;if(o=="start"||o=="no_regex"){var y=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);y&&(p+=c)}else if(o=="doc-start"){if(C=="start"||C=="no_regex")return"";var y=s.match(/^\s*(\/?)\*/);y&&(y[1]&&(p+=" "),p+="* ")}return p},this.checkOutdent=function(o,s,c){return this.$outdent.checkOutdent(s,c)},this.autoOutdent=function(o,s,c){this.$outdent.autoOutdent(s,c)},this.createWorker=function(o){var s=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(o.getDocument()),s.on("annotate",function(c){o.setAnnotations(c.data)}),s.on("terminate",function(){o.clearAnnotations()}),s},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(i.prototype),h.Mode=i}),function(){ace.require(["ace/mode/javascript"],function(e){t&&(t.exports=e)})}()})(modeJavascript);var modeJson={exports:{}};(function(t,d){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,h,m){var g=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,u=function(){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"}]}};g.inherits(u,a),h.JsonHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,h,m){var g=e("../range").Range,a=function(){};(function(){this.checkOutdent=function(u,r){return/^\s+$/.test(u)?/^\s*\}/.test(r):!1},this.autoOutdent=function(u,r){var f=u.getLine(r),l=f.match(/^(\s*\})/);if(!l)return 0;var n=l[1].length,i=u.findMatchingBracket({row:r,column:n});if(!i||i.row==r)return 0;var o=this.$getIndent(u.getLine(i.row));u.replace(new g(r,0,r,n-1),o)},this.$getIndent=function(u){return u.match(/^\s*/)[0]}}).call(a.prototype),h.MatchingBraceOutdent=a}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,h,m){var g=e("../../lib/oop"),a=e("../../range").Range,u=e("./fold_mode").FoldMode,r=h.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};g.inherits(r,u),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(f,l,n){var i=f.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var o=this._getFoldWidgetBase(f,l,n);return!o&&this.startRegionRe.test(i)?"start":o},this.getFoldWidgetRange=function(f,l,n,i){var o=f.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(f,o,n);var s=o.match(this.foldingStartMarker);if(s){var c=s.index;if(s[1])return this.openingBracketBlock(f,s[1],n,c);var p=f.getCommentFoldRange(n,c+s[0].length,1);return p&&!p.isMultiLine()&&(i?p=this.getSectionRange(f,n):l!="all"&&(p=null)),p}if(l!=="markbegin"){var s=o.match(this.foldingStopMarker);if(s){var c=s.index+s[0].length;return s[1]?this.closingBracketBlock(f,s[1],n,c):f.getCommentFoldRange(n,c,-1)}}},this.getSectionRange=function(f,l){var n=f.getLine(l),i=n.search(/\S/),o=l,s=n.length;l+=1;for(var c=l,p=f.getLength();++l$)break;var v=this.getFoldWidgetRange(f,"all",l);if(v){if(v.start.row<=o)break;if(v.isMultiLine())l=v.end.row;else if(i==$)break}c=l}}return new a(o,s,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,l,n){for(var i=l.search(/\s*$/),o=f.getLength(),s=n,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++ns)return new a(s,i,v,l.length)}}.call(r.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(e,h,m){var g=e("../lib/oop"),a=e("./text").Mode,u=e("./json_highlight_rules").JsonHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("./folding/cstyle").FoldMode,l=e("../worker/worker_client").WorkerClient,n=function(){this.HighlightRules=u,this.$outdent=new r,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};g.inherits(n,a),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,o,s){var c=this.$getIndent(o);if(i=="start"){var p=o.match(/^.*[\{\(\[]\s*$/);p&&(c+=s)}return c},this.checkOutdent=function(i,o,s){return this.$outdent.checkOutdent(o,s)},this.autoOutdent=function(i,o,s){this.$outdent.autoOutdent(o,s)},this.createWorker=function(i){var o=new l(["ace"],"ace/mode/json_worker","JsonWorker");return o.attachToDocument(i.getDocument()),o.on("annotate",function(s){i.setAnnotations(s.data)}),o.on("terminate",function(){i.clearAnnotations()}),o},this.$id="ace/mode/json"}.call(n.prototype),h.Mode=n}),function(){ace.require(["ace/mode/json"],function(e){t&&(t.exports=e)})}()})(modeJson);var modeCss={exports:{}};(function(t,d){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,h,m){var g=e("../lib/oop");e("../lib/lang");var a=e("./text_highlight_rules").TextHighlightRules,u=h.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",r=h.supportFunction="rgb|rgba|url|attr|counter|counters",f=h.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",l=h.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",n=h.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",i=h.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",o=h.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",s=h.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",c=function(){var p=this.createKeywordMapper({"support.function":r,"support.constant":f,"support.type":u,"support.constant.color":l,"support.constant.fonts":n},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:i},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+i+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:i},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:o},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s},{include:"url"},{token:p,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};g.inherits(c,a),h.CssHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,h,m){var g=e("../range").Range,a=function(){};(function(){this.checkOutdent=function(u,r){return/^\s+$/.test(u)?/^\s*\}/.test(r):!1},this.autoOutdent=function(u,r){var f=u.getLine(r),l=f.match(/^(\s*\})/);if(!l)return 0;var n=l[1].length,i=u.findMatchingBracket({row:r,column:n});if(!i||i.row==r)return 0;var o=this.$getIndent(u.getLine(i.row));u.replace(new g(r,0,r,n-1),o)},this.$getIndent=function(u){return u.match(/^\s*/)[0]}}).call(a.prototype),h.MatchingBraceOutdent=a}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,h,m){var g={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},a=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var u=document.createElement("c").style;for(var r in u)if(typeof u[r]=="string"){var f=r.replace(/[A-Z]/g,function(l){return"-"+l.toLowerCase()});g.hasOwnProperty(f)||(g[f]=1)}}this.completionsDefined=!0},this.getCompletions=function(u,r,f,l){if(this.completionsDefined||this.defineCompletions(),u==="ruleset"||r.$mode.$id=="ace/mode/scss"){var n=r.getLine(f.row).substr(0,f.column),i=/\([^)]*$/.test(n);return i&&(n=n.substr(n.lastIndexOf("(")+1)),/:[^;]+$/.test(n)?(/([\w\-]+):[^:]*$/.test(n),this.getPropertyValueCompletions(u,r,f,l)):this.getPropertyCompletions(u,r,f,l,i)}return[]},this.getPropertyCompletions=function(u,r,f,l,n){n=n||!1;var i=Object.keys(g);return i.map(function(o){return{caption:o,snippet:o+": $0"+(n?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(u,r,f,l){var n=r.getLine(f.row).substr(0,f.column),i=(/([\w\-]+):[^:]*$/.exec(n)||{})[1];if(!i)return[];var o=[];return i in g&&typeof g[i]=="object"&&(o=Object.keys(g[i])),o.map(function(s){return{caption:s,snippet:s,meta:"property value",score:1e6}})}}).call(a.prototype),h.CssCompletions=a}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,h,m){var g=e("../../lib/oop");e("../behaviour").Behaviour;var a=e("./cstyle").CstyleBehaviour,u=e("../../token_iterator").TokenIterator,r=function(){this.inherit(a),this.add("colon","insertion",function(f,l,n,i,o){if(o===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),c=new u(i,s.row,s.column),p=c.getCurrentToken();if(p&&p.value.match(/\s+/)&&(p=c.stepBackward()),p&&p.type==="support.type"){var $=i.doc.getLine(s.row),v=$.substring(s.column,s.column+1);if(v===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test($.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(f,l,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&s===":"){var c=n.getCursorPosition(),p=new u(i,c.row,c.column),$=p.getCurrentToken();if($&&$.value.match(/\s+/)&&($=p.stepBackward()),$&&$.type==="support.type"){var v=i.doc.getLine(o.start.row),C=v.substring(o.end.column,o.end.column+1);if(C===";")return o.end.column++,o}}}),this.add("semicolon","insertion",function(f,l,n,i,o){if(o===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),c=i.doc.getLine(s.row),p=c.substring(s.column,s.column+1);if(p===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,l,n,i,o){if(o==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),c=i.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(c.substring(s.column)))return{text:"!important",selection:[10,10]}}})};g.inherits(r,a),h.CssBehaviour=r}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,h,m){var g=e("../../lib/oop"),a=e("../../range").Range,u=e("./fold_mode").FoldMode,r=h.FoldMode=function(f){f&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+f.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+f.end)))};g.inherits(r,u),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(f,l,n){var i=f.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var o=this._getFoldWidgetBase(f,l,n);return!o&&this.startRegionRe.test(i)?"start":o},this.getFoldWidgetRange=function(f,l,n,i){var o=f.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(f,o,n);var s=o.match(this.foldingStartMarker);if(s){var c=s.index;if(s[1])return this.openingBracketBlock(f,s[1],n,c);var p=f.getCommentFoldRange(n,c+s[0].length,1);return p&&!p.isMultiLine()&&(i?p=this.getSectionRange(f,n):l!="all"&&(p=null)),p}if(l!=="markbegin"){var s=o.match(this.foldingStopMarker);if(s){var c=s.index+s[0].length;return s[1]?this.closingBracketBlock(f,s[1],n,c):f.getCommentFoldRange(n,c,-1)}}},this.getSectionRange=function(f,l){var n=f.getLine(l),i=n.search(/\S/),o=l,s=n.length;l+=1;for(var c=l,p=f.getLength();++l$)break;var v=this.getFoldWidgetRange(f,"all",l);if(v){if(v.start.row<=o)break;if(v.isMultiLine())l=v.end.row;else if(i==$)break}c=l}}return new a(o,s,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,l,n){for(var i=l.search(/\s*$/),o=f.getLength(),s=n,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++ns)return new a(s,i,v,l.length)}}.call(r.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,h,m){var g=e("../lib/oop"),a=e("./text").Mode,u=e("./css_highlight_rules").CssHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,n=e("./behaviour/css").CssBehaviour,i=e("./folding/cstyle").FoldMode,o=function(){this.HighlightRules=u,this.$outdent=new r,this.$behaviour=new n,this.$completer=new l,this.foldingRules=new i};g.inherits(o,a),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(s,c,p){var $=this.$getIndent(c),v=this.getTokenizer().getLineTokens(c,s).tokens;if(v.length&&v[v.length-1].type=="comment")return $;var C=c.match(/^.*\{\s*$/);return C&&($+=p),$},this.checkOutdent=function(s,c,p){return this.$outdent.checkOutdent(c,p)},this.autoOutdent=function(s,c,p){this.$outdent.autoOutdent(c,p)},this.getCompletions=function(s,c,p,$){return this.$completer.getCompletions(s,c,p,$)},this.createWorker=function(s){var c=new f(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(s.getDocument()),c.on("annotate",function(p){s.setAnnotations(p.data)}),c.on("terminate",function(){s.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(o.prototype),h.Mode=o}),function(){ace.require(["ace/mode/css"],function(e){t&&(t.exports=e)})}()})(modeCss);var extLanguage_tools={exports:{}};(function(t,d){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(e,h,m){function g(b){var E=new Date().toLocaleString("en-us",b);return E.length==1?"0"+E:E}var a=e("./lib/dom"),u=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,f=e("./lib/lang"),l=e("./range").Range,n=e("./range_list").RangeList,i=e("./keyboard/hash_handler").HashHandler,o=e("./tokenizer").Tokenizer,s=e("./clipboard"),c={CURRENT_WORD:function(b){return b.session.getTextRange(b.session.getWordRange())},SELECTION:function(b,E,x){var O=b.session.getTextRange();return x?O.replace(/\n\r?([ \t]*\S)/g,` `+x+"$1"):O},CURRENT_LINE:function(b){return b.session.getLine(b.getCursorPosition().row)},PREV_LINE:function(b){return b.session.getLine(b.getCursorPosition().row-1)},LINE_INDEX:function(b){return b.getCursorPosition().row},LINE_NUMBER:function(b){return b.getCursorPosition().row+1},SOFT_TABS:function(b){return b.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(b){return b.session.getTabSize()},CLIPBOARD:function(b){return s.getText&&s.getText()},FILENAME:function(b){return/[^/\\]*$/.exec(this.FILEPATH(b))[0]},FILENAME_BASE:function(b){return/[^/\\]*$/.exec(this.FILEPATH(b))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(b){return this.FILEPATH(b).replace(/[^/\\]*$/,"")},FILEPATH:function(b){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(b){var E=b.session.$mode||{};return E.blockComment&&E.blockComment.start||""},BLOCK_COMMENT_END:function(b){var E=b.session.$mode||{};return E.blockComment&&E.blockComment.end||""},LINE_COMMENT:function(b){var E=b.session.$mode||{};return E.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};c.SELECTED_TEXT=c.SELECTION;var p=function(){function b(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return b.prototype.getTokenizer=function(){return b.$tokenizer||this.createTokenizer()},b.prototype.createTokenizer=function(){function E(M){return M=M.substr(1),/^\d+$/.test(M)?[{tabstopId:parseInt(M,10)}]:[{text:M}]}function x(M){return"(?:[^\\\\"+M+"]|\\\\.)"}var O={regex:"/("+x("/")+"+)/",onMatch:function(M,k,T){var S=T[0];return S.fmtString=!0,S.guard=M.slice(1,-1),S.flag="",""},next:"formatString"};return b.$tokenizer=new o({start:[{regex:/\\./,onMatch:function(M,k,T){var S=M[1];return(S=="}"&&T.length||"`$\\".indexOf(S)!=-1)&&(M=S),[M]}},{regex:/}/,onMatch:function(M,k,T){return[T.length?T.shift():M]}},{regex:/\$(?:\d+|\w+)/,onMatch:E},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(M,k,T){var S=E(M.substr(1));return T.unshift(S[0]),S},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+x("\\|")+"*\\|",onMatch:function(M,k,T){var S=M.slice(1,-1).replace(/\\[,|\\]|,/g,function(w){return w.length==2?w[1]:"\0"}).split("\0").map(function(w){return{value:w}});return T[0].choices=S,[S[0]]},next:"start"},O,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(M,k,T){return T.length&&T[0].expectElse?(T[0].expectElse=!1,T[0].ifEnd={elseEnd:T[0]},[T[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(M,k,T){var S=M[1];return S=="}"&&T.length||"`$\\".indexOf(S)!=-1?M=S:S=="n"?M=` `:S=="t"?M=" ":"ulULE".indexOf(S)!=-1&&(M={changeCase:S,local:S>"a"}),[M]}},{regex:"/\\w*}",onMatch:function(M,k,T){var S=T.shift();return S&&(S.flag=M.slice(1,-1)),this.next=S&&S.tabstopId?"start":"",[S||M]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(M,k,T){return[{text:M.slice(1)}]}},{regex:/\${\w+/,onMatch:function(M,k,T){var S={text:M.slice(2)};return T.unshift(S),[S]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(M,k,T){var S=T.shift();return this.next=S&&S.tabstopId?"start":"",[S||M]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(M,k,T){var S=T[0];return S.formatFunction=M.slice(2,-1),[T.shift()]},next:"formatString"},O,{regex:/:[\?\-+]?/,onMatch:function(M,k,T){M[1]=="+"&&(T[0].ifEnd=T[0]),M[1]=="?"&&(T[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),b.$tokenizer},b.prototype.tokenizeTmSnippet=function(E,x){return this.getTokenizer().getLineTokens(E,x).tokens.map(function(O){return O.value||O})},b.prototype.getVariableValue=function(E,x,O){if(/^\d+$/.test(x))return(this.variables.__||{})[x]||"";if(/^[A-Z]\d+$/.test(x))return(this.variables[x[0]+"__"]||{})[x.substr(1)]||"";if(x=x.replace(/^TM_/,""),!this.variables.hasOwnProperty(x))return"";var M=this.variables[x];return typeof M=="function"&&(M=this.variables[x](E,x,O)),M==null?"":M},b.prototype.tmStrFormat=function(E,x,O){if(!x.fmt)return E;var M=x.flag||"",k=x.guard;k=new RegExp(k,M.replace(/[^gim]/g,""));var T=typeof x.fmt=="string"?this.tokenizeTmSnippet(x.fmt,"formatString"):x.fmt,S=this,w=E.replace(k,function(){var L=S.variables.__;S.variables.__=[].slice.call(arguments);for(var q=S.resolveVariables(T,O),A="E",I=0;I=0&&w.splice(L,1)}}var M=this.snippetMap,k=this.snippetNameMap;E.content?O(E):Array.isArray(E)&&E.forEach(O)},b.prototype.parseSnippetFile=function(E){E=E.replace(/\r/g,"");for(var x=[],O={},M=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,k;k=M.exec(E);){if(k[1])try{O=JSON.parse(k[1]),x.push(O)}catch{}if(k[4])O.content=k[4].replace(/^\t/gm,""),x.push(O),O={};else{var T=k[2],S=k[3];if(T=="regex"){var w=/\/((?:[^\/\\]|\\.)*)|$/g;O.guard=w.exec(S)[1],O.trigger=w.exec(S)[1],O.endTrigger=w.exec(S)[1],O.endGuard=w.exec(S)[1]}else T=="snippet"?(O.tabTrigger=S.match(/^\S*/)[0],O.name||(O.name=S)):T&&(O[T]=S)}}return x},b.prototype.getSnippetByName=function(E,x){var O=this.snippetNameMap,M;return this.getActiveScopes(x).some(function(k){var T=O[k];return T&&(M=T[E]),!!M},this),M},b}();u.implement(p.prototype,r);var $=function(b,E,x){function O(D){for(var W=[],H=0;H1?(P=W[W.length-1].length,N+=W.length-1):P+=D.length,j+=D}else D&&(D.start?D.end={row:N,column:P}:D.start={row:N,column:P})}),{text:j,tabstops:L,tokens:w}},v=function(){function b(E){if(this.index=0,this.ranges=[],this.tabstops=[],E.tabstopManager)return E.tabstopManager;E.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=f.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(E)}return b.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)},b.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},b.prototype.onChange=function(E){for(var x=E.action[0]=="r",O=this.selectedTabstop||{},M=O.parents||{},k=this.tabstops.slice(),T=0;T2&&(this.tabstops.length&&S.push(S.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,S))},b.prototype.addTabstopMarkers=function(E){var x=this.session;E.forEach(function(O){O.markerId||(O.markerId=x.addMarker(O,"ace_snippet-marker","text"))})},b.prototype.removeTabstopMarkers=function(E){var x=this.session;E.forEach(function(O){x.removeMarker(O.markerId),O.markerId=null})},b.prototype.updateTabstopMarkers=function(){if(!!this.selectedTabstop){var E=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&E--,this.tabstops.forEach(function(x){x.snippetId===E?this.addTabstopMarkers(x):this.removeTabstopMarkers(x)},this)}},b.prototype.removeRange=function(E){var x=E.tabstop.indexOf(E);x!=-1&&E.tabstop.splice(x,1),x=this.ranges.indexOf(E),x!=-1&&this.ranges.splice(x,1),x=E.tabstop.rangeList.ranges.indexOf(E),x!=-1&&E.tabstop.splice(x,1),this.session.removeMarker(E.markerId),E.tabstop.length||(x=this.tabstops.indexOf(E.tabstop),x!=-1&&this.tabstops.splice(x,1),this.tabstops.length||this.detach())},b}();v.prototype.keyboardHandler=new i,v.prototype.keyboardHandler.bindKeys({Tab:function(b){h.snippetManager&&h.snippetManager.expandWithTab(b)||(b.tabstopManager.tabNext(1),b.renderer.scrollCursorIntoView())},"Shift-Tab":function(b){b.tabstopManager.tabNext(-1),b.renderer.scrollCursorIntoView()},Esc:function(b){b.tabstopManager.detach()}});var C=function(b,E){b.row==0&&(b.column+=E.column),b.row+=E.row},y=function(b,E){b.row==E.row&&(b.column-=E.column),b.row-=E.row};a.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),h.snippetManager=new p;var _=e("./editor").Editor;(function(){this.insertSnippet=function(b,E){return h.snippetManager.insertSnippet(this,b,E)},this.expandSnippet=function(b){return h.snippetManager.expandWithTab(this,b)}}).call(_.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","ace/lib/useragent"],function(e,h,m){var g=e("../virtual_renderer").VirtualRenderer,a=e("../editor").Editor,u=e("../range").Range,r=e("../lib/event"),f=e("../lib/lang"),l=e("../lib/dom"),n=e("../config").nls,i=e("./../lib/useragent"),o=function(C){return"suggest-aria-id:".concat(C)},s=i.isSafari?"menu":"listbox",c=i.isSafari?"menuitem":"option",p=i.isSafari?"aria-current":"aria-selected",$=function(C){var y=new g(C);y.$maxLines=4;var _=new a(y);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},v=function(){function C(y){var _=l.createElement("div"),b=$(_);y&&y.appendChild(_),_.style.display="none",b.renderer.content.style.cursor="default",b.renderer.setStyle("ace_autocomplete"),b.renderer.$textLayer.element.setAttribute("role",s),b.renderer.$textLayer.element.setAttribute("aria-roledescription",n("Autocomplete suggestions")),b.renderer.$textLayer.element.setAttribute("aria-label",n("Autocomplete suggestions")),b.renderer.textarea.setAttribute("aria-hidden","true"),b.setOption("displayIndentGuides",!1),b.setOption("dragDelay",150);var E=function(){};b.focus=E,b.$isFocused=!0,b.renderer.$cursorLayer.restartTimer=E,b.renderer.$cursorLayer.element.style.opacity="0",b.renderer.$maxLines=8,b.renderer.$keepTextAreaAtCursor=!1,b.setHighlightActiveLine(!1),b.session.highlight(""),b.session.$searchHighlight.clazz="ace_highlight-marker",b.on("mousedown",function(w){var L=w.getDocumentPosition();b.selection.moveToPosition(L),M.start.row=M.end.row=L.row,w.stop()});var x,O=new u(-1,0,-1,1/0),M=new u(-1,0,-1,1/0);M.id=b.session.addMarker(M,"ace_active-line","fullLine"),b.setSelectOnHover=function(w){w?O.id&&(b.session.removeMarker(O.id),O.id=null):O.id=b.session.addMarker(O,"ace_line-hover","fullLine")},b.setSelectOnHover(!1),b.on("mousemove",function(w){if(!x){x=w;return}if(!(x.x==w.x&&x.y==w.y)){x=w,x.scrollTop=b.renderer.scrollTop,b.isMouseOver=!0;var L=x.getDocumentPosition().row;O.start.row!=L&&(O.id||b.setRow(L),T(L))}}),b.renderer.on("beforeRender",function(){if(x&&O.start.row!=-1){x.$pos=null;var w=x.getDocumentPosition().row;O.id||b.setRow(w),T(w,!0)}}),b.renderer.on("afterRender",function(){var w=b.getRow(),L=b.renderer.$textLayer,q=L.element.childNodes[w-L.config.firstRow],A=document.activeElement;if(q!==b.selectedNode&&b.selectedNode&&(l.removeCssClass(b.selectedNode,"ace_selected"),A.removeAttribute("aria-activedescendant"),b.selectedNode.removeAttribute(p),b.selectedNode.removeAttribute("id")),b.selectedNode=q,q){l.addCssClass(q,"ace_selected");var I=o(w);q.id=I,L.element.setAttribute("aria-activedescendant",I),A.setAttribute("aria-activedescendant",I),q.setAttribute("role",c),q.setAttribute("aria-roledescription",n("item")),q.setAttribute("aria-label",b.getData(w).caption||b.getData(w).value),q.setAttribute("aria-setsize",b.data.length),q.setAttribute("aria-posinset",w+1),q.setAttribute("aria-describedby","doc-tooltip"),q.setAttribute(p,"true")}});var k=function(){T(-1)},T=function(w,L){w!==O.start.row&&(O.start.row=O.end.row=w,L||b.session._emit("changeBackMarker"),b._emit("changeHoverMarker"))};b.getHoveredRow=function(){return O.start.row},r.addListener(b.container,"mouseout",function(){b.isMouseOver=!1,k()}),b.on("hide",k),b.on("changeSelection",k),b.session.doc.getLength=function(){return b.data.length},b.session.doc.getLine=function(w){var L=b.data[w];return typeof L=="string"?L:L&&L.value||""};var S=b.session.bgTokenizer;return S.$tokenizeRow=function(w){function L(D,W){D&&A.push({type:(q.className||"")+(W||""),value:D})}var q=b.data[w],A=[];if(!q)return A;typeof q=="string"&&(q={value:q});for(var I=q.caption||q.value||q.name,F=I.toLowerCase(),V=(b.filterText||"").toLowerCase(),R=0,B=0,N=0;N<=V.length;N++)if(N!=B&&(q.matchMask&1<=B?q="bottom":q="top"),q==="top"?(N.bottom=w.top-this.$borderSize,N.top=N.bottom-B):q==="bottom"&&(N.top=w.top+L+this.$borderSize,N.bottom=N.top+B);var D=N.top>=0&&N.bottom<=F;if(!A&&!D)return!1;D?R.$maxPixelHeight=null:q==="top"?R.$maxPixelHeight=j:R.$maxPixelHeight=P,q==="top"?(I.style.top="",I.style.bottom=F-N.bottom+"px",b.isTopdown=!1):(I.style.top=N.top+"px",I.style.bottom="",b.isTopdown=!0),I.style.display="";var W=w.left;return W+I.offsetWidth>V&&(W=V-I.offsetWidth),I.style.left=W+"px",I.style.right="",b.isOpen||(b.isOpen=!0,this._signal("show"),x=null),b.anchorPos=w,b.anchor=q,!0},b.show=function(w,L,q){this.tryShow(w,L,q?"bottom":void 0,!0)},b.goTo=function(w){var L=this.getRow(),q=this.session.getLength()-1;switch(w){case"up":L=L<=0?q:L-1;break;case"down":L=L>=q?-1:L+1;break;case"start":L=0;break;case"end":L=q}this.setRow(L)},b.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},b.$imageSize=0,b.$borderSize=1,b}return C}();l.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 { margin-left: 0.9em; 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; } .ace_autocomplete.ace_loading:after { content: ""; position: absolute; top: 0px; height: 2px; width: 8%; background: blue; z-index: 100; animation: ace_progress 3s infinite linear; animation-delay: 300ms; transform: translateX(-100%) scaleX(1); } @keyframes ace_progress { 0% { transform: translateX(-100%) scaleX(1) } 50% { transform: translateX(625%) scaleX(2) } 100% { transform: translateX(1500%) scaleX(3) } } @media (prefers-reduced-motion) { .ace_autocomplete.ace_loading:after { transform: translateX(625%) scaleX(2); animation: none; } } `,"autocompletion.css",!1),h.AcePopup=v,h.$singleLineEditor=$,h.getAriaId=o}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,h,m){var g=function(){function a(u){this.editor=u,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return a.prototype.setScreenReaderContent=function(u){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var f=this.popup.getRow(),l=this.popup.renderer.$textLayer,n=l.element.childNodes[f-l.config.firstRow];if(n){for(var i="doc-tooltip ",o=0;o=0&&r.test(a[l]);l--)f.push(a[l]);return f.reverse().join("")},h.retrieveFollowingIdentifier=function(a,u,r){r=r||g;for(var f=[],l=u;l0)for(var b=this.popup.getFirstVisibleRow();b<=this.popup.getLastVisibleRow();b++){var E=this.popup.getData(b);E&&(!_||E.hideInlinePreview)&&this.$seen(E)}},y.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},y.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,b=[];_;)b.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=b}},y.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(b){b.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},y.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},y.prototype.$updatePopupPosition=function(){var _=this.editor,b=_.renderer,E=b.layerConfig.lineHeight,x=b.$cursorLayer.getPixelPosition(this.base,!0);x.left-=this.popup.getTextLeftOffset();var O=_.container.getBoundingClientRect();x.top+=O.top-b.layerConfig.offset,x.left+=O.left-_.renderer.scrollLeft,x.left+=b.gutterWidth;var M={top:x.top,left:x.left};b.$ghostText&&b.$ghostTextWidget&&this.base.row===b.$ghostText.position.row&&(M.top+=b.$ghostTextWidget.el.offsetHeight);var k=_.container.getBoundingClientRect().bottom-E,T=kthis.filterText&&_.lastIndexOf(this.filterText,0)===0)var b=this.filtered;else var b=this.all;this.filterText=_,b=this.filterCompletions(b,this.filterText),b=b.sort(function(x,O){return O.exactMatch-x.exactMatch||O.$score-x.$score||(x.caption||x.value).localeCompare(O.caption||O.value)});var E=null;b=b.filter(function(x){var O=x.snippet||x.caption||x.value;return O===E?!1:(E=O,!0)}),this.filtered=b},y.prototype.filterCompletions=function(_,b){var E=[],x=b.toUpperCase(),O=b.toLowerCase();e:for(var M=0,k;k=_[M];M++){var T=!this.ignoreCaption&&k.caption||k.value||k.snippet;if(!!T){var S=-1,w=0,L=0,q,A;if(this.exactMatch){if(b!==T.substr(0,b.length))continue e}else{var I=T.toLowerCase().indexOf(O);if(I>-1)L=I;else for(var F=0;F=0&&(R<0||V0&&(S===-1&&(L+=10),L+=A,w|=1<",r.escapeHTML(x.caption),"","
",r.escapeHTML(i(x.snippet))].join(""))},id:"snippetCompleter"},s=[o,l,n];h.setCompleters=function(x){s.length=0,x&&s.push.apply(s,x)},h.addCompleter=function(x){s.push(x)},h.textCompleter=l,h.keyWordCompleter=n,h.snippetCompleter=o;var c={name:"expandSnippet",exec:function(x){return g.expandWithTab(x)},bindKey:"Tab"},p=function(x,O){$(O.session.$mode)},$=function(x){typeof x=="string"&&(x=u.$modes[x]),!!x&&(g.files||(g.files={}),v(x.$id,x.snippetFileId),x.modes&&x.modes.forEach($))},v=function(x,O){!O||!x||g.files[x]||(g.files[x]={},u.loadModule(O,function(M){!M||(g.files[x]=M,!M.snippets&&M.snippetText&&(M.snippets=g.parseSnippetFile(M.snippetText)),g.register(M.snippets||[],M.scope),M.includeScopes&&(g.snippetMap[M.scope].includeScopes=M.includeScopes,M.includeScopes.forEach(function(k){$("ace/mode/"+k)})))}))},C=function(x){var O=x.editor,M=O.completer&&O.completer.activated;if(x.command.name==="backspace")M&&!f.getCompletionPrefix(O)&&O.completer.detach();else if(x.command.name==="insertstring"&&!M){y=x;var k=x.editor.$liveAutocompletionDelay;k?_.delay(k):b(x)}},y,_=r.delayedCall(function(){b(y)},0),b=function(x){var O=x.editor,M=f.getCompletionPrefix(O),k=f.triggerAutocomplete(O);if(M&&M.length>=O.$liveAutocompletionThreshold||k){var T=a.for(O);T.autoShown=!0,T.showPopup(O)}},E=e("../editor").Editor;e("../config").defineOptions(E.prototype,"editor",{enableBasicAutocompletion:{set:function(x){x?(this.completers||(this.completers=Array.isArray(x)?x:s),this.commands.addCommand(a.startCommand)):this.commands.removeCommand(a.startCommand)},value:!1},enableLiveAutocompletion:{set:function(x){x?(this.completers||(this.completers=Array.isArray(x)?x:s),this.commands.on("afterExec",C)):this.commands.off("afterExec",C)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(x){x?(this.commands.addCommand(c),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(c),this.off("changeMode",p))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(e){t&&(t.exports=e)})}()})(extLanguage_tools);const VARIANT_FORM_VERSION="3.0.10",MOCK_CASE_URL="https://ks3-cn-beijing.ksyuncs.com/vform-static/vcase/",ACE_BASE_PATH="https://ks3-cn-beijing.ksyun.com/vform2021/ace-mini",BEAUTIFIER_PATH="https://ks3-cn-beijing.ksyun.com/vform2021/js-beautify/1.14.0/beautifier.min.js";var index_vue_vue_type_style_index_0_scoped_true_lang$4="";const _sfc_main$2B={name:"CodeEditor",props:{modelValue:{type:String},readonly:{type:Boolean,default:!1},mode:{type:String,default:"javascript"},userWorker:{type:Boolean,default:!0}},emits:["update:modelValue"],mounted(){ace$1.config.set("basePath",ACE_BASE_PATH),this.addAutoCompletion(ace$1),this.aceEditor=ace$1.edit(this.$refs.ace,{maxLines:20,minLines:5,fontSize:12,theme:this.themePath,mode:this.modePath,tabSize:2,readOnly:this.readonly,highlightActiveLine:!0,value:this.codeValue}),this.aceEditor.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),this.mode==="json"?this.setJsonMode():this.mode==="css"&&this.setCssMode(),this.userWorker||this.aceEditor.getSession().setUseWorker(!1),this.aceEditor.getSession().on("change",t=>{this.$emit("update:modelValue",this.aceEditor.getValue())})},data(){return{aceEditor:null,themePath:"ace/theme/sqlserver",modePath:"ace/mode/javascript",codeValue:this.modelValue}},watch:{},methods:{addAutoCompletion(t){let d=[{meta:"VForm API",caption:"getWidgetRef",value:"getWidgetRef()",score:1},{meta:"VForm API",caption:"getFormRef",value:"getFormRef()",score:1}];t.require("ace/ext/language_tools").addCompleter({getCompletions:function(h,m,g,a,u){return a.length===0?u(null,[]):u(null,d)}})},setJsonMode(){this.aceEditor.getSession().setMode("ace/mode/json")},setCssMode(){this.aceEditor.getSession().setMode("ace/mode/css")},getEditorAnnotations(){return this.aceEditor.getSession().getAnnotations()},setValue(t){this.aceEditor.getSession().setValue(t)}}},_hoisted_1$s={class:"ace-container"},_hoisted_2$k={class:"ace-editor",ref:"ace"};function _sfc_render$2B(t,d,e,h,m,g){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$s,[require$$0$1.createElementVNode("div",_hoisted_2$k,null,512)])}var CodeEditor=_export_sfc$1(_sfc_main$2B,[["render",_sfc_render$2B],["__scopeId","data-v-335e1214"]]);const generateCode=function(t,d="vue"){let e=JSON.stringify(t);return d==="html"?` VForm Demo
Submit